@smartledger/bsv 3.4.3 → 3.4.4

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 (87) hide show
  1. package/CHANGELOG.md +321 -0
  2. package/README.md +72 -72
  3. package/SECURITY.md +88 -0
  4. package/bin/cli.js +13 -8
  5. package/bsv-covenant.min.js +4 -4
  6. package/bsv-gdaf.min.js +5 -5
  7. package/bsv-ltp.min.js +7 -7
  8. package/bsv-smartcontract.min.js +5 -5
  9. package/bsv.bundle.js +5 -5
  10. package/bsv.d.ts +486 -9
  11. package/bsv.min.js +5 -5
  12. package/docs/COVENANT_DEVELOPMENT_RESOLVED.md +2 -2
  13. package/docs/MODULE_REFERENCE_COMPLETE.md +60 -57
  14. package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
  15. package/docs/getting-started/INSTALLATION.md +30 -30
  16. package/docs/getting-started/QUICK_START.md +14 -14
  17. package/docs/migration/FROM_BSV_1_5_6.md +5 -5
  18. package/gdaf-entry.js +1 -2
  19. package/index.js +20 -7
  20. package/lib/smart_contract/covenant.js +10 -1
  21. package/lib/smartutxo.js +20 -12
  22. package/lib/transaction/transaction.js +7 -0
  23. package/ltp-entry.js +1 -2
  24. package/package.json +3 -3
  25. package/utilities/blockchain-state.js +32 -23
  26. package/demos/README.md +0 -188
  27. package/demos/architecture_demo.js +0 -247
  28. package/demos/browser-test.html +0 -1208
  29. package/demos/bsv_wallet_demo.js +0 -242
  30. package/demos/complete_ltp_demo.js +0 -511
  31. package/demos/debug_tools_demo.js +0 -87
  32. package/demos/demo_features.js +0 -123
  33. package/demos/easy_interface_demo.js +0 -109
  34. package/demos/ecies_demo.js +0 -182
  35. package/demos/gdaf_demo.js +0 -237
  36. package/demos/ltp_demo.js +0 -361
  37. package/demos/ltp_primitives_demo.js +0 -403
  38. package/demos/message_demo.js +0 -209
  39. package/demos/preimage_separation_demo.js +0 -383
  40. package/demos/script_helper_demo.js +0 -289
  41. package/demos/security_demo.js +0 -287
  42. package/demos/shamir_demo.js +0 -121
  43. package/demos/simple_demo.js +0 -204
  44. package/demos/simple_p2pkh_demo.js +0 -169
  45. package/demos/simple_utxo_preimage_demo.js +0 -196
  46. package/demos/smart_contract_demo.html +0 -1347
  47. package/demos/smart_contract_demo.js +0 -910
  48. package/demos/utxo_generator_demo.js +0 -244
  49. package/demos/validation_pipeline_demo.js +0 -155
  50. package/demos/web3keys.html +0 -740
  51. package/examples/README.md +0 -200
  52. package/examples/basic/transaction-creation.js +0 -534
  53. package/examples/basic/transaction_signature_api_gap.js +0 -178
  54. package/examples/complete_workflow_demo.js +0 -783
  55. package/examples/covenants/advanced_covenant_demo.js +0 -219
  56. package/examples/covenants/covenant_interface_demo.js +0 -270
  57. package/examples/covenants/covenant_manual_signature_resolved.js +0 -212
  58. package/examples/covenants/covenant_signature_template.js +0 -117
  59. package/examples/covenants2/covenant_bidirectional_example.js +0 -262
  60. package/examples/covenants2/covenant_utils_demo.js +0 -120
  61. package/examples/covenants2/preimage_covenant_utils.js +0 -287
  62. package/examples/covenants2/production_integration.js +0 -256
  63. package/examples/data/covenant_utxos.json +0 -28
  64. package/examples/data/utxos.json +0 -26
  65. package/examples/definitive_working_demo.js +0 -261
  66. package/examples/final_working_contracts.js +0 -338
  67. package/examples/legacy/README.md +0 -11
  68. package/examples/legacy/smart_contract_test_integration.js +0 -269
  69. package/examples/legacy/test_builtin_verify.js +0 -117
  70. package/examples/legacy/test_debug_integration.js +0 -71
  71. package/examples/legacy/test_ecdsa_little.js +0 -70
  72. package/examples/legacy/test_shamir.js +0 -221
  73. package/examples/legacy/test_smartverify_der.js +0 -110
  74. package/examples/preimage/README.md +0 -178
  75. package/examples/preimage/extract_preimage_bidirectional.js +0 -421
  76. package/examples/preimage/generate_sample_preimage.js +0 -208
  77. package/examples/preimage/generate_sighash_examples.js +0 -152
  78. package/examples/preimage/parse_preimage.js +0 -117
  79. package/examples/preimage/test_preimage_extractor.js +0 -53
  80. package/examples/preimage/test_varint_extraction.js +0 -95
  81. package/examples/scripts/custom_script_helper_example.js +0 -273
  82. package/examples/scripts/script_interpreter.js +0 -193
  83. package/examples/smart_contract/complete_workflow_demo.js +0 -343
  84. package/examples/smart_contract/covenant_builder_demo.js +0 -176
  85. package/examples/smart_contract/script_testing_integration.js +0 -198
  86. package/examples/smart_contract_templates.js +0 -718
  87. package/examples/working_smart_contracts.js +0 -348
