Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for ReadTxs query #143

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion proto/utxorpc/v1alpha/query/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,34 @@ message ReadDataResponse {
ChainPoint ledger_tip = 2; // The chain point that represent the ledger current position.
}

// Request to get a transaction by hash
message GetTxRequest {
bytes hash = 1; // The hash of the transaction.
google.protobuf.FieldMask field_mask = 2; // Field mask to selectively return fields in the response.
}

// Represents a transaction from any supported blockchain.
message AnyChainTx {
oneof chain {
utxorpc.v1alpha.cardano.Tx cardano = 1; // A Cardano transaction.
}
}

// Response containing the transaction associated with the requested hash.
message GetTxResponse {
AnyChainTx tx = 1; // The transaction.
ChainPoint ledger_tip = 2; // The chain point that represent the ledger current position.
}

// Service definition for querying the state of the chain.
service QueryService {
rpc ReadParams(ReadParamsRequest) returns (ReadParamsResponse); // Get overall chain state.
rpc ReadUtxos(ReadUtxosRequest) returns (ReadUtxosResponse); // Read specific UTxOs by reference.
rpc SearchUtxos(SearchUtxosRequest) returns (SearchUtxosResponse); // Search for UTxO based on a pattern.
rpc ReadData(ReadDataRequest) returns (ReadDataResponse); // Read specific datum by hash
rpc ReadTxs(GetTxRequest) returns (GetTxResponse); // Get Txs by by chain-specific criteria.

// TODO: decide if we want to expand the scope
// rpc DumpUtxos(ReadUtxosRequest) returns (stream ReadUtxosResponse); // Dump all available utxos
// rpc ReadAccount(ReadAccountRequest) returns (ReadAccountReponse); // Get state of a particular account
// rpc ReadTxs(GetTxRequest) returns (GetTxResponse); // Get Txs by by chain-specific criteria.
}