Mints
The Mints APIs provide users the entries to mint the NFTs by calling the method in the ERC721 or ERC1155 contract.
Mint Actions
The Mints APIs provide three methods to help users mint NFTs, including the custom minting, minting with a file and minting with metadata.
Mint NFT
The Mint NFT
provides users with the entry to call the ERC721 or ERC1155 contract to mint the NFT. Users need to deploy their own contract firstly. If the network is Conflux_test
, set sponsor api
needs to be called beforing minting.
Mint a NFT by providing a metadata url
Bearer Open_JWT
POST /v1/mints/ HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 121
{
"amount": 1,
"chain": "conflux",
"contract_address": "text",
"metadata_uri": "text",
"mint_to_address": "text",
"token_id": "text"
}
{
"amount": 1,
"app_id": 1,
"block_reason": 1,
"chain_id": 1,
"chain_type": 1,
"contract": "text",
"contract_type": 1,
"created_at": "text",
"deleted_at": {
"time": "text",
"valid": true
},
"error": "text",
"hash": "text",
"id": 1,
"mint_to": "text",
"mint_type": 1,
"status": 1,
"token_id": "text",
"token_uri": "text",
"tx_id": 1,
"updated_at": "text"
}
Authorization
Bearer Token
Header
string
Batch Mint NFTs
The Batch Mint NFTs
API provides users with the entry to call the ERC721 or ERC1155 contract to mint several NFTs once.
Mint several NFTs once
Bearer Open_JWT
POST /v1/mints/customizable/batch HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 138
{
"chain": "conflux",
"contract_address": "text",
"mint_items": [
{
"amount": 1,
"metadata_uri": "text",
"mint_to_address": "text",
"token_id": "text"
}
]
}
[
{
"amount": 1,
"app_id": 1,
"block_reason": 1,
"chain_id": 1,
"chain_type": 1,
"contract": "text",
"contract_type": 1,
"created_at": "text",
"deleted_at": {
"time": "text",
"valid": true
},
"error": "text",
"hash": "text",
"id": 1,
"mint_to": "text",
"mint_type": 1,
"status": 1,
"token_id": "text",
"token_uri": "text",
"tx_id": 1,
"updated_at": "text"
}
]
Authorization
Bearer Token
Header
string
Mint NFT with file
The Mint NFT with file
API provides users with the entry to call the ERC721 or ERC1155 contract to mint the NFT with uploading files. The uploaded files can be images, video and so on.
Mint a NFT by uploading a file which can be a video, image and so on
Bearer Open_JWT
file
POST /v1/mints/easy/files HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 90
"chain='text'&description='text'&mint_to_address='text'&name='text'&file='text'"
{
"amount": 1,
"app_id": 1,
"block_reason": 1,
"chain_id": 1,
"chain_type": 1,
"contract": "text",
"contract_type": 1,
"created_at": "text",
"deleted_at": {
"time": "text",
"valid": true
},
"error": "text",
"hash": "text",
"id": 1,
"mint_to": "text",
"mint_type": 1,
"status": 1,
"token_id": "text",
"token_uri": "text",
"tx_id": 1,
"updated_at": "text"
}
Authorization
Bearer Token
Header
string
Mint NFT with metadata
The Mint NFT with metadata
provides users with the entry to call the ERC721 or ERC1155 contract to mint the NFT with creating metadata by providing a file url.
Mint a NFT by providing a file url to create the metadata
Bearer Open_JWT
POST /v1/mints/easy/urls HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 215
{
"animation_url": "text",
"attributes": [
{
"attribute_name": "text",
"display_type": "text",
"trait_type": "text",
"value": "text"
}
],
"chain": "text",
"description": "text",
"file_url": "text",
"mint_to_address": "text",
"name": "text"
}
{
"amount": 1,
"app_id": 1,
"block_reason": 1,
"chain_id": 1,
"chain_type": 1,
"contract": "text",
"contract_type": 1,
"created_at": "text",
"deleted_at": {
"time": "text",
"valid": true
},
"error": "text",
"hash": "text",
"id": 1,
"mint_to": "text",
"mint_type": 1,
"status": 1,
"token_id": "text",
"token_uri": "text",
"tx_id": 1,
"updated_at": "text"
}
Authorization
Bearer Token
Header
string
Obtain Informations
Obtain NFT list
The Obtain NFT list
API provides users with the entry to query the NFTs information created on a spcific app.
Get the NFT list containing the NFTs minted in the specified app Get the NFT list containing the NFTs minted in the specified app
page
limit
contract
mint_to
status
chain
Bearer Open_JWT
GET /v1/mints/ HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Accept: */*
{
"count": 1,
"items": [
{
"amount": 1,
"app_id": 1,
"block_reason": 1,
"chain_id": 1,
"chain_type": 1,
"contract": "text",
"contract_type": 1,
"created_at": "text",
"deleted_at": {
"time": "text",
"valid": true
},
"error": "text",
"hash": "text",
"id": 1,
"mint_to": "text",
"mint_type": 1,
"status": 1,
"token_id": "text",
"token_uri": "text",
"tx_id": 1,
"updated_at": "text"
}
]
}
Authorization
Bearer Token
Header
string
Query detailed NFT
The Query detailed NFT
API provides users with the entry to query the detailed NFT information created on a specific app according to the NFT's id.
Get NFT detail info
id
Bearer Open_JWT
GET /v1/mints/{id} HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Accept: */*
{
"amount": 1,
"app_id": 1,
"block_reason": 1,
"chain_id": 1,
"chain_type": 1,
"contract": "text",
"contract_type": 1,
"created_at": "text",
"deleted_at": {
"time": "text",
"valid": true
},
"error": "text",
"hash": "text",
"id": 1,
"mint_to": "text",
"mint_type": 1,
"status": 1,
"token_id": "text",
"token_uri": "text",
"tx_id": 1,
"updated_at": "text"
}
Authorization
Bearer Token
Header
string
Last updated