@smartledger/bsv 3.4.0 → 3.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/CHANGELOG.md +48 -0
- package/README.md +26 -24
- package/bsv-anchor.min.js +12 -0
- package/bsv-covenant.min.js +8 -8
- package/bsv-didweb.min.js +12 -0
- package/bsv-gdaf.min.js +9 -9
- package/bsv-ltp.min.js +9 -9
- package/bsv-mnemonic.min.js +2 -2
- package/bsv-shamir.min.js +3 -3
- package/bsv-smartcontract.min.js +5 -5
- package/bsv-statuslist.min.js +18 -0
- package/bsv-vcjwt.min.js +12 -0
- package/bsv.bundle.js +9 -9
- package/bsv.min.js +5 -5
- package/build/webpack.anchor.config.js +9 -13
- package/build/webpack.didweb.config.js +10 -14
- package/build/webpack.statuslist.config.js +9 -14
- package/build/webpack.vcjwt.config.js +9 -13
- package/examples/legacy/README.md +11 -0
- package/index.js +15 -5
- package/lib/browser-utxo-manager-es5.js +11 -4
- package/lib/browser-utxo-manager.js +15 -8
- package/lib/ltp/claim.js +1 -0
- package/lib/ltp/obligation.js +1 -0
- package/lib/ltp/registry.js +2 -0
- package/lib/ltp/right.js +1 -0
- package/lib/transaction/transaction.js +1 -1
- package/lib/util/_.js +7 -1
- package/package.json +9 -11
- package/demos/gdaf_core_test.js +0 -131
- package/examples/scripts/custom_script_signature_test.js +0 -344
- package/tests/browser-compatibility/README.md +0 -35
- package/tests/browser-compatibility/test-cdn-vs-local.html +0 -186
- package/tests/browser-compatibility/test-pbkdf2.html +0 -51
- package/tests/bundle-completeness-test.html +0 -131
- package/tests/bundle-demo.html +0 -476
- package/tests/smartcontract-test.html +0 -239
- package/tests/standalone-modules-test.html +0 -260
- package/tests/test.html +0 -612
- package/tests/test_standalone_shamir.html +0 -83
- package/tests/unpkg-demo.html +0 -194
- package/utilities/blockchain-state.json +0 -118565
- /package/{lib/smart_contract/test_integration.js → examples/legacy/smart_contract_test_integration.js} +0 -0
- /package/{tests → examples/legacy}/test_builtin_verify.js +0 -0
- /package/{tests → examples/legacy}/test_debug_integration.js +0 -0
- /package/{tests → examples/legacy}/test_ecdsa_little.js +0 -0
- /package/{tests → examples/legacy}/test_shamir.js +0 -0
- /package/{tests → examples/legacy}/test_smartverify_der.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,54 @@ 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.1] - 2026-05-18
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Credential bundles now actually ship.** `bsv-didweb.min.js`, `bsv-vcjwt.min.js`, `bsv-statuslist.min.js`, and `bsv-anchor.min.js` were missing from the `files:` allowlist in 3.4.0, so they were never included in the published npm tarball even though the README advertised them.
|
|
13
|
+
- **`prepublishOnly` now builds every advertised bundle.** Previously it ran `npm run build`, which only produced 6 of the ~16 bundles. It now runs `npm run build-all`, so credential, covenant, ltp, gdaf, and other specialized bundles can't go out of sync with source at publish time.
|
|
14
|
+
- **CSPRNG-backed `Transaction.shuffleOutputs()`.** `lib/util/_.js` `_.shuffle` now draws entropy from `bsv.crypto.Random` (Node `crypto.randomBytes` / `window.crypto.getRandomValues`) instead of `Math.random`. Output ordering is a privacy primitive; a predictable PRNG defeated the purpose.
|
|
15
|
+
- **`Transaction._fromMultisigUtxo` returns a real error.** A reachable `throw new Error('@TODO')` for unsupported script types now throws `errors.Transaction.Input.UnsupportedScript` with the offending script in the message.
|
|
16
|
+
- **Module load failures surface in Node.** The `try/catch` blocks around optional modules (`DIDWeb`, `VcJwt`, `StatusList`, `Anchor`, `BrowserUTXOManager`) in `index.js` previously swallowed all errors. They now `console.warn` in Node and stay silent in the browser, so upgrade breakage is visible.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **`tests/` no longer ships to npm consumers.** The directory of HTML demo pages and 5 orphan standalone scripts is removed from `package.json` `files:` and added to `.npmignore`.
|
|
21
|
+
- **`utilities/blockchain-state.json` (3.2MB) no longer ships.** Mock blockchain data added to `.npmignore`; not needed at install time.
|
|
22
|
+
- **Browser UTXO manager logs are gated.** `lib/browser-utxo-manager.js` and `lib/browser-utxo-manager-es5.js` info-level `console.log` calls now require `BSV_DEBUG=1` (Node) or `window.BSV_DEBUG = true` (browser). `console.warn`/`console.error` unchanged.
|
|
23
|
+
- **Orphan scripts moved out of `lib/` and `tests/`.** `lib/smart_contract/test_integration.js` (an integration script that called `process.exit`) plus 5 pre-mocha scripts from `tests/` moved to `examples/legacy/`.
|
|
24
|
+
- **`package-lock.json` is now committed.** Removed from `.gitignore` so `npm audit` and reproducible installs work.
|
|
25
|
+
- **Dead `files:` entries removed.** Seven file references in `package.json` `files:` pointed to files that don't exist; npm silently skipped them. Removed.
|
|
26
|
+
|
|
27
|
+
### Notes
|
|
28
|
+
|
|
29
|
+
- No public API changes. All call sites continue to work.
|
|
30
|
+
- Dev-only vulnerabilities remain in `webpack 4` / `standard 12` / `mocha 8`; a toolchain upgrade is planned for 3.5.0 to address them without breaking downstream bundler integrations.
|
|
31
|
+
|
|
32
|
+
## [3.4.0] - 2025-11-09
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- **DID:web module** (`bsv.DIDWeb`, `bsv-didweb.min.js`): W3C DID Core `did:web` method generation with both ES256 (NIST P-256) and ES256K (Bitcoin secp256k1) key types.
|
|
37
|
+
- **VC-JWT module** (`bsv.VcJwt`, `bsv-vcjwt.min.js`): W3C Verifiable Credentials issuance and verification as JWT (RFC 7515 / RFC 7519 compliant).
|
|
38
|
+
- **StatusList2021 module** (`bsv.StatusList`, `bsv-statuslist.min.js`): credential revocation supporting 100k credentials per list.
|
|
39
|
+
- **Anchor module** (`bsv.Anchor`, `bsv-anchor.min.js`): privacy-preserving SHA-256 hash-only anchoring helpers for BSV.
|
|
40
|
+
- **CLI tooling** (`bin/cli.js`): `didweb`, `vc`, `status`, `anchor` subcommands.
|
|
41
|
+
- Quickstart examples and updated module tables in the README.
|
|
42
|
+
|
|
43
|
+
### Standards Compliance
|
|
44
|
+
|
|
45
|
+
- W3C Verifiable Credentials Data Model
|
|
46
|
+
- W3C DID Core (`did:web` method)
|
|
47
|
+
- RFC 7515 (JWS), RFC 7519 (JWT)
|
|
48
|
+
- StatusList2021 specification
|
|
49
|
+
- NIST P-256 and Bitcoin secp256k1 curves
|
|
50
|
+
|
|
51
|
+
### Known Issues (fixed in 3.4.1)
|
|
52
|
+
|
|
53
|
+
- The four new credential bundles were not listed in `package.json` `files:`, so they did not ship to npm consumers despite being advertised in the README.
|
|
54
|
+
- `prepublishOnly` only built the core 6 bundles, not the credential set.
|
|
55
|
+
|
|
8
56
|
## [3.3.4] - 2025-10-31
|
|
9
57
|
|
|
10
58
|
### Fixed
|
package/README.md
CHANGED
|
@@ -2,15 +2,17 @@
|
|
|
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
|
-
[](https://www.npmjs.com/package/@smartledger/bsv)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://bitcoinsv.com/)
|
|
8
8
|
[](#loading-options)
|
|
9
9
|
[](#verifiable-credentials)
|
|
10
10
|
|
|
11
|
-
The most comprehensive and flexible Bitcoin SV library available. **
|
|
11
|
+
The most comprehensive and flexible Bitcoin SV library available. **In v3.4.x**: Legally-recognizable DID:web + VC-JWT toolkit with ES256/ES256K support, StatusList2021 revocation, and BSV anchoring. Choose from 16 different distribution methods: standalone modules, complete bundle, or mix-and-match approach.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
> **v3.4.1 (bugfix)**: credential bundles now actually ship to npm consumers, `prepublishOnly` builds the full set, and `Transaction.shuffleOutputs()` uses a CSPRNG. See [CHANGELOG](./CHANGELOG.md#341---2026-05-18).
|
|
14
|
+
|
|
15
|
+
## 🆕 **v3.4.x - Legally-Recognizable Credentials**
|
|
14
16
|
|
|
15
17
|
### **Why This Matters**
|
|
16
18
|
- ✅ **W3C Standards**: Full VC-JWT and DID:web compliance for legal recognition
|
|
@@ -23,8 +25,8 @@ The most comprehensive and flexible Bitcoin SV library available. **NEW in v3.4.
|
|
|
23
25
|
### **Quick Start - Issue Your First Verifiable Credential**
|
|
24
26
|
|
|
25
27
|
```bash
|
|
26
|
-
# Install SmartLedger BSV v3.4.
|
|
27
|
-
npm install @smartledger/bsv@3.4.
|
|
28
|
+
# Install SmartLedger BSV v3.4.1
|
|
29
|
+
npm install @smartledger/bsv@3.4.1
|
|
28
30
|
|
|
29
31
|
# Initialize DID:web issuer (generates ES256 keys)
|
|
30
32
|
npx smartledger-bsv didweb init --domain example.com --alg ES256
|
|
@@ -133,42 +135,42 @@ console.log('Status:', status) // 'revoked'
|
|
|
133
135
|
### **Core Modules**
|
|
134
136
|
| Module | Size | Use Case | CDN |
|
|
135
137
|
|--------|------|----------|-----|
|
|
136
|
-
| **bsv.min.js** |
|
|
137
|
-
| **bsv.bundle.js** |
|
|
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
140
|
|
|
139
|
-
### **🆕 W3C Verifiable Credentials (v3.4.
|
|
141
|
+
### **🆕 W3C Verifiable Credentials (v3.4.x)**
|
|
140
142
|
| Module | Size | Use Case | CDN |
|
|
141
143
|
|--------|------|----------|-----|
|
|
142
|
-
| **🟢 bsv-didweb.min.js** |
|
|
143
|
-
| **🟢 bsv-vcjwt.min.js** |
|
|
144
|
-
| **🟢 bsv-statuslist.min.js** |
|
|
145
|
-
| **🟢 bsv-anchor.min.js** |
|
|
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` |
|
|
146
148
|
|
|
147
149
|
### **Smart Contract & Development**
|
|
148
150
|
| Module | Size | Use Case | CDN |
|
|
149
151
|
|--------|------|----------|-----|
|
|
150
|
-
| **bsv-smartcontract.min.js** |
|
|
151
|
-
| **bsv-covenant.min.js** |
|
|
152
|
-
| **bsv-script-helper.min.js** |
|
|
153
|
-
| **bsv-security.min.js** |
|
|
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` |
|
|
154
156
|
|
|
155
157
|
### **Legal & Compliance**
|
|
156
158
|
| Module | Size | Use Case | CDN |
|
|
157
159
|
|--------|------|----------|-----|
|
|
158
|
-
| **bsv-ltp.min.js** |
|
|
159
|
-
| **bsv-gdaf.min.js** |
|
|
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
162
|
|
|
161
163
|
### **Advanced Cryptography**
|
|
162
164
|
| Module | Size | Use Case | CDN |
|
|
163
165
|
|--------|------|----------|-----|
|
|
164
|
-
| **bsv-shamir.min.js** |
|
|
166
|
+
| **bsv-shamir.min.js** | 432KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@3.4.1/bsv-shamir.min.js` |
|
|
165
167
|
|
|
166
168
|
### **Utilities**
|
|
167
169
|
| Module | Size | Use Case | CDN |
|
|
168
170
|
|--------|------|----------|-----|
|
|
169
|
-
| **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@3.4.
|
|
170
|
-
| **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@3.4.
|
|
171
|
-
| **bsv-mnemonic.min.js** |
|
|
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` |
|
|
172
174
|
|
|
173
175
|
## ⚡ **2-Minute Quick Start**
|
|
174
176
|
|
|
@@ -179,10 +181,10 @@ Get started with Bitcoin SV development in under 2 minutes:
|
|
|
179
181
|
npm install @smartledger/bsv
|
|
180
182
|
|
|
181
183
|
# Or include in HTML
|
|
182
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.4.
|
|
184
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.4.1/bsv.min.js"></script>
|
|
183
185
|
```
|
|
184
186
|
|
|
185
|
-
> **🔧 v3.4.
|
|
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.
|
|
186
188
|
|
|
187
189
|
**Basic Transaction (30 seconds):**
|
|
188
190
|
```javascript
|