smartledger-bsv 4.2.0 → 4.2.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/CHANGELOG.md CHANGED
@@ -5,6 +5,37 @@ 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
+ ## [4.2.1] - 2026-06-07
9
+
10
+ ### Docs
11
+
12
+ - **Substantial README rewrite for the v4.x line.** The README still
13
+ headlined v3.4.x (4 minors and a major stale), showed the *old*
14
+ `lib/covenant-interface` API in the covenant examples instead of the
15
+ v4.2.0 `bsv.SmartContract.PushTx`/`PELS`/`Token`/`Locks`/`verifyScript`
16
+ surface, had a wrong CDN-Bundles size table (off by up to 7× on
17
+ `bsv-mnemonic`), duplicate "Complete Documentation" sections, a
18
+ "planned 3.5.0" security note that was overtaken by 4.0.0, and a
19
+ footer stamp claiming "v3.3.4 • 9 Loading Options". Replaced the
20
+ headline with the v4.2.0 covenant section, rewrote PUSHTX/PELS
21
+ examples to use the new API, added Ownership Tokens + end-to-end
22
+ verification snippets, merged the two Documentation sections (7
23
+ broken file paths fixed, 4 dead links removed), replaced the
24
+ inaccurate CDN sub-table with a pointer to the canonical
25
+ loading-options table, updated Security to point at the v4.0.0 GDAF
26
+ fix, and stamped the footer at v4.2.1.
27
+
28
+ ### Semver
29
+
30
+ Patch — README only. No source changes; no `lib/`, `bin/`, `bsv.d.ts`,
31
+ or test diffs. Out-of-band republish: `@smartledger/bsv@4.2.0` was
32
+ published from a separate session with the OLD README, then
33
+ unpublished after the rewrite. npm's anti-republish policy refuses to
34
+ reuse the 4.2.0 version number; 4.2.1 is the canonical version with
35
+ the corrected README content. `smartledger-bsv@4.2.0` (unscoped) was
36
+ published with the new README; for parity, the unscoped is also
37
+ republished at 4.2.1.
38
+
8
39
  ## [4.2.0] - 2026-06-07
9
40
 
