smartledger-bsv 3.0.0 โ 3.0.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/README.md +31 -3
- package/bsv.min.js +4 -4
- package/package.json +18 -1
package/README.md
CHANGED
|
@@ -61,15 +61,38 @@ console.log(signature.validate()); // comprehensive validation
|
|
|
61
61
|
- `bsv-ecies.min.js` - Encryption support (71KB)
|
|
62
62
|
|
|
63
63
|
### CDN Usage
|
|
64
|
+
|
|
65
|
+
#### unpkg CDN
|
|
64
66
|
```html
|
|
65
67
|
<!-- Security-hardened BSV library -->
|
|
66
|
-
<script src="https://
|
|
68
|
+
<script src="https://unpkg.com/smartledger-bsv@3.0.0/bsv.min.js"></script>
|
|
67
69
|
|
|
68
70
|
<!-- Optional modules -->
|
|
71
|
+
<script src="https://unpkg.com/smartledger-bsv@3.0.0/bsv-message.min.js"></script>
|
|
72
|
+
<script src="https://unpkg.com/smartledger-bsv@3.0.0/bsv-mnemonic.min.js"></script>
|
|
73
|
+
<script src="https://unpkg.com/smartledger-bsv@3.0.0/bsv-ecies.min.js"></script>
|
|
74
|
+
|
|
75
|
+
<!-- Always latest version -->
|
|
76
|
+
<script src="https://unpkg.com/smartledger-bsv/bsv.min.js"></script>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
#### jsDelivr CDN
|
|
80
|
+
```html
|
|
81
|
+
<script src="https://cdn.jsdelivr.net/npm/smartledger-bsv@3.0.0/bsv.min.js"></script>
|
|
69
82
|
<script src="https://cdn.jsdelivr.net/npm/smartledger-bsv@3.0.0/bsv-message.min.js"></script>
|
|
70
83
|
<script src="https://cdn.jsdelivr.net/npm/smartledger-bsv@3.0.0/bsv-mnemonic.min.js"></script>
|
|
71
84
|
```
|
|
72
85
|
|
|
86
|
+
#### ES6 Module CDN
|
|
87
|
+
```html
|
|
88
|
+
<script type="module">
|
|
89
|
+
import bsv from 'https://unpkg.com/smartledger-bsv@3.0.0/bsv.min.js';
|
|
90
|
+
|
|
91
|
+
const privateKey = new bsv.PrivateKey();
|
|
92
|
+
console.log('BSV Address:', privateKey.toAddress().toString());
|
|
93
|
+
</script>
|
|
94
|
+
```
|
|
95
|
+
|
|
73
96
|
## ๐งช Validation & Testing
|
|
74
97
|
|
|
75
98
|
### Compatibility Testing โ
|
|
@@ -134,14 +157,19 @@ Full browser support with proper Buffer handling and crypto compatibility:
|
|
|
134
157
|
<!DOCTYPE html>
|
|
135
158
|
<html>
|
|
136
159
|
<head>
|
|
137
|
-
|
|
160
|
+
<!-- Using unpkg CDN -->
|
|
161
|
+
<script src="https://unpkg.com/smartledger-bsv@3.0.0/bsv.min.js"></script>
|
|
138
162
|
</head>
|
|
139
163
|
<body>
|
|
140
164
|
<script>
|
|
141
165
|
// Works in all modern browsers
|
|
142
|
-
const privateKey = bsv.PrivateKey();
|
|
166
|
+
const privateKey = new bsv.PrivateKey();
|
|
143
167
|
const address = privateKey.toAddress().toString();
|
|
144
168
|
console.log('BSV Address:', address);
|
|
169
|
+
|
|
170
|
+
// SmartLedger security features available
|
|
171
|
+
console.log('Security Features:', bsv.SmartLedger.securityFeatures);
|
|
172
|
+
console.log('Hardened by:', bsv.SmartLedger.hardenedBy);
|
|
145
173
|
</script>
|
|
146
174
|
</body>
|
|
147
175
|
</html>
|