UNPKG

@tatumio/tatum-v1

Version:

Tatum API client allows browsers and Node.js clients to interact with Tatum API.

422 lines (421 loc) 29 kB
import Web3 from 'web3'; import { BurnErc20, CreateRecord, DeployErc20, DeployMarketplaceListing, DeployNftAuction, EthBurnErc721, EthBurnMultiToken, EthBurnMultiTokenBatch, EthDeployErc721, EthDeployMultiToken, EthMintErc721, EthMintMultipleErc721, EthTransferErc721, GenerateCustodialAddress, MintErc20, MintMultiToken, MintMultiTokenBatch, SmartContractMethodInvocation, SmartContractReadMethodInvocation, TransactionKMS, TransferErc20, TransferMultiToken, TransferMultiTokenBatch, UpdateCashbackErc721 } from '../model'; /** * Estimate Gas price for the transaction. */ export declare const ethGetGasPriceInWei: () => Promise<string>; /** * (!) Internal function * Used to be able to override it later */ export declare const ethGetGasPriceInWeiWrapper: { ethGetGasPriceInWei: () => Promise<string>; }; /** * Returns Ethereum server to connect to. * * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @param privateKey */ export declare const getClient: (provider?: string | undefined, privateKey?: string | undefined) => Web3; /** * Sign Ethereum pending transaction from Tatum KMS * @param tx pending transaction from KMS * @param fromPrivateKey private key to sign transaction with. * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const signEthKMSTransaction: (tx: TransactionKMS, fromPrivateKey: string, provider?: string | undefined) => Promise<string>; /** * Sign Eth generate custodial wallet address transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the ETH Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthGenerateCustodialWalletSignedTransaction: (body: GenerateCustodialAddress, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum Store data transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareStoreDataTransaction: (body: CreateRecord, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum mint ERC 20 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthMintErc20SignedTransaction: (body: MintErc20, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum burn ERC 721 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthBurnErc20SignedTransaction: (body: BurnErc20, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum or supported ERC20 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthOrErc20SignedTransaction: (body: TransferErc20, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum custom ERC20 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareCustomErc20SignedTransaction: (body: TransferErc20, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum deploy ERC20 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareDeployErc20SignedTransaction: (body: DeployErc20, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum invoke smart contract transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareSmartContractWriteMethodInvocation: (body: SmartContractMethodInvocation, provider?: string | undefined) => Promise<string>; /** * Sign ETH generate custodial wallet address transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the ETH Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain, or signatureId in case of Tatum KMS */ export declare const prepareEthDeployMarketplaceListingSignedTransaction: (body: DeployMarketplaceListing, provider?: string | undefined) => Promise<string>; /** * Sign ETH deploy NFT Auction contract transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the ETH Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain, or signatureId in case of Tatum KMS */ export declare const prepareEthDeployAuctionSignedTransaction: (body: DeployNftAuction, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum mint ERC 721 provenance transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthMintErc721ProvenanceSignedTransaction: (body: EthMintErc721, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum mint multiple ERC 721 Provenance transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthMintMultipleErc721ProvenanceSignedTransaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum mint ERC 721 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthMintErc721SignedTransaction: (body: EthMintErc721, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum mint multiple ERC 721 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthMintCashbackErc721SignedTransaction: (body: EthMintErc721, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum mint multiple ERC 721 Cashback transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthMintMultipleCashbackErc721SignedTransaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum mint multiple ERC 721 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthMintMultipleErc721SignedTransaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum burn ERC 721 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthBurnErc721SignedTransaction: (body: EthBurnErc721, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum update cashback ERC 721 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthUpdateCashbackForAuthorErc721SignedTransaction: (body: UpdateCashbackErc721, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum transfer ERC 721 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthTransferErc721SignedTransaction: (body: EthTransferErc721, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum mint ERC 1155 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthMintMultiTokenBatchSignedTransaction: (body: MintMultiTokenBatch, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum mint ERC 1155 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthMintMultiTokenSignedTransaction: (body: MintMultiToken, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum burn ERC 1155 batch transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthBurnBatchMultiTokenSignedTransaction: (body: EthBurnMultiTokenBatch, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum burn ERC 1155 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthBurnMultiTokenSignedTransaction: (body: EthBurnMultiToken, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum transfer ERC 1155 Batch transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthBatchTransferMultiTokenSignedTransaction: (body: TransferMultiTokenBatch, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum transfer ERC 1155 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthTransferMultiTokenSignedTransaction: (body: TransferMultiToken, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum deploy ERC 1155 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthDeployMultiTokenSignedTransaction: (body: EthDeployMultiToken, provider?: string | undefined) => Promise<string>; /** * Sign Ethereum deploy ERC 721 transaction with private keys locally. Nothing is broadcast to the blockchain. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction data to be broadcast to blockchain. */ export declare const prepareEthDeployErc721SignedTransaction: (body: EthDeployErc721, provider?: string | undefined) => Promise<string>; export declare const getEthErc20ContractDecimals: (testnet: boolean, contractAddress: string, provider?: string | undefined) => Promise<any>; /** * Send Ethereum invoke smart contract transaction to the blockchain. * Invoked method only reads from blockchain the data and returns them back. * * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. */ export declare const sendSmartContractReadMethodInvocationTransaction: (body: SmartContractReadMethodInvocation, provider?: string | undefined) => Promise<{ data: any; }>; /** * Send Ethereum store data transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendStoreDataTransaction: (body: CreateRecord, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum or supported ERC20 transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendEthOrErc20Transaction: (body: TransferErc20, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum custom ERC20 transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendCustomErc20Transaction: (body: TransferErc20, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum deploy ERC20 transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendDeployErc20Transaction: (body: DeployErc20, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum invoke smart contract transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendSmartContractMethodInvocationTransaction: (body: SmartContractMethodInvocation | SmartContractReadMethodInvocation, provider?: string | undefined) => Promise<import("../model").TransactionHash | { data: any; }>; /** * Send Ethereum ERC721 mint transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendMintErc721Transaction: (body: EthMintErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum ERC721 mint with cashback transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendMintCashbackErc721Transaction: (body: EthMintErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum ERC721 provenance mint with cashback transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendMintErc721ProvenanceTransaction: (body: EthMintErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum ERC721 mint multiple cashback transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendEthMintMultipleCashbackErc721SignedTransaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum ERC721 mint multiple provenance transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendMintMultipleErc721ProvenanceTransaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum ERC721 mint multiple transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendMintMultipleErc721Transaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum ERC721 burn transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendBurnErc721Transaction: (body: EthBurnErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum ERC721 update cashback for author transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendUpdateCashbackForAuthorErc721Transaction: (body: UpdateCashbackErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum ERC721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendErc721Transaction: (body: EthTransferErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum ERC721 deploy to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendDeployErc721Transaction: (body: EthDeployErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum MultiToken transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendEthMultiTokenTransaction: (body: TransferMultiToken, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum MultiToken batch transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendEthMultiTokenBatchTransaction: (body: TransferMultiTokenBatch, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum MultiToken deploy to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendEthDeployMultiTokenTransaction: (body: EthDeployMultiToken, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum MultiToken mint transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendEthMintMultiTokenTransaction: (body: MintMultiToken, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum MultiToken mint batch transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendEthMintMultiTokenBatchTransaction: (body: MintMultiTokenBatch, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum MultiToken burn transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendEthBurnMultiTokenTransaction: (body: EthBurnMultiToken, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum MultiToken burn batch transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendEthBurnBatchMultiTokenTransaction: (body: EthBurnMultiTokenBatch, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Send Ethereum generate custodial wallet transaction to the blockchain. This method broadcasts signed transaction to the blockchain. * This operation is irreversible. * @param body content of the transaction to broadcast * @param provider url of the Ethereum Server to connect to. If not set, default public server will be used. * @returns transaction id of the transaction in the blockchain */ export declare const sendEthGenerateCustodialWalletSignedTransaction: (body: GenerateCustodialAddress, provider?: string | undefined) => Promise<import("../model").TransactionHash>; /** * Deploy new smart contract for NFT marketplace logic. Smart contract enables marketplace operator to create new listing for NFT (ERC-721/1155). * @param body request data * @param provider optional provider to enter. if not present, Tatum Web3 will be used. * @returns {txId: string} Transaction ID of the operation, or signatureID in case of Tatum KMS */ export declare const sendEthDeployMarketplaceListingSignedTransaction: (body: DeployMarketplaceListing, provider?: string | undefined) => Promise<import("../model").TransactionHash>;