10
41
  ### Added
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-4.2.0-blue.svg)](https://www.npmjs.com/package/@smartledger/bsv)
5
+ [![Version](https://img.shields.io/badge/version-4.2.1-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)
@@ -71,8 +71,8 @@ const ok = SC.verifyScript(unlockScript, lockingScript, tx, inputIndex, satoshis
71
71
  ### **Quick Start - Issue Your First Verifiable Credential**
72
72
 
73
73
  ```bash
74
- # Install SmartLedger BSV v4.2.0
75
- npm install @smartledger/bsv@4.2.0
74
+ # Install SmartLedger BSV v4.2.1
75
+ npm install @smartledger/bsv@4.2.1
76
76
 
77
77
  # Initialize DID:web issuer (generates ES256 keys)
78
78
  npx smartledger-bsv didweb init --domain example.com --alg ES256
@@ -181,42 +181,42 @@ console.log('Status:', status) // 'revoked'
181
181
  ### **Core Modules**
182
182
  | Module | Size | Use Case | CDN |
183
183
  |--------|------|----------|-----|
184
- | **bsv.min.js** | 937KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@4.2.0/bsv.min.js` |
185
- | **bsv.bundle.js** | 937KB | Everything in one file | `unpkg.com/@smartledger/bsv@4.2.0/bsv.bundle.js` |
184
+ | **bsv.min.js** | 937KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@4.2.1/bsv.min.js` |
185
+ | **bsv.bundle.js** | 937KB | Everything in one file | `unpkg.com/@smartledger/bsv@4.2.1/bsv.bundle.js` |
186
186
 
187
187
  ### **W3C Verifiable Credentials**
188
188
  | Module | Size | Use Case | CDN |
189
189
  |--------|------|----------|-----|
190
- | **🟢 bsv-didweb.min.js** | 419KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@4.2.0/bsv-didweb.min.js` |
191
- | **🟢 bsv-vcjwt.min.js** | 419KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@4.2.0/bsv-vcjwt.min.js` |
192
- | **🟢 bsv-statuslist.min.js** | 487KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@4.2.0/bsv-statuslist.min.js` |
193
- | **🟢 bsv-anchor.min.js** | 418KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@4.2.0/bsv-anchor.min.js` |
190
+ | **🟢 bsv-didweb.min.js** | 419KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@4.2.1/bsv-didweb.min.js` |
191
+ | **🟢 bsv-vcjwt.min.js** | 419KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@4.2.1/bsv-vcjwt.min.js` |
192
+ | **🟢 bsv-statuslist.min.js** | 487KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@4.2.1/bsv-statuslist.min.js` |
193
+ | **🟢 bsv-anchor.min.js** | 418KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@4.2.1/bsv-anchor.min.js` |
194
194
 
195
195
  ### **Smart Contract & Development**
196
196
  | Module | Size | Use Case | CDN |
197
197
  |--------|------|----------|-----|
198
- | **bsv-smartcontract.min.js** | 937KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@4.2.0/bsv-smartcontract.min.js` |
199
- | **bsv-covenant.min.js** | 913KB | Covenant operations | `unpkg.com/@smartledger/bsv@4.2.0/bsv-covenant.min.js` |
200
- | **bsv-script-helper.min.js** | 26KB | Custom script tools | `unpkg.com/@smartledger/bsv@4.2.0/bsv-script-helper.min.js` |
201
- | **bsv-security.min.js** | 26KB | Security enhancements | `unpkg.com/@smartledger/bsv@4.2.0/bsv-security.min.js` |
198
+ | **bsv-smartcontract.min.js** | 937KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@4.2.1/bsv-smartcontract.min.js` |
199
+ | **bsv-covenant.min.js** | 913KB | Covenant operations | `unpkg.com/@smartledger/bsv@4.2.1/bsv-covenant.min.js` |
200
+ | **bsv-script-helper.min.js** | 26KB | Custom script tools | `unpkg.com/@smartledger/bsv@4.2.1/bsv-script-helper.min.js` |
201
+ | **bsv-security.min.js** | 26KB | Security enhancements | `unpkg.com/@smartledger/bsv@4.2.1/bsv-security.min.js` |
202
202
 
203
203
  ### **Legal & Compliance**
204
204
  | Module | Size | Use Case | CDN |
205
205
  |--------|------|----------|-----|
206
- | **bsv-ltp.min.js** | 1184KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@4.2.0/bsv-ltp.min.js` |
207
- | **bsv-gdaf.min.js** | 1184KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@4.2.0/bsv-gdaf.min.js` |
206
+ | **bsv-ltp.min.js** | 1184KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@4.2.1/bsv-ltp.min.js` |
207
+ | **bsv-gdaf.min.js** | 1184KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@4.2.1/bsv-gdaf.min.js` |
208
208
 
209
209
  ### **Advanced Cryptography**
210
210
  | Module | Size | Use Case | CDN |
211
211
  |--------|------|----------|-----|
212
- | **bsv-shamir.min.js** | 432KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@4.2.0/bsv-shamir.min.js` |
212
+ | **bsv-shamir.min.js** | 432KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@4.2.1/bsv-shamir.min.js` |
213
213
 
214
214
  ### **Utilities**
215
215
  | Module | Size | Use Case | CDN |
216
216
  |--------|------|----------|-----|
217
- | **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@4.2.0/bsv-ecies.min.js` |
218
- | **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@4.2.0/bsv-message.min.js` |
219
- | **bsv-mnemonic.min.js** | 681KB | HD wallets | `unpkg.com/@smartledger/bsv@4.2.0/bsv-mnemonic.min.js` |
217
+ | **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@4.2.1/bsv-ecies.min.js` |
218
+ | **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@4.2.1/bsv-message.min.js` |
219
+ | **bsv-mnemonic.min.js** | 681KB | HD wallets | `unpkg.com/@smartledger/bsv@4.2.1/bsv-mnemonic.min.js` |
220
220
 
221
221
  ## ⚡ **2-Minute Quick Start**
222
222
 
@@ -227,7 +227,7 @@ Get started with Bitcoin SV development in under 2 minutes:
227
227
  npm install @smartledger/bsv
228
228
 
229
229
  # Or include in HTML
230
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv.min.js"></script>
230
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv.min.js"></script>
231
231
  ```
232
232
 
233
233
  > **🔧 v4.x:** First-class interpreter-verified covenants (4.2.0), post-Genesis
@@ -325,8 +325,8 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
325
325
 
326
326
  ### 🔧 **Basic Development** (~963KB total)
327
327
  ```html
328
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv.min.js"></script>
329
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv-script-helper.min.js"></script>
328
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv.min.js"></script>
329
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv-script-helper.min.js"></script>
330
330
  <script>
331
331
  const privateKey = new bsv.PrivateKey();
332
332
  const utxos = new bsv.SmartContract.UTXOGenerator().createRealUTXOs(2, 100000);
@@ -335,9 +335,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
335
335
 
336
336
  ### 🔒 **Smart Contract Development** (~2.7MB total — each bundle re-embeds core BSV)
337
337
  ```html
338
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv.min.js"></script>
339
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv-covenant.min.js"></script>
340
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv-smartcontract.min.js"></script>
338
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv.min.js"></script>
339
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv-covenant.min.js"></script>
340
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv-smartcontract.min.js"></script>
341
341
  <script>
342
342
  const covenant = bsv.SmartContract.createCovenantBuilder()
343
343
  .extractField('amount').push(50000).greaterThanOrEqual().verify().build();
@@ -347,9 +347,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
347
347
 
348
348
  ### 🆕 **Legal & Identity Development** (~3.2MB total — each bundle re-embeds core BSV)
349
349
  ```html
350
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv.min.js"></script>
351
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv-ltp.min.js"></script>
352
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv-gdaf.min.js"></script>
350
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv.min.js"></script>
351
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv-ltp.min.js"></script>
352
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv-gdaf.min.js"></script>
353
353
  <script>
354
354
  // Legal Token Protocol
355
355
  const propertyToken = bsv.createPropertyToken({
@@ -363,9 +363,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
363
363
 
364
364
  ### 🆕 **Security & Cryptography** (~1.4MB total)
365
365
  ```html
366
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv.min.js"></script>
367
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv-security.min.js"></script>
368
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv-shamir.min.js"></script>
366
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv.min.js"></script>
367
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv-security.min.js"></script>
368
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv-shamir.min.js"></script>
369
369
  <script>
370
370
  // Threshold Cryptography
371
371
  const shares = bsv.splitSecret('my_secret_key', 5, 3); // 5 shares, 3 needed
@@ -377,7 +377,7 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
377
377
 
378
378
  ### 🎯 **Everything Bundle** (937KB)
379
379
  ```html
380
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv.bundle.js"></script>
380
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv.bundle.js"></script>
381
381
  <script>
382
382
  // Everything available immediately
383
383
  const shares = bsv.splitSecret('secret', 5, 3); // Shamir Secret Sharing
@@ -457,8 +457,8 @@ const contractTx = covenant.createCovenantTransaction({
457
457
 
458
458
  #### 1. **Minimal Setup** - Core + Script Helper (~963KB)
459
459
  ```html
460
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv.min.js"></script>
461
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv-script-helper.min.js"></script>
460
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv.min.js"></script>
461
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv-script-helper.min.js"></script>
462
462
  <script>
463
463
  const tx = new bsv.Transaction();
464
464
  const sig = bsvScriptHelper.createSignature(tx, privateKey, 0, script, satoshis);
@@ -467,9 +467,9 @@ const contractTx = covenant.createCovenantTransaction({
467
467
 
468
468
  #### 2. **DeFi Development** - Core + Covenants + Debug (~2.7MB — each bundle re-embeds core BSV)
469
469
  ```html
470
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv.min.js"></script>
471
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv-covenant.min.js"></script>
472
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv-smartcontract.min.js"></script>
470
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv.min.js"></script>
471
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv-covenant.min.js"></script>
472
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv-smartcontract.min.js"></script>
473
473
  <script>
474
474
  const covenant = new bsvCovenant.CovenantInterface();
475
475
  const debugInfo = SmartContract.interpretScript(script);
@@ -479,8 +479,8 @@ const contractTx = covenant.createCovenantTransaction({
479
479
 
480
480
  #### 3. **Security First** - Core + Enhanced Security (~963KB)
481
481
  ```html
482
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv.min.js"></script>
483
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv-security.min.js"></script>
482
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv.min.js"></script>
483
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv-security.min.js"></script>
484
484
  <script>
485
485
  const verified = bsvSecurity.SmartVerify.verify(signature, hash, publicKey);
486
486
  const enhanced = bsvSecurity.EllipticFixed.createSignature(privateKey, hash);
@@ -489,7 +489,7 @@ const contractTx = covenant.createCovenantTransaction({
489
489
 
490
490
  #### 4. **Everything Bundle** - One File Solution (937KB)
491
491
  ```html
492
- <script src="https://unpkg.com/@smartledger/bsv@4.2.0/bsv.bundle.js"></script>
492
+ <script src="https://unpkg.com/@smartledger/bsv@4.2.1/bsv.bundle.js"></script>
493
493
  <script>
494
494
  // Everything available under bsv namespace
495
495
  const keys = bsv.SmartLedgerBundle.generateKeys();
@@ -789,7 +789,7 @@ const timelockScript = helper.createTimelockScript(
789
789
 
790
790
  See the **[16 Loading Options](#-16-loading-options---choose-your-approach)**
791
791
  table near the top for the full list of bundles with current sizes and
792
- canonical `unpkg.com/@smartledger/bsv@4.2.0/...` URLs.
792
+ canonical `unpkg.com/@smartledger/bsv@4.2.1/...` URLs.
793
793
 
794
794
  ## 🔐 Security
795
795
 
@@ -930,6 +930,6 @@ For security vulnerabilities, follow the disclosure process in
930
930
 
931
931
  ---
932
932
 
933
- **SmartLedger-BSV v4.2.0** — *Complete Bitcoin SV Development Framework*
933
+ **SmartLedger-BSV v4.2.1** — *Complete Bitcoin SV Development Framework*
934
934
 
935
935
  Built with ❤️ for the Bitcoin SV ecosystem • 16 Loading Options • Interpreter-Verified Covenants