Mass Minting

Mass Minting represents enterprise-grade, high-volume minting, allowing users to mint a large number of NFTs simultaneously.

Intro

Mass Minting allows you to mint a huge number of NFTs. You don't need to wait for the entire minting process to be completed before getting your response

This enhancement eradicates the risk of timeouts or lost connections arising from prolonged processing times or fluctuating gas fees. If a minting attempt fails, Venly will automatically resubmit the request, minimizing interruptions.

Mass Minting provides a substantial increase in throughput for NFT minting, guaranteeing you a quicker and smoother NFT-minting experience.

You can submit a token-type creation request or an NFT mint request and then track its status using a unique ID.

📘

NOTE: Mass minting endpoints can only be used on NFT v2. Click here to read how to migrate from NFT v1 to NFT v2.

Mass Minting Endpoints

We have introduced four new endpoints for Mass Minting. These endpoints can be used to:

  1. Create token-type
  2. Check the status of token-type creation
  3. Mint Fungible or Non-Fungible Tokens
  4. Check the status of the NFT mints

Prerequisites

📘

You can skip this part if you have a contract created through NFT v1. Make sure you have the contractAddress and secretType as they will be used in the create Token-type request.

1. Create a contract/collection

This endpoint is used to create a contract/collection on v2.

Request Endpoint: reference

POST /api/v2/contracts/deployments

Example Request

POST /api/v2/contracts/deployments
{
  "name": "NFT Collection",
  "symbol": "NFTC",
  "description": "Sample description",
  "image": "https://techround.co.uk/wp-content/uploads/2022/01/Venly-logo.png",
  "externalUrl": "www.venly.io",
  "storage": {
    "type": "IPFS"
  },
  "chain": "MATIC"
}

Response Body

📘

The result.id is the deploymentId and can be used to track the status of this contract creation request.

{
  "success": true,
  "result": {
    "name": "NFT Collection",
    "description": "Sample description",
    "id": "ec5fdbd8-ca5e-4cf1-94aa-843dcc4e0dcc",
    "secretType": "MATIC",
    "symbol": "NFTC",
    "externalUrl": "www.venly.io",
    "image": "https://techround.co.uk/wp-content/uploads/2022/01/Venly-logo.png",
    "media": [],
    "transactionHash": "0xa7f550773dd957f3d586cae27f1ed5142cd48c63888065b00cb25d1c50254c7a",
    "status": "PENDING",
    "storage": {
      "type": "ipfs",
      "location": "ipfs://QmTxV2QFBWy7iXnusuLA1qHZAFp5wK3jF8KTQCyvnn4x2T"
    },
    "contractUri": "ipfs://QmTxV2QFBWy7iXnusuLA1qHZAFp5wK3jF8KTQCyvnn4x2T",
    "external_link": "www.venly.io"
  }
}

2. Check the status of the contract/collection

This endpoint is used to check the status of a contract/collection on v2. The {deploymentId} in the path is for tracking the status of contract creation. It is in the response body of the create contract/collection endpoint as result.id.

Request Endpoint: reference

GET /api/v2/contracts/deployments/{deploymentId}

Example Request

GET /api/v2/contracts/deployments/ec5fdbd8-ca5e-4cf1-94aa-843dcc4e0dcc

Response Body

📘

In the response body look for the result.status parameter. It can have three possible values:

  • SUCCEEDED
  • PENDING
  • FAILED
{
  "success": true,
  "result": {
    "name": "NFT Collection",
    "description": "Sample description",
    "address": "0xe2a43584f37f9d4a8e446d2e38c37bde0405c75d",
    "id": "ec5fdbd8-ca5e-4cf1-94aa-843dcc4e0dcc",
    "secretType": "MATIC",
    "symbol": "NFTC",
    "externalUrl": "www.venly.io",
    "image": "https://techround.co.uk/wp-content/uploads/2022/01/Venly-logo.png",
    "media": [],
    "transactionHash": "0xa7f550773dd957f3d586cae27f1ed5142cd48c63888065b00cb25d1c50254c7a",
    "status": "SUCCEEDED",
    "storage": {
      "type": "ipfs",
      "location": "ipfs://QmTxV2QFBWy7iXnusuLA1qHZAFp5wK3jF8KTQCyvnn4x2T"
    },
    "contractUri": "ipfs://QmTxV2QFBWy7iXnusuLA1qHZAFp5wK3jF8KTQCyvnn4x2T",
    "external_link": "www.venly.io"
  }
}

