import type { MeshEnvelope } from "./types.js"; /** * HTTP client for the relay's `/mesh/` endpoints. * * Uses Node 20+ global `fetch` — no extra dependency. The constructor * expects the **canonical http(s):// form** of the relay URL — the same * value returned by `resolveRelayUrl()`. No scheme conversion is done * here; ws(s):// URLs would be passed through to `fetch` and fail. * * Spec: plan/24-mesh-membership.md "API HTTP" section. */ export declare class MeshClient { private readonly baseUrl; constructor(relayUrl: string); /** * `GET /mesh/?since=`. * * `hash` is `sha256(owner_pk)` encoded as **lowercase hex** — the format * the relay stores and the app publishes. Mismatched encodings yield a * silent 404 forever. * * Status mapping: * - 200 → returns a `MeshEnvelope` with base64-decoded `blob` and `sig`. * - 304 / 404 → returns `null` (caller treats as "no update" or "owner * never published"). * - Anything else → throws (caller logs + continues). * * Malformed 200 responses (missing fields, non-string blob/sig) also throw. */ get(hash: string, since?: number): Promise; }