cardano-node-emulator-1.2.0.0
Safe Haskell None
Language Haskell2010

Cardano.Node.Emulator.Validation

Description

Transaction validation using 'cardano-ledger-specs'

Synopsis

Documentation

newtype Coin Source #

The amount of value held by a transaction output.

Constructors

Coin

Instances

Instances details
Enum Coin
Instance details

Defined in Cardano.Ledger.Coin

Eq Coin
Instance details

Defined in Cardano.Ledger.Coin

Ord Coin
Instance details

Defined in Cardano.Ledger.Coin

Show Coin
Instance details

Defined in Cardano.Ledger.Coin

Generic Coin
Instance details

Defined in Cardano.Ledger.Coin

Associated Types

type Rep Coin :: Type -> Type Source #

Semigroup Coin
Instance details

Defined in Cardano.Ledger.Coin

Monoid Coin
Instance details

Defined in Cardano.Ledger.Coin

NFData Coin
Instance details

Defined in Cardano.Ledger.Coin

ToJSON Coin
Instance details

Defined in Cardano.Ledger.Coin

FromJSON Coin
Instance details

Defined in Cardano.Ledger.Coin

FromCBOR Coin
Instance details

Defined in Cardano.Ledger.Coin

ToCBOR Coin
Instance details

Defined in Cardano.Ledger.Coin

Val Coin
Instance details

Defined in Cardano.Ledger.Val

DecodeNonNegative Coin
Instance details

Defined in Cardano.Ledger.Val

DecodeMint Coin
Instance details

Defined in Cardano.Ledger.Val

EncodeMint Coin
Instance details

Defined in Cardano.Ledger.Val

Compactible Coin
Instance details

Defined in Cardano.Ledger.Coin

HeapWords Coin
Instance details

Defined in Cardano.Ledger.Coin

Group Coin
Instance details

Defined in Cardano.Ledger.Coin

Abelian Coin
Instance details

Defined in Cardano.Ledger.Coin

NoThunks Coin
Instance details

Defined in Cardano.Ledger.Coin

PartialOrd Coin
Instance details

Defined in Cardano.Ledger.Coin

HasField "txfee" ( TxBody era) Coin
Instance details

Defined in Cardano.Ledger.Alonzo.TxBody

HasField "txfee" ( TxBody era) Coin
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

HasField "txfee" ( TxBody era) Coin
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

HasField "txfee" ( TxBody era) Coin
Instance details

Defined in Cardano.Ledger.ShelleyMA.TxBody

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

Defined in Cardano.Ledger.Babbage.TxBody

Eq ( CompactForm Coin )
Instance details

Defined in Cardano.Ledger.Coin

Show ( CompactForm Coin )
Instance details

Defined in Cardano.Ledger.Coin

NFData ( CompactForm Coin )
Instance details

Defined in Cardano.Ledger.Coin

FromCBOR ( CompactForm Coin )
Instance details

Defined in Cardano.Ledger.Coin

ToCBOR ( CompactForm Coin )
Instance details

Defined in Cardano.Ledger.Coin

HeapWords ( CompactForm Coin )
Instance details

Defined in Cardano.Ledger.Coin

Prim ( CompactForm Coin )
Instance details

Defined in Cardano.Ledger.Coin

NoThunks ( CompactForm Coin )
Instance details

Defined in Cardano.Ledger.Coin

type Rep Coin
Instance details

Defined in Cardano.Ledger.Coin

