Skip to content

HttpiConnectOptions

Defined in: src/client/httpi.ts:42

Options for httpiConnect, the typed HTTP-over-Iroh VGI client.

optional acceptedMaxResponseBytes?: number;

Defined in: src/client/types.ts:39

Decoded response bytes accepted by this client and advertised on every HTTP request. Minimum 64 KiB. Defaults to 64 MiB in browser/workerd builds and 256 MiB in native builds.

HttpConnectOptions.acceptedMaxResponseBytes


optional authorization?: string;

Defined in: src/client/types.ts:26

Authorization header value (e.g. “Bearer ”). Sent with every request.

HttpConnectOptions.authorization


optional binding?: IrohHttpBinding;

Defined in: src/client/httpi.ts:48

Test/application-pinned native binding. Defaults to @momics/iroh-http-node.


optional closeNode?: boolean;

Defined in: src/client/httpi.ts:60

Close an application-owned node when the RPC client closes. Defaults to false.


optional compressionLevel?: number;

Defined in: src/client/types.ts:24

When set, request bodies are zstd-compressed at this level and Accept-Encoding: zstd is sent. Omit to disable compression.

HttpConnectOptions.compressionLevel


optional description?: ServiceDescription;

Defined in: src/client/types.ts:18

Statically declared service description. When supplied, the client uses these method and stream schemas directly and does not call __describe__. This is required for services that intentionally expose only their declared RPC surface and for exact exchange input schemas that cannot be recovered by inspecting runtime values.

HttpConnectOptions.description


optional directAddresses?: readonly string[];

Defined in: src/client/httpi.ts:50

Known direct socket addresses for the remote endpoint.


optional externalFetch?: typeof fetch;

Defined in: src/client/httpi.ts:58

Fetch used for non-httpi external-location URLs. Defaults to global fetch.


optional externalLocation?: ExternalLocationConfig;

Defined in: src/client/types.ts:28

External storage config for resolving externalized batches.

HttpConnectOptions.externalLocation


optional node?: IrohHttpNode;

Defined in: src/client/httpi.ts:44

Application-owned Iroh node. Omit to create one with the native binding.


optional nodeOptions?: NodeOptions;

Defined in: src/client/httpi.ts:46

Options used only when this function creates the native Iroh node.


optional onLog?: (msg) => void;

Defined in: src/client/types.ts:22

Callback invoked for each log/error message the server emits during a request.

Parameter Type
msg LogMessage

void

HttpConnectOptions.onLog


optional prefix?: string;

Defined in: src/client/types.ts:20

Route prefix the server mounts its methods under (e.g. /api). Trailing slashes are stripped. Defaults to no prefix.

HttpConnectOptions.prefix


optional remoteRelayUrl?: string;

Defined in: src/client/httpi.ts:52

Known relay URL for the remote endpoint.


optional requestTimeoutMs?: number;

Defined in: src/client/httpi.ts:54

Complete deadline for each iroh-http request.


optional signal?: AbortSignal;

Defined in: src/client/httpi.ts:56

Cancels every subsequent request made by this client.