smartledger-bsv 3.3.3 → 3.3.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 (52) hide show
  1. package/CHANGELOG.md +20 -7
  2. package/README.md +18 -1
  3. package/bsv-covenant.min.js +5 -5
  4. package/bsv-gdaf.min.js +4 -4
  5. package/bsv-ltp.min.js +4 -4
  6. package/bsv-mnemonic.min.js +4 -4
  7. package/bsv-smartcontract.min.js +4 -4
  8. package/bsv.bundle.js +4 -4
  9. package/bsv.min.js +4 -4
  10. package/demos/README.md +188 -0
  11. package/demos/architecture_demo.js +247 -0
  12. package/demos/bsv_wallet_demo.js +242 -0
  13. package/demos/complete_ltp_demo.js +511 -0
  14. package/demos/debug_tools_demo.js +87 -0
  15. package/demos/demo_features.js +123 -0
  16. package/demos/easy_interface_demo.js +109 -0
  17. package/demos/ecies_demo.js +182 -0
  18. package/demos/gdaf_core_test.js +131 -0
  19. package/demos/gdaf_demo.js +237 -0
  20. package/demos/ltp_demo.js +361 -0
  21. package/demos/ltp_primitives_demo.js +403 -0
  22. package/demos/message_demo.js +209 -0
  23. package/demos/preimage_separation_demo.js +383 -0
  24. package/demos/script_helper_demo.js +289 -0
  25. package/demos/security_demo.js +287 -0
  26. package/demos/shamir_demo.js +121 -0
  27. package/demos/simple_demo.js +204 -0
  28. package/demos/simple_p2pkh_demo.js +169 -0
  29. package/demos/simple_utxo_preimage_demo.js +196 -0
  30. package/demos/smart_contract_demo.html +1347 -0
  31. package/demos/smart_contract_demo.js +910 -0
  32. package/demos/utxo_generator_demo.js +244 -0
  33. package/demos/validation_pipeline_demo.js +155 -0
  34. package/demos/web3keys.html +740 -0
  35. package/docs/BUNDLE_UPDATE_SUMMARY.md +40 -0
  36. package/docs/FIX_CREATEHMAC_ISSUE.md +91 -0
  37. package/docs/SMARTLEDGER_BSV_USAGE_ANSWERS.md +477 -0
  38. package/docs/SMARTLEDGER_BSV_USAGE_EXAMPLES.js +372 -0
  39. package/docs/SMARTLEDGER_BSV_USAGE_GUIDE.md +555 -0
  40. package/docs/SMART_CONTRACT_DEVELOPMENT_GUIDE.md +1459 -0
  41. package/examples/complete_workflow_demo.js +783 -0
  42. package/examples/definitive_working_demo.js +261 -0
  43. package/examples/final_working_contracts.js +338 -0
  44. package/examples/smart_contract_templates.js +718 -0
  45. package/examples/working_smart_contracts.js +348 -0
  46. package/lib/mnemonic/pbkdf2.browser.js +69 -0
  47. package/lib/mnemonic/pbkdf2.js +2 -68
  48. package/lib/mnemonic/pbkdf2.node.js +68 -0
  49. package/package.json +17 -6
  50. package/tests/browser-compatibility/README.md +35 -0
  51. package/tests/browser-compatibility/test-cdn-vs-local.html +186 -0
  52. package/tests/browser-compatibility/test-pbkdf2.html +51 -0
package/CHANGELOG.md CHANGED
@@ -1,16 +1,29 @@
1
- # Changelog# 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
- All notable changes to SmartLedger-BSV will be documented in this file.All notable changes to SmartLedger-BSV will be documented in this file.
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
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
10
-
11
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
12
-
13
-
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
14
27
 
15
28
  ## [3.3.3] - 2025-10-28## [3.3.0] - 2025-10-22
16
29
 
package/README.md CHANGED
@@ -682,11 +682,28 @@ const timelockScript = helper.createTimelockScript(
682
682
  - [🔧 **Integration Guide**](SMARTCONTRACT_INTEGRATION.md) - Smart contract integration
683
683
 
684
684
  ### 📋 **Examples & Demos**
685
- - [📁 **Examples Directory**](examples/) - Working code examples
685
+ - [ **Interactive Demos**](demos/) - **NEW!** HTML & Node.js smart contract demos
686
+ - [�📁 **Examples Directory**](examples/) - Working code examples
686
687
  - [🎯 **Basic Examples**](examples/basic/) - Simple transactions & addresses
687
688
  - [🔒 **Covenant Examples**](examples/covenants/) - Smart contract patterns
688
689
  - [📊 **Advanced Examples**](examples/covenants2/) - Production patterns
689
690
 
691
+ **🎮 Try the Interactive Demos:**
692
+ ```bash
693
+ # Terminal-based interactive demo
694
+ npm run demo
695
+
696
+ # Or run specific features
697
+ npm run demo:basics # Library basics & tests
698
+ npm run demo:covenant # Covenant builder
699
+ npm run demo:preimage # BIP-143 preimage parser
700
+ npm run demo:utxo # UTXO generator
701
+ npm run demo:scripts # Script tools
702
+
703
+ # Web-based demo (open in browser)
704
+ npm run demo:web
705
+ ```
706
+
690
707
  ### 🔍 **Troubleshooting & Support**
691
708
  - [📚 **Complete Documentation**](docs/README.md) - Organized documentation hub
692
709
  - [❓ **Issues & Solutions**](https://github.com/codenlighten/smartledger-bsv/issues) - Community support