UNPKG

@tatumio/tatum-v1

Version:

Tatum API client allows browsers and Node.js clients to interact with Tatum API.

58 lines (57 loc) 3.27 kB
import { BlockHash, BtcBlock, BtcInfo, BtcTx, BtcUTXO, TransactionHash } from '../model'; /** * Broadcasts signed transaction to the Btc blockchain. <br> * For more details, see <a href="https://apidoc.tatum.io/#operation/BtcBroadcast" target="_blank">Tatum API documentation</a> */ export declare const btcBroadcast: (txData: string, signatureId?: string | undefined) => Promise<TransactionHash>; /** * Returns information about Btc blockchain. <br> * For more details, see <a href="https://apidoc.tatum.io/#operation/BtcGetBlockChainInfo" target="_blank">Tatum API documentation</a> */ export declare const btcGetCurrentBlock: () => Promise<BtcInfo>; /** * Returns balance on address from Btc blockchain. <br> * For more details, see <a href="https://apidoc.tatum.io/#operation/BtcGetBalanceOfAddress" target="_blank">Tatum API documentation</a> */ export declare const btcGetBalance: (address: string) => Promise<{ incoming: string; outgoing: string; }>; /** * Returns block by its hash from Btc blockchain. <br> * For more details, see <a href="https://apidoc.tatum.io/#operation/BtcGetBlock" target="_blank">Tatum API documentation</a> */ export declare const btcGetBlock: (hash: string) => Promise<BtcBlock>; /** * Returns block hash by index from Btc blockchain. <br> * For more details, see <a href="https://apidoc.tatum.io/#operation/BtcGetBlockHash" target="_blank">Tatum API documentation</a> */ export declare const btcGetBlockHash: (i: number) => Promise<BlockHash>; /** * Returns the UTXO of given transaction and output index from Btc blockchain. <br> * * UTXO means Unspent Transaction Output, which in blockchain terminology means assets that a user has received at a specific address and has not yet spent. * In bitcoin-like blockchains (BTC, LTC, DOGE, BCH), every transaction is built from a list of previously unspent transactions connected to the address. * If a user owns address A, and receives 10 BTC in transaction T1, they can spend a UTXO T1 with a total value of 10 BTC in the next transaction. * The user can spend multiple UTXOs from different addresses in one transaction. * * @param hash Transaction hash. * @param i Index of tx output to check if it has been spent or not. * For more details, see <a href="https://apidoc.tatum.io/#operation/BtcGetUTXO" target="_blank">Tatum API documentation</a> */ export declare const btcGetUTXO: (hash: string, i: number) => Promise<BtcUTXO>; /** * Returns transactions by address from Btc blockchain. <br> * * @param address For which address will be transactions returned. * @param pageSize How many transactions will be returned. Max number of transactions per page is 50. * @param offset Offset to obtain the next page of data. * * For more details, see <a href="https://apidoc.tatum.io/#operation/BtcGetTxByAddress" target="_blank">Tatum API documentation</a> */ export declare const btcGetTxForAccount: (address: string, pageSize?: number, offset?: number) => Promise<BtcTx[]>; /** * Returns transaction by hash from Btc blockchain. <br> * For more details, see <a href="https://apidoc.tatum.io/#operation/BtcGetRawTransaction" target="_blank">Tatum API documentation</a> */ export declare const btcGetTransaction: (hash: string) => Promise<BtcTx>;