plutus-ledger-api-1.60.0.0: Interface to the Plutus ledger for the Cardano ledger.
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusLedgerApi.V2.Tx

Synopsis

Transactions

newtype TxId #

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 

Instances

Instances details
RepIsStuckError ScriptTag :: Type -> Type) (Rep ScriptTag)))

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.

type Redeemers = Map RedeemerPtr Redeemer #

Redeemers is a Map of redeemer pointer (RedeemerPtr) and its Redeemer.

Transaction outputs

data TxOut #

A transaction output, consisting of a target address, a value, optionally a datum/datum hash, and optionally a reference script.

data TxOutRef #

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").

Instances

Instances details
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 TxOut.

pubKeyHashTxOut :: Value -> PubKeyHash -> TxOut #

Create a transaction output locked by a public key.