mafoc-0.0.0.1
Safe HaskellSafe-Inferred
LanguageHaskell2010

Mafoc.Indexers.Utxo

Synopsis

Documentation

data Utxo #

Instances

Instances details
Show Utxo # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

showsPrec :: Int -> Utxo -> ShowS #

show :: Utxo -> String #

showList :: [Utxo] -> ShowS #

Indexer Utxo # 
Instance details

Defined in Mafoc.Indexers.Utxo

Associated Types

data Runtime Utxo #

data Event Utxo #

data State Utxo #

Methods

description :: Text #

parseCli :: Parser Utxo #

toEvents :: Runtime Utxo -> State Utxo -> BlockInMode CardanoMode -> (State Utxo, [Event Utxo]) #

initialize :: Utxo -> Trace IO Text -> IO (State Utxo, LocalChainsyncRuntime, Runtime Utxo) #

persistMany :: Runtime Utxo -> [Event Utxo] -> IO () #

checkpoint :: Runtime Utxo -> State Utxo -> (SlotNo, Hash BlockHeader) -> IO () #

Monoid (State Utxo) # 
Instance details

Defined in Mafoc.Indexers.Utxo

Semigroup (State Utxo) # 
Instance details

Defined in Mafoc.Indexers.Utxo

Show (Event Utxo) # 
Instance details

Defined in Mafoc.Indexers.Utxo

HasTypeProxy (State Utxo) # 
Instance details

Defined in Mafoc.Indexers.Utxo

Associated Types

data AsType (State Utxo)

Methods

proxyToAsType :: Proxy (State Utxo) -> AsType (State Utxo)

SerialiseAsCBOR (State Utxo) # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

serialiseToCBOR :: State Utxo -> ByteString

deserialiseFromCBOR :: AsType (State Utxo) -> ByteString -> Either DecoderError (State Utxo)

FromCBOR (State Utxo) # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

fromCBOR :: Decoder s (State Utxo)

label :: Proxy (State Utxo) -> Text

ToCBOR (State Utxo) # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

toCBOR :: State Utxo -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (State Utxo) -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [State Utxo] -> Size

Eq (Event Utxo) # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

(==) :: Event Utxo -> Event Utxo -> Bool #

(/=) :: Event Utxo -> Event Utxo -> Bool #

Eq (State Utxo) # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

(==) :: State Utxo -> State Utxo -> Bool #

(/=) :: State Utxo -> State Utxo -> Bool #

ToRow (Event Utxo) # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

toRow :: Event Utxo -> [SQLData]

newtype Event Utxo # 
Instance details

Defined in Mafoc.Indexers.Utxo

newtype Event Utxo = Event (Txo 'Spent)
data Runtime Utxo # 
Instance details

Defined in Mafoc.Indexers.Utxo

newtype State Utxo # 
Instance details

Defined in Mafoc.Indexers.Utxo

data AsType (State Utxo) # 
Instance details

Defined in Mafoc.Indexers.Utxo

data AsType (State Utxo) = AsUtxoState

Event

toEventsPrim :: State Utxo -> OnUtxo (Txo Unspent) (TxIn, Stxo) -> BlockInMode era -> (State Utxo, [Event Utxo]) #

data Stxo #

Constructors

Stxo 

Fields

Instances

Instances details
Show Stxo # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

showsPrec :: Int -> Stxo -> ShowS #

show :: Stxo -> String #

showList :: [Stxo] -> ShowS #

Eq Stxo # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

(==) :: Stxo -> Stxo -> Bool #

(/=) :: Stxo -> Stxo -> Bool #

data TxoPrim #

Constructors

Txo 

Fields

Instances

Instances details
Show TxoPrim # 
Instance details

Defined in Mafoc.Indexers.Utxo

FromCBOR TxoPrim # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

fromCBOR :: Decoder s TxoPrim

label :: Proxy TxoPrim -> Text

ToCBOR TxoPrim # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

toCBOR :: TxoPrim -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy TxoPrim -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [TxoPrim] -> Size

Eq TxoPrim # 
Instance details

Defined in Mafoc.Indexers.Utxo

Methods

(==) :: TxoPrim -> TxoPrim -> Bool #

(/=) :: TxoPrim -> TxoPrim -> Bool #

data Status #

Constructors

Spent 
Unspent 

type family Txo (status :: Status) where ... #

Equations

Txo Spent = Stxo 
Txo Unspent = TxoPrim 

spend :: TxId -> SlotNo -> Txo Unspent -> Txo Spent #

unspentTxo :: SlotNo -> Hash BlockHeader -> BlockNo -> TxIndexInBlock -> TxIn -> TxOut CtxTx CurrentEra -> Txo Unspent #

type EventMap status = Map TxIn (Txo status) #

State

initialState :: GenesisConfig -> State Utxo #

Sqlite

sqliteInit :: Connection -> String -> IO () #

persistManySqlite :: Connection -> String -> [Event Utxo] -> IO () #