@did-btcr2/kms 0.2.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/kms.js CHANGED
@@ -3,268 +3,227 @@ import { SchnorrKeyPair } from '@did-btcr2/keypair';
3
3
  import { sha256 } from '@noble/hashes/sha2.js';
4
4
  import { MemoryStore } from './store.js';
5
5
  /**
6
- * Class for managing cryptographic keys for the BTCR2 DID method.
7
- * @class Kms
8
- * @type {Kms}
6
+ * Key Management System for the did:btcr2 DID method.
7
+ *
8
+ * Implements the {@link KeyManager} interface with a pluggable
9
+ * {@link KeyValueStore} (defaults to {@link MemoryStore}).
10
+ *
11
+ * Supports both signing (secret key present) and watch-only
12
+ * (public-key-only) key entries, and both Schnorr and ECDSA
13
+ * signature schemes.
14
+ *
9
15
  */
10
16
  export class Kms {
11
- /**
12
- * Singleton instance of the Kms.
13
- * @private
14
- * @type {KeyManager}
15
- */
16
- static #instance;
17
- /**
18
- * The `store` is a private variable in `KeyManager`. It is a `KeyValueStore` instance used for
19
- * storing and managing cryptographic keys. It allows the `KeyManager` class to save,
20
- * retrieve, and handle keys efficiently within the local Key Management System (KMS) context.
21
- * This variable can be configured to use different storage backends, like in-memory storage or
22
- * persistent storage, providing flexibility in key management according to the application's
23
- * requirements.
24
- * @private
25
- * @type {KeyValueStore<KeyIdentifier, KeyBytes>} The key store for managing cryptographic keys.
26
- */
27
17
  #store;
28
- /**
29
- * The `#activeKeyId` property is a string that points to the currently active key.
30
- * It is used to identify the key that will be used for signing and verifying operations.
31
- * This property is optional and can be set to a specific key ID when initializing the
32
- * `KeyManager` instance. If not set, the key manager will use the default key id.
33
- * @private
34
- * @type {KeyIdentifier}
35
- */
36
18
  #activeKeyId;
37
19
  /**
38
- * Creates an instance of KeyManager.
39
- * @param {KeyValueStore<KeyIdentifier, KeyBytes>} store An optional property to specify a custom
40
- * `KeyValueStore` instance for key management. If not provided, {@link KeyManager} uses a default `MemoryStore`
41
- * instance. This store is responsible for managing cryptographic keys, allowing them to be retrieved, stored, and
42
- * managed during cryptographic operations.
20
+ * Create a new KMS instance.
21
+ *
22
+ * @param {KeyValueStore<KeyIdentifier, KeyEntry>} [store] Optional key-value store.
23
+ * Defaults to in-memory store if not provided.
43
24
  */
44
25
  constructor(store) {
45
- // Set the default key store to a MemoryStore instance
46
26
  this.#store = store ?? new MemoryStore();
47
27
  }
48
28
  /**
49
- * Gets the ID of the active key.
50
- * @returns {KeyIdentifier | undefined} The ID of the active key.
29
+ * Get the active key identifier.
30
+ *
31
+ * @returns {KeyIdentifier | undefined} The active key identifier, or undefined if none is set.
51
32
  */
52
33
  get activeKeyId() {
53
34
  return this.#activeKeyId;
54
35
  }
55
36
  /**
56
- * Gets the key pair associated with the given ID or the active key if no ID is provided.
57
- * @param {KeyIdentifier} [id] The ID of the key to get.
58
- * @returns {KeyBytes} A promise resolving to the key pair.
59
- * @throws {KeyManagerError} If the key is not found or no active key is set.
37
+ * Generate a URN-style key identifier from compressed public key bytes.
38
+ * Format: `urn:kms:secp256k1:<fingerprint>` where fingerprint is the
39
+ * first 8 bytes of SHA-256(publicKey), hex-encoded.
40
+ *
41
+ * @param {KeyBytes} publicKeyBytes Compressed secp256k1 public key bytes.
42
+ * @returns {KeyIdentifier} The generated key identifier.
43
+ */
44
+ #generateUrn(publicKeyBytes) {
45
+ const hash = sha256(publicKeyBytes);
46
+ const fingerprint = Array.from(hash.slice(0, 8))
47
+ .map(b => b.toString(16).padStart(2, '0'))
48
+ .join('');
49
+ return `urn:kms:secp256k1:${fingerprint}`;
50
+ }
51
+ /**
52
+ * Retrieve a key entry or throw if not found / no active key set.
53
+ *
54
+ * @param {KeyIdentifier} [id] Key identifier. Uses active key if omitted.
55
+ * @returns {KeyEntry} The retrieved key entry.
56
+ * @throws {KeyManagerError} If key not found or no active key set.
60
57
  */
