import { MempoolUTXO, NetworkFees, OutspendStatus, TxInfo, UtxoInfo } from './types'; /** * Default mempool API URLs by network. */ export declare const MEMPOOL_API_URLS: { readonly mainnet: "https://mempool.space/api"; readonly testnet: "https://mempool.space/testnet/api"; readonly signet: "https://mempool.space/signet/api"; }; /** * Push a signed transaction to the Bitcoin network. * * @param txHex - The signed transaction hex string * @param apiUrl - Mempool API base URL * @returns The transaction ID * @throws Error if broadcasting fails */ export declare function pushTx(txHex: string, apiUrl: string): Promise; /** * Get transaction information from mempool. * * @param txid - The transaction ID * @param apiUrl - Mempool API base URL * @returns Transaction information */ export declare function getTxInfo(txid: string, apiUrl: string): Promise; /** * Get the current block tip height. * * Source: mempool.space API — `GET /api/blocks/tip/height` returns the height * of the most recent block as a plain-text integer. * * @param apiUrl - Mempool API base URL * @returns The height of the most recent block * @throws Error if the response is not a whole number */ export declare function getTipHeight(apiUrl: string): Promise; /** * Get the spend status of a specific transaction output. * * Calls the esplora-compatible `GET /tx/{txid}/outspend/{vout}` endpoint * (mempool.space backend, mempool/electrs `rest.rs`). Returns * `{ spent: false }` for an unspent output, or * `{ spent: true, txid, vin, status }` when the output has been spent. * * @param txid - The transaction id whose output is being checked (no 0x prefix) * @param vout - The output index * @param apiUrl - Mempool API base URL * @returns The output's spend status */ export declare function getOutspend(txid: string, vout: number, apiUrl: string): Promise; /** * Get the hex representation of a transaction. * * @param txid - The transaction ID * @param apiUrl - Mempool API base URL * @returns The transaction hex string * @throws Error if the request fails or transaction is not found */ export declare function getTxHex(txid: string, apiUrl: string): Promise; /** * Get UTXO information for a specific transaction output. * * This is used for constructing PSBTs where we need the witnessUtxo data. * Only supports Taproot (P2TR) and native SegWit (P2WPKH, P2WSH) script types. * * @param txid - The transaction ID containing the UTXO * @param vout - The output index * @param apiUrl - Mempool API base URL * @returns UTXO information with value and scriptPubKey */ export declare function getUtxoInfo(txid: string, vout: number, apiUrl: string): Promise; /** * Get all UTXOs for a Bitcoin address. * * @param address - The Bitcoin address * @param apiUrl - Mempool API base URL * @returns Array of UTXOs sorted by value (largest first) */ export declare function getAddressUtxos(address: string, apiUrl: string): Promise; /** * Get the mempool API URL for a given network. * * @param network - Bitcoin network (mainnet, testnet, signet) * @returns The mempool API URL */ export declare function getMempoolApiUrl(network: "mainnet" | "testnet" | "signet"): string; /** * Transaction summary from address transactions endpoint. */ export interface AddressTx { txid: string; status: { confirmed: boolean; block_height?: number; }; } /** * Get recent transactions for a Bitcoin address. * * Returns the last 25 confirmed transactions plus any unconfirmed (mempool) transactions. * This is useful for checking if a specific transaction has been broadcast. * * @param address - The Bitcoin address * @param apiUrl - Mempool API base URL * @returns Array of recent transactions */ export declare function getAddressTxs(address: string, apiUrl: string): Promise; /** * Fetches Bitcoin network fee recommendations from mempool.space API. * * @param apiUrl - Mempool API base URL * @returns Fee rates in sat/vbyte for different confirmation times * @throws Error if request fails or returns invalid data * * @see https://mempool.space/docs/api/rest#get-recommended-fees */ export declare function getNetworkFees(apiUrl: string): Promise; //# sourceMappingURL=mempoolApi.d.ts.map