Creates an instance of Btc1KeyManager.
Optional
params: KeyManagerParamsThe parameters to initialize the key manager.
Params for initializing a Btc1KeyManager class instance.
Optional
keys?: KeyPairAn optional property to pass in an initial key pair
Optional
keyStore?: KeyValueStore<KeyIdentifier, KeyPair>An optional property to specify a custom KeyValueStore
instance for key management. If not
provided, Btc1KeyManager
uses a default MemoryStore
instance.
This store is responsible for managing cryptographic keys, allowing them to be retrieved,
stored, and managed during cryptographic operations.
Optional
keyUri?: KeyIdentifierAn optional property to specify a key URI for the key manager. If not provided, the key manager will generate a key URI based on the public key of the key pair.
Computes the hash of the given data. See KeyManager.digest for more details.
The data to hash.
The hash of the data.
Exports the full multikeypair from the key store. See KeyManager.exportKey for more details.
Optional
keyUri: stringThe key pair associated with the key URI.
Generates a new keypair and imports it into the key store. See KeyManager.generateKey for more details.
Gets the key pair from the key store and returns a PublicKey.
Optional
keyUri: stringThe URI of the key to get the public key for.
The public key associated with the key URI.
Imports a keypair into the key store. See KeyManager.importKey for more details.
The options to import the keypair.
Optional
active?: booleanOptional
importKey?: booleanThe URI of the imported keypair.
Signs the given data using the key associated with the key URI.
The data to sign.
Optional
keyUri: stringThe URI of the key to sign the data with.
A promise resolving to the signature of the data.
Verifies a signature using the key associated with the key URI. See KeyManager.verify for more details.
The signature to verify.
The data to verify the signature with.
Optional
keyUri: stringThe URI of the key to verify the signature with.
A promise resolving to a boolean indicating the verification result.
Static
computeComputes the key URI of a given keypair. See KeyManager.computeKeyUri for more details.
The keypair to compute the URI for/
The URI of the keypair/
Static
getRetrieves a keypair from the key store using the provided key URI.
The URI of the keypair to retrieve.
The retrieved keypair, or undefined if not found.
Static
initializeInitializes a new Btc1KeyManager instance with the provided ID and controller.
The ID of the key manager.
The controller of the key manager.
Optional
keyPair: KeyPairThe keypair used to initialize the key manager (optional).
A new Btc1KeyManager instance.
Class for managing cryptographic keys for the Btc1 DID method. Btc1KeyManager