cardano-ledger-babbage-0.1.0.0: TODO
Safe Haskell None
Language Haskell2010

Cardano.Ledger.Babbage.Tx

Synopsis

Documentation

isTwoPhaseScriptAddressFromMap :: ValidateScript era => Map ( ScriptHash ( Crypto era)) ( Script era) -> Addr ( Crypto era) -> Bool Source #

Compute if an Addr has the hash of a TwoPhaseScript, we can tell what kind of Script from the Hash, by looking it up in the Map

toCBORForMempoolSubmission :: ( Typeable era, ToCBOR ( TxBody era), ToCBOR ( AuxiliaryData era)) => ValidatedTx era -> Encoding Source #

Encode to CBOR for the purposes of transmission from node to node, or from wallet to node.

Note that this serialisation is neither the serialisation used on-chain (where Txs are deconstructed using segwit), nor the serialisation used for computing the transaction size (which omits the IsValid field for compatibility with Mary - see toCBORForSizeComputation ).

indexedRdmrs :: ( Era era, HasField "inputs" ( TxBody era) ( Set ( TxIn ( Crypto era))), HasField "wdrls" ( TxBody era) ( Wdrl ( Crypto era)), HasField "certs" ( TxBody era) ( StrictSeq ( DCert ( Crypto era))), HasField "wits" tx ( TxWitness era), HasField "body" tx ( TxBody era)) => tx -> ScriptPurpose ( Crypto era) -> Maybe ( Data era, ExUnits ) Source #

Find the Data and ExUnits assigned to a script.

toCBORForSizeComputation :: ( Typeable era, ToCBOR ( TxBody era), ToCBOR ( AuxiliaryData era)) => ValidatedTx era -> Encoding Source #

This ensures that the size of transactions from Mary is unchanged. The individual components all store their bytes; the only work we do in this function is concatenating

newtype IsValid Source #

Tag indicating whether non-native scripts in this transaction are expected to validate. This is added by the block creator when constructing the block.

Constructors

IsValid Bool

Instances

Instances details
Eq IsValid
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Show IsValid
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Generic IsValid
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

NFData IsValid
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

ToCBOR IsValid
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

FromCBOR IsValid
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

NoThunks IsValid
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

type Rep IsValid
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

