/* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { ApproveCeloErc20 } from '../models/ApproveCeloErc20'; import type { ApproveCeloErc20KMS } from '../models/ApproveCeloErc20KMS'; import type { ApproveErc20 } from '../models/ApproveErc20'; import type { ApproveErc20KMS } from '../models/ApproveErc20KMS'; import type { ChainBurnCeloErc20 } from '../models/ChainBurnCeloErc20'; import type { ChainBurnCeloErc20KMS } from '../models/ChainBurnCeloErc20KMS'; import type { ChainBurnErc20 } from '../models/ChainBurnErc20'; import type { ChainBurnErc20KMS } from '../models/ChainBurnErc20KMS'; import type { ChainBurnKcsErc20 } from '../models/ChainBurnKcsErc20'; import type { ChainBurnKcsErc20KMS } from '../models/ChainBurnKcsErc20KMS'; import type { ChainDeployCeloErc20 } from '../models/ChainDeployCeloErc20'; import type { ChainDeployCeloErc20KMS } from '../models/ChainDeployCeloErc20KMS'; import type { ChainDeployErc20 } from '../models/ChainDeployErc20'; import type { ChainDeployErc20KMS } from '../models/ChainDeployErc20KMS'; import type { ChainDeployKcsErc20 } from '../models/ChainDeployKcsErc20'; import type { ChainDeployKcsErc20KMS } from '../models/ChainDeployKcsErc20KMS'; import type { ChainDeploySolanaSpl } from '../models/ChainDeploySolanaSpl'; import type { ChainDeploySolanaSplKMS } from '../models/ChainDeploySolanaSplKMS'; import type { ChainMintCeloErc20 } from '../models/ChainMintCeloErc20'; import type { ChainMintCeloErc20KMS } from '../models/ChainMintCeloErc20KMS'; import type { ChainMintErc20 } from '../models/ChainMintErc20'; import type { ChainMintErc20KMS } from '../models/ChainMintErc20KMS'; import type { ChainMintKcsErc20 } from '../models/ChainMintKcsErc20'; import type { ChainMintKcsErc20KMS } from '../models/ChainMintKcsErc20KMS'; import type { ChainTransferAlgoErc20 } from '../models/ChainTransferAlgoErc20'; import type { ChainTransferAlgoErc20KMS } from '../models/ChainTransferAlgoErc20KMS'; import type { ChainTransferBscBep20 } from '../models/ChainTransferBscBep20'; import type { ChainTransferBscBep20KMS } from '../models/ChainTransferBscBep20KMS'; import type { ChainTransferCeloErc20Token } from '../models/ChainTransferCeloErc20Token'; import type { ChainTransferCeloErc20TokenKMS } from '../models/ChainTransferCeloErc20TokenKMS'; import type { ChainTransferEthErc20 } from '../models/ChainTransferEthErc20'; import type { ChainTransferEthErc20KMS } from '../models/ChainTransferEthErc20KMS'; import type { ChainTransferKcsEthErc20 } from '../models/ChainTransferKcsEthErc20'; import type { ChainTransferKcsEthErc20KMS } from '../models/ChainTransferKcsEthErc20KMS'; import type { ChainTransferSolanaSpl } from '../models/ChainTransferSolanaSpl'; import type { ChainTransferSolanaSplKMS } from '../models/ChainTransferSolanaSplKMS'; import type { FungibleTx } from '../models/FungibleTx'; import type { SignatureId } from '../models/SignatureId'; import type { TransactionHash } from '../models/TransactionHash'; import type { CancelablePromise } from '../core/CancelablePromise'; import { request as __request } from '../core/request'; export class FungibleTokensErc20OrCompatibleService { /** * Deploy a fungible token smart contract *
2 credits per API call
*Deploy a fungible token smart contract on the blockchain. In a deployed smart contract, you can mint and burn fungible tokens. The whole supply of fungible tokens (the supply parameter in the request body) will be transferred to the specified blockchain address (the address parameter in the request body).
* Smart contracts are standardized and audited.
This API is supported for the following blockchains:
*You can review the code of a deployed smart contract here.
*Signing a transaction
*When deploying a fungible token smart contract, 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 * @param xTestnetType Type of Ethereum testnet. Defaults to Sepolia. Valid only for ETH invocations for testnet API Key. For mainnet API Key, this value is ignored. * @returns any OK * @throws ApiError */ public static erc20Deploy( requestBody: (ChainDeployErc20 | ChainDeploySolanaSpl | ChainDeployCeloErc20 | ChainDeployKcsErc20 | ChainDeployErc20KMS | ChainDeploySolanaSplKMS | ChainDeployCeloErc20KMS | ChainDeployKcsErc20KMS), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/blockchain/token/deploy`, headers: { 'x-testnet-type': xTestnetType, }, 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 during the processing of the request.`, }, }); } /** * Mint fungible tokens *2 credits per API call
*Create new fungible tokens in the smart contract (the contractAddress parameter in the request body) and transfer them to the specified blockchain address (the to parameter in the request body). You can mint new fungible tokens only if the current supply of tokens in the smart contract is lower than the total supply set for this contract.
This API is supported for the following blockchains:
*Signing a transaction
*When minting fungible 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 * @param xTestnetType Type of Ethereum testnet. Defaults to Sepolia. Valid only for ETH invocations for testnet API Key. For mainnet API Key, this value is ignored. * @returns any OK * @throws ApiError */ public static erc20Mint( requestBody: (ChainMintErc20 | ChainMintErc20KMS | ChainMintKcsErc20 | ChainMintKcsErc20KMS | ChainMintCeloErc20 | ChainMintCeloErc20KMS), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/blockchain/token/mint`, headers: { 'x-testnet-type': xTestnetType, }, 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 during the processing of the request.`, }, }); } /** * Burn fungible tokens *2 credits per API call
*Burn fungible tokens. Burning fungible tokens deletes the specified supply of the tokens (the amount parameter in the request body) from the smart contract (the contractAddress parameter in the request body).
This API is supported for the following blockchains:
*Signing a transaction
*When burning fungible 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 * @param xTestnetType Type of Ethereum testnet. Defaults to Sepolia. Valid only for ETH invocations for testnet API Key. For mainnet API Key, this value is ignored. * @returns any OK * @throws ApiError */ public static erc20Burn( requestBody: (ChainBurnErc20 | ChainBurnErc20KMS | ChainBurnKcsErc20 | ChainBurnKcsErc20KMS | ChainBurnCeloErc20 | ChainBurnCeloErc20KMS), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/blockchain/token/burn`, headers: { 'x-testnet-type': xTestnetType, }, 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 during the processing of the request.`, }, }); } /** * Approve spending of fungible tokens *2 credits per API call
*Allow another blockchain address (the spender parameter in the request body) to spend and burn fungible tokens on behalf of the smart contract owner.
This API is supported for the following blockchains:
*Signing a transaction
*When approving spending of fungible 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 * @param xTestnetType Type of Ethereum testnet. Defaults to Sepolia. Valid only for ETH invocations for testnet API Key. For mainnet API Key, this value is ignored. * @returns any OK * @throws ApiError */ public static erc20Approve( requestBody: (ApproveErc20 | ApproveErc20KMS | ApproveCeloErc20 | ApproveCeloErc20KMS), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/blockchain/token/approve`, headers: { 'x-testnet-type': xTestnetType, }, 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 during the processing of the request.`, }, }); } /** * Transfer fungible tokens *2 credits per API call
*Transfer a supply of fungible tokens existing in the smart contract (the contractAddress parameter in the request body) to the specified blockchain address (the to parameter in the request body).
* Transferring fungible tokens invokes the transfer() method.
This API is supported for the following blockchains:
*Transferring fungible tokens on Algorand
*On Algorand, the recipient has to agree in advance to receive your fungible tokens because Algorand charges users for storing the tokens on their addresses, and an Algorand blockchain address by default does not receive the tokens unless explicitly agreed. Before transferring the fungible tokens, make sure that the recipient has agreed to receive the NFT to their address.
*Signing a transaction
*When transferring fungible 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 * @param xTestnetType Type of Ethereum testnet. Defaults to Sepolia. Valid only for ETH invocations for testnet API Key. For mainnet API Key, this value is ignored. * @returns any OK * @throws ApiError */ public static erc20Transfer( requestBody: (ChainTransferEthErc20 | ChainTransferSolanaSpl | ChainTransferBscBep20 | ChainTransferCeloErc20Token | ChainTransferAlgoErc20 | ChainTransferKcsEthErc20 | ChainTransferEthErc20KMS | ChainTransferSolanaSplKMS | ChainTransferBscBep20KMS | ChainTransferCeloErc20TokenKMS | ChainTransferAlgoErc20KMS | ChainTransferKcsEthErc20KMS), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/blockchain/token/transaction`, headers: { 'x-testnet-type': xTestnetType, }, 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 during the processing of the request.`, }, }); } /** * Get fungible token transactions on a blockchain address *1 credit per API call
*Get incoming and outgoing transactions related to fungible tokens on a blockchain address.
*This API is supported for the following blockchains:
*1 credit per API call
*Get the number of the fungible tokens minted on a specific smart contract (the contractAddress path parameter in the request endpoint URL) that a blockchain address holds.
This API is supported for the following blockchains:
*1 credit per API call
*Get the number of fungible tokens that a blockchain address holds across a blockchain. The tokens are returned grouped by the smart contracts they were minted on.
*This API is supported for the following blockchains:
*