This is an example implementation of an identity management class.

You almost certainly want to build your own.

Implements

Constructors

Properties

identityPublic?: Ed25519PublicKey
identitySecret?: Ed25519SecretKey
myIdentityString?: string
oneTimeKeys: Map<string, X25519SecretKey>
preKey?: PreKeyPair
sodium?: SodiumPlus

Methods

  • Get the instance of libsodium.

    Returns Promise<SodiumPlus>

  • Save a given identity keypair (Ed25519) to the filesystem.

    Parameters

    • identitySecret: Ed25519SecretKey
    • OptionalfilePath: string

    Returns Promise<void>