package/CHANGELOG.md CHANGED
@@ -5,6 +5,327 @@ 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
+ ## [3.4.4] - 2026-05-25
9
+
10
+ ### Fixed
11
+
12
+ - **TypeScript types now actually load for `@smartledger/bsv` consumers.**
13
+ Two pre-existing bugs combined to silently leave TS users with `any`:
14
+ `package.json` had no `"types"` field, and `bsv.d.ts` declared
15
+ `module 'bsv'` instead of `module '@smartledger/bsv'`. Added the `types:`
16
+ field and renamed the ambient module declaration. Existing TS consumers
17
+ who were previously seeing `any` for every `bsv.*` will now get real
18
+ autocomplete and type errors — surface API unchanged, but any code that
19
+ was implicitly relying on `any` to silence a real type error will need
20
+ to be fixed.
21
+
22
+ - **`smartledger-bsv vc verify` actually works now.** The CLI's DID resolver
23
+ returned the raw JWKS file content (`{ keys: [...] }`), but
24
+ `lib/vcjwt/verifyVcJwt` expects the documented resolver shape
25
+ `{ jwks: { keys: [...] } }`. So every `npx smartledger-bsv vc verify`
26
+ call advertised in the README's quickstart would fail with "Failed to
27
+ resolve issuer DID" — including the one in the very first `Quick Start`
28
+ block at `README.md:25-53`. `bin/cli.js` now wraps the result correctly.
29
+ Caught by the new `test/cli/smoke.js` (Task #9 below).
30
+
31
+ - **CLI version string is no longer hardcoded.** `bin/cli.js` used to
32
+ print `SmartLedger BSV CLI v3.4.0` regardless of the actual package
33
+ version (and had no `--version` flag at all). It now reads from
34
+ `package.json` and supports `--version` / `-v` / `--help` / `-h`.
35
+
36
+ - **Library is now silent by default.** Two long-standing modules printed
37
+ on every consumer-side `require`/bundle-load: `lib/smartutxo.js` emitted
38
+ `SmartUTXO: Running in browser mode - some features may be limited`
39
+ plus 11 informational `console.log` calls (`📖 Loaded existing
40
+ blockchain state`, `💾 Saved blockchain state with N UTXOs`, etc.), and
41
+ `utilities/blockchain-state.js` added another `BlockchainState: Running
42
+ in browser mode` warn plus ~15 narration logs that fired on every
43
+ `SmartUTXO` method call. All of these are now gated behind the same
44
+ `BSV_DEBUG` flag the rest of the codebase has used since 3.4.1:
45
+ set `BSV_DEBUG=1` (Node) or `window.BSV_DEBUG = true` (browser) to
46
+ surface the diagnostics. `console.error` calls for genuine
47
+ storage/IO failures are unchanged — errors stay loud. A small fix to
48
+ `lib/smart_contract/covenant.js` does the same for the
49
+ `File system operations not available in browser environment` warn
50
+ that `.save()` emitted at call time. Verified: `require('./index.js')`
51
+ in Node is now completely silent; `require('./bsv-ltp.min.js')` /
52
+ `bsv-gdaf.min.js` / `bsv-anchor.min.js` are silent after rebuild
53
+ (will rebuild for the rest at release time via `prepublishOnly`).
54
+
55
+ - **Broken installs now fail loudly in Node instead of silently degrading.**
56
+ `index.js` previously wrapped the eager `require('bn.js')` /
57
+ `require('bs58')` / `require('elliptic')` calls in a single try/catch that
58
+ emitted `console.warn('Some dependencies may not be available in browser
59
+ environment')` and continued — so a missing runtime dep in Node (broken
60
+ `npm install`, deleted `node_modules`, container-build mistake) would let
61
+ the library load partially and then explode with a confusing
62
+ `TypeError: Cannot read properties of undefined` deep in `lib/crypto/bn.js`.
63
+ The block now hard-requires those three deps in Node (declared in
64
+ `package.json` `dependencies`, so they MUST be installed) and only
65
+ tolerates absence in browser context where the bundler is expected to
66
+ inline or polyfill them. `Buffer` and the internal `lib/util/_` continue
67
+ to be loaded the same way they always were.
68
+
69
+ - **`Transaction._clearSignatures()` no longer throws on custom-script inputs.**
70
+ When a transaction contained an input whose locking script wasn't one of the
71
+ four auto-recognized standard types (P2PKH, P2PK, bare-multisig, P2SH-multisig),
72
+ `_fromNonP2SH` falls through to the base `Input` class. Any subsequent
73
+ `Transaction` mutation that triggers `_clearSignatures` — `.fee()`, `.change()`,
74
+ adding another input, etc. — then threw `AbstractMethodInvoked: Input#clearSignatures`.
75
+ This bug existed in the upstream bsv@1.5.6 lineage and impacted users of
76
+ covenant and custom-script flows specifically. `transaction.js:_clearSignatures`
77
+ now skips inputs that haven't overridden the base method, matching the
78
+ guard-by-method-identity pattern already used for `isFullySigned` and
79
+ `isValidSignature`. The base `Input.prototype.clearSignatures` still throws
80
+ when called directly, so the original abstract-method contract is preserved.
81
+ Regression tests added in `test/transaction/transaction.js`.
82
+
83
+ ### Added
84
+
85
+ - **`test/cli/smoke.js` — end-to-end smoke test for `bin/cli.js`.** Exercises
86
+ every subcommand the README markets as the on-ramp (`didweb init`,
87
+ `vc issue`, `vc verify`, `status create` / `set` / `check`,
88
+ `anchor hash` / `build`) inside an isolated temp dir per test (13
89
+ tests, ~580ms total). Surfaced two pre-existing CLI bugs in the
90
+ process (resolver shape, hardcoded version — both fixed above). Also
91
+ available as `npm run test:cli`, and wired into the hygiene job of
92
+ `ci.yml`.
93
+
94
+ - **`.github/workflows/ci.yml` — minimal CI** that runs on push/PR to main
95
+ and is designed to catch the exact bug classes shipped in v3.4.0–v3.4.3.
96
+ Three jobs:
97
+ 1. **hygiene** (strict) — fails the build if README/docs contain stale
98
+ `unpkg.com/@smartledger/bsv@X.Y.Z/...` URLs that don't match
99
+ `package.json` version; if any `files:` array entry doesn't resolve
100
+ to a path on disk (globs expanded); if `bsv.d.ts` fails to compile
101
+ against a TS smoke file under `--strict`; or if `npm pack --dry-run`
102
+ output is missing any of `SECURITY.md` / `CHANGELOG.md` / `LICENSE`
103
+ / `README.md` / `bsv.d.ts` / `bsv.min.js`.
104
+ 2. **build** (strict) — runs `npm run build-all` and verifies all 16
105
+ advertised bundles land on disk; checks that `bsv-ltp.min.js` and
106
+ `bsv-gdaf.min.js` are not byte-identical (regression guard for the
107
+ v3.4.4 entry-placeholder fix); UMD-loads each credential bundle and
108
+ verifies its expected exports are accessible.
109
+ 3. **tests** (advisory) — runs `npm test` and `npm run lint` on Node
110
+ 18/20/22, but with `continue-on-error: true`. Will be gated strictly
111
+ after the 25 pre-existing mocha failures and standard@12 lint
112
+ baseline are cleaned up in 3.5.0 (see "Planned for 3.5.0" below).
113
+
114
+ - **`bsv.d.ts` now covers the v3.3+ surface.** The legacy type defs (forked
115
+ from the original moneybutton/bsv types) only described the bitcore-lineage
116
+ core: Transaction, Address, Script, PrivateKey, etc. Everything added in
117
+ v3.3.x and v3.4.x — `DIDWeb`, `VcJwt`, `StatusList`, `Anchor`, `GDAF`, `LTP`
118
+ (class + 60+ top-level `prepare*` and `create*` convenience wrappers),
119
+ `SmartContract` (Covenant, Preimage, SIGHASH, Builder, UTXOGenerator,
120
+ ScriptTester, CovenantBuilder, StackExaminer, ScriptInterpreter, plus
121
+ `scriptToASM`/`asmToScript`/etc.), `SmartVerify`, `EllipticFixed`, `Shamir`
122
+ (with `splitSecret`/`reconstructSecret`/`validateShare` convenience
123
+ wrappers), `BrowserUTXOManager`, and the `SmartLedger` metadata namespace
124
+ — was missing. Added with pragmatic signatures (JWK-typed where shapes are
125
+ stable; `object` / `any` where the runtime takes opaque W3C/JSON
126
+ payloads). Verified by compiling a smoke-test file that exercises every
127
+ new module against `tsc --noEmit` and `tsc --noEmit --strict` (both pass).
128
+
129
+ ### Changed (tarball hygiene)
130
+
131
+ - **`demos/` and `examples/` no longer ship in the npm tarball.** Removed
132
+ from `package.json` `files:` (they're still in the GitHub repo). Reduces
133
+ unpacked size from 11.8 MB → 11.1 MB and file count from 268 → 206
134
+ (≈23% fewer files in every consumer's `node_modules`). Rationale: Node
135
+ consumers `require('@smartledger/bsv')` and never browse those
136
+ directories; CDN consumers fetch `.min.js` files directly and never see
137
+ the tarball. `docs/` is still included — it's actively maintained,
138
+ small (0.39 MB), and useful for users grepping `node_modules` for
139
+ reference material.
140
+ - **13 relative README links to `examples/`, `demos/`, and `tests/`
141
+ rewritten to absolute GitHub URLs** so they keep resolving for anyone
142
+ reading the post-install README from inside `node_modules`. Same final
143
+ destination, just doesn't depend on the directory shipping locally.
144
+ - **CI now enforces an anti-bloat ceiling**: the hygiene job fails if the
145
+ tarball exceeds 250 files or 14 MB unpacked. Baseline after this
146
+ release: 206 files / 11.1 MB — gives ~25% headroom for normal growth.
147
+
148
+ ### Changed (documentation honesty, continued)
149
+
150
+ Further sweep of the same stale-URL bug class fixed in 3.4.2/3.4.3, plus a
151
+ companion `SECURITY.md` and a fix to two long-standing entry-file placeholders.
152
+
153
+ - **README.md**: bumped 20 stale `unpkg.com/@smartledger/bsv@3.4.1/...` and
154
+ `@3.3.4/...` CDN URLs (plus the version badge and install commands) to
155
+ `@3.4.3`. The two historical "v3.4.1 (bugfix)" prose references at the top
156
+ of the file were left intact — they accurately describe what that specific
157
+ release shipped.
158
+ - **`docs/`**: bumped 67 more stale CDN/install URLs that the 3.4.3 sweep
159
+ missed (`@3.4.2`, `@3.3.4`, `@3.1.1`) across `MODULE_REFERENCE_COMPLETE.md`,
160
+ `getting-started/INSTALLATION.md`, `getting-started/QUICK_START.md`,
161
+ `migration/FROM_BSV_1_5_6.md`, `advanced/UTXO_MANAGER_GUIDE.md`, and
162
+ `COVENANT_DEVELOPMENT_RESOLVED.md`.
163
+ - **Bundle sizes corrected** in `README.md` (loading-strategy section and
164
+ use-case table at lines 277–791), `docs/getting-started/INSTALLATION.md`,
165
+ `docs/getting-started/QUICK_START.md`, and `docs/MODULE_REFERENCE_COMPLETE.md`.
166
+ The largest drifts (silent for several releases): `bsv-covenant.min.js`
167
+ shown as 32KB in `docs/` was actually 913KB (28× off); `bsv-ltp.min.js` /
168
+ `bsv-gdaf.min.js` shown as 817KB / 604KB were both 1184KB after the
169
+ 3.4.x rebuilds. README's main loading-options table (lines 138–173) was
170
+ already accurate and was not touched. Subtotals for "load multiple
171
+ bundles together" rows now reflect that each standalone bundle re-embeds
172
+ core BSV — the previous subtotals undercounted by ignoring that overlap.
173
+ - **`SECURITY.md`** added. `package.json` `files:` had listed it since 3.4.0
174
+ but the file did not exist, so npm was silently skipping the entry (same
175
+ class of bug 3.4.1 cleaned up for the other seven dead `files:` entries).
176
+ Uses the GitHub-recognized `## Supported Versions` / `## Reporting a
177
+ Vulnerability` format, points at GitHub Security Advisories +
178
+ `hello@smartledger.technology`, and restates the same opt-in vs.
179
+ default-path posture as README §Security so it can't drift.
180
+ - **`ltp-entry.js` and `gdaf-entry.js`** were placeholders that re-exported
181
+ `lib/smart_contract`. The webpack configs built `bsv-ltp.min.js` and
182
+ `bsv-gdaf.min.js` (1.2 MB each) from these placeholders, so the UMD
183
+ `window.bsvLTP` and `window.bsvGDAF` globals advertised in the README as
184
+ "Legal Token Protocol" and "Digital Identity & Attestation" actually
185
+ exposed the smart-contract module — and the two bundles were byte-identical.
186
+ The entries now point at `./lib/ltp` and `./lib/gdaf` respectively, so the
187
+ bundles expose the `LTP` and `GDAF` classes the README documents. CDN
188
+ consumers who were calling `window.bsvLTP.<smart_contract_method>` will need
189
+ to switch to `bsv-smartcontract.min.js` or use the unbundled `@smartledger/bsv`
190
+ package — the previous behavior was not what was advertised.
191
+
192
+ ### Notes
193
+
194
+ - No public API changes beyond the LTP/GDAF UMD bundle export shape correction
195
+ noted above. All Node.js `require('@smartledger/bsv').LTP` /
196
+ `require('@smartledger/bsv').GDAF` call sites continue to resolve to the
197
+ same `lib/ltp` / `lib/gdaf` modules they always did.
198
+
199
+ ---
200
+
201
+ ## Planned for 3.5.0 — toolchain upgrade
202
+
203
+ Originally promised in 3.4.1's "Notes":
204
+
205
+ > Dev-only vulnerabilities remain in `webpack 4` / `standard 12` / `mocha 8`;
206
+ > a toolchain upgrade is planned for 3.5.0 to address them without breaking
207
+ > downstream bundler integrations.
208
+
209
+ This is the fleshed-out plan for that release. **It does not affect 3.4.x
210
+ runtime behavior; it's a build/test/lint stack migration.** Tracking it here
211
+ in `[Unreleased]` keeps the commitment auditable from the changelog rather
212
+ than a side document.
213
+
214
+ ### Audit baseline (as of v3.4.3)
215
+
216
+ `npm audit` reports **15 high / 9 moderate / 10 low**. All but two are
217
+ strictly dev-chain (webpack 4 / mocha 8 / nyc 14 / standard 12 transitives):
218
+
219
+ - The lone direct runtime entry is **`bn.js` (moderate)** — pinned at
220
+ `=4.11.9` because `elliptic@6.6.1` requires bn.js 4.x. A direct bump to
221
+ `bn.js@5.x` is not safe in isolation; see "Runtime dependency decisions"
222
+ below.
223
+ - **`elliptic` appears in the low list** but is already at upstream's latest
224
+ (6.6.1). The advisory comes via webpack 4's obsolete
225
+ `node-libs-browser → crypto-browserify → browserify-sign → elliptic`
226
+ polyfill chain, which webpack 5 deletes entirely. So bumping webpack to 5
227
+ drops this advisory automatically, no code change required.
228
+
229
+ ### Tooling target versions
230
+
231
+ | Tool | Current | Target | Why |
232
+ | --- | --- | --- | --- |
233
+ | `webpack` | `4.29.3` | `^5.100` | Eliminates the entire `node-libs-browser` polyfill chain (= source of most HIGH vulns), supports modern asset modules, fixes `terser-webpack-plugin` advisory |
234
+ | `webpack-cli` | `^3.3.12` | `^5` or `^6` | Matched to webpack 5; webpack-cli 7 also works but tightens validation |
235
+ | `mocha` | `^8.4.0` | `^10.x` | Mocha 11 requires Node 18+; 10 supports Node 14+. Picking 10 keeps a wider engines window |
236
+ | `nyc` | `^14.1.1` | `^17` or migrate to `c8` | nyc 17 is Node 14+ compatible. Alternative: drop nyc for `c8` (lighter, uses native V8 coverage) |
237
+ | `sinon` | `7.2.3` | `^17.x` | sinon 18+ requires Node 18+. 17 covers Node 14+ |
238
+ | `chai` | `4.2.0` | `4.5.x` (LTS) | **Stay on chai 4.x.** chai 5+ went ESM-only — switching means rewriting `require('chai')` everywhere or migrating the test suite to ESM. Not worth bundling into a toolchain release. |
239
+ | `standard` | `12.0.1` | `^17` or replace | standard 17 uses ESLint 8 (now stale itself); standard 18+ requires Node 18. Open question: stay on `standard`, or move to `eslint@9` + flat config + a smaller rule set. See "Linter decision" below. |
240
+ | `brfs` | `2.0.1` | `2.0.2` | Trivial patch bump |
241
+
242
+ ### Runtime dependency decisions (keep / bump / shim)
243
+
244
+ | Dep | Pin | Latest | Decision |
245
+ | --- | --- | --- | --- |
246
+ | `elliptic` | `6.6.1` | `6.6.1` | **Keep.** Already current. |
247
+ | `bn.js` | `=4.11.9` | `5.2.3` | **Keep at 4.x.** Bumping breaks elliptic; the moderate vuln (constant-time concern in some older 4.x) is mitigated by callers in `lib/crypto/`. Add a comment in `package.json` pinning rationale. |
248
+ | `bs58` | `=4.0.1` | `6.0.0` | **Keep at 4.x.** `bs58@5+` is ESM-only and would force a CJS→ESM migration of `lib/encoding/base58.js`. Out of scope for 3.5.0. |
249
+ | `inherits` | `2.0.3` | `2.0.4` | **Bump to 2.0.4.** Trivial. |
250
+ | `unorm` | `1.4.1` | `1.6.0` | **Bump to 1.6.0.** Non-breaking. |
251
+ | `aes-js` | `^3.1.2` | `3.1.2` | **No change.** |
252
+ | `clone-deep` | `^4.0.1` | `4.0.1` | **No change.** |
253
+ | `hash.js` | `^1.1.7` | `1.1.7` | **No change.** |
254
+
255
+ ### Required code / config changes
256
+
257
+ 1. **`build/webpack.*.config.js` (12 files).** webpack 5 removes the
258
+ automatic Node polyfills that webpack 4 silently injects. Concrete
259
+ touches needed:
260
+ - Add `resolve.fallback` entries for `buffer`, `crypto`, `stream`,
261
+ `process` (or use `node-polyfill-webpack-plugin`).
262
+ - Add `buffer`, `process`, `stream-browserify`, `crypto-browserify`
263
+ (or modern equivalents) as **dev**-deps so the fallbacks resolve.
264
+ - `output.library` ideally migrates from string to object form
265
+ (`{ name: 'bsvFoo', type: 'umd' }`) — webpack 5 still accepts the
266
+ string form but warns.
267
+ - `globalObject: 'this'` should become `globalObject: 'globalThis'`
268
+ (cleaner; matches modern targets).
269
+ - Drop `NODE_OPTIONS="--openssl-legacy-provider"` from all 16 `npm run
270
+ build-*` scripts — that workaround exists *because* webpack 4 pins
271
+ legacy OpenSSL APIs. webpack 5 doesn't need it.
272
+
273
+ 2. **`test/mocha.opts` → `.mocharc.cjs` (or `mocha` field in package.json).**
274
+ Mocha 8 already emits a deprecation warning for `mocha.opts`; mocha 10
275
+ removes support entirely. Migrate the existing two flags
276
+ (`--recursive`, `--timeout 5000`) and add `--reporter spec`.
277
+
278
+ 3. **`engines` field in `package.json`.** No engines is declared today.
279
+ For 3.5.0 add `"engines": { "node": ">=14" }` (or `>=18` if we also
280
+ adopt mocha 11 / sinon 18 / standard 18). Current consumer test
281
+ environments span Node 14–22, so `>=14` is the safer choice.
282
+
283
+ 4. **`@types/node` peer dep or dev-dep.** With the typing fix in 3.4.4,
284
+ `bsv.d.ts` formally depends on Node types (`/// <reference types="node" />`).
285
+ Add `"peerDependencies": { "@types/node": "*" }` (optional) or document
286
+ in README that TS consumers need `@types/node` installed.
287
+
288
+ 5. **Linter decision (open question).**
289
+ Option A — Stay on `standard@17`: 1-line bump, ~1 day to fix new lint
290
+ errors. Risk: standard's own toolchain is aging.
291
+ Option B — Migrate to ESLint flat config (`eslint.config.js`) with a
292
+ custom rule set. More work, but unblocks long-term flexibility and the
293
+ newer rule engine.
294
+ **Recommendation:** A for 3.5.0, defer B to 3.6.0.
295
+
296
+ ### Risk ranking and rollout order
297
+
298
+ Each step should be its own PR, validated against the full `test/` suite
299
+ (120+ mocha tests passed in 3.4.4) and a `npm pack --dry-run` size diff.
300
+
301
+ 1. **Low risk:** `inherits` / `unorm` patch bumps, `brfs 2.0.1 → 2.0.2`,
302
+ add `engines` field, migrate `mocha.opts → .mocharc.cjs`.
303
+ 2. **Medium risk:** mocha 8 → 10, nyc 14 → 17, sinon 7 → 17, standard
304
+ 12 → 17. Test suite may have lint/test syntax regressions.
305
+ 3. **Higher risk:** webpack 4 → 5. This is the bundle-shape change;
306
+ downstream CDN consumers will see different file bytes. Plan a beta
307
+ release (`3.5.0-beta.1`) on npm before the GA bump so integrators can
308
+ validate.
309
+ 4. **Out of scope, deferred:** `bn.js 4 → 5`, `bs58 4 → 6`, `chai 4 → 5`,
310
+ linter overhaul. These all imply CJS→ESM or coordinated upstream
311
+ changes and warrant a separate 3.6.0 effort.
312
+
313
+ ### Pre-release validation checklist
314
+
315
+ Before publishing `3.5.0`:
316
+
317
+ - `npm test` passes (Node 18, 20, 22).
318
+ - `npm run build-all` succeeds without `NODE_OPTIONS` workaround.
319
+ - All 16 bundles built and:
320
+ - sized within 5% of 3.4.x equivalents (or sizes updated in README/docs);
321
+ - smoke-tested in a browser via `tests/*.html` against the unpkg URL;
322
+ - UMD globals (`window.bsv`, `bsvLTP`, `bsvGDAF`, etc.) resolve correctly.
323
+ - `npm audit` shows zero high/critical, ≤ 5 moderate (any remaining moderates
324
+ documented in CHANGELOG with mitigation).
325
+ - `tsc --noEmit --strict` against `bsv.d.ts` + smoke file still passes.
326
+ - Tag `3.5.0-beta.1` on npm for at least 7 days to let integrators report
327
+ bundle regressions before GA.
328
+
8
329
  ## [3.4.3] - 2026-05-18
9
330
 
10
331
  ### Changed (documentation honesty, continued)
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **🚀 Complete Bitcoin SV Development Framework with W3C Verifiable Credentials, DID:web, Legal Compliance, and 16 Flexible Loading Options**
4
4
 
5
- [![Version](https://img.shields.io/badge/version-3.4.1-blue.svg)](https://www.npmjs.com/package/@smartledger/bsv)
5
+ [![Version](https://img.shields.io/badge/version-3.4.4-blue.svg)](https://www.npmjs.com/package/@smartledger/bsv)
6
6
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
7
7
  [![BSV](https://img.shields.io/badge/BSV-Compatible-orange.svg)](https://bitcoinsv.com/)
8
8
  [![Modular](https://img.shields.io/badge/Loading-Modular-purple.svg)](#loading-options)
@@ -25,8 +25,8 @@ The most comprehensive and flexible Bitcoin SV library available. **In v3.4.x**:
25
25
  ### **Quick Start - Issue Your First Verifiable Credential**
26
26
 
27
27
  ```bash
28
- # Install SmartLedger BSV v3.4.1
29
- npm install @smartledger/bsv@3.4.1
28
+ # Install SmartLedger BSV v3.4.4
29
+ npm install @smartledger/bsv@3.4.4
30
30
 
31
31
  # Initialize DID:web issuer (generates ES256 keys)
32
32
  npx smartledger-bsv didweb init --domain example.com --alg ES256
@@ -135,42 +135,42 @@ console.log('Status:', status) // 'revoked'
135
135
  ### **Core Modules**
136
136
  | Module | Size | Use Case | CDN |
137
137
  |--------|------|----------|-----|
138
- | **bsv.min.js** | 937KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@3.4.1/bsv.min.js` |
139
- | **bsv.bundle.js** | 937KB | Everything in one file | `unpkg.com/@smartledger/bsv@3.4.1/bsv.bundle.js` |
138
+ | **bsv.min.js** | 937KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@3.4.4/bsv.min.js` |
139
+ | **bsv.bundle.js** | 937KB | Everything in one file | `unpkg.com/@smartledger/bsv@3.4.4/bsv.bundle.js` |
140
140
 
141
141
  ### **🆕 W3C Verifiable Credentials (v3.4.x)**
142
142
  | Module | Size | Use Case | CDN |
143
143
  |--------|------|----------|-----|
144
- | **🟢 bsv-didweb.min.js** | 419KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@3.4.1/bsv-didweb.min.js` |
145
- | **🟢 bsv-vcjwt.min.js** | 419KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@3.4.1/bsv-vcjwt.min.js` |
146
- | **🟢 bsv-statuslist.min.js** | 487KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@3.4.1/bsv-statuslist.min.js` |
147
- | **🟢 bsv-anchor.min.js** | 418KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@3.4.1/bsv-anchor.min.js` |
144
+ | **🟢 bsv-didweb.min.js** | 419KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@3.4.4/bsv-didweb.min.js` |
145
+ | **🟢 bsv-vcjwt.min.js** | 419KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@3.4.4/bsv-vcjwt.min.js` |
146
+ | **🟢 bsv-statuslist.min.js** | 487KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@3.4.4/bsv-statuslist.min.js` |
147
+ | **🟢 bsv-anchor.min.js** | 418KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@3.4.4/bsv-anchor.min.js` |
148
148
 
149
149
  ### **Smart Contract & Development**
150
150
  | Module | Size | Use Case | CDN |
151
151
  |--------|------|----------|-----|
152
- | **bsv-smartcontract.min.js** | 937KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@3.4.1/bsv-smartcontract.min.js` |
153
- | **bsv-covenant.min.js** | 913KB | Covenant operations | `unpkg.com/@smartledger/bsv@3.4.1/bsv-covenant.min.js` |
154
- | **bsv-script-helper.min.js** | 26KB | Custom script tools | `unpkg.com/@smartledger/bsv@3.4.1/bsv-script-helper.min.js` |
155
- | **bsv-security.min.js** | 26KB | Security enhancements | `unpkg.com/@smartledger/bsv@3.4.1/bsv-security.min.js` |
152
+ | **bsv-smartcontract.min.js** | 937KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@3.4.4/bsv-smartcontract.min.js` |
153
+ | **bsv-covenant.min.js** | 913KB | Covenant operations | `unpkg.com/@smartledger/bsv@3.4.4/bsv-covenant.min.js` |
154
+ | **bsv-script-helper.min.js** | 26KB | Custom script tools | `unpkg.com/@smartledger/bsv@3.4.4/bsv-script-helper.min.js` |
155
+ | **bsv-security.min.js** | 26KB | Security enhancements | `unpkg.com/@smartledger/bsv@3.4.4/bsv-security.min.js` |
156
156
 
157
157
  ### **Legal & Compliance**
158
158
  | Module | Size | Use Case | CDN |
159
159
  |--------|------|----------|-----|
160
- | **bsv-ltp.min.js** | 1184KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@3.4.1/bsv-ltp.min.js` |
161
- | **bsv-gdaf.min.js** | 1184KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@3.4.1/bsv-gdaf.min.js` |
160
+ | **bsv-ltp.min.js** | 1184KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@3.4.4/bsv-ltp.min.js` |
161
+ | **bsv-gdaf.min.js** | 1184KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@3.4.4/bsv-gdaf.min.js` |
162
162
 
163
163
  ### **Advanced Cryptography**
164
164
  | Module | Size | Use Case | CDN |
165
165
  |--------|------|----------|-----|
166
- | **bsv-shamir.min.js** | 432KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@3.4.1/bsv-shamir.min.js` |
166
+ | **bsv-shamir.min.js** | 432KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@3.4.4/bsv-shamir.min.js` |
167
167
 
168
168
  ### **Utilities**
169
169
  | Module | Size | Use Case | CDN |
170
170
  |--------|------|----------|-----|
171
- | **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@3.4.1/bsv-ecies.min.js` |
172
- | **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@3.4.1/bsv-message.min.js` |
173
- | **bsv-mnemonic.min.js** | 681KB | HD wallets | `unpkg.com/@smartledger/bsv@3.4.1/bsv-mnemonic.min.js` |
171
+ | **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@3.4.4/bsv-ecies.min.js` |
172
+ | **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@3.4.4/bsv-message.min.js` |
173
+ | **bsv-mnemonic.min.js** | 681KB | HD wallets | `unpkg.com/@smartledger/bsv@3.4.4/bsv-mnemonic.min.js` |
174
174
 
175
175
  ## ⚡ **2-Minute Quick Start**
176
176
 
@@ -181,7 +181,7 @@ Get started with Bitcoin SV development in under 2 minutes:
181
181
  npm install @smartledger/bsv
182
182
 
183
183
  # Or include in HTML
184
- <script src="https://unpkg.com/@smartledger/bsv@3.4.1/bsv.min.js"></script>
184
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv.min.js"></script>
185
185
  ```
186
186
 
187
187
  > **🔧 v3.4.x:** Legally-recognizable W3C Verifiable Credentials with DID:web + VC-JWT toolkit. ES256/ES256K support, StatusList2021 revocation, and privacy-preserving BSV anchoring. Complete CLI tooling included! v3.4.1 ensures these bundles ship to npm consumers; see CHANGELOG.
@@ -249,7 +249,7 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
249
249
  - 🌐 [Digital Identity Guide](docs/GDAF_DIGITAL_ATTESTATION_GUIDE.md)
250
250
  - � [Threshold Cryptography Guide](docs/SHAMIR_SECRET_SHARING_GUIDE.md)
251
251
  - �️ [UTXO Manager Guide](docs/UTXO_MANAGER_GUIDE.md)
252
- - 💡 [Examples Directory](examples/)
252
+ - 💡 [Examples Directory](https://github.com/codenlighten/smartledger-bsv/tree/main/examples)
253
253
 
254
254
  ## 🔧 **API Reference**
255
255
 
@@ -274,21 +274,21 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
274
274
 
275
275
  ## 📚 **Quick Start Examples**
276
276
 
277
- ### 🔧 **Basic Development** (476KB total)
277
+ ### 🔧 **Basic Development** (~963KB total)
278
278
  ```html
279
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
280
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-script-helper.min.js"></script>
279
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv.min.js"></script>
280
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv-script-helper.min.js"></script>
281
281
  <script>
282
282
  const privateKey = new bsv.PrivateKey();
283
283
  const utxos = new bsv.SmartContract.UTXOGenerator().createRealUTXOs(2, 100000);
284
284
  </script>
285
285
  ```
286
286
 
287
- ### 🔒 **Smart Contract Development** (932KB total)
287
+ ### 🔒 **Smart Contract Development** (~2.7MB total — each bundle re-embeds core BSV)
288
288
  ```html
289
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
290
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-covenant.min.js"></script>
291
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-smartcontract.min.js"></script>
289
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv.min.js"></script>
290
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv-covenant.min.js"></script>
291
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv-smartcontract.min.js"></script>
292
292
  <script>
293
293
  const covenant = bsv.SmartContract.createCovenantBuilder()
294
294
  .extractField('amount').push(50000).greaterThanOrEqual().verify().build();
@@ -296,11 +296,11 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
296
296
  </script>
297
297
  ```
298
298
 
299
- ### 🆕 **Legal & Identity Development** (1.87MB total)
299
+ ### 🆕 **Legal & Identity Development** (~3.2MB total — each bundle re-embeds core BSV)
300
300
  ```html
301
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
302
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-ltp.min.js"></script>
303
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-gdaf.min.js"></script>
301
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv.min.js"></script>
302
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv-ltp.min.js"></script>
303
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv-gdaf.min.js"></script>
304
304
  <script>
305
305
  // Legal Token Protocol
306
306
  const propertyToken = bsv.createPropertyToken({
@@ -312,11 +312,11 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
312
312
  </script>
313
313
  ```
314
314
 
315
- ### 🆕 **Security & Cryptography** (1.17MB total)
315
+ ### 🆕 **Security & Cryptography** (~1.4MB total)
316
316
  ```html
317
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
318
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-security.min.js"></script>
319
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-shamir.min.js"></script>
317
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv.min.js"></script>
318
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv-security.min.js"></script>
319
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv-shamir.min.js"></script>
320
320
  <script>
321
321
  // Threshold Cryptography
322
322
  const shares = bsv.splitSecret('my_secret_key', 5, 3); // 5 shares, 3 needed
@@ -326,9 +326,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
326
326
  </script>
327
327
  ```
328
328
 
329
- ### 🎯 **Everything Bundle** (885KB)
329
+ ### 🎯 **Everything Bundle** (937KB)
330
330
  ```html
331
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.bundle.js"></script>
331
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv.bundle.js"></script>
332
332
  <script>
333
333
  // Everything available immediately
334
334
  const shares = bsv.splitSecret('secret', 5, 3); // Shamir Secret Sharing
@@ -356,14 +356,14 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
356
356
  ### 🛠️ **Advanced Development Tools**
357
357
  - 🔧 **JavaScript-to-Script**: High-level covenant development with 121 opcode mapping → [Covenant Guide](docs/ADVANCED_COVENANT_DEVELOPMENT.md)
358
358
  - 🔧 **UTXO Generator**: Create authentic test UTXOs for development → [UTXO Guide](docs/UTXO_MANAGER_GUIDE.md)
359
- - 🔧 **Preimage Parser**: Complete BIP-143 field extraction and manipulation → [Preimage Tools](examples/preimage/)
360
- - � **Debug Framework**: Script interpreter, stack examiner, and optimizer → [Debug Examples](tests/smartcontract-test.html)
359
+ - 🔧 **Preimage Parser**: Complete BIP-143 field extraction and manipulation → [Preimage Tools](https://github.com/codenlighten/smartledger-bsv/tree/main/examples/preimage)
360
+ - � **Debug Framework**: Script interpreter, stack examiner, and optimizer → [Debug Examples](https://github.com/codenlighten/smartledger-bsv/blob/main/tests/smartcontract-test.html)
361
361
  - � **PUSHTX Integration**: nChain techniques for advanced covenant patterns → [PUSHTX Insights](docs/pushtx-key-insights.md)
362
362
 
363
363
  ### 📦 **Flexible Architecture**
364
- - 📦 **12 Modular Options**: Load only what you need (27KB to 885KB) → [Loading Strategy](#loading-strategy-examples)
365
- - 📦 **Standalone Modules**: Independent legal, identity, and crypto modules → [Standalone Test](tests/standalone-modules-test.html)
366
- - 📦 **Complete Bundle**: Everything in one file for convenience → [Bundle Demo](tests/bundle-demo.html)
364
+ - 📦 **16 Modular Options**: Load only what you need (26KB to 1184KB) → [Loading Strategy](#loading-strategy-examples)
365
+ - 📦 **Standalone Modules**: Independent legal, identity, and crypto modules → [Standalone Test](https://github.com/codenlighten/smartledger-bsv/blob/main/tests/standalone-modules-test.html)
366
+ - 📦 **Complete Bundle**: Everything in one file for convenience → [Bundle Demo](https://github.com/codenlighten/smartledger-bsv/blob/main/tests/bundle-demo.html)
367
367
  - 📦 **CDN Ready**: All modules available via unpkg and jsDelivr
368
368
  - 📦 **Webpack Optimized**: Tree-shakeable and build-tool friendly
369
369
 
@@ -406,21 +406,21 @@ const contractTx = covenant.createCovenantTransaction({
406
406
 
407
407
  ### Browser CDN (Choose Your Loading Strategy)
408
408
 
409
- #### 1. **Minimal Setup** - Core + Script Helper (476KB)
409
+ #### 1. **Minimal Setup** - Core + Script Helper (~963KB)
410
410
  ```html
411
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
412
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-script-helper.min.js"></script>
411
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv.min.js"></script>
412
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv-script-helper.min.js"></script>
413
413
  <script>
414
414
  const tx = new bsv.Transaction();
415
415
  const sig = bsvScriptHelper.createSignature(tx, privateKey, 0, script, satoshis);
416
416
  </script>
417
417
  ```
418
418
 
419
- #### 2. **DeFi Development** - Core + Covenants + Debug (932KB)
419
+ #### 2. **DeFi Development** - Core + Covenants + Debug (~2.7MB — each bundle re-embeds core BSV)
420
420
  ```html
421
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
422
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-covenant.min.js"></script>
423
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-smartcontract.min.js"></script>
421
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv.min.js"></script>
422
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv-covenant.min.js"></script>
423
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv-smartcontract.min.js"></script>
424
424
  <script>
425
425
  const covenant = new bsvCovenant.CovenantInterface();
426
426
  const debugInfo = SmartContract.interpretScript(script);
@@ -428,19 +428,19 @@ const contractTx = covenant.createCovenantTransaction({
428
428
  </script>
429
429
  ```
430
430
 
431
- #### 3. **Security First** - Core + Enhanced Security (739KB)
431
+ #### 3. **Security First** - Core + Enhanced Security (~963KB)
432
432
  ```html
433
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
434
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-security.min.js"></script>
433
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv.min.js"></script>
434
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv-security.min.js"></script>
435
435
  <script>
436
436
  const verified = bsvSecurity.SmartVerify.verify(signature, hash, publicKey);
437
437
  const enhanced = bsvSecurity.EllipticFixed.createSignature(privateKey, hash);
438
438
  </script>
439
439
  ```
440
440
 
441
- #### 4. **Everything Bundle** - One File Solution (764KB)
441
+ #### 4. **Everything Bundle** - One File Solution (937KB)
442
442
  ```html
443
- <script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.bundle.js"></script>
443
+ <script src="https://unpkg.com/@smartledger/bsv@3.4.4/bsv.bundle.js"></script>
444
444
  <script>
445
445
  // Everything available under bsv namespace
446
446
  const keys = bsv.SmartLedgerBundle.generateKeys();
@@ -777,18 +777,18 @@ A planned 3.5.0 will offer an opt-in flag to route the default verify path throu
777
777
 
778
778
  ### 🔧 **Technical Resources**
779
779
  - **[SmartContract Integration](SMARTCONTRACT_INTEGRATION.md)** - Debug tools and analysis
780
- - **[Examples Directory](examples/)** - Working code samples
781
- - **[Test Suite](tests/)** - Comprehensive testing examples
780
+ - **[Examples Directory](https://github.com/codenlighten/smartledger-bsv/tree/main/examples)** - Working code samples
781
+ - **[Test Suite](https://github.com/codenlighten/smartledger-bsv/tree/main/tests)** - Comprehensive testing examples
782
782
  - **[Build System](build/)** - Webpack configurations
783
783
 
784
784
  ### 🌐 **Loading Strategy Examples**
785
785
 
786
786
  | **Use Case** | **Recommended Load** | **Size** | **Features** |
787
787
  |--------------|---------------------|----------|--------------|
788
- | **Simple Transactions** | `bsv.min.js` | 449KB | Core BSV + SmartContract |
789
- | **DeFi Development** | Core + Covenant + Debug | 932KB | Advanced contracts + tools |
790
- | **Enterprise Apps** | `bsv.bundle.js` | 764KB | Everything included |
791
- | **Mobile/Lightweight** | Core + Script Helper | 476KB | Essential tools only |
788
+ | **Simple Transactions** | `bsv.min.js` | 937KB | Core BSV + SmartContract |
789
+ | **DeFi Development** | Core + Covenant + Debug | ~2.7MB | Advanced contracts + tools (bundles re-embed core BSV) |
790
+ | **Enterprise Apps** | `bsv.bundle.js` | 937KB | Everything included |
791
+ | **Mobile/Lightweight** | Core + Script Helper | ~963KB | Essential tools only |
792
792
  | **Research/Analysis** | Core + SmartContract | 900KB | Full debug capabilities |
793
793
 
794
794
  ### 🔗 **Cross-References**
@@ -799,19 +799,19 @@ A planned 3.5.0 will offer an opt-in flag to route the default verify path throu
799
799
  - [API Reference](#api-reference) → [Method Documentation](docs/)
800
800
 
801
801
  **From Examples → Implementation:**
802
- - [Covenant Examples](examples/covenants/) → [Production Guide](docs/ADVANCED_COVENANT_DEVELOPMENT.md#production-guidelines)
803
- - [Script Examples](examples/scripts/) → [Custom Script Guide](docs/CUSTOM_SCRIPT_DEVELOPMENT.md)
804
- - [Test Files](tests/) → [Integration Examples](examples/)
802
+ - [Covenant Examples](https://github.com/codenlighten/smartledger-bsv/tree/main/examples/covenants) → [Production Guide](docs/ADVANCED_COVENANT_DEVELOPMENT.md#production-guidelines)
803
+ - [Script Examples](https://github.com/codenlighten/smartledger-bsv/tree/main/examples/scripts) → [Custom Script Guide](docs/CUSTOM_SCRIPT_DEVELOPMENT.md)
804
+ - [Test Files](https://github.com/codenlighten/smartledger-bsv/tree/main/tests) → [Integration Examples](https://github.com/codenlighten/smartledger-bsv/tree/main/examples)
805
805
 
806
806
  **From Concepts → Code:**
807
- - [PUSHTX Theory](docs/pushtx-key-insights.md) → [Covenant Implementation](examples/covenants/advanced_covenant_demo.js)
807
+ - [PUSHTX Theory](docs/pushtx-key-insights.md) → [Covenant Implementation](https://github.com/codenlighten/smartledger-bsv/blob/main/examples/covenants/advanced_covenant_demo.js)
808
808
  - [Security Features](#smart-security) → [Implementation](lib/crypto/smartledger_verify.js)
809
- - [Debug Tools](#debug-tools) → [Usage Examples](tests/smartcontract-test.html)
809
+ - [Debug Tools](#debug-tools) → [Usage Examples](https://github.com/codenlighten/smartledger-bsv/blob/main/tests/smartcontract-test.html)
810
810
 
811
811
  ### 🎓 **Learning Path**
812
812
 
813
813
  1. **Start**: [2-Minute Quick Start](#2-minute-quick-start)
814
- 2. **Practice**: [Examples Directory](examples/)
814
+ 2. **Practice**: [Examples Directory](https://github.com/codenlighten/smartledger-bsv/tree/main/examples)
815
815
  3. **Build**: [Custom Script Guide](docs/CUSTOM_SCRIPT_DEVELOPMENT.md)
816
816
  4. **Advanced**: [Covenant Development](docs/ADVANCED_COVENANT_DEVELOPMENT.md)
817
817
  5. **Deploy**: [Production Guidelines](docs/ADVANCED_COVENANT_DEVELOPMENT.md#production-guidelines)
@@ -839,11 +839,11 @@ A planned 3.5.0 will offer an opt-in flag to route the default verify path throu
839
839
  - [🔧 **Integration Guide**](SMARTCONTRACT_INTEGRATION.md) - Smart contract integration
840
840
 
841
841
  ### 📋 **Examples & Demos**
842
- - [� **Interactive Demos**](demos/) - **NEW!** HTML & Node.js smart contract demos
843
- - [�📁 **Examples Directory**](examples/) - Working code examples
844
- - [🎯 **Basic Examples**](examples/basic/) - Simple transactions & addresses
845
- - [🔒 **Covenant Examples**](examples/covenants/) - Smart contract patterns
846
- - [📊 **Advanced Examples**](examples/covenants2/) - Production patterns
842
+ - [� **Interactive Demos**](https://github.com/codenlighten/smartledger-bsv/tree/main/demos) - **NEW!** HTML & Node.js smart contract demos
843
+ - [�📁 **Examples Directory**](https://github.com/codenlighten/smartledger-bsv/tree/main/examples) - Working code examples
844
+ - [🎯 **Basic Examples**](https://github.com/codenlighten/smartledger-bsv/tree/main/examples/basic) - Simple transactions & addresses
845
+ - [🔒 **Covenant Examples**](https://github.com/codenlighten/smartledger-bsv/tree/main/examples/covenants) - Smart contract patterns
846
+ - [📊 **Advanced Examples**](https://github.com/codenlighten/smartledger-bsv/tree/main/examples/covenants2) - Production patterns
847
847
 
848
848
  **🎮 Try the Interactive Demos:**
849
849
  ```bash