Account NFT

The Account NFT Contract returns all Credit Account NFT infos and handles the minting and burning of Credit Accounts via the Credit Manager.

Deployments

Neutron: neutron184kvu96rqtetmunkkmhu5hru8yaqg7qfhd8ldu5avjnamdqu69squrh3f5

Osmosis: osmo1450hrg6dv2l58c0rvdwx8ec2a0r6dd50hn4frk370tpvqjhy8khqw7sw09


Types

The types of the Account NFT Contract can be found here.

For reference on the Queries and Methods:

Base Types
type Binary = string
type Uint128 = string
type Expiration =
  | {
      at_height: number
    }
  | {
      at_time: Timestamp
    }
  | {
      never: {}
    }

Queries

all_nft_info

Returns all NFT related infos for a the provided token_id.

Query message
{
    all_nft_info: {
        include_expired?: boolean | null
        token_id: string
    }
}
Return output
{
    data: {
        access: {
            approvals: [
                {
                      expires: Expiration
                      spender: string
                },
                ...
            ]
            owner: string
        }
        info: {
            extension: [k: string]: unknown
            token_uri?: string | null
        }
    }
}

all_operators

Query message
{
    all_operators: {
        include_expired?: boolean | null
        limit?: number | null
        owner: string
        start_after?: string | null
    }
}
Return output
{
    data: {
        operators: [
            {
                expires: Expiration
                spender: string
            },
            ...
        ]
    }
}

all_tokens

Query message
{
    all_tokens: {
        limit?: number | null
        start_after?: string | null
    }
}
Return output
{
    data: {
        tokens: string[]
    }
}

approvals

Query message
{
    approvals: {
        include_expired?: boolean | null
        token_id: string
    }
}
Return output
{
    data: {
        approvals: [
            {
                expires: Expiration
                spender: string
            },
            ...
        ]
    }
}

config

Query message
{
    config: {}
}
Return output
{
    data: {
        credit_manager_contract_addr?: string | null
        health_contract_addr?: string | null
        max_value_for_burn: Uint128
    }
}

contract_info

Query message
{
    contract_info: {}
}
Return output
{
    data: {
        name: string
        symbol: string
    }
}

minter

Query message
{
    minter: {}
}
Return output
{
    data: {
        minter: string
    }
}

next_id

Query message
{
    next_id: {}
}
Return output
{
    data: Uint128
}

nft_info

Query message
{
    nft_info: {
        token_id: string
    }
}
Return output
{
    data: {
        extension: [k: string]: unknown
        token_uri?: string | null
    }
}

num_tokens

Query message
{
    num_tokens: {}
}
Return output
{
    data: {
        count: number
    }
}

owner_of

Query message
{
    owner_of: {
        include_expired?: boolean | null
        token_id: string
    }
}
Return output
{
    data: {
        approvals: [
            {
                expires: Expiration
                spender: string
            },
            ...
        ]         
        owner: string
    }
}

ownership

Query message
{
    ownership: {}
}
Return output
{
    data: {
        owner: string
        pending_owner: Expiration | null
        pending_expiry: Addr | null
    }
}

tokens

Query message
{
    tokens: {
        limit?: number | null
        owner: string
        start_after?: string | null
    }
}
Return output
{
    data: {
        tokens: string[]
    }
}

Methods

The Account NFT methods can only be executed by the Credit Manager. The methods are therefore not a part of the documentation.

Last updated