kernl API
    Preparing search index...

    Function createSealedGroupStore

    • One of the group library's key-value stores, sealed to the account. The library keeps group secrets, its own signing keys and pending invites in these stores; kernl writes each store to storage as one value that the account signer encrypted to itself with nip44, split into parts NIP-44 can carry. Nothing readable reaches storage, so the key rule in SOUL.md opinion 1 holds for every secret the library generates (D-018).

      The store is decrypted once and then served from memory, so an extension or remote signer is asked once per store per page load. Writes are applied in order.

      Type Parameters

      • T

      Parameters

      • options: SealedGroupStoreOptions

        Backing storage, the account signer and its public key.

      • name: string

        Which of the library's stores this is; part of the storage key.

      Returns GenericKeyValueStore<T>

      A GenericKeyValueStore for MarmotClient.

      const groupStateStore = createSealedGroupStore({ storage: localStorage, signer: account, owner: account.pubkey }, 'groups');
      await groupStateStore.setItem('note', new Uint8Array([1, 2]));
      await groupStateStore.getItem('note'); // Uint8Array [1, 2]