Gas pump

Generate custodial wallet addressDeprecated

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.
Supported blockchains:
  • Binance Smart Chain
  • Harmony.ONE
  • Ethereum
  • Celo
  • TRON - without 1155
  • Polygon (Matic)

SecurityX-API-Key
Request
Request Body schema: application/json
One of:
chain
required
string

Blockchain to work with.

Enum: "ETH" "ONE" "BSC" "MATIC"
fromPrivateKey
required
string = 66 characters

Private key of account, from which the transaction will be initiated.

enableFungibleTokens
required
boolean

If address should support ERC20 tokens, it should be marked as true.

enableNonFungibleTokens
required
boolean

If address should support ERC721 tokens, it should be marked as true.

enableSemiFungibleTokens
required
boolean

If address should support ERC1155 tokens, it should be marked as true.

enableBatchTransactions
required
boolean

If address should support batch transfers of the assets, it should be marked as true.

object

Custom defined fee. If not present, it will be calculated automatically.

gasLimit
required
string^[+]?\d+$

Gas limit for transaction in gas price.

gasPrice
required
string^[+]?\d+$

Gas price in Gwei.

nonce
number >= 0

Nonce to be set to the transaction. If not present, last known nonce will be used.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

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 required operation due to a logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/blockchain/sc/custodial
Request samples
application/json
{
  • "chain": "ETH",
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
  • "enableFungibleTokens": false,
  • "enableNonFungibleTokens": false,
  • "enableSemiFungibleTokens": false,
  • "enableBatchTransactions": false,
  • "fee": {
    },
  • "nonce": 0
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}

Generate gas pump wallet address

2 credits per API call.


Generate new gas pump smart contract address on the blockchain. 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.
This operation deploys a smart contract on the blockchain.
For paid plans, it is possible to pay for the gas costs - you don't have to provide private key or signatureId. Blockchain fees will be covered by your credits. Supported blockchains:

  • Ethereum
  • Binance Smart Chain
  • Celo
  • Polygon (Matic)
  • Klaytn
  • Harmony.ONE
  • XDC Network (XinFin)
  • Tron

SecurityX-API-Key
Request
header Parameters
x-testnet-type
string
Default: ethereum-ropsten

Type of Ethereum testnet. Defaults to ethereum-ropsten.

Enum: "ethereum-ropsten" "ethereum-rinkeby"
Request Body schema: application/json
One of:
chain
required
string

Blockchain to work with.

Enum: "ETH" "MATIC" "BSC" "ONE" "CELO"
feesCovered
required
boolean

If set to true, blockchain fees will be covered from credits.

batchCount
required
number >= 0

Number of addresses to generate.

owner
required
string [ 42 .. 43 ] characters

Owner of the addresses.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

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 required operation due to a logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/blockchain/sc/custodial/batch
Request samples
application/json
{
  • "chain": "MATIC",
  • "feesCovered": true,
  • "batchCount": 270,
  • "owner": "0x8cb76aed9c5e336ef961265c6079c14e9cd3d2ea"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}

Get gas pump addresses from transaction

1 credit per API call.


Get gas pump smart contract addresses from deploy transaction.

SecurityX-API-Key
Request
path Parameters
chain
required
string

Blockchain to work with

Enum: "CELO" "MATIC" "KLAY" "ETH" "ONE" "BSC"
hash
required
string

Transaction hash

Example: 0xe6e7340394958674cdf8606936d292f565e4ecc476aaa8b258ec8a141f7c75d7
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

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 required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/blockchain/sc/custodial/{chain}/{hash}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/blockchain/sc/custodial/{chain}/{hash}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • "0xc21C81ef03f98898Fb155E00C364e8a7b9D158b8"
]

Approve transfer of assets from gas pump wallet

2 credits per API call.


Approve transfer of assets from the gas pump smart contract wallet.
Supported blockchains:

  • Binance Smart Chain
  • Harmony.ONE
  • Ethereum
  • Klaytn
  • Celo
  • Harmony.ONE
  • XDC Network (XinFin)
  • Polygon (Matic)

SecurityX-API-Key
Request
Request Body schema: application/json
One of:
chain
required
string

Blockchain to work with.

Enum: "ETH" "ONE" "XDC" "BSC" "KLAY" "MATIC"
custodialAddress
required
string = 42 characters

Address of custodial wallet to transfer from

tokenAddress
string = 42 characters

Address of the token to transfer. Not valid for native address transfers.

contractType
required
number

Type of the asset to transfer. 0 - ERC20, 1 - ERC721, 2 - ERC1155

Enum: 0 1 2
spender
required
string = 42 characters

Blockchain address to allow spending.

amount
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount of the assets to be sent. Not valid for ERC-721 tokens.

tokenId
string <= 256 characters

ID of token, if transaction is for ERC-721 or ERC-1155.

