@rabby-wallet/eth-hd-keyring 4.3.0-beta.1 → 4.3.0-beta.3
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/dist/index.d.ts +1 -0
- package/dist/index.js +6 -1
- package/index.ts +4 -0
- package/package.json +1 -1
- package/patches/slip39+0.1.9.patch +7 -4
package/dist/index.d.ts
CHANGED
|
@@ -108,6 +108,7 @@ declare class HdKeyring extends SimpleKeyring {
|
|
|
108
108
|
slip39MnemonicToSeedSync(mnemonic: string, passphrase?: string): Uint8Array;
|
|
109
109
|
static checkMnemonicIsSlip39(mnemonic: string): boolean;
|
|
110
110
|
static slip39DecodeMnemonics(shares: string[]): any;
|
|
111
|
+
static slip39DecodeMnemonic(share: string): any;
|
|
111
112
|
static validateMnemonic(mnemonic: string): boolean;
|
|
112
113
|
}
|
|
113
114
|
|
package/dist/index.js
CHANGED
|
@@ -2171,7 +2171,8 @@ var require_slip39_helper = __commonJS({
|
|
|
2171
2171
|
crypt,
|
|
2172
2172
|
bitsToBytes,
|
|
2173
2173
|
WORD_LIST,
|
|
2174
|
-
decodeMnemonics
|
|
2174
|
+
decodeMnemonics,
|
|
2175
|
+
decodeMnemonic
|
|
2175
2176
|
};
|
|
2176
2177
|
}
|
|
2177
2178
|
});
|
|
@@ -2356,6 +2357,7 @@ var require_slip39 = __commonJS({
|
|
|
2356
2357
|
}
|
|
2357
2358
|
};
|
|
2358
2359
|
__publicField(_Slip39, "decodeMnemonics", slipHelper.decodeMnemonics);
|
|
2360
|
+
__publicField(_Slip39, "decodeMnemonic", slipHelper.decodeMnemonic);
|
|
2359
2361
|
var Slip39 = _Slip39;
|
|
2360
2362
|
exports2 = module2.exports = Slip39;
|
|
2361
2363
|
}
|
|
@@ -2688,6 +2690,9 @@ var _HdKeyring = class _HdKeyring extends import_eth_simple_keyring.default {
|
|
|
2688
2690
|
static slip39DecodeMnemonics(shares) {
|
|
2689
2691
|
return import_slip39.default.decodeMnemonics(shares);
|
|
2690
2692
|
}
|
|
2693
|
+
static slip39DecodeMnemonic(share) {
|
|
2694
|
+
return import_slip39.default.decodeMnemonic(share);
|
|
2695
|
+
}
|
|
2691
2696
|
static validateMnemonic(mnemonic) {
|
|
2692
2697
|
if (this.checkMnemonicIsSlip39(mnemonic)) {
|
|
2693
2698
|
return true;
|
package/index.ts
CHANGED
|
@@ -424,6 +424,10 @@ class HdKeyring extends SimpleKeyring {
|
|
|
424
424
|
return slip39.decodeMnemonics(shares);
|
|
425
425
|
}
|
|
426
426
|
|
|
427
|
+
static slip39DecodeMnemonic(share: string) {
|
|
428
|
+
return slip39.decodeMnemonic(share);
|
|
429
|
+
}
|
|
430
|
+
|
|
427
431
|
static validateMnemonic(mnemonic: string) {
|
|
428
432
|
if (this.checkMnemonicIsSlip39(mnemonic)) {
|
|
429
433
|
return true;
|
package/package.json
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
diff --git a/node_modules/slip39/src/slip39.js b/node_modules/slip39/src/slip39.js
|
|
2
|
-
index aff1c16..
|
|
2
|
+
index aff1c16..bd3ba54 100644
|
|
3
3
|
--- a/node_modules/slip39/src/slip39.js
|
|
4
4
|
+++ b/node_modules/slip39/src/slip39.js
|
|
5
|
-
@@ -180,6 +180,
|
|
5
|
+
@@ -180,6 +180,10 @@ class Slip39 {
|
|
6
6
|
return slipHelper.validateMnemonic(mnemonic);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
+ static decodeMnemonics = slipHelper.decodeMnemonics;
|
|
10
|
+
+
|
|
11
|
+
+ static decodeMnemonic = slipHelper.decodeMnemonic;
|
|
10
12
|
+
|
|
11
13
|
fromPath(path) {
|
|
12
14
|
this.validatePath(path);
|
|
13
15
|
|
|
14
16
|
diff --git a/node_modules/slip39/src/slip39_helper.js b/node_modules/slip39/src/slip39_helper.js
|
|
15
|
-
index 8bcb956..
|
|
17
|
+
index 8bcb956..3bf2210 100644
|
|
16
18
|
--- a/node_modules/slip39/src/slip39_helper.js
|
|
17
19
|
+++ b/node_modules/slip39/src/slip39_helper.js
|
|
18
20
|
@@ -100,21 +100,6 @@ Array.prototype.slip39Generate = function (m, v = (_) => _) {
|
|
@@ -37,9 +39,10 @@ index 8bcb956..ed4a207 100644
|
|
|
37
39
|
const BIGINT_WORD_BITS = BigInt(8);
|
|
38
40
|
|
|
39
41
|
function decodeBigInt(bytes) {
|
|
40
|
-
@@ -1886,4 +1871,
|
|
42
|
+
@@ -1886,4 +1871,6 @@ exports = module.exports = {
|
|
41
43
|
crypt,
|
|
42
44
|
bitsToBytes,
|
|
43
45
|
WORD_LIST,
|
|
44
46
|
+ decodeMnemonics,
|
|
47
|
+
+ decodeMnemonic,
|
|
45
48
|
};
|