@tatumio/tatum-v1
Version:
Tatum API client allows browsers and Node.js clients to interact with Tatum API.
39 lines (38 loc) • 2.44 kB
TypeScript
import { KeyPair, TransactionKMS, TransferBtcBasedOffchain, WithdrawalResponseData } from '../model';
/**
* Send Bitcoin 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
* @returns transaction id of the transaction in the blockchain or id of the withdrawal, if it was not cancelled automatically
*/
export declare const sendBitcoinOffchainTransaction: (testnet: boolean, body: TransferBtcBasedOffchain) => Promise<import("../model").SignatureId | {
id: string;
txId: string;
completed: boolean;
} | {
id: string;
}>;
/**
* Sign Bitcoin pending transaction from Tatum KMS
* @param tx pending transaction from KMS
* @param mnemonic mnemonic to generate private keys to sign transaction with.
* @param testnet mainnet or testnet version
* @returns transaction data to be broadcast to blockchain.
*/
export declare const signBitcoinOffchainKMSTransaction: (tx: TransactionKMS, mnemonic: string, testnet: boolean) => Promise<any>;
/**
* Sign Bitcoin transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param testnet mainnet or testnet version
* @param data data from Tatum system to prepare transaction from
* @param amount amount to send
* @param address recipient address, if multiple recipients are present, it should be string separated by ','
* @param mnemonic mnemonic to sign transaction from. mnemonic or keyPair must be present
* @param keyPair keyPair to sign transaction from. keyPair or mnemonic must be present
* @param changeAddress address to send the rest of the unused coins
* @param xpub xpub of the wallet
* @param multipleAmounts if multiple recipients are present in the address separated by ',', this should be list of amounts to send
* @param signatureId if using KMS, this is signatureId of the wallet representing mnemonic
* @returns transaction data to be broadcast to blockchain.
*/
export declare const prepareBitcoinSignedOffchainTransaction: (testnet: boolean, data: WithdrawalResponseData[], amount: string, address: string, mnemonic?: string | undefined, keyPair?: KeyPair[] | undefined, changeAddress?: string | undefined, xpub?: string | undefined, multipleAmounts?: string[] | undefined, signatureId?: string | undefined) => Promise<any>;