/* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { AddNftMinter } from '../models/AddNftMinter'; import type { AddNftMinterKMS } from '../models/AddNftMinterKMS'; import type { AlgorandMintedResult } from '../models/AlgorandMintedResult'; import type { BurnNft } from '../models/BurnNft'; import type { BurnNftCelo } from '../models/BurnNftCelo'; import type { BurnNftFlowKMS } from '../models/BurnNftFlowKMS'; import type { BurnNftFlowMnemonic } from '../models/BurnNftFlowMnemonic'; import type { BurnNftFlowPK } from '../models/BurnNftFlowPK'; import type { BurnNftKMS } from '../models/BurnNftKMS'; import type { BurnNftKMSCelo } from '../models/BurnNftKMSCelo'; import type { BurnNftKMSTron } from '../models/BurnNftKMSTron'; import type { BurnNftTron } from '../models/BurnNftTron'; import type { CeloTx } from '../models/CeloTx'; import type { DeployNft } from '../models/DeployNft'; import type { DeployNftCelo } from '../models/DeployNftCelo'; import type { DeployNftCeloKMS } from '../models/DeployNftCeloKMS'; import type { DeployNftFlowKMS } from '../models/DeployNftFlowKMS'; import type { DeployNftFlowMnemonic } from '../models/DeployNftFlowMnemonic'; import type { DeployNftFlowPK } from '../models/DeployNftFlowPK'; import type { DeployNftKMS } from '../models/DeployNftKMS'; import type { DeployNftTron } from '../models/DeployNftTron'; import type { DeployNftTronKMS } from '../models/DeployNftTronKMS'; import type { EthTx } from '../models/EthTx'; import type { FlowMintedMultipleResult } from '../models/FlowMintedMultipleResult'; import type { FlowMintedResult } from '../models/FlowMintedResult'; import type { FlowTx } from '../models/FlowTx'; import type { MintMultipleNft } from '../models/MintMultipleNft'; import type { MintMultipleNftCelo } from '../models/MintMultipleNftCelo'; import type { MintMultipleNftFlowKMS } from '../models/MintMultipleNftFlowKMS'; import type { MintMultipleNftFlowMnemonic } from '../models/MintMultipleNftFlowMnemonic'; import type { MintMultipleNftFlowPK } from '../models/MintMultipleNftFlowPK'; import type { MintMultipleNftKMS } from '../models/MintMultipleNftKMS'; import type { MintMultipleNftKMSCelo } from '../models/MintMultipleNftKMSCelo'; import type { MintMultipleNftKMSTron } from '../models/MintMultipleNftKMSTron'; import type { MintMultipleNftMinter } from '../models/MintMultipleNftMinter'; import type { MintMultipleNftTron } from '../models/MintMultipleNftTron'; import type { MintNft } from '../models/MintNft'; import type { MintNftAlgorand } from '../models/MintNftAlgorand'; import type { MintNftAlgorandKMS } from '../models/MintNftAlgorandKMS'; import type { MintNftCelo } from '../models/MintNftCelo'; import type { MintNftExpress } from '../models/MintNftExpress'; import type { MintNftExpressAlgorand } from '../models/MintNftExpressAlgorand'; import type { MintNftExpressSolana } from '../models/MintNftExpressSolana'; import type { MintNftFlowKMS } from '../models/MintNftFlowKMS'; import type { MintNftFlowMnemonic } from '../models/MintNftFlowMnemonic'; import type { MintNftFlowPK } from '../models/MintNftFlowPK'; import type { MintNftKMS } from '../models/MintNftKMS'; import type { MintNftKMSCelo } from '../models/MintNftKMSCelo'; import type { MintNftKMSTron } from '../models/MintNftKMSTron'; import type { MintNftMinter } from '../models/MintNftMinter'; import type { MintNftSolana } from '../models/MintNftSolana'; import type { MintNftSolanaKMS } from '../models/MintNftSolanaKMS'; import type { MintNftTron } from '../models/MintNftTron'; import type { NftTx } from '../models/NftTx'; import type { SignatureId } from '../models/SignatureId'; import type { SolanaMintedResult } from '../models/SolanaMintedResult'; import type { TransactionHash } from '../models/TransactionHash'; import type { TransferNft } from '../models/TransferNft'; import type { TransferNftAlgo } from '../models/TransferNftAlgo'; import type { TransferNftAlgoExpress } from '../models/TransferNftAlgoExpress'; import type { TransferNftAlgoKMS } from '../models/TransferNftAlgoKMS'; import type { TransferNftCelo } from '../models/TransferNftCelo'; import type { TransferNftFlowKMS } from '../models/TransferNftFlowKMS'; import type { TransferNftFlowMnemonic } from '../models/TransferNftFlowMnemonic'; import type { TransferNftFlowPK } from '../models/TransferNftFlowPK'; import type { TransferNftKMS } from '../models/TransferNftKMS'; import type { TransferNftKMSCelo } from '../models/TransferNftKMSCelo'; import type { TransferNftKMSTron } from '../models/TransferNftKMSTron'; import type { TransferNftSolana } from '../models/TransferNftSolana'; import type { TransferNftSolanaKMS } from '../models/TransferNftSolanaKMS'; import type { TransferNftTron } from '../models/TransferNftTron'; import type { UpdateCashbackValueForAuthorNft } from '../models/UpdateCashbackValueForAuthorNft'; import type { UpdateCashbackValueForAuthorNftCelo } from '../models/UpdateCashbackValueForAuthorNftCelo'; import type { UpdateCashbackValueForAuthorNftKMS } from '../models/UpdateCashbackValueForAuthorNftKMS'; import type { UpdateCashbackValueForAuthorNftKMSCelo } from '../models/UpdateCashbackValueForAuthorNftKMSCelo'; import type { UpdateCashbackValueForAuthorNftKMSTron } from '../models/UpdateCashbackValueForAuthorNftKMSTron'; import type { UpdateCashbackValueForAuthorNftTron } from '../models/UpdateCashbackValueForAuthorNftTron'; import type { VerifySolanaNFT } from '../models/VerifySolanaNFT'; import type { VerifySolanaNFTKMS } from '../models/VerifySolanaNFTKMS'; import type { CancelablePromise } from '../core/CancelablePromise'; import { request as __request } from '../core/request'; export class NftErc721OrCompatibleService { /** * Deploy an NFT smart contract *

100 credits per API call on Flow
* 2 credits per API call on the other blockchains

*

Deploy an NFT smart contract on the blockchain. In a deployed NFT smart contract, you can mint NFTs (one NFT at a time or multiple NFTs at once), burn, and transfer NFTs.
* Smart contracts are standardized and audited.

*

This API is supported for the following blockchains:

* *

By default, an NFT smart contract is deployed as a general ERC-721 smart contract compatible with OpenSea royalties. This is a standard ERC-721 contract with AccessControl and Ownable, enhanced with NFT batch minting. NFTs minted in this smart contract are compatible with OpenSea and its royalty structure.

*

In addition to the general ERC-721 contract, you can also deploy the following types of NFT smart contracts for the supported blockchains except for Flow and TRON:

*

*

You can enable public minting for cashback and provenance smart contracts. By default, public minting is disabled, which means that only the blockchain address whose private key was used to create the smart contract or the blockchain addresses added to the smart contract as NFT minters will be able to mint NFTs for the contract. To enable public minting and allow anyone to mint NFTs on top of the smart contract, deploy the contract with the publicMint parameter set to true in the request body.

*

You can review the code of a deployed NFT smart contract here (if the contract is deployed on Flow) or here (if the contract is deployed on any other supported blockchain).

*

Signing a transaction

*

When deploying an NFT 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 nftDeployErc721( requestBody: (DeployNft | DeployNftCelo | DeployNftTron | DeployNftKMS | DeployNftCeloKMS | DeployNftTronKMS | DeployNftFlowPK | DeployNftFlowMnemonic | DeployNftFlowKMS), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/nft/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 an NFT *

100 credits per API call on Flow
* 2 credits per API call on the other blockchains

*

You can mint NFTs using either of the following methods:

* *

Minting NFTs using NFT Express

*

NFT Express is Tatum's feature that helps you mint NFTs easier than minting natively on a blockchain.

* *

With NFT Express, you can choose whether to mint NFTs on the pre-built NFT smart contract provided by Tatum or on your own smart contract.

*

Minting NFTs using the pre-built smart contract provided by Tatum

*

If you want to mint NFTs using the pre-built smart contract, you do not need to deploy your own NFT smart contract. You do not need to provide the address of the NFT smart contract and the token ID in the request body either. The address of the smart contract and the token ID are provided automatically by Tatum.
The token ID is autogenerated. It starts with 0 and is increased by 1 for each new NFT. The token ID is calculated separately for each supported blockchain and its mainnet and testnet.

*

You can mint NFTs on the pre-built smart contract provided by Tatum on the following blockchains:

* *

Depending on what blockchain you use, choose the request body schema to use in the API call.

* *

Minting NFTs with NFT Express using your own smart contract

*

If you want to mint NFTs using your own smart contract, you are going to use an NTF minter, a special blockchain address provided by Tatum that will cover the minting fees. The number of credits equivalent to the fees will be then deducted from the monthly credit allowance of your paid pricing plan.
*

You can mint NFTs on your own smart contract on the following blockchains:

* *

To mint NFTs using your own smart contract, do the following:

*
    *
  1. In the table located under this section, find the blockchain address of the Tatum NFT minter for your blockchain and network (mainnet or testnet).
  2. *
  3. Add the minter address as an NFT minter to your smart contract.
  4. *
  5. Use this API with the MintNftMinter schema of the request body.
    In the request body, enter the following information: *
  6. *
*

The following table lists the blockchain addresses of the Tatum NFT minters for the testnet and mainnet of the supported blockchains:

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
BlockchainMinter address - testnet*Minter address - mainnet
BNB Smart Chain0xc16ae5e8c985b906935a0cadf4e24f04005318830x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
Celo0xBC2eBA680EE50d685cc4Fe65f102AA70AfB27D3F0x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
Ethereum0x53e8577C4347C365E4e0DA5B57A589cB6f2AB8480x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
Harmony0x8906f62d40293ddca77fdf6714c3f63265deddf00x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
Klaytn0x80d8bac9a6901698b3749fe336bbd1385c1f98f20x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
Polygon0x542b9ac4945a3836fd12ad98acbc76a0c8b743f50x49678AAB11E001eb3cB2cBD9aA96b36DC2461A94
*

*If a minter blockchain address on the testnet does not have sufficient funds to cover the transaction fee, add some amount to it using a crypto faucet of the blockchain.

*

Minting NFTs natively on a blockchain

*

When minting an NFT natively on a blockchain, 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.

*

You can mint NFTs natively on the following blockchains:

* *

Depending on what blockchain you use, choose the request body schema to use in the API call.

* * * @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 nftMintErc721( requestBody: (MintNftExpress | MintNftExpressSolana | MintNftExpressAlgorand | MintNftSolana | MintNftMinter | MintNft | MintNftCelo | MintNftAlgorand | MintNftFlowPK | MintNftFlowMnemonic | MintNftTron | MintNftKMS | MintNftSolanaKMS | MintNftKMSCelo | MintNftKMSTron | MintNftAlgorandKMS | MintNftFlowKMS), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | FlowMintedResult | SolanaMintedResult | AlgorandMintedResult | SignatureId)> { return __request({ method: 'POST', path: `/v3/nft/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.`, }, }); } /** * Transfer an NFT *

100 credits per API call on Flow
* 2 credits per API call on the other blockchains

*

Transfer an NFT from the smart contract (the contractAddress parameter in the request body) to the specified blockchain address (the to parameter in the request body).

*

In one API call, you can transfer only one NFT.

*

This API is supported for the following blockchains:

* *

For Ethereum, Celo, and BNB Smart Chain, transferring NFTs invokes the safeTransfer() method.

*

Transferring NFTs on Algorand

* *

Transferring NFTs on Solana

*

If you want to transfer an NFT that was minted using NFT Express, see the section about minting NFTs on Solana using the pre-built NFT smart contract provided by Tatum for the information about how to set up the parameters in the request body.

*

Signing a transaction

*

When transferring an NFT, 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.

*

NOTE: This does not apply to transferring NFTs that were minted on Algorand using NFT Express (see earlier in this section).

* * @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 nftTransferErc721( requestBody: (TransferNft | TransferNftCelo | TransferNftTron | TransferNftSolana | TransferNftAlgo | TransferNftAlgoExpress | TransferNftFlowPK | TransferNftFlowMnemonic | TransferNftKMS | TransferNftKMSCelo | TransferNftAlgoKMS | TransferNftSolanaKMS | TransferNftFlowKMS | TransferNftKMSTron), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/nft/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.`, }, }); } /** * Mint multiple NFTs *

100 credits per API call on Flow
* 2 credits per API call on the other blockchains

*

Create multiple NFT Tokens and transfer them to destination account. Create and transfer any NFT tokens from smart contract defined in contractAddress.

*

This API is supported for the following blockchains:

* * This operation works in two modes. * * First mode works just like other NFT endpoints. 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 loss of 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. * * Second mode enables you to mint on any custom NFT ERC-721 smart contract, on which specified minter address is approved as a minter. You don't specify private key or signatureId, only minter address, from which the NFT will be minted.
* It means you perform mint multiple NFT request with following body: *
{
                 * "to": ["0x80d8bac9a6901698b3749fe336bbd1385c1f98f2"],
                 * "url": ["ipfs://QmXJJ6UF5WkF4WTJvsdhiA1etGwBLfpva7Vr9AudGMe3pj"],
                 * "tokenId": ["9876541124516"],
                 * "contractAddress":"0xcd2ada00c48a27faa5cc67f9a1ed55b89ddf7f77",
                 * "minter": "0x542b9ac4945a3836fd12ad98acbc76a0c8b743f5",
                 * "chain": "MATIC"
                 * }
* The blockchain fee of the performed transaction is paid from the address connected with built-in private key and is debitted in form of credits. The credits are debitted only if NFT mint requests are performed with paid API key plan. * We transform fee to the credits in accordance to the rates provided by the Tatum. * If you want to batch mint on ERC-721 contract which is not deployed via Tatum API, your smart contract must contain this method: *
mintMultiple(address[] to, uint256[] tokenId, string[] uri): boolean
* You can use addresses specified in the bellow table to be used as a minter. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
ChainTestnet addressMainnet Address
MATIC0x542b9ac4945a3836fd12ad98acbc76a0c8b743f50xcf9e127455d28e7362380aec1b92ddee8200b295
BSC0xc16ae5e8c985b906935a0cadf4e24f04005318830xcf9e127455d28e7362380aec1b92ddee8200b295
ONE0x8906f62d40293ddca77fdf6714c3f63265deddf00xcf9e127455d28e7362380aec1b92ddee8200b295
ETH0x53e8577C4347C365E4e0DA5B57A589cB6f2AB8480xcf9e127455d28e7362380aec1b92ddee8200b295
CELO0xBC2eBA680EE50d685cc4Fe65f102AA70AfB27D3F0xcf9e127455d28e7362380aec1b92ddee8200b295
KLAY0x80d8bac9a6901698b3749fe336bbd1385c1f98f20xcf9e127455d28e7362380aec1b92ddee8200b295
* If there are not enough coins on any testnet address, feel free to send coins there.

* * @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 nftMintMultipleErc721( requestBody: (MintMultipleNftMinter | MintMultipleNft | MintMultipleNftCelo | MintMultipleNftTron | MintMultipleNftFlowPK | MintMultipleNftFlowMnemonic | MintMultipleNftKMS | MintMultipleNftKMSCelo | MintMultipleNftKMSTron | MintMultipleNftFlowKMS), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | FlowMintedMultipleResult | SignatureId)> { return __request({ method: 'POST', path: `/v3/nft/mint/batch`, 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 an NFT *

100 credits per API call on Flow
* 2 credits per API call on the other blockchains

*

Burn one NFT Token. This method destroys any NFT token from smart contract defined in contractAddress.

*

This API is supported for the following blockchains:

* *

Signing a transaction

*

When burning an NFT, 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 nftBurnErc721( requestBody: (BurnNft | BurnNftCelo | BurnNftKMSCelo | BurnNftTron | BurnNftKMSTron | BurnNftKMS | BurnNftFlowPK | BurnNftFlowMnemonic | BurnNftFlowKMS), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/nft/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.`, }, }); } /** * Add an NFT minter *

2 credits per API call

*

Add new minter of NFT Tokens. This method adds minter permission to new minter address.

*

This API is supported for the following blockchains:

* *

Signing a transaction

*

When adding an NFT minter, 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 nftAddMinter( requestBody: (AddNftMinter | AddNftMinterKMS), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/nft/mint/add`, 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.`, }, }); } /** * Verify an NFT in an NFT collection on Solana *

2 credits per API call

*

Verify an NFT in an NFT collection on Solana. Verifying an NFT sets the Verified parameter to true for the NFT, which means that the NFT is really a part of the collection. To know more about Solana collections and verification, refer to the Solana user documentation.

*

The collection must be a sized collection that was introduced in Version 1.3 of the Metaplex Token Metadata program. The NFT must have been minted in this collection.

*

This API is supported only for Solana.

*

Signing a transaction

*

When verifying an NFT, 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 nftVerifyInCollection( requestBody: (VerifySolanaNFT | VerifySolanaNFTKMS), ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/nft/verify`, 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.`, }, }); } /** * Update NFT royalty *

2 credits per API call

*

Update royalty cashback value for one NFT Token. This method updates the first royalty value of specific author for 1 token. * If royalty value is set to 0, it will disable the royalty system for the token. Only from author's address of the royalty can change it's royalty value, not the owner of the token.

*

This API is supported for the following blockchains:

* *

Signing a transaction

*

When updating NFT royalty, 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 nftUpdateCashbackErc721( requestBody: (UpdateCashbackValueForAuthorNft | UpdateCashbackValueForAuthorNftCelo | UpdateCashbackValueForAuthorNftTron | UpdateCashbackValueForAuthorNftKMS | UpdateCashbackValueForAuthorNftKMSCelo | UpdateCashbackValueForAuthorNftKMSTron), xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'PUT', path: `/v3/nft/royalty`, 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 NFT transactions on a blockchain address *

1 credit per API call

*

Get incoming and outgoing NFT transactions on a blockchain address.

*

This API is supported for the following blockchains:

* * * @param chain Blockchain to work with * @param address Account address you want to get balance of * @param tokenAddress Address of the token smart contract * @param pageSize Max number of items per page is 50. * @param offset Offset to obtain next page of the data. * @param from Transactions from this block onwords will be included. * @param to Transactions up to this block will be included. * @returns any OK * @throws ApiError */ public static nftGetTransactionByAddress( chain: 'CELO' | 'ETH' | 'MATIC', address: string, tokenAddress: string, pageSize: number, offset?: number, from?: number, to?: number, ): CancelablePromise> { return __request({ method: 'GET', path: `/v3/nft/transaction/${chain}/${address}/${tokenAddress}`, query: { 'pageSize': pageSize, 'offset': offset, 'from': from, 'to': to, }, 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.`, 500: `Internal server error. There was an error on the server during the processing of the request.`, }, }); } /** * Get NFT transactions for an NFT *

1 credit per API call

Get NFT transactions by token. This includes incoming and outgoing transactions for the token.

This API is supported for the following blockchains:

* @param chain Blockchain to work with * @param tokenId NFT Token ID * @param tokenAddress Address of the token smart contract * @param pageSize Max number of items per page is 50. * @param offset Offset to obtain next page of the data. * @param from Transactions from this block onwords will be included. * @param to Transactions up to this block will be included. * @returns any OK * @throws ApiError */ public static nftGetTransactionByToken( chain: 'CELO' | 'ETH' | 'MATIC', tokenId: number, tokenAddress: string, pageSize: number, offset?: number, from?: number, to?: number, ): CancelablePromise> { return __request({ method: 'GET', path: `/v3/nft/transaction/tokenId/${chain}/${tokenAddress}/${tokenId}`, query: { 'pageSize': pageSize, 'offset': offset, 'from': from, 'to': to, }, 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.`, 500: `Internal server error. There was an error on the server during the processing of the request.`, }, }); } /** * Get an NFT transaction by its hash *

1 credit per API call

*

Get NFT transaction by transaction hash.

*

This API is supported for the following blockchains:

* * * @param chain Blockchain to work with * @param hash Transaction hash * @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 nftGetTransactErc721( chain: 'ETH' | 'MATIC' | 'KCS' | 'ONE' | 'KLAY' | 'CELO' | 'TRON' | 'FLOW' | 'BSC', hash: string, xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<(CeloTx | EthTx | FlowTx)> { return __request({ method: 'GET', path: `/v3/nft/transaction/${chain}/${hash}`, headers: { 'x-testnet-type': xTestnetType, }, 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 all NFTs that a blockchain address holds *

1 credit per API call + 5 credits for each owned NFT

*

Get all NFTs that a blockchain address holds. The NFTs are returned grouped by the smart contracts they were minted on.

*

This API is supported for the following blockchains:

* *

On Solana and Algorand, if a blockchain address holds fewer than 50 NFTs, the API also returns each NFT's metadata. If the metadata is not returned, you can obtain it using the API for getting NFT metadata.

* * @param chain Blockchain to work with * @param address The blockchain address that you want to get the token balance of * @returns any OK * @throws ApiError */ public static nftGetTokensByAddressErc721( chain: 'ALGO' | 'CELO' | 'ETH' | 'MATIC' | 'SOL', address: string, ): CancelablePromise; metadata?: Array<{ /** * The ID of the NFT owned by this address; valid for EVM-based blockchains only */ tokenId?: string; /** * The URL pointing to the NFT metadata; the URL may not be present, and if it is not returned, you can get it by calling the NFT Contract.tokenURI() method */ url?: string; /** * The metadata scheme obtained from the metadata URL; the scheme may not be present, and if it is not returned, you can get it using the NFT metadata API */ metadata?: any; }>; }>> { return __request({ method: 'GET', path: `/v3/nft/address/balance/${chain}/${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 during the processing of the request.`, }, }); } /** * Get NFTs from a collection *

1 credit per API call + 5 credits for each listed NFT

*

Get all minted NFTs in the collection. Returns all NFTs this contract minted.

*

This API is supported for the following blockchains:

*
    *
  • Celo
  • *
  • Ethereum
  • *
  • Polygon
  • *
* * @param chain Blockchain to work with * @param pageSize Max number of items per page is 50. * @param address Collection address * @param offset Offset to obtain next page of the data. * @returns any OK * @throws ApiError */ public static nftGetTokensByCollectionErc721( chain: 'CELO' | 'MATIC' | 'ETH', pageSize: number, address: string, offset?: number, ): CancelablePromise; }>> { return __request({ method: 'GET', path: `/v3/nft/collection/${chain}/${address}`, query: { 'pageSize': pageSize, 'offset': offset, }, 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 the NFTs from a specific smart contract that a blockchain address holds *

1 credit per API call

*

Get the NFTs minted on a specific smart contract (the contractAddress path parameter in the request endpoint URL) that a blockchain address holds.

*

NOTE: This API works only for the NFT smart contracts deployed using the Tatum smart contract API.

*

This API is supported for the following blockchains:

*
    *
  • BNB Smart Chain
  • *
  • Celo
  • *
  • Ethereum
  • *
  • Flow
  • *
  • Harmony
  • *
  • Klaytn
  • *
  • KuCoin Community Chain
  • *
  • Polygon
  • *
  • Solana
  • *
  • TRON
  • *
  • Algorand
  • *
* * @param chain Blockchain to work with * @param address The blockchain address that you want to get the token balance of * @param contractAddress The address of the NFT smart contract * @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 string OK * @throws ApiError */ public static nftGetBalanceErc721( chain: 'ETH' | 'MATIC' | 'KCS' | 'ONE' | 'KLAY' | 'CELO' | 'TRON' | 'FLOW' | 'BSC' | 'SOL' | 'ALGO', address: string, contractAddress: string, xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise> { return __request({ method: 'GET', path: `/v3/nft/balance/${chain}/${contractAddress}/${address}`, headers: { 'x-testnet-type': xTestnetType, }, 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 NFT provenance data *

1 credit per API call

*

Get NFT token provenance data, valid only for provenance contract.

*

This API is supported for the following blockchains:

*
    *
  • BNB Smart Chain
  • *
  • Celo
  • *
  • Ethereum
  • *
  • Harmony
  • *
  • Klaytn
  • *
  • KuCoin Community Chain
  • *
  • Polygon
  • *
* * @param chain Blockchain to work with * @param tokenId Token ID * @param contractAddress NFT contract address * @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 nftGetProvenanceDataErc721( chain: 'ETH' | 'MATIC' | 'KCS' | 'ONE' | 'KLAY' | 'CELO' | 'BSC', tokenId: string, contractAddress: string, xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise> { return __request({ method: 'GET', path: `/v3/nft/provenance/${chain}/${contractAddress}/${tokenId}`, headers: { 'x-testnet-type': xTestnetType, }, 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 NFT metadata *

1 credit per API call

*

Get NFT token metadata.

*

This API is supported for the following blockchains:

*
    *
  • BNB Smart Chain
  • *
  • Celo
  • *
  • Ethereum
  • *
  • Flow
  • *
  • Harmony
  • *
  • Klaytn
  • *
  • KuCoin Community Chain
  • *
  • Polygon
  • *
  • TRON
  • *
* * @param chain Blockchain to work with * @param contractAddress NFT contract address * @param token Token ID, required for all except SOL * @param account Account holding this token. FLOW only. * @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 nftGetMetadataErc721( chain: 'ETH' | 'MATIC' | 'KCS' | 'SOL' | 'ONE' | 'KLAY' | 'CELO' | 'TRON' | 'FLOW' | 'BSC', contractAddress: string, token: string, account?: string, xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<{ /** * Metadata associated with token. */ data?: string; }> { return __request({ method: 'GET', path: `/v3/nft/metadata/${chain}/${contractAddress}/${token}`, headers: { 'x-testnet-type': xTestnetType, }, query: { 'account': account, }, 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 NFT royalty information *

1 credit per API call

*

Get NFT token royalty.

*

This API is supported for the following blockchains:

*
    *
  • BNB Smart Chain
  • *
  • Celo
  • *
  • Ethereum
  • *
  • Flow
  • *
  • Harmony
  • *
  • Klaytn
  • *
  • KuCoin Community Chain
  • *
  • Polygon
  • *
  • TRON
  • *
* * @param chain Blockchain to work with * @param contractAddress NFT contract address * @param token Token ID, required for all except SOL * @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 nftGetRoyaltyErc721( chain: 'ETH' | 'MATIC' | 'KCS' | 'SOL' | 'ONE' | 'KLAY' | 'CELO' | 'TRON' | 'BSC', contractAddress: string, token: string, xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<{ /** * Addresses of the authors where cashback will be paid. */ addresses?: Array; /** * Values of the royalties, which will be paid to the authors with every token transfer. * Amount is in native asset of the blockchain or in percents for SOL NFTs. * */ values?: Array; }> { return __request({ method: 'GET', path: `/v3/nft/royalty/${chain}/${contractAddress}/${token}`, headers: { 'x-testnet-type': xTestnetType, }, 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.`, }, }); } /** * @deprecated * Get the address of an NFT smart contract by its transaction hash *

This endpoint is deprecated. Do not use it.
* Instead, use this API.


*

1 credit per API call

*

Get NFT contract address from deploy transaction.

*

This API is supported for the following blockchains:

*
    *
  • BNB Smart Chain
  • *
  • Celo
  • *
  • Ethereum
  • *
  • Flow
  • *
  • Harmony
  • *
  • Klaytn
  • *
  • KuCoin Community Chain
  • *
  • Polygon
  • *
  • TRON
  • *
* * @param chain Blockchain to work with * @param hash Transaction hash * @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 nftGetContractAddress( chain: 'ETH' | 'ONE' | 'KLAY' | 'CELO' | 'TRON' | 'FLOW' | 'MATIC' | 'KCS' | 'BSC', hash: string, xTestnetType: 'ethereum-sepolia' = 'ethereum-sepolia', ): CancelablePromise<{ /** * Address of the NFT token. */ contractAddress?: string; }> { return __request({ method: 'GET', path: `/v3/nft/address/${chain}/${hash}`, headers: { 'x-testnet-type': xTestnetType, }, 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.`, }, }); } }