Skip to content

Querier API

The querier service exposes read-only gRPC endpoints on the same endpoint as the delivery service.

RPCDescription
ListEvmDeploymentsList all Trident contract deployments (domain, contract address, liquidity provider config)
GetEvmDeploymentGet a single deployment by domain
GetBalancesGet token balances for an address, optionally filtered by domain
GetFinalizedBlockGet the latest finalized block number for a domain
GetTokenRepresentationsGet cross-chain token mappings
GetSpendIntentsBySpenderPaginated history of spend intents for an address
GetSpendIntentsPaginated list of all spend intents
GetGatewaySnapshotCurrent Circle Gateway state
GetLendingPositionsAave V3 lending positions for the Trident contract
use tonic::transport::Endpoint;
use trident_proto_types::querier_v1;
use trident_proto_types::querier_v1::querier_service_client::QuerierServiceClient;
let channel = Endpoint::from_static("http://your-attester-endpoint:9000")
.connect()
.await?;
let mut querier = QuerierServiceClient::new(channel);
let response = querier
.get_balances(querier_v1::GetBalancesRequest {
address: Some(your_address.into()),
domain: Some(1), // optional: filter by domain
})
.await?
.into_inner();
for balance in response.balances {
println!(
"Domain {}: {} of token {:?}",
balance.domain, balance.amount, balance.token
);
}