import { GetScriptHashHistoryResult, GetUtxoStatusResult, PostTxResultForTxid } from '../../sdk/WalletServices.interfaces'; /** * Classify an error-status WoC response and mutate `r` accordingly. */ export declare function handlePostRawTxErrorResponse(r: PostTxResultForTxid, nne: () => Record, response: { data?: unknown; statusText?: unknown; status?: unknown; ok?: boolean; }): void; /** Populate UTXO details from a WoC result array */ export declare function populateUtxoDetails(r: GetUtxoStatusResult, result: Array<{ tx_hash: string; value: number; height: number; tx_pos: number; }>, outpoint?: string): void; /** * Decide whether the ECONNRESET error is retryable and, if not, set `r.error`. * Returns true when the caller should retry, false when it should return. */ export declare function handleUtxoConnReset(r: GetUtxoStatusResult, error_: unknown, url: string, retry: number, maxRetry: number): boolean; export interface ScriptHashHistoryResponse { ok: boolean; status: number; statusText: string; data?: { result: Array<{ tx_hash: string; height?: number; }>; error?: string; }; } /** * Inspect a WoC script-hash history response and update `r` in-place. * * Returns: * - `'continue'` — rate-limited, caller should retry * - `'return'` — done, caller should return `r` * - `'ok'` — response was successful, continue parsing */ export declare function handleScriptHashHistoryResponse(r: GetScriptHashHistoryResult, response: ScriptHashHistoryResponse, methodName: string, retry: number): 'continue' | 'return' | 'ok'; /** * Decide whether a caught error is retryable for script-hash history calls. * If not retryable, sets `r.error` and returns false. */ export declare function handleScriptHashHistoryCatch(r: GetScriptHashHistoryResult, error_: unknown, url: string, methodName: string, retry: number, maxRetry: number): boolean; export type MerklePathNoteWhat = 'getMerklePathRetry' | 'getMerklePathNotFound' | 'getMerklePathBadStatus' | 'getMerklePathNoData' | 'getMerklePathSuccess' | 'getMerklePathNoHeader' | 'getMerklePathError' | 'getMerklePathInternal'; export interface MerklePathNote { what: MerklePathNoteWhat; name: string; status?: number; statusText?: string; target?: string; code?: string; description?: string; [key: string]: boolean | string | number | undefined; } export declare function makeMerklePathNote(what: MerklePathNoteWhat, name: string, extra?: Partial): MerklePathNote; /** * Classify a non-OK status response for getMerklePath. * * Returns `'retry'` when the request was rate-limited and the caller should retry, * `'notFound'` for 404, `'badStatus'` for other non-200 codes. */ export declare function classifyMerklePathResponse(status: number, statusText: string, retry: number): 'retry' | 'notFound' | 'badStatus' | 'ok'; //# sourceMappingURL=whatsOnChainHelpers.d.ts.map