Embedded Wallets
How to
Wallet Operation
Transfer Erc 721

Transfer ERC-721

API Documentation: Transfer ERC-721

Overview

This API endpoint allows you to transfer ERC-721 token from a blockchain network

  • HTTP Method: POST
  • Endpoint: /api/<VERSION>/wallet/transfer-erc721

Request Body Parameters

  • to (required): Recipient wallet address.
  • tokenId(required): Token id of the ERC-721 token user want to send.
  • tokenAddress (required): Address of the ERC-721 token user want to send.
  • network (required if chainId empty): The network used for transactions. You can see Networks Reference to get the network code.
  • chainId (required if network empty): The chain ID of the network used for transactions.
  • nonce (optional): The number used once to prevent duplicate transactions (this will be calculated automatically if not provided).
  • gasPrice (optional): Gas price in Wei (this will be calculated automatically if not provided).
  • gasLimit (optional): Gas limit for single transaction, transaction will be reverted if actual gas consumption is higher than gas limit (this will be calculated automatically if not provided).
  • maxFeePerGas (optional): Maximum fee per gas provided (this will be calculated automatically if not provided).
  • maxPriorityFeePerGas (optional): Maximum priority fee per gas you are willing to pay, this only used in EIP1559 support blockchain

Example Request Body

{
    "to": "0xBfE64B4b628E0998A03e2522B051Cf1B4661c964",
    "tokenId": "1",
    "tokenAddress": "0xA468651e0b4F7504aC6390dB567AE937F782d055",
    "network": "ethereum",
    "chainId": "1"
}

Request

Request Headers

  • Authorization (required): JWT token which was generated when user login and do not have an MPC wallet.
  • x-client-secret (required): Client secret which was generated when register in Xellar Embedded Wallet API Service Dashboard.

Example Request Syntax

curl -X POST -H "Content-Type: application/json" -H "x-client-secret: $YOUR_CLIENT_SECRET" -H "Authorization: Bearer $YOUR_ACCESS_TOKEN" -d '{
    "to": "0xBfE64B4b628E0998A03e2522B051Cf1B4661c964",
    "tokenId": "1",
    "tokenAddress": "0xA468651e0b4F7504aC6390dB567AE937F782d055",
    "network": "ethereum",
    "chainId": "1"
}' <BASE_URL>/api/<VERSION>/wallet/transfer-erc721

Response

The response will include a JSON object with the following properties:

  • status (number): The HTTP status code of the response (e.g., 200 for success).
  • message (string): A message providing additional information about the operation.
  • data (object): An object containing the transaction receipt data.

Example Response

{
    "status": 200,
    "message": "Transfer ERC721 token is processing",
    "data": {
        "txReceipt": {
            "_type": "TransactionReceipt",
            "accessList": null,
            "blockNumber": null,
            "blockHash": null,
            "chainId": "1",
            "data": "0x42842e0e000000000000000000000000b11858be587cab3d78c6ee6d1a66ed57819eb7130000000000000000000000009e79cdf3aba47f66451f175277b6fd732eb1a4c00000000000000000000000000000000000000000000000000000000000000000",
            "from": "0xBfE64B4b628E0998A03e2522B051Cf1B4661c964",
            "gasLimit": "62878",
            "gasPrice": "10000000000",
            "hash": "0xc6ec8d635b85d01d3c55b4c28e50833e89248998db7f25a5be5cc49fee460979",
            "maxFeePerGas": null,
            "maxPriorityFeePerGas": null,
            "nonce": 2,
            "signature": {
                "_type": "signature",
                "networkV": "230",
                "r": "0x48db5e659eb14e9f7116f65aaaa77931a0c66deb394adc41d581da0f6188d592",
                "s": "0x24defbadb35bcf0be14dac14c6053ad8f7f25ddd89b669bfba772316bfa446f7",
                "v": 28
            },
            "to": "0x9B9ef330B204bf33316FAf24E3Ed4FfCf57F02C3",
            "type": 0,
            "value": "0"
        }
    }
}