kernl API
    Preparing search index...

    Function createRelayTiers

    • Create the relay tier configuration the shell and kehto both read.

      kehto's RelayConfigHooks knows discovery, super and outbox; kernl adds apps, the tier that serves applet manifests. The configuration is persisted at kernl:relays:v1 and changes$ replays the current value to new subscribers so UI and adapters can share one source.

      Parameters

      • storage: StorageLike

        Where the user's relay choices are persisted.

      • defaults: Partial<Record<RelayTier, readonly string[]>> = {}

        Per-tier overrides applied over DEFAULT_RELAY_TIERS when nothing is persisted.

      Returns RelayTiers

      The tier configuration.

      const tiers = createRelayTiers(localStorage, { apps: ['wss://relay.example'] });
      tiers.add('outbox', 'wss://relay.mine');
      tiers.get().outbox; // ['wss://relay.mine']