61
- #getKeyOrThrow(id) {
62
- // Get the key id
58
+ #getEntryOrThrow(id) {
63
59
  const keyId = id ?? this.#activeKeyId;
64
- // Throw an error if no active key is set
65
60
  if (!keyId) {
66
- throw new KeyManagerError('No active key set', 'ACTIVE_KEY_URI_NOT_SET');
61
+ throw new KeyManagerError('No active key set', 'ACTIVE_KEY_NOT_SET');
67
62
  }
68
- // Get the secret key from the store, throw an error if not found
69
- const _secretKey = this.#store.get(keyId);
70
- if (!_secretKey) {
63
+ const entry = this.#store.get(keyId);
64
+ if (!entry) {
71
65
  throw new KeyManagerError(`Key not found: ${keyId}`, 'KEY_NOT_FOUND');
72
66
  }
73
- // Create a key pair from the secret key
74
- const kp = new SchnorrKeyPair({ secretKey: _secretKey });
75
- // Return the secret key
76
- return kp;
77
- }
78
- /**
79
- * Checks if a key with the given ID exists in the key store.
80
- * @param {KeyIdentifier} id The ID of the key to check.
81
- * @returns {boolean} A promise resolving to a boolean indicating if the key exists.
82
- */
83
- #exists(id) {
84
- const key = this.#store.get(id);
85
- return !!key;
86
- }
87
- /**
88
- * Removes a key from the key store.
89
- * @param {KeyIdentifier} id The key identifier of the key to remove.
90
- * @param {{ force?: boolean }} options The options for removing the key.
91
- * @param {boolean} [options.force] Whether to force the removal of the key.
92
- * @returns {void} A promise that resolves when the key is removed.
93
- * @throws {KeyManagerError} If attempting to remove the active key without force.
94
- */
95
- removeKey(id, options = {}) {
96
- // Check if trying to remove the active key without force
97
- if (this.#activeKeyId === id && !options.force) {
98
- throw new KeyManagerError('Cannot remove active key (use "force": true or switch active key)', 'ACTIVE_KEY_DELETE');
99
- }
100
- // Check if the key exists, if not throw an error
101
- if (!this.#exists(id)) {
102
- throw new KeyManagerError(`Key not found: ${id}`, 'KEY_NOT_FOUND');
103
- }
104
- // Remove the key from the store
105
- this.#store.delete(id);
106
- // Clear the active key if it was the one removed
107
- if (this.#activeKeyId === id) {
108
- this.#activeKeyId = undefined;
109
- }
67
+ return entry;
110
68
  }
111
69
  /**
112
- * Lists all key identifiers in the key store.
113
- * @returns {Promise<KeyIdentifier[]>} A promise that resolves to an array of key identifiers.
114
- */
115
- listKeys() {
116
- return this.#store.entries().flatMap(([k, _]) => [k]);
117
- }
118
- /**
119
- * Sets the active key to the key associated with the given ID.
120
- * @param {KeyIdentifier} id The ID of the key to set as active.
121
- * @returns {Promise<void>} A promise that resolves when the active key is set.
70
+ * Set the active key.
71
+ *
72
+ * @param id The key identifier to set as active.
122
73
  * @throws {KeyManagerError} If the key is not found.
123
74
  */
124
75
  setActiveKey(id) {
125
- // Check if the key exists, if not throw an error
126
- this.#getKeyOrThrow(id);
127
- // Set the active key ID
76
+ this.#getEntryOrThrow(id);
128
77
  this.#activeKeyId = id;
129
78
  }
130
79
  /**
131
- * Gets the public key associated with the given ID or the active key if no ID is provided.
132
- * @param {KeyIdentifier} [id] The ID of the key to get the public key for.
133
- * @returns {Promise<KeyBytes>} A promise resolving to the public key bytes.
80
+ * Get the compressed public key bytes for a key.
81
+ *
82
+ * @param id Key identifier. Uses active key if omitted.
83
+ * @returns Compressed secp256k1 public key bytes.
84
+ * @throws {KeyManagerError} If key not found or no active key set.
134
85
  */
