Query Module
Spec

Query Module Spec

This reference covers v1beta, generated from spec v0.19.2.

AnyChainBlock

FieldTypeLabelDescription
native_bytesbytesOriginal bytes as defined by the chain
cardanoutxorpc.v1beta.cardano.BlockA parsed Cardano block.

AnyChainDatum

An evenlope that holds a datum for any of the compatible chains

FieldTypeLabelDescription
native_bytesbytesOriginal bytes as defined by the chain
keybytes
cardanoutxorpc.v1beta.cardano.PlutusDataA cardano UTxO

AnyChainParams

An evenlope that holds parameter data from any of the compatible chains

FieldTypeLabelDescription
cardanoutxorpc.v1beta.cardano.PParamsCardano parameters

AnyChainStateData

An envelope that wraps a chain-specific ledger-state query result.

FieldTypeLabelDescription
cardanoutxorpc.v1beta.cardano.StateDataA Cardano ledger-state query result.

AnyChainStateQuery

An envelope that wraps a chain-specific ledger-state query.

FieldTypeLabelDescription
cardanoutxorpc.v1beta.cardano.StateQueryA Cardano ledger-state query.

AnyChainTx

Represents a transaction from any supported blockchain.

FieldTypeLabelDescription
native_bytesbytesOriginal bytes as defined by the chain
cardanoutxorpc.v1beta.cardano.TxA Cardano transaction.
block_refChainPointThe chain point that represents the block this transaction belongs to.

AnyUtxoData

An evenlope that holds an UTxO from any of compatible chains

FieldTypeLabelDescription
native_bytesbytesOriginal bytes as defined by the chain
txo_refTxoRefHash of the previous transaction.
cardanoutxorpc.v1beta.cardano.TxOutputA cardano UTxO
block_refChainPointThe chain point that represents the block this UTxO was created in.

AnyUtxoPattern

An evenlope that holds an UTxO patterns from any of compatible chains

FieldTypeLabelDescription
cardanoutxorpc.v1beta.cardano.TxOutputPattern

ChainPoint

Represents a specific point in the blockchain.

FieldTypeLabelDescription
slotuint64Slot number.
hashbytesBlock hash.
heightuint64Block height.
timestampuint64Block ms timestamp

ReadDataRequest

Request to get data (as in plural of datum)

FieldTypeLabelDescription
keysbytesrepeated
field_maskgoogle.protobuf.FieldMaskField mask to selectively return fields in the response.

ReadDataResponse

Response containing data (as in plural of datum)

FieldTypeLabelDescription
valuesAnyChainDatumrepeatedThe value of each datum.
ledger_tipChainPointThe chain point that represent the ledger current position.

ReadEraSummaryRequest

Request to get the era summary

FieldTypeLabelDescription
field_maskgoogle.protobuf.FieldMaskField mask to selectively return fields in the parsed response.

ReadEraSummaryResponse

Response containing the era summaries

FieldTypeLabelDescription
cardanoutxorpc.v1beta.cardano.EraSummariesCardano era summaries

ReadGenesisRequest

Request to get the chain config

FieldTypeLabelDescription
field_maskgoogle.protobuf.FieldMaskField mask to selectively return fields in the parsed response.

ReadGenesisResponse

Response containing the genesis configs

FieldTypeLabelDescription
genesisbytesgenesis hash for the chain
caip2stringthe caip-2 ID for this network
cardanoutxorpc.v1beta.cardano.GenesisCardano genesis

ReadParamsRequest

Request to get the chain parameters

FieldTypeLabelDescription
field_maskgoogle.protobuf.FieldMaskField mask to selectively return fields in the parsed response.

ReadParamsResponse

Response containing the chain parameters

FieldTypeLabelDescription
valuesAnyChainParamsThe value of the parameters.
ledger_tipChainPointThe chain point that represent the ledger current position.

ReadStateRequest

Request to run a chain-specific ledger-state query against the current ledger snapshot.

FieldTypeLabelDescription
queryAnyChainStateQueryThe chain-specific query to evaluate.
field_maskgoogle.protobuf.FieldMaskField mask to selectively return fields.

ReadStateResponse

Response carrying the ledger-state query result.

FieldTypeLabelDescription
resultAnyChainStateDataThe query result.
ledger_tipChainPointChain point representing the snapshot the query was evaluated against.

ReadTxRequest

Request to get a transaction by hash

FieldTypeLabelDescription
hashbytesThe hash of the transaction.
field_maskgoogle.protobuf.FieldMaskField mask to selectively return fields in the response.

ReadTxResponse

Response containing the transaction associated with the requested hash.

FieldTypeLabelDescription
txAnyChainTxThe transaction.
ledger_tipChainPointThe chain point that represent the ledger current position.

ReadUtxosRequest

Request to get specific UTxOs

FieldTypeLabelDescription
keysTxoRefrepeatedList of keys UTxOs.
field_maskgoogle.protobuf.FieldMaskField mask to selectively return fields.

ReadUtxosResponse

Response containing the UTxOs associated with the requested addresses.

FieldTypeLabelDescription
itemsAnyUtxoDatarepeatedList of UTxOs.
ledger_tipChainPointThe chain point that represent the ledger current position.

SearchUtxosRequest

Request to search for UTxO based on a pattern.

FieldTypeLabelDescription
predicateUtxoPredicateoptionalPattern to match UTxOs by.
field_maskgoogle.protobuf.FieldMaskField mask to selectively return fields.
max_itemsint32optionalThe maximum number of items to return.
start_tokenstringoptionalThe next_page_token value returned from a previous request, if any.

SearchUtxosResponse

Response containing the UTxOs that match the requested addresses.

FieldTypeLabelDescription
itemsAnyUtxoDatarepeatedList of UTxOs.
ledger_tipChainPointThe chain point that represent the ledger current position.
next_tokenstringoptionalToken to retrieve the next page of results, absent if there are no more results.

TxoRef

Represents a reference to a transaction output

FieldTypeLabelDescription
hashbytesTx hash.
indexuint32Output index.

UtxoPredicate

Represents a simple utxo predicate that can composed to create more complex ones

FieldTypeLabelDescription
matchAnyUtxoPatternoptionalPredicate is true if tx exhibits pattern.
notUtxoPredicaterepeatedPredicate is true if tx doesn't exhibit pattern.
all_ofUtxoPredicaterepeatedPredicate is true if utxo exhibits all of the patterns.
any_ofUtxoPredicaterepeatedPredicate is true if utxo exhibits any of the patterns.

QueryService

Service definition for querying the state of the chain.

Method NameRequest TypeResponse TypeDescription
ReadParamsReadParamsRequestReadParamsResponseGet overall chain state.
ReadUtxosReadUtxosRequestReadUtxosResponseRead specific UTxOs by reference.
SearchUtxosSearchUtxosRequestSearchUtxosResponseSearch for UTxO based on a pattern.
ReadDataReadDataRequestReadDataResponseRead specific datum by hash
ReadTxReadTxRequestReadTxResponseGet Txs by chain-specific criteria.
ReadGenesisReadGenesisRequestReadGenesisResponseGet the genesis configuration
ReadEraSummaryReadEraSummaryRequestReadEraSummaryResponseGet the chain era summary
ReadStateReadStateRequestReadStateResponseRun a chain-specific ledger-state query (e.g. stake pool distribution).