pub enum QueryMsg {
Show 16 variants ContractInfo {}, NumTokens { viewer: Option<ViewerInfo>, }, AllTokens { viewer: Option<ViewerInfo>, start_after: Option<String>, limit: Option<u32>, }, OwnerOf { token_id: String, viewer: Option<ViewerInfo>, include_expired: Option<bool>, }, NftInfo { token_id: String, }, AllNftInfo { token_id: String, viewer: Option<ViewerInfo>, include_expired: Option<bool>, }, PrivateMetadata { token_id: String, viewer: Option<ViewerInfo>, }, NftDossier { token_id: String, viewer: Option<ViewerInfo>, include_expired: Option<bool>, }, TokenApprovals { token_id: String, viewing_key: String, include_expired: Option<bool>, }, ApprovedForAll { owner: HumanAddr, viewing_key: Option<String>, include_expired: Option<bool>, }, InventoryApprovals { address: HumanAddr, viewing_key: String, include_expired: Option<bool>, }, Tokens { owner: HumanAddr, viewer: Option<HumanAddr>, viewing_key: Option<String>, start_after: Option<String>, limit: Option<u32>, }, TransactionHistory { address: HumanAddr, viewing_key: String, page: Option<u32>, page_size: Option<u32>, }, Minters {}, IsUnwrapped { token_id: String, }, VerifyTransferApproval { token_ids: Vec<String>, address: HumanAddr, viewing_key: String, },
}
Expand description

SNIP-721 queries

Variants

ContractInfo

Fields

display the contract’s name and symbol

NumTokens

Fields

viewer: Option<ViewerInfo>

optional address and key requesting to view the number of tokens

display the number of tokens controlled by the contract. The token supply must either be public, or the querier must be an authenticated minter

AllTokens

Fields

viewer: Option<ViewerInfo>

optional address and key requesting to view the list of tokens

start_after: Option<String>

optionally display only token ids that come after the input String in lexicographical order

limit: Option<u32>

optional number of token ids to display

display an optionally paginated list of all the tokens controlled by the contract. The token supply must either be public, or the querier must be authorized to view

OwnerOf

Fields

token_id: String
viewer: Option<ViewerInfo>

optional address and key requesting to view the token owner

include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

display the owner of the specified token if authorized to view it. If the requester is also the token’s owner, the response will also include a list of any addresses that can transfer this token. The transfer approval list is for CW721 compliance, but the NftDossier query will be more complete by showing viewing approvals as well

NftInfo

Fields

token_id: String

displays the token’s public metadata

AllNftInfo

Fields

token_id: String
viewer: Option<ViewerInfo>

optional address and key requesting to view the token owner

include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

displays all the information contained in the OwnerOf and NftInfo queries

PrivateMetadata

Fields

token_id: String
viewer: Option<ViewerInfo>

optional address and key requesting to view the private metadata

displays the token’s private Metadata

NftDossier

Fields

token_id: String
viewer: Option<ViewerInfo>

optional address and key requesting to view the token information

include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

displays all the information about a token that the viewer has permission to see. This may include the owner, the public metadata, the private metadata, and the token and inventory approvals

TokenApprovals

Fields

token_id: String
viewing_key: String

the token owner’s viewing key

include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

list all the Approvals in place for a specified token if given the owner’s viewing key

ApprovedForAll

Fields

owner: HumanAddr
viewing_key: Option<String>

optional viewing key to authenticate this query. It is “optional” only in the sense that a CW721 query does not have this field. However, not providing the key will always result in an empty list

include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

displays a list of all the CW721-style operators (any address that was granted approval to transfer all of the owner’s tokens). This query is provided to maintain CW-721 compliance, however, approvals are private on secret network, so only the owner’s viewing key will authorize the ability to see the list of operators

InventoryApprovals

Fields

address: HumanAddr
viewing_key: String

the viewing key

include_expired: Option<bool>

optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response

list all the inventory-wide Approvals in place for the specified address if given the the correct viewing key for the address

Tokens

Fields

owner: HumanAddr
viewer: Option<HumanAddr>

optional address of the querier if different from the owner

viewing_key: Option<String>

optional viewing key

start_after: Option<String>

optionally display only token ids that come after the input String in lexicographical order

limit: Option<u32>

optional number of token ids to display

displays a list of all the tokens belonging to the input owner in which the viewer has view_owner permission

TransactionHistory

Fields

address: HumanAddr
viewing_key: String

viewing key

page: Option<u32>

optional page to display

page_size: Option<u32>

optional number of transactions per page

display the transaction history for the specified address in reverse chronological order

Minters

Fields

display the list of authorized minters

IsUnwrapped

Fields

token_id: String

display if a token is unwrapped

VerifyTransferApproval

Fields

token_ids: Vec<String>

list of tokens to verify approval for

address: HumanAddr

address that has approval

viewing_key: String

viewing key

verify that the specified address has approval to transfer every listed token

Implementations

Returns a StdResult, where T is the “Response” type that wraps the query answer

Arguments
  • querier - a reference to the Querier dependency of the querying contract
  • block_size - pad the message to blocks of this size
  • callback_code_hash - String holding the code hash of the contract being queried
  • contract_addr - address of the contract being queried

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.