| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Rpc.Server.Internal.UtxoRpc.Query
Synopsis
- readParamsMethod :: MonadRpc e m => Proto ReadParamsRequest -> m (Proto ReadParamsResponse)
- readUtxosMethod :: MonadRpc e m => Proto ReadUtxosRequest -> m (Proto ReadUtxosResponse)
- searchUtxosMethod :: MonadRpc e m => Proto SearchUtxosRequest -> m (Proto SearchUtxosResponse)
- paginateByTxIn :: [(TxIn, a)] -> Maybe Text -> Int32 -> ([(TxIn, a)], Maybe Text)
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.
Returns an empty response when no keys are provided, matching other
UTxO RPC implementations (Dolos, cardano-node-api, Dingo).
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.
The predicate must contain exact address matches so the query can be
narrowed; broad predicates are rejected with INVALID_ARGUMENT.
Arguments
| :: [(TxIn, a)] | UTxO entries to paginate |
| -> Maybe Text | start token: the |
| -> Int32 | maximum number of items per page (0 defaults to |
| -> ([(TxIn, a)], Maybe Text) | page of results and the next start token ( |
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.