API Wallet Setup

Master Wallet and Gas Wallet setup via API's

Step 1: Master Wallet Setup

Create a Master Wallet with Ethereum and Tron addresses via the CreateWallet API. All user deposits will be routed to this wallet.

curl --request POST \
     --url https://api.stage.waltrex.io/wallets/private/v1/wallets \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <token>' \
     --header 'content-type: application/json' \
     --header 'x-irs-csrf-token: <csrfToken>' \
     --data '
{
  "networks": [
    "networks/ethereum-mainnet",
    "networks/tron-mainnet"
  ],
  "externalUserId": "Master_wallet"
}
'

Response

{
    "data": {
        "id": "<wallet-id>",
        "externalUserId": "Master_wallet",
        "networks": [
            {
                "id": "networks/ethereum-mainnet",
                "network": {
                    "name": "networks/ethereum-mainnet",
                    "displayName": "Ethereum Mainnet",
                    "isCustom": false,
                    "isTestnet": false
                }
            },
            {
                "id": "networks/tron-mainnet",
                "network": {
                    "name": "networks/tron-mainnet",
                    "displayName": "Tron Mainnet",
                    "isCustom": false,
                    "isTestnet": false
                }
            }
        ],
        "balances": []
    }
}

Step 2: Gas Wallet Setup

Create a Gas Wallet with Ethereum and Tron addresses via the CreateWallet API . All gas costs will be cover by this wallet.

curl --request POST \
     --url https://api.stage.waltrex.io/wallets/private/v1/wallets \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <token>' \
     --header 'content-type: application/json' \
     --header 'x-irs-csrf-token: <csrfToken>' \
     --data '
{
  "networks": [
    "networks/ethereum-mainnet",
    "networks/tron-mainnet"
  ],
  "externalUserId": "Gas_wallet"
}
'

Response

{
    "data": {
        "id": "<wallet-id>",
        "externalUserId": "Gas_wallet",
        "networks": [
            {
                "id": "networks/ethereum-mainnet",
                "network": {
                    "name": "networks/ethereum-mainnet",
                    "displayName": "Ethereum Mainnet",
                    "isCustom": false,
                    "isTestnet": false
                }
            },
            {
                "id": "networks/tron-mainnet",
                "network": {
                    "name": "networks/tron-mainnet",
                    "displayName": "Tron Mainnet",
                    "isCustom": false,
                    "isTestnet": false
                }
            }
        ],
        "balances": []
    }
}

Step 3: Get Ethereum and Tron addresses for each Wallet

Get the Ethereum and Tron addresses for Master Wallet and Gas Wallet via the GetWalletAddresses API.

curl --request GET \
     --url https://api.stage.waltrex.io/wallets/private/v1/wallets/<wallet-id>/addresses \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <token>' \
     --header 'x-irs-csrf-token: <csrfToken>'

Response

{
  "data": [
    {
      "id": "<wallet-id>",
      "address": "<address>",
      "network": {
        "name": "networks/ethereum-mainnet",
        "displayName": "Ethereum Mainnet",
        "isCustom": false,
        "isTestnet": false
      },
      "balances": []
    },
    {
      "id": "<wallet-id>",
      "address": "<address>",
      "network": {
        "name": "networks/tron-mainnet",
        "displayName": "Tron Mainnet",
        "isCustom": false,
        "isTestnet": false
      },
      "balances": []
    }
  ],
  "pagination": {
    "totalRecord": 2,
    "totalPage": 1,
    "offset": 0,
    "limit": 10,
    "pageNumber": 1
  }
}

Step 4: Share Your Wallet Addresses with Your Waltrex Contact

To complete your account setup, please provide the addresses of the whitelisted wallets you’ve created.