import { BaseBlockchain } from './base-blockchain.js'; import { type AddressCallback, type TransactionCallback, type BlockchainTransaction, type BlockchainUTXO } from './types.js'; import { type BaseStore } from '../storage'; import { ExtMap, Transaction } from '@xocash/primitives'; import { ElectrumClient, RPCParameter } from '@electrum-cash/network'; import { type ElectrumProtocolEvents, type AddressSubscribeNotification, type HeadersSubscribeNotification, type TransactionSubscribeNotification } from '@electrum-cash/protocol'; export interface BroadcastOpts { timeoutMs: number; waitUntilSeen: boolean; } export type BlockchainElectrumEvents = { isConnectedUpdated: boolean; blockHeightUpdated: number | undefined; }; export type BlockchainElectrumOpts = { servers: Array; application: string; }; export declare class BlockchainElectrum extends BaseBlockchain { readonly store: BaseStore; readonly opts: BlockchainElectrumOpts; electrumClient: ElectrumClient; isConnected: boolean; blockHeight: number | undefined; addressSubscriptions: Map>; transactionSubscriptions: Map>; constructor(store?: BaseStore, opts?: BlockchainElectrumOpts); start(): Promise; stop(): Promise; fetchUnspents(address: string): Promise>; fetchTransaction(txHash: string): Promise; fetchTransactions(address: string): Promise>; waitForTransaction(tx: Uint8Array | Transaction | string, timeoutMs?: number): Promise; broadcastTransaction(tx: Transaction | Uint8Array | string, opts?: BroadcastOpts): Promise; subscribeAddress(address: string, callback: AddressCallback): Promise; unsubscribeAddress(address: string, callback: AddressCallback): Promise; subscribeTransaction(transactionHash: string, callback: TransactionCallback): Promise; unsubscribeTransaction(transactionHash: string, callback: TransactionCallback): Promise; request(method: string, ...parameters: Array): Promise; protected handleNewBlockchainHeaders(notification: HeadersSubscribeNotification): void; protected handleAddressStatusUpdates(notification: AddressSubscribeNotification): Promise; protected handleTransactionStatusUpdates(notification: TransactionSubscribeNotification): void; }