@tatumio/tatum-v1
Version:
Tatum API client allows browsers and Node.js clients to interact with Tatum API.
240 lines (239 loc) • 15.7 kB
TypeScript
import Web3 from 'web3';
import { BurnErc20, CreateRecord, DeployErc20, EthBurnErc721, EthDeployErc721, EthMintErc721, EthMintMultipleErc721, EthTransferErc721, MintErc20, SmartContractMethodInvocation, SmartContractReadMethodInvocation, TransactionKMS, TransferErc20, UpdateCashbackErc721 } from '../model';
/**
* Convert XDC address format.
*/
export declare const fromXdcAddress: (xdcAddress: string) => string;
/**
* Estimate Gas price for the transaction.
*/
export declare const xdcGetGasPriceInWei: () => Promise<string | import("bn.js")>;
/**
* Returns XDC server to connect to.
*
* @param provider url of the XDC Server to connect to. If not set, default public server will be used.
* @param fromPrivateKey optional private key of sender account
*/
export declare const getXdcClient: (provider?: string | undefined, fromPrivateKey?: string | undefined) => Web3;
/**
* Sign XDC pending transaction from Tatum KMS
* @param tx pending transaction from KMS
* @param fromPrivateKey private key to sign transaction with.
* @param provider url of the XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const signXdcKMSTransaction: (tx: TransactionKMS, fromPrivateKey: string, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcStoreDataTransaction: (body: CreateRecord, provider?: string | undefined) => Promise<string>;
/**
* Sign 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcMintErc20SignedTransaction: (body: MintErc20, provider?: string | undefined) => Promise<string>;
/**
* Sign 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcBurnErc20SignedTransaction: (body: BurnErc20, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcOrErc20SignedTransaction: (body: TransferErc20, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcCustomErc20SignedTransaction: (body: TransferErc20, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcDeployErc20SignedTransaction: (body: DeployErc20, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcSmartContractWriteMethodInvocation: (body: SmartContractMethodInvocation, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcMintErc721SignedTransaction: (body: EthMintErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcMintErcCashback721SignedTransaction: (body: EthMintErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcMintMultipleCashbackErc721SignedTransaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcMintMultipleErc721SignedTransaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcBurnErc721SignedTransaction: (body: EthBurnErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcTransferErc721SignedTransaction: (body: EthTransferErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcUpdateCashbackForAuthorErc721SignedTransaction: (body: UpdateCashbackErc721, provider?: string | undefined) => Promise<string>;
/**
* Sign XDC 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 XDC Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareXdcDeployErc721SignedTransaction: (body: EthDeployErc721, provider?: string | undefined) => Promise<string>;
/**
* Send XDC 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 XDC Server to connect to. If not set, default public server will be used.
*/
export declare const sendXdcSmartContractReadMethodInvocationTransaction: (body: SmartContractReadMethodInvocation, provider?: string | undefined) => Promise<{
data: any;
}>;
/**
* Send XDC 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 XDC 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 sendXdcStoreDataTransaction: (body: CreateRecord, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send XDC 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 XDC 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 sendXdcOrErc20Transaction: (body: TransferErc20, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send XDC 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 XDC 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 sendXdcCustomErc20Transaction: (body: TransferErc20, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send XDC 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 XDC 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 sendXdcDeployErc20Transaction: (body: DeployErc20, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send XDC 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 XDC 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 sendXdcSmartContractMethodInvocationTransaction: (body: SmartContractMethodInvocation | SmartContractReadMethodInvocation, provider?: string | undefined) => Promise<import("../model").TransactionHash | {
data: any;
}>;
/**
* Send XDC 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 XDC 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 sendXdcMintErc721Transaction: (body: EthMintErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send XDC ERC721 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 XDC 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 sendXdcMintErcCashback721Transaction: (body: EthMintErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send XDC ERC721 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 XDC 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 sendXdcMintMultipleCashbackErc721Transaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send XDC 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 XDC 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 sendXdcMintMultipleErc721Transaction: (body: EthMintMultipleErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send XDC 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 XDC 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 sendXdcBurnErc721Transaction: (body: EthBurnErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
export declare const sendXdcUpdateCashbackForAuthorErc721Transaction: (body: UpdateCashbackErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send XDC 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 XDC 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 sendXdcErc721Transaction: (body: EthTransferErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send XDC 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 XDC 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 sendXdcDeployErc721Transaction: (body: EthDeployErc721, provider?: string | undefined) => Promise<import("../model").TransactionHash>;