import { Utxo, Network } from '../interfaces.js'; export default interface NetworkProvider { /** * Variable indicating the network that this provider connects to. */ network: Network; /** * Retrieve all UTXOs (confirmed and unconfirmed) for a given address. * @param address The CashAddress for which we wish to retrieve UTXOs. * @returns List of UTXOs spendable by the provided address. */ getUtxos(address: string): Promise; /** * @returns The current block height. */ getBlockHeight(): Promise; /** * Retrieve the Hex transaction details for a given transaction ID. * @param txid Hex transaction ID. * @throws {Error} If the transaction does not exist * @returns The full hex transaction for the provided transaction ID. */ getRawTransaction(txid: string): Promise; /** * Broadcast a raw hex transaction to the Bitcoin Cash network. * @param txHex The raw transaction hex to be broadcast. * @throws {Error} If the transaction was not accepted by the network. * @returns The transaction ID corresponding to the broadcast transaction. */ sendRawTransaction(txHex: string): Promise; }