import type { BalanceResponse, ClientOptions, IndexedOutput, SyncOutput, TxoQueryOptions } from "../types"; import { BaseClient } from "./BaseClient"; /** * Client for /1sat/owner/* routes. * Provides owner (address) queries and sync. * * Routes: * - GET /:owner/txos - Get TXOs for owner * - GET /:owner/balance - Get balance * - GET /sync?owner=... - SSE stream of outputs for sync (supports multiple owners) */ export declare class OwnerClient extends BaseClient { constructor(baseUrl: string, options?: ClientOptions); /** * Get TXOs owned by an address/owner */ getTxos(owner: string, opts?: TxoQueryOptions & { refresh?: boolean; }): Promise; /** * Get balance for an address/owner */ getBalance(owner: string): Promise; /** * Sync outputs for owner(s) via SSE stream. * The server merges results from all owners in score order. * * @param owners - Array of addresses/owners to sync * @param onOutput - Callback for each output * @param from - Starting score (for pagination/resumption) * @param onDone - Callback when sync completes (client should retry after delay) * @param onError - Callback for errors * @returns Unsubscribe function */ sync(owners: string[], onOutput: (output: SyncOutput) => void, from?: number, onDone?: () => void, onError?: (error: Error) => void): () => void; /** * Sync outputs as an async iterator. * Yields SyncOutput objects until the stream is done. */ syncIterator(owners: string[], from?: number): AsyncGenerator; }