---
title: "Generate a custodial wallet address"
method: POST
path: "/v3/blockchain/sc/custodial"
tags: ["Gas pump"]
deprecated: true
---

# Generate a custodial wallet address

`POST /v3/blockchain/sc/custodial`

## Request

- Base URL: `https://api.tatum.io`
- URL: `https://api.tatum.io/v3/blockchain/sc/custodial`
- Auth: API key in header `x-api-key`

> **Deprecated.**

/v3/blockchain/sc/custodial

**This API is deprecated.  
To start with the gas pump, use the [API for precalculating the gas pump addresses](#operation/PrecalculateGasPumpAddresses).**

**If you built your gas pump solution using this API and the [API for generating a gas pump wallet address](#operation/GenerateCustodialWalletBatch), you can still use this API for creating more custodial addresses for your solution. However, we recommend that you switch to the [API for precalculating the gas pump addresses](#operation/PrecalculateGasPumpAddresses)**.

  

**2 credits per API call**

Generate new gas pump smart contract address on the blockchain. It's possible to enable tokens, which should be detected and supported on that address. This address enables custodial providers to receive native assets, ERC20 / ERC721 / ERC1155 tokens on behalf of their customers on dedicated blockchain address, but in the same time it can initiate transfer of those assets away.

Gas required for the transfer from that address is going to be deducted from the providers address - the one, which was used to generate the address on the blockchain.

There are multiple options, how this address can be setup - it cannot be changed in the future:

*   Native assets only - ETH, BSC, CELO, MATIC, ONE, TRX
*   Native assets + ERC20 tokens
*   Native assets + ERC721 tokens
*   Native assets + ERC1155 tokens - TRON does not support 1155 standard
*   Native assets + ERC20 + ERC721 tokens
*   Native assets + ERC20 + ERC1155 tokens - TRON does not support 1155 standard
*   Native assets + ERC721 + ERC1155 tokens - TRON does not support 1155 standard
*   Native assets + ERC20 + ERC721 + ERC1155 tokens - TRON does not support 1155 standard

All of these options could be enabled with a batch mode as well - in 1 transaction, it is possible to transfer multiple different assets from that address, e.g. ETH + USDC + ERC721 token. Without batch mode, 3 separate transaction must have been performed.

This operation deploys a smart contract on the blockchain. More assets you will support, more intial gas will be used for address creation. Batch mode adds more gas for every type.

This API is supported for the following blockchains:

*   BNB Smart Chain
*   Celo
*   Ethereum
*   Harmony
*   Polygon
*   TRON (except for Multi Tokens)

## Request body

- union
  - GenerateCustodialWallet
    - `chain` 'ETH' | 'ONE' | 'BSC' | 'MATIC', required: Blockchain to work with.
    - `fromPrivateKey` string, required: Private key of account, from which the transaction will be initiated.
    - `enableFungibleTokens` boolean, required: If address should support ERC20 tokens, it should be marked as true.
    - `enableNonFungibleTokens` boolean, required: If address should support ERC721 tokens, it should be marked as true.
    - `enableSemiFungibleTokens` boolean, required: If address should support ERC1155 tokens, it should be marked as true.
    - `enableBatchTransactions` boolean, required: If address should support batch transfers of the assets, it should be marked as true.
    - `fee` object: Custom defined fee. If not present, it will be calculated automatically.
      - `gasLimit` string, required: Gas limit for transaction in gas price.
      - `gasPrice` string, required: Gas price in Gwei.
    - `nonce` number: The nonce to be set to the transaction; if not present, the last known nonce will be used
  - GenerateCustodialWalletKMS
    - `chain` 'ETH' | 'ONE' | 'BSC' | 'MATIC', required: Blockchain to work with.
    - `signatureId` string, uuid, required: Identifier of the private key associated in signing application. Private key, or signature Id must be present.
    - `index` number: If signatureId is mnemonic-based, this is the index to the specific address from that mnemonic.
    - `enableFungibleTokens` boolean, required: If address should support ERC20 tokens, it should be marked as true.
    - `enableNonFungibleTokens` boolean, required: If address should support ERC721 tokens, it should be marked as true.
    - `enableSemiFungibleTokens` boolean, required: If address should support ERC1155 tokens, it should be marked as true.
    - `enableBatchTransactions` boolean, required: If address should support batch transfers of the assets, it should be marked as true.
    - `fee` object: Custom defined fee. If not present, it will be calculated automatically.
      - `gasLimit` string, required: Gas limit for transaction in gas price.
      - `gasPrice` string, required: Gas price in Gwei.
    - `nonce` number: The nonce to be set to the transaction; if not present, the last known nonce will be used
  - GenerateCustodialWalletCelo
    - `chain` 'CELO', required: Blockchain to work with.
    - `feeCurrency` 'CELO' | 'CUSD' | 'CEUR': The currency in which the gas fee will be paid
    - `fromPrivateKey` string, required: Private key of account, from which the transaction will be initiated.
    - `enableFungibleTokens` boolean, required: If address should support ERC20 tokens, it should be marked as true.
    - `enableNonFungibleTokens` boolean, required: If address should support ERC721 tokens, it should be marked as true.
    - `enableSemiFungibleTokens` boolean, required: If address should support ERC1155 tokens, it should be marked as true.
    - `enableBatchTransactions` boolean, required: If address should support batch transfers of the assets, it should be marked as true.
    - `fee` CustomFee: The custom defined fee; if not present, will be calculated automatically
      - `gasPrice` string, required: The price for one gas unit (in Gwei)
      - `gasLimit` string, required: The maximum number of gas units that you are willing to spend on processing the transaction at the provided gas price
    - `nonce` number: The nonce to be set to the transaction; if not present, the last known nonce will be used
  - GenerateCustodialWalletCeloKMS
    - `chain` 'CELO', required: Blockchain to work with.
    - `feeCurrency` 'CELO' | 'CUSD' | 'CEUR': The currency in which the gas fee will be paid
    - `signatureId` string, uuid, required: Identifier of the private key associated in signing application. Private key, or signature Id must be present.
    - `index` number: If signatureId is mnemonic-based, this is the index to the specific address from that mnemonic.
    - `enableFungibleTokens` boolean, required: If address should support ERC20 tokens, it should be marked as true.
    - `enableNonFungibleTokens` boolean, required: If address should support ERC721 tokens, it should be marked as true.
    - `enableSemiFungibleTokens` boolean, required: If address should support ERC1155 tokens, it should be marked as true.
    - `enableBatchTransactions` boolean, required: If address should support batch transfers of the assets, it should be marked as true.
    - `fee` CustomFee: The custom defined fee; if not present, will be calculated automatically
      - `gasPrice` string, required: The price for one gas unit (in Gwei)
      - `gasLimit` string, required: The maximum number of gas units that you are willing to spend on processing the transaction at the provided gas price
    - `nonce` number: The nonce to be set to the transaction; if not present, the last known nonce will be used
  - GenerateCustodialWalletTron
    - `chain` 'TRON', required: Blockchain to work with.
    - `feeLimit` number, required: Fee in TRX to be paid.
    - `fromPrivateKey` string, required: Private key of account, from which the transaction will be initiated.
    - `enableFungibleTokens` boolean, required: If address should support ERC20 tokens, it should be marked as true.
    - `enableNonFungibleTokens` boolean, required: If address should support ERC721 tokens, it should be marked as true.
    - `enableSemiFungibleTokens` boolean, required: If address should support ERC1155 tokens, it should be marked as true. Not supported for TRON.
    - `enableBatchTransactions` boolean, required: If address should support batch transfers of the assets, it should be marked as true.
  - GenerateCustodialWalletTronKMS
    - `chain` 'TRON', required: Blockchain to work with.
    - `feeLimit` number, required: Fee in TRX to be paid.
    - `from` string, required: Sender address of TRON account in Base58 format.
    - `signatureId` string, uuid, required: Identifier of the private key associated in signing application. Private key, or signature Id must be present.
    - `index` number: If signatureId is mnemonic-based, this is the index to the specific address from that mnemonic.
    - `enableFungibleTokens` boolean, required: If address should support ERC20 tokens, it should be marked as true.
    - `enableNonFungibleTokens` boolean, required: If address should support ERC721 tokens, it should be marked as true.
    - `enableSemiFungibleTokens` boolean, required: If address should support ERC1155 tokens, it should be marked as true. Not supported for TRON.
    - `enableBatchTransactions` boolean, required: If address should support batch transfers of the assets, it should be marked as true.

## Response `200`

OK

- union
  - TransactionHash
    - `txId` string, required: The hash (ID) of the transaction
  - SignatureId
    - `signatureId` string, uuid, required: The internal Tatum ID of the prepared transaction for Key Management Sysytem (KMS) to sign<br/>This is different from the <code>signatureId</code> parameter that you provided in the request body. The <code>signatureId</code> parameter in the request body specifies the signature ID associated with the private key in KMS.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
- `403`: Forbidden. The request is authenticated, but it is not possible to perform the operation due to logical error or invalid permissions.
- `500`: Internal server error. There was an error on the server during the processing of the request.

---

[API](https://skmtc.dev/tatum/apis/smart-contracts.md) - [All operations](https://skmtc.dev/tatum/apis/smart-contracts/llms.txt) - [OpenAPI document](https://skmtc.dev/tatum/apis/smart-contracts/revisions/c0146043bb37?raw)
