| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusLedgerApi.V1.Tx
Contents
Synopsis
- newtype TxId = TxId {}
- data ScriptTag
- data RedeemerPtr = RedeemerPtr ScriptTag Integer
- type Redeemers = Map RedeemerPtr Redeemer
- data TxOut = TxOut {}
- data TxOutRef = TxOutRef {}
- isPubKeyOut ∷ TxOut → Bool
- isPayToScriptOut ∷ TxOut → Bool
- outAddress ∷ Lens' TxOut Address
- outValue ∷ 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.
Constructors
| TxId | |
Fields | |
Instances
A tag indicating the type of script that we are pointing to.
See also ScriptPurpose
Instances
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 (Address), a value (Value),
and optionally a datum hash (DatumHash).
Constructors
| TxOut | |
Fields | |
Instances
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
| |
Instances
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.
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.
pubKeyHashTxOut ∷ Value → PubKeyHash → TxOut Source #
Create a transaction output locked by a public key.