@metamask/eth-hd-keyring 7.0.3 → 8.0.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 CHANGED
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [8.0.0]
11
+
12
+ ### Changed
13
+
14
+ - **BREAKING**: Bump `@metamask/eth-sig-util` dependency from `^7.0.3` to `^8.0.0` ([#79](https://github.com/MetaMask/accounts/pull/79))
15
+ - `signTypedData` no longer support `number` for addresses, see [here](https://github.com/MetaMask/eth-sig-util/blob/main/CHANGELOG.md#800).
16
+
17
+ ## [7.0.4]
18
+
19
+ ### Changed
20
+
21
+ - Bump `sinon` and `@types/sinon` to latest versions ([#51](https://github.com/MetaMask/accounts/pull/51))
22
+ - Add `syncpack` and sync dependencies ([#53](https://github.com/metamask/accounts/pull/53))
23
+
10
24
  ## [7.0.3]
11
25
 
12
26
  ### Changed
@@ -123,7 +137,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
123
137
  - Deserialize method (and `HdKeyring` constructor by extension) can no longer be passed an options object containing a value for `numberOfAccounts` if it is not also containing a value for `mnemonic`.
124
138
  - Package name changed from `eth-hd-keyring` to `@metamask/eth-hd-keyring`.
125
139
 
126
- [Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/eth-hd-keyring@7.0.3...HEAD
140
+ [Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/eth-hd-keyring@8.0.0...HEAD
141
+ [8.0.0]: https://github.com/MetaMask/accounts/compare/@metamask/eth-hd-keyring@7.0.4...@metamask/eth-hd-keyring@8.0.0
142
+ [7.0.4]: https://github.com/MetaMask/accounts/compare/@metamask/eth-hd-keyring@7.0.3...@metamask/eth-hd-keyring@7.0.4
127
143
  [7.0.3]: https://github.com/MetaMask/accounts/compare/@metamask/eth-hd-keyring@7.0.2...@metamask/eth-hd-keyring@7.0.3
128
144
  [7.0.2]: https://github.com/MetaMask/accounts/compare/@metamask/eth-hd-keyring@7.0.1...@metamask/eth-hd-keyring@7.0.2
129
145
  [7.0.1]: https://github.com/MetaMask/accounts/compare/@metamask/eth-hd-keyring@7.0.0...@metamask/eth-hd-keyring@7.0.1
package/index.js CHANGED
@@ -1,6 +1,3 @@
1
- const { HDKey } = require('ethereum-cryptography/hdkey');
2
- const { keccak256 } = require('ethereum-cryptography/keccak');
3
- const { bytesToHex } = require('ethereum-cryptography/utils');
4
1
  const {
5
2
  privateToPublic,
6
3
  publicToAddress,
@@ -8,8 +5,6 @@ const {
8
5
  arrToBufArr,
9
6
  bufferToHex,
10
7
  } = require('@ethereumjs/util');
11
- const bip39 = require('@metamask/scure-bip39');
12
- const { wordlist } = require('@metamask/scure-bip39/dist/wordlists/english');
13
8
  const {
14
9
  concatSig,
15
10
  decrypt,
@@ -19,7 +14,12 @@ const {
19
14
  signTypedData,
20
15
  SignTypedDataVersion,
21
16
  } = require('@metamask/eth-sig-util');
17
+ const bip39 = require('@metamask/scure-bip39');
18
+ const { wordlist } = require('@metamask/scure-bip39/dist/wordlists/english');
22
19
  const { assertIsHexString, remove0x } = require('@metamask/utils');
20
+ const { HDKey } = require('ethereum-cryptography/hdkey');
21
+ const { keccak256 } = require('ethereum-cryptography/keccak');
22
+ const { bytesToHex } = require('ethereum-cryptography/utils');
23
23
 
24
24
  // Options:
25
25
  const hdPathString = `m/44'/60'/0'/0`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/eth-hd-keyring",
3
- "version": "7.0.3",
3
+ "version": "8.0.0",
4
4
  "description": "A simple standard interface for a seed phrase generated set of Ethereum accounts.",
5
5
  "keywords": [
6
6
  "ethereum",
@@ -25,26 +25,25 @@
25
25
  "changelog:validate": "../../scripts/validate-changelog.sh @metamask/eth-hd-keyring",
26
26
  "publish:preview": "yarn npm publish --tag preview",
27
27
  "test": "jest",
28
- "test:clean": "jest --clearCache",
29
- "test:verbose": "jest --verbose"
28
+ "test:clean": "jest --clearCache"
30
29
  },
31
30
  "dependencies": {
32
31
  "@ethereumjs/util": "^8.1.0",
33
- "@metamask/eth-sig-util": "^7.0.3",
32
+ "@metamask/eth-sig-util": "^8.0.0",
34
33
  "@metamask/scure-bip39": "^2.1.1",
35
34
  "@metamask/utils": "^9.2.1",
36
35
  "ethereum-cryptography": "^2.1.2"
37
36
  },
38
37
  "devDependencies": {
39
- "@ethereumjs/tx": "^4.0.1",
38
+ "@ethereumjs/tx": "^4.2.0",
40
39
  "@lavamoat/allow-scripts": "^3.2.1",
41
40
  "@lavamoat/preinstall-always-fail": "^2.1.0",
42
41
  "@metamask/auto-changelog": "^3.4.4",
43
42
  "@metamask/bip39": "^4.0.0",
44
43
  "@metamask/eth-hd-keyring": "4.0.1",
45
- "@types/jest": "^29.4.0",
44
+ "@types/jest": "^29.5.12",
46
45
  "deepmerge": "^4.2.2",
47
- "jest": "^29.4.3"
46
+ "jest": "^29.5.0"
48
47
  },
49
48
  "engines": {
50
49
  "node": "^18.18 || >=20"
package/test/index.js CHANGED
@@ -1,3 +1,16 @@
1
+ const {
2
+ TransactionFactory,
3
+ Transaction: EthereumTx,
4
+ } = require('@ethereumjs/tx');
5
+ const {
6
+ isValidAddress,
7
+ bufferToHex,
8
+ toBuffer,
9
+ ecrecover,
10
+ pubToAddress,
11
+ } = require('@ethereumjs/util');
12
+ const oldMMForkBIP39 = require('@metamask/bip39');
13
+ const OldHdKeyring = require('@metamask/eth-hd-keyring');
1
14
  const {
2
15
  normalize,
3
16
  personalSign,
@@ -8,21 +21,8 @@ const {
8
21
  encrypt,
9
22
  } = require('@metamask/eth-sig-util');
10
23
  const { wordlist } = require('@metamask/scure-bip39/dist/wordlists/english');
11
- const oldMMForkBIP39 = require('@metamask/bip39');
12
- const {
13
- isValidAddress,
14
- bufferToHex,
15
- toBuffer,
16
- ecrecover,
17
- pubToAddress,
18
- } = require('@ethereumjs/util');
19
- const {
20
- TransactionFactory,
21
- Transaction: EthereumTx,
22
- } = require('@ethereumjs/tx');
23
-
24
- const OldHdKeyring = require('@metamask/eth-hd-keyring');
25
24
  const { keccak256 } = require('ethereum-cryptography/keccak');
25
+
26
26
  const HdKeyring = require('..');
27
27
 
28
28
  // Sample account: