@digitaldefiance/ecies-lib 1.0.26 → 1.0.27

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.
Files changed (2) hide show
  1. package/README.md +22 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -216,6 +216,7 @@ import {
216
216
  DefaultsRegistry,
217
217
  registerRuntimeConfiguration,
218
218
  getRuntimeConfiguration,
219
+ unregisterRuntimeConfiguration,
219
220
  ECIESService,
220
221
  Pbkdf2Service,
221
222
  } from '@digitaldefiance/ecies-lib';
@@ -247,9 +248,24 @@ const perfEcies = new ECIESService(undefined, perfDefaults.ECIES);
247
248
 
248
249
  // 3. Optional: create throwaway profiles without registering them
249
250
  const temporaryDefaults = DefaultsRegistry.create({ BcryptRounds: 8 });
251
+
252
+ // 4. Clean up when a profile is no longer needed
253
+ unregisterRuntimeConfiguration('performance-first');
250
254
  ```
251
255
 
252
- Every profile returned by the registry is deeply frozen and validated so the low-level invariants (public key sizes, checksum parameters, etc.) stay consistent. Use `clearRuntimeConfigurations()` in tests to reset to the library defaults.
256
+ ### Available helpers
257
+
258
+ All helpers live in `src/defaults.ts` and are re-exported from the package entry point:
259
+
260
+ - **`Defaults`** – immutable snapshot of the baked-in configuration. It exposes `Defaults.ECIES`, `Defaults.PBKDF2`, regexes, and other primitives used across the library.
261
+ - **`createRuntimeConfiguration(overrides, base?)`** – clones a base configuration, applies partial overrides (deep merge), validates invariants, and returns a deeply frozen instance without touching the registry.
262
+ - **`DefaultsRegistry`** – registry API with `get`, `register`, `create`, `listKeys`, `has`, `unregister`, and `clear`. Registered profiles are validated and frozen, so consumers can safely share references.
263
+ - **Convenience functions** – `getRuntimeConfiguration`, `registerRuntimeConfiguration`, `unregisterRuntimeConfiguration`, and `clearRuntimeConfigurations` wrap the registry for common flows.
264
+ - **Regex exports** – `PASSWORD_REGEX` and `MNEMONIC_REGEX` are exported alongside the defaults for consumers that need the raw patterns.
265
+
266
+ Every configuration produced by these helpers is deeply frozen and validated so low-level invariants (public key length, recipient counts, checksum parameters, etc.) stay consistent. Use `clearRuntimeConfigurations()` in tests to reset back to the default profile.
267
+
268
+ > **Tip:** Services such as `ECIESService`, `Pbkdf2Service`, `AESGCMService`, and `PasswordLoginService` accept their respective configuration slices as constructor parameters. Wire them up with values from `getRuntimeConfiguration(key)` to scope behavior per feature area or tenant.
253
269
 
254
270
  ## Secure primitives & value objects
255
271
 
@@ -345,6 +361,11 @@ MIT © Digital Defiance
345
361
 
346
362
  ## ChangeLog
347
363
 
364
+ ### v1.0.27
365
+
366
+ - Tue Oct 14 2025 15:03:00 GMT-0700 (Pacific Daylight Time)
367
+ - Pull in i18n GlobalActiveContext updates and make reflexive changes
368
+
348
369
  ### v1.0.26: Quick bump, export IConstants
349
370
 
350
371
  - Sun Oct 12 2025 21:11:00 GMT-0700 (Pacific Daylight Time)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitaldefiance/ecies-lib",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "Digital Defiance ECIES Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -51,7 +51,7 @@
51
51
  "license": "MIT",
52
52
  "packageManager": "yarn@4.10.3",
53
53
  "dependencies": {
54
- "@digitaldefiance/i18n-lib": "^1.1.2",
54
+ "@digitaldefiance/i18n-lib": "^1.1.5",
55
55
  "@ethereumjs/wallet": "^10.0.0",
56
56
  "@noble/curves": "^2.0.1",
57
57
  "@noble/hashes": "^2.0.1",