Skip to content

instantiateNamEngine

instantiateNamEngine(wasmBinary, factory): Promise<NamEngineModule>

Defined in: packages/chain/src/nam/engine.ts:67

Instantiate the engine from wasm bytes the caller supplies.

The bytes are passed in rather than fetched, and that is a hard requirement, not a preference. An AudioWorkletGlobalScope has no fetch, so the glue’s own loader cannot run there. For the same reason locateFile is stubbed to the identity: a worklet scope has no URL constructor either, and the glue would otherwise build a path it never uses.

ArrayBufferLike

NamEngineFactory

Promise<NamEngineModule>