/* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CreateBnbAsset } from '../models/CreateBnbAsset'; import type { CreateXlmAsset } from '../models/CreateXlmAsset'; import type { CreateXrpAsset } from '../models/CreateXrpAsset'; import type { DeployAlgoErc20OffchainKMSAddress } from '../models/DeployAlgoErc20OffchainKMSAddress'; import type { DeployAlgoErc20OffchainMnemonicAddress } from '../models/DeployAlgoErc20OffchainMnemonicAddress'; import type { DeployAlgoErc20OffchainPKAddress } from '../models/DeployAlgoErc20OffchainPKAddress'; import type { DeployAlgoErc20Response } from '../models/DeployAlgoErc20Response'; import type { DeployAlgoErc20SignatureResponse } from '../models/DeployAlgoErc20SignatureResponse'; import type { DeployCeloErc20OffchainKMSAddress } from '../models/DeployCeloErc20OffchainKMSAddress'; import type { DeployCeloErc20OffchainKMSXpub } from '../models/DeployCeloErc20OffchainKMSXpub'; import type { DeployCeloErc20OffchainMnemonicAddress } from '../models/DeployCeloErc20OffchainMnemonicAddress'; import type { DeployCeloErc20OffchainMnemXpub } from '../models/DeployCeloErc20OffchainMnemXpub'; import type { DeployCeloErc20OffchainPKAddress } from '../models/DeployCeloErc20OffchainPKAddress'; import type { DeployCeloErc20OffchainPKXpub } from '../models/DeployCeloErc20OffchainPKXpub'; import type { DeployErc20OffchainKMSAddress } from '../models/DeployErc20OffchainKMSAddress'; import type { DeployErc20OffchainKMSXpub } from '../models/DeployErc20OffchainKMSXpub'; import type { DeployErc20OffchainMnemonicAddress } from '../models/DeployErc20OffchainMnemonicAddress'; import type { DeployErc20OffchainMnemXpub } from '../models/DeployErc20OffchainMnemXpub'; import type { DeployErc20OffchainPKAddress } from '../models/DeployErc20OffchainPKAddress'; import type { DeployErc20OffchainPKXpub } from '../models/DeployErc20OffchainPKXpub'; import type { DeployErc20Response } from '../models/DeployErc20Response'; import type { DeployErc20SignatureResponse } from '../models/DeployErc20SignatureResponse'; import type { DeployKCSErc20OffchainKMSAddress } from '../models/DeployKCSErc20OffchainKMSAddress'; import type { DeployKCSErc20OffchainKMSXpub } from '../models/DeployKCSErc20OffchainKMSXpub'; import type { DeployKCSErc20OffchainMnemonicAddress } from '../models/DeployKCSErc20OffchainMnemonicAddress'; import type { DeployKCSErc20OffchainMnemXpub } from '../models/DeployKCSErc20OffchainMnemXpub'; import type { DeployKCSErc20OffchainPKAddress } from '../models/DeployKCSErc20OffchainPKAddress'; import type { DeployKCSErc20OffchainPKXpub } from '../models/DeployKCSErc20OffchainPKXpub'; import type { DeployTrcOffchainKMSAddress } from '../models/DeployTrcOffchainKMSAddress'; import type { DeployTrcOffchainKMSXpub } from '../models/DeployTrcOffchainKMSXpub'; import type { DeployTrcOffchainMnemonicAddress } from '../models/DeployTrcOffchainMnemonicAddress'; import type { DeployTrcOffchainMnemXpub } from '../models/DeployTrcOffchainMnemXpub'; import type { DeployTrcOffchainPKAddress } from '../models/DeployTrcOffchainPKAddress'; import type { DeployTrcOffchainPKXpub } from '../models/DeployTrcOffchainPKXpub'; import type { Erc20 } from '../models/Erc20'; import type { Erc20Address } from '../models/Erc20Address'; import type { Erc20Response } from '../models/Erc20Response'; import type { OffchainTransactionResult } from '../models/OffchainTransactionResult'; import type { OffchainTransactionSignatureResult } from '../models/OffchainTransactionSignatureResult'; import type { TransferAdaKeyPair } from '../models/TransferAdaKeyPair'; import type { TransferAdaKMS } from '../models/TransferAdaKMS'; import type { TransferAdaMnemonic } from '../models/TransferAdaMnemonic'; import type { TransferAlgo } from '../models/TransferAlgo'; import type { TransferAlgoErc20 } from '../models/TransferAlgoErc20'; import type { TransferAlgoKMS } from '../models/TransferAlgoKMS'; import type { TransferBchKeyPair } from '../models/TransferBchKeyPair'; import type { TransferBchKMS } from '../models/TransferBchKMS'; import type { TransferBchMnemonic } from '../models/TransferBchMnemonic'; import type { TransferBnb } from '../models/TransferBnb'; import type { TransferBnbKMS } from '../models/TransferBnbKMS'; import type { TransferBsc } from '../models/TransferBsc'; import type { TransferBscKMS } from '../models/TransferBscKMS'; import type { TransferBscMnemonic } from '../models/TransferBscMnemonic'; import type { TransferBtcKeyPair } from '../models/TransferBtcKeyPair'; import type { TransferBtcKMS } from '../models/TransferBtcKMS'; import type { TransferBtcMnemonic } from '../models/TransferBtcMnemonic'; import type { TransferCelo } from '../models/TransferCelo'; import type { TransferCeloKMS } from '../models/TransferCeloKMS'; import type { TransferCeloMnemonic } from '../models/TransferCeloMnemonic'; import type { TransferDogeKeyPair } from '../models/TransferDogeKeyPair'; import type { TransferDogeKMS } from '../models/TransferDogeKMS'; import type { TransferDogeMnemonic } from '../models/TransferDogeMnemonic'; import type { TransferErc20 } from '../models/TransferErc20'; import type { TransferErc20KMS } from '../models/TransferErc20KMS'; import type { TransferErc20Mnemonic } from '../models/TransferErc20Mnemonic'; import type { TransferEth } from '../models/TransferEth'; import type { TransferEthKMS } from '../models/TransferEthKMS'; import type { TransferEthMnemonic } from '../models/TransferEthMnemonic'; import type { TransferFlowKMS } from '../models/TransferFlowKMS'; import type { TransferFlowMnemonic } from '../models/TransferFlowMnemonic'; import type { TransferFlowPK } from '../models/TransferFlowPK'; import type { TransferKCS } from '../models/TransferKCS'; import type { TransferKCSKMS } from '../models/TransferKCSKMS'; import type { TransferKCSMnemonic } from '../models/TransferKCSMnemonic'; import type { TransferLtcKeyPair } from '../models/TransferLtcKeyPair'; import type { TransferLtcKMS } from '../models/TransferLtcKMS'; import type { TransferLtcMnemonic } from '../models/TransferLtcMnemonic'; import type { TransferSol } from '../models/TransferSol'; import type { TransferSolKMS } from '../models/TransferSolKMS'; import type { TransferTron } from '../models/TransferTron'; import type { TransferTronKMS } from '../models/TransferTronKMS'; import type { TransferTronMnemonic } from '../models/TransferTronMnemonic'; import type { TransferXlm } from '../models/TransferXlm'; import type { TransferXlmKMS } from '../models/TransferXlmKMS'; import type { TransferXrp } from '../models/TransferXrp'; import type { TransferXrpKMS } from '../models/TransferXrpKMS'; import type { Trc } from '../models/Trc'; import type { CancelablePromise } from '../core/CancelablePromise'; import { request as __request } from '../core/request'; export class BlockchainOperationsService { /** * Send BTC from a virtual account to the blockchain *

2 credits per API call.


*

Send BTC (Bitcoin) from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

* There are two possibilites how the transaction on the blockchain can be created: * * It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This method is a helper method, which internally wraps these steps: *
    *
  1. Store withdrawal - create a ledger transaction, which debits the assets on the sender account.
  2. *
  3. Perform blockchain transaction -
  4. *
  5. Complete withdrawal - move the withdrawal to the completed state, when all of the previous steps were successful.
  6. *
* When some of the steps fails, Cancel withdrawal operation is used, which cancels withdrawal and creates refund transaction to the sender account. * This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages.

* * @param requestBody * @returns any OK * @throws ApiError */ public static btcTransfer( requestBody: (TransferBtcMnemonic | TransferBtcKeyPair | TransferBtcKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/bitcoin/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send BCH from a virtual account to the blockchain *

10 credits per API call.


*

Send BCH (Bitcoin Cash) from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

* There are two possibilites how the transaction on the blockchain can be created: * * It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This method is a helper method, which internally wraps these steps: *
    *
  1. Store withdrawal - create a ledger transaction, which debits the assets on the sender account.
  2. *
  3. Perform blockchain transaction -
  4. *
  5. Complete withdrawal - move the withdrawal to the completed state, when all of the previous steps were successful.
  6. *
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages.

* * @param requestBody * @returns any OK * @throws ApiError */ public static bchTransfer( requestBody: (TransferBchMnemonic | TransferBchKeyPair | TransferBchKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/bcash/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send LTC from a virtual account to the blockchain *

10 credits per API call.


*

Send LTC (Litecoin) from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

* There are two possibilites how the transaction on the blockchain can be created: * * It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This method is a helper method, which internally wraps these steps: *
    *
  1. Store withdrawal - create a ledger transaction, which debits the assets on the sender account.
  2. *
  3. Perform blockchain transaction -
  4. *
  5. Complete withdrawal - move the withdrawal to the completed state, when all of the previous steps were successful.
  6. *
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages.

* * @param requestBody * @returns any OK * @throws ApiError */ public static ltcTransfer( requestBody: (TransferLtcMnemonic | TransferLtcKeyPair | TransferLtcKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/litecoin/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send FLOW from a virtual account to the blockchain *

100 credits per API call. Tatum covers the fee connected to the transaction costs in subscription credits. This operation can be done on mainnet only for paid plans.


*

Send FLOW (Flow) or FUSD from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

* There are two possibilites how the transaction on the blockchain can be created: * * It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This method is a helper method, which internally wraps these steps: *
    *
  1. Store withdrawal - create a ledger transaction, which debits the assets on the sender account.
  2. *
  3. Perform blockchain transaction -
  4. *
  5. Complete withdrawal - move the withdrawal to the completed state, when all of the previous steps were successful.
  6. *
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages.

* * @param requestBody * @returns any OK * @throws ApiError */ public static flowTransfer( requestBody: (TransferFlowMnemonic | TransferFlowPK | TransferFlowKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/flow/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send DOGE from a virtual account to the blockchain *

4 credits per API call.


*

Send DOGE (Dogecoin) from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

* There are two possibilites how the transaction on the blockchain can be created: * * It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This method is a helper method, which internally wraps these steps: *
    *
  1. Store withdrawal - create a ledger transaction, which debits the assets on the sender account.
  2. *
  3. Perform blockchain transaction -
  4. *
  5. Complete withdrawal - move the withdrawal to the completed state, when all of the previous steps were successful.
  6. *
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages.

* * @param requestBody * @returns any OK * @throws ApiError */ public static dogeTransfer( requestBody: (TransferDogeMnemonic | TransferDogeKeyPair | TransferDogeKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/dogecoin/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send ETH from a virtual account to the blockchain *

4 credits per API call.


*

Send ETH (Ethereum) from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static ethTransfer( requestBody: (TransferEth | TransferEthMnemonic | TransferEthKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/ethereum/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send MATIC from a virtual account to the blockchain *

4 credits per API call.


*

Send MATIC (Polygon) or ERC-20-equivalent Polygon tokens from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static polygonTransfer( requestBody: (TransferEth | TransferEthMnemonic | TransferEthKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/polygon/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send KCS from a virtual account to the blockchain *

4 credits per API call.


*

Send KCS (KuCoin Community Chain (KCC)) or ERC-20-equivalent KCC tokens from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static kcsTransfer( requestBody: (TransferKCS | TransferKCSMnemonic | TransferKCSKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/kcs/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send Ethereum ERC-20 tokens from a virtual account to the blockchain *

4 credits per API call.


*

Send Ethereum ERC-20 tokens from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static ethTransferErc20( requestBody: (TransferErc20 | TransferErc20Mnemonic | TransferErc20KMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/ethereum/erc20/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * @deprecated * Register a new Ethereum ERC-20 token in the virtual account *

2 credits per API call.


*

This method is deprecated. Use Register token instead.

*

First step to create new ERC20 token with given supply on Ethereum blockchain with support of Tatum's private ledger.
* This method only creates Tatum Private ledger virtual currency with predefined parameters. It will not generate any blockchain smart contract.
* The whole supply of ERC20 token is stored in the customer's newly created account. Then it is possible to create new Tatum accounts with ERC20 token name as account's currency.
* Newly created account is frozen until the specific ERC20 smart contract address is linked with the Tatum virtual currency, representing the token.
* Order of the steps to create ERC20 smart contract with Tatum private ledger support: *

    *
  1. Create ERC20 token - creates a virtual currency within Tatum
  2. *
  3. Deploy ERC20 smart contract - create new ERC20 smart contract on the blockchain
  4. *
  5. Store ERC20 smart contract address - link newly created ERC20 smart contract address with Tatum virtual currency - this operation enables frozen account and enables ledger synchronization for ERC20 Tatum accounts
  6. *
* There is a helper method Deploy Ethereum ERC20 Smart Contract to Blockchain and Ledger, which wraps first 2 steps into 1 method.
* Address on the blockchain, where all initial supply will be transferred, can be defined via the address or xpub and derivationIndex. When xpub is present, the account connected to this virtualCurrency will be set as the account's xpub. *

* * @param requestBody * @returns Erc20Response OK * @throws ApiError */ public static createErc20( requestBody: (Erc20 | Erc20Address), ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/ethereum/erc20`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Deploy an Ethereum ERC-20 smart contract to the blockchain and a virtual account *

4 credits per API call.


*

Deploy an Ethereum ERC-20 smart contract. This is a helper method, which is combination of * Register new ERC20 token in the ledger and Deploy blockchain ERC20.
* After deploying a contract to blockchain, the contract address will become available and must be stored within Tatum. Otherwise, it will not be possible to interact with it and starts automatic blockchain synchronization.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static ethDeployErc20( requestBody: (DeployErc20OffchainMnemonicAddress | DeployErc20OffchainMnemXpub | DeployErc20OffchainPKAddress | DeployErc20OffchainPKXpub | DeployErc20OffchainKMSAddress | DeployErc20OffchainKMSXpub), ): CancelablePromise<(DeployErc20Response | DeployErc20SignatureResponse)> { return __request({ method: 'POST', path: `/v3/offchain/ethereum/erc20/deploy`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send BSC from a virtual account to the blockchain *

4 credits per API call.


*

Send BSC (BNB Smart Chain) or BEP-20 tokens from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *
*
*

* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static bscOrBepTransfer( requestBody: (TransferBsc | TransferBscMnemonic | TransferBscKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/bsc/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * @deprecated * Register a new BNB Smart Chain BEP-20 token in the virtual account *

2 credits per API call.


*

This method is deprecated. Use Register token instead.

*

First step to create new BEP20 token with given supply on BSC blockchain with support of Tatum's private ledger.
*
*
* This method only creates Tatum Private ledger virtual currency with predefined parameters. It will not generate any blockchain smart contract.
* The whole supply of BEP20 token is stored in the customer's newly created account. Then it is possible to create new Tatum accounts with BEP20 token name as account's currency.
* Newly created account is frozen until the specific BEP20 smart contract address is linked with the Tatum virtual currency, representing the token.
* Order of the steps to create BEP20 smart contract with Tatum private ledger support: *

    *
  1. Register BEP20 token - creates a virtual currency within Tatum
  2. *
  3. Deploy BEP20 smart contract - create new BEP20 smart contract on the blockchain
  4. *
  5. Store BEP20 smart contract address - link newly created BEP20 smart contract address with Tatum virtual currency - this operation enables frozen account and enables ledger synchronization for BEP20 Tatum accounts
  6. *
* There is a helper method Deploy BSC BEP20 Smart Contract to Blockchain and Ledger, which wraps first 2 steps into 1 method.
* Address on the blockchain, where all initial supply will be transferred, can be defined via the address or xpub and derivationIndex. When xpub is present, the account connected to this virtualCurrency will be set as the account's xpub. *

* * @param requestBody * @returns Erc20Response OK * @throws ApiError */ public static createBep20( requestBody: (Erc20 | Erc20Address), ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/bsc/bep20`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Deploy a BNB Smart Chain BEP-20 smart contract to the blockchain and a virtual account *

4 credits per API call.


*

Deploy a BNB Smart Chain BEP-20 smart contract. This is a helper method, which is combination of * Register new BEP20 token in the ledger and Deploy blockchain BEP20.
*
*
* After deploying a contract to blockchain, the contract address will become available and must be stored within Tatum. Otherwise, it will not be possible to interact with it and starts automatic blockchain synchronization.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static bscDeployBep20( requestBody: (DeployErc20OffchainMnemonicAddress | DeployErc20OffchainMnemXpub | DeployErc20OffchainPKAddress | DeployErc20OffchainPKXpub | DeployErc20OffchainKMSAddress | DeployErc20OffchainKMSXpub), ): CancelablePromise<(DeployErc20Response | DeployErc20SignatureResponse)> { return __request({ method: 'POST', path: `/v3/offchain/bsc/bep20/deploy`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send KLAY from a virtual account to the blockchain *

4 credits per API call.


*

Send KLAY or ERC-20-equivalent tokens from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *
*
*

* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static klayTransfer( requestBody: (TransferEth | TransferEthMnemonic | TransferEthKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/klaytn/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Deploy a Klaytn ERC-20-equivalent smart contract to the blockchain and a virtual account *

4 credits per API call.


*

Deploy a Klaytn ERC-20-equivalent smart contract. This is a helper method, which is combination of * Register new ERC20 token in the ledger and Deploy blockchain ERC20.
*
*
* After deploying a contract to blockchain, the contract address will become available and must be stored within Tatum. Otherwise, it will not be possible to interact with it and starts automatic blockchain synchronization.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static klayDeployErc20( requestBody: (DeployErc20OffchainMnemonicAddress | DeployErc20OffchainMnemXpub | DeployErc20OffchainPKAddress | DeployErc20OffchainPKXpub | DeployErc20OffchainKMSAddress | DeployErc20OffchainKMSXpub), ): CancelablePromise<(DeployErc20Response | DeployErc20SignatureResponse)> { return __request({ method: 'POST', path: `/v3/offchain/klaytn/erc20/deploy`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send XDC from a virtual account to the blockchain *

4 credits per API call.


*

Send XDC (XinFin) or ERC-20-equivalent XinFin tokens from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *
*
*

* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static xdcTransfer( requestBody: (TransferEth | TransferEthMnemonic | TransferEthKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/xdc/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * @deprecated * Register a new XinFin ERC-20-equivalent token in the virtual account *

2 credits per API call.


*

This method is deprecated. Use Register token instead.

*

First step to create new ERC20 token with given supply on XDC blockchain with support of Tatum's private ledger.
*
*
* This method only creates Tatum Private ledger virtual currency with predefined parameters. It will not generate any blockchain smart contract.
* The whole supply of ERC20 token is stored in the customer's newly created account. Then it is possible to create new Tatum accounts with ERC20 token name as account's currency.
* Newly created account is frozen until the specific ERC20 smart contract address is linked with the Tatum virtual currency, representing the token.
* Order of the steps to create ERC20 smart contract with Tatum private ledger support: *

    *
  1. Register ERC20 token - creates a virtual currency within Tatum
  2. *
  3. Deploy ERC20 smart contract - create new ERC20 smart contract on the blockchain
  4. *
  5. Store ERC20 smart contract address - link newly created ERC20 smart contract address with Tatum virtual currency - this operation enables frozen account and enables ledger synchronization for ERC20 Tatum accounts
  6. *
* There is a helper method Deploy XDC ERC20 Smart Contract to Blockchain and Ledger, which wraps first 2 steps into 1 method.
* Address on the blockchain, where all initial supply will be transferred, can be defined via the address or xpub and derivationIndex. When xpub is present, the account connected to this virtualCurrency will be set as the account's xpub. *

* * @param requestBody * @returns Erc20Response OK * @throws ApiError */ public static createXdc20( requestBody: (Erc20 | Erc20Address), ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/xdc/erc20`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Deploy a XinFin ERC-20-equivalent smart contract to the blockchain and a virtual account *

4 credits per API call.


*

Deploy a XinFin ERC-20-equivalent smart contract. This is a helper method, which is combination of * Register new ERC20 token in the ledger and Deploy blockchain ERC20.
*
*
* After deploying a contract to blockchain, the contract address will become available and must be stored within Tatum. Otherwise, it will not be possible to interact with it and starts automatic blockchain synchronization.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static xdcDeployErc20( requestBody: (DeployErc20OffchainMnemonicAddress | DeployErc20OffchainMnemXpub | DeployErc20OffchainPKAddress | DeployErc20OffchainPKXpub | DeployErc20OffchainKMSAddress | DeployErc20OffchainKMSXpub), ): CancelablePromise<(DeployErc20Response | DeployErc20SignatureResponse)> { return __request({ method: 'POST', path: `/v3/offchain/xdc/erc20/deploy`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send ONE from a virtual account to the blockchain *

4 credits per API call.


*

Send ONE (Harmony) or HRM-20 tokens from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *
*
*

    *
  • If ONE server connection is unavailable, withdrawal request is cancelled.
  • *
  • If blockchain transfer is successful, but is it not possible to reach Tatum, transaction id of blockchain transaction is returned and withdrawal request must be completed manually, otherwise all other withdrawals will be pending.
  • *
* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @param shardId Shard to operate on * @returns any OK * @throws ApiError */ public static oneTransfer( requestBody: (TransferEth | TransferEthMnemonic | TransferEthKMS), shardId?: number, ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/one/transfer`, query: { 'shardID': shardId, }, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * @deprecated * Register a new Harmony HRM-20 token in the virtual account *

2 credits per API call.


*

This method is deprecated. Use Register token instead.

*

First step to create new HRM20 token with given supply on ONE blockchain with support of Tatum's private ledger.
*
*
* This method only creates Tatum Private ledger virtual currency with predefined parameters. It will not generate any blockchain smart contract.
* The whole supply of HRM20 token is stored in the customer's newly created account. Then it is possible to create new Tatum accounts with HRM20 token name as account's currency.
* Newly created account is frozen until the specific HRM20 smart contract address is linked with the Tatum virtual currency, representing the token.
* Order of the steps to create HRM20 smart contract with Tatum private ledger support: *

    *
  1. Register HRM20 token - creates a virtual currency within Tatum
  2. *
  3. Deploy HRM20 smart contract - create new HRM20 smart contract on the blockchain
  4. *
  5. Store HRM20 smart contract address - link newly created HRM20 smart contract address with Tatum virtual currency - this operation enables frozen account and enables ledger synchronization for HRM20 Tatum accounts
  6. *
* There is a helper method Deploy ONE HRM20 Smart Contract to Blockchain and Ledger, which wraps first 2 steps into 1 method.
* Address on the blockchain, where all initial supply will be transferred, can be defined via the address or xpub and derivationIndex. When xpub is present, the account connected to this virtualCurrency will be set as the account's xpub. *

* * @param requestBody * @returns Erc20Response OK * @throws ApiError */ public static createHrm20( requestBody: (Erc20 | Erc20Address), ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/one/hrm20`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Deploy a Harmony HRM-20 smart contract to the blockchain and a virtual account *

4 credits per API call.


*

Deploy a Harmony HRM-20 smart contract. This is a helper method, which is combination of * Register new HRM20 token in the ledger and Deploy blockchain HRM20.
*
*
* After deploying a contract to blockchain, the contract address will become available and must be stored within Tatum. Otherwise, it will not be possible to interact with it and starts automatic blockchain synchronization.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @param shardId Shard to operate on * @returns any OK * @throws ApiError */ public static oneDeployHrm20( requestBody: (DeployErc20OffchainMnemonicAddress | DeployErc20OffchainMnemXpub | DeployErc20OffchainPKAddress | DeployErc20OffchainPKXpub | DeployErc20OffchainKMSAddress | DeployErc20OffchainKMSXpub), shardId?: number, ): CancelablePromise<(DeployErc20Response | DeployErc20SignatureResponse)> { return __request({ method: 'POST', path: `/v3/offchain/one/hrm20/deploy`, query: { 'shardID': shardId, }, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Register a new ERC-20 or ERC-20-equivalent token in the virtual account *

2 credits per API call.


*

This is the first step to create a new ERC-20 or ERC-20 equivalent token with some supply in a virtual account.
*
*
* This method only creates Tatum Private ledger virtual currency with predefined parameters. It will not generate any blockchain smart contract.
* The whole supply of token is stored in the customer's newly created account. Then it is possible to create new Tatum accounts with token name as account's currency.
* Newly created account is frozen until the specific smart contract address is linked with the Tatum virtual currency, representing the token.
* Order of the steps to create smart contract with Tatum private ledger support: *

    *
  1. Register token - creates a virtual currency within Tatum
  2. *
  3. Deploy smart contract - create new smart contract on the blockchain
  4. *
  5. Store smart contract address - link newly created smart contract address with Tatum virtual currency - this operation enables frozen account and enables ledger synchronization for Tatum accounts
  6. *
* Address on the blockchain, where all initial supply will be transferred, can be defined via the address or xpub and derivationIndex. When xpub is present, the account connected to this virtualCurrency will be set as the account's xpub. *

* * @param chain Blockchain to work with * @param requestBody * @returns Erc20Response OK * @throws ApiError */ public static registerErc20Token( chain: 'ETH' | 'CELO' | 'MATIC' | 'KCS' | 'BSC' | 'ONE' | 'XDC' | 'KLAY' | 'SOL', requestBody: (Erc20 | Erc20Address), ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/token/${chain}`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Set the contact address of an ERC-20 or ERC-20-equivalent token *

2 credits per API call.


*

Set the contact address of an ERC-20 or ERC-20-equivalent token (for example, BEP-20, HRM-20, and so on) to be able to communicate with the smart contract. *
*
*

After creating and deploying an ERC-20 or ERC-20-equivalent token to the blockchain, the smart contract address is generated and must be set within Tatum. If the address is not set, the Tatum platform will not be able to detect incoming deposits of the tokens and transfer the tokens from virtual accounts to blockchain addresses.

*

NOTE:For Algorand, the contact address should be the token asset ID (AssetID), for example, 55351976.

* * @param address Contract address * @param name Symbol name. * @returns void * @throws ApiError */ public static storeTokenAddress( address: string, name: string, ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/token/${name}/${address}`, errors: { 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.`, }, }); } /** * Send CELO from a virtual account to the blockchain *

4 credits per API call.


*

Send CELO (Celo), ERC-20-equivalent Celo tokens, cUSD, or cEUR from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *
*
*

    *
  • If Celo server connection is unavailable, withdrawal request is cancelled.
  • *
  • If blockchain transfer is successful, but is it not possible to reach Tatum, transaction id of blockchain transaction is returned and withdrawal request must be completed manually, otherwise all other withdrawals will be pending.
  • *
* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static celoOrErc20Transfer( requestBody: (TransferCelo | TransferCeloMnemonic | TransferCeloKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/celo/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * @deprecated * Register a new Celo ERC-20-equivalent token in the virtual account *

2 credits per API call.


*

This method is deprecated. Use Register token instead.

*

First step to create new ERC-20 token with given supply on Celo blockchain with support of Tatum's private ledger.
*
*
* This method only creates Tatum Private ledger virtual currency with predefined parameters. It will not generate any blockchain smart contract.
* The whole supply of ERC-20 token is stored in the customer's newly created account. Then it is possible to create new Tatum accounts with ERC-20 token name as account's currency.
* Newly created account is frozen until the specific ERC-20 smart contract address is linked with the Tatum virtual currency, representing the token.
* Order of the steps to create ERC-20 smart contract with Tatum private ledger support: *

    *
  1. Register Celo ERC-20 token - creates a virtual currency within Tatum
  2. *
  3. Deploy Celo ERC-20 smart contract - create new ERC-20 smart contract on the blockchain
  4. *
  5. Store Celo ERC-20 smart contract address - link newly created ERC-20 smart contract address with Tatum virtual currency - this operation enables frozen account and enables ledger synchronization for ERC-20 Tatum accounts
  6. *
* There is a helper method Deploy Celo ERC-20 Smart Contract to Blockchain and Ledger, which wraps first 2 steps into 1 method.
* Address on the blockchain, where all initial supply will be transferred, can be defined via the address or xpub and derivationIndex. When xpub is present, the account connected to this virtualCurrency will be set as the account's xpub. *

* * @param requestBody * @returns Erc20Response OK * @throws ApiError */ public static createCeloErc20( requestBody: (Erc20 | Erc20Address), ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/celo/erc20`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Deploy a Celo ERC-20-equivalent smart contract to the blockchain and a virtual account *

4 credits per API call.


*

Deploy a Celo ERC-20-equivalent smart contract. This is a helper method, which is combination of * Register new Celo ERC-20 token in the ledger and Deploy blockchain ERC-20.
*
*
* After deploying a contract to blockchain, the contract address will become available and must be stored within Tatum. Otherwise, it will not be possible to interact with it and starts automatic blockchain synchronization.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static celoDeployErc20Ledger( requestBody: (DeployCeloErc20OffchainMnemonicAddress | DeployCeloErc20OffchainMnemXpub | DeployCeloErc20OffchainPKAddress | DeployCeloErc20OffchainPKXpub | DeployCeloErc20OffchainKMSAddress | DeployCeloErc20OffchainKMSXpub), ): CancelablePromise<(DeployErc20Response | DeployErc20SignatureResponse)> { return __request({ method: 'POST', path: `/v3/offchain/celo/erc20/deploy`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Deploy a KuCoin Community Chain (KCC) ERC-20-equivalent smart contract to the blockchain and a virtual account *

4 credits per API call.


*

Deploy a KuCoin Community Chain (KCC) ERC-20-equivalent smart contract. This is a helper method, which is combination of * Register new Kcs ERC20 token in the ledger and Deploy blockchain ERC-20.
*
*
* After deploying a contract to blockchain, the contract address will become available and must be stored within Tatum. Otherwise, it will not be possible to interact with it and starts automatic blockchain synchronization.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static kcsDeployErc20Ledger( requestBody: (DeployKCSErc20OffchainMnemonicAddress | DeployKCSErc20OffchainMnemXpub | DeployKCSErc20OffchainPKAddress | DeployKCSErc20OffchainPKXpub | DeployKCSErc20OffchainKMSAddress | DeployKCSErc20OffchainKMSXpub), ): CancelablePromise<(DeployErc20Response | DeployErc20SignatureResponse)> { return __request({ method: 'POST', path: `/v3/offchain/kcs/erc20/deploy`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * @deprecated * Set the contact address of a Celo ERC-20-equivalent token *

2 credits per API call.


* This method is deprecated. Please use this method instead. * * @param address ERC-20 contract address * @param name ERC-20 symbol name. * @returns void * @throws ApiError */ public static storeCeloErc20Address( address: string, name: string, ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/celo/erc20/${name}/${address}`, errors: { 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.`, }, }); } /** * Send SOL from a virtual account to the blockchain *

10 credits per API call.


*

Send SOL (Solana), USDC_SOL, or custom SPL tokens from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. When every system works as expected, * withdrawal request is marked as complete and transaction id is assigned to it. *

    *
  • If SOL server connection is unavailable, withdrawal request is cancelled.
  • *
  • If blockchain transfer is successful, but is it not possible to reach Tatum, transaction id of blockchain transaction is returned and withdrawal request must be completed manually, otherwise all other withdrawals will be pending.
  • *
* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static solTransfer( requestBody: (TransferSol | TransferSolKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/solana/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send XLM from a virtual account to the blockchain *

10 credits per API call.


*

Send XLM (Stellar) or XLM-based assets from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. When every system works as expected, * withdrawal request is marked as complete and transaction id is assigned to it. *

    *
  • If XLM server connection is unavailable, withdrawal request is cancelled.
  • *
  • If blockchain transfer is successful, but is it not possible to reach Tatum, transaction id of blockchain transaction is returned and withdrawal request must be completed manually, otherwise all other withdrawals will be pending.
  • *
* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static xlmTransfer( requestBody: (TransferXlm | TransferXlmKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/xlm/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Create an XLM-based asset *

2 credits per API call.


*

Create an XLM-based asset in a virtual account. The asset must be created and configured on the Stellar blockchain before creating a trust line.

*

This API call will create an internal virtual currency. You can create virtual accounts with off-chain support.

* * @param requestBody * @returns void * @throws ApiError */ public static xlmAssetOffchain( requestBody: CreateXlmAsset, ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/xlm/asset`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send XRP from a virtual account to the blockchain *

10 credits per API call.


*

Send XRP (Ripple) from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. When every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

    *
  • If XRP server connection is unavailable, withdrawal request is cancelled.
  • *
  • If blockchain transfer is successful, but is it not possible to reach Tatum, transaction id of blockchain transaction is returned and withdrawal request must be * completed manually, otherwise all other withdrawals will be pending.
  • *
* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static xrpTransfer( requestBody: (TransferXrp | TransferXrpKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/xrp/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Create XRP based Asset *

2 credits per API call.


*

Create an XRP-based asset in a virtual account. The asset must be created and configured on the Ripple blockchain before creating a trust line.

*

This API call will create an internal virtual currency. You can create virtual accounts with off-chain support.

* * @param requestBody * @returns void * @throws ApiError */ public static xrpAssetOffchain( requestBody: CreateXrpAsset, ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/xrp/asset`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send BNB from a virtual account to the blockchain *

10 credits per API call.


*

Send BNB (BNB Beacon Chain) or BNB assets from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. When every system works as expected, * withdrawal request is marked as complete and transaction id is assigned to it. *

    *
  • If BNB server connection is unavailable, withdrawal request is cancelled.
  • *
  • If blockchain transfer is successful, but is it not possible to reach Tatum, transaction id of blockchain transaction is returned and withdrawal request must be * completed manually, otherwise all other withdrawals will be pending.
  • *
* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static bnbTransfer( requestBody: (TransferBnb | TransferBnbKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/bnb/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Create a BNB-based asset *

2 credits per API call.


*

Create a BNB-based asset in a virtual account. The asset must first be created and configured on BNB Beacon Chain blockhain.

*

This API call will create an internal virtual currency. You can create virtual accounts with off-chain support.

* * @param requestBody * @returns void * @throws ApiError */ public static bnbAssetOffchain( requestBody: CreateBnbAsset, ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/bnb/asset`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * @deprecated * Send ADA from a virtual account to the blockchain *

Support for Cardano is deprecated.


*

10 credits per API call.

Send ADA (Cardano) from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

    *
  • If ADA server connection is unavailable, withdrawal request is cancelled.
  • *
  • If blockchain transfer is successful, but is it not possible to reach Tatum, transaction id of blockchain transaction is returned and withdrawal request must be completed manually, otherwise all other withdrawals will be pending.
  • *
* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static adaTransferOffchain( requestBody: (TransferAdaKeyPair | TransferAdaMnemonic | TransferAdaKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/ada/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send TRON from a virtual account to the blockchain *

10 credits per API call.


Send TRON or TRX assets from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *

    *
  • If Tron server connection is unavailable, withdrawal request is cancelled.
  • *
  • If blockchain transfer is successful, but is it not possible to reach Tatum, transaction id of blockchain transaction is returned and withdrawal request must be completed manually, otherwise all other withdrawals will be pending.
  • *
* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static tronTransferOffchain( requestBody: (TransferTron | TransferTronMnemonic | TransferTronKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/tron/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Register a new TRON TRC-10 or TRC-20 token in the virtual account *

10 credits per API call.


*

First step to create new TRC 10/20 token with given supply on the Tron blockchain with support of Tatum's private ledger.
* This method only creates Tatum Private ledger virtual currency with predefined parameters. It will not generate any blockchain smart contract.
* The whole supply of TRC 10/20 token is stored in the customer's newly created account. Then it is possible to create new Tatum accounts with TRC 10/20 token name as account's currency.
* Newly created account is frozen until the specific TRC 10/20 smart contract address is linked with the Tatum virtual currency, representing the token.
* Order of the steps to create TRC 10/20 smart contract with Tatum private ledger support: *

    *
  1. Create TRC 10/20 token - creates a virtual currency within Tatum
  2. *
  3. Deploy TRC 10 or TRC 20 smart contract - create new TRC 10/20 smart contract on the blockchain
  4. *
  5. Store TRC 10/20 smart contract address - link newly created TRC 10/20 smart contract address with Tatum virtual currency - this operation enables frozen account and enables ledger synchronization for TRC 10/20 Tatum accounts
  6. *
* There is a helper method Deploy TRC 10/20 Smart Contract to Blockchain and Ledger, which wraps first 2 steps into 1 method.
* Address on the blockchain, where all initial supply will be transferred, can be defined via the address or xpub and derivationIndex. When xpub is present, the account connected to this virtualCurrency will be set as the account's xpub. *

* * @param requestBody * @returns Erc20Response OK * @throws ApiError */ public static createTrc( requestBody: Trc, ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/tron/trc`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Deploy a TRON TRC-10 or TRC-20 smart contract to the blockchain and a virtual account *

10 credits per API call.


*

Deploy a TRON TRC-10 or TRC-20 smart contract. This is a helper method, which is combination of * Register new TRC-10/20 token in the ledger and Deploy blockchain TRC20 or Deploy blockchain TRC10.
* After deploying a contract to blockchain, the contract address will become available and must be stored within Tatum. Otherwise, it will not be possible to interact with it and starts automatic blockchain synchronization.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static tronDeployTrc( requestBody: (DeployTrcOffchainMnemonicAddress | DeployTrcOffchainMnemXpub | DeployTrcOffchainPKAddress | DeployTrcOffchainPKXpub | DeployTrcOffchainKMSAddress | DeployTrcOffchainKMSXpub), ): CancelablePromise<(DeployErc20Response | DeployErc20SignatureResponse)> { return __request({ method: 'POST', path: `/v3/offchain/tron/trc/deploy`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * @deprecated * Set the contact address of a TRC-10 or TRC-20 token *

2 credits per API call.


* This method is deprecated. Please use this method instead. * * @param address TRC-10 Token ID or TRC-20 contract address * @param name TRC 10/20 symbol name. * @returns void * @throws ApiError */ public static storeTrcAddress( address: string, name: string, ): CancelablePromise { return __request({ method: 'POST', path: `/v3/offchain/tron/trc/${name}/${address}`, errors: { 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.`, }, }); } /** * Send EGLD from a virtual account to the blockchain *

4 credits per API call.


*

Send EGLD from a virtual account to the blockchain. This will create Tatum internal withdrawal request with ID. If every system works as expected, withdrawal request is marked as complete and transaction id is assigned to it. *
*
*

    *
  • If server connection is unavailable, withdrawal request is cancelled.
  • *
  • If blockchain transfer is successful, but is it not possible to reach Tatum, transaction id of blockchain transaction is returned and withdrawal request must be completed manually, otherwise all other withdrawals will be pending.
  • *
* It is possible to perform ledger to blockchain transaction for ledger accounts without blockchain address assigned to them.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static egldTransfer( requestBody: (TransferEth | TransferEthMnemonic | TransferEthKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/egld/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Deploy an Algorand ERC-20-equivalent smart contract to the blockchain and a virtual account *

4 credits per API call.


*

Deploy an Algorand ERC-20-equivalent smart contract. This is a helper method, which is combination of * Register new Algorand ERC20 token in the ledger and Deploy blockchain ERC-20.
*
*
* After deploying a contract to blockchain, the contract address will become available and must be stored within Tatum. Otherwise, it will not be possible to interact with it and starts automatic blockchain synchronization.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. * No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey * or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, * Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. * Alternatively, using the Tatum client library for supported languages. *

* * @param requestBody * @returns any OK * @throws ApiError */ public static algoDeployErc20Ledger( requestBody: (DeployAlgoErc20OffchainMnemonicAddress | DeployAlgoErc20OffchainPKAddress | DeployAlgoErc20OffchainKMSAddress), ): CancelablePromise<(DeployAlgoErc20Response | DeployAlgoErc20SignatureResponse)> { return __request({ method: 'POST', path: `/v3/offchain/algo/erc20/deploy`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } /** * Send Algos from a virtual account to the blockchain *

4 credits per API call

*

Send Algos or ERC-20-equivalent Algorand tokens from a virtual account (even from a virtual account without deposit addresses adssigned) to the Algorand blockchain.

*

The recipient has to agree in advance to receive assets because Algorand charges users for storing assets on their addresses, and an Algorand blockchain address by default does not receive assets unless explicitly agreed. Before sending any asset from a virtual account to the blockchain, make sure that the recipient has agreed to receive the assets to their address.

*

Sending Algorand assets creates an internal Tatum withdrawal request with an ID. If everything works as expected, the withdrawal request is marked as complete and a transaction ID is assigned to it.

*
    *
  • If a server connection is unavailable, the withdrawal request is cancelled.
  • *
  • If the transfer to the blockchain is successful, but the Tatum infrastructure cannot be accesses, the ID of the blockchain transaction is returned and you have to complete the withdrawal request manually. Otherwise, all other withdrawals will be pending.
  • *
*

Signing a transaction

*

When sending Algos or ERC-20-equivalent Algorand tokens, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.

*

Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.

*

For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.

* * @param requestBody * @returns any OK * @throws ApiError */ public static algoTransfer( requestBody: (TransferAlgo | TransferAlgoErc20 | TransferAlgoKMS), ): CancelablePromise<(OffchainTransactionResult | OffchainTransactionSignatureResult)> { return __request({ method: 'POST', path: `/v3/offchain/algorand/transfer`, body: requestBody, mediaType: 'application/json', errors: { 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.`, }, }); } }