mafoc-0.0.0.1
Safe HaskellSafe-Inferred
LanguageHaskell2010

Mafoc.Indexers.Mamba

Synopsis

Documentation

data Mamba #

Instances

Instances details
Show Mamba # 
Instance details

Defined in Mafoc.Indexers.Mamba

Methods

showsPrec :: Int -> Mamba -> ShowS #

show :: Mamba -> String #

showList :: [Mamba] -> ShowS #

Indexer Mamba # 
Instance details

Defined in Mafoc.Indexers.Mamba

Associated Types

data Runtime Mamba #

data Event Mamba #

data State Mamba #

Methods

description :: Text #

parseCli :: Parser Mamba #

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

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

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

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

IndexerHttpApi Mamba # 
Instance details

Defined in Mafoc.Indexers.Mamba

Associated Types

type API Mamba #

Methods

server :: Runtime Mamba -> MVar (State Mamba, BatchState Mamba) -> Server (API Mamba) #

Show (Event Mamba) # 
Instance details

Defined in Mafoc.Indexers.Mamba

type API Mamba # 
Instance details

Defined in Mafoc.Indexers.Mamba

type API Mamba = ("stub" :> Get '[JSON] ()) :<|> (("getCurrentSyncedBlock" :> Get '[JSON] (Maybe GetCurrentSyncedBlock)) :<|> (("getUtxosFromAddress" :> (Capture "ShelleyAddress" (Address ShelleyAddr) :> (QueryParam "createdAtOrAfterSlotNo" SlotNo :> (QueryParam "unspentBeforeSlotNo" SlotNo :> Get '[JSON] [GetUtxosFromAddress])))) :<|> (("getBurnTokensEvents" :> (Capture "policyId" PolicyId :> (QueryParam "assetName" AssetName :> (QueryParam "createdBeforeSlotNo" SlotNo :> (QueryParam "createdAfterTx" TxId :> Get '[JSON] [GetBurnTokensEvents]))))) :<|> (("getNonceByEpoch" :> (Capture "epochNo" EpochNo :> Get '[JSON] (Maybe GetNonceByEpoch))) :<|> ("getEpochActiveStakeDistribution" :> (Capture "epochNo" EpochNo :> Get '[JSON] (Maybe GetEpochActiveStakeDistribution)))))))
data Event Mamba # 
Instance details

Defined in Mafoc.Indexers.Mamba

data Runtime Mamba # 
Instance details

Defined in Mafoc.Indexers.Mamba

data State Mamba # 
Instance details

Defined in Mafoc.Indexers.Mamba

Mamba's REST API

deserialise :: Show err => (AsType a -> ByteString -> Either err a) -> AsType a -> Text -> Either Text a #

deserialiseBs :: Show err => (AsType a -> ByteString -> Either err a) -> AsType a -> ByteString -> Either Text a #

GetCurrentSyncedBlock

data GetCurrentSyncedBlock #

Instances

Instances details
ToJSON GetCurrentSyncedBlock # 
Instance details

Defined in Mafoc.Indexers.Mamba

Generic GetCurrentSyncedBlock # 
Instance details

Defined in Mafoc.Indexers.Mamba

Associated Types

type Rep GetCurrentSyncedBlock :: Type -> Type #

type Rep GetCurrentSyncedBlock # 
Instance details

Defined in Mafoc.Indexers.Mamba

