plutus-ledger-api-1.0.0.1: Interface to the Plutus ledger for the Cardano ledger.
Safe Haskell None
Language Haskell2010

Plutus.V1.Ledger.Tx

Synopsis

Transactions

newtype TxId Source #

A transaction ID, using a SHA256 hash as the transaction id.

Instances

Instances details
Eq TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

IsString TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxId :: Type -> Type Source #

NFData TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Pretty TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

ToData TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

FromData TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

UnsafeFromData TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Eq TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Lift DefaultUni TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Typeable DefaultUni TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxId Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxId = D1 (' MetaData "TxId" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' True ) ( C1 (' MetaCons "TxId" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getTxId") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BuiltinByteString )))

data ScriptTag Source #

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

Instances

Instances details
Eq ScriptTag Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord ScriptTag Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Show ScriptTag Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic ScriptTag Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

NFData ScriptTag Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep ScriptTag Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep ScriptTag = D1 (' MetaData "ScriptTag" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' 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 t and an index i, picking out the ith script of type t in the transaction.

Instances

Instances details
Eq RedeemerPtr Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord RedeemerPtr Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Show RedeemerPtr Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic RedeemerPtr Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

NFData RedeemerPtr Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep RedeemerPtr Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Transaction outputs

data TxOut Source #

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

Instances

Instances details
Eq TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

NFData TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Pretty TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

ToData TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

FromData TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

UnsafeFromData TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Eq TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Lift DefaultUni TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Typeable DefaultUni TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOut Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

data TxOutRef Source #

A reference to a transaction output. This is a pair of a transaction reference, and an index indicating which of the outputs of that transaction we are referring to.

Constructors

TxOutRef

Fields

Instances

Instances details
Eq TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

NFData TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Pretty TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

ToData TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

FromData TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

UnsafeFromData TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Eq TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Lift DefaultUni TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Typeable DefaultUni TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOutRef Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOutRef = D1 (' MetaData "TxOutRef" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" ' False ) ( C1 (' MetaCons "TxOutRef" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "txOutRefId") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 TxId ) :*: S1 (' MetaSel (' Just "txOutRefIdx") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Integer )))

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.

txOutDatum :: TxOut -> Maybe DatumHash Source #

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

pubKeyHashTxOut :: Value -> PubKeyHash -> TxOut Source #

Create a transaction output locked by a public key.

Transaction inputs

data TxInType Source #

The type of a transaction input.

Constructors

ConsumeScriptAddress ! Validator ! Redeemer ! Datum

A transaction input that consumes a script address with the given validator, redeemer, and datum.

ConsumePublicKeyAddress

A transaction input that consumes a public key address.

ConsumeSimpleScriptAddress

Consume a simple script

Instances

Instances details
Eq TxInType Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxInType Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxInType Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxInType Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

NFData TxInType Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxInType Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

data TxIn Source #

A transaction input, consisting of a transaction output reference and an input type.

Instances

Instances details
Eq TxIn Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxIn Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxIn Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxIn Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxIn :: Type -> Type Source #

NFData TxIn Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

Pretty TxIn Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxIn Source #
Instance details

Defined in Plutus.V1.Ledger.Tx

inType :: Lens' TxIn ( Maybe TxInType ) Source #

The type of a transaction input.

inScripts :: TxIn -> Maybe ( Validator , Redeemer , Datum ) Source #

Validator, redeemer, and data scripts of a transaction input that spends a "pay to script" output.

pubKeyTxIn :: TxOutRef -> TxIn Source #

A transaction input that spends a "pay to public key" output, given the witness.

scriptTxIn :: TxOutRef -> Validator -> Redeemer -> Datum -> TxIn Source #

A transaction input that spends a "pay to script" output, given witnesses.

pubKeyTxIns :: Fold ( Set TxIn ) TxIn Source #

Filter to get only the pubkey inputs.

scriptTxIns :: Fold ( Set TxIn ) TxIn Source #

Filter to get only the script inputs.