Skip to content

Commit

Permalink
Add stub implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepinho authored and erwanor committed Apr 19, 2024
1 parent e738f8b commit ac21f9c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/core/component/shielded-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ decaf377 = {workspace = true, features = ["r1cs"], default-features = true}
decaf377-fmd = {workspace = true}
decaf377-ka = {workspace = true}
decaf377-rdsa = {workspace = true}
futures = {workspace = true}
hex = {workspace = true}
ibc-types = {workspace = true, default-features = false}
im = {workspace = true}
Expand Down
14 changes: 14 additions & 0 deletions crates/core/component/shielded-pool/src/component/rpc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
use std::pin::Pin;

use cnidarium::Storage;
use penumbra_asset::asset;
use penumbra_proto::core::component::shielded_pool::v1::{
query_service_server::QueryService, AssetMetadataByIdRequest, AssetMetadataByIdResponse,
AssetMetadataByIdsRequest, AssetMetadataByIdsResponse,
};

use tonic::Status;
Expand All @@ -22,6 +25,10 @@ impl Server {

#[tonic::async_trait]
impl QueryService for Server {
type AssetMetadataByIdsStream = Pin<
Box<dyn futures::Stream<Item = Result<AssetMetadataByIdsResponse, tonic::Status>> + Send>,
>;

#[instrument(skip(self, request))]
async fn asset_metadata_by_id(
&self,
Expand Down Expand Up @@ -53,4 +60,11 @@ impl QueryService for Server {

Ok(tonic::Response::new(rsp))
}

async fn asset_metadata_by_ids(
&self,
_request: tonic::Request<AssetMetadataByIdsRequest>,
) -> Result<tonic::Response<Self::AssetMetadataByIdsStream>, tonic::Status> {
unimplemented!("asset_metadata_by_ids not yet implemented")
}
}

0 comments on commit ac21f9c

Please sign in to comment.