| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusLedgerApi.V1.Data.Tx
Contents
Synopsis
- newtype TxId = TxId {}
- data ScriptTag
- data RedeemerPtr = RedeemerPtr ScriptTag Lens' TxOut Value
- txOutPubKey :: TxOut -> Maybe PubKeyHash
- txOutDatum :: TxOut -> Maybe DatumHash
- 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. -- editorconfig-checker-disable-file
Constructors
| TxId | |
Fields | |
Instances
| DefaultUni ()) # | |
| type Rep TxId # | |
Defined in PlutusLedgerApi.V1.Data.Tx type Rep TxId = D1 ('MetaData "TxId" "PlutusLedgerApi.V1.Data.Tx" "plutus-ledger-api-1.60.0.0-inplace" 'True) (C1 ('MetaCons "TxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString))) | |
A tag indicating the type of script that we are pointing to.
See also ScriptPurpose
Instances
| Generic ScriptTag # | |
| Show ScriptTag # | |
| NFData ScriptTag # | |
Defined in PlutusLedgerApi.V1.Data.Tx | |
| Eq ScriptTag # | |
| Ord ScriptTag # | |
| type Rep ScriptTag # | |
Defined in PlutusLedgerApi.V1.Data.Tx type Rep ScriptTag = D1 ('MetaData "ScriptTag" "PlutusLedgerApi.V1.Data.Tx" "plutus-ledger-api-1.60.0.0-inplace" 'False) ((C1 ('MetaCons "Spend" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mint" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Cert" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Reward" 'PrefixI 'False) (U1 :: Type -> Type))) | |
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 Integer |
Instances
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 (Address), a value (Value),
and optionally a datum hash (DatumHash).
Instances
| DefaultUni ()) # | |
| type Rep TxOut # | |
Defined in PlutusLedgerApi.V1.Data.Tx type Rep TxOut = D1 ('MetaData "TxOut" "PlutusLedgerApi.V1.Data.Tx" "plutus-ledger-api-1.60.0.0-inplace" 'True) (C1 ('MetaCons "TxOut_6989586621680121571" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData))) | |
txOutAddress :: TxOut -> Address #
txOutValue :: TxOut -> Value #
txOutDatumHash :: TxOut -> Maybe DatumHash #
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.
Instances
| Lens' TxOut Value # The value of a transaction output. | TODO: Compute address again txOutPubKey :: TxOut -> Maybe PubKeyHash # The public key attached to a pubKeyHashTxOut :: Value -> PubKeyHash -> TxOut # Create a transaction output locked by a public key. |