| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusLedgerApi.V2.Data.Tx
Contents
Synopsis
- newtype TxId = TxId {}
- data ScriptTag
- data RedeemerPtr = RedeemerPtr ScriptTag Integer
- type Redeemers = Map RedeemerPtr Redeemer
- data TxOut
- pattern TxOut :: Address -> Value -> OutputDatum -> Maybe ScriptHash -> TxOut
- txOutAddress :: TxOut -> Address
- txOutValue :: TxOut -> Value
- txOutDatum :: TxOut -> OutputDatum
- txOutReferenceScript :: TxOut -> Maybe ScriptHash
- data TxOutRef
- pattern TxOutRef :: TxId -> Integer -> TxOutRef
- txOutRefId :: TxOutRef -> TxId
- txOutRefIdx :: TxOutRef -> Integer
- data OutputDatum
- pattern NoOutputDatum :: OutputDatum
- pattern OutputDatumHash :: DatumHash -> OutputDatum
- pattern OutputDatum :: Datum -> OutputDatum
- isPubKeyOut :: TxOut -> Bool
- isPayToScriptOut :: TxOut -> Bool
- outAddress :: Lens' TxOut Address
- outValue :: Lens' TxOut Value
- txOutPubKey :: TxOut -> Maybe PubKeyHash
- outDatum :: Lens' TxOut OutputDatum
- outReferenceScript :: 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. -- editorconfig-checker-disable-file
Constructors
| TxId | |
Fields | |
Instances
A tag indicating the type of script that we are pointing to.
See also ScriptPurpose
Instances
| Generic ScriptTag Source # | |
| Show ScriptTag Source # | |
| NFData ScriptTag Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx | |
| Eq ScriptTag Source # | |
| Ord ScriptTag Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx | |
| type Rep ScriptTag Source # | |
Defined in PlutusLedgerApi.V1.Data.Tx type Rep ScriptTag = D1 ('MetaData "ScriptTag" "PlutusLedgerApi.V1.Data.Tx" "plutus-ledger-api-1.45.0.0-4sBiUM4DKlI2NgrKBx1zp5" '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 Source #
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 Source #
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.
Instances
| Generic TxOut Source # | |
| Show TxOut Source # | |
| Eq TxOut Source # | |
| Eq TxOut Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx | |
| FromData TxOut Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxOut # | |
| ToData TxOut Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx Methods toBuiltinData :: TxOut -> BuiltinData # | |
| UnsafeFromData TxOut Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx Methods | |
| Pretty TxOut Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx | |
| Lift DefaultUni TxOut Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx | |
| Typeable DefaultUni TxOut Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx | |
| type Rep TxOut Source # | |
Defined in PlutusLedgerApi.V2.Data.Tx type Rep TxOut = D1 ('MetaData "TxOut" "PlutusLedgerApi.V2.Data.Tx" "plutus-ledger-api-1.45.0.0-4sBiUM4DKlI2NgrKBx1zp5" 'True) (C1 ('MetaCons "TxOut_6989586621679947748" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData))) | |
pattern TxOut :: Address -> Value -> OutputDatum -> Maybe ScriptHash -> TxOut Source #
txOutAddress :: TxOut -> Address Source #
txOutValue :: TxOut -> Value Source #
txOutDatum :: TxOut -> OutputDatum Source #
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
txOutRefId :: TxOutRef -> TxId Source #
txOutRefIdx :: TxOutRef -> Integer Source #
data OutputDatum Source #
The datum attached to an output: either nothing; a datum hash; or the datum itself (an "inline datum").
Instances
pattern NoOutputDatum :: OutputDatum Source #
pattern OutputDatumHash :: DatumHash -> OutputDatum Source #
pattern OutputDatum :: Datum -> OutputDatum Source #
isPubKeyOut :: TxOut -> Bool Source #
Whether the output is a pay-to-pubkey output.
isPayToScriptOut :: TxOut -> Bool Source #
Whether the output is a pay-to-script output.
outAddress :: Lens' TxOut Address Source #
The address of a transaction output.
outValue :: Lens' TxOut Value Source #
The value of a transaction output. | TODO: Compute address again
txOutPubKey :: TxOut -> Maybe PubKeyHash Source #
The public key attached to a TxOut, if there is one.
outReferenceScript :: Lens' TxOut (Maybe ScriptHash) Source #
The reference script attached to a TxOut.
pubKeyHashTxOut :: Value -> PubKeyHash -> TxOut Source #
Create a transaction output locked by a public key.