hd-wallet-wasm 1.2.5 → 1.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/README.md +5 -5
- package/dist/hd-wallet.js +2 -2
- package/dist/hd-wallet.wasm +0 -0
- package/dist/index.d.ts +7 -2
- package/package.json +1 -1
- package/src/aligned.mjs +5 -0
- package/src/index.d.ts +7 -2
- package/src/index.mjs +1384 -256
package/README.md
CHANGED
|
@@ -128,7 +128,7 @@ const signing = getSigningKey(master, 60);
|
|
|
128
128
|
console.log('Signing pubkey:', wallet.utils.encodeHex(signing.publicKey));
|
|
129
129
|
console.log('Path:', signing.path); // "m/44'/60'/0'/0/0"
|
|
130
130
|
|
|
131
|
-
// Get encryption keypair for SDN (m/44'/
|
|
131
|
+
// Get encryption keypair for SDN (m/44'/0'/0'/1/0)
|
|
132
132
|
const encryption = getEncryptionKey(master, WellKnownCoinType.SDN);
|
|
133
133
|
console.log('Encryption pubkey:', wallet.utils.encodeHex(encryption.publicKey));
|
|
134
134
|
|
|
@@ -136,12 +136,12 @@ console.log('Encryption pubkey:', wallet.utils.encodeHex(encryption.publicKey));
|
|
|
136
136
|
const shared = wallet.curves.secp256k1.ecdh(encryption.privateKey, otherPublicKey);
|
|
137
137
|
|
|
138
138
|
// Multiple keys per account (e.g., one per plugin)
|
|
139
|
-
const plugin0Key = getEncryptionKey(master,
|
|
140
|
-
const plugin1Key = getEncryptionKey(master,
|
|
139
|
+
const plugin0Key = getEncryptionKey(master, 0, '0', '0');
|
|
140
|
+
const plugin1Key = getEncryptionKey(master, 0, '0', '1');
|
|
141
141
|
|
|
142
142
|
// Path helpers are also available directly
|
|
143
143
|
const sigPath = buildSigningPath(60); // "m/44'/60'/0'/0/0"
|
|
144
|
-
const encPath = buildEncryptionPath(
|
|
144
|
+
const encPath = buildEncryptionPath(0); // "m/44'/0'/0'/1/0"
|
|
145
145
|
|
|
146
146
|
// Clean up
|
|
147
147
|
wallet.utils.secureWipe(signing.privateKey);
|
|
@@ -153,7 +153,7 @@ Also available as instance methods on the wallet module:
|
|
|
153
153
|
|
|
154
154
|
```javascript
|
|
155
155
|
const signing = wallet.getSigningKey(master, 60);
|
|
156
|
-
const encryption = wallet.getEncryptionKey(master,
|
|
156
|
+
const encryption = wallet.getEncryptionKey(master, 0);
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
### Multi-Curve Cryptography
|