@metamask/eth-hd-keyring 7.0.4 → 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,13 @@ 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
+
10
17
  ## [7.0.4]
11
18
 
12
19
  ### Changed
@@ -130,7 +137,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
130
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`.
131
138
  - Package name changed from `eth-hd-keyring` to `@metamask/eth-hd-keyring`.
132
139
 
133
- [Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/eth-hd-keyring@7.0.4...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
134
142
  [7.0.4]: https://github.com/MetaMask/accounts/compare/@metamask/eth-hd-keyring@7.0.3...@metamask/eth-hd-keyring@7.0.4
135
143
  [7.0.3]: https://github.com/MetaMask/accounts/compare/@metamask/eth-hd-keyring@7.0.2...@metamask/eth-hd-keyring@7.0.3
136
144
  [7.0.2]: https://github.com/MetaMask/accounts/compare/@metamask/eth-hd-keyring@7.0.1...@metamask/eth-hd-keyring@7.0.2
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.4",
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,12 +25,11 @@
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"
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: