HttpiConnectOptions
Defined in: src/client/httpi.ts:44
Options for httpiConnect, the typed HTTP-over-Iroh VGI client.
Extends
Section titled “Extends”Omit<HttpConnectOptions,"fetch">
Properties
Section titled “Properties”acceptedMaxResponseBytes?
Section titled “acceptedMaxResponseBytes?”optional acceptedMaxResponseBytes?: number;Defined in: src/client/types.ts:49
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.
Inherited from
Section titled “Inherited from”HttpConnectOptions.acceptedMaxResponseBytes
authorization?
Section titled “authorization?”optional authorization?: string;Defined in: src/client/types.ts:36
Authorization header value (e.g. “Bearer
Inherited from
Section titled “Inherited from”HttpConnectOptions.authorization
binding?
Section titled “binding?”optional binding?: IrohHttpBinding;Defined in: src/client/httpi.ts:50
Test/application-pinned native binding. Defaults to @momics/iroh-http-node.
closeNode?
Section titled “closeNode?”optional closeNode?: boolean;Defined in: src/client/httpi.ts:62
Close an application-owned node when the RPC client closes. Defaults to false.
compressionLevel?
Section titled “compressionLevel?”optional compressionLevel?: number;Defined in: src/client/types.ts:34
When set, request bodies are zstd-compressed at this level and Accept-Encoding: zstd is sent. Omit to disable compression.
Inherited from
Section titled “Inherited from”HttpConnectOptions.compressionLevel
description?
Section titled “description?”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 introspect at all. 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.
Inherited from
Section titled “Inherited from”HttpConnectOptions.description
directAddresses?
Section titled “directAddresses?”optional directAddresses?: readonly string[];Defined in: src/client/httpi.ts:52
Known direct socket addresses for the remote endpoint.
externalFetch?
Section titled “externalFetch?”optional externalFetch?: typeof fetch;Defined in: src/client/httpi.ts:60
Fetch used for non-httpi external-location URLs. Defaults to global fetch.
externalLocation?
Section titled “externalLocation?”optional externalLocation?: ExternalLocationConfig;Defined in: src/client/types.ts:38
External storage config for resolving externalized batches.
Inherited from
Section titled “Inherited from”HttpConnectOptions.externalLocation
optional node?: IrohHttpNode;Defined in: src/client/httpi.ts:46
Application-owned Iroh node. Omit to create one with the native binding.
nodeOptions?
Section titled “nodeOptions?”optional nodeOptions?: object;Defined in: src/client/httpi.ts:48
Options used only when this function creates the native Iroh node.
onLog?
Section titled “onLog?”optional onLog?: (msg) => void;Defined in: src/client/types.ts:32
Callback invoked for each log/error message the server emits during a request.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
msg |
LogMessage |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”prefix?
Section titled “prefix?”optional prefix?: string;Defined in: src/client/types.ts:30
Route prefix the server mounts its methods under (e.g. /api). Trailing slashes are stripped. Defaults to no prefix.
Inherited from
Section titled “Inherited from”protocol?
Section titled “protocol?”optional protocol?: string;Defined in: src/client/types.ts:28
Which protocol to bind to, skipping reflection’s list_protocols hop.
Introspection is two round trips – what does this server host, then describe one of them – because a server may host several and there is no longer a single “the” protocol to ask about without asking. Naming one here answers the first question locally. Defaults to the first hosted protocol that is not framework-reserved.
Inherited from
Section titled “Inherited from”remoteRelayUrl?
Section titled “remoteRelayUrl?”optional remoteRelayUrl?: string;Defined in: src/client/httpi.ts:54
Known relay URL for the remote endpoint.
requestTimeoutMs?
Section titled “requestTimeoutMs?”optional requestTimeoutMs?: number;Defined in: src/client/httpi.ts:56
Complete deadline for each iroh-http request.
signal?
Section titled “signal?”optional signal?: AbortSignal;Defined in: src/client/httpi.ts:58
Cancels every subsequent request made by this client.
