| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusLedgerApi.V4.Data.Tx
Contents
Synopsis
- newtype TxId = TxId {}
- data TxOutRef
- pattern TxOutRef ∷ TxId → Integer → TxOutRef
- matchTxOutRef ∷ ∀ r. TxOutRef → (TxId → Integer → r) → r
- txOutRefId ∷ TxOutRef → TxId
- txOutRefIdx ∷ TxOutRef → Integer
- data OutputDatum
- matchOutputDatum ∷ ∀ r. OutputDatum → r → (DatumHash → r) → (Datum → r) → r
- pattern NoOutputDatum ∷ OutputDatum
- pattern OutputDatumHash ∷ DatumHash → OutputDatum
- pattern OutputDatum ∷ Datum → OutputDatum
- data TxOut
- pattern TxOut ∷ Address → Value → OutputDatum → Maybe ScriptHash → TxOut
- matchTxOut ∷ ∀ r. TxOut → (Address → Value → OutputDatum → Maybe ScriptHash → r) → r
- txOutAddress ∷ TxOut → Address
- txOutValue ∷ TxOut → Value
- txOutDatum ∷ TxOut → OutputDatum
- txOutReferenceScript ∷ TxOut → Maybe ScriptHash
- txOutPubKey ∷ TxOut → Maybe PubKeyHash
- txOutScriptHash ∷ TxOut → Maybe ScriptHash
- isPubKeyOut ∷ TxOut → Bool
- isPayToScriptOut ∷ TxOut → Bool
- 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 | |
Instances
Transaction outputs
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 #
data OutputDatum Source #
The datum attached to an output: either nothing; a datum hash; or the datum itself (an "inline datum").
Instances
matchOutputDatum ∷ ∀ r. OutputDatum → r → (DatumHash → r) → (Datum → r) → r Source #
pattern NoOutputDatum ∷ OutputDatum Source #
pattern OutputDatumHash ∷ DatumHash → OutputDatum Source #
pattern OutputDatum ∷ Datum → OutputDatum Source #
Transaction output for Plutus V4.
Instances
| Generic TxOut Source # | |
| Show TxOut Source # | |
| Eq TxOut Source # | |
| Eq TxOut Source # | |
| FromData TxOut Source # | |
Defined in PlutusLedgerApi.V4.Data.Tx Methods | |
| ToData TxOut Source # | |
Defined in PlutusLedgerApi.V4.Data.Tx Methods | |
| UnsafeFromData TxOut Source # | |
Defined in PlutusLedgerApi.V4.Data.Tx Methods | |
| Pretty TxOut Source # | |
| Lift DefaultUni TxOut Source # | |
Defined in PlutusLedgerApi.V4.Data.Tx Methods lift ∷ TxOut → RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source # | |
| Typeable DefaultUni TxOut Source # | |
Defined in PlutusLedgerApi.V4.Data.Tx Methods typeRep ∷ Proxy TxOut → RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source # | |
| type Rep TxOut Source # | |
Defined in PlutusLedgerApi.V4.Data.Tx type Rep TxOut = D1 ('MetaData "TxOut" "PlutusLedgerApi.V4.Data.Tx" "plutus-ledger-api-1.67.0.0-inplace" 'True) (C1 ('MetaCons "TxOut_6989586621680177945" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData))) | |
pattern TxOut ∷ Address → Value → OutputDatum → Maybe ScriptHash → TxOut Source #
matchTxOut ∷ ∀ r. TxOut → (Address → Value → OutputDatum → Maybe ScriptHash → r) → r Source #
txOutAddress ∷ TxOut → Address Source #
txOutValue ∷ TxOut → Value Source #
txOutPubKey ∷ TxOut → Maybe PubKeyHash Source #
The public key attached to a TxOut, if there is one.
txOutScriptHash ∷ TxOut → Maybe ScriptHash Source #
The validator hash attached to a TxOut, if there is one.
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.
pubKeyHashTxOut ∷ Value → PubKeyHash → TxOut Source #
Create a transaction output locked by a public key.