@smartledger/bsv 3.3.4 → 3.4.0
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 +30 -21
- package/README.md +169 -40
- package/anchor-entry.js +1 -0
- package/bin/cli.js +349 -0
- package/bsv-covenant.min.js +5 -5
- package/bsv-gdaf.min.js +6 -6
- package/bsv-ltp.min.js +6 -6
- package/bsv-smartcontract.min.js +9 -9
- package/bsv.bundle.js +5 -5
- package/bsv.min.js +8 -8
- package/build/webpack.anchor.config.js +21 -0
- package/build/webpack.didweb.config.js +21 -0
- package/build/webpack.statuslist.config.js +22 -0
- package/build/webpack.vcjwt.config.js +21 -0
- package/demos/README.md +1 -1
- package/demos/browser-test.html +1208 -0
- package/demos/smart_contract_demo.html +1 -1
- package/demos/smart_contract_demo.js +1 -1
- package/demos/web3keys.html +3 -3
- package/didweb-entry.js +1 -0
- package/docs/DOCUMENTATION_REVIEW_REPORT.md +11 -11
- package/docs/FIX_CREATEHMAC_ISSUE.md +1 -1
- package/docs/MODULE_REFERENCE_COMPLETE.md +28 -28
- package/docs/SMARTLEDGER_BSV_USAGE_ANSWERS.md +4 -4
- package/docs/SMARTLEDGER_BSV_USAGE_EXAMPLES.js +2 -2
- package/docs/SMARTLEDGER_BSV_USAGE_GUIDE.md +3 -3
- package/docs/SMART_CONTRACT_DEVELOPMENT_GUIDE.md +1 -1
- 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/docs/technical/roadmap.md +3 -3
- package/index.js +35 -0
- package/lib/anchor/index.js +102 -0
- package/lib/browser-utxo-manager-es5.js +316 -0
- package/lib/browser-utxo-manager.js +533 -0
- package/lib/didweb/index.js +177 -0
- package/lib/statuslist/index.js +164 -0
- package/lib/vcjwt/index.js +189 -0
- package/package.json +13 -5
- package/statuslist-entry.js +1 -0
- package/tests/browser-compatibility/test-cdn-vs-local.html +2 -2
- package/vcjwt-entry.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -25,36 +25,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
25
25
|
- Zero breaking changes for existing users
|
|
26
26
|
- All 12 bundle variants updated with the fix
|
|
27
27
|
|
|
28
|
-
## [3.3.3] - 2025-10-28
|
|
28
|
+
## [3.3.3] - 2025-10-28
|
|
29
29
|
|
|
30
|
+
### 🎉 Major Improvements
|
|
30
31
|
|
|
32
|
+
#### 📁 Project Organization & Structure
|
|
31
33
|
|
|
32
|
-
|
|
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
|
|
33
39
|
|
|
40
|
+
#### 🚀 Interactive Demos
|
|
34
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
|
|
35
45
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- **Complete repository reorganization**: Moved legacy files to `/archive/` for better project structure- **Complete Legal Token Protocol (LTP)**: 6-module comprehensive legal framework
|
|
39
|
-
|
|
40
|
-
- **New `/demos/` directory**: Interactive HTML demonstrations for all SmartLedger-BSV modules - **lib/ltp/anchor.js**: Blockchain anchoring preparation primitives
|
|
41
|
-
|
|
42
|
-
- **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
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
### 🚀 MAJOR RELEASE: Legal Token Protocol (LTP) & Global Digital Attestation Framework (GDAF)
|
|
45
49
|
|
|
46
|
-
|
|
50
|
+
#### Revolutionary Legal Token Protocol Framework
|
|
47
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
|
|
48
57
|
- **lib/ltp/right.js**: Legal rights token creation and validation primitives
|
|
58
|
+
- **lib/ltp/obligation.js**: Legal obligation token management primitives
|
|
49
59
|
|
|
50
|
-
####
|
|
51
|
-
|
|
52
|
-
- **Smart Contract Demo**: Full-featured HTML demo showcasing covenant creation, preimage parsing, script building, and UTXO generation
|
|
53
|
-
|
|
54
|
-
- **Web3Keys Demo**: Interactive key generation and cryptographic operations demonstration#### Primitives-Only Architecture Philosophy
|
|
55
|
-
|
|
56
|
-
- **Local development server**: Easy setup for testing demos locally- **No Blockchain Publishing**: Library provides preparation functions only
|
|
60
|
+
#### Primitives-Only Architecture Philosophy
|
|
57
61
|
|
|
62
|
+
- **No Blockchain Publishing**: Library provides preparation functions only
|
|
58
63
|
- **External System Integration**: Perfect for enterprise and custom implementations
|
|
59
64
|
|
|
60
65
|
#### 📚 Documentation Enhancements- **Maximum Flexibility**: Choose your own blockchain, storage, and UI frameworks
|
|
@@ -219,13 +224,17 @@ Previous version history is available in the git commit log. This changelog form
|
|
|
219
224
|
|
|
220
225
|
|
|
221
226
|
|
|
222
|
-
To get started with SmartLedger-BSV v3.3.
|
|
227
|
+
To get started with SmartLedger-BSV v3.3.4:
|
|
223
228
|
|
|
229
|
+
### 📦 Enhanced Build System
|
|
224
230
|
|
|
231
|
+
```bash
|
|
232
|
+
npm install @smartledger/bsv@3.3.4
|
|
233
|
+
```
|
|
225
234
|
|
|
226
|
-
|
|
235
|
+
#### New Standalone Modules
|
|
227
236
|
|
|
228
|
-
|
|
237
|
+
- **bsv-ltp.min.js**: Complete Legal Token Protocol standalone module
|
|
229
238
|
|
|
230
239
|
```- **bsv-shamir.min.js**: Standalone Shamir Secret Sharing module
|
|
231
240
|
|
package/README.md
CHANGED
|
@@ -1,47 +1,174 @@
|
|
|
1
1
|
# SmartLedger-BSV
|
|
2
2
|
|
|
3
|
-
**🚀 Complete Bitcoin SV Development Framework with
|
|
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
|
+
[](#verifiable-credentials)
|
|
9
10
|
|
|
10
|
-
The most comprehensive and flexible Bitcoin SV library available.
|
|
11
|
+
The most comprehensive and flexible Bitcoin SV library available. **NEW in v3.4.0**: 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.
|
|
11
12
|
|
|
12
|
-
##
|
|
13
|
+
## 🆕 **v3.4.0 - Legally-Recognizable Credentials**
|
|
14
|
+
|
|
15
|
+
### **Why This Matters**
|
|
16
|
+
- ✅ **W3C Standards**: Full VC-JWT and DID:web compliance for legal recognition
|
|
17
|
+
- ✅ **Enterprise Ready**: ES256 (P-256 NIST curve) for regulated industries
|
|
18
|
+
- ✅ **Blockchain Native**: ES256K (secp256k1) for BSV integration
|
|
19
|
+
- ✅ **Revocation Built-in**: StatusList2021 standard for credential management
|
|
20
|
+
- ✅ **Privacy Preserving**: Hash-only BSV anchoring (no PII on-chain)
|
|
21
|
+
- ✅ **CLI Tools**: Complete command-line interface for credential operations
|
|
22
|
+
|
|
23
|
+
### **Quick Start - Issue Your First Verifiable Credential**
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Install SmartLedger BSV v3.4.0
|
|
27
|
+
npm install @smartledger/bsv@3.4.0
|
|
28
|
+
|
|
29
|
+
# Initialize DID:web issuer (generates ES256 keys)
|
|
30
|
+
npx smartledger-bsv didweb init --domain example.com --alg ES256
|
|
31
|
+
|
|
32
|
+
# Issue a credential
|
|
33
|
+
npx smartledger-bsv vc issue \
|
|
34
|
+
--issuer did:web:example.com \
|
|
35
|
+
--subject did:example:alice \
|
|
36
|
+
--types "VerifiableCredential,DriversLicense" \
|
|
37
|
+
--claims '{"licenseNumber":"DL123456","class":"C"}' \
|
|
38
|
+
> credential.jwt
|
|
39
|
+
|
|
40
|
+
# Verify the credential
|
|
41
|
+
npx smartledger-bsv vc verify credential.jwt
|
|
42
|
+
|
|
43
|
+
# Anchor hash to BSV (privacy-preserving)
|
|
44
|
+
npx smartledger-bsv anchor hash credential.jwt
|
|
45
|
+
|
|
46
|
+
# Create revocation list
|
|
47
|
+
npx smartledger-bsv status create --issuer did:web:example.com > status-list.jwt
|
|
48
|
+
|
|
49
|
+
# Revoke a credential
|
|
50
|
+
npx smartledger-bsv status set --list status-list.jwt --index 42 --status revoked
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### **Programmatic Usage**
|
|
54
|
+
|
|
55
|
+
```javascript
|
|
56
|
+
const bsv = require('@smartledger/bsv')
|
|
57
|
+
|
|
58
|
+
// Generate DID:web issuer keys
|
|
59
|
+
const keys = await bsv.DIDWeb.generateIssuerKeys({ alg: 'ES256' })
|
|
60
|
+
|
|
61
|
+
// Build DID documents (.well-known/did.json and jwks.json)
|
|
62
|
+
const docs = bsv.DIDWeb.buildDidWebDocuments({
|
|
63
|
+
domain: 'example.com',
|
|
64
|
+
p256: { jwk: keys.publicJwk, kid: keys.kid },
|
|
65
|
+
controllerName: 'Example Corp'
|
|
66
|
+
})
|
|
67
|
+
// Deploy docs.didDocument to https://example.com/.well-known/did.json
|
|
68
|
+
// Deploy docs.jwks to https://example.com/.well-known/jwks.json
|
|
69
|
+
|
|
70
|
+
// Issue a Verifiable Credential as JWT
|
|
71
|
+
const result = await bsv.VcJwt.issueVcJwt({
|
|
72
|
+
issuerDid: docs.did,
|
|
73
|
+
subjectId: 'did:example:alice',
|
|
74
|
+
types: ['VerifiableCredential', 'AgeCredential'],
|
|
75
|
+
credentialSubject: {
|
|
76
|
+
ageOver: 18,
|
|
77
|
+
country: 'US'
|
|
78
|
+
},
|
|
79
|
+
privateJwk: keys.privateJwk,
|
|
80
|
+
alg: 'ES256',
|
|
81
|
+
kid: keys.kid
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
console.log('VC-JWT:', result.jwt)
|
|
85
|
+
|
|
86
|
+
// Verify the credential
|
|
87
|
+
const verification = await bsv.VcJwt.verifyVcJwt(result.jwt, {
|
|
88
|
+
didResolver: async (did) => {
|
|
89
|
+
// In production, fetch https://example.com/.well-known/jwks.json
|
|
90
|
+
return { jwks: docs.jwks }
|
|
91
|
+
},
|
|
92
|
+
expectedIssuerDid: docs.did
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
console.log('Valid:', verification.valid)
|
|
96
|
+
|
|
97
|
+
// Anchor hash to BSV (no PII on-chain)
|
|
98
|
+
const hash = bsv.Anchor.sha256Hex(result.jwt)
|
|
99
|
+
const anchorPayload = bsv.Anchor.buildAnchorPayload({
|
|
100
|
+
kind: 'VC_ANCHOR_SHA256',
|
|
101
|
+
hash: hash,
|
|
102
|
+
issuerDid: docs.did
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
// Include anchorPayload.json in OP_RETURN
|
|
106
|
+
// Later: verify with bsv.Anchor.verifyAnchorHash(originalData, anchorHash)
|
|
107
|
+
|
|
108
|
+
// Create revocation list (100k credentials)
|
|
109
|
+
const statusList = await bsv.StatusList.createStatusList({
|
|
110
|
+
issuerDid: docs.did,
|
|
111
|
+
privateJwk: keys.privateJwk
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
// Revoke a credential
|
|
115
|
+
const updated = await bsv.StatusList.updateStatusList({
|
|
116
|
+
listVcJwt: statusList.listVcJwt,
|
|
117
|
+
index: 42,
|
|
118
|
+
status: 'revoked',
|
|
119
|
+
privateJwk: keys.privateJwk
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
// Check revocation status
|
|
123
|
+
const status = bsv.StatusList.getCredentialStatusEntry({
|
|
124
|
+
listVcJwt: updated.listVcJwt,
|
|
125
|
+
index: 42
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
console.log('Status:', status) // 'revoked'
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## 🎯 **16 Loading Options - Choose Your Approach**
|
|
13
132
|
|
|
14
133
|
### **Core Modules**
|
|
15
134
|
| Module | Size | Use Case | CDN |
|
|
16
135
|
|--------|------|----------|-----|
|
|
17
|
-
| **bsv.min.js** | 449KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@3.
|
|
18
|
-
| **bsv.bundle.js** | 885KB | Everything in one file | `unpkg.com/@smartledger/bsv@3.
|
|
136
|
+
| **bsv.min.js** | 449KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@3.4.0/bsv.min.js` |
|
|
137
|
+
| **bsv.bundle.js** | 885KB | Everything in one file | `unpkg.com/@smartledger/bsv@3.4.0/bsv.bundle.js` |
|
|
138
|
+
|
|
139
|
+
### **🆕 W3C Verifiable Credentials (v3.4.0)**
|
|
140
|
+
| Module | Size | Use Case | CDN |
|
|
141
|
+
|--------|------|----------|-----|
|
|
142
|
+
| **🟢 bsv-didweb.min.js** | 418KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@3.4.0/bsv-didweb.min.js` |
|
|
143
|
+
| **🟢 bsv-vcjwt.min.js** | 418KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@3.4.0/bsv-vcjwt.min.js` |
|
|
144
|
+
| **🟢 bsv-statuslist.min.js** | 486KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@3.4.0/bsv-statuslist.min.js` |
|
|
145
|
+
| **🟢 bsv-anchor.min.js** | 417KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@3.4.0/bsv-anchor.min.js` |
|
|
19
146
|
|
|
20
147
|
### **Smart Contract & Development**
|
|
21
148
|
| Module | Size | Use Case | CDN |
|
|
22
149
|
|--------|------|----------|-----|
|
|
23
|
-
| **bsv-smartcontract.min.js** | 451KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@3.
|
|
24
|
-
| **bsv-covenant.min.js** | 32KB | Covenant operations | `unpkg.com/@smartledger/bsv@3.
|
|
25
|
-
| **bsv-script-helper.min.js** | 27KB | Custom script tools | `unpkg.com/@smartledger/bsv@3.
|
|
26
|
-
| **bsv-security.min.js** | 290KB | Security enhancements | `unpkg.com/@smartledger/bsv@3.
|
|
150
|
+
| **bsv-smartcontract.min.js** | 451KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@3.4.0/bsv-smartcontract.min.js` |
|
|
151
|
+
| **bsv-covenant.min.js** | 32KB | Covenant operations | `unpkg.com/@smartledger/bsv@3.4.0/bsv-covenant.min.js` |
|
|
152
|
+
| **bsv-script-helper.min.js** | 27KB | Custom script tools | `unpkg.com/@smartledger/bsv@3.4.0/bsv-script-helper.min.js` |
|
|
153
|
+
| **bsv-security.min.js** | 290KB | Security enhancements | `unpkg.com/@smartledger/bsv@3.4.0/bsv-security.min.js` |
|
|
27
154
|
|
|
28
|
-
###
|
|
155
|
+
### **Legal & Compliance**
|
|
29
156
|
| Module | Size | Use Case | CDN |
|
|
30
157
|
|--------|------|----------|-----|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
158
|
+
| **bsv-ltp.min.js** | 817KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@3.4.0/bsv-ltp.min.js` |
|
|
159
|
+
| **bsv-gdaf.min.js** | 604KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@3.4.0/bsv-gdaf.min.js` |
|
|
33
160
|
|
|
34
|
-
###
|
|
161
|
+
### **Advanced Cryptography**
|
|
35
162
|
| Module | Size | Use Case | CDN |
|
|
36
163
|
|--------|------|----------|-----|
|
|
37
|
-
|
|
|
164
|
+
| **bsv-shamir.min.js** | 433KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@3.4.0/bsv-shamir.min.js` |
|
|
38
165
|
|
|
39
166
|
### **Utilities**
|
|
40
167
|
| Module | Size | Use Case | CDN |
|
|
41
168
|
|--------|------|----------|-----|
|
|
42
|
-
| **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@3.
|
|
43
|
-
| **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@3.
|
|
44
|
-
| **bsv-mnemonic.min.js** | 670KB | HD wallets | `unpkg.com/@smartledger/bsv@3.
|
|
169
|
+
| **bsv-ecies.min.js** | 71KB | Encryption | `unpkg.com/@smartledger/bsv@3.4.0/bsv-ecies.min.js` |
|
|
170
|
+
| **bsv-message.min.js** | 26KB | Message signing | `unpkg.com/@smartledger/bsv@3.4.0/bsv-message.min.js` |
|
|
171
|
+
| **bsv-mnemonic.min.js** | 670KB | HD wallets | `unpkg.com/@smartledger/bsv@3.4.0/bsv-mnemonic.min.js` |
|
|
45
172
|
|
|
46
173
|
## ⚡ **2-Minute Quick Start**
|
|
47
174
|
|
|
@@ -52,9 +179,11 @@ Get started with Bitcoin SV development in under 2 minutes:
|
|
|
52
179
|
npm install @smartledger/bsv
|
|
53
180
|
|
|
54
181
|
# Or include in HTML
|
|
55
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.
|
|
182
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.4.0/bsv.min.js"></script>
|
|
56
183
|
```
|
|
57
184
|
|
|
185
|
+
> **🔧 v3.4.0 Update:** Added 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!
|
|
186
|
+
|
|
58
187
|
**Basic Transaction (30 seconds):**
|
|
59
188
|
```javascript
|
|
60
189
|
const bsv = require('@smartledger/bsv'); // Node.js
|
|
@@ -145,8 +274,8 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
145
274
|
|
|
146
275
|
### 🔧 **Basic Development** (476KB total)
|
|
147
276
|
```html
|
|
148
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
149
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
277
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
278
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-script-helper.min.js"></script>
|
|
150
279
|
<script>
|
|
151
280
|
const privateKey = new bsv.PrivateKey();
|
|
152
281
|
const utxos = new bsv.SmartContract.UTXOGenerator().createRealUTXOs(2, 100000);
|
|
@@ -155,9 +284,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
155
284
|
|
|
156
285
|
### 🔒 **Smart Contract Development** (932KB total)
|
|
157
286
|
```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.
|
|
287
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
288
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-covenant.min.js"></script>
|
|
289
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-smartcontract.min.js"></script>
|
|
161
290
|
<script>
|
|
162
291
|
const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
163
292
|
.extractField('amount').push(50000).greaterThanOrEqual().verify().build();
|
|
@@ -167,9 +296,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
167
296
|
|
|
168
297
|
### 🆕 **Legal & Identity Development** (1.87MB total)
|
|
169
298
|
```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.
|
|
299
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
300
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-ltp.min.js"></script>
|
|
301
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-gdaf.min.js"></script>
|
|
173
302
|
<script>
|
|
174
303
|
// Legal Token Protocol
|
|
175
304
|
const propertyToken = bsv.createPropertyToken({
|
|
@@ -183,9 +312,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
183
312
|
|
|
184
313
|
### 🆕 **Security & Cryptography** (1.17MB total)
|
|
185
314
|
```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.
|
|
315
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
316
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-security.min.js"></script>
|
|
317
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-shamir.min.js"></script>
|
|
189
318
|
<script>
|
|
190
319
|
// Threshold Cryptography
|
|
191
320
|
const shares = bsv.splitSecret('my_secret_key', 5, 3); // 5 shares, 3 needed
|
|
@@ -197,7 +326,7 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
|
|
|
197
326
|
|
|
198
327
|
### 🎯 **Everything Bundle** (885KB)
|
|
199
328
|
```html
|
|
200
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
329
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.bundle.js"></script>
|
|
201
330
|
<script>
|
|
202
331
|
// Everything available immediately
|
|
203
332
|
const shares = bsv.splitSecret('secret', 5, 3); // Shamir Secret Sharing
|
|
@@ -277,8 +406,8 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
277
406
|
|
|
278
407
|
#### 1. **Minimal Setup** - Core + Script Helper (476KB)
|
|
279
408
|
```html
|
|
280
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
281
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
409
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
410
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-script-helper.min.js"></script>
|
|
282
411
|
<script>
|
|
283
412
|
const tx = new bsv.Transaction();
|
|
284
413
|
const sig = bsvScriptHelper.createSignature(tx, privateKey, 0, script, satoshis);
|
|
@@ -287,9 +416,9 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
287
416
|
|
|
288
417
|
#### 2. **DeFi Development** - Core + Covenants + Debug (932KB)
|
|
289
418
|
```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.
|
|
419
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
420
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-covenant.min.js"></script>
|
|
421
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-smartcontract.min.js"></script>
|
|
293
422
|
<script>
|
|
294
423
|
const covenant = new bsvCovenant.CovenantInterface();
|
|
295
424
|
const debugInfo = SmartContract.interpretScript(script);
|
|
@@ -299,8 +428,8 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
299
428
|
|
|
300
429
|
#### 3. **Security First** - Core + Enhanced Security (739KB)
|
|
301
430
|
```html
|
|
302
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
303
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
431
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.min.js"></script>
|
|
432
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv-security.min.js"></script>
|
|
304
433
|
<script>
|
|
305
434
|
const verified = bsvSecurity.SmartVerify.verify(signature, hash, publicKey);
|
|
306
435
|
const enhanced = bsvSecurity.EllipticFixed.createSignature(privateKey, hash);
|
|
@@ -309,7 +438,7 @@ const contractTx = covenant.createCovenantTransaction({
|
|
|
309
438
|
|
|
310
439
|
#### 4. **Everything Bundle** - One File Solution (764KB)
|
|
311
440
|
```html
|
|
312
|
-
<script src="https://unpkg.com/@smartledger/bsv@3.3.
|
|
441
|
+
<script src="https://unpkg.com/@smartledger/bsv@3.3.4/bsv.bundle.js"></script>
|
|
313
442
|
<script>
|
|
314
443
|
// Everything available under bsv namespace
|
|
315
444
|
const keys = bsv.SmartLedgerBundle.generateKeys();
|
|
@@ -730,6 +859,6 @@ We welcome contributions to SmartLedger-BSV! Please see our [Contributing Guide]
|
|
|
730
859
|
|
|
731
860
|
---
|
|
732
861
|
|
|
733
|
-
**SmartLedger-BSV v3.3.
|
|
862
|
+
**SmartLedger-BSV v3.3.4** - *Complete Bitcoin SV Development Framework*
|
|
734
863
|
|
|
735
864
|
Built with ❤️ for the Bitcoin SV ecosystem • 9 Loading Options • Enterprise Ready
|
package/anchor-entry.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./lib/anchor')
|