marconi-cardano-indexers-1.2.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Marconi.Cardano.Indexers.UtxoQuery

Description

An aggregate indexer that gathers information of Utxo, Spent, Datum and BlockInfo to provide the UTxO information with resolved datum and information about the TxIn used to produce an UTxO.

Synopsis

Indexer

type UtxoQueryIndexer m = WithTrace IO (SQLiteAggregateQuery m ChainPoint) UtxoQueryEvent #

An alias for the SQLiteAggregateQuery that handle the UtxoQueryEvent

data UtxoQueryAggregate m #

Explicit list of resources needed for the UtxoQueryAggregate

Constructors

forall utxoIndexer utxo spentIndexer spent datumIndexer datum blockInfoIndexer blockInfo.(IsSourceProvider m (NonEmpty Utxo) utxoIndexer, IsSourceProvider m utxo utxoIndexer, Point utxo ~ Point (NonEmpty Utxo), IsSourceProvider m (NonEmpty SpentInfo) spentIndexer, IsSourceProvider m spent spentIndexer, Point spent ~ Point (NonEmpty SpentInfo), IsSourceProvider m (NonEmpty DatumInfo) datumIndexer, IsSourceProvider m datum datumIndexer, Point datum ~ Point (NonEmpty DatumInfo), IsSourceProvider m BlockInfo blockInfoIndexer, IsSourceProvider m blockInfo blockInfoIndexer, Point blockInfo ~ Point BlockInfo) => UtxoQueryAggregate 

Fields

  • utxoIndexer :: MVar (utxoIndexer utxo)

    the source provider for the Utxo table, usually a UtxoIndexer

  • spentIndexer :: MVar (spentIndexer spent)

    the source provider for the Spent table, usually a SpentIndexer

  • datumIndexer :: MVar (datumIndexer datum)

    the source provider for the Datum table, usually a DatumIndexer

  • blockInfoIndexer :: MVar (blockInfoIndexer blockInfo)

    the source provider for the BlockInfo table, usually a BlockInfoIndexer

data UtxoQueryEvent #

Uninhabited type for the UtxoQueryAggregate (as it's an aggregate, it doesn't index anything)

mkUtxoSQLiteQuery :: UtxoQueryAggregate m -> IO (SQLiteAggregateQuery m ChainPoint event) #

Generate a UtxoQueryIndexer from the given source

Query

data UtxoQueryInput #

Constructors

UtxoQueryInput 

Fields

Instances

Instances details
FromJSON UtxoQueryInput # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

Methods

parseJSON :: Value -> Parser UtxoQueryInput

parseJSONList :: Value -> Parser [UtxoQueryInput]

ToJSON UtxoQueryInput # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

Methods

toJSON :: UtxoQueryInput -> Value

toEncoding :: UtxoQueryInput -> Encoding

toJSONList :: [UtxoQueryInput] -> Value

toEncodingList :: [UtxoQueryInput] -> Encoding

Generic UtxoQueryInput # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

Associated Types

type Rep UtxoQueryInput :: Type -> Type Source #

MonadIO m => Queryable m UtxoQueryEvent UtxoQueryInput (SQLiteAggregateQuery n ChainPoint) # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

type Rep UtxoQueryInput # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

type Rep UtxoQueryInput = D1 ('MetaData "UtxoQueryInput" "Marconi.Cardano.Indexers.UtxoQuery" "marconi-cardano-indexers-1.2.0.0-inplace" 'False) (C1 ('MetaCons "UtxoQueryInput" 'PrefixI 'True) (S1 ('MetaSel ('Just "_address") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AddressAny) :*: (S1 ('MetaSel ('Just "_lowerBound") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SlotNo)) :*: S1 ('MetaSel ('Just "_upperBound") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SlotNo)))))
type Result UtxoQueryInput # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

Result

data UtxoResult #

Instances

Instances details
FromJSON UtxoResult # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

Methods

parseJSON :: Value -> Parser UtxoResult

parseJSONList :: Value -> Parser [UtxoResult]

ToJSON UtxoResult # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

Methods

toJSON :: UtxoResult -> Value

toEncoding :: UtxoResult -> Encoding

toJSONList :: [UtxoResult] -> Value

toEncodingList :: [UtxoResult] -> Encoding

Generic UtxoResult # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

Associated Types

type Rep UtxoResult :: Type -> Type Source #

Show UtxoResult # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

Eq UtxoResult # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

FromRow UtxoResult # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

Methods

fromRow :: RowParser UtxoResult

type Rep UtxoResult # 
Instance details

Defined in Marconi.Cardano.Indexers.UtxoQuery

type Rep UtxoResult = D1 ('MetaData "UtxoResult" "Marconi.Cardano.Indexers.UtxoQuery" "marconi-cardano-indexers-1.2.0.0-inplace" 'False) (C1 ('MetaCons "UtxoResult" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_utxo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Utxo) :*: S1 ('MetaSel ('Just "_datum") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ScriptData))) :*: (S1 ('MetaSel ('Just "_blockInfo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Timed ChainPoint BlockInfo)) :*: (S1 ('MetaSel ('Just "_spentInfo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe (Timed ChainPoint (BlockInfo, TxId)))) :*: S1 ('MetaSel ('Just "_inputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxIn])))))

inputs :: Lens' UtxoResult [TxIn] #