{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", "anyOf": [ { "description": "display the contract's name and symbol", "type": "object", "required": [ "contract_info" ], "properties": { "contract_info": { "type": "object" } } }, { "description": "display the contract's configuration", "type": "object", "required": [ "contract_config" ], "properties": { "contract_config": { "type": "object" } } }, { "description": "display the list of authorized minters", "type": "object", "required": [ "minters" ], "properties": { "minters": { "type": "object" } } }, { "description": "display the number of tokens controlled by the contract. The token supply must either be public, or the querier must be an authenticated minter", "type": "object", "required": [ "num_tokens" ], "properties": { "num_tokens": { "type": "object", "properties": { "viewer": { "description": "optional address and key requesting to view the number of tokens", "anyOf": [ { "$ref": "#/definitions/ViewerInfo" }, { "type": "null" } ] } } } } }, { "description": "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 an authenticated minter", "type": "object", "required": [ "all_tokens" ], "properties": { "all_tokens": { "type": "object", "properties": { "limit": { "description": "optional number of token ids to display", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_after": { "description": "paginate by providing the last token_id received in the previous query", "type": [ "string", "null" ] }, "viewer": { "description": "optional address and key requesting to view the list of tokens", "anyOf": [ { "$ref": "#/definitions/ViewerInfo" }, { "type": "null" } ] } } } } }, { "description": "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", "type": "object", "required": [ "owner_of" ], "properties": { "owner_of": { "type": "object", "required": [ "token_id" ], "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "token_id": { "type": "string" }, "viewer": { "description": "optional address and key requesting to view the token owner", "anyOf": [ { "$ref": "#/definitions/ViewerInfo" }, { "type": "null" } ] } } } } }, { "description": "displays the public metadata of a token", "type": "object", "required": [ "nft_info" ], "properties": { "nft_info": { "type": "object", "required": [ "token_id" ], "properties": { "token_id": { "type": "string" } } } } }, { "description": "displays all the information contained in the OwnerOf and NftInfo queries", "type": "object", "required": [ "all_nft_info" ], "properties": { "all_nft_info": { "type": "object", "required": [ "token_id" ], "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "token_id": { "type": "string" }, "viewer": { "description": "optional address and key requesting to view the token owner", "anyOf": [ { "$ref": "#/definitions/ViewerInfo" }, { "type": "null" } ] } } } } }, { "description": "displays the private metadata if permitted to view it", "type": "object", "required": [ "private_metadata" ], "properties": { "private_metadata": { "type": "object", "required": [ "token_id" ], "properties": { "token_id": { "type": "string" }, "viewer": { "description": "optional address and key requesting to view the private metadata", "anyOf": [ { "$ref": "#/definitions/ViewerInfo" }, { "type": "null" } ] } } } } }, { "description": "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, royalty information, mint run information, whether the token is unwrapped, whether the token is transferable, and the token and inventory approvals", "type": "object", "required": [ "nft_dossier" ], "properties": { "nft_dossier": { "type": "object", "required": [ "token_id" ], "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "token_id": { "type": "string" }, "viewer": { "description": "optional address and key requesting to view the token information", "anyOf": [ { "$ref": "#/definitions/ViewerInfo" }, { "type": "null" } ] } } } } }, { "description": "displays all the information about multiple tokens that the viewer has permission to see. This may include the owner, the public metadata, the private metadata, royalty information, mint run information, whether the token is unwrapped, whether the token is transferable, and the token and inventory approvals", "type": "object", "required": [ "batch_nft_dossier" ], "properties": { "batch_nft_dossier": { "type": "object", "required": [ "token_ids" ], "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "token_ids": { "type": "array", "items": { "type": "string" } }, "viewer": { "description": "optional address and key requesting to view the token information", "anyOf": [ { "$ref": "#/definitions/ViewerInfo" }, { "type": "null" } ] } } } } }, { "description": "list all the approvals in place for a specified token if given the owner's viewing key", "type": "object", "required": [ "token_approvals" ], "properties": { "token_approvals": { "type": "object", "required": [ "token_id", "viewing_key" ], "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "token_id": { "type": "string" }, "viewing_key": { "description": "the token owner's viewing key", "type": "string" } } } } }, { "description": "list all the inventory-wide approvals in place for the specified address if given the the correct viewing key for the address", "type": "object", "required": [ "inventory_approvals" ], "properties": { "inventory_approvals": { "type": "object", "required": [ "address", "viewing_key" ], "properties": { "address": { "$ref": "#/definitions/HumanAddr" }, "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "viewing_key": { "description": "the viewing key", "type": "string" } } } } }, { "description": "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 CW721 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", "type": "object", "required": [ "approved_for_all" ], "properties": { "approved_for_all": { "type": "object", "required": [ "owner" ], "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "owner": { "$ref": "#/definitions/HumanAddr" }, "viewing_key": { "description": "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", "type": [ "string", "null" ] } } } } }, { "description": "displays a list of all the tokens belonging to the input owner in which the viewer has view_owner permission", "type": "object", "required": [ "tokens" ], "properties": { "tokens": { "type": "object", "required": [ "owner" ], "properties": { "limit": { "description": "optional number of token ids to display", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "owner": { "$ref": "#/definitions/HumanAddr" }, "start_after": { "description": "paginate by providing the last token_id received in the previous query", "type": [ "string", "null" ] }, "viewer": { "description": "optional address of the querier if different from the owner", "anyOf": [ { "$ref": "#/definitions/HumanAddr" }, { "type": "null" } ] }, "viewing_key": { "description": "optional viewing key", "type": [ "string", "null" ] } } } } }, { "description": "displays the number of tokens that the querier has permission to see the owner and that belong to the specified address", "type": "object", "required": [ "num_tokens_of_owner" ], "properties": { "num_tokens_of_owner": { "type": "object", "required": [ "owner" ], "properties": { "owner": { "$ref": "#/definitions/HumanAddr" }, "viewer": { "description": "optional address of the querier if different from the owner", "anyOf": [ { "$ref": "#/definitions/HumanAddr" }, { "type": "null" } ] }, "viewing_key": { "description": "optional viewing key", "type": [ "string", "null" ] } } } } }, { "description": "display if a token is unwrapped", "type": "object", "required": [ "is_unwrapped" ], "properties": { "is_unwrapped": { "type": "object", "required": [ "token_id" ], "properties": { "token_id": { "type": "string" } } } } }, { "description": "display if a token is transferable", "type": "object", "required": [ "is_transferable" ], "properties": { "is_transferable": { "type": "object", "required": [ "token_id" ], "properties": { "token_id": { "type": "string" } } } } }, { "description": "display that this contract implements non-transferable tokens", "type": "object", "required": [ "implements_non_transferable_tokens" ], "properties": { "implements_non_transferable_tokens": { "type": "object" } } }, { "description": "display that this contract implements the use of the `token_subtype` metadata extension field", "type": "object", "required": [ "implements_token_subtype" ], "properties": { "implements_token_subtype": { "type": "object" } } }, { "description": "verify that the specified address has approval to transfer every listed token. A token will count as unapproved if it is non-transferable", "type": "object", "required": [ "verify_transfer_approval" ], "properties": { "verify_transfer_approval": { "type": "object", "required": [ "address", "token_ids", "viewing_key" ], "properties": { "address": { "description": "address that has approval", "allOf": [ { "$ref": "#/definitions/HumanAddr" } ] }, "token_ids": { "description": "list of tokens to verify approval for", "type": "array", "items": { "type": "string" } }, "viewing_key": { "description": "viewing key", "type": "string" } } } } }, { "description": "display the transaction history for the specified address in reverse chronological order", "type": "object", "required": [ "transaction_history" ], "properties": { "transaction_history": { "type": "object", "required": [ "address", "viewing_key" ], "properties": { "address": { "$ref": "#/definitions/HumanAddr" }, "page": { "description": "optional page to display", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "page_size": { "description": "optional number of transactions per page", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "viewing_key": { "description": "viewing key", "type": "string" } } } } }, { "description": "display the code hash a contract has registered with the token contract and whether the contract implements BatchReceivenft", "type": "object", "required": [ "registered_code_hash" ], "properties": { "registered_code_hash": { "type": "object", "required": [ "contract" ], "properties": { "contract": { "description": "the contract whose receive registration info you want to view", "allOf": [ { "$ref": "#/definitions/HumanAddr" } ] } } } } }, { "description": "display the royalty information of a token if a token ID is specified, or display the contract's default royalty information in no token ID is provided", "type": "object", "required": [ "royalty_info" ], "properties": { "royalty_info": { "type": "object", "properties": { "token_id": { "description": "optional ID of the token whose royalty information should be displayed. If not provided, display the contract's default royalty information", "type": [ "string", "null" ] }, "viewer": { "description": "optional address and key requesting to view the royalty information", "anyOf": [ { "$ref": "#/definitions/ViewerInfo" }, { "type": "null" } ] } } } } }, { "description": "display the contract's creator", "type": "object", "required": [ "contract_creator" ], "properties": { "contract_creator": { "type": "object" } } }, { "description": "perform queries by passing permits instead of viewing keys", "type": "object", "required": [ "with_permit" ], "properties": { "with_permit": { "type": "object", "required": [ "permit", "query" ], "properties": { "permit": { "description": "permit used to verify querier identity", "allOf": [ { "$ref": "#/definitions/Permit_for_TokenPermissions" } ] }, "query": { "description": "query to perform", "allOf": [ { "$ref": "#/definitions/QueryWithPermit" } ] } } } } } ], "definitions": { "Binary": { "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", "type": "string" }, "HumanAddr": { "type": "string" }, "PermitParams_for_TokenPermissions": { "type": "object", "required": [ "allowed_tokens", "chain_id", "permissions", "permit_name" ], "properties": { "allowed_tokens": { "type": "array", "items": { "$ref": "#/definitions/HumanAddr" } }, "chain_id": { "type": "string" }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/TokenPermissions" } }, "permit_name": { "type": "string" } } }, "PermitSignature": { "type": "object", "required": [ "pub_key", "signature" ], "properties": { "pub_key": { "$ref": "#/definitions/PubKey" }, "signature": { "$ref": "#/definitions/Binary" } } }, "Permit_for_TokenPermissions": { "type": "object", "required": [ "params", "signature" ], "properties": { "params": { "$ref": "#/definitions/PermitParams_for_TokenPermissions" }, "signature": { "$ref": "#/definitions/PermitSignature" } } }, "PubKey": { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "description": "ignored, but must be \"tendermint/PubKeySecp256k1\" otherwise the verification will fail", "type": "string" }, "value": { "description": "Secp256k1 PubKey", "allOf": [ { "$ref": "#/definitions/Binary" } ] } } }, "QueryWithPermit": { "description": "queries using permits instead of viewing keys", "anyOf": [ { "description": "display the royalty information of a token if a token ID is specified, or display the contract's default royalty information in no token ID is provided", "type": "object", "required": [ "royalty_info" ], "properties": { "royalty_info": { "type": "object", "properties": { "token_id": { "description": "optional ID of the token whose royalty information should be displayed. If not provided, display the contract's default royalty information", "type": [ "string", "null" ] } } } } }, { "description": "displays the private metadata if permitted to view it", "type": "object", "required": [ "private_metadata" ], "properties": { "private_metadata": { "type": "object", "required": [ "token_id" ], "properties": { "token_id": { "type": "string" } } } } }, { "description": "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, royalty information, mint run information, whether the token is unwrapped, whether the token is transferable, and the token and inventory approvals", "type": "object", "required": [ "nft_dossier" ], "properties": { "nft_dossier": { "type": "object", "required": [ "token_id" ], "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "token_id": { "type": "string" } } } } }, { "description": "displays all the information about multiple tokens that the viewer has permission to see. This may include the owner, the public metadata, the private metadata, royalty information, mint run information, whether the token is unwrapped, whether the token is transferable, and the token and inventory approvals", "type": "object", "required": [ "batch_nft_dossier" ], "properties": { "batch_nft_dossier": { "type": "object", "required": [ "token_ids" ], "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "token_ids": { "type": "array", "items": { "type": "string" } } } } } }, { "description": "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", "type": "object", "required": [ "owner_of" ], "properties": { "owner_of": { "type": "object", "required": [ "token_id" ], "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "token_id": { "type": "string" } } } } }, { "description": "displays all the information contained in the OwnerOf and NftInfo queries", "type": "object", "required": [ "all_nft_info" ], "properties": { "all_nft_info": { "type": "object", "required": [ "token_id" ], "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "token_id": { "type": "string" } } } } }, { "description": "list all the inventory-wide approvals in place for the permit creator", "type": "object", "required": [ "inventory_approvals" ], "properties": { "inventory_approvals": { "type": "object", "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] } } } } }, { "description": "verify that the permit creator has approval to transfer every listed token. A token will count as unapproved if it is non-transferable", "type": "object", "required": [ "verify_transfer_approval" ], "properties": { "verify_transfer_approval": { "type": "object", "required": [ "token_ids" ], "properties": { "token_ids": { "description": "list of tokens to verify approval for", "type": "array", "items": { "type": "string" } } } } } }, { "description": "display the transaction history for the permit creator in reverse chronological order", "type": "object", "required": [ "transaction_history" ], "properties": { "transaction_history": { "type": "object", "properties": { "page": { "description": "optional page to display", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "page_size": { "description": "optional number of transactions per page", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 } } } } }, { "description": "display the number of tokens controlled by the contract. The token supply must either be public, or the querier must be an authenticated minter", "type": "object", "required": [ "num_tokens" ], "properties": { "num_tokens": { "type": "object" } } }, { "description": "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 an authenticated minter", "type": "object", "required": [ "all_tokens" ], "properties": { "all_tokens": { "type": "object", "properties": { "limit": { "description": "optional number of token ids to display", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_after": { "description": "paginate by providing the last token_id received in the previous query", "type": [ "string", "null" ] } } } } }, { "description": "list all the approvals in place for a specified token if given the owner's permit", "type": "object", "required": [ "token_approvals" ], "properties": { "token_approvals": { "type": "object", "required": [ "token_id" ], "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] }, "token_id": { "type": "string" } } } } }, { "description": "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 CW721 compliance", "type": "object", "required": [ "approved_for_all" ], "properties": { "approved_for_all": { "type": "object", "properties": { "include_expired": { "description": "optionally include expired Approvals in the response list. If ommitted or false, expired Approvals will be filtered out of the response", "type": [ "boolean", "null" ] } } } } }, { "description": "displays a list of all the tokens belonging to the input owner in which the permit creator has view_owner permission", "type": "object", "required": [ "tokens" ], "properties": { "tokens": { "type": "object", "required": [ "owner" ], "properties": { "limit": { "description": "optional number of token ids to display", "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "owner": { "$ref": "#/definitions/HumanAddr" }, "start_after": { "description": "paginate by providing the last token_id received in the previous query", "type": [ "string", "null" ] } } } } }, { "description": "displays the number of tokens that the querier has permission to see the owner and that belong to the specified address", "type": "object", "required": [ "num_tokens_of_owner" ], "properties": { "num_tokens_of_owner": { "type": "object", "required": [ "owner" ], "properties": { "owner": { "$ref": "#/definitions/HumanAddr" } } } } } ] }, "TokenPermissions": { "type": "string", "enum": [ "allowance", "balance", "history", "owner" ] }, "ViewerInfo": { "description": "the address and viewing key making an authenticated query request", "type": "object", "required": [ "address", "viewing_key" ], "properties": { "address": { "description": "querying address", "allOf": [ { "$ref": "#/definitions/HumanAddr" } ] }, "viewing_key": { "description": "authentication key string", "type": "string" } } } } }