kernl API
    Preparing search index...

    Function createKernlAccounts

    • Create the shell's account manager with the common applesauce account types registered, state restored from kernl:accounts:v1 and kernl:active-account:v1, and every later change persisted.

      Keys live only inside applesauce signer instances: a PrivateKeyAccount is refused at addAccount with denied:plaintext-key-persistence, and any such entry found in storage is dropped on restore. Wrap a local key as a PasswordAccount before adding it.

      Parameters

      • storage: StorageLike

        Where accounts and the active id are persisted.

      Returns AccountManager

      The account manager.

      const accounts = createKernlAccounts(localStorage);
      accounts.addAccount(PasswordAccount.fromNcryptsec(pubkey, ncryptsec));
      accounts.setActive(accounts.accounts[0]!);