@rabby-wallet/eth-hd-keyring 3.6.9 → 3.6.10

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.js CHANGED
@@ -49,6 +49,7 @@ class HdKeyring extends eth_simple_keyring_1.default {
49
49
  this.wallets = [];
50
50
  this._index2wallet = {};
51
51
  this.activeIndexes = [];
52
+ this.index = 0;
52
53
  this.page = 0;
53
54
  this.perPage = 5;
54
55
  this.byImport = false;
@@ -60,6 +61,7 @@ class HdKeyring extends eth_simple_keyring_1.default {
60
61
  activeIndexes: this.activeIndexes,
61
62
  hdPath: this.hdPath,
62
63
  byImport: this.byImport,
64
+ index: this.index,
63
65
  });
64
66
  }
65
67
  deserialize(opts = {}) {
@@ -68,6 +70,7 @@ class HdKeyring extends eth_simple_keyring_1.default {
68
70
  this.root = null;
69
71
  this.hdPath = opts.hdPath || hdPathString;
70
72
  this.byImport = !!opts.byImport;
73
+ this.index = opts.index || 0;
71
74
  if (opts.mnemonic) {
72
75
  this.initFromMnemonic(opts.mnemonic);
73
76
  }
package/index.ts CHANGED
@@ -12,6 +12,7 @@ interface DeserializeOption {
12
12
  mnemonic?: string;
13
13
  activeIndexes?: number[];
14
14
  byImport?: boolean;
15
+ index?: number;
15
16
  }
16
17
 
17
18
  class HdKeyring extends SimpleKeyring {
@@ -25,6 +26,7 @@ class HdKeyring extends SimpleKeyring {
25
26
  wallets: Wallet[] = [];
26
27
  _index2wallet: Record<number, [string, Wallet]> = {};
27
28
  activeIndexes: number[] = [];
29
+ index = 0;
28
30
  page = 0;
29
31
  perPage = 5;
30
32
  byImport = false;
@@ -41,6 +43,7 @@ class HdKeyring extends SimpleKeyring {
41
43
  activeIndexes: this.activeIndexes,
42
44
  hdPath: this.hdPath,
43
45
  byImport: this.byImport,
46
+ index: this.index,
44
47
  });
45
48
  }
46
49
 
@@ -50,6 +53,7 @@ class HdKeyring extends SimpleKeyring {
50
53
  this.root = null;
51
54
  this.hdPath = opts.hdPath || hdPathString;
52
55
  this.byImport = !!opts.byImport;
56
+ this.index = opts.index || 0;
53
57
 
54
58
  if (opts.mnemonic) {
55
59
  this.initFromMnemonic(opts.mnemonic);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/eth-hd-keyring",
3
- "version": "3.6.9",
3
+ "version": "3.6.10",
4
4
  "description": "A simple standard interface for a seed phrase generated set of Ethereum accounts.",
5
5
  "keywords": [
6
6
  "ethereum",