fromPrivateKey
required
string = 66 characters

Private key of sender address. Private key, or signature Id must be present.

nonce
number

Nonce to be set to Ethereum transaction. If not present, last known nonce will be used.

object

Custom defined fee. If not present, it will be calculated automatically.

gasLimit
required
string^[+]?\d+$

Gas limit for transaction in gas price.

gasPrice
required
string^[+]?\d+$

Gas price in Gwei.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

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 required operation due to a logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/blockchain/sc/custodial/approve
Request samples
application/json
{
  • "chain": "ETH",
  • "custodialAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "tokenAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "contractType": 0,
  • "spender": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000",
  • "tokenId": "100000",
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
  • "nonce": 1,
  • "fee": {
    }
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}

Transfer assets from gas pump wallet

2 credits per API call.


Transfer assets from the gas pump smart contract wallet. Originator of this transaction must be the address which created the address. It's possible to transfer only 1 assets in 1 transaction.
Supported blockchains:

  • Binance Smart Chain
  • Harmony.ONE
  • Ethereum
  • Klaytn
  • Celo
  • TRON
  • XDC Network (XinFin)
  • Polygon (Matic)

SecurityX-API-Key
Request
Request Body schema: application/json
One of:
chain
required
string

Blockchain to work with.

Enum: "ETH" "ONE" "XDC" "BSC" "KLAY" "MATIC"
custodialAddress
required
string = 42 characters

Address of custodial wallet to transfer from

tokenAddress
string = 42 characters

Address of the token to transfer. Not valid for native address transfers.

contractType
required
number

Type of the asset to transfer. 0 - ERC20, 1 - ERC721, 2 - ERC1155, 3 - native asset

Enum: 0 1 2 3
recipient
required
string = 42 characters

Blockchain address to send assets to

amount
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount of the assets to be sent. Not valid for ERC-721 tokens.

tokenId
string <= 256 characters

ID of token, if transaction is for ERC-721 or ERC-1155.

fromPrivateKey
required
string = 66 characters

Private key of sender address. Private key, or signature Id must be present.

nonce
number

Nonce to be set to Ethereum transaction. If not present, last known nonce will be used.

object

Custom defined fee. If not present, it will be calculated automatically.

gasLimit
required
string^[+]?\d+$

Gas limit for transaction in gas price.

gasPrice
required
string^[+]?\d+$

Gas price in Gwei.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

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 required operation due to a logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/blockchain/sc/custodial/transfer
Request samples
application/json
{
  • "chain": "ETH",
  • "custodialAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "tokenAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "contractType": 0,
  • "recipient": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000",
  • "tokenId": "100000",
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
  • "nonce": 1,
  • "fee": {
    }
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}

Transfer multiple assets from gas pump wallet

2 credits per API call.


Transfer assets from the gas pump smart contract wallet. Originator of this transaction must be the address which created the address. It's possible to transfer any amount of different assets in 1 transaction, if the wallet was generated with the batch option enabled.
Supported blockchains:

  • Binance Smart Chain
  • Harmony.ONE
  • XDC Network (XinFin)
  • Ethereum
  • Klaytn
  • Celo
  • Tron
  • Polygon (Matic)

SecurityX-API-Key
Request
Request Body schema: application/json
One of:
chain
required
string

Blockchain to work with.

Enum: "ETH" "ONE" "BSC" "KLAY" "XDC" "MATIC"
custodialAddress
required
string = 42 characters

Address of custodial wallet to transfer from

tokenAddress
Array of strings

Addresses of the token to transfer. Not valid for native address transfers.

contractType
required
Array of numbers

Type of the asset to transfer. 0 - ERC20, 1 - ERC721, 2 - ERC1155, 3 - native asset

Items Enum: 0 1 2 3
recipient
required
Array of strings

Blockchain address to send assets to

amount
Array of strings

Amount of the assets to be sent. Not valid for ERC-721 tokens.

tokenId
Array of strings

ID of token, if transaction is for ERC-721 or ERC-1155.

fromPrivateKey
required
string = 66 characters

Private key of sender address. Private key, or signature Id must be present.

nonce
number

Nonce to be set to Ethereum transaction. If not present, last known nonce will be used.

object

Custom defined fee. If not present, it will be calculated automatically.

gasLimit
required
string^[+]?\d+$

Gas limit for transaction in gas price.

gasPrice
required
string^[+]?\d+$

Gas price in Gwei.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

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 required operation due to a logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/blockchain/sc/custodial/transfer/batch
Request samples
application/json
{
  • "chain": "ETH",
  • "custodialAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "tokenAddress": [
    ],
  • "contractType": [
    ],
  • "recipient": [
    ],
  • "amount": [
    ],
  • "tokenId": [
    ],
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
  • "nonce": 1,
  • "fee": {
    }
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}