| Safe Haskell | None |
|---|---|
| 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 {
- txOutRefId :: TxId
- txOutRefIdx :: Integer
- 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
| Generic ScriptTag Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Associated Types
| |||||
| Show ScriptTag Source # | |||||
| NFData ScriptTag Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| Eq ScriptTag Source # | |||||
| Ord ScriptTag Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| HasBlueprintDefinition ScriptTag Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Associated Types
Methods definitionId :: DefinitionId | |||||
| FromData ScriptTag Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods | |||||
| ToData ScriptTag Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods toBuiltinData :: ScriptTag -> BuiltinData # | |||||
| UnsafeFromData ScriptTag Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods | |||||
| HasBlueprintSchema ScriptTag referencedTypes Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods schema :: Schema referencedTypes | |||||
| type Rep ScriptTag Source # | |||||
Defined in PlutusLedgerApi.V1.Tx type Rep ScriptTag = D1 ('MetaData "ScriptTag" "PlutusLedgerApi.V1.Tx" "plutus-ledger-api-1.60.0.0-G1HmqwHNllaA7AnJNjAfhP" '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))) | |||||
| type Unroll ScriptTag Source # | |||||
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
| Generic RedeemerPtr Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Associated Types
Methods from :: RedeemerPtr -> Rep RedeemerPtr x Source # to :: Rep RedeemerPtr x -> RedeemerPtr Source # | |||||
| Show RedeemerPtr Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| NFData RedeemerPtr Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods rnf :: RedeemerPtr -> () Source # | |||||
| Eq RedeemerPtr Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods (==) :: RedeemerPtr -> RedeemerPtr -> Bool Source # (/=) :: RedeemerPtr -> RedeemerPtr -> Bool Source # | |||||
| Ord RedeemerPtr Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods compare :: RedeemerPtr -> RedeemerPtr -> Ordering Source # (<) :: RedeemerPtr -> RedeemerPtr -> Bool Source # (<=) :: RedeemerPtr -> RedeemerPtr -> Bool Source # (>) :: RedeemerPtr -> RedeemerPtr -> Bool Source # (>=) :: RedeemerPtr -> RedeemerPtr -> Bool Source # max :: RedeemerPtr -> RedeemerPtr -> RedeemerPtr Source # min :: RedeemerPtr -> RedeemerPtr -> RedeemerPtr Source # | |||||
| HasBlueprintDefinition RedeemerPtr Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Associated Types
Methods definitionId :: DefinitionId | |||||
| FromData RedeemerPtr Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods | |||||
| ToData RedeemerPtr Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods toBuiltinData :: RedeemerPtr -> BuiltinData # | |||||
| UnsafeFromData RedeemerPtr Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods | |||||
| (HasSchemaDefinition ScriptTag referencedTypes, HasSchemaDefinition Integer referencedTypes) => HasBlueprintSchema RedeemerPtr referencedTypes Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods schema :: Schema referencedTypes | |||||
| type Rep RedeemerPtr Source # | |||||
Defined in PlutusLedgerApi.V1.Tx type Rep RedeemerPtr = D1 ('MetaData "RedeemerPtr" "PlutusLedgerApi.V1.Tx" "plutus-ledger-api-1.60.0.0-G1HmqwHNllaA7AnJNjAfhP" '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 Unroll RedeemerPtr Source # | |||||
Defined in PlutusLedgerApi.V1.Tx type Unroll RedeemerPtr = Insert RedeemerPtr (GUnroll (IfStuckRep (RepIsStuckError RedeemerPtr :: Type -> Type) (Rep RedeemerPtr))) | |||||
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
| Generic TxOut Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Associated Types
| |||||
| Show TxOut Source # | |||||
| NFData TxOut Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| Eq TxOut Source # | |||||
| HasBlueprintDefinition TxOut Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Associated Types
Methods definitionId :: DefinitionId | |||||
| Eq TxOut Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| FromData TxOut Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxOut # | |||||
| ToData TxOut Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods toBuiltinData :: TxOut -> BuiltinData # | |||||
| UnsafeFromData TxOut Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods | |||||
| Pretty TxOut Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| (HasSchemaDefinition Address referencedTypes, HasSchemaDefinition Value referencedTypes, HasSchemaDefinition (Maybe DatumHash) referencedTypes) => HasBlueprintSchema TxOut referencedTypes Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods schema :: Schema referencedTypes | |||||
| Lift DefaultUni TxOut Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| Typeable DefaultUni TxOut Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| type Rep TxOut Source # | |||||
Defined in PlutusLedgerApi.V1.Tx type Rep TxOut = D1 ('MetaData "TxOut" "PlutusLedgerApi.V1.Tx" "plutus-ledger-api-1.60.0.0-G1HmqwHNllaA7AnJNjAfhP" 'False) (C1 ('MetaCons "TxOut" 'PrefixI 'True) (S1 ('MetaSel ('Just "txOutAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Address) :*: (S1 ('MetaSel ('Just "txOutValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Just "txOutDatumHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe DatumHash))))) | |||||
| type Unroll TxOut Source # | |||||
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
| Generic TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Associated Types
| |||||
| Show TxOutRef Source # | |||||
| NFData TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| Eq TxOutRef Source # | |||||
| Ord TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| HasBlueprintDefinition TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Associated Types
Methods definitionId :: DefinitionId | |||||
| Eq TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| FromData TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods fromBuiltinData :: BuiltinData -> Maybe TxOutRef # | |||||
| ToData TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods toBuiltinData :: TxOutRef -> BuiltinData # | |||||
| UnsafeFromData TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods | |||||
| Pretty TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| (HasSchemaDefinition TxId referencedTypes, HasSchemaDefinition Integer referencedTypes) => HasBlueprintSchema TxOutRef referencedTypes Source # | |||||
Defined in PlutusLedgerApi.V1.Tx Methods schema :: Schema referencedTypes | |||||
| Lift DefaultUni TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| Typeable DefaultUni TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx | |||||
| type Rep TxOutRef Source # | |||||
Defined in PlutusLedgerApi.V1.Tx type Rep TxOutRef = D1 ('MetaData "TxOutRef" "PlutusLedgerApi.V1.Tx" "plutus-ledger-api-1.60.0.0-G1HmqwHNllaA7AnJNjAfhP" 'False) (C1 ('MetaCons "TxOutRef" 'PrefixI 'True) (S1 ('MetaSel ('Just "txOutRefId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId) :*: S1 ('MetaSel ('Just "txOutRefIdx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))) | |||||
| type Unroll TxOutRef Source # | |||||
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.
pubKeyHashTxOut :: Value -> PubKeyHash -> TxOut Source #
Create a transaction output locked by a public key.