Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/keyring-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added `KeyringV2` support ([#8390](https://github.com/MetaMask/core/pull/8390))
- The controller now maintains a list of `KeyringV2` instance in memory alongside previous `Keyring` instance.
- This new keyring interface is more generic and will become the new standard to interact with keyring (creating accounts, executing logic that involves accounts like signing, etc...).
- For now, most `KeyringV2` are wrappers (read adapters) around existing `Keyring` instance.
- Added `withKeyringV2Unsafe` method and `KeyringController:withKeyringV2Unsafe` messenger action for lock-free read-only access to `KeyringV2` adapters ([#8390](https://github.com/MetaMask/core/pull/8390))
- Mirrors `withKeyringUnsafe` semantics: no mutex acquired, no persistence or rollback.
- Caller is responsible for ensuring the operation is read-only and accesses only immutable keyring data.
- Added `withKeyringV2` method and `KeyringController:withKeyringV2` messenger action for atomic operations using the `KeyringV2` API ([#8390](https://github.com/MetaMask/core/pull/8390))
- Accepts a `KeyringSelectorV2` (alias for `KeyringSelector`) to select keyrings by `type`, `address`, `id`, or `filter`.
- Ships with default V2 builders for HD (`HdKeyringV2`) and Simple (`SimpleKeyringV2`) keyrings; additional builders can be registered via the `keyringV2Builders` constructor option.

### Changed

- Deprecated `withKeyring` in favor of `withKeyringV2`, which supports the `KeyringV2` API.
- Bump `@metamask/messenger` from `^1.0.0` to `^1.1.1` ([#8364](https://github.com/MetaMask/core/pull/8364), [#8373](https://github.com/MetaMask/core/pull/8373))

## [25.2.0]
Expand Down
6 changes: 3 additions & 3 deletions packages/keyring-controller/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ module.exports = merge(baseConfig, {
// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
global: {
branches: 95.09,
branches: 94.91,
functions: 100,
lines: 99.03,
statements: 99.04,
lines: 99.11,
statements: 99.12,
Comment on lines +20 to +23
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, that's what we have on main:

----------------------|---------|----------|---------|---------|------------------------------
File                  | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------------|---------|----------|---------|---------|------------------------------
All files             |   99.04 |    95.09 |     100 |   99.03 |
 KeyringController.ts |   98.93 |    94.52 |     100 |   98.92 | 647,2099,2473,2485,2529,2836
 constants.ts         |     100 |      100 |     100 |     100 |
 errors.ts            |     100 |      100 |     100 |     100 |
----------------------|---------|----------|---------|---------|------------------------------

And the new coverage is like this:

----------------------|---------|----------|---------|---------|------------------------------
File                  | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s            
----------------------|---------|----------|---------|---------|------------------------------
All files             |   99.12 |    94.91 |     100 |   99.11 |                              
 KeyringController.ts |   99.03 |    94.37 |     100 |   99.01 | 736,2412,2796,2808,2852,3190 
 constants.ts         |     100 |      100 |     100 |     100 |                              
 errors.ts            |     100 |      100 |     100 |     100 |                              
----------------------|---------|----------|---------|---------|------------------------------

Same number of lines not covered, so nothing has changed in terms of coverage.

},
},

Expand Down
4 changes: 2 additions & 2 deletions packages/keyring-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
"@ethereumjs/util": "^9.1.0",
"@metamask/base-controller": "^9.0.1",
"@metamask/browser-passworder": "^6.0.0",
"@metamask/eth-hd-keyring": "^13.0.0",
"@metamask/eth-hd-keyring": "^13.1.0",
"@metamask/eth-sig-util": "^8.2.0",
"@metamask/eth-simple-keyring": "^11.0.0",
"@metamask/eth-simple-keyring": "^11.1.1",
"@metamask/keyring-api": "^21.6.0",
"@metamask/keyring-internal-api": "^10.0.0",
"@metamask/messenger": "^1.1.1",
Expand Down
Loading
Loading