IdbCredentialStorage
Defined in: src/client/idb-credential-storage.ts:20
Credentials in IndexedDB, which is what a browser offers that can hold a key whose private half is unreadable.
A non-extractable CryptoKeyPair survives a structured clone, so what another
tab reads is a handle that signs and cannot be exported — no key material is
written anywhere.
implements CredentialStorage
Implements
Section titled “Implements”CredentialStorage<ECDSAKeyIdentity>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new IdbCredentialStorage(
options?):IdbCredentialStorage
Defined in: src/client/idb-credential-storage.ts:29
Parameters
Section titled “Parameters”options?
Section titled “options?”Database name, store name and version.
Returns
Section titled “Returns”IdbCredentialStorage
Properties
Section titled “Properties”durable
Section titled “durable”
readonlydurable:true=true
Defined in: src/client/idb-credential-storage.ts:22
Whether what this writes survives the document being torn down.
Implementation of
Section titled “Implementation of”shared
Section titled “shared”
readonlyshared:true=true
Defined in: src/client/idb-credential-storage.ts:21
Whether another tab of this origin reads what this writes.
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”create()
Section titled “create()”create():
Promise<ECDSAKeyIdentity>
Defined in: src/client/idb-credential-storage.ts:49
A fresh identity of this store’s own type, not persisted.
Generation belongs to the store because the medium decides the key type: one that has to serialise needs a key whose private bytes are readable, and one that does not should not have them. Kept together so an application cannot pair a non-extractable key with a store that cannot hold one and find out at runtime.
Returns
Section titled “Returns”Promise<ECDSAKeyIdentity>
Implementation of
Section titled “Implementation of”get(
slot):Promise<Credential<ECDSAKeyIdentity> |null>
Defined in: src/client/idb-credential-storage.ts:53
The credential stored under slot, or null where there is none.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<Credential<ECDSAKeyIdentity> | null>
Implementation of
Section titled “Implementation of”remove()
Section titled “remove()”remove(
slot):Promise<void>
Defined in: src/client/idb-credential-storage.ts:78
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”set(
slot,credential):Promise<void>
Defined in: src/client/idb-credential-storage.ts:70
Parameters
Section titled “Parameters”string
credential
Section titled “credential”Credential<ECDSAKeyIdentity>
Returns
Section titled “Returns”Promise<void>