@smartledger/bsv 3.3.3 → 3.3.5
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 +50 -28
- package/README.md +55 -36
- package/bsv-covenant.min.js +6 -6
- package/bsv-gdaf.min.js +6 -6
- package/bsv-ltp.min.js +6 -6
- package/bsv-mnemonic.min.js +4 -4
- package/bsv-smartcontract.min.js +5 -5
- package/bsv.bundle.js +5 -5
- package/bsv.min.js +5 -5
- package/demos/README.md +188 -0
- package/demos/architecture_demo.js +247 -0
- package/demos/browser-test.html +1208 -0
- package/demos/bsv_wallet_demo.js +242 -0
- package/demos/complete_ltp_demo.js +511 -0
- package/demos/debug_tools_demo.js +87 -0
- package/demos/demo_features.js +123 -0
- package/demos/easy_interface_demo.js +109 -0
- package/demos/ecies_demo.js +182 -0
- package/demos/gdaf_core_test.js +131 -0
- package/demos/gdaf_demo.js +237 -0
- package/demos/ltp_demo.js +361 -0
- package/demos/ltp_primitives_demo.js +403 -0
- package/demos/message_demo.js +209 -0
- package/demos/preimage_separation_demo.js +383 -0
- package/demos/script_helper_demo.js +289 -0
- package/demos/security_demo.js +287 -0
- package/demos/shamir_demo.js +121 -0
- package/demos/simple_demo.js +204 -0
- package/demos/simple_p2pkh_demo.js +169 -0
- package/demos/simple_utxo_preimage_demo.js +196 -0
- package/demos/smart_contract_demo.html +1347 -0
- package/demos/smart_contract_demo.js +910 -0
- package/demos/utxo_generator_demo.js +244 -0
- package/demos/validation_pipeline_demo.js +155 -0
- package/demos/web3keys.html +740 -0
- package/docs/BUNDLE_UPDATE_SUMMARY.md +40 -0
- package/docs/DOCUMENTATION_REVIEW_REPORT.md +11 -11
- package/docs/FIX_CREATEHMAC_ISSUE.md +91 -0
- package/docs/MODULE_REFERENCE_COMPLETE.md +28 -28
- package/docs/SMARTLEDGER_BSV_USAGE_ANSWERS.md +477 -0
- package/docs/SMARTLEDGER_BSV_USAGE_EXAMPLES.js +372 -0
- package/docs/SMARTLEDGER_BSV_USAGE_GUIDE.md +555 -0
- package/docs/SMART_CONTRACT_DEVELOPMENT_GUIDE.md +1459 -0
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +2 -2
- package/docs/getting-started/INSTALLATION.md +25 -25
- package/docs/getting-started/QUICK_START.md +7 -7
- package/docs/migration/FROM_BSV_1_5_6.md +5 -5
- package/examples/complete_workflow_demo.js +783 -0
- package/examples/definitive_working_demo.js +261 -0
- package/examples/final_working_contracts.js +338 -0
- package/examples/smart_contract_templates.js +718 -0
- package/examples/working_smart_contracts.js +348 -0
- package/index.js +7 -0
- package/lib/browser-utxo-manager-es5.js +316 -0
- package/lib/browser-utxo-manager.js +533 -0
- package/lib/mnemonic/pbkdf2.browser.js +69 -0
- package/lib/mnemonic/pbkdf2.js +2 -68
- package/lib/mnemonic/pbkdf2.node.js +68 -0
- package/package.json +18 -7
- package/tests/browser-compatibility/README.md +35 -0
- package/tests/browser-compatibility/test-cdn-vs-local.html +186 -0
- package/tests/browser-compatibility/test-pbkdf2.html +51 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,47 +1,65 @@
|
|
|
1
|
-
# Changelog
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
+
All notable changes to SmartLedger-BSV will be documented in this file.
|
|
3
4
|
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
## [3.3.4] - 2025-10-31
|
|
6
9
|
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Critical Browser Compatibility Fix**: Resolved `createHmac is not a function` error affecting CDN users
|
|
12
|
+
- **PBKDF2 Implementation**: Added browser-compatible PBKDF2 using BSV crypto instead of Node.js crypto
|
|
13
|
+
- **Mnemonic Generation**: Fixed mnemonic generation and HD wallet derivation in browser environments
|
|
14
|
+
- **Bundle Updates**: Rebuilt all bundles with browser-compatible crypto implementations
|
|
7
15
|
|
|
16
|
+
### Added
|
|
17
|
+
- Browser-specific PBKDF2 implementation (`lib/mnemonic/pbkdf2.browser.js`)
|
|
18
|
+
- Node.js-specific PBKDF2 implementation (`lib/mnemonic/pbkdf2.node.js`)
|
|
19
|
+
- Automatic browser/Node.js detection for crypto modules
|
|
20
|
+
- Comprehensive browser compatibility test suite
|
|
8
21
|
|
|
9
|
-
|
|
22
|
+
### Technical Details
|
|
23
|
+
- Uses BSV's `Hash.sha512hmac()` instead of Node.js `crypto.createHmac()`
|
|
24
|
+
- Maintains full cryptographic security and API compatibility
|
|
25
|
+
- Zero breaking changes for existing users
|
|
26
|
+
- All 12 bundle variants updated with the fix
|
|
10
27
|
|
|
11
|
-
|
|
28
|
+
## [3.3.3] - 2025-10-28
|
|
12
29
|
|
|
30
|
+
### 🎉 Major Improvements
|
|
13
31
|
|
|
32
|
+
#### 📁 Project Organization & Structure
|
|
14
33
|
|
|
15
|
-
|
|
34
|
+
- **Complete repository reorganization**: Moved legacy files to `/archive/` for better project structure
|
|
35
|
+
- **New `/demos/` directory**: Interactive HTML demonstrations for all SmartLedger-BSV modules
|
|
36
|
+
- **Enhanced `/docs/` structure**: Comprehensive documentation with getting started guides, API references, and technical details
|
|
37
|
+
- **Dedicated `/tests/` directory**: All test files properly organized and categorized
|
|
38
|
+
- **New `/tools/` directory**: Development utilities and helper scripts
|
|
16
39
|
|
|
40
|
+
#### 🚀 Interactive Demos
|
|
17
41
|
|
|
42
|
+
- **Smart Contract Demo**: Full-featured HTML demo showcasing covenant creation, preimage parsing, script building, and UTXO generation
|
|
43
|
+
- **Web3Keys Demo**: Interactive key generation and cryptographic operations demonstration
|
|
44
|
+
- **Local development server**: Easy setup for testing demos locally
|
|
18
45
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
#### 📁 Project Organization & Structure#### Revolutionary Legal Token Protocol Framework
|
|
24
|
-
|
|
25
|
-
- **Complete repository reorganization**: Moved legacy files to `/archive/` for better project structure- **Complete Legal Token Protocol (LTP)**: 6-module comprehensive legal framework
|
|
26
|
-
|
|
27
|
-
- **New `/demos/` directory**: Interactive HTML demonstrations for all SmartLedger-BSV modules - **lib/ltp/anchor.js**: Blockchain anchoring preparation primitives
|
|
28
|
-
|
|
29
|
-
- **Enhanced `/docs/` structure**: Comprehensive documentation with getting started guides, API references, and technical details - **lib/ltp/registry.js**: Token registry management primitives
|
|
46
|
+
## [3.3.0] - 2025-10-22
|
|
30
47
|
|
|
31
|
-
|
|
48
|
+
### 🚀 MAJOR RELEASE: Legal Token Protocol (LTP) & Global Digital Attestation Framework (GDAF)
|
|
32
49
|
|
|
33
|
-
|
|
50
|
+
#### Revolutionary Legal Token Protocol Framework
|
|
34
51
|
|
|
52
|
+
- **Complete Legal Token Protocol (LTP)**: 6-module comprehensive legal framework
|
|
53
|
+
- **lib/ltp/anchor.js**: Blockchain anchoring preparation primitives
|
|
54
|
+
- **lib/ltp/registry.js**: Token registry management primitives
|
|
55
|
+
- **lib/ltp/claim.js**: Legal claim validation and attestation primitives
|
|
56
|
+
- **lib/ltp/proof.js**: Cryptographic proof generation primitives
|
|
35
57
|
- **lib/ltp/right.js**: Legal rights token creation and validation primitives
|
|
58
|
+
- **lib/ltp/obligation.js**: Legal obligation token management primitives
|
|
36
59
|
|
|
37
|
-
####
|
|
38
|
-
|
|
39
|
-
- **Smart Contract Demo**: Full-featured HTML demo showcasing covenant creation, preimage parsing, script building, and UTXO generation
|
|
40
|
-
|
|
41
|
-
- **Web3Keys Demo**: Interactive key generation and cryptographic operations demonstration#### Primitives-Only Architecture Philosophy
|
|
42
|
-
|
|
43
|
-
- **Local development server**: Easy setup for testing demos locally- **No Blockchain Publishing**: Library provides preparation functions only
|
|
60
|
+
#### Primitives-Only Architecture Philosophy
|
|
44
61
|
|
|
62
|
+
- **No Blockchain Publishing**: Library provides preparation functions only
|
|
45
63
|
- **External System Integration**: Perfect for enterprise and custom implementations
|
|
46
64
|
|
|
47
65
|
#### 📚 Documentation Enhancements- **Maximum Flexibility**: Choose your own blockchain, storage, and UI frameworks
|
|
@@ -206,13 +224,17 @@ Previous version history is available in the git commit log. This changelog form
|
|
|
206
224
|
|
|
207
225
|
|
|
208
226
|
|
|
209
|
-
To get started with SmartLedger-BSV v3.3.
|
|
227
|
+
To get started with SmartLedger-BSV v3.3.4:
|
|
210
228
|
|
|
229
|
+
### 📦 Enhanced Build System
|
|
211
230
|
|
|
231
|
+
```bash
|
|
232
|
+
npm install @smartledger/bsv@3.3.4
|
|
233
|
+
```
|
|
212
234
|
|
|
213
|
-
|
|
235
|
+
#### New Standalone Modules
|
|
214
236
|
|
|
215
|
-
|
|
237
|
+
- **bsv-ltp.min.js**: Complete Legal Token Protocol standalone module
|
|
216
238
|
|
|
217
239
|
```- **bsv-shamir.min.js**: Standalone Shamir Secret Sharing module
|
|
218
240
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**🚀 Complete Bitcoin SV Development Framework with Legal Compliance, Digital Identity, and 12 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)
|
|
@@ -14,34 +14,34 @@ The most comprehensive and flexible Bitcoin SV library available. Choose from 12
|
|
|
14
14
|
### **Core Modules**
|
|
15
15
|
| Module | Size | Use Case | CDN |
|
|
16
16
|
|--------|------|----------|-----|
|
|
17
|
-
| **bsv.min.js** | 449KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@3.3.
|
|
18
|
-
| **bsv.bundle.js** | 885KB | Everything in one file | `unpkg.com/@smartledger/bsv@3.3.
|
|
17
|
+
| **bsv.min.js** | 449KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js` |
|
|
18
|
+
| **bsv.bundle.js** | 885KB | Everything in one file | `unpkg.com/@smartledger/bsv@3.3.4/bsv.bundle.js` |
|
|
19
19
|
|
|
20
20
|
### **Smart Contract & Development**
|
|
21
21
|
| Module | Size | Use Case | CDN |
|
|
22
22
|
|--------|------|----------|-----|
|
|
23
|
-
| **bsv-smartcontract.min.js** | 451KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@3.3.
|
|
24
|
-
| **bsv-covenant.min.js** | 32KB | Covenant operations | `unpkg.com/@smartledger/bsv@3.3.
|
|
25
|
-
| **bsv-script-helper.min.js** | 27KB | Custom script tools | `unpkg.com/@smartledger/bsv@3.3.
|
|
26
|
-
| **bsv-security.min.js** | 290KB | Security enhancements | `unpkg.com/@smartledger/bsv@3.3.
|
|
23
|
+
| **bsv-smartcontract.min.js** | 451KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@3.3.4/bsv-smartcontract.min.js` |
|
|
24
|
+
| **bsv-covenant.min.js** | 32KB | Covenant operations | `unpkg.com/@smartledger/bsv@3.3.4/bsv-covenant.min.js` |
|
|
25
|
+
| **bsv-script-helper.min.js** | 27KB | Custom script tools | `unpkg.com/@smartledger/bsv@3.3.4/bsv-script-helper.min.js` |
|
|
26
|
+
| **bsv-security.min.js** | 290KB | Security enhancements | `unpkg.com/@smartledger/bsv@3.3.4/bsv-security.min.js` |
|
|
27
27
|
|
|
28
28
|
### **🆕 Legal & Compliance**
|
|
29
29
|
| Module | Size | Use Case | CDN |
|
|
30
30
|
|--------|------|----------|-----|
|
|
31
|
-
| **🟢 bsv-ltp.min.js** | 817KB | **Legal Token Protocol** | `unpkg.com/@smartledger/bsv@3.3.
|
|
32
|
-
| **🟢 bsv-gdaf.min.js** | 604KB | **Digital Identity & Attestation** | `unpkg.com/@smartledger/bsv@3.3.
|
|
31
|
+
| **🟢 bsv-ltp.min.js** | 817KB | **Legal Token Protocol** | `unpkg.com/@smartledger/bsv@3.3.4/bsv-ltp.min.js` |
|
|
32
|
+
| **🟢 bsv-gdaf.min.js** | 604KB | **Digital Identity & Attestation** | `unpkg.com/@smartledger/bsv@3.3.4/bsv-gdaf.min.js` |
|
|
33
33
|
|
|
34
34
|
### **🆕 Advanced Cryptography**
|
|
35
35
|
| Module | Size | Use Case | CDN |
|
|
36
36
|
|--------|------|----------|-----|
|
|
37
|
-
| **🟢 bsv-shamir.min.js** | 433KB | **Threshold Cryptography** | `unpkg.com/@smartledger/bsv@3.3.
|
|
37
|
+
| **🟢 bsv-shamir.min.js** | 433KB | **Threshold Cryptography** | `unpkg.com/@smartledger/bsv@3.3.4/bsv-shamir.min.js` |
|
|
38
38
|
|
|
39
39
|
### **Utilities**
|
|
40
40
|
| Module | Size | Use Case | CDN |
|
|
41
41
|
|--------|------|----------|-----|
|
|
42
|
-
| **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@3.3.
|
|
43
|
-
| **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@3.3.
|
|
44
|
-
| **bsv-mnemonic.min.js** | 670KB | HD wallets | `unpkg.com/@smartledger/bsv@3.3.
|
|
42
|
+
| **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@3.3.4/bsv-ecies.min.js` |
|
|
43
|
+
| **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@3.3.4/bsv-message.min.js` |
|
|
44
|
+
| **bsv-mnemonic.min.js** | 670KB | HD wallets | `unpkg.com/@smartledger/bsv@3.3.4/bsv-mnemonic.min.js` |
|
|
45
45
|
|
|
46
46
|
## ⚡ **2-Minute Quick Start**
|
|
47
47
|
|
|
@@ -52,9 +52,11 @@ Get started with Bitcoin SV development in under 2 minutes:
|
|
|
52
52
|
npm install @smartledger/bsv
|
|
53
53
|
|
|
54
54
|
# Or include in HTML
|
|
55
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
55
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
> **🔧 v3.3.4 Update:** Fixed critical browser compatibility issue with mnemonic generation. CDN users can now use HD wallet and mnemonic functionality without `createHmac` errors!
|
|
59
|
+
|
|
58
60
|
**Basic Transaction (30 seconds):**
|
|
59
61
|
```javascript
|
|
60
62
|
const bsv = require('@smartledger/bsv'); // Node.js
|
|
@@ -145,8 +147,8 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
145
147
|
|
|
146
148
|
### 🔧 **Basic Development** (476KB total)
|
|
147
149
|
```html
|
|
148
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
149
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
150
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
151
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-script-helper.min.js"></script>
|
|
150
152
|
<script>
|
|
151
153
|
const privateKey = new bsv.PrivateKey();
|
|
152
154
|
const utxos = new bsv.SmartContract.UTXOGenerator().createRealUTXOs(2, 100000);
|
|
@@ -155,9 +157,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
155
157
|
|
|
156
158
|
### 🔒 **Smart Contract Development** (932KB total)
|
|
157
159
|
```html
|
|
158
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
159
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
160
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
160
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
161
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-covenant.min.js"></script>
|
|
162
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-smartcontract.min.js"></script>
|
|
161
163
|
<script>
|
|
162
164
|
const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
163
165
|
.extractField('amount').push(50000).greaterThanOrEqual().verify().build();
|
|
@@ -167,9 +169,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
167
169
|
|
|
168
170
|
### 🆕 **Legal & Identity Development** (1.87MB total)
|
|
169
171
|
```html
|
|
170
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
171
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
172
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
172
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
173
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-ltp.min.js"></script>
|
|
174
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-gdaf.min.js"></script>
|
|
173
175
|
<script>
|
|
174
176
|
// Legal Token Protocol
|
|
175
177
|
const propertyToken = bsv.createPropertyToken({
|
|
@@ -183,9 +185,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
183
185
|
|
|
184
186
|
### 🆕 **Security & Cryptography** (1.17MB total)
|
|
185
187
|
```html
|
|
186
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
187
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
188
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
188
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
189
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-security.min.js"></script>
|
|
190
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-shamir.min.js"></script>
|
|
189
191
|
<script>
|
|
190
192
|
// Threshold Cryptography
|
|
191
193
|
const shares = bsv.splitSecret('my_secret_key', 5, 3); // 5 shares, 3 needed
|
|
@@ -197,7 +199,7 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
197
199
|
|
|
198
200
|
### 🎯 **Everything Bundle** (885KB)
|
|
199
201
|
```html
|
|
200
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
202
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.bundle.js"></script>
|
|
201
203
|
<script>
|
|
202
204
|
// Everything available immediately
|
|
203
205
|
const shares = bsv.splitSecret('secret', 5, 3); // Shamir Secret Sharing
|
|
@@ -277,8 +279,8 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
277
279
|
|
|
278
280
|
#### 1. **Minimal Setup** - Core + Script Helper (476KB)
|
|
279
281
|
```html
|
|
280
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
281
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
282
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
283
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-script-helper.min.js"></script>
|
|
282
284
|
<script>
|
|
283
285
|
const tx = new bsv.Transaction();
|
|
284
286
|
const sig = bsvScriptHelper.createSignature(tx, privateKey, 0, script, satoshis);
|
|
@@ -287,9 +289,9 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
287
289
|
|
|
288
290
|
#### 2. **DeFi Development** - Core + Covenants + Debug (932KB)
|
|
289
291
|
```html
|
|
290
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
291
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
292
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
292
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
293
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-covenant.min.js"></script>
|
|
294
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-smartcontract.min.js"></script>
|
|
293
295
|
<script>
|
|
294
296
|
const covenant = new bsvCovenant.CovenantInterface();
|
|
295
297
|
const debugInfo = SmartContract.interpretScript(script);
|
|
@@ -299,8 +301,8 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
299
301
|
|
|
300
302
|
#### 3. **Security First** - Core + Enhanced Security (739KB)
|
|
301
303
|
```html
|
|
302
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
303
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
304
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
305
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-security.min.js"></script>
|
|
304
306
|
<script>
|
|
305
307
|
const verified = bsvSecurity.SmartVerify.verify(signature, hash, publicKey);
|
|
306
308
|
const enhanced = bsvSecurity.EllipticFixed.createSignature(privateKey, hash);
|
|
@@ -309,7 +311,7 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
309
311
|
|
|
310
312
|
#### 4. **Everything Bundle** - One File Solution (764KB)
|
|
311
313
|
```html
|
|
312
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
314
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.bundle.js"></script>
|
|
313
315
|
<script>
|
|
314
316
|
// Everything available under bsv namespace
|
|
315
317
|
const keys = bsv.SmartLedgerBundle.generateKeys();
|
|
@@ -682,11 +684,28 @@ const timelockScript = helper.createTimelockScript(
|
|
|
682
684
|
- [🔧 **Integration Guide**](SMARTCONTRACT_INTEGRATION.md) - Smart contract integration
|
|
683
685
|
|
|
684
686
|
### 📋 **Examples & Demos**
|
|
685
|
-
- [
|
|
687
|
+
- [� **Interactive Demos**](demos/) - **NEW!** HTML & Node.js smart contract demos
|
|
688
|
+
- [�📁 **Examples Directory**](examples/) - Working code examples
|
|
686
689
|
- [🎯 **Basic Examples**](examples/basic/) - Simple transactions & addresses
|
|
687
690
|
- [🔒 **Covenant Examples**](examples/covenants/) - Smart contract patterns
|
|
688
691
|
- [📊 **Advanced Examples**](examples/covenants2/) - Production patterns
|
|
689
692
|
|
|
693
|
+
**🎮 Try the Interactive Demos:**
|
|
694
|
+
```bash
|
|
695
|
+
# Terminal-based interactive demo
|
|
696
|
+
npm run demo
|
|
697
|
+
|
|
698
|
+
# Or run specific features
|
|
699
|
+
npm run demo:basics # Library basics & tests
|
|
700
|
+
npm run demo:covenant # Covenant builder
|
|
701
|
+
npm run demo:preimage # BIP-143 preimage parser
|
|
702
|
+
npm run demo:utxo # UTXO generator
|
|
703
|
+
npm run demo:scripts # Script tools
|
|
704
|
+
|
|
705
|
+
# Web-based demo (open in browser)
|
|
706
|
+
npm run demo:web
|
|
707
|
+
```
|
|
708
|
+
|
|
690
709
|
### 🔍 **Troubleshooting & Support**
|
|
691
710
|
- [📚 **Complete Documentation**](docs/README.md) - Organized documentation hub
|
|
692
711
|
- [❓ **Issues & Solutions**](https://github.com/codenlighten/smartledger-bsv/issues) - Community support
|
|
@@ -713,6 +732,6 @@ We welcome contributions to SmartLedger-BSV! Please see our [Contributing Guide]
|
|
|
713
732
|
|
|
714
733
|
---
|
|
715
734
|
|
|
716
|
-
**SmartLedger-BSV v3.3.
|
|
735
|
+
**SmartLedger-BSV v3.3.4** - *Complete Bitcoin SV Development Framework*
|
|
717
736
|
|
|
718
737
|
Built with ❤️ for the Bitcoin SV ecosystem • 9 Loading Options • Enterprise Ready
|