Mass Minting Endpoints

1. Create a token-type

This endpoint is used to create a token-type and it accepts the request body parameters as an ARRAY.

The contractAddress and secretType (blockchain) is defined within the request body.

Request Endpoint: reference

POST /api/v2/token-types/creations

Example Request

POST /api/v2/token-types/creations
{
  "secretType": "MATIC",
  "contractAddress": "0xf5b11b4f458cc12a7989a146c5db2e7d500e2241",
  "creations": [
    {
      "name": "My first NFT Token-type",
      "description": "Venly",
      "image": "https://storage-qa.venly.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png"
    }
  ]
}

Response Body

📘

The result.creations.id is the creationId and can be used to track the status of this token-creation request.

{
  "success": true,
  "result": {
    "creations": [
      {
        "id": "45cf858a-cb0d-4e31-b6e1-b3bf4c65d014",
        "status": "PENDING",
        "tokenTypeId": 5,
        "metadata": {
          "name": "My first NFT Token-type",
          "description": "Venly",
          "image": "https://storage-qa.venly.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
          "imagePreview": "https://storage-qa.venly.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
          "imageThumbnail": "https://storage-qa.venly.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
          "animationUrls": [],
          "attributes": [
            {
              "type": "system",
              "name": "tokenTypeId",
              "value": "5",
              "traitType": "Token Type ID",
              "trait_type": "Token Type ID"
            }
          ],
          "contract": {
            "address": "0xf5b11b4f458cc12a7989a146c5db2e7d500e2241",
            "name": "Test",
            "symbol": "TE",
            "image": "string",
            "imageUrl": "string",
            "image_url": "string",
            "description": "Testing",
            "externalLink": "www.venly.io",
            "external_link": "www.venly.io",
            "externalUrl": "www.venly.io",
            "external_url": "www.venly.io",
            "media": [],
            "type": "ERC_1155"
          },
          "fungible": false
        }
      }
    ]
  }
}

2. Check the status of token-type

This endpoint is used to check the status of token-type creation. The {creationId} in the path is for tracking the status of token-type creation. It is in the response body of the create token-type endpoint as result.id.

Request Endpoint: reference

GET /api/v2/token-types/creations/{creationId}

Example Request

GET /api/v2/token-types/creations/45cf858a-cb0d-4e31-b6e1-b3bf4c65d014

Response Body

📘

In the response body look for the result.status parameter. It can have three possible values:

  • SUCCEEDED
  • PENDING
  • FAILED
{
  "success": true,
  "result": {
    "id": "45cf858a-cb0d-4e31-b6e1-b3bf4c65d014",
    "status": "SUCCEEDED",
    "transactionHash": "0xd8a7677dadfb308be606746d6fd522f9b3361a6e81c09f41ceabd7abb2593407",
    "tokenTypeId": 5,
    "mints": [],
    "metadata": {
      "name": "My first NFT Token-type",
      "description": "Venly",
      "image": "https://storage-qa.venly.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
      "imagePreview": "https://storage-qa.venly.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
      "imageThumbnail": "https://storage-qa.venly.io/applications/1f64ded9-2a05-4824-b682-661023359357/StickFigureHi.png",
      "animationUrls": [],
      "attributes": [
        {
          "type": "system",
          "name": "tokenTypeId",
          "value": "5",
          "traitType": "Token Type ID",
          "trait_type": "Token Type ID"
        }
      ],
      "contract": {
        "address": "0xf5b11b4f458cc12a7989a146c5db2e7d500e2241",
        "name": "Test",
        "symbol": "TE",
        "image": "string",
        "imageUrl": "string",
        "image_url": "string",
        "description": "Testing",
        "externalLink": "www.venly.io",
        "external_link": "www.venly.io",
        "externalUrl": "www.venly.io",
        "external_url": "www.venly.io",
        "media": [],
        "type": "ERC_1155"
      },
      "fungible": false
    }
  }
}

3. Mint NFTs

This endpoint is used to mint fungible or non-fungible tokens to wallet addresses. You can add multiple addresses as shown below. This is the capability of mass minting, you can mint multiple tokens to multiple wallet addresses simultaneously.

