mafoc-0.0.0.1
Safe HaskellSafe-Inferred
LanguageHaskell2010

Mafoc.Utxo

Synopsis

Documentation

type UtxoMapEra era = Map TxIn (TxOut CtxTx era) #

type UtxoListEra era = [(TxIn, TxOut CtxTx era)] #

data OnUtxo elem result #

Utxo resolving strategy

Constructors

forall a. OnUtxo 

Fields

spendTxos :: forall spend k v. Ord k => ([spend], Map k v) -> [k] -> (k -> Maybe v -> spend) -> ([spend], Map k v) #

Spend a list of txIns from the utxo map in init.

addTxId :: TxId -> [(TxIx, a)] -> [(TxIn, a)] #

unsafeCastEra :: IsCardanoEra era => [(a, TxOut CtxTx era)] -> [(a, TxOut CtxTx CurrentEra)] #

castToCurrentEra :: (IsCardanoEra fromEra, EraCast f) => f fromEra -> Either EraCastError (f CurrentEra) #

unsafeCastToCurrentEra :: (IsCardanoEra fromEra, EraCast f) => f fromEra -> f CurrentEra #

addressListFilter :: NonEmpty (Address ShelleyAddr) -> AddressAny -> Maybe AddressAny #

TxoEvent

type TxoEvent era = ([TxIn], [(TxIx, TxOut CtxTx era)]) #

txoEvent :: forall era. Tx era -> TxoEvent era #

Pick spent and created txo from a transaction

Genesis

byronGenesisUtxoFromConfig :: GenesisConfig -> (Hash BlockHeader, [(TxIn, TxOut ctx CurrentEra)]) #

genesisUtxoFromLedgerState :: forall ctx. ExtLedgerState_ -> Map TxIn (TxIn, TxOut ctx CurrentEra) #

fromByronTxOut :: TxOut -> TxOut ctx ByronEra #