@metamask-previews/multichain-account-service 1.6.2-preview-9fa15fd0 → 2.0.0-preview-46d2c977
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 +13 -1
- package/dist/tests/messenger.cjs +21 -14
- package/dist/tests/messenger.cjs.map +1 -1
- package/dist/tests/messenger.d.cts +11 -7
- package/dist/tests/messenger.d.cts.map +1 -1
- package/dist/tests/messenger.d.mts +11 -7
- package/dist/tests/messenger.d.mts.map +1 -1
- package/dist/tests/messenger.mjs +21 -14
- package/dist/tests/messenger.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +5 -4
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +5 -4
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.0.0]
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **BREAKING:** Use new `Messenger` from `@metamask/messenger` ([#6544](https://github.com/MetaMask/core/pull/6544))
|
|
15
|
+
- Previously, `MultichainAccountService` accepted a `RestrictedMessenger` instance from `@metamask/base-controller`.
|
|
16
|
+
- **BREAKING:** Bump `@metamask/accounts-controller` from `^33.0.0` to `^34.0.0` ([#6962](https://github.com/MetaMask/core/pull/6962))
|
|
17
|
+
- **BREAKING:** Bump `@metamask/keyring-controller` from `^23.0.0` to `^24.0.0` ([#6962](https://github.com/MetaMask/core/pull/6962))
|
|
18
|
+
- Bump `@metamask/base-controller` from `^8.4.2` to `^9.0.0` ([#6962](https://github.com/MetaMask/core/pull/6962))
|
|
19
|
+
- Bump `@metamask/eth-snap-keyring` from `^17.0.0` to `^18.0.0` ([#6951](https://github.com/MetaMask/core/pull/6951))
|
|
20
|
+
|
|
10
21
|
## [1.6.2]
|
|
11
22
|
|
|
12
23
|
### Changed
|
|
@@ -233,7 +244,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
233
244
|
- Add `MultichainAccountService` ([#6141](https://github.com/MetaMask/core/pull/6141)), ([#6165](https://github.com/MetaMask/core/pull/6165))
|
|
234
245
|
- This service manages multichain accounts/wallets.
|
|
235
246
|
|
|
236
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/multichain-account-service@
|
|
247
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/multichain-account-service@2.0.0...HEAD
|
|
248
|
+
[2.0.0]: https://github.com/MetaMask/core/compare/@metamask/multichain-account-service@1.6.2...@metamask/multichain-account-service@2.0.0
|
|
237
249
|
[1.6.2]: https://github.com/MetaMask/core/compare/@metamask/multichain-account-service@1.6.1...@metamask/multichain-account-service@1.6.2
|
|
238
250
|
[1.6.1]: https://github.com/MetaMask/core/compare/@metamask/multichain-account-service@1.6.0...@metamask/multichain-account-service@1.6.1
|
|
239
251
|
[1.6.0]: https://github.com/MetaMask/core/compare/@metamask/multichain-account-service@1.5.0...@metamask/multichain-account-service@1.6.0
|
package/dist/tests/messenger.cjs
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getMultichainAccountServiceMessenger = exports.getRootMessenger = void 0;
|
|
4
|
-
const
|
|
4
|
+
const messenger_1 = require("@metamask/messenger");
|
|
5
5
|
/**
|
|
6
|
-
* Creates a
|
|
6
|
+
* Creates and returns a root messenger for testing
|
|
7
7
|
*
|
|
8
|
-
* @returns A
|
|
8
|
+
* @returns A messenger instance
|
|
9
9
|
*/
|
|
10
10
|
function getRootMessenger() {
|
|
11
|
-
return new
|
|
11
|
+
return new messenger_1.Messenger({
|
|
12
|
+
namespace: messenger_1.MOCK_ANY_NAMESPACE,
|
|
13
|
+
});
|
|
12
14
|
}
|
|
13
15
|
exports.getRootMessenger = getRootMessenger;
|
|
14
16
|
/**
|
|
15
17
|
* Retrieves a restricted messenger for the MultichainAccountService.
|
|
16
18
|
*
|
|
17
|
-
* @param
|
|
19
|
+
* @param rootMessenger - The root messenger instance. Defaults to a new Messenger created by getRootMessenger().
|
|
18
20
|
* @returns The restricted messenger for the MultichainAccountService.
|
|
19
21
|
*/
|
|
20
|
-
function getMultichainAccountServiceMessenger(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
allowedActions: [
|
|
22
|
+
function getMultichainAccountServiceMessenger(rootMessenger) {
|
|
23
|
+
const messenger = new messenger_1.Messenger({
|
|
24
|
+
namespace: 'MultichainAccountService',
|
|
25
|
+
parent: rootMessenger,
|
|
26
|
+
});
|
|
27
|
+
rootMessenger.delegate({
|
|
28
|
+
messenger,
|
|
29
|
+
actions: [
|
|
29
30
|
'AccountsController:getAccount',
|
|
30
31
|
'AccountsController:getAccountByAddress',
|
|
31
32
|
'AccountsController:listMultichainAccounts',
|
|
@@ -37,7 +38,13 @@ function getMultichainAccountServiceMessenger(messenger) {
|
|
|
37
38
|
'NetworkController:findNetworkClientIdByChainId',
|
|
38
39
|
'NetworkController:getNetworkClientById',
|
|
39
40
|
],
|
|
41
|
+
events: [
|
|
42
|
+
'KeyringController:stateChange',
|
|
43
|
+
'AccountsController:accountAdded',
|
|
44
|
+
'AccountsController:accountRemoved',
|
|
45
|
+
],
|
|
40
46
|
});
|
|
47
|
+
return messenger;
|
|
41
48
|
}
|
|
42
49
|
exports.getMultichainAccountServiceMessenger = getMultichainAccountServiceMessenger;
|
|
43
50
|
//# sourceMappingURL=messenger.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messenger.cjs","sourceRoot":"","sources":["../../src/tests/messenger.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"messenger.cjs","sourceRoot":"","sources":["../../src/tests/messenger.ts"],"names":[],"mappings":";;;AAAA,mDAM6B;AAgB7B;;;;GAIG;AACH,SAAgB,gBAAgB;IAC9B,OAAO,IAAI,qBAAS,CAAC;QACnB,SAAS,EAAE,8BAAkB;KAC9B,CAAC,CAAC;AACL,CAAC;AAJD,4CAIC;AAED;;;;;GAKG;AACH,SAAgB,oCAAoC,CAClD,aAA4B;IAE5B,MAAM,SAAS,GAAG,IAAI,qBAAS,CAK7B;QACA,SAAS,EAAE,0BAA0B;QACrC,MAAM,EAAE,aAAa;KACtB,CAAC,CAAC;IACH,aAAa,CAAC,QAAQ,CAAC;QACrB,SAAS;QACT,OAAO,EAAE;YACP,+BAA+B;YAC/B,wCAAwC;YACxC,2CAA2C;YAC3C,8BAA8B;YAC9B,+BAA+B;YAC/B,4BAA4B;YAC5B,qCAAqC;YACrC,iCAAiC;YACjC,gDAAgD;YAChD,wCAAwC;SACzC;QACD,MAAM,EAAE;YACN,+BAA+B;YAC/B,iCAAiC;YACjC,mCAAmC;SACpC;KACF,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC;AAjCD,oFAiCC","sourcesContent":["import {\n Messenger,\n MOCK_ANY_NAMESPACE,\n type MessengerActions,\n type MessengerEvents,\n type MockAnyNamespace,\n} from '@metamask/messenger';\n\nimport type { MultichainAccountServiceMessenger } from '../types';\n\ntype AllMultichainAccountServiceActions =\n MessengerActions<MultichainAccountServiceMessenger>;\n\ntype AllMultichainAccountServiceEvents =\n MessengerEvents<MultichainAccountServiceMessenger>;\n\nexport type RootMessenger = Messenger<\n MockAnyNamespace,\n AllMultichainAccountServiceActions,\n AllMultichainAccountServiceEvents\n>;\n\n/**\n * Creates and returns a root messenger for testing\n *\n * @returns A messenger instance\n */\nexport function getRootMessenger(): RootMessenger {\n return new Messenger({\n namespace: MOCK_ANY_NAMESPACE,\n });\n}\n\n/**\n * Retrieves a restricted messenger for the MultichainAccountService.\n *\n * @param rootMessenger - The root messenger instance. Defaults to a new Messenger created by getRootMessenger().\n * @returns The restricted messenger for the MultichainAccountService.\n */\nexport function getMultichainAccountServiceMessenger(\n rootMessenger: RootMessenger,\n): MultichainAccountServiceMessenger {\n const messenger = new Messenger<\n 'MultichainAccountService',\n AllMultichainAccountServiceActions,\n AllMultichainAccountServiceEvents,\n RootMessenger\n >({\n namespace: 'MultichainAccountService',\n parent: rootMessenger,\n });\n rootMessenger.delegate({\n messenger,\n actions: [\n 'AccountsController:getAccount',\n 'AccountsController:getAccountByAddress',\n 'AccountsController:listMultichainAccounts',\n 'SnapController:handleRequest',\n 'KeyringController:withKeyring',\n 'KeyringController:getState',\n 'KeyringController:getKeyringsByType',\n 'KeyringController:addNewKeyring',\n 'NetworkController:findNetworkClientIdByChainId',\n 'NetworkController:getNetworkClientById',\n ],\n events: [\n 'KeyringController:stateChange',\n 'AccountsController:accountAdded',\n 'AccountsController:accountRemoved',\n ],\n });\n return messenger;\n}\n"]}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { Messenger } from "@metamask/
|
|
2
|
-
import type {
|
|
1
|
+
import { Messenger, type MessengerActions, type MessengerEvents, type MockAnyNamespace } from "@metamask/messenger";
|
|
2
|
+
import type { MultichainAccountServiceMessenger } from "../types.cjs";
|
|
3
|
+
type AllMultichainAccountServiceActions = MessengerActions<MultichainAccountServiceMessenger>;
|
|
4
|
+
type AllMultichainAccountServiceEvents = MessengerEvents<MultichainAccountServiceMessenger>;
|
|
5
|
+
export type RootMessenger = Messenger<MockAnyNamespace, AllMultichainAccountServiceActions, AllMultichainAccountServiceEvents>;
|
|
3
6
|
/**
|
|
4
|
-
* Creates a
|
|
7
|
+
* Creates and returns a root messenger for testing
|
|
5
8
|
*
|
|
6
|
-
* @returns A
|
|
9
|
+
* @returns A messenger instance
|
|
7
10
|
*/
|
|
8
|
-
export declare function getRootMessenger():
|
|
11
|
+
export declare function getRootMessenger(): RootMessenger;
|
|
9
12
|
/**
|
|
10
13
|
* Retrieves a restricted messenger for the MultichainAccountService.
|
|
11
14
|
*
|
|
12
|
-
* @param
|
|
15
|
+
* @param rootMessenger - The root messenger instance. Defaults to a new Messenger created by getRootMessenger().
|
|
13
16
|
* @returns The restricted messenger for the MultichainAccountService.
|
|
14
17
|
*/
|
|
15
|
-
export declare function getMultichainAccountServiceMessenger(
|
|
18
|
+
export declare function getMultichainAccountServiceMessenger(rootMessenger: RootMessenger): MultichainAccountServiceMessenger;
|
|
19
|
+
export {};
|
|
16
20
|
//# sourceMappingURL=messenger.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messenger.d.cts","sourceRoot":"","sources":["../../src/tests/messenger.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"messenger.d.cts","sourceRoot":"","sources":["../../src/tests/messenger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,4BAA4B;AAE7B,OAAO,KAAK,EAAE,iCAAiC,EAAE,qBAAiB;AAElE,KAAK,kCAAkC,GACrC,gBAAgB,CAAC,iCAAiC,CAAC,CAAC;AAEtD,KAAK,iCAAiC,GACpC,eAAe,CAAC,iCAAiC,CAAC,CAAC;AAErD,MAAM,MAAM,aAAa,GAAG,SAAS,CACnC,gBAAgB,EAChB,kCAAkC,EAClC,iCAAiC,CAClC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAIhD;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,aAAa,EAAE,aAAa,GAC3B,iCAAiC,CA+BnC"}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { Messenger } from "@metamask/
|
|
2
|
-
import type {
|
|
1
|
+
import { Messenger, type MessengerActions, type MessengerEvents, type MockAnyNamespace } from "@metamask/messenger";
|
|
2
|
+
import type { MultichainAccountServiceMessenger } from "../types.mjs";
|
|
3
|
+
type AllMultichainAccountServiceActions = MessengerActions<MultichainAccountServiceMessenger>;
|
|
4
|
+
type AllMultichainAccountServiceEvents = MessengerEvents<MultichainAccountServiceMessenger>;
|
|
5
|
+
export type RootMessenger = Messenger<MockAnyNamespace, AllMultichainAccountServiceActions, AllMultichainAccountServiceEvents>;
|
|
3
6
|
/**
|
|
4
|
-
* Creates a
|
|
7
|
+
* Creates and returns a root messenger for testing
|
|
5
8
|
*
|
|
6
|
-
* @returns A
|
|
9
|
+
* @returns A messenger instance
|
|
7
10
|
*/
|
|
8
|
-
export declare function getRootMessenger():
|
|
11
|
+
export declare function getRootMessenger(): RootMessenger;
|
|
9
12
|
/**
|
|
10
13
|
* Retrieves a restricted messenger for the MultichainAccountService.
|
|
11
14
|
*
|
|
12
|
-
* @param
|
|
15
|
+
* @param rootMessenger - The root messenger instance. Defaults to a new Messenger created by getRootMessenger().
|
|
13
16
|
* @returns The restricted messenger for the MultichainAccountService.
|
|
14
17
|
*/
|
|
15
|
-
export declare function getMultichainAccountServiceMessenger(
|
|
18
|
+
export declare function getMultichainAccountServiceMessenger(rootMessenger: RootMessenger): MultichainAccountServiceMessenger;
|
|
19
|
+
export {};
|
|
16
20
|
//# sourceMappingURL=messenger.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messenger.d.mts","sourceRoot":"","sources":["../../src/tests/messenger.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"messenger.d.mts","sourceRoot":"","sources":["../../src/tests/messenger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,4BAA4B;AAE7B,OAAO,KAAK,EAAE,iCAAiC,EAAE,qBAAiB;AAElE,KAAK,kCAAkC,GACrC,gBAAgB,CAAC,iCAAiC,CAAC,CAAC;AAEtD,KAAK,iCAAiC,GACpC,eAAe,CAAC,iCAAiC,CAAC,CAAC;AAErD,MAAM,MAAM,aAAa,GAAG,SAAS,CACnC,gBAAgB,EAChB,kCAAkC,EAClC,iCAAiC,CAClC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAIhD;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,aAAa,EAAE,aAAa,GAC3B,iCAAiC,CA+BnC"}
|
package/dist/tests/messenger.mjs
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { Messenger } from "@metamask/
|
|
1
|
+
import { Messenger, MOCK_ANY_NAMESPACE } from "@metamask/messenger";
|
|
2
2
|
/**
|
|
3
|
-
* Creates a
|
|
3
|
+
* Creates and returns a root messenger for testing
|
|
4
4
|
*
|
|
5
|
-
* @returns A
|
|
5
|
+
* @returns A messenger instance
|
|
6
6
|
*/
|
|
7
7
|
export function getRootMessenger() {
|
|
8
|
-
return new Messenger(
|
|
8
|
+
return new Messenger({
|
|
9
|
+
namespace: MOCK_ANY_NAMESPACE,
|
|
10
|
+
});
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* Retrieves a restricted messenger for the MultichainAccountService.
|
|
12
14
|
*
|
|
13
|
-
* @param
|
|
15
|
+
* @param rootMessenger - The root messenger instance. Defaults to a new Messenger created by getRootMessenger().
|
|
14
16
|
* @returns The restricted messenger for the MultichainAccountService.
|
|
15
17
|
*/
|
|
16
|
-
export function getMultichainAccountServiceMessenger(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
allowedActions: [
|
|
18
|
+
export function getMultichainAccountServiceMessenger(rootMessenger) {
|
|
19
|
+
const messenger = new Messenger({
|
|
20
|
+
namespace: 'MultichainAccountService',
|
|
21
|
+
parent: rootMessenger,
|
|
22
|
+
});
|
|
23
|
+
rootMessenger.delegate({
|
|
24
|
+
messenger,
|
|
25
|
+
actions: [
|
|
25
26
|
'AccountsController:getAccount',
|
|
26
27
|
'AccountsController:getAccountByAddress',
|
|
27
28
|
'AccountsController:listMultichainAccounts',
|
|
@@ -33,6 +34,12 @@ export function getMultichainAccountServiceMessenger(messenger) {
|
|
|
33
34
|
'NetworkController:findNetworkClientIdByChainId',
|
|
34
35
|
'NetworkController:getNetworkClientById',
|
|
35
36
|
],
|
|
37
|
+
events: [
|
|
38
|
+
'KeyringController:stateChange',
|
|
39
|
+
'AccountsController:accountAdded',
|
|
40
|
+
'AccountsController:accountRemoved',
|
|
41
|
+
],
|
|
36
42
|
});
|
|
43
|
+
return messenger;
|
|
37
44
|
}
|
|
38
45
|
//# sourceMappingURL=messenger.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messenger.mjs","sourceRoot":"","sources":["../../src/tests/messenger.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"messenger.mjs","sourceRoot":"","sources":["../../src/tests/messenger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,kBAAkB,EAInB,4BAA4B;AAgB7B;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,SAAS,CAAC;QACnB,SAAS,EAAE,kBAAkB;KAC9B,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oCAAoC,CAClD,aAA4B;IAE5B,MAAM,SAAS,GAAG,IAAI,SAAS,CAK7B;QACA,SAAS,EAAE,0BAA0B;QACrC,MAAM,EAAE,aAAa;KACtB,CAAC,CAAC;IACH,aAAa,CAAC,QAAQ,CAAC;QACrB,SAAS;QACT,OAAO,EAAE;YACP,+BAA+B;YAC/B,wCAAwC;YACxC,2CAA2C;YAC3C,8BAA8B;YAC9B,+BAA+B;YAC/B,4BAA4B;YAC5B,qCAAqC;YACrC,iCAAiC;YACjC,gDAAgD;YAChD,wCAAwC;SACzC;QACD,MAAM,EAAE;YACN,+BAA+B;YAC/B,iCAAiC;YACjC,mCAAmC;SACpC;KACF,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import {\n Messenger,\n MOCK_ANY_NAMESPACE,\n type MessengerActions,\n type MessengerEvents,\n type MockAnyNamespace,\n} from '@metamask/messenger';\n\nimport type { MultichainAccountServiceMessenger } from '../types';\n\ntype AllMultichainAccountServiceActions =\n MessengerActions<MultichainAccountServiceMessenger>;\n\ntype AllMultichainAccountServiceEvents =\n MessengerEvents<MultichainAccountServiceMessenger>;\n\nexport type RootMessenger = Messenger<\n MockAnyNamespace,\n AllMultichainAccountServiceActions,\n AllMultichainAccountServiceEvents\n>;\n\n/**\n * Creates and returns a root messenger for testing\n *\n * @returns A messenger instance\n */\nexport function getRootMessenger(): RootMessenger {\n return new Messenger({\n namespace: MOCK_ANY_NAMESPACE,\n });\n}\n\n/**\n * Retrieves a restricted messenger for the MultichainAccountService.\n *\n * @param rootMessenger - The root messenger instance. Defaults to a new Messenger created by getRootMessenger().\n * @returns The restricted messenger for the MultichainAccountService.\n */\nexport function getMultichainAccountServiceMessenger(\n rootMessenger: RootMessenger,\n): MultichainAccountServiceMessenger {\n const messenger = new Messenger<\n 'MultichainAccountService',\n AllMultichainAccountServiceActions,\n AllMultichainAccountServiceEvents,\n RootMessenger\n >({\n namespace: 'MultichainAccountService',\n parent: rootMessenger,\n });\n rootMessenger.delegate({\n messenger,\n actions: [\n 'AccountsController:getAccount',\n 'AccountsController:getAccountByAddress',\n 'AccountsController:listMultichainAccounts',\n 'SnapController:handleRequest',\n 'KeyringController:withKeyring',\n 'KeyringController:getState',\n 'KeyringController:getKeyringsByType',\n 'KeyringController:addNewKeyring',\n 'NetworkController:findNetworkClientIdByChainId',\n 'NetworkController:getNetworkClientById',\n ],\n events: [\n 'KeyringController:stateChange',\n 'AccountsController:accountAdded',\n 'AccountsController:accountRemoved',\n ],\n });\n return messenger;\n}\n"]}
|
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n Bip44Account,\n MultichainAccountGroup,\n MultichainAccountWalletId,\n MultichainAccountWalletStatus,\n} from '@metamask/account-api';\nimport type {\n AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type {
|
|
1
|
+
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n Bip44Account,\n MultichainAccountGroup,\n MultichainAccountWalletId,\n MultichainAccountWalletStatus,\n} from '@metamask/account-api';\nimport type {\n AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type { KeyringAccount } from '@metamask/keyring-api';\nimport type {\n KeyringControllerAddNewKeyringAction,\n KeyringControllerGetKeyringsByTypeAction,\n KeyringControllerGetStateAction,\n KeyringControllerStateChangeEvent,\n KeyringControllerWithKeyringAction,\n} from '@metamask/keyring-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n} from '@metamask/network-controller';\nimport type { HandleSnapRequest as SnapControllerHandleSnapRequestAction } from '@metamask/snaps-controllers';\n\nimport type {\n MultichainAccountService,\n serviceName,\n} from './MultichainAccountService';\n\nexport type MultichainAccountServiceGetMultichainAccountGroupAction = {\n type: `${typeof serviceName}:getMultichainAccountGroup`;\n handler: MultichainAccountService['getMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountGroupsAction = {\n type: `${typeof serviceName}:getMultichainAccountGroups`;\n handler: MultichainAccountService['getMultichainAccountGroups'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletAction = {\n type: `${typeof serviceName}:getMultichainAccountWallet`;\n handler: MultichainAccountService['getMultichainAccountWallet'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletsAction = {\n type: `${typeof serviceName}:getMultichainAccountWallets`;\n handler: MultichainAccountService['getMultichainAccountWallets'];\n};\n\nexport type MultichainAccountServiceCreateNextMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createNextMultichainAccountGroup`;\n handler: MultichainAccountService['createNextMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceCreateMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createMultichainAccountGroup`;\n handler: MultichainAccountService['createMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceSetBasicFunctionalityAction = {\n type: `${typeof serviceName}:setBasicFunctionality`;\n handler: MultichainAccountService['setBasicFunctionality'];\n};\n\nexport type MultichainAccountServiceAlignWalletAction = {\n type: `${typeof serviceName}:alignWallet`;\n handler: MultichainAccountService['alignWallet'];\n};\n\nexport type MultichainAccountServiceAlignWalletsAction = {\n type: `${typeof serviceName}:alignWallets`;\n handler: MultichainAccountService['alignWallets'];\n};\n\nexport type MultichainAccountServiceCreateMultichainAccountWalletAction = {\n type: `${typeof serviceName}:createMultichainAccountWallet`;\n handler: MultichainAccountService['createMultichainAccountWallet'];\n};\n\n/**\n * All actions that {@link MultichainAccountService} registers so that other\n * modules can call them.\n */\nexport type MultichainAccountServiceActions =\n | MultichainAccountServiceGetMultichainAccountGroupAction\n | MultichainAccountServiceGetMultichainAccountGroupsAction\n | MultichainAccountServiceGetMultichainAccountWalletAction\n | MultichainAccountServiceGetMultichainAccountWalletsAction\n | MultichainAccountServiceCreateNextMultichainAccountGroupAction\n | MultichainAccountServiceCreateMultichainAccountGroupAction\n | MultichainAccountServiceSetBasicFunctionalityAction\n | MultichainAccountServiceAlignWalletAction\n | MultichainAccountServiceAlignWalletsAction\n | MultichainAccountServiceCreateMultichainAccountWalletAction;\n\nexport type MultichainAccountServiceMultichainAccountGroupCreatedEvent = {\n type: `${typeof serviceName}:multichainAccountGroupCreated`;\n payload: [MultichainAccountGroup<Bip44Account<KeyringAccount>>];\n};\n\nexport type MultichainAccountServiceMultichainAccountGroupUpdatedEvent = {\n type: `${typeof serviceName}:multichainAccountGroupUpdated`;\n payload: [MultichainAccountGroup<Bip44Account<KeyringAccount>>];\n};\n\nexport type MultichainAccountServiceWalletStatusChangeEvent = {\n type: `${typeof serviceName}:walletStatusChange`;\n payload: [MultichainAccountWalletId, MultichainAccountWalletStatus];\n};\n\n/**\n * All events that {@link MultichainAccountService} publishes so that other modules\n * can subscribe to them.\n */\nexport type MultichainAccountServiceEvents =\n | MultichainAccountServiceMultichainAccountGroupCreatedEvent\n | MultichainAccountServiceMultichainAccountGroupUpdatedEvent\n | MultichainAccountServiceWalletStatusChangeEvent;\n\n/**\n * All actions registered by other modules that {@link MultichainAccountService}\n * calls.\n */\ntype AllowedActions =\n | AccountsControllerListMultichainAccountsAction\n | AccountsControllerGetAccountAction\n | AccountsControllerGetAccountByAddressAction\n | SnapControllerHandleSnapRequestAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerGetStateAction\n | KeyringControllerGetKeyringsByTypeAction\n | KeyringControllerAddNewKeyringAction\n | NetworkControllerGetNetworkClientByIdAction\n | NetworkControllerFindNetworkClientIdByChainIdAction;\n\n/**\n * All events published by other modules that {@link MultichainAccountService}\n * subscribes to.\n */\ntype AllowedEvents =\n | KeyringControllerStateChangeEvent\n | AccountsControllerAccountAddedEvent\n | AccountsControllerAccountRemovedEvent;\n\n/**\n * The messenger restricted to actions and events that\n * {@link MultichainAccountService} needs to access.\n */\nexport type MultichainAccountServiceMessenger = Messenger<\n 'MultichainAccountService',\n MultichainAccountServiceActions | AllowedActions,\n MultichainAccountServiceEvents | AllowedEvents\n>;\n"]}
|
package/dist/types.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Bip44Account, MultichainAccountGroup, MultichainAccountWalletId, MultichainAccountWalletStatus } from "@metamask/account-api";
|
|
2
2
|
import type { AccountsControllerAccountAddedEvent, AccountsControllerAccountRemovedEvent, AccountsControllerGetAccountAction, AccountsControllerGetAccountByAddressAction, AccountsControllerListMultichainAccountsAction } from "@metamask/accounts-controller";
|
|
3
|
-
import type { RestrictedMessenger } from "@metamask/base-controller";
|
|
4
3
|
import type { KeyringAccount } from "@metamask/keyring-api";
|
|
5
4
|
import type { KeyringControllerAddNewKeyringAction, KeyringControllerGetKeyringsByTypeAction, KeyringControllerGetStateAction, KeyringControllerStateChangeEvent, KeyringControllerWithKeyringAction } from "@metamask/keyring-controller";
|
|
5
|
+
import type { Messenger } from "@metamask/messenger";
|
|
6
6
|
import type { NetworkControllerFindNetworkClientIdByChainIdAction, NetworkControllerGetNetworkClientByIdAction } from "@metamask/network-controller";
|
|
7
7
|
import type { HandleSnapRequest as SnapControllerHandleSnapRequestAction } from "@metamask/snaps-controllers";
|
|
8
8
|
import type { MultichainAccountService, serviceName } from "./MultichainAccountService.cjs";
|
|
@@ -72,15 +72,16 @@ export type MultichainAccountServiceEvents = MultichainAccountServiceMultichainA
|
|
|
72
72
|
* All actions registered by other modules that {@link MultichainAccountService}
|
|
73
73
|
* calls.
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
type AllowedActions = AccountsControllerListMultichainAccountsAction | AccountsControllerGetAccountAction | AccountsControllerGetAccountByAddressAction | SnapControllerHandleSnapRequestAction | KeyringControllerWithKeyringAction | KeyringControllerGetStateAction | KeyringControllerGetKeyringsByTypeAction | KeyringControllerAddNewKeyringAction | NetworkControllerGetNetworkClientByIdAction | NetworkControllerFindNetworkClientIdByChainIdAction;
|
|
76
76
|
/**
|
|
77
77
|
* All events published by other modules that {@link MultichainAccountService}
|
|
78
78
|
* subscribes to.
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
type AllowedEvents = KeyringControllerStateChangeEvent | AccountsControllerAccountAddedEvent | AccountsControllerAccountRemovedEvent;
|
|
81
81
|
/**
|
|
82
82
|
* The messenger restricted to actions and events that
|
|
83
83
|
* {@link MultichainAccountService} needs to access.
|
|
84
84
|
*/
|
|
85
|
-
export type MultichainAccountServiceMessenger =
|
|
85
|
+
export type MultichainAccountServiceMessenger = Messenger<'MultichainAccountService', MultichainAccountServiceActions | AllowedActions, MultichainAccountServiceEvents | AllowedEvents>;
|
|
86
|
+
export {};
|
|
86
87
|
//# sourceMappingURL=types.d.cts.map
|
package/dist/types.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,yBAAyB,EACzB,6BAA6B,EAC9B,8BAA8B;AAC/B,OAAO,KAAK,EACV,mCAAmC,EACnC,qCAAqC,EACrC,kCAAkC,EAClC,2CAA2C,EAC3C,8CAA8C,EAC/C,sCAAsC;AACvC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,yBAAyB,EACzB,6BAA6B,EAC9B,8BAA8B;AAC/B,OAAO,KAAK,EACV,mCAAmC,EACnC,qCAAqC,EACrC,kCAAkC,EAClC,2CAA2C,EAC3C,8CAA8C,EAC/C,sCAAsC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA8B;AAC5D,OAAO,KAAK,EACV,oCAAoC,EACpC,wCAAwC,EACxC,+BAA+B,EAC/B,iCAAiC,EACjC,kCAAkC,EACnC,qCAAqC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B;AACrD,OAAO,KAAK,EACV,mDAAmD,EACnD,2CAA2C,EAC5C,qCAAqC;AACtC,OAAO,KAAK,EAAE,iBAAiB,IAAI,qCAAqC,EAAE,oCAAoC;AA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AwC,GACxC,oCAAoC,GACpC,2CAA2C,GAC3C,mDAAmD,CAAC;AAExD;;;GAGG;AACH,KAAK,aAAa,GACd,iCAAiC,GACjC,mCAAmC,GACnC,qCAAqC,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,iCAAiC,GAAG,SAAS,CACvD,0BAA0B,EAC1B,+BAA+B,GAAG,cAAc,EAChD,8BAA8B,GAAG,aAAa,CAC/C,CAAC"}
|
package/dist/types.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Bip44Account, MultichainAccountGroup, MultichainAccountWalletId, MultichainAccountWalletStatus } from "@metamask/account-api";
|
|
2
2
|
import type { AccountsControllerAccountAddedEvent, AccountsControllerAccountRemovedEvent, AccountsControllerGetAccountAction, AccountsControllerGetAccountByAddressAction, AccountsControllerListMultichainAccountsAction } from "@metamask/accounts-controller";
|
|
3
|
-
import type { RestrictedMessenger } from "@metamask/base-controller";
|
|
4
3
|
import type { KeyringAccount } from "@metamask/keyring-api";
|
|
5
4
|
import type { KeyringControllerAddNewKeyringAction, KeyringControllerGetKeyringsByTypeAction, KeyringControllerGetStateAction, KeyringControllerStateChangeEvent, KeyringControllerWithKeyringAction } from "@metamask/keyring-controller";
|
|
5
|
+
import type { Messenger } from "@metamask/messenger";
|
|
6
6
|
import type { NetworkControllerFindNetworkClientIdByChainIdAction, NetworkControllerGetNetworkClientByIdAction } from "@metamask/network-controller";
|
|
7
7
|
import type { HandleSnapRequest as SnapControllerHandleSnapRequestAction } from "@metamask/snaps-controllers";
|
|
8
8
|
import type { MultichainAccountService, serviceName } from "./MultichainAccountService.mjs";
|
|
@@ -72,15 +72,16 @@ export type MultichainAccountServiceEvents = MultichainAccountServiceMultichainA
|
|
|
72
72
|
* All actions registered by other modules that {@link MultichainAccountService}
|
|
73
73
|
* calls.
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
type AllowedActions = AccountsControllerListMultichainAccountsAction | AccountsControllerGetAccountAction | AccountsControllerGetAccountByAddressAction | SnapControllerHandleSnapRequestAction | KeyringControllerWithKeyringAction | KeyringControllerGetStateAction | KeyringControllerGetKeyringsByTypeAction | KeyringControllerAddNewKeyringAction | NetworkControllerGetNetworkClientByIdAction | NetworkControllerFindNetworkClientIdByChainIdAction;
|
|
76
76
|
/**
|
|
77
77
|
* All events published by other modules that {@link MultichainAccountService}
|
|
78
78
|
* subscribes to.
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
type AllowedEvents = KeyringControllerStateChangeEvent | AccountsControllerAccountAddedEvent | AccountsControllerAccountRemovedEvent;
|
|
81
81
|
/**
|
|
82
82
|
* The messenger restricted to actions and events that
|
|
83
83
|
* {@link MultichainAccountService} needs to access.
|
|
84
84
|
*/
|
|
85
|
-
export type MultichainAccountServiceMessenger =
|
|
85
|
+
export type MultichainAccountServiceMessenger = Messenger<'MultichainAccountService', MultichainAccountServiceActions | AllowedActions, MultichainAccountServiceEvents | AllowedEvents>;
|
|
86
|
+
export {};
|
|
86
87
|
//# sourceMappingURL=types.d.mts.map
|
package/dist/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,yBAAyB,EACzB,6BAA6B,EAC9B,8BAA8B;AAC/B,OAAO,KAAK,EACV,mCAAmC,EACnC,qCAAqC,EACrC,kCAAkC,EAClC,2CAA2C,EAC3C,8CAA8C,EAC/C,sCAAsC;AACvC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,yBAAyB,EACzB,6BAA6B,EAC9B,8BAA8B;AAC/B,OAAO,KAAK,EACV,mCAAmC,EACnC,qCAAqC,EACrC,kCAAkC,EAClC,2CAA2C,EAC3C,8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C5D,IAAI,EAAE,GAAG,OAAO,WAAW,qBAAqB,CAAC;IACjD,OAAO,EAAE,CAAC,yBAAyB,EAAE,6BAA6B,CAAC,CAAC;CACrE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GACtC,0DAA0D,GAC1D,0DAA0D,GAC1D,+CAA+C,CAAC;AAEpD;;;GAGG;AACH,KAAK,cAAc,GACf,8CAA8C,GAC9C,kCAAkC,GAClC,2CAA2C,GAC3C,qCAAqC,GACrC,kCAAkC,GAClC,+BAA+B,GAC/B,wCAAwC,GACxC,oCAAoC,GACpC,2CAA2C,GAC3C,mDAAmD,CAAC;AAExD;;;GAGG;AACH,KAAK,aAAa,GACd,iCAAiC,GACjC,mCAAmC,GACnC,qCAAqC,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,iCAAiC,GAAG,SAAS,CACvD,0BAA0B,EAC1B,+BAA+B,GAAG,cAAc,EAChD,8BAA8B,GAAG,aAAa,CAC/C,CAAC"}
|
package/dist/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n Bip44Account,\n MultichainAccountGroup,\n MultichainAccountWalletId,\n MultichainAccountWalletStatus,\n} from '@metamask/account-api';\nimport type {\n AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type {
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n Bip44Account,\n MultichainAccountGroup,\n MultichainAccountWalletId,\n MultichainAccountWalletStatus,\n} from '@metamask/account-api';\nimport type {\n AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type { KeyringAccount } from '@metamask/keyring-api';\nimport type {\n KeyringControllerAddNewKeyringAction,\n KeyringControllerGetKeyringsByTypeAction,\n KeyringControllerGetStateAction,\n KeyringControllerStateChangeEvent,\n KeyringControllerWithKeyringAction,\n} from '@metamask/keyring-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n} from '@metamask/network-controller';\nimport type { HandleSnapRequest as SnapControllerHandleSnapRequestAction } from '@metamask/snaps-controllers';\n\nimport type {\n MultichainAccountService,\n serviceName,\n} from './MultichainAccountService';\n\nexport type MultichainAccountServiceGetMultichainAccountGroupAction = {\n type: `${typeof serviceName}:getMultichainAccountGroup`;\n handler: MultichainAccountService['getMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountGroupsAction = {\n type: `${typeof serviceName}:getMultichainAccountGroups`;\n handler: MultichainAccountService['getMultichainAccountGroups'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletAction = {\n type: `${typeof serviceName}:getMultichainAccountWallet`;\n handler: MultichainAccountService['getMultichainAccountWallet'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletsAction = {\n type: `${typeof serviceName}:getMultichainAccountWallets`;\n handler: MultichainAccountService['getMultichainAccountWallets'];\n};\n\nexport type MultichainAccountServiceCreateNextMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createNextMultichainAccountGroup`;\n handler: MultichainAccountService['createNextMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceCreateMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createMultichainAccountGroup`;\n handler: MultichainAccountService['createMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceSetBasicFunctionalityAction = {\n type: `${typeof serviceName}:setBasicFunctionality`;\n handler: MultichainAccountService['setBasicFunctionality'];\n};\n\nexport type MultichainAccountServiceAlignWalletAction = {\n type: `${typeof serviceName}:alignWallet`;\n handler: MultichainAccountService['alignWallet'];\n};\n\nexport type MultichainAccountServiceAlignWalletsAction = {\n type: `${typeof serviceName}:alignWallets`;\n handler: MultichainAccountService['alignWallets'];\n};\n\nexport type MultichainAccountServiceCreateMultichainAccountWalletAction = {\n type: `${typeof serviceName}:createMultichainAccountWallet`;\n handler: MultichainAccountService['createMultichainAccountWallet'];\n};\n\n/**\n * All actions that {@link MultichainAccountService} registers so that other\n * modules can call them.\n */\nexport type MultichainAccountServiceActions =\n | MultichainAccountServiceGetMultichainAccountGroupAction\n | MultichainAccountServiceGetMultichainAccountGroupsAction\n | MultichainAccountServiceGetMultichainAccountWalletAction\n | MultichainAccountServiceGetMultichainAccountWalletsAction\n | MultichainAccountServiceCreateNextMultichainAccountGroupAction\n | MultichainAccountServiceCreateMultichainAccountGroupAction\n | MultichainAccountServiceSetBasicFunctionalityAction\n | MultichainAccountServiceAlignWalletAction\n | MultichainAccountServiceAlignWalletsAction\n | MultichainAccountServiceCreateMultichainAccountWalletAction;\n\nexport type MultichainAccountServiceMultichainAccountGroupCreatedEvent = {\n type: `${typeof serviceName}:multichainAccountGroupCreated`;\n payload: [MultichainAccountGroup<Bip44Account<KeyringAccount>>];\n};\n\nexport type MultichainAccountServiceMultichainAccountGroupUpdatedEvent = {\n type: `${typeof serviceName}:multichainAccountGroupUpdated`;\n payload: [MultichainAccountGroup<Bip44Account<KeyringAccount>>];\n};\n\nexport type MultichainAccountServiceWalletStatusChangeEvent = {\n type: `${typeof serviceName}:walletStatusChange`;\n payload: [MultichainAccountWalletId, MultichainAccountWalletStatus];\n};\n\n/**\n * All events that {@link MultichainAccountService} publishes so that other modules\n * can subscribe to them.\n */\nexport type MultichainAccountServiceEvents =\n | MultichainAccountServiceMultichainAccountGroupCreatedEvent\n | MultichainAccountServiceMultichainAccountGroupUpdatedEvent\n | MultichainAccountServiceWalletStatusChangeEvent;\n\n/**\n * All actions registered by other modules that {@link MultichainAccountService}\n * calls.\n */\ntype AllowedActions =\n | AccountsControllerListMultichainAccountsAction\n | AccountsControllerGetAccountAction\n | AccountsControllerGetAccountByAddressAction\n | SnapControllerHandleSnapRequestAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerGetStateAction\n | KeyringControllerGetKeyringsByTypeAction\n | KeyringControllerAddNewKeyringAction\n | NetworkControllerGetNetworkClientByIdAction\n | NetworkControllerFindNetworkClientIdByChainIdAction;\n\n/**\n * All events published by other modules that {@link MultichainAccountService}\n * subscribes to.\n */\ntype AllowedEvents =\n | KeyringControllerStateChangeEvent\n | AccountsControllerAccountAddedEvent\n | AccountsControllerAccountRemovedEvent;\n\n/**\n * The messenger restricted to actions and events that\n * {@link MultichainAccountService} needs to access.\n */\nexport type MultichainAccountServiceMessenger = Messenger<\n 'MultichainAccountService',\n MultichainAccountServiceActions | AllowedActions,\n MultichainAccountServiceEvents | AllowedEvents\n>;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/multichain-account-service",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-preview-46d2c977",
|
|
4
4
|
"description": "Service to manage multichain accounts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -48,13 +48,14 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@ethereumjs/util": "^9.1.0",
|
|
51
|
-
"@metamask/base-controller": "^
|
|
52
|
-
"@metamask/eth-snap-keyring": "^
|
|
51
|
+
"@metamask/base-controller": "^9.0.0",
|
|
52
|
+
"@metamask/eth-snap-keyring": "^18.0.0",
|
|
53
53
|
"@metamask/key-tree": "^10.1.1",
|
|
54
54
|
"@metamask/keyring-api": "^21.0.0",
|
|
55
55
|
"@metamask/keyring-internal-api": "^9.0.0",
|
|
56
56
|
"@metamask/keyring-snap-client": "^8.0.0",
|
|
57
57
|
"@metamask/keyring-utils": "^3.1.0",
|
|
58
|
+
"@metamask/messenger": "^0.3.0",
|
|
58
59
|
"@metamask/snaps-sdk": "^9.0.0",
|
|
59
60
|
"@metamask/snaps-utils": "^11.0.0",
|
|
60
61
|
"@metamask/superstruct": "^3.1.0",
|
|
@@ -63,10 +64,10 @@
|
|
|
63
64
|
},
|
|
64
65
|
"devDependencies": {
|
|
65
66
|
"@metamask/account-api": "^0.12.0",
|
|
66
|
-
"@metamask/accounts-controller": "^
|
|
67
|
+
"@metamask/accounts-controller": "^34.0.0",
|
|
67
68
|
"@metamask/auto-changelog": "^3.4.4",
|
|
68
69
|
"@metamask/eth-hd-keyring": "^13.0.0",
|
|
69
|
-
"@metamask/keyring-controller": "^
|
|
70
|
+
"@metamask/keyring-controller": "^24.0.0",
|
|
70
71
|
"@metamask/providers": "^22.1.0",
|
|
71
72
|
"@metamask/snaps-controllers": "^14.0.1",
|
|
72
73
|
"@types/jest": "^27.4.1",
|
|
@@ -82,8 +83,8 @@
|
|
|
82
83
|
},
|
|
83
84
|
"peerDependencies": {
|
|
84
85
|
"@metamask/account-api": "^0.12.0",
|
|
85
|
-
"@metamask/accounts-controller": "^
|
|
86
|
-
"@metamask/keyring-controller": "^
|
|
86
|
+
"@metamask/accounts-controller": "^34.0.0",
|
|
87
|
+
"@metamask/keyring-controller": "^24.0.0",
|
|
87
88
|
"@metamask/providers": "^22.0.0",
|
|
88
89
|
"@metamask/snaps-controllers": "^14.0.0",
|
|
89
90
|
"webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0"
|