Skip to main content Link Search Menu Expand Document (external link)

WIP

NFT Contract Queries

Table of contents
  1. NFT Contract Queries
    1. Token Number:
    2. All Tokens
    3. Tokens
    4. NFT Info
    5. Owner Of
    6. Pending Claims

Token Number:

Returns the total number of tokens in the contract.


        
  
{
  num_tokens: {}
}


      

        
  
{
  "num_tokens": {}
}


      

        
  
{
  "data": {
    "count": 100
  }
}


      

All Tokens

Returns the first ten tokens in the contract.


        
  
{
  all_tokens: {
    start_after: "",
    limit: 10
  }
}


      

        
  
{
  "all_tokens": {
    "start_after": "",
    "limit": 10
  }
}


      

        
  
{
  "data": {
    "tokens": [
      "1",
      "10",
      "100",
      "11",
      "12",
      "13",
      "14",
      "15",
      "16",
      "17"
    ]
  }
}


      

Tokens

Lists the first ten tokens owned by the specified address.


        
  
{
  tokens: {
    owner: "[owner]",
    start_after: "",
    limit: 10
  }
}


      

        
  
{
  "tokens": {
    "owner": "[owner]",
    "start_after": "",
    "limit": 10
  }
}


      

        
  
{
  "data": {
    "tokens": [
      "1",
      "10",
      "100",
      "11",
      "12",
      "13",
      "14",
      "15",
      "16",
      "17"
    ]
  }
}


      

NFT Info

Returns token info and number of shares assigned to the token.


        
  
{
  nft_info: {
    token_id: "[token id]"
  }
}


      

        
  
{
  "nft_info": {
    "token_id": "[token id]"
  }
}


      

        
  
{
  "data": {
    "token_uri": null,
    "extension": {
      "vault_shares": "1"
    }
  }
}


      

Owner Of

Returns the owner of a token.


        
  
{
  owner_of: {
    token_id: "[token id]"
  }
}


      

        
  
{
  "owner_of": {
    "token_id": "[token id]"
  }
}


      

        
  
{
  "data": {
    "owner": "terra17lmam6zguazs5q5u6z5mmx76uj63gldnse2pdp",
    "approvals": []
  }
}


      

Pending Claims

Returns pending claims that the owner of the NFT has from the claim contract.


        
  
{
  extension: {
    msg: {
      pending_claims: {
        claim_contract_addr: "[claim contract address]",
        owner_addr: "[NFT owner address]"
      }
    }
  }
}


      

        
  
{
  "extension": {
    "msg": {
      "pending_claims": {
        "claim_contract_addr": "[claim contract address]",
        "owner_addr": "[NFT owner address]"
      }
    }
  }
}


      

        
  
{
  "data": {
    "claims": []
  }
}