@metamask-previews/keyring-controller 23.0.0-preview-f3f2e8c8 → 23.1.0-preview-8029191
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 +21 -1
- package/dist/KeyringController.cjs +31 -7
- package/dist/KeyringController.cjs.map +1 -1
- package/dist/KeyringController.d.cts +5 -2
- package/dist/KeyringController.d.cts.map +1 -1
- package/dist/KeyringController.d.mts +5 -2
- package/dist/KeyringController.d.mts.map +1 -1
- package/dist/KeyringController.mjs +31 -7
- package/dist/KeyringController.mjs.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Bump `@metamask/utils` from `^11.4.2` to `^11.8.0` ([#6588](https://github.com/MetaMask/core/pull/6588))
|
|
13
|
+
|
|
14
|
+
## [23.1.0]
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Add `KeyringController:addNewKeyring` action ([#6439](https://github.com/MetaMask/core/pull/6439))
|
|
19
|
+
- Add two new controller state metadata properties: `includeInStateLogs` and `usedInUi` ([#6525](https://github.com/MetaMask/core/pull/6525))
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Bump `@metamask/base-controller` from `^8.1.0` to `^8.3.0` ([#6355](https://github.com/MetaMask/core/pull/6355), [#6465](https://github.com/MetaMask/core/pull/6465))
|
|
24
|
+
- Bump `@metamask/keyring-api` from `^20.1.0` to `^21.0.0` ([#6560](https://github.com/MetaMask/core/pull/6560))
|
|
25
|
+
- Bump `@metamask/keyring-internal-api` from `^8.1.0` to `^9.0.0` ([#6560](https://github.com/MetaMask/core/pull/6560))
|
|
26
|
+
- Bump `@metamask/eth-hd-keyring` from `^12.0.0` to `13.0.0` ([#6566](https://github.com/MetaMask/core/pull/6566))
|
|
27
|
+
- Bump `@metamask/eth-simple-keyring` from `^10.0.0` to `11.0.0` ([#6566](https://github.com/MetaMask/core/pull/6566))
|
|
28
|
+
|
|
10
29
|
## [23.0.0]
|
|
11
30
|
|
|
12
31
|
### Changed
|
|
@@ -843,7 +862,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
843
862
|
|
|
844
863
|
All changes listed after this point were applied to this package following the monorepo conversion.
|
|
845
864
|
|
|
846
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@23.
|
|
865
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@23.1.0...HEAD
|
|
866
|
+
[23.1.0]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@23.0.0...@metamask/keyring-controller@23.1.0
|
|
847
867
|
[23.0.0]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@22.1.1...@metamask/keyring-controller@23.0.0
|
|
848
868
|
[22.1.1]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@22.1.0...@metamask/keyring-controller@22.1.1
|
|
849
869
|
[22.1.0]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@22.0.2...@metamask/keyring-controller@22.1.0
|
|
@@ -65,7 +65,6 @@ var KeyringTypes;
|
|
|
65
65
|
KeyringTypes["oneKey"] = "OneKey Hardware";
|
|
66
66
|
KeyringTypes["ledger"] = "Ledger Hardware";
|
|
67
67
|
KeyringTypes["lattice"] = "Lattice Hardware";
|
|
68
|
-
KeyringTypes["keystone"] = "Keystone Hardware";
|
|
69
68
|
KeyringTypes["snap"] = "Snap Keyring";
|
|
70
69
|
})(KeyringTypes || (exports.KeyringTypes = KeyringTypes = {}));
|
|
71
70
|
/**
|
|
@@ -116,7 +115,6 @@ const defaultKeyringBuilders = [
|
|
|
116
115
|
// todo: keyring types are mismatched, this should be fixed in they keyrings themselves
|
|
117
116
|
// @ts-expect-error keyring types are mismatched
|
|
118
117
|
keyringBuilderFactory(eth_simple_keyring_1.default),
|
|
119
|
-
// @ts-expect-error keyring types are mismatched
|
|
120
118
|
keyringBuilderFactory(eth_hd_keyring_1.HdKeyring),
|
|
121
119
|
];
|
|
122
120
|
const getDefaultKeyringState = () => {
|
|
@@ -265,11 +263,36 @@ class KeyringController extends base_controller_1.BaseController {
|
|
|
265
263
|
super({
|
|
266
264
|
name,
|
|
267
265
|
metadata: {
|
|
268
|
-
vault: {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
266
|
+
vault: {
|
|
267
|
+
includeInStateLogs: false,
|
|
268
|
+
persist: true,
|
|
269
|
+
anonymous: false,
|
|
270
|
+
usedInUi: false,
|
|
271
|
+
},
|
|
272
|
+
isUnlocked: {
|
|
273
|
+
includeInStateLogs: true,
|
|
274
|
+
persist: false,
|
|
275
|
+
anonymous: true,
|
|
276
|
+
usedInUi: true,
|
|
277
|
+
},
|
|
278
|
+
keyrings: {
|
|
279
|
+
includeInStateLogs: true,
|
|
280
|
+
persist: false,
|
|
281
|
+
anonymous: false,
|
|
282
|
+
usedInUi: true,
|
|
283
|
+
},
|
|
284
|
+
encryptionKey: {
|
|
285
|
+
includeInStateLogs: false,
|
|
286
|
+
persist: false,
|
|
287
|
+
anonymous: false,
|
|
288
|
+
usedInUi: false,
|
|
289
|
+
},
|
|
290
|
+
encryptionSalt: {
|
|
291
|
+
includeInStateLogs: false,
|
|
292
|
+
persist: false,
|
|
293
|
+
anonymous: false,
|
|
294
|
+
usedInUi: false,
|
|
295
|
+
},
|
|
273
296
|
},
|
|
274
297
|
messenger,
|
|
275
298
|
state: {
|
|
@@ -1008,6 +1031,7 @@ _KeyringController_controllerOperationMutex = new WeakMap(), _KeyringController_
|
|
|
1008
1031
|
this.messagingSystem.registerActionHandler(`${name}:signUserOperation`, this.signUserOperation.bind(this));
|
|
1009
1032
|
this.messagingSystem.registerActionHandler(`${name}:addNewAccount`, this.addNewAccount.bind(this));
|
|
1010
1033
|
this.messagingSystem.registerActionHandler(`${name}:withKeyring`, this.withKeyring.bind(this));
|
|
1034
|
+
this.messagingSystem.registerActionHandler(`${name}:addNewKeyring`, this.addNewKeyring.bind(this));
|
|
1011
1035
|
}, _KeyringController_getKeyringById = function _KeyringController_getKeyringById(keyringId) {
|
|
1012
1036
|
return __classPrivateFieldGet(this, _KeyringController_keyrings, "f").find(({ metadata }) => metadata.id === keyringId)
|
|
1013
1037
|
?.keyring;
|