@tatumio/tatum-v1
Version:
Tatum API client allows browsers and Node.js clients to interact with Tatum API.
337 lines (336 loc) • 19.6 kB
TypeScript
import { CreateTronTrc10, CreateTronTrc20, DeployTronMarketplaceListing, FreezeTron, GenerateTronCustodialAddress, SmartContractMethodInvocation, TransactionKMS, TransferTron, TransferTronTrc10, TransferTronTrc20, TronBurnTrc721, TronDeployTrc721, TronMintMultipleTrc721, TronMintTrc721, TronTransferTrc721, TronUpdateCashbackTrc721 } from '../model';
/**
* Send Tron transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const sendTronTransaction: (testnet: boolean, body: TransferTron) => Promise<import("../model").TransactionHash>;
/**
* Send Tron Freeze balance transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const freezeTronTransaction: (testnet: boolean, body: FreezeTron) => Promise<import("../model").TransactionHash>;
/**
* Send Tron TRC10 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const sendTronTrc10Transaction: (testnet: boolean, body: TransferTronTrc10) => Promise<import("../model").TransactionHash>;
/**
* Send Tron TRC20 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const sendTronTrc20Transaction: (testnet: boolean, body: TransferTronTrc20) => Promise<import("../model").TransactionHash>;
/**
* Create Tron TRC10 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const createTronTrc10Transaction: (testnet: boolean, body: CreateTronTrc10) => Promise<import("../model").TransactionHash>;
/**
* Create Tron TRC20 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const createTronTrc20Transaction: (testnet: boolean, body: CreateTronTrc20) => Promise<import("../model").TransactionHash>;
/**
* Sign Tron pending transaction from Tatum KMS
* @param tx pending transaction from KMS
* @param fromPrivateKey private key to sign transaction with.
* @param testnet mainnet or testnet version
* @returns transaction data to be broadcast to blockchain.
*/
export declare const signTronKMSTransaction: (tx: TransactionKMS, fromPrivateKey: string, testnet: boolean) => Promise<string>;
export declare const convertAddressFromHex: (address: string) => any;
export declare const convertAddressToHex: (address: string) => any;
/**
* Send Tron deploy trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const sendTronDeployTrc721SignedTransaction: (testnet: boolean, body: TronDeployTrc721) => Promise<import("../model").TransactionHash>;
/**
* Send Tron generate custodial wallet transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const sendTronGenerateCustodialWalletSignedTransaction: (testnet: boolean, body: GenerateTronCustodialAddress, 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 provider will be used.
* @returns {txId: string} Transaction ID of the operation, or signatureID in case of Tatum KMS
*/
export declare const sendTronDeployMarketplaceListingSignedTransaction: (testnet: boolean, body: DeployTronMarketplaceListing, provider?: string | undefined) => Promise<import("../model").TransactionHash>;
/**
* Send Tron mint cashback trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const sendTronMintCashbackTrc721SignedTransaction: (testnet: boolean, body: TronMintTrc721) => Promise<import("../model").TransactionHash>;
/**
* Send Tron mint trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const sendTronMintTrc721SignedTransaction: (testnet: boolean, body: TronMintTrc721) => Promise<import("../model").TransactionHash>;
/**
* Send Tron transfer trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const sendTronTransferTrc721SignedTransaction: (testnet: boolean, body: TronTransferTrc721) => Promise<import("../model").TransactionHash>;
/**
* Send Tron burn trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const sendTronBurnTrc721SignedTransaction: (testnet: boolean, body: TronBurnTrc721) => Promise<import("../model").TransactionHash>;
/**
* Send Tron mint multiple trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const sendTronMintMultipleTrc721SignedTransaction: (testnet: boolean, body: TronMintMultipleTrc721) => Promise<import("../model").TransactionHash>;
/**
* Send Tron update cashback for author trc721 transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
* This operation is irreversible.
* @param testnet
* @param body content of the transaction to broadcast
* @returns transaction id of the transaction in the blockchain
*/
export declare const sendTronUpdateCashbackForAuthorTrc721SignedTransaction: (testnet: boolean, body: TronUpdateCashbackTrc721) => Promise<import("../model").TransactionHash>;
/**
* Sign Tron transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronSignedTransaction: (testnet: boolean, body: TransferTron, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron Freeze balance transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider optional provider to enter. if not present, Tatum provider will be used.
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronFreezeTransaction: (testnet: boolean, body: FreezeTron, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron TRC10 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param precision
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronTrc10SignedTransaction: (testnet: boolean, body: TransferTronTrc10, precision?: number | undefined, provider?: string | undefined) => Promise<string>;
/**
* Get TRC20 balance for the given tron address.
* @param testnet mainnet or testnet version
* @param address the address whose balance is returned
* @param contractAddress the TRC20 contract address
* @param provider
*/
export declare const tronGetAccountTrc20Address: (testnet: boolean, address: string, contractAddress: string, provider?: string | undefined) => Promise<any>;
export declare const getTronTrc20ContractDecimals: (testnet: boolean, contractAddress: string, provider?: string | undefined) => Promise<number>;
/**
* Sign Tron custodial transfer transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param feeLimit
* @param from
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronSmartContractInvocation: (testnet: boolean, body: SmartContractMethodInvocation, feeLimit: number, from?: string | undefined, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron custodial transfer batch transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param feeLimit
* @param from
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronCustodialTransferBatch: (testnet: boolean, body: SmartContractMethodInvocation, feeLimit: number, from?: string | undefined, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron TRC20 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronTrc20SignedTransaction: (testnet: boolean, body: TransferTronTrc20, provider?: string | undefined) => Promise<string>;
/**
* Sign create Tron TRC10 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronCreateTrc10SignedTransaction: (testnet: boolean, body: CreateTronTrc10, provider?: string | undefined) => Promise<string>;
/**
* Sign create Tron TRC20 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronCreateTrc20SignedTransaction: (testnet: boolean, body: CreateTronTrc20, provider?: string | undefined) => Promise<string>;
/**
* Prepare Tron transaction for KMS. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronSignedKMSTransaction: (testnet: boolean, body: TransferTron, provider?: string | undefined) => Promise<string>;
/**
* Prepare Tron Freeze balance transaction for KMS. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronFreezeKMSTransaction: (testnet: boolean, body: FreezeTron, provider?: string | undefined) => Promise<string>;
/**
* Prepare Tron TRC10 transaction for KMS. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param precision
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronTrc10SignedKMSTransaction: (testnet: boolean, body: TransferTronTrc10, precision?: number | undefined, provider?: string | undefined) => Promise<string>;
/**
* Prepare Tron TRC20 transaction for KMS. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronTrc20SignedKMSTransaction: (testnet: boolean, body: TransferTronTrc20, provider?: string | undefined) => Promise<string>;
/**
* Prepare create Tron TRC10 transaction for KMS. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronCreateTrc10SignedKMSTransaction: (testnet: boolean, body: CreateTronTrc10, provider?: string | undefined) => Promise<string>;
/**
* Prepare create Tron TRC20 transaction for KMS. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronCreateTrc20SignedKMSTransaction: (testnet: boolean, body: CreateTronTrc20, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron deploy trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronDeployTrc721SignedTransaction: (testnet: boolean, body: TronDeployTrc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron generate custodial wallet transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronGenerateCustodialWalletSignedTransaction: (testnet: boolean, body: GenerateTronCustodialAddress, provider?: string | undefined) => Promise<string>;
/**
* Sign TRON deploy new smart contract for NFT marketplace transaction. 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 provider will be used.
* @returns {txId: string} Transaction ID of the operation, or signatureID in case of Tatum KMS
*/
export declare const prepareTronDeployMarketplaceListingSignedTransaction: (testnet: boolean, body: DeployTronMarketplaceListing, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron deploy trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronMintCashbackTrc721SignedTransaction: (testnet: boolean, body: TronMintTrc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron mint trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronMintTrc721SignedTransaction: (testnet: boolean, body: TronMintTrc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron transfer trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronTransferTrc721SignedTransaction: (testnet: boolean, body: TronTransferTrc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron burn trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronBurnTrc721SignedTransaction: (testnet: boolean, body: TronBurnTrc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron mint multiple trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronMintMultipleTrc721SignedTransaction: (testnet: boolean, body: TronMintMultipleTrc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron update cashback for author trc721 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param body content of the transaction to broadcast
* @param provider
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareTronUpdateCashbackForAuthorTrc721SignedTransaction: (testnet: boolean, body: TronUpdateCashbackTrc721, provider?: string | undefined) => Promise<string>;
/**
* Sign Tron pending transaction from Tatum KMS
* @param tx pending transaction from KMS
* @param fromPrivateKey private key to sign transaction with.
* @param testnet mainnet or testnet version
* @returns transaction data to be broadcast to blockchain.
*/
export declare const signTrxKMSTransaction: (tx: TransactionKMS, fromPrivateKey: string, testnet: boolean) => Promise<string>;
export declare const transferHexToBase58Address: (address: string) => any;