Manual Minting

Mint a token of a project manually with the API

This example shows you how you mint and send a random token of your project and also how to mint and send a specific token.

Mint and send random via API

To mint a token randomly selected out of your project to a specific wallet address, you are going to use the endpoint:

/v2/MintAndSendRandom

Curl

curl -X 'GET'
'https://studio-api.nmkr.io/v2/MintAndSendRandom/1420d55a-e194-4aa6-b57d-6d0f0d3b0738/1/addr1qxmrwr0sra35xjjdtugkasqqp2gsj969n6fdwt0fa6vxa5d98nu7s4l35sdwl6088e9f23ju7apk9hss7s9sgn3k9upqt2gwa8'
-H 'accept: text/plain'
-H 'Authorization: Bearer 1ac2cb0abea1xyzxyza90701dad311c'

There are basically just three things that need to be specified in the Curl to make this endpoint work; the UID of the project, the count of tokens and the address that receives the tokens.

Response

The response will now show you, that the token is reserved for minting. The mint and send jobs are written in a queue and processed in batches.

{
  "mintAndSendId": 189657,
  "sendedNft": [
    {
      "id": 13174323,on
      "uid": "a438d3bd-95be-4f3a-be19-1f3b44e7ded6",
      "name": "0002",
      "displayname": null,
      "detaildata": null,
      "ipfsLink": "ipfs://QmfA66piVcujJoSmL1fu1beJS2agvadXbzwv4hX4dnzqWY",
      "gatewayLink": "https://gw3.easy-ipfs.com/ipfs/QmfA66piVcujJoSmL1fu1beJS2agvadXbzwv4hX4dnzqWY",
      "state": "reserved",
      "minted": false,
      "policyId": null,
      "assetId": null,
      "assetname": null,
      "fingerprint": null,
      "initialMintTxHash": null,
      "series": null,
      "tokenamount": 0,
      "price": null,
      "selldate": null,
      "paymentGatewayLinkForSpecificSale": null
    }
  ]
}

Your token will now be processed within the next few moments. If you want to verify that the token is actually minted, please call the following endpoint:

/v2/GetNftDetailsById

This endpoint will respond with the state and some more details about the token.

Mint and send specific via API

The endpoint you are calling to mint and send a specific token of a project to a wallet address is:

/v2/MintAndSendSpecific

Curl

curl -X 'GET' \
  'https://studio-api.nmkr.io/v2/MintAndSendSpecific/1420d55a-e194-4aa6-b57d-6d0f0d3b0738/ef8b821c-56fc-497f-b5cd-b72c20e74510/1/addr1qxjylrcjy5vf2vvjzgm7v7lfccm3k86yxg2v0lgfgged94498nu7s4l35sdwl6088e9f23ju7apk9hss7s9sgn3k9upq6adfun' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer 1ac2cb0abea146f7bb8a90701dad311c'

In this Curl you are specifying the project UID, the token UID, the count and the receiver address.

Response

{
  "mintAndSendId": 189658,
  "sendedNft": [
    {
      "id": 13174322,
      "uid": "ef8b821c-56fc-497f-b5cd-b72c20e74510",
      "name": "0001",
      "displayname": null,
      "detaildata": null,
      "ipfsLink": "ipfs://QmfA66piVcujJoSmL1fu1beJS2agvadXbzwv4hX4dnzqWY",
      "gatewayLink": "https://gw3.easy-ipfs.com/ipfs/QmfA66piVcujJoSmL1fu1beJS2agvadXbzwv4hX4dnzqWY",
      "state": "reserved",
      "minted": false,
      "policyId": null,
      "assetId": null,
      "assetname": null,
      "fingerprint": null,
      "initialMintTxHash": null,
      "series": null,
      "tokenamount": 0,
      "price": null,
      "selldate": null,
      "paymentGatewayLinkForSpecificSale": null
    }
  ]
}

Your token will now be processed within the next few moments. If you want to verify that the token is actually minted, please call the following endpoint:

/v2/GetNftDetailsById

This endpoint will respond with the state and some more details about the token.

Last updated