type Rep GetCurrentSyncedBlock = D1 ('MetaData "GetCurrentSyncedBlock" "Mafoc.Indexers.Mamba" "mafoc-0.0.0.1-inplace" 'False) (C1 ('MetaCons "GetCurrentSyncedBlock" 'PrefixI 'True) ((S1 ('MetaSel ('Just "getCurrentSyncedBlock_blockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockNo) :*: (S1 ('MetaSel ('Just "getCurrentSyncedBlock_blockTimestamp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "getCurrentSyncedBlock_blockHeaderHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash BlockHeader)))) :*: (S1 ('MetaSel ('Just "getCurrentSyncedBlock_slotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo) :*: (S1 ('MetaSel ('Just "getCurrentSyncedBlock_epochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EpochNo)) :*: S1 ('MetaSel ('Just "getCurrentSyncedBlock_era") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LedgerEra)))))

GetUtxosFromAddress

data GetUtxosFromAddress #

Instances

Instances details
ToJSON GetUtxosFromAddress # 
Instance details

Defined in Mafoc.Indexers.Mamba

Generic GetUtxosFromAddress # 
Instance details

Defined in Mafoc.Indexers.Mamba

Associated Types

type Rep GetUtxosFromAddress :: Type -> Type #

type Rep GetUtxosFromAddress # 
Instance details

Defined in Mafoc.Indexers.Mamba

type Rep GetUtxosFromAddress = D1 ('MetaData "GetUtxosFromAddress" "Mafoc.Indexers.Mamba" "mafoc-0.0.0.1-inplace" 'False) (C1 ('MetaCons "GetUtxosFromAddress" 'PrefixI 'True) (((S1 ('MetaSel ('Just "getUtxosFromAddress_blockHeaderHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash BlockHeader)) :*: S1 ('MetaSel ('Just "getUtxosFromAddress_slotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo)) :*: (S1 ('MetaSel ('Just "getUtxosFromAddress_blockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockNo) :*: (S1 ('MetaSel ('Just "getUtxosFromAddress_txIndexInBlock") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxIndexInBlock) :*: S1 ('MetaSel ('Just "getUtxosFromAddress_txId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId)))) :*: ((S1 ('MetaSel ('Just "getUtxosFromAddress_txIx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxIx) :*: (S1 ('MetaSel ('Just "getUtxosFromAddress_txInputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxIn]) :*: S1 ('MetaSel ('Just "getUtxosFromAddress_value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value))) :*: (S1 ('MetaSel ('Just "getUtxosFromAddress_datum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Hash ScriptData))) :*: (S1 ('MetaSel ('Just "getUtxosFromAddress_datumHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Hash ScriptData))) :*: S1 ('MetaSel ('Just "getUtxosFromAddress_spentBy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (SlotNo, TxId))))))))

GetBurnTokensEvents

data GetBurnTokensEvents #

Instances

Instances details
ToJSON GetBurnTokensEvents # 
Instance details

Defined in Mafoc.Indexers.Mamba

Generic GetBurnTokensEvents # 
Instance details

Defined in Mafoc.Indexers.Mamba

Associated Types

type Rep GetBurnTokensEvents :: Type -> Type #

type Rep GetBurnTokensEvents # 
Instance details

Defined in Mafoc.Indexers.Mamba

type Rep GetBurnTokensEvents = D1 ('MetaData "GetBurnTokensEvents" "Mafoc.Indexers.Mamba" "mafoc-0.0.0.1-inplace" 'False) (C1 ('MetaCons "GetBurnTokensEvents" 'PrefixI 'True) ((S1 ('MetaSel ('Just "getBurnTokensEvents_blockHeaderHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash BlockHeader)) :*: (S1 ('MetaSel ('Just "getBurnTokensEvents_slotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo) :*: S1 ('MetaSel ('Just "getBurnTokensEvents_blockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockNo))) :*: ((S1 ('MetaSel ('Just "getBurnTokensEvents_txId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId) :*: S1 ('MetaSel ('Just "getBurnTokensEvents_redeemer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScriptData)) :*: (S1 ('MetaSel ('Just "getBurnTokensEvents_burntAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Quantity) :*: S1 ('MetaSel ('Just "getBurnTokensEvents_isStable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))))

GetNonceByEpoch

data GetNonceByEpoch #

Constructors

GetNonceByEpoch 

Instances

Instances details
ToJSON GetNonceByEpoch # 
Instance details

Defined in Mafoc.Indexers.Mamba

Methods

toJSON :: GetNonceByEpoch -> Value

toEncoding :: GetNonceByEpoch -> Encoding

toJSONList :: [GetNonceByEpoch] -> Value

toEncodingList :: [GetNonceByEpoch] -> Encoding

Generic GetNonceByEpoch # 
Instance details

Defined in Mafoc.Indexers.Mamba

Associated Types

type Rep GetNonceByEpoch :: Type -> Type #

type Rep GetNonceByEpoch # 
Instance details

Defined in Mafoc.Indexers.Mamba

type Rep GetNonceByEpoch = D1 ('MetaData "GetNonceByEpoch" "Mafoc.Indexers.Mamba" "mafoc-0.0.0.1-inplace" 'False) (C1 ('MetaCons "GetNonceByEpoch" 'PrefixI 'True) ((S1 ('MetaSel ('Just "getNonceByEpoch_blockHeaderHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash BlockHeader)) :*: S1 ('MetaSel ('Just "getNonceByEpoch_blockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockNo)) :*: (S1 ('MetaSel ('Just "getNonceByEpoch_epochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochNo) :*: (S1 ('MetaSel ('Just "getNonceByEpoch_slotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo) :*: S1 ('MetaSel ('Just "getNonceByEpoch_nonce") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nonce)))))

GetEpochActiveStakeDistribution

data GetEpochActiveStakeDistribution #

Instances

Instances details
ToJSON GetEpochActiveStakeDistribution # 
Instance details

Defined in Mafoc.Indexers.Mamba

Generic GetEpochActiveStakeDistribution # 
Instance details

Defined in Mafoc.Indexers.Mamba

Associated Types

type Rep GetEpochActiveStakeDistribution :: Type -> Type #

type Rep GetEpochActiveStakeDistribution # 
Instance details

Defined in Mafoc.Indexers.Mamba

type Rep GetEpochActiveStakeDistribution = D1 ('MetaData "GetEpochActiveStakeDistribution" "Mafoc.Indexers.Mamba" "mafoc-0.0.0.1-inplace" 'False) (C1 ('MetaCons "GetEpochActiveStakeDistribution" 'PrefixI 'True) ((S1 ('MetaSel ('Just "getEpochActiveStakeDistribution_epochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochNo) :*: S1 ('MetaSel ('Just "getEpochActiveStakeDistribution_slotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo)) :*: (S1 ('MetaSel ('Just "getEpochActiveStakeDistribution_blockHeaderHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash BlockHeader)) :*: (S1 ('MetaSel ('Just "getEpochActiveStakeDistribution_blockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockNo) :*: S1 ('MetaSel ('Just "getEpochActiveStakeDistribution_poolSizes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(PoolId, Lovelace)])))))

Orphan instances

FromHttpApiData TxId # 
Instance details

Methods

parseUrlPiece :: Text -> Either Text TxId

parseHeader :: ByteString -> Either Text TxId

parseQueryParam :: Text -> Either Text TxId

FromHttpApiData AssetName # 
Instance details

Methods

parseUrlPiece :: Text -> Either Text AssetName

parseHeader :: ByteString -> Either Text AssetName

parseQueryParam :: Text -> Either Text AssetName

FromHttpApiData PolicyId # 
Instance details

Methods

parseUrlPiece :: Text -> Either Text PolicyId

parseHeader :: ByteString -> Either Text PolicyId

parseQueryParam :: Text -> Either Text PolicyId

FromHttpApiData EpochNo # 
Instance details

Methods

parseUrlPiece :: Text -> Either Text EpochNo

parseHeader :: ByteString -> Either Text EpochNo

parseQueryParam :: Text -> Either Text EpochNo

FromHttpApiData SlotNo # 
Instance details

Methods

parseUrlPiece :: Text -> Either Text SlotNo

parseHeader :: ByteString -> Either Text SlotNo

parseQueryParam :: Text -> Either Text SlotNo

FromHttpApiData (Address ShelleyAddr) # 
Instance details

Methods

parseUrlPiece :: Text -> Either Text (Address ShelleyAddr)

parseHeader :: ByteString -> Either Text (Address ShelleyAddr)

parseQueryParam :: Text -> Either Text (Address ShelleyAddr)

ToField (Address ShelleyAddr) # 
Instance details

Methods

toField :: Address ShelleyAddr -> SQLData