Querier API
The querier service exposes read-only gRPC endpoints on the same endpoint as the delivery service.
RPC Methods
Section titled “RPC Methods”| RPC | Description |
|---|---|
ListEvmDeployments | List all Trident contract deployments (domain, contract address, liquidity provider config) |
GetEvmDeployment | Get a single deployment by domain |
GetBalances | Get token balances for an address, optionally filtered by domain |
GetFinalizedBlock | Get the latest finalized block number for a domain |
GetTokenRepresentations | Get cross-chain token mappings |
GetSpendIntentsBySpender | Paginated history of spend intents for an address |
GetSpendIntents | Paginated list of all spend intents |
GetGatewaySnapshot | Current Circle Gateway state |
GetLendingPositions | Aave V3 lending positions for the Trident contract |
Example: Query Balances
Section titled “Example: Query Balances”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 );}