📘

NOTE: The contractAddress, secretType (blockchain), and the tokenTypeId are defined in the request body.

Request Endpoint: reference

POST /api/v2/tokens/mints

Example Request

POST /api/v2/tokens/mints
{
  "secretType": "MATIC",
  "contractAddress": "0xe2a43584f37f9d4a8e446d2e38c37bde0405c75d",
  "tokenTypeId": 1,
  "destinations": [
    {
      "address": "0xe2a43584f37f9d4a8e446d2e38c37bde0405c75d",
      "amount": 1
    },
    {
      "address": "0xc59cA37cefeDF61b998378d45386FBd8ed57cEC9",
      "amount": 2
    },
    {
      "address": "0xaFB11F991f9c7DDB62463e4E16e917d6f92e9337",
      "amount": 1
    },
    {
      "address": "0xaF16e917df9c7DD6f92e93B11F37991B62463e4E",
      "amount": 3
    }
  ]
}

Response Body

📘

The result.mints.id is the mintId and can be used to track the status of this NFT mint request.

{
  "success": true,
  "result": {
    "mints": [
      {
        "id": "0c1fca9d-37b2-4863-aac3-061a982801e5",
        "status": "PENDING",
        "destination": {
          "address": "0xe2a43584f37f9d4a8e446d2e38c37bde0405c75d",
          "amount": 1
        }
      },
      {
        "id": "1f142660-8fd8-47f4-8c43-cf4cb45e16a9",
        "status": "PENDING",
        "destination": {
          "address": "0xc59cA37cefeDF61b998378d45386FBd8ed57cEC9",
          "amount": 1
        }
      },
      {
        "id": "5934a7d6-ca41-423b-9510-31ef4fc9b328",
        "status": "PENDING",
        "destination": {
          "address": "0xc59cA37cefeDF61b998378d45386FBd8ed57cEC9",
          "amount": 1
        }
      },
      {
        "id": "36aac662-ef6c-4147-a5fc-79f76b0fdd13",
        "status": "PENDING",
        "destination": {
          "address": "0xaFB11F991f9c7DDB62463e4E16e917d6f92e9337",
          "amount": 1
        }
      },
      {
        "id": "f90c8eb6-e73d-428b-96e0-4a3bfe0a60be",
        "status": "PENDING",
        "destination": {
          "address": "0xaF16e917df9c7DD6f92e93B11F37991B62463e4E",
          "amount": 1
        }
      },
      {
        "id": "6ad3e3df-f2ae-43c0-ad56-3f030041c115",
        "status": "PENDING",
        "destination": {
          "address": "0xaF16e917df9c7DD6f92e93B11F37991B62463e4E",
          "amount": 1
        }
      },
      {
        "id": "ed7e88b2-4650-4673-8d2d-27fc52bd6656",
        "status": "PENDING",
        "destination": {
          "address": "0xaF16e917df9c7DD6f92e93B11F37991B62463e4E",
          "amount": 1
        }
      }
    ],
    "metadata": {
      "name": "Test Token-Type",
      "description": "Testing Token-Type",
      "image": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
      "imagePreview": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
      "imageThumbnail": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
      "backgroundColor": "#FFFFFF",
      "background_color": "#FFFFFF",
      "animationUrl": "https://assets-global.website-files.com/6347bd6199b204194ca76e2c/63a319d83d9abcf8d6dd3dd8_Product_wallet.webp",
      "animation_url": "https://assets-global.website-files.com/6347bd6199b204194ca76e2c/63a319d83d9abcf8d6dd3dd8_Product_wallet.webp",
      "externalUrl": "www.venly.io",
      "external_url": "www.venly.io",
      "animationUrls": [
        {
          "type": "image",
          "value": "https://assets-global.website-files.com/6347bd6199b204194ca76e2c/63a319d83d9abcf8d6dd3dd8_Product_wallet.webp"
        }
      ],
      "attributes": [
        {
          "type": "property",
          "name": "Reliability",
          "value": "100",
          "maxValue": "100",
          "traitType": "Reliability",
          "trait_type": "Reliability"
        },
        {
          "type": "system",
          "name": "tokenTypeId",
          "value": "1",
          "traitType": "Token Type ID",
          "trait_type": "Token Type ID"
        },
        {
          "type": "property",
          "name": "maxSupply",
          "value": "20",
          "traitType": "Max Supply",
          "trait_type": "Max Supply"
        }
      ],
      "contract": {
        "address": "0xe2a43584f37f9d4a8e446d2e38c37bde0405c75d",
        "name": "NFT Collection",
        "symbol": "NFTC",
        "image": "https://techround.co.uk/wp-content/uploads/2022/01/Venly-logo.png",
        "imageUrl": "https://techround.co.uk/wp-content/uploads/2022/01/Venly-logo.png",
        "image_url": "https://techround.co.uk/wp-content/uploads/2022/01/Venly-logo.png",
        "description": "Sample description",
        "externalLink": "www.venly.io",
        "external_link": "www.venly.io",
        "externalUrl": "www.venly.io",
        "external_url": "www.venly.io",
        "media": [],
        "type": "ERC_1155"
      },
      "fungible": false
    }
  }
}

