Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data TxValidationMode
- module Cardano.Chain.UTxO.Validation
- data UTxOConfiguration = UTxOConfiguration {}
- defaultUTxOConfiguration ∷ UTxOConfiguration
- mkUTxOConfiguration ∷ [Address] → UTxOConfiguration
- module Cardano.Chain.UTxO.UTxO
- type TxWitness = Vector TxInWitness
- data TxInWitness
- newtype TxSigData = TxSigData {}
- type TxSig = Signature TxSigData
- recoverSigData ∷ Annotated Tx ByteString → Annotated TxSigData ByteString
- data TxProof = TxProof {
- txpNumber ∷ !Word32
- txpRoot ∷ !(MerkleRoot Tx)
- txpWitnessesHash ∷ !(Hash [TxWitness])
- mkTxProof ∷ TxPayload → TxProof
- recoverTxProof ∷ ATxPayload ByteString → TxProof
- type TxPayload = ATxPayload ()
- newtype ATxPayload a = ATxPayload {
- aUnTxPayload ∷ [ATxAux a]
- mkTxPayload ∷ [TxAux] → TxPayload
- recoverHashedBytes ∷ ATxPayload ByteString → Annotated [TxWitness] ByteString
- txpAnnotatedTxs ∷ ATxPayload a → [Annotated Tx a]
- txpTxs ∷ ATxPayload a → [Tx]
- txpWitnesses ∷ TxPayload → [TxWitness]
- unTxPayload ∷ ATxPayload a → [TxAux]
- type TxAux = ATxAux ()
- data ATxAux a = ATxAux {
- aTaTx ∷ !(Annotated Tx a)
- aTaWitness ∷ !(Annotated TxWitness a)
- aTaAnnotation ∷ !a
- mkTxAux ∷ Tx → TxWitness → TxAux
- annotateTxAux ∷ TxAux → ATxAux ByteString
- taTx ∷ ATxAux a → Tx
- taWitness ∷ ATxAux a → TxWitness
- txaF ∷ Format r (TxAux → r)
- data Tx = UnsafeTx {
- txInputs ∷ !(NonEmpty TxIn)
- txOutputs ∷ !(NonEmpty TxOut)
- txAttributes ∷ !TxAttributes
- txF ∷ Format r (Tx → r)
- type TxId = Hash Tx
- type TxAttributes = Attributes ()
- data TxIn = TxInUtxo TxId Word16
- data TxOut = TxOut {}
- genesisUtxo ∷ Config → UTxO
- data CompactTxIn = CompactTxInUtxo !CompactTxId !Word16
- toCompactTxIn ∷ TxIn → CompactTxIn
- fromCompactTxIn ∷ CompactTxIn → TxIn
- data CompactTxId
- toCompactTxId ∷ TxId → CompactTxId
- fromCompactTxId ∷ CompactTxId → TxId
- data CompactTxOut = CompactTxOut !CompactAddress !Lovelace
- toCompactTxOut ∷ TxOut → CompactTxOut
- fromCompactTxOut ∷ CompactTxOut → TxOut
Documentation
data TxValidationMode Source #
Indicates what sort of transaction validation should be performed.
TxValidation | Perform all transaction validations. |
TxValidationNoCrypto | Because we've already validated this transaction against some ledger state, we know that cryptographic validation has passed. However, we should still perform all of the other non-cryptographic checks since we're validating against a potentially dfferent ledger state. |
NoTxValidation | No validations should be performed as we have already validated this transaction against this very same ledger state. |
Instances
Show TxValidationMode Source # | |
Defined in Cardano.Chain.UTxO.ValidationMode | |
Eq TxValidationMode Source # | |
Defined in Cardano.Chain.UTxO.ValidationMode |
data UTxOConfiguration Source #
Additional configuration for ledger validation.
UTxOConfiguration | |
|
Instances
module Cardano.Chain.UTxO.UTxO
type TxWitness = Vector TxInWitness Source #
A witness is a proof that a transaction is allowed to spend the funds it spends (by providing signatures, redeeming scripts, etc). A separate proof is provided for each input.
data TxInWitness Source #
A witness for a single input
VKWitness !VerificationKey !TxSig | VKWitness twKey twSig |
RedeemWitness !RedeemVerificationKey !(RedeemSignature TxSigData) | RedeemWitness twRedeemKey twRedeemSig |
Instances
Data that is being signed when creating a TxSig
TxProof | |
|
Instances
ToJSON TxProof Source # | |
Generic TxProof Source # | |
Show TxProof Source # | |
FromCBOR TxProof Source # | |
ToCBOR TxProof Source # | |
DecCBOR TxProof Source # | |
EncCBOR TxProof Source # | |
NFData TxProof Source # | |
Defined in Cardano.Chain.UTxO.TxProof | |
Buildable TxProof Source # | |
Eq TxProof Source # | |
NoThunks TxProof Source # | |
type Rep TxProof Source # | |
Defined in Cardano.Chain.UTxO.TxProof type Rep TxProof = D1 ('MetaData "TxProof" "Cardano.Chain.UTxO.TxProof" "cardano-ledger-byron-1.0.2.0-inplace" 'False) (C1 ('MetaCons "TxProof" 'PrefixI 'True) (S1 ('MetaSel ('Just "txpNumber") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: (S1 ('MetaSel ('Just "txpRoot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (MerkleRoot Tx)) :*: S1 ('MetaSel ('Just "txpWitnessesHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash [TxWitness]))))) |
type TxPayload = ATxPayload () Source #
Payload of UTxO component which is part of the block body
newtype ATxPayload a Source #
ATxPayload | |
|
Instances
mkTxPayload ∷ [TxAux] → TxPayload Source #
txpAnnotatedTxs ∷ ATxPayload a → [Annotated Tx a] Source #
txpTxs ∷ ATxPayload a → [Tx] Source #
txpWitnesses ∷ TxPayload → [TxWitness] Source #
unTxPayload ∷ ATxPayload a → [TxAux] Source #
ATxAux | |
|
Instances
Transaction
NB: transaction witnesses are stored separately
UnsafeTx | |
|
Instances
ToJSON Tx Source # | |
Generic Tx Source # | |
Show Tx Source # | |
FromCBOR Tx Source # | |
ToCBOR Tx Source # | |
DecCBOR Tx Source # | |
EncCBOR Tx Source # | |
NFData Tx Source # | |
Defined in Cardano.Chain.UTxO.Tx | |
Buildable Tx Source # | |
Eq Tx Source # | |
Ord Tx Source # | |
type Rep Tx Source # | |
Defined in Cardano.Chain.UTxO.Tx type Rep Tx = D1 ('MetaData "Tx" "Cardano.Chain.UTxO.Tx" "cardano-ledger-byron-1.0.2.0-inplace" 'False) (C1 ('MetaCons "UnsafeTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "txInputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty TxIn)) :*: (S1 ('MetaSel ('Just "txOutputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty TxOut)) :*: S1 ('MetaSel ('Just "txAttributes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxAttributes)))) |
type TxAttributes = Attributes () Source #
Represents transaction attributes: map from 1-byte integer to arbitrary-type value. To be used for extending transaction with new fields via softfork.
Transaction arbitrary input
TxInUtxo TxId Word16 | TxId = Which transaction's output is used | Word16 = Index of the output in transaction's outputs |
Instances
ToJSON TxIn Source # | |
Generic TxIn Source # | |
Show TxIn Source # | |
FromCBOR TxIn Source # | |
ToCBOR TxIn Source # | |
DecCBOR TxIn Source # | |
EncCBOR TxIn Source # | |
NFData TxIn Source # | |
Defined in Cardano.Chain.UTxO.Tx | |
Buildable TxIn Source # | |
Eq TxIn Source # | |
Ord TxIn Source # | |
HeapWords TxIn Source # | |
type Rep TxIn Source # | |
Defined in Cardano.Chain.UTxO.Tx type Rep TxIn = D1 ('MetaData "TxIn" "Cardano.Chain.UTxO.Tx" "cardano-ledger-byron-1.0.2.0-inplace" 'False) (C1 ('MetaCons "TxInUtxo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16))) |
Transaction output
Instances
ToJSON TxOut Source # | |
Generic TxOut Source # | |
Show TxOut Source # | |
FromCBOR TxOut Source # | |
ToCBOR TxOut Source # | |
DecCBOR TxOut Source # | |
EncCBOR TxOut Source # | |
NFData TxOut Source # | |
Defined in Cardano.Chain.UTxO.Tx | |
Buildable TxOut Source # | |
Eq TxOut Source # | |
Ord TxOut Source # | |
HeapWords TxOut Source # | |
type Rep TxOut Source # | |
Defined in Cardano.Chain.UTxO.Tx type Rep TxOut = D1 ('MetaData "TxOut" "Cardano.Chain.UTxO.Tx" "cardano-ledger-byron-1.0.2.0-inplace" 'False) (C1 ('MetaCons "TxOut" 'PrefixI 'True) (S1 ('MetaSel ('Just "txOutAddress") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Address) :*: S1 ('MetaSel ('Just "txOutValue") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Lovelace))) |
data CompactTxIn Source #
A compact in-memory representation for a TxIn
.
Convert using toCompactTxIn
and fromCompactTxIn
.
Instances
data CompactTxId Source #
A compact in-memory representation for a TxId
.
Convert using toCompactTxId
and fromCompactTxId
.
Compared to a normal TxId
, this takes 5 heap words rather than 12.
Instances
data CompactTxOut Source #
A compact in-memory representation for a TxOut
.
Convert using toCompactTxOut
and fromCompactTxOut
.