From 5cbcc5bbe3dfa324ebd9fc0817c0fbe073bf9ad1 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 18 Jul 2023 12:27:07 +0000 Subject: [PATCH 1/8] 13.0.0 --- CHANGELOG.md | 13 ++++++++++++- package.json | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc2940bf..2e0b275a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [13.0.0] +### Uncategorized +- Restore compatibility with QR Keyring ([#252](https://github.com/MetaMask/KeyringController/pull/252)) +- Refactor controller initialization in tests ([#251](https://github.com/MetaMask/KeyringController/pull/251)) +- Add types for store and fix type discrepancies ([#247](https://github.com/MetaMask/KeyringController/pull/247)) +- Fix `signTypedMessage` parameter types ([#250](https://github.com/MetaMask/KeyringController/pull/250)) +- Narrow return type of `signTypedMessage` and encryption methods ([#249](https://github.com/MetaMask/KeyringController/pull/249)) +- Fix `@metamask/eth-sig-util` types ([#248](https://github.com/MetaMask/KeyringController/pull/248)) +- Bump @metamask/auto-changelog from 3.1.0 to 3.2.0 ([#244](https://github.com/MetaMask/KeyringController/pull/244)) + ## [12.0.1] ### Fixed - Improved error handling when calling `getKeyringForAccount` with empty or invalid address ([#238](https://github.com/MetaMask/KeyringController/pull/238)) @@ -118,7 +128,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Validate user imported seedphrase across all bip39 wordlists ([#77](https://github.com/MetaMask/KeyringController/pull/77)) -[Unreleased]: https://github.com/MetaMask/KeyringController/compare/v12.0.1...HEAD +[Unreleased]: https://github.com/MetaMask/KeyringController/compare/v13.0.0...HEAD +[13.0.0]: https://github.com/MetaMask/KeyringController/compare/v12.0.1...v13.0.0 [12.0.1]: https://github.com/MetaMask/KeyringController/compare/v12.0.0...v12.0.1 [12.0.0]: https://github.com/MetaMask/KeyringController/compare/v11.0.0...v12.0.0 [11.0.0]: https://github.com/MetaMask/KeyringController/compare/v10.0.1...v11.0.0 diff --git a/package.json b/package.json index 38382c95..c07da05d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eth-keyring-controller", - "version": "12.0.1", + "version": "13.0.0", "description": "A module for managing various keyrings of Ethereum accounts, encrypting them, and using them", "keywords": [ "ethereum", From 36b3159c8f279a8327580c5068fd9dd2cb21fcb0 Mon Sep 17 00:00:00 2001 From: Michele Esposito Date: Tue, 18 Jul 2023 14:49:13 +0200 Subject: [PATCH 2/8] docs: edit changes --- CHANGELOG.md | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e0b275a..452c4f0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,14 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [13.0.0] -### Uncategorized -- Restore compatibility with QR Keyring ([#252](https://github.com/MetaMask/KeyringController/pull/252)) -- Refactor controller initialization in tests ([#251](https://github.com/MetaMask/KeyringController/pull/251)) -- Add types for store and fix type discrepancies ([#247](https://github.com/MetaMask/KeyringController/pull/247)) -- Fix `signTypedMessage` parameter types ([#250](https://github.com/MetaMask/KeyringController/pull/250)) +### Changed +- **BREAKING**: Add types for store and fix type discrepancies ([#247](https://github.com/MetaMask/KeyringController/pull/247)) +- **BREAKING**: constructor opts `KeyringControllerArgs` properties types changed ([#247](https://github.com/MetaMask/KeyringController/pull/247)): + - Simplified type for `keyringBuilders`, now is an optional `{ (): Keyring; type: string }[]` + - `initState` now accepts only an optional persistent state, of type `KeyringControllerPersistentState` +- **BREAKING**: type of `store` and `memStore` public properties changed ([#247](https://github.com/MetaMask/KeyringController/pull/247)): + - `KeyringController.store` is now an `ObservableStore` + - `KeyringController.memStore` is now an `ObservableStore` +- **BREAKING**: `updateMemStoreKeyrings` method return type changed to `Promise` ([#247](https://github.com/MetaMask/KeyringController/pull/247)) +- **BREAKING**: `KeyringControllerState` type changed to include only non-persistent state ([#247](https://github.com/MetaMask/KeyringController/pull/247)): + - Now `undefined` is used instead of `null` when `encryptionKey` and `encryptionSalt` are unset + - `keyrings` is now of type `KeyringObject[]` instead of `Keyring` + - `password`, `store`, `memStore` have been removed - note that in practice this change only affects types + - This changes cause the following methods also to change the return type: + - `createNewVaultAndKeychain` + - `createNewVaultAndRestore` + - `setLocked` + - `submitPassword` + - `submitEncryptionKey` + - `addNewAccount` + - `removeAccount` + - `fullUpdate` - Narrow return type of `signTypedMessage` and encryption methods ([#249](https://github.com/MetaMask/KeyringController/pull/249)) + - The methods `signTypedMessage`, `getEncryptionPublicKey`, and `decryptMessage` now return `string` rather than `Bytes` + +### Added +- Added `KeyringControllerPersistentState` type which includes only persistent state, an optional string property with key `vault` ([#247](https://github.com/MetaMask/KeyringController/pull/247)) +- Added `KeyringObject` type for how keyrings are represented in `memStore` ([#247](https://github.com/MetaMask/KeyringController/pull/247)) + +### Fixed - Fix `@metamask/eth-sig-util` types ([#248](https://github.com/MetaMask/KeyringController/pull/248)) -- Bump @metamask/auto-changelog from 3.1.0 to 3.2.0 ([#244](https://github.com/MetaMask/KeyringController/pull/244)) +- Fix `signTypedMessage` parameter types ([#250](https://github.com/MetaMask/KeyringController/pull/250)) +- Restore compatibility with QR Keyring ([#252](https://github.com/MetaMask/KeyringController/pull/252)) + - opts argument for addNewKeyring method is now optional + ## [12.0.1] ### Fixed From c914d5cada578454a6827622130df76d24216cf9 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Tue, 18 Jul 2023 12:55:04 +0000 Subject: [PATCH 3/8] fix changelog section ordering --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 452c4f0c..ee97c145 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [13.0.0] +### Added +- Added `KeyringControllerPersistentState` type which includes only persistent state, an optional string property with key `vault` ([#247](https://github.com/MetaMask/KeyringController/pull/247)) +- Added `KeyringObject` type for how keyrings are represented in `memStore` ([#247](https://github.com/MetaMask/KeyringController/pull/247)) + ### Changed - **BREAKING**: Add types for store and fix type discrepancies ([#247](https://github.com/MetaMask/KeyringController/pull/247)) - **BREAKING**: constructor opts `KeyringControllerArgs` properties types changed ([#247](https://github.com/MetaMask/KeyringController/pull/247)): @@ -32,10 +36,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Narrow return type of `signTypedMessage` and encryption methods ([#249](https://github.com/MetaMask/KeyringController/pull/249)) - The methods `signTypedMessage`, `getEncryptionPublicKey`, and `decryptMessage` now return `string` rather than `Bytes` -### Added -- Added `KeyringControllerPersistentState` type which includes only persistent state, an optional string property with key `vault` ([#247](https://github.com/MetaMask/KeyringController/pull/247)) -- Added `KeyringObject` type for how keyrings are represented in `memStore` ([#247](https://github.com/MetaMask/KeyringController/pull/247)) - ### Fixed - Fix `@metamask/eth-sig-util` types ([#248](https://github.com/MetaMask/KeyringController/pull/248)) - Fix `signTypedMessage` parameter types ([#250](https://github.com/MetaMask/KeyringController/pull/250)) From 13d6f345f21ee15dca05d20dec3824b8195564e2 Mon Sep 17 00:00:00 2001 From: Michele Esposito Date: Tue, 18 Jul 2023 15:07:21 +0200 Subject: [PATCH 4/8] docs: include #253 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee97c145..04600b48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `addNewAccount` - `removeAccount` - `fullUpdate` +- **BREAKING**: When constructing a simple keyring with `addNewKeying`, the second parameter (`opts`) is now expected to be an array of private keys rather than an object with a `privateKeys` property ([#253](https://github.com/MetaMask/KeyringController/pull/253)) +- Restored support for keyrings with non-object serialized state ([#253](https://github.com/MetaMask/KeyringController/pull/253)) - Narrow return type of `signTypedMessage` and encryption methods ([#249](https://github.com/MetaMask/KeyringController/pull/249)) - The methods `signTypedMessage`, `getEncryptionPublicKey`, and `decryptMessage` now return `string` rather than `Bytes` From 0d9ec5154ef91c4bfef7aebe5ed9f1161ce56727 Mon Sep 17 00:00:00 2001 From: Michele Esposito <34438276+mikesposito@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:15:13 +0200 Subject: [PATCH 5/8] Update CHANGELOG.md Co-authored-by: Mark Stacey --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04600b48..60ab643f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The methods `signTypedMessage`, `getEncryptionPublicKey`, and `decryptMessage` now return `string` rather than `Bytes` ### Fixed -- Fix `@metamask/eth-sig-util` types ([#248](https://github.com/MetaMask/KeyringController/pull/248)) - Fix `signTypedMessage` parameter types ([#250](https://github.com/MetaMask/KeyringController/pull/250)) - Restore compatibility with QR Keyring ([#252](https://github.com/MetaMask/KeyringController/pull/252)) - opts argument for addNewKeyring method is now optional From 8a69f4398ca509a069e52e5f1177f3534d3aa68c Mon Sep 17 00:00:00 2001 From: Michele Esposito <34438276+mikesposito@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:15:24 +0200 Subject: [PATCH 6/8] Update CHANGELOG.md Co-authored-by: Mark Stacey --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60ab643f..9ed1b6a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,7 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fix `signTypedMessage` parameter types ([#250](https://github.com/MetaMask/KeyringController/pull/250)) - Restore compatibility with QR Keyring ([#252](https://github.com/MetaMask/KeyringController/pull/252)) - - opts argument for addNewKeyring method is now optional + - An empty object is no longer used as a default when deserialized state was not provided to the `addNewKeyring` method. This default empty object was breaking the QR keyring. ## [12.0.1] From fb183294320506a770fcb57a14af7742daf8fc10 Mon Sep 17 00:00:00 2001 From: Michele Esposito <34438276+mikesposito@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:18:42 +0200 Subject: [PATCH 7/8] Update CHANGELOG.md Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ed1b6a9..ffaec42e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `addNewAccount` - `removeAccount` - `fullUpdate` -- **BREAKING**: When constructing a simple keyring with `addNewKeying`, the second parameter (`opts`) is now expected to be an array of private keys rather than an object with a `privateKeys` property ([#253](https://github.com/MetaMask/KeyringController/pull/253)) +- **BREAKING**: When constructing a simple keyring with `addNewKeyring`, the second parameter (`opts`) is now expected to be an array of private keys rather than an object with a `privateKeys` property ([#253](https://github.com/MetaMask/KeyringController/pull/253)) - Restored support for keyrings with non-object serialized state ([#253](https://github.com/MetaMask/KeyringController/pull/253)) - Narrow return type of `signTypedMessage` and encryption methods ([#249](https://github.com/MetaMask/KeyringController/pull/249)) - The methods `signTypedMessage`, `getEncryptionPublicKey`, and `decryptMessage` now return `string` rather than `Bytes` From 59aece85ec8c9f7b708e9b4da3e719fb4801b01b Mon Sep 17 00:00:00 2001 From: Michele Esposito <34438276+mikesposito@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:22:36 +0200 Subject: [PATCH 8/8] Update CHANGELOG.md Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffaec42e..f9eeeee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - **BREAKING**: Add types for store and fix type discrepancies ([#247](https://github.com/MetaMask/KeyringController/pull/247)) -- **BREAKING**: constructor opts `KeyringControllerArgs` properties types changed ([#247](https://github.com/MetaMask/KeyringController/pull/247)): - - Simplified type for `keyringBuilders`, now is an optional `{ (): Keyring; type: string }[]` - - `initState` now accepts only an optional persistent state, of type `KeyringControllerPersistentState` +- **BREAKING**: Constructor parameter `KeyringControllerArgs` fields changed ([#247](https://github.com/MetaMask/KeyringController/pull/247)): - **BREAKING**: type of `store` and `memStore` public properties changed ([#247](https://github.com/MetaMask/KeyringController/pull/247)): - `KeyringController.store` is now an `ObservableStore` - `KeyringController.memStore` is now an `ObservableStore`