| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusLedgerApi.V2.Tx
Contents
Synopsis
- newtype TxId = TxId {}
- data ScriptTag
- data RedeemerPtr = RedeemerPtr ScriptTag Lens' TxOut (Maybe ScriptHash)
- pubKeyHashTxOut :: Value -> PubKeyHash -> TxOut
Transactions
A transaction ID, i.e. the hash of a transaction. Hashed with BLAKE2b-256. 32 byte.
This is a simple type without any validation, use with caution. You may want to add checks for its invariants. See the Shelley ledger specification.
Constructors
| TxId | |
Fields | |
data RedeemerPtr #
A redeemer pointer is a pair of a script type tag (ScriptTag) t and an index i,
picking out the i-th script of type t in the transaction.
Constructors
| RedeemerPtr ScriptTag RepIsStuckError RedeemerPtr :: Type -> Type) (Rep RedeemerPtr))) |
type Redeemers = Map RedeemerPtr Redeemer #
Redeemers is a Map of redeemer pointer (RedeemerPtr) and its Redeemer.
Transaction outputs
A transaction output, consisting of a target address, a value, optionally a datum/datum hash, and optionally a reference script.
Constructors
| TxOut | |
Fields
| |
A reference to a transaction output. This is a
pair of a transaction ID (TxId), and an index indicating which of the outputs
of that transaction we are referring to.
Constructors
| TxOutRef | |
Fields
| |
data OutputDatum #
The datum attached to an output: either nothing; a datum hash; or the datum itself (an "inline datum").
Constructors
| NoOutputDatum | |
| OutputDatumHash DatumHash | |
| OutputDatum Datum |
Instances
| Lens' TxOut Value # The value of a transaction output. | TODO: Compute address again txOutPubKey :: TxOut -> Lens' TxOut (Maybe ScriptHash) # The reference script attached to a pubKeyHashTxOut :: Value -> PubKeyHash -> TxOut # Create a transaction output locked by a public key. |