Documentation
    Preparing search index...

    Function createShellBridge

    • Create a ShellBridge instance with dependency injection via hooks.

      Internally creates a Runtime from @kehto/runtime and adapts the browser-oriented ShellAdapter into environment-agnostic RuntimeAdapter.

      Parameters

      • hooks: ShellAdapter

        Host application provides relay pool, auth, config, etc.

      Returns ShellBridge

      A ShellBridge instance ready to handle napplet messages

      import { createShellBridge, type ShellAdapter } from '@kehto/shell';

      const hooks: ShellAdapter = {
      relayPool: myRelayPoolHooks,
      relayConfig: myRelayConfigHooks,
      windowManager: myWindowManagerHooks,
      auth: myAuthHooks,
      config: myConfigHooks,
      hotkeys: myHotkeyHooks,
      workerRelay: myWorkerRelayHooks,
      crypto: myCryptoHooks,
      };
      const bridge = createShellBridge(hooks);