135
86
  getPublicKey(id) {
136
- // Get the key pair from the store
137
- const { publicKey } = this.#getKeyOrThrow(id);
138
- // Return the public key bytes
139
- return publicKey.compressed;
87
+ return this.#getEntryOrThrow(id).publicKey;
140
88
  }
141
89
  /**
142
- * Signs the given data using the key associated with the key ID.
90
+ * Sign data using the specified key.
91
+ *
143
92
  * @param {Bytes} data The data to sign.
144
- * @param {KeyIdentifier} [id] The ID of the key to sign the data with.
145
- * @returns {Promise<SignatureBytes>} A promise resolving to the signature of the data.
146
- */
147
- sign(data, id) {
148
- // Get the key from the store
149
- const { secretKey } = this.#getKeyOrThrow(id);
150
- // Check if the key can sign
151
- if (!secretKey) {
152
- throw new KeyManagerError(`Key ID ${id} is not a signer`, 'KEY_NOT_SIGNER');
93
+ * @param {KeyIdentifier} [id] Key identifier. Uses active key if omitted.
94
+ * @param {SignOptions} [options] Signing options (scheme defaults to 'schnorr').
95
+ * @returns {SignatureBytes} The signature bytes.
96
+ * @throws {KeyManagerError} If key not found, no active key, or key cannot sign.
97
+ */
98
+ sign(data, id, options = {}) {
99
+ const entry = this.#getEntryOrThrow(id);
100
+ if (!entry.secretKey) {
101
+ const keyId = id ?? this.#activeKeyId;
102
+ throw new KeyManagerError(`Key is not a signing key: ${keyId}`, 'KEY_NOT_SIGNER');
153
103
  }
154
- // Sign the data using the key and return the signature
155
- return secretKey.sign(data);
104
+ const kp = new SchnorrKeyPair({ secretKey: entry.secretKey });
105
+ return kp.secretKey.sign(data, { scheme: options.scheme ?? 'schnorr' });
156
106
  }
157
107
  /**
158
- * Verifies a signature using the key associated with the key ID.
159
- * @param {KeyIdentifier} id The ID of the key to verify the signature with.
160
- * @param {SignatureBytes} signature The signature to verify.
161
- * @param {Hex} data The data to verify the signature with.
162
- * @returns {Promise<boolean>} A promise resolving to a boolean indicating the verification result.
163
- */
164
- verify(signature, data, id) {
165
- // Get the key from the store
166
- const { publicKey } = this.#getKeyOrThrow(id);
167
- // Verify the signature using the multikey
168
- return publicKey.verify(signature, data);
108
+ * Verify a signature using the specified key.
109
+ *
110
+ * @param {SignatureBytes} signature The signature bytes to verify.
111
+ * @param {Bytes} data The data that was signed.
112
+ * @param {KeyIdentifier} [id] Key identifier. Uses active key if omitted.
113
+ * @param {SignOptions} [options] Verification options (scheme defaults to 'schnorr').
114
+ * @returns {boolean} True if the signature is valid, false otherwise.
115
+ * @throws {KeyManagerError} If key not found or no active key set.
116
+ */
117
+ verify(signature, data, id, options = {}) {
118
+ const entry = this.#getEntryOrThrow(id);
119
+ const kp = new SchnorrKeyPair({ publicKey: entry.publicKey });
120
+ return kp.publicKey.verify(signature, data, { scheme: options.scheme ?? 'schnorr' });
169
121
  }
170
122
  /**
171
- * Imports a key pair into the key store.
123
+ * Import a key pair into the KMS.
124
+ *
172
125
  * @param {SchnorrKeyPair} keyPair The key pair to import.
173
- * @param {{ id?: KeyIdentifier; setActive?: boolean }} options The options for importing the key pair.
174
- * @param {KeyIdentifier} [options.id] The ID of the key to import (optional).
175
- * @param {boolean} [options.setActive] Whether to set the key as active (optional, default: true).
176
- * @returns {Promise<KeyIdentifier>} A promise resolving to the ID of the imported key.
126
+ * @param {ImportKeyOptions} [options] Import options (id, tags, setActive).
127
+ * @returns {KeyIdentifier} The identifier of the imported key.
128
+ * @throws {KeyManagerError} If a key with the same identifier already exists.
177
129
  */
178
130
  importKey(keyPair, options = {}) {
179
- // Ensure the key pair has a public key
180
- if (!keyPair.publicKey) {
181
- keyPair.publicKey = keyPair.secretKey.computePublicKey();
182
- }
183
- // Determine the key ID
184
- const id = options.id ?? keyPair.publicKey.hex;
185
- // Check if the key already exists
186
- if (this.#exists(id)) {
131
+ const id = options.id ?? this.#generateUrn(keyPair.publicKey.compressed);
132
+ if (this.#store.has(id)) {
187
133
  throw new KeyManagerError(`Key already exists: ${id}`, 'KEY_FOUND');
188
134
  }
189
- // Store the key pair in the key store
190
- this.#store.set(id, keyPair.secretKey.bytes);
191
- // Determine whether to set the key as active, defaulting to true
192
- const setActive = options.setActive ?? true;
193
- // Set the active key if specified
194
- if (setActive) {
135
+ // Build key entry secret key may not be available for watch-only pairs
136
+ const entry = {
137
+ publicKey: keyPair.publicKey.compressed,
138
+ ...(options.tags && { tags: options.tags }),
139
+ };
140
+ try {
141
+ if (keyPair.secretKey) {
142
+ entry.secretKey = keyPair.secretKey.bytes;
143
+ }
144
+ }
145
+ catch {
146
+ // Public-key-only key pair — secretKey getter throws
147
+ }
148
+ this.#store.set(id, entry);
149
+ if (options.setActive) {
195
150
  this.#activeKeyId = id;
196
151
  }
197
- // Return the key ID
198
152
  return id;
199
153
  }
200
154
  /**
201
- * Computes the hash of the given data.
202
- * @param {Uint8Array} data The data to hash.
203
- * @returns {HashBytes} The hash of the data.
155
+ * Remove a key from the KMS.
156
+ *
157
+ * @param {KeyIdentifier} id The key identifier to remove.
158
+ * @param {Object} [options] Removal options.
159
+ * @param {boolean} [options.force=false] Force removal of active key.
160
+ * @throws {KeyManagerError} If key not found or attempting to remove active key without force.
204
161
  */
205
- digest(data) {
206
- return sha256(data);
162
+ removeKey(id, options = {}) {
163
+ if (this.#activeKeyId === id && !options.force) {
164
+ throw new KeyManagerError('Cannot remove active key (use "force": true or switch active key)', 'ACTIVE_KEY_DELETE');
165
+ }
166
+ if (!this.#store.has(id)) {
167
+ throw new KeyManagerError(`Key not found: ${id}`, 'KEY_NOT_FOUND');
168
+ }
169
+ this.#store.delete(id);
170
+ if (this.#activeKeyId === id) {
171
+ this.#activeKeyId = undefined;
172
+ }
207
173
  }
208
174
  /**
209
- * Generates a new key pair and stores it in the key store.
210
- * @returns {KeyIdentifier} The key identifier of the generated key.
175
+ * List all key identifiers in the KMS.
176
+ *
177
+ * @returns {KeyIdentifier[]} Array of key identifiers.
211
178
  */
212
- generateKey() {
213
- // Generate a new Schnorr key pair
214
- const kp = SchnorrKeyPair.generate();
215
- // Store the key pair in the key store
216
- const id = kp.publicKey.hex;
217
- this.#store.set(id, kp.secretKey.bytes);
218
- // Set the active key to the newly generated key
219
- this.#activeKeyId = id;
220
- // Return the key ID
221
- return id;
179
+ listKeys() {
180
+ return this.#store.entries().map(([k]) => k);
222
181
  }
223
182
  /**
224
- * Initializes a singleton KeyManager instance.
225
- * @param {SchnorrKeyPair} keyPair The secret key to import.
226
- * @param {string} id The ID to set as the active key.
227
- * @returns {void}
183
+ * Compute the SHA-256 digest of the given data.
184
+ *
185
+ * @param {Uint8Array} data The data to digest.
186
+ * @returns {HashBytes} The SHA-256 hash of the data.
228
187
  */
229
- static initialize(keyPair, id) {
230
- // Check if the KeyManager instance is already initialized
231
- if (Kms.#instance) {
232
- console.warn('WARNING: Kms global instance is already initialized.');
233
- return Kms.#instance;
234
- }
235
- // Check if the keypair is provided
236
- if (!keyPair) {
237
- // Log a warning message if not provided
238
- console.warn('WARNING: secretKey not provided, generating new SchnorrKeyPair ...');
239
- }
240
- // Generate a new keypair if not provided
241
- keyPair ??= SchnorrKeyPair.generate();
242
- // Initialize the singleton key manager with the keypair
243
- Kms.#instance = new Kms();
244
- // Import the keypair into the key store
245
- Kms.#instance.importKey(keyPair, { setActive: true, id });
246
- // Set the active key URI7
247
- Kms.#instance.#activeKeyId = id;
248
- // Log the active key ID
249
- console.info(`Kms initialized with Active Key ID: ${Kms.#instance.#activeKeyId}`);
250
- // Return the singleton instance
251
- return Kms.#instance;
188
+ digest(data) {
189
+ return sha256(data);
252
190
  }
253
191
  /**
254
- * Retrieves a keypair from the key store using the provided key ID.
255
- * @public
256
- * @param {KeyIdentifier} id The ID of the keypair to retrieve.
257
- * @returns {Promise<SchnorrKeyPair | undefined>} The retrieved keypair, or undefined if not found.
192
+ * Generate a new secp256k1 key pair and store it in the KMS.
193
+ *
194
+ * @param {GenerateKeyOptions} [options] Generation options (tags, setActive).
195
+ * @returns {KeyIdentifier} The identifier of the generated key.
258
196
  */
259
- static getKey(id) {
260
- // Ensure the Kms instance is initialized
261
- if (!Kms.#instance) {
262
- throw new KeyManagerError('Kms instance not initialized', 'KMS_NOT_INITIALIZED');
197
+ generateKey(options = {}) {
198
+ const kp = SchnorrKeyPair.generate();
199
+ const id = this.#generateUrn(kp.publicKey.compressed);
200
+ const entry = {
201
+ secretKey: kp.secretKey.bytes,
202
+ publicKey: kp.publicKey.compressed,
203
+ ...(options.tags && { tags: options.tags }),
204
+ };
205
+ this.#store.set(id, entry);
206
+ if (options.setActive) {
207
+ this.#activeKeyId = id;
208
+ }
209
+ return id;
210
+ }
211
+ /**
212
+ * Export the key pair for a stored key.
213
+ *
214
+ * Only available on the concrete {@link Kms} class, not on the
215
+ * {@link KeyManager} interface. HSM or hardware-backed implementations
216
+ * may not support key export.
217
+ *
218
+ * @param {KeyIdentifier} id The key identifier to export.
219
+ * @returns {SchnorrKeyPair} The reconstructed SchnorrKeyPair.
220
+ */
221
+ exportKey(id) {
222
+ const entry = this.#getEntryOrThrow(id);
223
+ if (entry.secretKey) {
224
+ return new SchnorrKeyPair({ secretKey: entry.secretKey });
263
225
  }
264
- // Use the active key ID if not provided
265
- id ??= Kms.#instance.activeKeyId;
266
- // Instantiate a new Kms with the default key store
267
- return Kms.#instance.#getKeyOrThrow(id);
226
+ return new SchnorrKeyPair({ publicKey: entry.publicKey });
268
227
  }
269
228
  }
270
229
  //# sourceMappingURL=kms.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"kms.js","sourceRoot":"","sources":["../../src/kms.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,eAAe,EAAkB,MAAM,mBAAmB,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAiB,WAAW,EAAE,MAAM,YAAY,CAAC;AAExD;;;;GAIG;AACH,MAAM,OAAO,GAAG;IACd;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAO;IAEvB;;;;;;;;;OASG;IACH,MAAM,CAAyC;IAG/C;;;;;;;OAOG;IACH,YAAY,CAAiB;IAE7B;;;;;;OAMG;IACH,YAAY,KAA8C;QACxD,sDAAsD;QACtD,IAAI,CAAC,MAAM,GAAG,KAAK,IAAI,IAAI,WAAW,EAA2B,CAAC;IACpE,CAAC;IAED;;;OAGG;IACH,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,EAAkB;QAC/B,iBAAiB;QACjB,MAAM,KAAK,GAAG,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;QACtC,yCAAyC;QACzC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,eAAe,CAAC,mBAAmB,EAAE,wBAAwB,CAAC,CAAC;QAC3E,CAAC;QAED,iEAAiE;QACjE,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,eAAe,CAAC,kBAAkB,KAAK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AS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF"}
package/dist/esm/store.js CHANGED
@@ -1,95 +1,31 @@
1
1
  /**
2
- * Re-implementation of a simple in-memory key-value store.
3
- *
4
- * The `MemoryStore` class is an implementation of
5
- * `KeyValueStore` that holds data in memory.
6
- *
7
- * It provides a basic key-value store that works synchronously and keeps all
8
- * data in memory. This can be used for testing, or for handling small amounts
9
- * of data with simple key-value semantics.
10
- *
11
- * Example usage:
12
- *
13
- * ```ts
14
- * const memoryStore = new MemoryStore<string, number>();
15
- * await memoryStore.set("key1", 1);
16
- * const value = await memoryStore.get("key1");
17
- * console.log(value); // 1
18
- * ```
19
- *
20
- * @public
2
+ * In-memory key-value store backed by a Map.
21
3
  */
22
4
  export class MemoryStore {
23
- /**
24
- * A private field that contains the Map used as the key-value store.
25
- */
26
- store = new Map();
27
- /**
28
- * Clears all entries in the key-value store.
29
- *
30
- * @returns {void} returns once the operation is complete.
31
- */
5
+ #store = new Map();
32
6
  clear() {
33
- this.store.clear();
7
+ this.#store.clear();
34
8
  }
35
- /**
36
- * This operation is no-op for `MemoryStore`.
37
- */
38
9
  close() {
39
10
  /** no-op */
40
11
  }
41
- /**
42
- * Deletes an entry from the key-value store by its key.
43
- *
44
- * @param {K} id - The key of the entry to delete.
45
- * @returns {boolean} a boolean indicating whether the entry was successfully deleted.
46
- */
47
- delete(id) {
48
- return this.store.delete(id);
12
+ delete(key) {
13
+ return this.#store.delete(key);
49
14
  }
50
- /**
51
- * Retrieves the value of an entry by its key.
52
- *
53
- * @param {K} id - The key of the entry to retrieve.
54
- * @returns {V | undefined} the value of the entry, or `undefined` if the entry does not exist.
55
- */
56
- get(id) {
57
- return this.store.get(id);
15
+ get(key) {
16
+ return this.#store.get(key);
58
17
  }
59
- /**
60
- * Checks for the presence of an entry by key.
61
- *
62
- * @param {K} id - The key to check for the existence of.
63
- * @returns {boolean} a boolean indicating whether an element with the specified key exists or not.
64
- */
65
- has(id) {
66
- return this.store.has(id);
18
+ has(key) {
19
+ return this.#store.has(key);
67
20
  }
68
- /**
69
- * Retrieves all values in the key-value store.
70
-
71
- * @returns {Array<V>} an array of all values in the store.
72
- */
73
21
  list() {
74
- return Array.from(this.store.values());
22
+ return Array.from(this.#store.values());
75
23
  }
76
- /**
77
- * Retrieves all entries in the key-value store.
78
- *
79
- * @returns {Array<[K, V]>} an array of key-value pairs in the store.
80
- */
81
24
  entries() {
82
- return Array.from(this.store.entries());
25
+ return Array.from(this.#store.entries());
83
26
  }
84
- /**
85
- * Sets the value of an entry in the key-value store.
86
- *
87
- * @param {K} id - The key of the entry to set.
88
- * @param {V} key - The new value for the entry.
89
- * @returns {void} once operation is complete.
90
- */
91
- set(id, key) {
92
- this.store.set(id, key);
27
+ set(key, value) {
28
+ this.#store.set(key, value);
93
29
  }
94
30
  }
95
31
  //# sourceMappingURL=store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":"AAmDA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,WAAW;IACtB;;OAEG;IACK,KAAK,GAAc,IAAI,GAAG,EAAE,CAAC;IAErC;;;;OAIG;IACH,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,KAAK;QACH,YAAY;IACd,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,EAAK;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,EAAK;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACH,GAAG,C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AAC;IAED,GAAG,CAAC,GAAM,EAAE,KAAQ;QAClB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
1
  export * from './interface.js';
2
2
  export * from './kms.js';
3
- export * from './signer.js';
4
3
  export * from './store.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}