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

PlutusLedgerApi.V1.Data.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. -- editorconfig-checker-disable-file

Constructors

TxId 

Instances

Instances details
DefaultUni ()) #

type Rep TxId # 
Instance details

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

data ScriptTag #

A tag indicating the type of script that we are pointing to.

See also ScriptPurpose

Constructors

Spend 
Mint 
Cert 
Reward 

Instances

Instances details
Generic ScriptTag # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Associated Types

type Rep ScriptTag :: Type -> Type #

Show ScriptTag # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

NFData ScriptTag # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

rnf :: ScriptTag -> () #

Eq ScriptTag # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Ord ScriptTag # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

type Rep ScriptTag # 
Instance details

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.

Instances

Instances details
Generic RedeemerPtr # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Associated Types

type Rep RedeemerPtr :: Type -> Type #

Show RedeemerPtr # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

NFData RedeemerPtr # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Methods

rnf :: RedeemerPtr -> () #

Eq RedeemerPtr # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

Ord RedeemerPtr # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

type Rep RedeemerPtr # 
Instance details

Defined in PlutusLedgerApi.V1.Data.Tx

type Rep RedeemerPtr = D1 ('MetaData "RedeemerPtr" "PlutusLedgerApi.V1.Data.Tx" "plutus-ledger-api-1.60.0.0-inplace" 'False) (C1 ('MetaCons "RedeemerPtr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScriptTag) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))

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 (Address), a value (Value), and optionally a datum hash (DatumHash).

Instances

Instances details
DefaultUni ()) #

type Rep TxOut # 
Instance details

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

pattern TxOut :: Address -> Value -> Maybe DatumHash -> TxOut #

matchTxOut :: forall r. TxOut -> (Address -> Value -> Maybe DatumHash -> r) -> r #

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.

Instances

Instances details
Lens' TxOut Value #

The value of a transaction output. | TODO: Compute address again

txOutPubKey :: TxOut -> Maybe PubKeyHash #

The public key attached to a TxOut, if there is one.

txOutDatum :: TxOut -> Maybe DatumHash #

The datum attached to a TxOut, if there is one.

pubKeyHashTxOut :: Value -> PubKeyHash -> TxOut #

Create a transaction output locked by a public key.