NFT生成

createnft

新規NFTを生成します。

基本情報

リクエストパラメータ

blockchainパラメータに指定できるブロックチェーン

対応ブロックチェーンのページのネットワークの項目の名称をご指定ください。

blockchainパラメータで指定するブロックチェーンとコントラクト(contract_address)のブロックチェーンが一致する必要があります。

metadata

NFTのメタデータを定義します。ファイルアップロードが必要な項目は、file_fieldsに指定します。

メタデータに設定できる項目の数は、title, description, 各file_fields, 任意項目を合計して10個。

file_fields

file_fieldskey, urlのペアの配列です。

attribute

attributetag,valueのペアの配列です。

URLに指定したファイルがIPFSなどのストレージにアップロードされます。

リクエストのサンプル

{
  "contract_address": "0x0000000000000000000000000000000000000000",
  "blockchain": "polygon",
  "receiver_wallet_address": "0x1111111111111111111111111111111111111111",
  "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"
        }
      ]
    }
  ]
}

成功した場合のレスポンス例

{
  "message": "Create NFT request accepted",
  "requests": {
    "contract_address": "0x0000000000000000000000000000000000000000",
    "receiver_wallet_address": "0x1111111111111111111111111111111111111111",
    "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"
    }
  ]
}

失敗した場合のレスポンス例(ステータスコード400)

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

最終更新