Intents

NFT Transfer Estimate

Estimate gas for NFT transfer intent. For more details on NFT intents, see Understanding Intents. Refer to the NftTransfer Estimate API template script for implementation guidance.

POST
/api/oc/v1/estimate

Authorization

AuthorizationRequiredBearer <token>

In: header

Request Body

application/jsonRequired
typeRequiredstring
jobIdRequiredstring
gasDetailsRequiredobject
paymasterDataRequiredstring
detailsRequiredobject
curl -X POST "https://sandbox-api.okto.tech/api/oc/v1/estimate" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "NFT_TRANSFER",
    "jobId": "b9e16100-446f-4050-84ed-a846d2bae528",
    "gasDetails": {
      "maxFeePerGas": "0x2255100",
      "maxPriorityFeePerGas": "0x2255100"
    },
    "paymasterData": "0x0000000000000000000000006b6fad2600bc57075ee560a6fdf362ffefb9dc3c000000000000000000000000000000000000000000000000000000006d0db17b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004135a4864cbcbd0637eba6b680e81d5aa7065b6840f0d5a246662c6cc1717c2d9e36d5d8c49d06859f2966067222870d2c1b484962a5934b9c6f94e726f21dea7b1c00000000000000000000000000000000000000000000000000000000000000",
    "details": {
      "caip2Id": "eip155:137",
      "nftId": "b9e16100-446f-4050-84ed-a846d2bae528",
      "recipientWalletAddress": "0x6ABcD0428e3129a6110CC5dCcb4C1BfdA1b4D3C4",
      "collectionAddress": "0x68ee2dddcbb1c03df5fc4b6235d993b8b4d1d0e5",
      "amount": "1",
      "nftType": "ERC721"
    }
  }'

Fetched

{
  "status": "success",
  "data": {
    "callData": {
      "clientSWA": "0xe8201E368557508bF183D4e2DcE1b1A1E0bd20FA",
      "feePayerAddress": "",
      "gsn": {
        "isPossible": false,
        "isRequired": false,
        "requiredNetworks": [],
        "tokens": []
      },
      "intentType": "NFT_TRANSFER",
      "jobId": "b9e16100-446f-4050-84ed-a846d2bae528",
      "payload": {
        "caip2Id": "eip155:137",
        "nftId": "b9e16100-446f-4050-84ed-a846d2bae528",
        "recipientWalletAddress": "0x6ABcD0428e3129a6110CC5dCcb4C1BfdA1b4D3C4",
        "collectionAddress": "0x68ee2dddcbb1c03df5fc4b6235d993b8b4d1d0e5",
        "amount": "1",
        "nftType": "ERC721"
      },
      "policies": {
        "gsnEnabled": false,
        "sponsorshipEnabled": false
      },
      "userSWA": "0xd917DFbdA2Bd9EF9628DA4E55150f6559aF5b6ac"
    },
    "details": {
      "estimation": {
        "amount": "",
        "crossChainFee": "",
        "crossChainFeeCollector": "",
        "gasFeesInInputToken": "",
        "integratorFeesInInputToken": "",
        "outputAmount": "",
        "platformBaseFeesInInputToken": "",
        "recommendedSlippage": "",
        "routeId": "",
        "routeValidUntil": "",
        "sameChainFee": "",
        "sameChainFeeCollector": "",
        "slippageUsed": "",
        "totalFeesInInputToken": ""
      },
      "fees": {
        "approxTransactionFeesInUSDT": "",
        "transactionFees": {
          "eip155:84532": "177258950000"
        }
      },
      "swapFees": {
        "gasFeesInInputToken": "",
        "integratorFeesInInputToken": "",
        "platformBaseFeesInInputToken": "",
        "totalFeesInInputToken": ""
      }
    },
    "userOps": {
      "callData": "0x8dd7712f000000000000000000000000000000000000000000000000000000000000000000000000000000000543ad80b41c5f5956d34503668cdb965decb6170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000c6569703135353a383435333200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000817b2264617461223a223078222c2266726f6d223a22307841314239654242663539374633423861313843353433643362453332353343373335323444353634222c22746f223a22307838386265453865623639314646414642313932424143344431453730343265316234346333654632222c2276616c7565223a22307830227d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f5241575f5452414e53414354494f4e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "callGasLimit": "0x556a0",
      "maxFeePerGas": "0x2255100",
      "maxPriorityFeePerGas": "0x2255100",
      "nonce": "0x00000000000000000000000000000000e4fb7f8bd19d478594af4b911469a3b0",
      "paymaster": "0x74324fa6fa67b833dfdea4c1b3a9898574d076e3",
      "paymasterData": "0x000000000000000000000000e8201e368557508bf183d4e2dce1b1a1e0bd20fa00000000000000000000000000000000000000000000000000000000682c9763000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000041d0a1c5ff763012644af339e4b7d8c82478a8791f8e666f28153af520a82e390e2e39e853412beab41039d32cbd67102d10be45f4947e69c008e5e6661b8121c31c00000000000000000000000000000000000000000000000000000000000000",
      "paymasterPostOpGasLimit": "0x1",
      "paymasterVerificationGasLimit": "0x139bb",
      "preVerificationGas": "0x15867",
      "sender": "0xd917dfbda2bd9ef9628da4e55150f6559af5b6ac",
      "verificationGasLimit": "0x28488"
    }
  }
}