NFT granted(mint + transfer)

createnfttrans

Mint a new NFT and transfer it at the same time.

Basic Information

Property
Detail

URL

/api/v1/createnfttrans

Method

POST

Request parameter

Parameter
Type
Required
Detail

contract_address

str

yes

Address of collection(contract)

blockchain

str

yes

Blockchain for minting NFTs

receiver_wallet_address

str

Yes

NFT forwarding destination owner

metadata

object

yes

NFT metadata

Blockchains that can be specified in the blockchain parameter

Please specify the name of the network item on the Supported blockchain page.

solana and solana-testnet are not supported.

The blockchain specified in the blockchain parameter must match the blockchain in the collection (contract_address).

metadata

Define NFT metadata. Items that require file upload are specified in file_fields.

Parameter
Type
Required
Detail

title

str

Yes

NFT title

description

str

Yes

NFT description

file_fields

list

Yes

Metadata items that require file upload, registered as key/url pairs (see below). Maximum of 8 items.

attribute

list

No

Properties to add to NFT

Optional item

str

No

Other metadata

The number of items that can be set in the metadata is 10 in total, including title, description, each file_fields, and optional items.

file_fields

file_fields is an array of key, url pairs.

Parameter
Type
Required
Detail

key

str

Yes

Metadata key

url

str

Yes

URL of the file to upload

attribute

attribute is an array of tag,value pairs.

Parameter
Type
Required
Detail

tag

str

Yes

Property Tags

value

str

Yes

Property Value

The file specified in the URL is uploaded to IPFS or other storage.

Sample requests

{
  "contract_address": "0x0000000000000000000000000000000000000000",
  "blockchain": "polygon",
  "receiver_wallet_address": "0x2222222222222222222222222222222222222222",
  "metadata": [
    {
      "title": "NFT Name1",
      "description": "Description of NFT1",
      "file_fields": [
        {
          "key": "image",
          "url": "https://my.nftgarden.app/image.png"
        }
    ],
      "attribute": [
        {
          "tag": "color",
          "value": "Red"
        }
      ]
    },
    {
      "title": "NFT Name2",
      "description": "Description of NFT2",
      "file_fields": [
        {
          "key": "image",
          "url": "https://my.nftgarden.app/image.png"
        }
      ]
    }
  ]
}

Example of successful response

{
  "message": "Create NFT request accepted",
  "requests": {
    "contract_address": "0x0000000000000000000000000000000000000000",
    "receiver_wallet_address": "0x2222222222222222222222222222222222222222",
    "metadata": [
      {
        "title": "NFT Name1",
        "description": "Description of NFT1",
        "file_fields": [
          {
            "key": "image",
            "url": "https://my.nftgarden.app/image.png"
          }
        ],
      "attribute": [
          {
            "tag": "color",
            "value": "Red"
          }
        ]
      },
      {
        "title": "NFT Name2",
        "description": "Description of NFT2",
        "file_fields": [
          {
            "key": "image",
            "url": "https://my.nftgarden.app/image.png"
          }
        ],
        "attribute": [
          {
            "tag": "color",
            "value": "Blue"
          }
        ]
      }
    ]
  },
  "nfts": [
    {
      "nft_gdn_ids": "cf7faf94-a5ec-462c-ad06-1bd772fefe21",
      "accepted_date": "2022-07-04 04:20:18"
    },
    {
      "nft_gdn_ids": "b27752b7-9803-4d28-b29f-9532ad0f0dbb",
      "accepted_date": "2022-07-04 04:20:18"
    }
  ]
}

Example of response in case of failure(status code 400)

{
  "error": {
    "title": "Bad Request",
    "message": "contract_address and blockchain are inconsistent"
  }
}

Last updated