@tatumio/tatum-v1
Version:
Tatum API client allows browsers and Node.js clients to interact with Tatum API.
55 lines (54 loc) • 2.9 kB
TypeScript
import { PrepareEthErc20SignedOffchainTransaction, PrepareEthSignedOffchainTransaction, TransactionKMS, TransferEthOffchain } from '../model';
/**
* Send Ethereum transaction from Tatum Ledger account 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
* @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 or id of the withdrawal, if it was not cancelled automatically
*/
export declare const sendEthOffchainTransaction: (testnet: boolean, body: TransferEthOffchain, provider?: string | undefined) => Promise<import("../model").SignatureId | {
id: string;
txId: string;
completed: boolean;
} | {
id: string;
}>;
/**
* Send Ethereum ERC20 transaction from Tatum Ledger account 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
* @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 or id of the withdrawal, if it was not cancelled automatically
*/
export declare const sendEthErc20OffchainTransaction: (testnet: boolean, body: TransferEthOffchain, provider?: string | undefined) => Promise<import("../model").SignatureId | {
id: string;
}>;
/**
* Sign Ethereum 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
* @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 signEthOffchainKMSTransaction: (tx: TransactionKMS, fromPrivateKey: string, testnet: boolean, provider?: string | undefined) => Promise<string>;
/**
* Sign Ethereum transaction with private keys locally. Nothing is broadcast to the blockchain.
* @returns transaction data to be broadcast to blockchain.
* @param body
*/
export declare const prepareEthSignedOffchainTransaction: (body: PrepareEthSignedOffchainTransaction) => Promise<{
txData: string;
gasLimit: string | number;
}>;
/**
* Sign Ethereum custom ERC20 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @returns transaction data to be broadcast to blockchain.
* @param body
*/
export declare const prepareEthErc20SignedOffchainTransaction: (body: PrepareEthErc20SignedOffchainTransaction) => Promise<{
txData: string;
gasLimit: string | number;
}>;