/** * Trellis Realtime — Blob Client (browser-safe) * * Fetch-based client for the relay's content-addressed blob HTTP surface. * No Node deps — safe under the `trellis/realtime` browser export condition. * * Blobs are dumb bytes keyed by hash: no graph sync, no subscriptions, no * permission filtering. "Trellis owns semantics, the relay moves bytes." * * @module trellis/realtime */ export interface BlobClientOptions { /** * Base URL of the relay HTTP origin (e.g. `http://localhost:8231`). * Trailing slash is stripped. */ baseUrl: string; /** * When true, re-hash GET responses with `crypto.subtle.digest` and reject * mismatches (corruption / MITM). Default false. */ verify?: boolean; /** Injectable fetch for tests. Default: global `fetch`. */ fetch?: typeof fetch; } export interface BlobClient { /** GET /blob/:hash → bytes, or null on 404. */ get(hash: string): Promise; /** HEAD /blob/:hash → existence. */ has(hash: string): Promise; /** PUT /blob → server-computed hash. Optional name/type for shared listing. */ put(bytes: ArrayBuffer | Uint8Array | Blob, meta?: { name?: string; contentType?: string; }): Promise; /** GET /blob → list hashes currently on the relay. */ list(): Promise>; } /** * Create a browser-safe content-addressed blob client. */ export declare function createBlobClient(opts: BlobClientOptions): BlobClient; //# sourceMappingURL=blob-client.d.ts.map