#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccessGrant {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(enumeration = "Access", repeated, packed = "false", tag = "2")]
pub permissions: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Access {
Unspecified = 0,
Mint = 1,
Burn = 2,
Deposit = 3,
Withdraw = 4,
Delete = 5,
Admin = 6,
Transfer = 7,
}
impl Access {
pub fn as_str_name(&self) -> &'static str {
match self {
Access::Unspecified => "ACCESS_UNSPECIFIED",
Access::Mint => "ACCESS_MINT",
Access::Burn => "ACCESS_BURN",
Access::Deposit => "ACCESS_DEPOSIT",
Access::Withdraw => "ACCESS_WITHDRAW",
Access::Delete => "ACCESS_DELETE",
Access::Admin => "ACCESS_ADMIN",
Access::Transfer => "ACCESS_TRANSFER",
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(uint64, tag = "1")]
pub max_total_supply: u64,
#[prost(bool, tag = "2")]
pub enable_governance: bool,
#[prost(string, tag = "3")]
pub unrestricted_denom_regex: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarkerAccount {
#[prost(message, optional, tag = "1")]
pub base_account: ::core::option::Option<cosmos_sdk_proto::cosmos::auth::v1beta1::BaseAccount>,
#[prost(string, tag = "2")]
pub manager: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub access_control: ::prost::alloc::vec::Vec<AccessGrant>,
#[prost(enumeration = "MarkerStatus", tag = "4")]
pub status: i32,
#[prost(string, tag = "5")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub supply: ::prost::alloc::string::String,
#[prost(enumeration = "MarkerType", tag = "7")]
pub marker_type: i32,
#[prost(bool, tag = "8")]
pub supply_fixed: bool,
#[prost(bool, tag = "9")]
pub allow_governance_control: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerAdd {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub amount: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub status: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub manager: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub marker_type: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerAddAccess {
#[prost(message, optional, tag = "1")]
pub access: ::core::option::Option<EventMarkerAccess>,
#[prost(string, tag = "2")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerAccess {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerDeleteAccess {
#[prost(string, tag = "1")]
pub remove_address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerFinalize {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerActivate {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerCancel {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerDelete {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerMint {
#[prost(string, tag = "1")]
pub amount: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerBurn {
#[prost(string, tag = "1")]
pub amount: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerWithdraw {
#[prost(string, tag = "1")]
pub coins: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub administrator: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub to_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerTransfer {
#[prost(string, tag = "1")]
pub amount: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub administrator: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub to_address: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub from_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMarkerSetDenomMetadata {
#[prost(string, tag = "1")]
pub metadata_base: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub metadata_description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub metadata_display: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub metadata_denom_units: ::prost::alloc::vec::Vec<EventDenomUnit>,
#[prost(string, tag = "5")]
pub administrator: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub metadata_name: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub metadata_symbol: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventDenomUnit {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub exponent: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MarkerType {
Unspecified = 0,
Coin = 1,
Restricted = 2,
}
impl MarkerType {
pub fn as_str_name(&self) -> &'static str {
match self {
MarkerType::Unspecified => "MARKER_TYPE_UNSPECIFIED",
MarkerType::Coin => "MARKER_TYPE_COIN",
MarkerType::Restricted => "MARKER_TYPE_RESTRICTED",
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MarkerStatus {
Unspecified = 0,
Proposed = 1,
Finalized = 2,
Active = 3,
Cancelled = 4,
Destroyed = 5,
}
impl MarkerStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
MarkerStatus::Unspecified => "MARKER_STATUS_UNSPECIFIED",
MarkerStatus::Proposed => "MARKER_STATUS_PROPOSED",
MarkerStatus::Finalized => "MARKER_STATUS_FINALIZED",
MarkerStatus::Active => "MARKER_STATUS_ACTIVE",
MarkerStatus::Cancelled => "MARKER_STATUS_CANCELLED",
MarkerStatus::Destroyed => "MARKER_STATUS_DESTROYED",
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgGrantAllowanceRequest {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub grantee: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub allowance: ::core::option::Option<::prost_types::Any>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgGrantAllowanceResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgAddMarkerRequest {
#[prost(message, optional, tag = "1")]
pub amount: ::core::option::Option<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "3")]
pub manager: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub from_address: ::prost::alloc::string::String,
#[prost(enumeration = "MarkerStatus", tag = "5")]
pub status: i32,
#[prost(enumeration = "MarkerType", tag = "6")]
pub marker_type: i32,
#[prost(message, repeated, tag = "7")]
pub access_list: ::prost::alloc::vec::Vec<AccessGrant>,
#[prost(bool, tag = "8")]
pub supply_fixed: bool,
#[prost(bool, tag = "9")]
pub allow_governance_control: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgAddMarkerResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgAddAccessRequest {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub access: ::prost::alloc::vec::Vec<AccessGrant>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgAddAccessResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgDeleteAccessRequest {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub removed_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgDeleteAccessResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgFinalizeRequest {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgFinalizeResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgActivateRequest {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgActivateResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCancelRequest {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCancelResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgDeleteRequest {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgDeleteResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgMintRequest {
#[prost(message, optional, tag = "1")]
pub amount: ::core::option::Option<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgMintResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgBurnRequest {
#[prost(message, optional, tag = "1")]
pub amount: ::core::option::Option<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgBurnResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgWithdrawRequest {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub to_address: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub amount: ::prost::alloc::vec::Vec<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgWithdrawResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgTransferRequest {
#[prost(message, optional, tag = "1")]
pub amount: ::core::option::Option<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "3")]
pub administrator: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub from_address: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub to_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgTransferResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgIbcTransferRequest {
#[prost(message, optional, tag = "1")]
pub transfer:
::core::option::Option<cosmos_sdk_proto::ibc::applications::transfer::v1::MsgTransfer>,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgIbcTransferResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSetDenomMetadataRequest {
#[prost(message, optional, tag = "1")]
pub metadata: ::core::option::Option<cosmos_sdk_proto::cosmos::bank::v1beta1::Metadata>,
#[prost(string, tag = "2")]
pub administrator: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSetDenomMetadataResponse {}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod msg_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct MsgClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "grpc-transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
impl MsgClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> MsgClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(inner: T, interceptor: F) -> MsgClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
MsgClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
pub async fn finalize(
&mut self,
request: impl tonic::IntoRequest<super::MsgFinalizeRequest>,
) -> Result<tonic::Response<super::MsgFinalizeResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/Finalize");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn activate(
&mut self,
request: impl tonic::IntoRequest<super::MsgActivateRequest>,
) -> Result<tonic::Response<super::MsgActivateResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/Activate");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn cancel(
&mut self,
request: impl tonic::IntoRequest<super::MsgCancelRequest>,
) -> Result<tonic::Response<super::MsgCancelResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/Cancel");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::MsgDeleteRequest>,
) -> Result<tonic::Response<super::MsgDeleteResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/Delete");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn mint(
&mut self,
request: impl tonic::IntoRequest<super::MsgMintRequest>,
) -> Result<tonic::Response<super::MsgMintResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/Mint");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn burn(
&mut self,
request: impl tonic::IntoRequest<super::MsgBurnRequest>,
) -> Result<tonic::Response<super::MsgBurnResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/Burn");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn add_access(
&mut self,
request: impl tonic::IntoRequest<super::MsgAddAccessRequest>,
) -> Result<tonic::Response<super::MsgAddAccessResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/AddAccess");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_access(
&mut self,
request: impl tonic::IntoRequest<super::MsgDeleteAccessRequest>,
) -> Result<tonic::Response<super::MsgDeleteAccessResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/DeleteAccess");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn withdraw(
&mut self,
request: impl tonic::IntoRequest<super::MsgWithdrawRequest>,
) -> Result<tonic::Response<super::MsgWithdrawResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/Withdraw");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn add_marker(
&mut self,
request: impl tonic::IntoRequest<super::MsgAddMarkerRequest>,
) -> Result<tonic::Response<super::MsgAddMarkerResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/AddMarker");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn transfer(
&mut self,
request: impl tonic::IntoRequest<super::MsgTransferRequest>,
) -> Result<tonic::Response<super::MsgTransferResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/Transfer");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn ibc_transfer(
&mut self,
request: impl tonic::IntoRequest<super::MsgIbcTransferRequest>,
) -> Result<tonic::Response<super::MsgIbcTransferResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/IbcTransfer");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn set_denom_metadata(
&mut self,
request: impl tonic::IntoRequest<super::MsgSetDenomMetadataRequest>,
) -> Result<tonic::Response<super::MsgSetDenomMetadataResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/SetDenomMetadata");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn grant_allowance(
&mut self,
request: impl tonic::IntoRequest<super::MsgGrantAllowanceRequest>,
) -> Result<tonic::Response<super::MsgGrantAllowanceResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/provenance.marker.v1.Msg/GrantAllowance");
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod msg_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Msg: Send + Sync + 'static {
async fn finalize(
&self,
request: tonic::Request<super::MsgFinalizeRequest>,
) -> Result<tonic::Response<super::MsgFinalizeResponse>, tonic::Status>;
async fn activate(
&self,
request: tonic::Request<super::MsgActivateRequest>,
) -> Result<tonic::Response<super::MsgActivateResponse>, tonic::Status>;
async fn cancel(
&self,
request: tonic::Request<super::MsgCancelRequest>,
) -> Result<tonic::Response<super::MsgCancelResponse>, tonic::Status>;
async fn delete(
&self,
request: tonic::Request<super::MsgDeleteRequest>,
) -> Result<tonic::Response<super::MsgDeleteResponse>, tonic::Status>;
async fn mint(
&self,
request: tonic::Request<super::MsgMintRequest>,
) -> Result<tonic::Response<super::MsgMintResponse>, tonic::Status>;
async fn burn(
&self,
request: tonic::Request<super::MsgBurnRequest>,
) -> Result<tonic::Response<super::MsgBurnResponse>, tonic::Status>;
async fn add_access(
&self,
request: tonic::Request<super::MsgAddAccessRequest>,
) -> Result<tonic::Response<super::MsgAddAccessResponse>, tonic::Status>;
async fn delete_access(
&self,
request: tonic::Request<super::MsgDeleteAccessRequest>,
) -> Result<tonic::Response<super::MsgDeleteAccessResponse>, tonic::Status>;
async fn withdraw(
&self,
request: tonic::Request<super::MsgWithdrawRequest>,
) -> Result<tonic::Response<super::MsgWithdrawResponse>, tonic::Status>;
async fn add_marker(
&self,
request: tonic::Request<super::MsgAddMarkerRequest>,
) -> Result<tonic::Response<super::MsgAddMarkerResponse>, tonic::Status>;
async fn transfer(
&self,
request: tonic::Request<super::MsgTransferRequest>,
) -> Result<tonic::Response<super::MsgTransferResponse>, tonic::Status>;
async fn ibc_transfer(
&self,
request: tonic::Request<super::MsgIbcTransferRequest>,
) -> Result<tonic::Response<super::MsgIbcTransferResponse>, tonic::Status>;
async fn set_denom_metadata(
&self,
request: tonic::Request<super::MsgSetDenomMetadataRequest>,
) -> Result<tonic::Response<super::MsgSetDenomMetadataResponse>, tonic::Status>;
async fn grant_allowance(
&self,
request: tonic::Request<super::MsgGrantAllowanceRequest>,
) -> Result<tonic::Response<super::MsgGrantAllowanceResponse>, tonic::Status>;
}
#[derive(Debug)]
pub struct MsgServer<T: Msg> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
}
struct _Inner<T>(Arc<T>);
impl<T: Msg> MsgServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
}
}
pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
where
T: Msg,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/provenance.marker.v1.Msg/Finalize" => {
#[allow(non_camel_case_types)]
struct FinalizeSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgFinalizeRequest> for FinalizeSvc<T> {
type Response = super::MsgFinalizeResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgFinalizeRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).finalize(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = FinalizeSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/Activate" => {
#[allow(non_camel_case_types)]
struct ActivateSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgActivateRequest> for ActivateSvc<T> {
type Response = super::MsgActivateResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgActivateRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).activate(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ActivateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/Cancel" => {
#[allow(non_camel_case_types)]
struct CancelSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgCancelRequest> for CancelSvc<T> {
type Response = super::MsgCancelResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgCancelRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).cancel(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CancelSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/Delete" => {
#[allow(non_camel_case_types)]
struct DeleteSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgDeleteRequest> for DeleteSvc<T> {
type Response = super::MsgDeleteResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgDeleteRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).delete(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeleteSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/Mint" => {
#[allow(non_camel_case_types)]
struct MintSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgMintRequest> for MintSvc<T> {
type Response = super::MsgMintResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgMintRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).mint(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = MintSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/Burn" => {
#[allow(non_camel_case_types)]
struct BurnSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgBurnRequest> for BurnSvc<T> {
type Response = super::MsgBurnResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgBurnRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).burn(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = BurnSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/AddAccess" => {
#[allow(non_camel_case_types)]
struct AddAccessSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgAddAccessRequest> for AddAccessSvc<T> {
type Response = super::MsgAddAccessResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgAddAccessRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).add_access(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = AddAccessSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/DeleteAccess" => {
#[allow(non_camel_case_types)]
struct DeleteAccessSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgDeleteAccessRequest> for DeleteAccessSvc<T> {
type Response = super::MsgDeleteAccessResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgDeleteAccessRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).delete_access(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeleteAccessSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/Withdraw" => {
#[allow(non_camel_case_types)]
struct WithdrawSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgWithdrawRequest> for WithdrawSvc<T> {
type Response = super::MsgWithdrawResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgWithdrawRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).withdraw(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = WithdrawSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/AddMarker" => {
#[allow(non_camel_case_types)]
struct AddMarkerSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgAddMarkerRequest> for AddMarkerSvc<T> {
type Response = super::MsgAddMarkerResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgAddMarkerRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).add_marker(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = AddMarkerSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/Transfer" => {
#[allow(non_camel_case_types)]
struct TransferSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgTransferRequest> for TransferSvc<T> {
type Response = super::MsgTransferResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgTransferRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).transfer(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = TransferSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/IbcTransfer" => {
#[allow(non_camel_case_types)]
struct IbcTransferSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgIbcTransferRequest> for IbcTransferSvc<T> {
type Response = super::MsgIbcTransferResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgIbcTransferRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).ibc_transfer(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = IbcTransferSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/SetDenomMetadata" => {
#[allow(non_camel_case_types)]
struct SetDenomMetadataSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgSetDenomMetadataRequest>
for SetDenomMetadataSvc<T>
{
type Response = super::MsgSetDenomMetadataResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgSetDenomMetadataRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).set_denom_metadata(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = SetDenomMetadataSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Msg/GrantAllowance" => {
#[allow(non_camel_case_types)]
struct GrantAllowanceSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgGrantAllowanceRequest> for GrantAllowanceSvc<T> {
type Response = super::MsgGrantAllowanceResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::MsgGrantAllowanceRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).grant_allowance(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GrantAllowanceSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => Box::pin(async move {
Ok(http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap())
}),
}
}
}
impl<T: Msg> Clone for MsgServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
}
}
}
impl<T: Msg> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Msg> tonic::server::NamedService for MsgServer<T> {
const NAME: &'static str = "provenance.marker.v1.Msg";
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SiPrefix {
None = 0,
Deka = 1,
Hecto = 2,
Kilo = 3,
Mega = 6,
Giga = 9,
Tera = 12,
Peta = 15,
Exa = 18,
Zetta = 21,
Yotta = 24,
Deci = -1,
Centi = -2,
Milli = -3,
Micro = -6,
Nano = -9,
Pico = -12,
Femto = -15,
Atto = -18,
Zepto = -21,
Yocto = -24,
}
impl SiPrefix {
pub fn as_str_name(&self) -> &'static str {
match self {
SiPrefix::None => "SI_PREFIX_NONE",
SiPrefix::Deka => "SI_PREFIX_DEKA",
SiPrefix::Hecto => "SI_PREFIX_HECTO",
SiPrefix::Kilo => "SI_PREFIX_KILO",
SiPrefix::Mega => "SI_PREFIX_MEGA",
SiPrefix::Giga => "SI_PREFIX_GIGA",
SiPrefix::Tera => "SI_PREFIX_TERA",
SiPrefix::Peta => "SI_PREFIX_PETA",
SiPrefix::Exa => "SI_PREFIX_EXA",
SiPrefix::Zetta => "SI_PREFIX_ZETTA",
SiPrefix::Yotta => "SI_PREFIX_YOTTA",
SiPrefix::Deci => "SI_PREFIX_DECI",
SiPrefix::Centi => "SI_PREFIX_CENTI",
SiPrefix::Milli => "SI_PREFIX_MILLI",
SiPrefix::Micro => "SI_PREFIX_MICRO",
SiPrefix::Nano => "SI_PREFIX_NANO",
SiPrefix::Pico => "SI_PREFIX_PICO",
SiPrefix::Femto => "SI_PREFIX_FEMTO",
SiPrefix::Atto => "SI_PREFIX_ATTO",
SiPrefix::Zepto => "SI_PREFIX_ZEPTO",
SiPrefix::Yocto => "SI_PREFIX_YOCTO",
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAllMarkersRequest {
#[prost(enumeration = "MarkerStatus", tag = "1")]
pub status: i32,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAllMarkersResponse {
#[prost(message, repeated, tag = "1")]
pub markers: ::prost::alloc::vec::Vec<::prost_types::Any>,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryMarkerRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryMarkerResponse {
#[prost(message, optional, tag = "1")]
pub marker: ::core::option::Option<::prost_types::Any>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryHoldingRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryHoldingResponse {
#[prost(message, repeated, tag = "1")]
pub balances: ::prost::alloc::vec::Vec<Balance>,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuerySupplyRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuerySupplyResponse {
#[prost(message, optional, tag = "1")]
pub amount: ::core::option::Option<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryEscrowRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryEscrowResponse {
#[prost(message, repeated, tag = "1")]
pub escrow: ::prost::alloc::vec::Vec<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAccessRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAccessResponse {
#[prost(message, repeated, tag = "1")]
pub accounts: ::prost::alloc::vec::Vec<AccessGrant>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDenomMetadataRequest {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDenomMetadataResponse {
#[prost(message, optional, tag = "1")]
pub metadata: ::core::option::Option<cosmos_sdk_proto::cosmos::bank::v1beta1::Metadata>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Balance {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub coins: ::prost::alloc::vec::Vec<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod query_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "grpc-transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
impl QueryClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> QueryClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> QueryClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
QueryClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
pub async fn params(
&mut self,
request: impl tonic::IntoRequest<super::QueryParamsRequest>,
) -> Result<tonic::Response<super::QueryParamsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Query/Params");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn all_markers(
&mut self,
request: impl tonic::IntoRequest<super::QueryAllMarkersRequest>,
) -> Result<tonic::Response<super::QueryAllMarkersResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/provenance.marker.v1.Query/AllMarkers");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn marker(
&mut self,
request: impl tonic::IntoRequest<super::QueryMarkerRequest>,
) -> Result<tonic::Response<super::QueryMarkerResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Query/Marker");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn holding(
&mut self,
request: impl tonic::IntoRequest<super::QueryHoldingRequest>,
) -> Result<tonic::Response<super::QueryHoldingResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Query/Holding");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn supply(
&mut self,
request: impl tonic::IntoRequest<super::QuerySupplyRequest>,
) -> Result<tonic::Response<super::QuerySupplyResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Query/Supply");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn escrow(
&mut self,
request: impl tonic::IntoRequest<super::QueryEscrowRequest>,
) -> Result<tonic::Response<super::QueryEscrowResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Query/Escrow");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn access(
&mut self,
request: impl tonic::IntoRequest<super::QueryAccessRequest>,
) -> Result<tonic::Response<super::QueryAccessResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/provenance.marker.v1.Query/Access");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn denom_metadata(
&mut self,
request: impl tonic::IntoRequest<super::QueryDenomMetadataRequest>,
) -> Result<tonic::Response<super::QueryDenomMetadataResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/provenance.marker.v1.Query/DenomMetadata");
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod query_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Query: Send + Sync + 'static {
async fn params(
&self,
request: tonic::Request<super::QueryParamsRequest>,
) -> Result<tonic::Response<super::QueryParamsResponse>, tonic::Status>;
async fn all_markers(
&self,
request: tonic::Request<super::QueryAllMarkersRequest>,
) -> Result<tonic::Response<super::QueryAllMarkersResponse>, tonic::Status>;
async fn marker(
&self,
request: tonic::Request<super::QueryMarkerRequest>,
) -> Result<tonic::Response<super::QueryMarkerResponse>, tonic::Status>;
async fn holding(
&self,
request: tonic::Request<super::QueryHoldingRequest>,
) -> Result<tonic::Response<super::QueryHoldingResponse>, tonic::Status>;
async fn supply(
&self,
request: tonic::Request<super::QuerySupplyRequest>,
) -> Result<tonic::Response<super::QuerySupplyResponse>, tonic::Status>;
async fn escrow(
&self,
request: tonic::Request<super::QueryEscrowRequest>,
) -> Result<tonic::Response<super::QueryEscrowResponse>, tonic::Status>;
async fn access(
&self,
request: tonic::Request<super::QueryAccessRequest>,
) -> Result<tonic::Response<super::QueryAccessResponse>, tonic::Status>;
async fn denom_metadata(
&self,
request: tonic::Request<super::QueryDenomMetadataRequest>,
) -> Result<tonic::Response<super::QueryDenomMetadataResponse>, tonic::Status>;
}
#[derive(Debug)]
pub struct QueryServer<T: Query> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
}
struct _Inner<T>(Arc<T>);
impl<T: Query> QueryServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
}
}
pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
where
T: Query,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/provenance.marker.v1.Query/Params" => {
#[allow(non_camel_case_types)]
struct ParamsSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryParamsRequest> for ParamsSvc<T> {
type Response = super::QueryParamsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryParamsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).params(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ParamsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Query/AllMarkers" => {
#[allow(non_camel_case_types)]
struct AllMarkersSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryAllMarkersRequest> for AllMarkersSvc<T> {
type Response = super::QueryAllMarkersResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryAllMarkersRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).all_markers(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = AllMarkersSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Query/Marker" => {
#[allow(non_camel_case_types)]
struct MarkerSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryMarkerRequest> for MarkerSvc<T> {
type Response = super::QueryMarkerResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryMarkerRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).marker(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = MarkerSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Query/Holding" => {
#[allow(non_camel_case_types)]
struct HoldingSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryHoldingRequest> for HoldingSvc<T> {
type Response = super::QueryHoldingResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryHoldingRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).holding(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = HoldingSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Query/Supply" => {
#[allow(non_camel_case_types)]
struct SupplySvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QuerySupplyRequest> for SupplySvc<T> {
type Response = super::QuerySupplyResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QuerySupplyRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).supply(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = SupplySvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Query/Escrow" => {
#[allow(non_camel_case_types)]
struct EscrowSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryEscrowRequest> for EscrowSvc<T> {
type Response = super::QueryEscrowResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryEscrowRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).escrow(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = EscrowSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Query/Access" => {
#[allow(non_camel_case_types)]
struct AccessSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryAccessRequest> for AccessSvc<T> {
type Response = super::QueryAccessResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryAccessRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).access(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = AccessSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/provenance.marker.v1.Query/DenomMetadata" => {
#[allow(non_camel_case_types)]
struct DenomMetadataSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryDenomMetadataRequest>
for DenomMetadataSvc<T>
{
type Response = super::QueryDenomMetadataResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryDenomMetadataRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).denom_metadata(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DenomMetadataSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => Box::pin(async move {
Ok(http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap())
}),
}
}
}
impl<T: Query> Clone for QueryServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
}
}
}
impl<T: Query> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Query> tonic::server::NamedService for QueryServer<T> {
const NAME: &'static str = "provenance.marker.v1.Query";
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarkerTransferAuthorization {
#[prost(message, repeated, tag = "1")]
pub transfer_limit: ::prost::alloc::vec::Vec<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
#[prost(message, repeated, tag = "2")]
pub markers: ::prost::alloc::vec::Vec<MarkerAccount>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddMarkerProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub amount: ::core::option::Option<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "4")]
pub manager: ::prost::alloc::string::String,
#[prost(enumeration = "MarkerStatus", tag = "5")]
pub status: i32,
#[prost(enumeration = "MarkerType", tag = "6")]
pub marker_type: i32,
#[prost(message, repeated, tag = "7")]
pub access_list: ::prost::alloc::vec::Vec<AccessGrant>,
#[prost(bool, tag = "8")]
pub supply_fixed: bool,
#[prost(bool, tag = "9")]
pub allow_governance_control: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SupplyIncreaseProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub amount: ::core::option::Option<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "4")]
pub target_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SupplyDecreaseProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub amount: ::core::option::Option<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetAdministratorProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub denom: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub access: ::prost::alloc::vec::Vec<AccessGrant>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveAdministratorProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub denom: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub removed_address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangeStatusProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub denom: ::prost::alloc::string::String,
#[prost(enumeration = "MarkerStatus", tag = "4")]
pub new_status: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WithdrawEscrowProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub denom: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub amount: ::prost::alloc::vec::Vec<cosmos_sdk_proto::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "5")]
pub target_address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetDenomMetadataProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub metadata: ::core::option::Option<cosmos_sdk_proto::cosmos::bank::v1beta1::Metadata>,
}