type Rep Coin = D1 (' MetaData "Coin" "Cardano.Ledger.Coin" "cardano-ledger-core-0.1.0.0-3EJt5rxsPizAWHDEqGPh9V" ' True ) ( C1 (' MetaCons "Coin" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unCoin") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Integer )))
newtype CompactForm Coin
Instance details

Defined in Cardano.Ledger.Coin

newtype SlotNo Source #

The 0-based index for the Ourboros time slot.

Constructors

SlotNo

Instances

Instances details
Bounded SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Enum SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Eq SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Num SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Ord SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Show SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Generic SlotNo
Instance details

Defined in Cardano.Slotting.Slot

NFData SlotNo
Instance details

Defined in Cardano.Slotting.Slot

ToJSON SlotNo
Instance details

Defined in Cardano.Slotting.Slot

FromJSON SlotNo
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR SlotNo
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR SlotNo
Instance details

Defined in Cardano.Slotting.Slot

NoThunks SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Serialise SlotNo
Instance details

Defined in Cardano.Slotting.Slot

HasField "ttl" ( TxBody era) SlotNo
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

HasHeader block => Anchorable ( WithOrigin SlotNo ) ( Anchor block) block
Instance details

Defined in Ouroboros.Network.AnchoredFragment

Anchorable ( WithOrigin SlotNo ) ( HeaderState blk) ( HeaderState blk)

Used by HeaderStateHistory but defined here, where it is not an orphan.

Instance details

Defined in Ouroboros.Consensus.HeaderValidation

GetTip l => Anchorable ( WithOrigin SlotNo ) (Checkpoint l) (Checkpoint l)
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

Methods

asAnchor :: Checkpoint l -> Checkpoint l Source #

getAnchorMeasure :: Proxy (Checkpoint l) -> Checkpoint l -> WithOrigin SlotNo Source #

HasExp ( StakeCreds era) ( Map ( Credential ' Staking era) SlotNo )
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Embed ( StakeCreds era) ( Map ( Credential ' Staking era) SlotNo )
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

type Rep SlotNo
Instance details

Defined in Cardano.Slotting.Slot

type Rep SlotNo = D1 (' MetaData "SlotNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.2-j5NuF73p5IFfcfvmth6tS" ' True ) ( C1 (' MetaCons "SlotNo" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unSlotNo") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Word64 )))

type EmulatorEra = BabbageEra StandardCrypto Source #

The default era for the emulator

type CardanoLedgerError = Either ValidationErrorInPhase ToCardanoError Source #

initialState :: Params -> EmulatedLedgerState Source #

Initial ledger state for a distribution

validateCardanoTx :: Params -> Slot -> UTxO EmulatorEra -> CardanoTx -> Either ValidationErrorInPhase ValidationSuccess Source #

Modifying the state

makeBlock :: EmulatedLedgerState -> EmulatedLedgerState Source #

Make a block with all transactions that have been validated in the current block, add the block to the blockchain, and empty the current block.

newtype UTxO era Source #

The unspent transaction outputs.

Constructors

UTxO

Fields

Instances

Instances details
( Eq ( TxOut era), Crypto ( Crypto era)) => Eq ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

( Show ( TxOut era), Crypto ( Crypto era)) => Show ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

Generic ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

Associated Types

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

Semigroup ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

Crypto ( Crypto era) => Monoid ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

( Era era, NFData ( TxOut era)) => NFData ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

Methods

rnf :: UTxO era -> () Source #

( FromCBOR ( TxOut era), Era era) => FromCBOR ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

( Era era, ToCBOR ( TxOut era)) => ToCBOR ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

( Crypto ( Crypto era), FromSharedCBOR ( TxOut era), Share ( TxOut era) ~ Interns ( Credential ' Staking ( Crypto era))) => FromSharedCBOR ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

Associated Types

type Share ( UTxO era) Source #

Default ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

TransUTxO NoThunks era => NoThunks ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

type Rep ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

type Rep ( UTxO era) = D1 (' MetaData "UTxO" "Cardano.Ledger.Shelley.UTxO" "cardano-ledger-shelley-0.1.0.0-4LNBTpyKcsy6EW18a3tTt2" ' True ) ( C1 (' MetaCons "UTxO" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unUTxO") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Map ( TxIn ( Crypto era)) ( TxOut era)))))
type Share ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

type TranslationError ( AlonzoEra c) UTxO
Instance details

Defined in Cardano.Ledger.Alonzo.Translation

type TranslationError ( BabbageEra c) UTxO
Instance details

Defined in Cardano.Ledger.Babbage.Translation

type TranslationError ( AllegraEra c) UTxO
Instance details

Defined in Cardano.Ledger.Allegra.Translation

type TranslationError ( MaryEra c) UTxO
Instance details

Defined in Cardano.Ledger.Mary.Translation

Lenses

Etc.

emulatorGlobals :: Params -> Globals Source #

A sensible default Globals value for the emulator