NFT
The nft API provide users the entries to interact with the NFTs.
Update NFT
Update NFT token uri
The Update NFT token uri API provides users to update the nft token uri according to the contract address and the token_id.
Update NFT token uri
address
token_id
Bearer Open_JWT
OK
Invalid request
PUT /v1/nft/{address}/{token_id}/tokenUri HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 63
{
  "chain": "conflux",
  "contract_type": "erc721",
  "token_uri": "text"
}{
  "block_reason": 1,
  "chainId": 1,
  "chainType": 1,
  "created_at": "text",
  "data": "text",
  "deleted_at": {
    "time": "text",
    "valid": true
  },
  "epochHeight": 1,
  "epoch_number": 1,
  "error": "text",
  "from": "text",
  "gas": 1,
  "gasCoveredBySponsor": true,
  "gasFee": 1,
  "gasPrice": 1,
  "hash": "text",
  "id": 1,
  "nonce": 1,
  "pending_reason": "text",
  "pre_hashs": "text",
  "stage": 1,
  "state": -10,
  "status": 1,
  "storageCollateralized": 1,
  "storageCoveredBySponsor": true,
  "storageLimit": 1,
  "taskType": 1,
  "to": "text",
  "tryReceiptCnt": 1,
  "updated_at": "text",
  "value": 1
}Authorization
Bearer Token
Header
string
token_id
The id of the nft
Path
string
address
The address of the contract
Path
string
token_uri
The updated token uri
body
string
contract_type
The type of the contract, which includes erc721 and erc1155
body
string
chain
The type of the chain, which includes conflux and conflux_test
body
string
created_at
The time of creating the item in the database
string
updated_at
The time of updating the item in the database
string
deleted_at
The time of deleting the item in the database
string
id
The id of the item in the database
integer
TaskType
The type of the item in the transaction. 1-deploy, 2-mint, 3-batch mint, 4-transfer, 5-batch transfer, 6-burn, 7-batch burn, 8-update admin, 9-sponsor balance, 10-sponsor privilege, 11-update token_uri
integer
ChainType
The type of the chain, 1-cfx, 2-eth
integer
ChainId
The type of the chain, 1-testnet, 1029-mainnet
integer
From
The sender of the transaction
string
To
The receiver of the transaction
string
Nonce
The nonce of the transaction
string
Value
The value of the transaction
string
Data
The data of the transaction
string
Hash
The hash of the transaction
string
State
The state of the transaction
integer
epoch_number
The epoch number of the transaction
integer
error
The error of the transaction
string
GasPrice
The gas price of the transaction
string
Gas
The used gas of the transaction
string
StorageLimit
The storage limit of the transaction
string
EpochHeight
The epoch height of the transaction
string
pending_reason
The pending reason of the transaction
string
{
    "id": 181295,
    "created_at": "2023-02-15T10:19:00.166+08:00",
    "updated_at": "2023-02-15T10:19:00.166+08:00",
    "deleted_at": null,
    "TaskType": 11,
    "ChainType": 1,
    "ChainId": 1,
    "From": "cfxtest:aanygt6awrrj1rv9jtctu763t3j6f9hh4p1xc4bkdd",
    "To": "cfxtest:acdggzx0r58uykdz19t42fyab92xmdk4g6vazyywns",
    "Nonce": 0,
    "Value": "0",
    "Data": "0x18e97fd100000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000d7777772e62616964752e636f6d00000000000000000000000000000000000000",
    "Hash": "",
    "State": 0,
    "epoch_number": 0,
    "error": "",
    "GasPrice": "0",
    "Gas": "0",
    "StorageLimit": "0",
    "EpochHeight": "0",
    "pending_reason": ""
}curl --request PUT \
  --url https://api.nftrainbow.cn/v1/nft/{address}/{token_id} \
  --header 'Authorization: Bearer {JWT}' \
  --header 'Content-Type: application/json'
  --data-raw '
  {
    "token_uri": "www.baidu.com",
    "contract_type": "erc1155",
    "chain": "conflux_test"
}'Query NFT
Query specific NFT of specific account
The Query specific NFT of specific account API provides users to get the nft information according to the contract address and the token_id.
Get NFT info, mainly owner and metadata
address
token_id
Bearer Open_JWT
OK
Invalid request
Internal Server error
GET /v1/nft/{address}/{token_id} HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Accept: */*
{
  "contract_address": "text",
  "owner": "text",
  "token_id": "text",
  "token_uri": "text"
}Authorization
Bearer Token
Header
string
token_id
The id of the nft
Path
string
address
The address of the contract
Path
string
type
The contract type: erc721, erc1155. Default is erc721
Query
string
owner
The owner of the NFT
string
contract_address
The address of the contract
string
token_id
The id of the token
string
{
    "owner": "cfxtest:aakkfzezns4h8ymx1cgmcnd4x3aev6e2he38nnu8sv",
    "contract_address": "cfxtest:acd8eue6shtzvnc7mts66hh88nvw2gtnaez6c4s1a5",
    "token_id": "17",
    "token_uri": "https://nftrainbow.cn/assets/1.json"
}curl --request GET \
  --url https://api.nftrainbow.cn/v1/nft/{address}/{token_id} \
  --header 'Authorization: Bearer {JWT}' \
  --header 'Content-Type: application/json'Query NFT Hold count
Last updated