Send generic transactions on Aptos

Send generic transactions

POST /unity/txn2

This endpoint allows the user to send generic transactions on the Aptos blockchain, including transferring tokens, interacting with smart contracts, or any other custom transaction type. Users must provide the necessary transaction details, such as the contract address, contract name, function name, arguments, and parameters for smart contract interactions.

Headers

Body

Response

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

Example Request Body

{
  "network": 2,
  "contractName": "LyncNFTCollection721A",
  "contractAddress": "0x55a5d8e2588d84ef1e9dbe4e8fba38ab0cd2cc54c35987856caece4d971c3ff5",
  "functionName": "mint_nft",
  "privateAddress": "0x55a5d8e2588d84ef1e9dbe4e8fba38ab0cd2cc54c35987856caece4d971c3ff5",
  "arguments": [
    {
      "argument": "1",
      "type": 1 // (string: 0, number: 1, byte_array: 3, signature: 4)
    },
  ],
  "usePaymaster": true,
}

Last updated