Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- data TxInType
- data TxIn = TxIn { }
- inRef :: Lens' TxIn TxOutRef
- inType :: Lens' TxIn ( Maybe TxInType )
- inScripts :: TxIn -> Maybe ( Validator , Redeemer , Datum )
- pubKeyTxIn :: TxOutRef -> TxIn
- scriptTxIn :: TxOutRef -> Validator -> Redeemer -> Datum -> TxIn
- pubKeyTxIns :: Fold ( Set TxIn ) TxIn
- scriptTxIns :: Fold ( Set TxIn ) TxIn
Transactions
A transaction ID, using a SHA256 hash as the transaction id.
Instances
A tag indicating the type of script that we are pointing to.
Instances
Eq ScriptTag Source # | |
Ord ScriptTag Source # | |
Defined in Plutus.V1.Ledger.Tx |
|
Show ScriptTag Source # | |
Generic ScriptTag Source # | |
NFData ScriptTag Source # | |
Defined in Plutus.V1.Ledger.Tx |
|
type Rep ScriptTag Source # | |
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
Transaction outputs
A transaction output, consisting of a target address, a value, and optionally a datum hash.
Instances
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.
TxOutRef | |
|
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.
Transaction inputs
The type of a transaction input.
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
Eq TxInType Source # | |
Ord TxInType Source # | |
Defined in Plutus.V1.Ledger.Tx |
|
Show TxInType Source # | |
Generic TxInType Source # | |
NFData TxInType Source # | |
Defined in Plutus.V1.Ledger.Tx |
|
type Rep TxInType Source # | |
Defined in Plutus.V1.Ledger.Tx
type
Rep
TxInType
=
D1
('
MetaData
"TxInType" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" '
False
) (
C1
('
MetaCons
"ConsumeScriptAddress" '
PrefixI
'
False
) (
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
Validator
)
:*:
(
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
Redeemer
)
:*:
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
Datum
)))
:+:
(
C1
('
MetaCons
"ConsumePublicKeyAddress" '
PrefixI
'
False
) (
U1
::
Type
->
Type
)
:+:
C1
('
MetaCons
"ConsumeSimpleScriptAddress" '
PrefixI
'
False
) (
U1
::
Type
->
Type
)))
|
A transaction input, consisting of a transaction output reference and an input type.
Instances
Eq TxIn Source # | |
Ord TxIn Source # | |
Show TxIn Source # | |
Generic TxIn Source # | |
NFData TxIn Source # | |
Defined in Plutus.V1.Ledger.Tx |
|
Pretty TxIn Source # | |
type Rep TxIn Source # | |
Defined in Plutus.V1.Ledger.Tx
type
Rep
TxIn
=
D1
('
MetaData
"TxIn" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-GlUFhIIE0LJGuJDDdHh5lQ" '
False
) (
C1
('
MetaCons
"TxIn" '
PrefixI
'
True
) (
S1
('
MetaSel
('
Just
"txInRef") '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
TxOutRef
)
:*:
S1
('
MetaSel
('
Just
"txInType") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
(
Maybe
TxInType
))))
|
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.