@smartledger/bsv 5.4.0 → 5.4.2

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/CHANGELOG.md CHANGED
@@ -5,6 +5,67 @@ All notable changes to SmartLedger-BSV will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [5.4.2] - 2026-06-25
9
+
10
+ Patch release. Dependency security maintenance — no API or behavior changes.
11
+
12
+ ### Security
13
+
14
+ - **`bn.js` `4.11.9` → `4.12.3`** — picks up the backported 4.x patch for
15
+ GHSA-378v-28hj-76wf (infinite loop via hardened hex parsing). This is the
16
+ only runtime-dependency change; the public `BN` API is unchanged. After the
17
+ bump, `npm audit --omit=dev` reports **0 vulnerabilities** in the runtime
18
+ tree.
19
+
20
+ ### Changed
21
+
22
+ - **`mocha` `^8.4.0` → `^11.7.6`** and **`nyc` `^14.1.1` → `^18.0.0`**
23
+ (dev-only). Clears the high-severity dev advisories with real upstream fixes
24
+ (cross-spawn / spawn-wrap ReDoS, the old `serialize-javascript` RCE, `nanoid`,
25
+ `uuid`). Full suite still **4256 passing**; `nyc` coverage verified.
26
+
27
+ ### Notes
28
+
29
+ - The remaining `npm audit` findings are all development-only and never reach
30
+ installers (the published tarball ships no `node_modules`; none are listed
31
+ under `dependencies`). They are either upstream-blocked (`mocha`/`nyc` are at
32
+ their latest releases but still range-pin affected transitives) or await the
33
+ deferred `standard@17` lint migration. See `SECURITY.md` for the full scope.
34
+
35
+ ## [5.4.1] - 2026-06-25
36
+
37
+ Patch release. Repairs Legal Token Protocol (LTP) right-token creation,
38
+ signing, transfer, obligation and verification, which all threw on use.
39
+
40
+ ### Fixed
41
+
42
+ - **LTP right-token signing was completely broken.** `lib/ltp/right.js`
43
+ defined `_signToken` twice; the duplicate object-literal key shadowed the
44
+ working signer and referenced an undefined `hash`, so every
45
+ `prepareRightToken` / transfer / reissue / obligation signing failed with
46
+ "hash is not defined". The detached-JWS builder is now `_createJWS(hash,
47
+ signature)`.
48
+ - **`LTP#createRightToken` called non-existent entrypoints** (`LTPRight.create`
49
+ and `LTPProof.createSignature`). Added a build-only `RightToken.create(...)`
50
+ (reused by `prepareRightToken`) and signing now goes through the repaired
51
+ `RightToken._signToken`.
52
+ - **`LTP#verifyToken`, `transferRight`, `createObligation`,
53
+ `createSelectiveDisclosure` and `createLegalValidityProof` all threw** — each
54
+ called a non-existent `LTPProof`/`LTPRight` method (the same `prepare*` vs
55
+ `create*` naming mismatch). They now call the real `prepare*` entrypoints.
56
+ - **Added `RightToken.verifyToken(token, publicKey)`** — a real public-key
57
+ ECDSA verifier for tokens signed by `_signToken` (recomputes the canonical
58
+ hash, confirms `tokenHash` integrity, then verifies the signature embedded in
59
+ the detached JWS). `LTP#verifyToken` routes through it, so the pre-transfer
60
+ ownership check is now a genuine signature check.
61
+
62
+ ### Tests
63
+
64
+ - Adds `test/ltp/right.js` covering right-token creation, signing,
65
+ verification (valid / wrong-key / tampered), transfer (incl. non-transferable
66
+ rejection), obligation creation, selective disclosure and legal-validity
67
+ proofs. Full suite: 4256 passing.
68
+
8
69
  ## [5.4.0] - 2026-06-15
9
70
 
10
71
  ### Changed
package/SECURITY.md CHANGED
@@ -52,13 +52,22 @@ to remain anonymous.
52
52
  - Bugs in BIP-143 preimage handling, covenant construction, or LTP/GDAF
53
53
  signing paths.
54
54
  - Supply-chain concerns about pinned runtime dependencies
55
- (`elliptic@6.6.1`, `bn.js@4.11.9`, `bs58@4.0.1`, etc.).
55
+ (`bn.js@4.12.3`, `bs58@4.0.1`, `@noble/*`, etc.). The runtime dependency
56
+ tree carries **no known advisories** (`npm audit --omit=dev` is clean);
57
+ `elliptic` was dropped from the runtime/bundle path in 5.4.0.
56
58
 
57
59
  ## Out of Scope
58
60
 
59
61
  - Vulnerabilities in development-only dependencies (`webpack 4`, `standard 12`,
60
- `mocha 8`, etc.). These are tracked separately and addressed in the planned
61
- 3.5.0 toolchain upgrade.
62
+ `mocha`, `nyc`, `crypto-browserify`, etc.). These never reach installers — the
63
+ published tarball ships no `node_modules` and none are listed under
64
+ `dependencies`. The remaining `npm audit` findings (currently 17, all
65
+ dev-only) are either upstream-blocked — `mocha`/`nyc` are already at their
66
+ latest releases but still range-pin affected transitives (`diff`,
67
+ `serialize-javascript`, nested `js-yaml`) — or require the deferred
68
+ `standard@17` lint migration (`eslint`/`inquirer`/`tmp` chain) and the
69
+ `crypto-browserify` browser-build chain. They are accepted dev-only risk and
70
+ tracked separately.
62
71
  - Issues that require a malicious local environment (compromised Node, browser
63
72
  extension, or filesystem) to exploit.
64
73
  - Denial-of-service from intentionally malformed inputs that do **not** cross