import { BaseBlockchain } from './base-blockchain.js'; import { type AddressCallback, type TransactionCallback } from './types.js'; import { BlockchainElectrum } from './blockchain-electrum.js'; import { BlockchainLocal } from './blockchain-local.js'; import { Transaction } from '@xocash/primitives'; /** * The idea here is that this will implement the IBlockchain interface. * But, it will allow the dev to specify multiple child IBlockchain interfaces for configuration. * So, if the network is not available, it can fallback to the local and sync later. * * @example * ```ts * // Actual interface will be more complex, but this is the rough idea. * const blockchain = new Blockchain([ * new BlockchainLocal(...), * new BlockchainElectrum(...) * ]) * ``` */ export declare class Blockchain extends BaseBlockchain { blockchainLocal: BlockchainLocal; blockchainElectrum: BlockchainElectrum; constructor(); start(): Promise; stop(): Promise; fetchUnspents(address: string): Promise>; fetchTransaction(txHash: string): Promise; fetchTransactions(address: string): Promise>; broadcastTransaction(tx: Uint8Array | Transaction | string): 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; }