4. Check the status of NFT mints

This endpoint is used to check the status of NFT mints. The {mintId} in the path is for tracking the status of the NFT mint. It is in the response body of the Mint Fungible or Non-Fungible Tokens endpoint as result.mints.id.

Request Endpoint: reference

GET /api/v2/tokens/mints/{mintId}

Example Request

GET /api/v2/tokens/mints/0c1fca9d-37b2-4863-aac3-061a982801e5

Response Body

📘

In the response body look for the result.status parameter. It can have three possible values:

  • SUCCEEDED
  • PENDING
  • FAILED
{
  "success": true,
  "result": {
    "id": "0c1fca9d-37b2-4863-aac3-061a982801e5",
    "tokenId": 2,
    "status": "SUCCEEDED",
    "transactionHash": "0xb5e3148575644a29fb6d4b41c7632a362811765cb1135d01791e53fcbccfdb76",
    "destination": {
      "address": "0xe2a43584f37f9d4a8e446d2e38c37bde0405c75d",
      "amount": 1
    },
    "metadata": {
      "name": "Test Token-Type",
      "description": "Testing Token-Type",
      "image": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
      "imagePreview": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
      "imageThumbnail": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
      "backgroundColor": "#FFFFFF",
      "background_color": "#FFFFFF",
      "animationUrl": "https://assets-global.website-files.com/6347bd6199b204194ca76e2c/63a319d83d9abcf8d6dd3dd8_Product_wallet.webp",
      "animation_url": "https://assets-global.website-files.com/6347bd6199b204194ca76e2c/63a319d83d9abcf8d6dd3dd8_Product_wallet.webp",
      "externalUrl": "www.venly.io",
      "external_url": "www.venly.io",
      "animationUrls": [
        {
          "type": "image",
          "value": "https://assets-global.website-files.com/6347bd6199b204194ca76e2c/63a319d83d9abcf8d6dd3dd8_Product_wallet.webp"
        }
      ],
      "attributes": [
        {
          "type": "property",
          "name": "Reliability",
          "value": "100",
          "maxValue": "100",
          "traitType": "Reliability",
          "trait_type": "Reliability"
        },
        {
          "type": "system",
          "name": "tokenTypeId",
          "value": "1",
          "traitType": "Token Type ID",
          "trait_type": "Token Type ID"
        },
        {
          "type": "property",
          "name": "maxSupply",
          "value": "20",
          "traitType": "Max Supply",
          "trait_type": "Max Supply"
        },
        {
          "type": "property",
          "name": "mintNumber",
          "value": "1",
          "traitType": "Mint Number",
          "trait_type": "Mint Number"
        }
      ],
      "contract": {
        "address": "0xe2a43584f37f9d4a8e446d2e38c37bde0405c75d",
        "name": "NFT Collection",
        "symbol": "NFTC",
        "image": "https://techround.co.uk/wp-content/uploads/2022/01/Venly-logo.png",
        "imageUrl": "https://techround.co.uk/wp-content/uploads/2022/01/Venly-logo.png",
        "image_url": "https://techround.co.uk/wp-content/uploads/2022/01/Venly-logo.png",
        "description": "Sample description",
        "externalLink": "www.venly.io",
        "external_link": "www.venly.io",
        "externalUrl": "www.venly.io",
        "external_url": "www.venly.io",
        "media": [],
        "type": "ERC_1155"
      },
      "fungible": false
    }
  }
}