@tatumio/tatum-v1
Version:
Tatum API client allows browsers and Node.js clients to interact with Tatum API.
342 lines (341 loc) • 24.3 kB
TypeScript
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, TransferBscBep20, TransferErc20, TransferMultiToken, TransferMultiTokenBatch, UpdateCashbackErc721 } from '../model';
/**
* Estimate Gas price for the transaction.
*/
export declare const bscGetGasPriceInWei: () => Promise<string>;
/**
* Returns BSC server to connect to.
*
* @param provider url of the BSC Server to connect to. If not set, default public server will be used.
* @param fromPrivateKey optional private key of sender account
*/
export declare const getBscClient: (provider?: string | undefined, fromPrivateKey?: string | undefined) => Web3;
/**
* Sign BSC pending transaction from Tatum KMS
* @param tx pending transaction from KMS
* @param fromPrivateKey private key to sign transaction with.
* @param provider url of the BSC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const signBscKMSTransaction: (tx: TransactionKMS, fromPrivateKey: string, provider?: string | undefined) => Promise<string>;
export declare const getBscBep20ContractDecimals: (testnet: boolean, contractAddress: string, provider?: string | undefined) => Promise<any>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscStoreDataTransaction: (body: CreateRecord, provider?: string | undefined) => Promise<string>;
/**
* Sign BEP20 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param body content of the transaction to broadcast
* @param provider url of the Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareMintBep20SignedTransaction: (body: MintErc20, provider?: string | undefined) => Promise<string>;
/**
* Sign BEP20 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param body content of the transaction to broadcast
* @param provider url of the Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBurnBep20SignedTransaction: (body: BurnErc20, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc or supported BEP20 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param body content of the transaction to broadcast
* @param provider url of the Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscOrBep20SignedTransaction: (body: TransferBscBep20, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc custom BEP20 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param body content of the transaction to broadcast
* @param provider url of the Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareCustomBep20SignedTransaction: (body: TransferErc20, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc deploy BEP20 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param body content of the transaction to broadcast
* @param provider url of the Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareDeployBep20SignedTransaction: (body: DeployErc20, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscGenerateCustodialWalletSignedTransaction: (body: GenerateCustodialAddress, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscSmartContractWriteMethodInvocation: (body: SmartContractMethodInvocation, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscMintBep721SignedTransaction: (body: EthMintErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscMintMultipleBep721ProvenanceSignedTransaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc mint ERC 721 provenance transaction with cashback via private keys locally. Nothing is broadcast to the blockchain.
* @param body content of the transaction to broadcast
* @param provider url of the Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscMintBep721ProvenanceSignedTransaction: (body: EthMintErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc mint ERC 721 transaction with cashback via private keys locally. Nothing is broadcast to the blockchain.
* @param body content of the transaction to broadcast
* @param provider url of the Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscMintBepCashback721SignedTransaction: (body: EthMintErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscMintMultipleCashbackBep721SignedTransaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscMintMultipleBep721SignedTransaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscBurnBep721SignedTransaction: (body: EthBurnErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscTransferBep721SignedTransaction: (body: EthTransferErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscUpdateCashbackForAuthorErc721SignedTransaction: (body: UpdateCashbackErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscDeployBep721SignedTransaction: (body: EthDeployErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign BSC 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 Bsc 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 prepareBscDeployMarketplaceListingSignedTransaction: (body: DeployMarketplaceListing, provider?: string | undefined) => Promise<string>;
/**
* Sign BSC 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 Bsc 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 prepareBscDeployAuctionSignedTransaction: (body: DeployNftAuction, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscBurnMultiTokenSignedTransaction: (body: EthBurnMultiToken, provider?: string | undefined) => Promise<string>;
export declare const prepareBscBurnMultiTokenBatchSignedTransaction: (body: EthBurnMultiTokenBatch, provider?: string | undefined) => Promise<string>;
export declare const prepareBscTransferMultiTokenSignedTransaction: (body: TransferMultiToken, provider?: string | undefined) => Promise<string>;
export declare const prepareBscBatchTransferMultiTokenSignedTransaction: (body: TransferMultiTokenBatch, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 prepareBscMintMultiTokenSignedTransaction: (body: MintMultiToken, provider?: string | undefined) => Promise<string>;
/**
* Sign BSC 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 prepareBscMintMultiTokenBatchSignedTransaction: (body: MintMultiTokenBatch, provider?: string | undefined) => Promise<string>;
/**
* Sign Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBscDeployMultiTokenSignedTransaction: (body: EthDeployMultiToken, provider?: string | undefined) => Promise<string>;
/**
* Send Bsc 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 Bsc Server to connect to. If not set, default public server will be used.
*/
export declare const sendBscSmartContractReadMethodInvocationTransaction: (body: SmartContractReadMethodInvocation, provider?: string | undefined) => Promise<{
data: any;
}>;
/**
* Send Bsc 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 Bsc 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 sendBscStoreDataTransaction: (body: CreateRecord, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc or supported BEP20 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 Bsc 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 sendBscOrBep20Transaction: (body: TransferBscBep20, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc custom BEP20 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 Bsc 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 sendCustomBep20Transaction: (body: TransferErc20, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc deploy BEP20 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 Bsc 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 sendDeployBep20Transaction: (body: DeployErc20, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc 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 Bsc 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 sendBscSmartContractMethodInvocationTransaction: (body: SmartContractMethodInvocation | SmartContractReadMethodInvocation, provider?: string | undefined) => Promise<import("../model").TransactionHash | {
data: any;
}>;
/**
* Send Bsc BEP721 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 Bsc 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 sendMintBep721Transaction: (body: EthMintErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
export declare const sendBscGenerateCustodialWalletSignedTransaction: (body: GenerateCustodialAddress, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
export declare const sendBscDeployMultiTokenTransaction: (body: EthDeployMultiToken, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
export declare const sendBscMintMultiTokenTransaction: (body: MintMultiToken, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
export declare const sendBscMintMultiTokenBatchTransaction: (body: MintMultiTokenBatch, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc BEP721 mint transaction to the blockchain with cashback details. 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 Bsc 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 sendMintBepCashback721Transaction: (body: EthMintErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc BEP721 mint multiple transaction with cashback 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 Bsc 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 sendMintMultipleCashbackBep721Transaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc BEP721 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 Bsc 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 sendMintMultipleBep721Transaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc BEP721 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 Bsc 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 sendMintMultipleBep721ProvenanceTransaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc BEP721 mint 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 Bsc 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 sendMintBep721ProvenanceTransaction: (body: EthMintErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc BEP721 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 Bsc 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 sendBurnBep721Transaction: (body: EthBurnErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
export declare const sendUpdateCashbackForAuthorBep721Transaction: (body: UpdateCashbackErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
export declare const sendBscBurnMultiTokenTransaction: (body: EthBurnMultiToken, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
export declare const sendBscBurnBatchMultiTokenTransaction: (body: EthBurnMultiTokenBatch, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc BEP721 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 Bsc 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 sendBep721Transaction: (body: EthTransferErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc 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 Bsc 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 sendBscMultiTokenTransaction: (body: TransferMultiToken, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
export declare const sendBscMultiTokenBatchTransaction: (body: TransferMultiTokenBatch, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Bsc BEP721 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 Bsc 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 sendDeployBep721Transaction: (body: EthDeployErc721, 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 testnet chain to work with
* @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 sendBscDeployMarketplaceListingSignedTransaction: (body: DeployMarketplaceListing, provider?: string | undefined) => Promise<import("../model").TransactionHash>;