Optional
identitySecret: CryptoKeyOptional
identityPublic: CryptoKeyOptional
identityOptional
identityOptional
myOptional
preExport identity keypair data for storage. Returns an object with hex-encoded keys that can be stored by the application. Uses raw format for better browser compatibility.
Search the one-time-keys pool for a given X25519 public key. Return the corresponding secret key (and delete it from the pool).
Generates an identity keypair (Ed25519).
Get (and generate, if it doesn't exist) the pre-key keypair.
This only returns the X25519 keys. It doesn't include the Ed25519 signature.
Get the stored identity keypair (Ed25519). If no identity keys are set, this will generate new ones.
Get (and generate, if it doesn't exist) the pre-key keypair.
This only returns the X25519 keys. It doesn't include the Ed25519 signature.
Load an Ed25519 keypair from stored data. This method now expects the user to provide the stored data directly.
Optional
storedData: { pk: string; sk: string }Object with 'sk' and 'pk' hex strings
Sets the identity keys stored in this object.
Optional
identityPublic: CryptoKey
This is an example implementation of an identity management class.
You almost certainly want to build your own.