Skip to main content
logo

account-nft

InstantiateMsg

types.ts
Copy

_8
type Uint128 = string
_8
_8
interface InstantiateMsg {
_8
max_value_for_burn: Uint128
_8
minter: string
_8
name: string
_8
symbol: string
_8
}

ExecuteMsg

update_config

Update config in storage. Only minter can execute.

types.ts
Copy

_6
type ExecuteMsg =
_6
{
_6
update_config: {
_6
updates: NftConfigUpdates
_6
}
_6
}

NftConfigUpdates

types.ts
Copy

_4
interface NftConfigUpdates {
_4
max_value_for_burn?: Uint128 | null
_4
proposed_new_minter?: string | null
_4
}

accept_minter_role

Accept the proposed minter role. Only the proposed new minter can execute.

types.ts
Copy

_4
type ExecuteMsg =
_4
{
_4
accept_minter_role: {}
_4
}

mint

Mint a new NFT to the specified user; can only be called by the contract minter.

types.ts
Copy

_6
type ExecuteMsg =
_6
{
_6
mint: {
_6
user: string
_6
}
_6
}

burn

Burn an NFT the sender has access to. Will attempt to query the Credit Manager first to ensure the balance is below the config set threshold.

types.ts
Copy

_6
type ExecuteMsg =
_6
{
_6
burn: {
_6
token_id: string
_6
}
_6
}

ExecuteMsg (cw721)

transfer_nft

Transfer is a base message to move a token to another account without triggering actions.

types.ts
Copy

_7
type ExecuteMsg =
_7
{
_7
transfer_nft: {
_7
recipient: string
_7
token_id: string
_7
}
_7
}

send_nft

Send is a base message to transfer a token to a contract and trigger an action on the receiving contract.

types.ts
Copy

_10
type Binary = string
_10
_10
type ExecuteMsg =
_10
{
_10
send_nft: {
_10
contract: string
_10
msg: Binary
_10
token_id: string
_10
}
_10
}

approve

Allows operator to transfer/send the token from the owner's account. If expiration is set, then this allowance has a time/height limit.

types.ts
Copy

_8
type ExecuteMsg =
_8
{
_8
approve: {
_8
expires?: Expiration | null
_8
spender: string
_8
token_id: string
_8
}
_8
}

Expiration

types.ts
Copy

_12
type Timestamp = Uint64
_12
_12
type Expiration =
_12
| {
_12
at_height: number
_12
}
_12
| {
_12
at_time: Timestamp
_12
}
_12
| {
_12
never: {}
_12
}

revoke

Remove previously granted Approval.

types.ts
Copy

_7
type ExecuteMsg =
_7
{
_7
revoke: {
_7
spender: string
_7
token_id: string
_7
}
_7
}

approve_all

Allows operator to transfer/send any token from the owner's account. If expiration is set, then this allowance has a time/height limit.

types.ts
Copy

_7
type ExecuteMsg =
_7
{
_7
approve_all: {
_7
expires?: Expiration | null
_7
operator: string
_7
}
_7
}

revoke_all

Remove previously granted ApproveAll permission.

types.ts
Copy

_6
type ExecuteMsg =
_6
{
_6
revoke_all: {
_6
operator: string
_6
}
_6
}

QueryMsg

config

Queries the contracts configuration.

types.ts
Copy

_4
type QueryMsg =
_4
{
_4
config: {}
_4
}

next_id

Queries the next token ID.

types.ts
Copy

_4
type QueryMsg =
_4
{
_4
next_id: {}
_4
}

QueryMsg (cw721)

owner_of

Queries the owner of the given token, error if token does not exist.

types.ts
Copy

_7
type QueryMsg =
_7
{
_7
owner_of: {
_7
include_expired?: boolean | null
_7
token_id: string
_7
}
_7
}

approval

Queries the operator that can access all of the owner's tokens.

types.ts
Copy

_8
type QueryMsg =
_8
{
_8
approval: {
_8
include_expired?: boolean | null
_8
spender: string
_8
token_id: string
_8
}
_8
}

approvals

Queries approvals that a token has.

types.ts
Copy

_7
type QueryMsg =
_7
{
_7
approvals: {
_7
include_expired?: boolean | null
_7
token_id: string
_7
}
_7
}

all_operators

List all operators that can access all of the owner's tokens.

types.ts
Copy

_9
type QueryMsg =
_9
{
_9
all_operators: {
_9
include_expired?: boolean | null
_9
limit?: number | null
_9
owner: string
_9
start_after?: string | null
_9
}
_9
}

num_tokens

Total number of tokens issued.

types.ts
Copy

_4
type QueryMsg =
_4
{
_4
num_tokens: {}
_4
}

contract_info

Queries top-level metadata about the contract.

types.ts
Copy

_4
type QueryMsg =
_4
{
_4
contract_info: {}
_4
}

nft_info

Queries metadata about one particular token, based on ERC721 Metadata JSON Schema but directly from the contract.

types.ts
Copy

_6
type QueryMsg =
_6
{
_6
nft_info: {
_6
token_id: string
_6
}
_6
}

all_nft_info

Returns the result of both NftInfo and OwnerOf as one query as an optimization for clients.

types.ts
Copy

_7
export type QueryMsg =
_7
{
_7
all_nft_info: {
_7
include_expired?: boolean | null
_7
token_id: string
_7
}
_7
}

tokens

Queries all tokens owned by the given address, [] if unset.

types.ts
Copy

_8
type QueryMsg =
_8
{
_8
tokens: {
_8
limit?: number | null
_8
owner: string
_8
start_after?: string | null
_8
}
_8
}

all_tokens

Lists all token_ids controlled by the contract.

types.ts
Copy

_7
type QueryMsg =
_7
{
_7
all_tokens: {
_7
limit?: number | null
_7
start_after?: string | null
_7
}
_7
}

minter

Queries the minter.

types.ts
Copy

_4
type QueryMsg =
_4
{
_4
minter: {}
_4
}