Query Module Spec
This reference covers v1beta, generated from spec v0.19.2.
AnyChainBlock
| Field | Type | Label | Description |
|---|---|---|---|
| native_bytes | bytes | Original bytes as defined by the chain | |
| cardano | utxorpc.v1beta.cardano.Block | A parsed Cardano block. |
AnyChainDatum
An evenlope that holds a datum for any of the compatible chains
| Field | Type | Label | Description |
|---|---|---|---|
| native_bytes | bytes | Original bytes as defined by the chain | |
| key | bytes | ||
| cardano | utxorpc.v1beta.cardano.PlutusData | A cardano UTxO |
AnyChainParams
An evenlope that holds parameter data from any of the compatible chains
| Field | Type | Label | Description |
|---|---|---|---|
| cardano | utxorpc.v1beta.cardano.PParams | Cardano parameters |
AnyChainStateData
An envelope that wraps a chain-specific ledger-state query result.
| Field | Type | Label | Description |
|---|---|---|---|
| cardano | utxorpc.v1beta.cardano.StateData | A Cardano ledger-state query result. |
AnyChainStateQuery
An envelope that wraps a chain-specific ledger-state query.
| Field | Type | Label | Description |
|---|---|---|---|
| cardano | utxorpc.v1beta.cardano.StateQuery | A Cardano ledger-state query. |
AnyChainTx
Represents a transaction from any supported blockchain.
| Field | Type | Label | Description |
|---|---|---|---|
| native_bytes | bytes | Original bytes as defined by the chain | |
| cardano | utxorpc.v1beta.cardano.Tx | A Cardano transaction. | |
| block_ref | ChainPoint | The chain point that represents the block this transaction belongs to. |
AnyUtxoData
An evenlope that holds an UTxO from any of compatible chains
| Field | Type | Label | Description |
|---|---|---|---|
| native_bytes | bytes | Original bytes as defined by the chain | |
| txo_ref | TxoRef | Hash of the previous transaction. | |
| cardano | utxorpc.v1beta.cardano.TxOutput | A cardano UTxO | |
| block_ref | ChainPoint | The chain point that represents the block this UTxO was created in. |
AnyUtxoPattern
An evenlope that holds an UTxO patterns from any of compatible chains
| Field | Type | Label | Description |
|---|---|---|---|
| cardano | utxorpc.v1beta.cardano.TxOutputPattern |
ChainPoint
Represents a specific point in the blockchain.
| Field | Type | Label | Description |
|---|---|---|---|
| slot | uint64 | Slot number. | |
| hash | bytes | Block hash. | |
| height | uint64 | Block height. | |
| timestamp | uint64 | Block ms timestamp |
ReadDataRequest
Request to get data (as in plural of datum)
| Field | Type | Label | Description |
|---|---|---|---|
| keys | bytes | repeated | |
| field_mask | google.protobuf.FieldMask | Field mask to selectively return fields in the response. |
ReadDataResponse
Response containing data (as in plural of datum)
| Field | Type | Label | Description |
|---|---|---|---|
| values | AnyChainDatum | repeated | The value of each datum. |
| ledger_tip | ChainPoint | The chain point that represent the ledger current position. |
ReadEraSummaryRequest
Request to get the era summary
| Field | Type | Label | Description |
|---|---|---|---|
| field_mask | google.protobuf.FieldMask | Field mask to selectively return fields in the parsed response. |
ReadEraSummaryResponse
Response containing the era summaries
| Field | Type | Label | Description |
|---|---|---|---|
| cardano | utxorpc.v1beta.cardano.EraSummaries | Cardano era summaries |
ReadGenesisRequest
Request to get the chain config
| Field | Type | Label | Description |
|---|---|---|---|
| field_mask | google.protobuf.FieldMask | Field mask to selectively return fields in the parsed response. |
ReadGenesisResponse
Response containing the genesis configs
| Field | Type | Label | Description |
|---|---|---|---|
| genesis | bytes | genesis hash for the chain | |
| caip2 | string | the caip-2 ID for this network | |
| cardano | utxorpc.v1beta.cardano.Genesis | Cardano genesis |
ReadParamsRequest
Request to get the chain parameters
| Field | Type | Label | Description |
|---|---|---|---|
| field_mask | google.protobuf.FieldMask | Field mask to selectively return fields in the parsed response. |
ReadParamsResponse
Response containing the chain parameters
| Field | Type | Label | Description |
|---|---|---|---|
| values | AnyChainParams | The value of the parameters. | |
| ledger_tip | ChainPoint | The chain point that represent the ledger current position. |
ReadStateRequest
Request to run a chain-specific ledger-state query against the current ledger snapshot.
| Field | Type | Label | Description |
|---|---|---|---|
| query | AnyChainStateQuery | The chain-specific query to evaluate. | |
| field_mask | google.protobuf.FieldMask | Field mask to selectively return fields. |
ReadStateResponse
Response carrying the ledger-state query result.
| Field | Type | Label | Description |
|---|---|---|---|
| result | AnyChainStateData | The query result. | |
| ledger_tip | ChainPoint | Chain point representing the snapshot the query was evaluated against. |
ReadTxRequest
Request to get a transaction by hash
| Field | Type | Label | Description |
|---|---|---|---|
| hash | bytes | The hash of the transaction. | |
| field_mask | google.protobuf.FieldMask | Field mask to selectively return fields in the response. |
ReadTxResponse
Response containing the transaction associated with the requested hash.
| Field | Type | Label | Description |
|---|---|---|---|
| tx | AnyChainTx | The transaction. | |
| ledger_tip | ChainPoint | The chain point that represent the ledger current position. |
ReadUtxosRequest
Request to get specific UTxOs
| Field | Type | Label | Description |
|---|---|---|---|
| keys | TxoRef | repeated | List of keys UTxOs. |
| field_mask | google.protobuf.FieldMask | Field mask to selectively return fields. |
ReadUtxosResponse
Response containing the UTxOs associated with the requested addresses.
| Field | Type | Label | Description |
|---|---|---|---|
| items | AnyUtxoData | repeated | List of UTxOs. |
| ledger_tip | ChainPoint | The chain point that represent the ledger current position. |
SearchUtxosRequest
Request to search for UTxO based on a pattern.
| Field | Type | Label | Description |
|---|---|---|---|
| predicate | UtxoPredicate | optional | Pattern to match UTxOs by. |
| field_mask | google.protobuf.FieldMask | Field mask to selectively return fields. | |
| max_items | int32 | optional | The maximum number of items to return. |
| start_token | string | optional | The next_page_token value returned from a previous request, if any. |
SearchUtxosResponse
Response containing the UTxOs that match the requested addresses.
| Field | Type | Label | Description |
|---|---|---|---|
| items | AnyUtxoData | repeated | List of UTxOs. |
| ledger_tip | ChainPoint | The chain point that represent the ledger current position. | |
| next_token | string | optional | Token to retrieve the next page of results, absent if there are no more results. |
TxoRef
Represents a reference to a transaction output
| Field | Type | Label | Description |
|---|---|---|---|
| hash | bytes | Tx hash. | |
| index | uint32 | Output index. |
UtxoPredicate
Represents a simple utxo predicate that can composed to create more complex ones
| Field | Type | Label | Description |
|---|---|---|---|
| match | AnyUtxoPattern | optional | Predicate is true if tx exhibits pattern. |
| not | UtxoPredicate | repeated | Predicate is true if tx doesn't exhibit pattern. |
| all_of | UtxoPredicate | repeated | Predicate is true if utxo exhibits all of the patterns. |
| any_of | UtxoPredicate | repeated | Predicate is true if utxo exhibits any of the patterns. |
QueryService
Service definition for querying the state of the chain.
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ReadParams | ReadParamsRequest | ReadParamsResponse | Get overall chain state. |
| ReadUtxos | ReadUtxosRequest | ReadUtxosResponse | Read specific UTxOs by reference. |
| SearchUtxos | SearchUtxosRequest | SearchUtxosResponse | Search for UTxO based on a pattern. |
| ReadData | ReadDataRequest | ReadDataResponse | Read specific datum by hash |
| ReadTx | ReadTxRequest | ReadTxResponse | Get Txs by chain-specific criteria. |
| ReadGenesis | ReadGenesisRequest | ReadGenesisResponse | Get the genesis configuration |
| ReadEraSummary | ReadEraSummaryRequest | ReadEraSummaryResponse | Get the chain era summary |
| ReadState | ReadStateRequest | ReadStateResponse | Run a chain-specific ledger-state query (e.g. stake pool distribution). |