cardano-rpc
Safe HaskellNone
LanguageHaskell2010

Cardano.Rpc.Server.Internal.UtxoRpc.Query

Synopsis

Documentation

readParamsMethod :: MonadRpc e m => Proto ReadParamsRequest -> m (Proto ReadParamsResponse) Source #

Handle the ReadParams RPC method. Queries the node for current protocol parameters and returns them along with the ledger tip.

readUtxosMethod :: MonadRpc e m => Proto ReadUtxosRequest -> m (Proto ReadUtxosResponse) Source #

Handle the ReadUtxos RPC method. Looks up specific UTxO entries by their TxIn keys and returns them along with the ledger tip.

searchUtxosMethod :: MonadRpc e m => Proto SearchUtxosRequest -> m (Proto SearchUtxosResponse) Source #

Handle the SearchUtxos RPC method. Filters the UTxO set by a predicate and returns a paginated result. When the predicate contains exact address matches, the query is narrowed to those addresses; otherwise the entire UTxO set is fetched.

paginateByTxIn Source #

Arguments

:: [(TxIn, a)]

UTxO entries to paginate

-> Maybe Text

start token: the renderTxIn of the last TxIn from the previous page, or Nothing for the first page

-> Int32

maximum number of items per page (0 defaults to defaultPageSize, capped at maxPageSize)

-> ([(TxIn, a)], Maybe Text)

page of results and the next start token (Nothing when there are no more pages)

Paginate a list of UTxO entries using cursor-based pagination. Items are sorted by TxIn's Ord instance (lexicographic on TxId, then numeric on TxIx). The start token is the renderTxIn of the last item on the previous page; all items up to and including it are skipped, so the next page begins immediately after that cursor.