Enum snip1155_reference_impl::msg::QueryAnswer
source · pub enum QueryAnswer {
ContractInfo {
admin: Option<Addr>,
curators: Vec<Addr>,
all_token_ids: Vec<String>,
},
Balance {
amount: Uint128,
},
AllBalances(Vec<OwnerBalance>),
TransactionHistory {
txs: Vec<Tx>,
total: u64,
},
Permission(Option<Permission>),
AllPermissions {
permission_keys: Vec<PermissionKey>,
permissions: Vec<Permission>,
total: u64,
},
TokenIdPublicInfo {
token_id_info: StoredTokenInfo,
total_supply: Option<Uint128>,
owner: Option<Addr>,
},
TokenIdPrivateInfo {
token_id_info: StoredTokenInfo,
total_supply: Option<Uint128>,
owner: Option<Addr>,
},
RegisteredCodeHash {
code_hash: Option<String>,
},
ViewingKeyError {
msg: String,
},
}
Expand description
the query responses for each QueryMsg variant
Variants§
ContractInfo
Fields
returns contract-level information:
Balance
Fields
amount: Uint128
returns balance of a specific token_id. Owners can give permission to other addresses to query their balance
AllBalances(Vec<OwnerBalance>)
returns all token_id balances owned by an address. Only owners can use this query
TransactionHistory
all permissions related to a particular address. Note that “curation” is not recorded as a transaction per se, but
the tokens minted as part of the initial_balances set by the curator is recorded under TxAction::Mint
Permission(Option<Permission>)
AllPermissions
all permissions granted, viewable by the permission granter.
Users or applications can match the permission_keys that corresponds to each permission as
they have a similar order, ie: the index of permission_keys
vector corresponds to the index
of the permissions
vector.
TokenIdPublicInfo
Fields
token_id_info: StoredTokenInfo
token_id_info.private_metadata will always = None
TokenIdPrivateInfo
Fields
token_id_info: StoredTokenInfo
RegisteredCodeHash
returns None if contract has not registered with SNIP1155 contract
ViewingKeyError
returned when an viewing_key-specific errors occur during a user’s attempt to perform an authenticated query
Trait Implementations§
source§impl Debug for QueryAnswer
impl Debug for QueryAnswer
source§impl<'de> Deserialize<'de> for QueryAnswer
impl<'de> Deserialize<'de> for QueryAnswer
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl JsonSchema for QueryAnswer
impl JsonSchema for QueryAnswer
source§fn schema_name() -> String
fn schema_name() -> String
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more