use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use crate::Coin;
use super::query_response::QueryResponseType;
#[non_exhaustive]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum BankQuery {
#[cfg(feature = "cosmwasm_1_1")]
Supply { denom: String },
Balance { address: String, denom: String },
AllBalances { address: String },
}
#[cfg(feature = "cosmwasm_1_1")]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub struct SupplyResponse {
pub amount: Coin,
}
#[cfg(feature = "cosmwasm_1_1")]
impl QueryResponseType for SupplyResponse {}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub struct BalanceResponse {
pub amount: Coin,
}
impl QueryResponseType for BalanceResponse {}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub struct AllBalanceResponse {
pub amount: Vec<Coin>,
}
impl QueryResponseType for AllBalanceResponse {}