minca
ApiCoreFunctions

Function: browserWriterKeys()

function browserWriterKeys(name, provider?): WriterKeySource;

Defined in: packages/core/src/node/writer-keys.ts:83

Lasting keys in this origin's IndexedDB, one database per slot, locked with Web Locks across tabs and workers. The private key is non-extractable: a script in the page can sign with it while it runs, never take it away.

Gives null, so the node makes a key for one run, where there is no IndexedDB or no Web Locks: a key two nodes might hold at once is worse than no lasting key.

Parameters

ParameterTypeDescription
namestringScopes the slots, e.g. the account's store prefix, so signing out deletes the keys with the rest.
provider?CryptoProvider-

Returns

WriterKeySource

On this page