Create a new KeyPair object from raw key byte buffers.
See create for key generation, and fromExportedKey to load previously generated keys.
private key bytes
public key bytes
Create did from public key
the public key, encoded into a did:key:
DID string.
Export the private key (e.g. to save to disk). If saving to disk, MUST be stored securely! See fromExportedKey for loading a KeyPair from an exported key.
the encoded private key string
Return the Base64 encoded public key
the public key, as a base64 encoded string (padded).
Create a signature of msg
using the private signing key.
a message to sign
a Promise that resolves to the signature (as a Uint8Array)
Generate a new KeyPair.
a Promise that resolves to the generated KeyPair
Generated using TypeDoc
A private Ed25519 signing key and its corresponding public key.