type Rep IsValid = D1 (' MetaData "IsValid" "Cardano.Ledger.Alonzo.Tx" "cardano-ledger-alonzo-0.1.0.0-xW3meaGVQP43dxJ76zbGD" ' True ) ( C1 (' MetaCons "IsValid" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Bool )))

data ValidatedTx era Source #

Instances

Instances details
( Typeable era, ToCBOR ( TxBody era), ToCBOR ( AuxiliaryData era)) => HasField "txsize" ( ValidatedTx era) Integer

txsize computes the length of the serialised bytes

Instance details

Defined in Cardano.Ledger.Alonzo.Tx

c ~ Crypto era => HasField "addrWits" ( ValidatedTx era) ( Set ( WitVKey ' Witness c))
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

c ~ Crypto era => HasField "bootWits" ( ValidatedTx era) ( Set ( BootstrapWitness c))
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

(c ~ Crypto era, script ~ Script era) => HasField "scriptWits" ( ValidatedTx era) ( Map ( ScriptHash c) script)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

c ~ Crypto era => HasField "txdatahash" ( ValidatedTx era) ( Map ( DataHash c) ( Data era))
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

( Era era, Eq ( AuxiliaryData era), Eq ( Script era), Eq ( TxBody era), Eq ( Value era), Eq ( PParamsDelta era), Compactible ( Value era)) => Eq ( ValidatedTx era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

( Era era, Compactible ( Value era), Show ( AuxiliaryData era), Show ( Script era), Show ( TxBody era), Show ( Value era), Show ( PParamsDelta era)) => Show ( ValidatedTx era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Generic ( ValidatedTx era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Associated Types

type Rep ( ValidatedTx era) :: Type -> Type Source #

( Era era, Script era ~ Script era, crypto ~ Crypto era, NFData ( AuxiliaryData era), NFData ( Script era), NFData ( TxBody era), NFData ( Value era), NFData ( PParamsDelta era), NFData ( TxDats era), NFData ( Redeemers era), NFData ( VerKeyDSIGN ( DSIGN crypto)), NFData ( SigDSIGN ( DSIGN crypto))) => NFData ( ValidatedTx era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

( Typeable era, ToCBOR ( TxBody era), ToCBOR ( AuxiliaryData era)) => ToCBOR ( ValidatedTx era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

( Era era, FromCBOR ( Annotator ( TxBody era)), FromCBOR ( Annotator ( AuxiliaryData era)), FromCBOR ( Annotator ( Witnesses era)), ValidateScript era, Script era ~ Script era) => FromCBOR ( Annotator ( ValidatedTx era))
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

( Era era, NoThunks ( AuxiliaryData era), NoThunks ( Script era), NoThunks ( TxBody era), NoThunks ( Value era), NoThunks ( PParamsDelta era)) => NoThunks ( ValidatedTx era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

type Rep ( ValidatedTx era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

data ScriptIntegrity era Source #

A ScriptIntegrityHash is the hash of three things. The first two come from the witnesses and the last comes from the Protocol Parameters.

Instances

Instances details
Eq ( ScriptIntegrity era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Show ( ScriptIntegrity era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Generic ( ScriptIntegrity era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Associated Types

type Rep ( ScriptIntegrity era) :: Type -> Type Source #

Era era => SafeToHash ( ScriptIntegrity era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Typeable era => NoThunks ( ScriptIntegrity era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

( Era era, c ~ Crypto era) => HashAnnotated ( ScriptIntegrity era) EraIndependentScriptIntegrity c
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

type Rep ( ScriptIntegrity era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

data ScriptPurpose crypto Source #

Instances

Instances details
Eq ( ScriptPurpose crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Show ( ScriptPurpose crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Generic ( ScriptPurpose crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Associated Types

type Rep ( ScriptPurpose crypto) :: Type -> Type Source #

Crypto crypto => NFData ( ScriptPurpose crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Methods

rnf :: ScriptPurpose crypto -> () Source #

( Typeable c, Crypto c) => ToCBOR ( ScriptPurpose c)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

( Typeable c, Crypto c) => FromCBOR ( ScriptPurpose c)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

NoThunks ( ScriptPurpose crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

type Rep ( ScriptPurpose crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

data Data era Source #

Instances

Instances details
c ~ Crypto era => HasField "txdatahash" ( ValidatedTx era) ( Map ( DataHash c) ( Data era))
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Eq ( Data era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Ord ( Data era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Show ( Data era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Generic ( Data era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Associated Types

type Rep ( Data era) :: Type -> Type Source #

NFData ( Data era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Methods

rnf :: Data era -> () Source #

Typeable era => ToCBOR ( Data era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Typeable era => FromCBOR ( Annotator ( Data era))
Instance details

Defined in Cardano.Ledger.Alonzo.Data

SafeToHash ( Data era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

NoThunks ( Data era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Crypto era ~ c => HashAnnotated ( Data era) EraIndependentData c
Instance details

Defined in Cardano.Ledger.Alonzo.Data

type Rep ( Data era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

type Rep ( Data era) = D1 (' MetaData "Data" "Cardano.Ledger.Alonzo.Data" "cardano-ledger-alonzo-0.1.0.0-xW3meaGVQP43dxJ76zbGD" ' True ) ( C1 (' MetaCons "DataConstr" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( MemoBytes Data ))))

data CostModel Source #

A language dependent cost model for the Plutus evaluator. Note that the EvaluationContext is entirely dependent on the cost model parameters (ie the Map Text Integer ) and that this type uses the smart constructor mkCostModel to hide the evaluation context.

Instances

Instances details
Eq CostModel

Note that this Eq instance ignores the evaluation context, which is entirely dependent on the cost model parameters and is guarded by the smart constructor mkCostModel .

Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Ord CostModel

Note that this Ord instance ignores the evaluation context, which is entirely dependent on the cost model parameters and is guarded by the smart constructor mkCostModel .

Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Show CostModel
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Generic CostModel
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

NFData CostModel
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

ToCBOR CostModel
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

SafeToHash CostModel
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

NoThunks CostModel
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

HashWithCrypto CostModel CostModel
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

type Rep CostModel
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

txouts :: Era era => TxBody era -> UTxO era Source #

Compute the transaction outputs of a transaction.

data TxBody era where Source #

Instances

Instances details
HasField "txfee" ( TxBody era) Coin Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

HasField "vldt" ( TxBody era) ValidityInterval Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

c ~ Crypto era => HasField "adHash" ( TxBody era) ( StrictMaybe ( AuxiliaryDataHash c)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Crypto era ~ crypto => HasField "certs" ( TxBody era) ( StrictSeq ( DCert crypto)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Crypto era ~ c => HasField "collateral" ( TxBody era) ( Set ( TxIn c)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

HasField "collateralReturn" ( TxBody era) ( StrictMaybe ( TxOut era)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Crypto era ~ c => HasField "inputs" ( TxBody era) ( Set ( TxIn c)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Crypto era ~ c => HasField "mint" ( TxBody era) ( Value c) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Crypto era ~ c => HasField "minted" ( TxBody era) ( Set ( ScriptHash c)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

HasField "outputs" ( TxBody era) ( StrictSeq ( TxOut era)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Crypto era ~ c => HasField "referenceInputs" ( TxBody era) ( Set ( TxIn c)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Crypto era ~ c => HasField "reqSignerHashes" ( TxBody era) ( Set ( KeyHash ' Witness c)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

c ~ Crypto era => HasField "scriptIntegrityHash" ( TxBody era) ( StrictMaybe ( ScriptIntegrityHash c)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

HasField "sizedCollateralReturn" ( TxBody era) ( StrictMaybe ( Sized ( TxOut era))) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

HasField "sizedOutputs" ( TxBody era) ( StrictSeq ( Sized ( TxOut era))) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

HasField "totalCollateral" ( TxBody era) ( StrictMaybe Coin ) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

HasField "txnetworkid" ( TxBody era) ( StrictMaybe Network ) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

HasField "update" ( TxBody era) ( StrictMaybe ( Update era)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Crypto era ~ crypto => HasField "wdrls" ( TxBody era) ( Wdrl crypto) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Crypto ( Crypto era) => Eq ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

( Era era, Compactible ( Value era), Show ( Script era), Show ( Value era), Show ( PParamsDelta era)) => Show ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Typeable era => ToCBOR ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

( Era era, Typeable ( Script era), Typeable ( AuxiliaryData era), Compactible ( Value era), Show ( Value era), DecodeNonNegative ( Value era), FromCBOR ( Annotator ( Script era)), SerialisableData ( PParamsDelta era)) => FromCBOR ( Annotator ( TxBody era)) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

SafeToHash ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

( Typeable era, NoThunks ( Value era), NoThunks ( PParamsDelta era)) => NoThunks ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

c ~ Crypto era => HashAnnotated ( TxBody era) EraIndependentTxBody c Source #
Instance details

Defined in Cardano.Ledger.Babbage.TxBody