import { PythiaClientError } from "./errors.js"; /** * Decode a non-2xx PYTHIA service response into the matching client-side typed * error, discriminating on the envelope's self-identifying `code`: * `pythia_pool_exhausted` → {@link PythiaPoolExhaustedError} (with * `failures`/`chainId`); `pythia_unsupported_chain` → * {@link PythiaUnsupportedChainError}; `pythia_validation` → * {@link PythiaValidationError}; anything else (incl. `pythia_upstream` and an * absent code) → the base {@link PythiaClientError}. Only PYTHIA's own envelopes * reach here — node-arrived relay responses are returned verbatim by the client. */ export declare function mapServiceError(status: number, body: unknown): PythiaClientError; /** Whether a service response body is one of Pythia's OWN error envelopes (as * opposed to a node-arrived relay body). Keys off the self-identifying `code` * discriminator: only Pythia's own bodies carry a known `code`. Used by the * `read`/`send` relays to decide whether a non-2xx response is mapped to a typed * error or returned verbatim — a node's own `{error:"…"}` 400 has no `code` and * is passed through. */ export declare function isPythiaErrorEnvelope(_status: number, body: unknown): boolean;