plutus-ledger-0.1.0.0: Wallet API
Safe HaskellNone
LanguageHaskell2010

Ledger.Validation

Description

Transaction validation using 'cardano-ledger-specs'

Synopsis

Documentation

data EmulatedLedgerState Source #

State of the ledger with configuration, mempool, and the blockchain.

newtype Coin Source #

The amount of value held by a transaction output.

Constructors

Coin 

Fields

Instances

Instances details
Enum Coin 
Instance details

Defined in Cardano.Ledger.Coin

Eq Coin 
Instance details

Defined in Cardano.Ledger.Coin

Methods

(==) :: Coin -> Coin -> Bool Source #

(/=) :: Coin -> Coin -> Bool Source #

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 #

Methods

from :: Coin -> Rep Coin x Source #

to :: Rep Coin x -> Coin 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

Methods

rnf :: Coin -> () Source #

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

Methods

toCBOR :: Coin -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Coin -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Coin] -> Size Source #

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

Associated Types

data CompactForm Coin Source #

HeapWords Coin 
Instance details

Defined in Cardano.Ledger.Coin

Methods

heapWords :: Coin -> Int Source #

Group Coin 
Instance details

Defined in Cardano.Ledger.Coin

Methods

invert :: Coin -> Coin Source #

(~~) :: Coin -> Coin -> Coin Source #

pow :: Integral x => Coin -> x -> Coin Source #

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

Methods

getField :: TxBody era -> Coin Source #

HasField "txfee" (TxBody era) Coin 
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Methods

getField :: TxBody era -> Coin Source #

HasField "txfee" (TxBody era) Coin 
Instance details

Defined in Cardano.Ledger.ShelleyMA.TxBody

Methods

getField :: TxBody era -> Coin Source #

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

Methods

rnf :: CompactForm Coin -> () Source #

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-GkSv9hq3RwqC6zDu3YqBP" '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 

Fields

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

Associated Types

type Rep SlotNo :: Type -> Type Source #

NFData SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnf :: SlotNo -> () Source #

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

Methods

toCBOR :: SlotNo -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy SlotNo -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [SlotNo] -> Size Source #

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

Methods

getField :: TxBody era -> SlotNo Source #

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

Defined in Ouroboros.Network.AnchoredFragment

Methods

asAnchor :: block -> Anchor block Source #

getAnchorMeasure :: Proxy block -> Anchor block -> WithOrigin SlotNo Source #

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

Methods

toExp :: StakeCreds era -> Exp (Map (Credential 'Staking era) SlotNo) Source #

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.0-IF5sHJLWQ4O9goQEWN0n1m" 'True) (C1 ('MetaCons "SlotNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

initialState :: EmulatedLedgerState Source #

Initial ledger state for a distribution

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.

nextSlot :: EmulatedLedgerState -> EmulatedLedgerState Source #

Increase the slot number by one

data UTxO era Source #

The unspent transaction outputs.

Instances

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

Defined in Cardano.Ledger.Shelley.UTxO

Methods

(==) :: UTxO era -> UTxO era -> Bool Source #

(/=) :: UTxO era -> UTxO era -> Bool Source #

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

Defined in Cardano.Ledger.Shelley.UTxO

Methods

showsPrec :: Int -> UTxO era -> ShowS Source #

show :: UTxO era -> String Source #

showList :: [UTxO era] -> ShowS Source #

Generic (UTxO era) 
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

Associated Types

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

Methods

from :: UTxO era -> Rep (UTxO era) x Source #

to :: Rep (UTxO era) x -> UTxO era Source #

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

Defined in Cardano.Ledger.Shelley.UTxO

Methods

rnf :: UTxO era -> () Source #

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

Defined in Cardano.Ledger.Shelley.UTxO

Methods

fromCBOR :: Decoder s (UTxO era) Source #

label :: Proxy (UTxO era) -> Text Source #

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

Defined in Cardano.Ledger.Shelley.UTxO

Methods

toCBOR :: UTxO era -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (UTxO era) -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [UTxO era] -> Size Source #

(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 #

Methods

getShare :: UTxO era -> Share (UTxO era) Source #

fromSharedCBOR :: Share (UTxO era) -> Decoder s (UTxO era) Source #

fromSharedPlusCBOR :: StateT (Share (UTxO era)) (Decoder s) (UTxO era) Source #

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

Defined in Cardano.Ledger.Shelley.UTxO

(Crypto era ~ crypto, TxOut era ~ out) => HasExp (UTxO era) (Map (TxIn crypto) out) 
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

Methods

toExp :: UTxO era -> Exp (Map (TxIn crypto) out) Source #

(Crypto era ~ crypto, TxOut era ~ out) => Embed (UTxO era) (Map (TxIn crypto) out) 
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

Methods

toBase :: UTxO era -> Map (TxIn crypto) out Source #

fromBase :: Map (TxIn crypto) out -> UTxO era Source #

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-3uFq1pxMM5zEYYBb7c7Rnw" '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 Share (UTxO era) = Interns (Credential 'Staking (Crypto era))
type TranslationError (AlonzoEra c) UTxO 
Instance details

Defined in Cardano.Ledger.Alonzo.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

Conversion from Plutus types

Lenses

Etc.

emulatorGlobals :: Globals Source #

A sensible default Globals value for the emulator