import type { Client } from '../Client/client'; import type { UtxoBlockResponse, UtxoBlockByHeightResponse, UtxoBroadcastTxResponse, UtxoEstimateSizeBody, UtxoEstimateSizeResponse, UtxoFeeRateResponse, UtxoLatestBlockResponse, UtxoMempoolResponseSchema, UtxoTxDetailsResponse } from '../Client'; import { Amount } from '../utils/Amount'; import type { ChainGateGlobal } from '../ChainGate/ChainGate'; export type UtxoNetwork = 'bitcoin' | 'litecoin' | 'dogecoin' | 'bitcoincash' | 'bitcointestnet'; export declare class UtxoExplorer { /** @internal */ readonly client: Client; /** @internal */ readonly network: UtxoNetwork; /** @internal */ readonly baseUrl: string; /** @internal */ readonly apiKey: string; /** @internal */ readonly global: ChainGateGlobal; constructor(client: Client, network: UtxoNetwork, baseUrl: string, apiKey: string, global: ChainGateGlobal); /** * Creates an Amount from a raw satoshi bigint value. * @internal */ amountFromSat(sat: bigint): Amount; /** Returns the native coin data for this network. */ private nativeData; /** * Returns the confirmed and unconfirmed balance for a UTXO address. * * The `confirmed` and `unconfirmed` fields are returned as `Amount` instances. */ getAddressBalance(address: string): Promise<{ address: string; confirmed: Amount; unconfirmed: Amount; }>; /** * Returns paginated transaction history for a UTXO address. * * Each transaction's `amount` and `addressBalance` are returned as `Amount` instances. */ getAddressHistory(address: string, page?: string): Promise<{ page: number; transactions: Array<{ height: number; txid: string; amount: Amount; addressBalance: Amount; }>; }>; /** * Returns paginated unspent transaction outputs (UTXOs) for a UTXO address. * * Each UTXO's `amount` is returned as an `Amount` instance. */ getUtxosByAddress(address: string, page?: string): Promise<{ address: string; page: number; utxos: Array<{ txid: string; n: number; amount: Amount; height: number; script: string; }>; }>; /** * Returns detailed information about a transaction by its ID. * * The `fee`, `feePerKb`, and all input/output `amount` fields are returned as `Amount` instances. */ getTransactionDetails(transactionId: string): Promise & { fee: Amount; feePerKb: Amount; inputs: Array<{ address?: string | null; amount: Amount; txId?: string | null; n?: number | null; script?: string | null; scriptSig?: string | null; }>; outputs: Array<{ address: string; amount: Amount; n: number; script: string; }>; }>; /** * Returns block details for the given block hash. */ getBlockByHash(blockHash: string): Promise; /** * Returns block details for the given block height. */ getBlockByHeight(blockHeight: string): Promise; /** * Returns the latest block number and hash. */ getLatestBlock(): Promise; /** * Returns fee rate estimates for 4 priority tiers in satoshis per KB. */ getFeeRate(): Promise; /** * Returns paginated mempool transaction IDs. */ getMempool(page?: string): Promise; /** * Returns the URL endpoint for the SVG logo of this UTXO network. */ getLogoUrl(): string; /** * Broadcasts a signed raw transaction to the UTXO network. */ broadcastTransaction(transactionRaw: string): Promise; /** * Estimates the byte size of a transaction given inputs and outputs. */ estimateTransactionSize(body: UtxoEstimateSizeBody): Promise; }