Skip to main content

key-manager package

Provides a plugin for the Agent that implements IKeyManager interface

Classes

ClassDescription
KeyManager

Agent plugin that implements IKeyManager methods.

This plugin orchestrates various implementations of AbstractKeyManagementSystem, using a KeyStore to remember the link between a key reference, its metadata, and the respective key management system that provides the actual cryptographic capabilities.

The methods of this plugin are used automatically by other plugins, such as DIDManager, CredentialPlugin, or DIDComm to perform their required cryptographic operations using the managed keys.

MemoryKeyStore

An implementation of AbstractKeyStore that holds everything in memory.

This is usable by KeyManager to hold the key metadata and relationship to the KMS implementation.

MemoryPrivateKeyStore

An implementation of AbstractPrivateKeyStore that holds everything in memory.

This is usable by KeyManagementSystem to hold the private key data.

Abstract Classes

Abstract ClassDescription
AbstractKeyManagementSystemThis base abstract class should be extended to provide cryptographic functions to other Veramo plugins.
AbstractKeyStore

This base abstract class should be extended to provide platform specific implementations that are usable by KeyManager.

Implementations of this class are used to store mappings between key IDs and their respective AbstractKeyManagementSystem implementations.

AbstractPrivateKeyStore

This base abstract class should be extended to provide platform specific implementations that are usable by kms-local.

Implementations of this class are used to store mappings between key aliases and key material.

AbstractSecretBoxThis simple abstract class can be extended by different implementations to provide encryption at rest for some implementations of AbstractPrivateKeyStore.

Interfaces

InterfaceDescription
ManagedPrivateKey

Represents a private key.

The alias is used to refer to the key material which is stored as the hex encoding of the raw byte array (privateKeyHex).

The type refers to the type of key that is represented.

Type Aliases

Type AliasDescription
Eip712Payload(BETA) The payload that is sent to be signed according to EIP712
ImportablePrivateKey

Represents private key data that can be imported. This is a subset of ManagedPrivateKey.

The alias of the resulting ManagedPrivateKey can be generated automatically if none is provided.