import { Client } from "./lib/client.js"; import type { Callbacks, CreateClientParams, ElectrumConfig, ElectrumRequestBatchParams, ElectrumRequestParams, PersistencePolicy, Protocol } from "./types"; export declare class ElectrumClient extends Client { private readonly onConnectCallback; private readonly onCloseCallback; private readonly onLogCallback; private timeLastCall; private persistencePolicy; private electrumConfig; private pingInterval; versionInfo: [string, string]; /** * Constructs an instance of ElectrumClient. * * @param {number} port - The port number to connect to. * @param {string} host - The host address to connect to. * @param {Protocol} protocol - The protocol to use for the connection. * @param {Callbacks} [callbacks] - Optional callbacks for connection events. */ constructor(port: number, host: string, protocol: Protocol, callbacks?: Callbacks); /** * Creates an instance of ElectrumClient and initializes it with the provided configuration. * * @param {CreateClientParams} params - The parameters required to create and initialize the client. * @param {number} params.port - The port number to connect to. * @param {string} params.host - The host address to connect to. * @param {Protocol} params.protocol - The protocol to use for the connection. * @param {Callbacks} [params.callbacks] - Optional callbacks for connection events. * @param {ElectrumConfig} params.electrumConfig - The Electrum configuration to use. * @param {PersistencePolicy} [params.persistencePolicy] - Optional persistence policy for the client. * * @returns {Promise} A promise that resolves to an initialized ElectrumClient instance. */ static createClient(params: CreateClientParams): Promise; /** * Initializes the Electrum client with the provided configuration and persistence policy. * * @param {ElectrumConfig} electrumConfig - The Electrum configuration to use. * @param {PersistencePolicy} [persistencePolicy] - Optional persistence policy for the client. * @returns {Promise} A promise that resolves to the initialized ElectrumClient instance. */ initElectrum(electrumConfig: ElectrumConfig, persistencePolicy?: PersistencePolicy): Promise; protected request(method: string, params: ElectrumRequestParams): Promise; protected requestBatch(method: string, params: ElectrumRequestParams, secondParam?: ElectrumRequestBatchParams): Promise; protected onClose(): void; private keepAlive; /** * Closes the Electrum client connection and stops the keep-alive ping interval. * * @returns {void} */ close(): void; private reconnect; private log; server_version(client_name: string, protocol_version: string | [string, string]): Promise; server_banner(): Promise; server_features(): Promise; server_ping(): Promise; server_addPeer(features: any): Promise; serverDonation_address(): Promise; serverPeers_subscribe(): Promise; blockchainAddress_getProof(address: string): Promise; blockchainScripthash_getBalance(scripthash: string): Promise; blockchainScripthash_getBalanceBatch(scripthashes: string[]): Promise; blockchainScripthash_listunspentBatch(scripthashes: string[]): Promise; blockchainScripthash_getHistory(scripthash: string): Promise; blockchainScripthash_getHistoryBatch(scripthashes: string[]): Promise; blockchainScripthash_getMempool(scripthash: string): Promise; blockchainScripthash_listunspent(scripthash: string): Promise; blockchainScripthash_subscribe(scripthash: string): Promise; blockchainBlock_getHeader(height: number): Promise; blockchainBlock_headers(start_height: number, count: number): Promise; blockchainEstimatefee(number: number): Promise; blockchainHeaders_subscribe(): Promise; blockchain_relayfee(): Promise; blockchainTransaction_broadcast(rawtx: string): Promise; blockchainTransaction_get(tx_hash: string, verbose?: boolean): Promise; blockchainTransaction_getBatch(tx_hashes: string[], verbose?: boolean): Promise; blockchainTransaction_getMerkle(tx_hash: string, height: number): Promise; mempool_getFeeHistogram(): Promise; blockchainUtxo_getAddress(tx_hash: string, index: number): Promise; blockchainNumblocks_subscribe(): Promise; blockchainBlock_getChunk(index: number): Promise; blockchainAddress_getBalance(address: string): Promise; blockchainAddress_getHistory(address: string): Promise; blockchainAddress_getMempool(address: string): Promise; blockchainAddress_listunspent(address: string): Promise; blockchainAddress_subscribe(address: string): Promise; } //# sourceMappingURL=index.d.ts.map