kernl API
    Preparing search index...

    Function createMemoryRelays

    • Relays that live in the page, for kernl's preview: applesauce's real RelayPool dials them through a WebSocket that never leaves memory, and they answer as NIP-01 relays do. Every URL answers from one store, so a publish to four relays is saved once and acknowledged four times.

      Parameters

      Returns MemoryRelays

      The socket constructor, and the store to seed and read.

      const relays = createMemoryRelays();
      relays.seed(profileEvent);
      const pool = new RelayPool({ WebSocket: relays.WebSocket });