import type { HealthSnapshot, PythiaClientOptions, ReadInput, SendInput, PollInput, PollResult } from "./types.js"; /** * The dependency-light Pythia consumer SDK. Wraps the keyless gateway's * transport surface over a configurable `baseUrl` with an injectable * `fetchImpl`: a generic dirty `read`, a keyless `send` (relay of caller-SIGNED * cmds), a tx-status `poll`, and `health`. The client holds no keys and signs * nothing — `read` and `send` relay caller-supplied payloads and return the * node response verbatim; only Pythia's OWN error envelopes are mapped to typed * errors. */ export declare class PythiaClient { private readonly transport; constructor(options: PythiaClientOptions); /** Throw the mapped typed error for any non-2xx service response. */ private assertOk; /** * Return the parsed body for a relay response. On 2xx the node body is * returned as-is. On a non-2xx that is one of Pythia's OWN error envelopes * (self-identifying via `code`), the mapped typed error is thrown; a * node-arrived HTTP error (no `code`) is returned verbatim as the node's own * payload, never remapped — preserving the verbatim-relay contract. */ private relayResult; /** * `POST /stoachain/read` — a generic dirty read. The caller supplies the Pact * `code` (plus optional `data`/`sender`/`chainId`); the node evaluates it and * the response is returned verbatim. A read that needs keys/caps comes back as * the node's own `{result:{status:"failure"}}` — that is a real answer, not an * error, and is returned as-is. */ read(input: ReadInput): Promise; /** * `POST /stoachain/send` — a keyless broadcast. Relays the caller-SIGNED * `cmds` array to the node's /send verbatim and returns the node response * as-is. The client adds no key material and signs nothing. */ send(input: SendInput): Promise; /** * `POST /stoachain/poll` — tx-status polling. Resolves each request key's * pending-vs-final status and confirmation depth, returned as a typed * {@link PollResult} keyed by request key. */ poll(input: PollInput): Promise; /** `GET /healthz` — liveness + active routing + per-source reachability * (always HTTP 200). */ health(): Promise; }