Mint NFT transactions

Mint NFT transactions

POST /unity/mint-nft

This endpoint facilitates the minting of a new Non-Fungible Token (NFT) on the Aptos blockchain. Users can mint a new NFT by specifying some contract information, such as the contract address, contract name, function name, arguments, and other properties. This endpoint requires api key authentication and the necessary transaction parameters, including the wallet address initiating the minting process.

Headers

NameValue

Content-Type

application/json

x-api-key

Your_X_API_Key

Body

NameTypeDescription

contractAddress

string

Contract address

contractName

string

Name of contract

functionName

string

Function you want to do mint transaction on

privateAddress

string

User's private key

publicAddress

string

User's account address

arguments

Array of objects

Object of { argument: string, type: number } If the function accepts any arguments

network

number

1 or 2 (1 for Mainnet & 2 for Testnet)

usePaymaster

boolean

true to sponsor the transaction or false if user pays for the transaction

apiKey

string

Your api key generated from official website of Lync

Response

{
  "success": true,
  "status": 200,
  "message": "success",
  "data": {
    "transactionHash": "<transaction hash of successfull mint transaction>",
  }
}

Example Request Body

{
  "network": 2,
  "contractName": "LyncCards",
  "contractAddress": "0x4bb424eb03c0105e44e42a07294a7c9ed78b75942549b02844892401b578d150",
  "functionName": "mint_nft",
  "privateAddress": "0x9e568d375d7dc88dcb58577a4167b11e559b3fed222f91383518e58f8565f353",
  "publicAddress": "0x41e019155a0916372341bcdb684b6e571b68563f933c3139deae6a9fac3fc38b", 
  "arguments": [
    {
      "argument": "1",
      "type": 1 // (string: 0, number: 1, byte_array: 3, signature: 4)
    },
    {
      "argument": "2",
      "type": 1 // (string: 0, number: 1, byte_array: 3, signature: 4)
    }
  ],
  "usePaymaster": true, 
  "apiKey": "B30D905974544D082BFEA8A727534195",
}

Last updated