@nymproject/mix-tunnel • Docs
@nymproject/mix-tunnel / getMixTunnel
Function: getMixTunnel()
getMixTunnel():
Promise<Remote<IMixTunnelWorker>>
Get the singleton tunnel worker handle. The first call spawns the worker and loads smolmix-wasm; subsequent calls return the same handle.
Note: this does NOT call setupMixTunnel automatically. Call it on the
returned handle (or use the top-level setupMixTunnel helper) before
issuing fetch/dns/websocket requests.
Returns
Promise<Remote<IMixTunnelWorker>>
Source
sdk/typescript/packages/mix-tunnel/src/index.ts:47 (opens in a new tab)