/** * @see HttpHeader */ export declare const HttpHeaderSchema: import("zod").ZodObject<{ name: import("zod").ZodString; value: import("zod").ZodString; }, import("zod/v4/core").$strip>; /** * @see HttpMethod */ export declare const HttpMethodSchema: import("zod").ZodEnum<{ GET: "GET"; POST: "POST"; HEAD: "HEAD"; }>; /** * @see HttpRequestArgs */ export declare const HttpRequestArgsSchema: import("zod").ZodObject<{ url: import("zod").ZodURL; method: import("zod").ZodEnum<{ GET: "GET"; POST: "POST"; HEAD: "HEAD"; }>; headers: import("zod").ZodOptional>>; body: import("zod").ZodOptional, Uint8Array>>; maxResponseBytes: import("zod").ZodOptional; transform: import("zod").ZodOptional; isReplicated: import("zod").ZodOptional; }, import("zod/v4/core").$strip>; /** * @see HttpRequestResult */ export declare const HttpRequestResultSchema: import("zod").ZodObject<{ status: import("zod").ZodBigInt; headers: import("zod").ZodArray>; body: import("zod").ZodCustom, Uint8Array>; }, import("zod/v4/core").$strip>; /** * @see TransformArgs */ export declare const TransformArgsSchema: import("zod").ZodObject<{ response: import("zod").ZodObject<{ status: import("zod").ZodBigInt; headers: import("zod").ZodArray>; body: import("zod").ZodCustom, Uint8Array>; }, import("zod/v4/core").$strip>; context: import("zod").ZodCustom, Uint8Array>; }, import("zod/v4/core").$strip>; /** * An HTTP header consisting of a name and value. */ export interface HttpHeader { /** * The header name. */ name: string; /** * The header value. */ value: string; } /** * The HTTP method for the request. */ export type HttpMethod = 'GET' | 'POST' | 'HEAD'; /** * The arguments for an HTTP request. */ export interface HttpRequestArgs { /** * The requested URL. */ url: string; /** * The HTTP method. */ method: HttpMethod; /** * List of HTTP request headers and their corresponding values. */ headers?: HttpHeader[]; /** * Optionally provide request body. */ body?: Uint8Array; /** * The maximal size of the response in bytes. */ maxResponseBytes?: bigint; /** * The name of a query function used to transform the response before consensus - for example, to trim headers. * If provided, a corresponding query must be declared using {@link defineQuery}. */ transform?: string; /** * Whether all nodes should perform the request and agree on the response, or just one node. * Using a single node is cheaper but the response is not verified by others - suitable when you trust the data source or consistency is not critical. * Defaults to all nodes if not specified. */ isReplicated?: boolean; } /** * The result of an HTTP request. */ export interface HttpRequestResult { /** * The response status (e.g. 200, 404). */ status: bigint; /** * List of HTTP response headers and their corresponding values. */ headers: HttpHeader[]; /** * The response's body. */ body: Uint8Array; } /** * The arguments passed to an HTTP response transform function. */ export interface TransformArgs { /** * The raw HTTP response to be transformed. */ response: HttpRequestResult; /** * Context for response transformation */ context: Uint8Array; }