Skip to content

Commit

Permalink
Add an AssetMetadataByIds method to the shielded pool query RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepinho committed Apr 13, 2024
1 parent de66328 commit 50ba021
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ message OutputPlan {
// Query operations for the shielded pool component.
service QueryService {
rpc AssetMetadataById(AssetMetadataByIdRequest) returns (AssetMetadataByIdResponse);

// Requests a stream of asset metadata, given an array of asset IDs. Responses
// may be streamed in a different order from that of the asset IDs in the
// request, and asset IDs unknown to the node will not receive any response
// objects -- that is, the number of responses may be smaller than the length
// of the asset IDs array.
rpc AssetMetadataByIds(AssetMetadataByIdsRequest) returns (stream AssetMetadataByIdsResponse);
}

// Requests information on an asset by asset id
Expand All @@ -208,3 +215,15 @@ message AssetMetadataByIdResponse {
// If the requested asset was unknown, this field will not be present.
core.asset.v1.Metadata denom_metadata = 1;
}

// Requests information on an asset by multiple asset ids
message AssetMetadataByIdsRequest {
// The asset IDs to request information on. Note that node is neither required
// nor expected to stream responses in the same order as this array.
repeated core.asset.v1.AssetId asset_id = 1;
}

message AssetMetadataByIdsResponse {
// A single asset metadata streamed from the node.
core.asset.v1.Metadata denom_metadata = 1;
}

0 comments on commit 50ba021

Please sign in to comment.