@metamask/multichain-account-service 10.0.3 → 11.1.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 +43 -2
- package/dist/MultichainAccountGroup.cjs +15 -0
- package/dist/MultichainAccountGroup.cjs.map +1 -1
- package/dist/MultichainAccountGroup.d.cts +10 -0
- package/dist/MultichainAccountGroup.d.cts.map +1 -1
- package/dist/MultichainAccountGroup.d.mts +10 -0
- package/dist/MultichainAccountGroup.d.mts.map +1 -1
- package/dist/MultichainAccountGroup.mjs +15 -0
- package/dist/MultichainAccountGroup.mjs.map +1 -1
- package/dist/MultichainAccountService-method-action-types.cjs.map +1 -1
- package/dist/MultichainAccountService-method-action-types.d.cts +10 -6
- package/dist/MultichainAccountService-method-action-types.d.cts.map +1 -1
- package/dist/MultichainAccountService-method-action-types.d.mts +10 -6
- package/dist/MultichainAccountService-method-action-types.d.mts.map +1 -1
- package/dist/MultichainAccountService-method-action-types.mjs.map +1 -1
- package/dist/MultichainAccountService.cjs +67 -8
- package/dist/MultichainAccountService.cjs.map +1 -1
- package/dist/MultichainAccountService.d.cts +31 -7
- package/dist/MultichainAccountService.d.cts.map +1 -1
- package/dist/MultichainAccountService.d.mts +31 -7
- package/dist/MultichainAccountService.d.mts.map +1 -1
- package/dist/MultichainAccountService.mjs +67 -8
- package/dist/MultichainAccountService.mjs.map +1 -1
- package/dist/MultichainAccountWallet.cjs +20 -0
- package/dist/MultichainAccountWallet.cjs.map +1 -1
- package/dist/MultichainAccountWallet.d.cts +10 -0
- package/dist/MultichainAccountWallet.d.cts.map +1 -1
- package/dist/MultichainAccountWallet.d.mts +10 -0
- package/dist/MultichainAccountWallet.d.mts.map +1 -1
- package/dist/MultichainAccountWallet.mjs +20 -0
- package/dist/MultichainAccountWallet.mjs.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/providers/AccountProviderWrapper.cjs +43 -0
- package/dist/providers/AccountProviderWrapper.cjs.map +1 -1
- package/dist/providers/AccountProviderWrapper.d.cts +37 -0
- package/dist/providers/AccountProviderWrapper.d.cts.map +1 -1
- package/dist/providers/AccountProviderWrapper.d.mts +37 -0
- package/dist/providers/AccountProviderWrapper.d.mts.map +1 -1
- package/dist/providers/AccountProviderWrapper.mjs +43 -0
- package/dist/providers/AccountProviderWrapper.mjs.map +1 -1
- package/dist/providers/BaseBip44AccountProvider.cjs +3 -18
- package/dist/providers/BaseBip44AccountProvider.cjs.map +1 -1
- package/dist/providers/BaseBip44AccountProvider.d.cts +36 -16
- package/dist/providers/BaseBip44AccountProvider.d.cts.map +1 -1
- package/dist/providers/BaseBip44AccountProvider.d.mts +36 -16
- package/dist/providers/BaseBip44AccountProvider.d.mts.map +1 -1
- package/dist/providers/BaseBip44AccountProvider.mjs +3 -18
- package/dist/providers/BaseBip44AccountProvider.mjs.map +1 -1
- package/dist/providers/EvmAccountProvider.cjs +19 -0
- package/dist/providers/EvmAccountProvider.cjs.map +1 -1
- package/dist/providers/EvmAccountProvider.d.cts +12 -0
- package/dist/providers/EvmAccountProvider.d.cts.map +1 -1
- package/dist/providers/EvmAccountProvider.d.mts +12 -0
- package/dist/providers/EvmAccountProvider.d.mts.map +1 -1
- package/dist/providers/EvmAccountProvider.mjs +19 -0
- package/dist/providers/EvmAccountProvider.mjs.map +1 -1
- package/dist/providers/SnapAccountProvider.cjs +28 -11
- package/dist/providers/SnapAccountProvider.cjs.map +1 -1
- package/dist/providers/SnapAccountProvider.d.cts +16 -4
- package/dist/providers/SnapAccountProvider.d.cts.map +1 -1
- package/dist/providers/SnapAccountProvider.d.mts +16 -4
- package/dist/providers/SnapAccountProvider.d.mts.map +1 -1
- package/dist/providers/SnapAccountProvider.mjs +28 -11
- package/dist/providers/SnapAccountProvider.mjs.map +1 -1
- package/dist/providers/XlmAccountProvider.cjs +83 -0
- package/dist/providers/XlmAccountProvider.cjs.map +1 -0
- package/dist/providers/XlmAccountProvider.d.cts +29 -0
- package/dist/providers/XlmAccountProvider.d.cts.map +1 -0
- package/dist/providers/XlmAccountProvider.d.mts +29 -0
- package/dist/providers/XlmAccountProvider.d.mts.map +1 -0
- package/dist/providers/XlmAccountProvider.mjs +79 -0
- package/dist/providers/XlmAccountProvider.mjs.map +1 -0
- package/dist/providers/index.cjs +1 -0
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.d.cts +1 -0
- package/dist/providers/index.d.cts.map +1 -1
- package/dist/providers/index.d.mts +1 -0
- package/dist/providers/index.d.mts.map +1 -1
- package/dist/providers/index.mjs +1 -0
- package/dist/providers/index.mjs.map +1 -1
- package/dist/tests/accounts.cjs +29 -1
- package/dist/tests/accounts.cjs.map +1 -1
- package/dist/tests/accounts.d.cts +2 -0
- package/dist/tests/accounts.d.cts.map +1 -1
- package/dist/tests/accounts.d.mts +2 -0
- package/dist/tests/accounts.d.mts.map +1 -1
- package/dist/tests/accounts.mjs +29 -1
- package/dist/tests/accounts.mjs.map +1 -1
- package/dist/tests/providers.cjs +5 -0
- package/dist/tests/providers.cjs.map +1 -1
- package/dist/tests/providers.d.cts +2 -0
- package/dist/tests/providers.d.cts.map +1 -1
- package/dist/tests/providers.d.mts +2 -0
- package/dist/tests/providers.d.mts.map +1 -1
- package/dist/tests/providers.mjs +6 -1
- package/dist/tests/providers.mjs.map +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +14 -1
- package/dist/utils.d.cts.map +1 -1
- package/dist/utils.d.mts +14 -1
- package/dist/utils.d.mts.map +1 -1
- package/dist/utils.mjs.map +1 -1
- package/package.json +9 -9
package/dist/tests/providers.cjs
CHANGED
|
@@ -13,6 +13,7 @@ function makeMockAccountProvider(accounts = []) {
|
|
|
13
13
|
keyring_api_1.SolScope.Testnet,
|
|
14
14
|
keyring_api_1.BtcScope.Testnet,
|
|
15
15
|
keyring_api_1.TrxScope.Shasta,
|
|
16
|
+
keyring_api_1.XlmScope.Testnet,
|
|
16
17
|
keyring_api_1.EthScope.Eoa,
|
|
17
18
|
],
|
|
18
19
|
bip44: { deriveIndex: true },
|
|
@@ -24,8 +25,10 @@ function makeMockAccountProvider(accounts = []) {
|
|
|
24
25
|
getAccount: jest.fn(),
|
|
25
26
|
getAccounts: jest.fn(),
|
|
26
27
|
createAccounts: jest.fn(),
|
|
28
|
+
deleteAccount: jest.fn(),
|
|
27
29
|
discoverAccounts: jest.fn(),
|
|
28
30
|
isAccountCompatible: jest.fn(),
|
|
31
|
+
isAligned: jest.fn().mockReturnValue(false),
|
|
29
32
|
getName: jest.fn(),
|
|
30
33
|
isDisabled: jest.fn(),
|
|
31
34
|
setEnabled: jest.fn(),
|
|
@@ -53,6 +56,8 @@ function setupBip44AccountProvider({ name = 'Mocked Provider', accounts, mocks =
|
|
|
53
56
|
mocks.init.mockImplementation((accountIds) => {
|
|
54
57
|
accountIds.forEach((id) => mocks.accounts.add(id));
|
|
55
58
|
});
|
|
59
|
+
mocks.isAligned.mockImplementation((_context, accountIds) => accountIds.length >= 1 &&
|
|
60
|
+
accountIds.every((id) => mocks.accounts.has(id)));
|
|
56
61
|
if (index === 0) {
|
|
57
62
|
// Make the first provider to always be an `EvmAccountProvider`, since we
|
|
58
63
|
// check for this pre-condition in some methods.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.cjs","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"providers.cjs","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";;;AACA,uDAM+B;AAI/B,sDAA0E;AAwB1E,SAAgB,uBAAuB,CACrC,WAA6B,EAAE;IAE/B,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,QAAQ,EAAE,IAAI,GAAG,EAAE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H,SAAgB,sBAAsB,CAAC,EACrC,IAAI,GAAG,CAAC,EACR,EAAE,GACc;IAChB,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;AACnE,CAAC;AALD,wDAKC","sourcesContent":["import type { Bip44Account } from '@metamask/account-api';\nimport {\n BtcScope,\n EthScope,\n SolScope,\n TrxScope,\n XlmScope,\n} from '@metamask/keyring-api';\nimport type { KeyringAccount } from '@metamask/keyring-api';\nimport type { KeyringCapabilities } from '@metamask/keyring-api/v2';\n\nimport { AccountProviderWrapper, EvmAccountProvider } from '../providers';\nimport { GroupIndexRange } from '../utils';\n\nexport type MockAccountProvider = {\n mockAccounts: KeyringAccount[];\n accounts: Set<KeyringAccount['id']>;\n capabilities: KeyringCapabilities;\n constructor: jest.Mock;\n alignAccounts: jest.Mock;\n init: jest.Mock;\n resyncAccounts: jest.Mock;\n getAccount: jest.Mock;\n getAccounts: jest.Mock;\n createAccounts: jest.Mock;\n deleteAccount: jest.Mock;\n discoverAccounts: jest.Mock;\n isAccountCompatible: jest.Mock;\n isAligned: jest.Mock;\n getName: jest.Mock;\n isEnabled: boolean;\n isDisabled: jest.Mock;\n setEnabled: jest.Mock;\n};\n\nexport function makeMockAccountProvider(\n accounts: KeyringAccount[] = [],\n): MockAccountProvider {\n return {\n mockAccounts: accounts,\n accounts: new Set(),\n capabilities: {\n scopes: [\n SolScope.Devnet,\n SolScope.Testnet,\n BtcScope.Testnet,\n TrxScope.Shasta,\n XlmScope.Testnet,\n EthScope.Eoa,\n ],\n bip44: { deriveIndex: true },\n },\n constructor: jest.fn(),\n alignAccounts: jest.fn(),\n init: jest.fn(),\n resyncAccounts: jest.fn(),\n getAccount: jest.fn(),\n getAccounts: jest.fn(),\n createAccounts: jest.fn(),\n deleteAccount: jest.fn(),\n discoverAccounts: jest.fn(),\n isAccountCompatible: jest.fn(),\n isAligned: jest.fn().mockReturnValue(false),\n getName: jest.fn(),\n isDisabled: jest.fn(),\n setEnabled: jest.fn(),\n isEnabled: true,\n };\n}\n\nexport function setupBip44AccountProvider({\n name = 'Mocked Provider',\n accounts,\n mocks = makeMockAccountProvider(),\n index,\n}: {\n name?: string;\n mocks?: MockAccountProvider;\n accounts: KeyringAccount[];\n filter?: (account: KeyringAccount) => boolean;\n index?: number;\n}): MockAccountProvider {\n // You can mock this and all other mocks will re-use that list\n // of accounts.\n mocks.mockAccounts = accounts;\n mocks.accounts = new Set(accounts.map((account) => account.id));\n // Toggle enabled state only\n mocks.setEnabled.mockImplementation((enabled: boolean) => {\n mocks.isEnabled = enabled;\n });\n mocks.isDisabled.mockImplementation(() => !mocks.isEnabled);\n\n const getAccounts = (): KeyringAccount[] =>\n mocks.mockAccounts.filter((account) =>\n [...mocks.accounts].includes(account.id),\n );\n\n mocks.getName.mockImplementation(() => name);\n\n mocks.getAccounts.mockImplementation(getAccounts);\n mocks.getAccount.mockImplementation(\n (id: Bip44Account<KeyringAccount>['id']) =>\n // Assuming this never fails.\n getAccounts().find((account) => account.id === id),\n );\n mocks.createAccounts.mockResolvedValue([]);\n mocks.init.mockImplementation(\n (accountIds: Bip44Account<KeyringAccount>['id'][]) => {\n accountIds.forEach((id) => mocks.accounts.add(id));\n },\n );\n\n mocks.isAligned.mockImplementation(\n (\n _context: { entropySource: string; groupIndex: number },\n accountIds: string[],\n ) =>\n accountIds.length >= 1 &&\n accountIds.every((id) => mocks.accounts.has(id)),\n );\n\n if (index === 0) {\n // Make the first provider to always be an `EvmAccountProvider`, since we\n // check for this pre-condition in some methods.\n Object.setPrototypeOf(mocks, EvmAccountProvider.prototype);\n }\n\n if (index !== 0) {\n Object.setPrototypeOf(mocks, AccountProviderWrapper.prototype);\n }\n\n return mocks;\n}\n\n/**\n * Helper to mock a single createAccounts call while updating the provider's\n * internal state so subsequent getAccount/getAccounts can resolve the accounts.\n *\n * @param provider - The mock provider whose createAccounts call to mock.\n * @param created - The accounts to be returned and persisted in the mock state.\n */\nexport function mockCreateAccountsOnce(\n provider: MockAccountProvider,\n created: KeyringAccount[],\n): void {\n provider.createAccounts.mockImplementationOnce(async () => {\n // Add newly created accounts to the provider's internal store\n for (const acc of created) {\n if (!provider.mockAccounts.some((a) => a.id === acc.id)) {\n provider.mockAccounts.push(acc);\n }\n }\n // Merge IDs into the visible list used by getAccounts/getAccount\n const ids = created.map((a) => a.id);\n for (const id of ids) {\n provider.accounts.add(id);\n }\n\n return created;\n });\n}\n\n/**\n * Helper to convert a group index range to an array of group indices, inclusive of the\n * start and end indices.\n *\n * @param range - The range.\n * @param range.from - The starting index of the range (inclusive).\n * @param range.to - The ending index of the range (inclusive).\n * @returns An array of group indices from `from` to `to`, inclusive.\n */\nexport function toGroupIndexRangeArray({\n from = 0,\n to,\n}: GroupIndexRange): number[] {\n return Array.from({ length: to - from + 1 }, (_, i) => from + i);\n}\n"]}
|
|
@@ -13,8 +13,10 @@ export type MockAccountProvider = {
|
|
|
13
13
|
getAccount: jest.Mock;
|
|
14
14
|
getAccounts: jest.Mock;
|
|
15
15
|
createAccounts: jest.Mock;
|
|
16
|
+
deleteAccount: jest.Mock;
|
|
16
17
|
discoverAccounts: jest.Mock;
|
|
17
18
|
isAccountCompatible: jest.Mock;
|
|
19
|
+
isAligned: jest.Mock;
|
|
18
20
|
getName: jest.Mock;
|
|
19
21
|
isEnabled: boolean;
|
|
20
22
|
isDisabled: jest.Mock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.cts","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"providers.d.cts","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA8B;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,iCAAiC;AAGpE,OAAO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G,mBAAmB,CAmDtB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,cAAc,EAAE,GACxB,IAAI,CAgBN;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,IAAQ,EACR,EAAE,GACH,EAAE,eAAe,GAAG,MAAM,EAAE,CAE5B"}
|
|
@@ -13,8 +13,10 @@ export type MockAccountProvider = {
|
|
|
13
13
|
getAccount: jest.Mock;
|
|
14
14
|
getAccounts: jest.Mock;
|
|
15
15
|
createAccounts: jest.Mock;
|
|
16
|
+
deleteAccount: jest.Mock;
|
|
16
17
|
discoverAccounts: jest.Mock;
|
|
17
18
|
isAccountCompatible: jest.Mock;
|
|
19
|
+
isAligned: jest.Mock;
|
|
18
20
|
getName: jest.Mock;
|
|
19
21
|
isEnabled: boolean;
|
|
20
22
|
isDisabled: jest.Mock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.mts","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"providers.d.mts","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA8B;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,iCAAiC;AAGpE,OAAO,EAAE,eAAe,EAAE,qBAAiB;AAE3C,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,QAAQ,EAAE,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;IACpC,YAAY,EAAE,mBAAmB,CAAC;IAClC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC;IACvB,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC;IACzB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC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1
|
+
import { BtcScope, EthScope, SolScope, TrxScope, XlmScope } from "@metamask/keyring-api";
|
|
2
2
|
import { AccountProviderWrapper, EvmAccountProvider } from "../providers/index.mjs";
|
|
3
3
|
export function makeMockAccountProvider(accounts = []) {
|
|
4
4
|
return {
|
|
@@ -10,6 +10,7 @@ export function makeMockAccountProvider(accounts = []) {
|
|
|
10
10
|
SolScope.Testnet,
|
|
11
11
|
BtcScope.Testnet,
|
|
12
12
|
TrxScope.Shasta,
|
|
13
|
+
XlmScope.Testnet,
|
|
13
14
|
EthScope.Eoa,
|
|
14
15
|
],
|
|
15
16
|
bip44: { deriveIndex: true },
|
|
@@ -21,8 +22,10 @@ export function makeMockAccountProvider(accounts = []) {
|
|
|
21
22
|
getAccount: jest.fn(),
|
|
22
23
|
getAccounts: jest.fn(),
|
|
23
24
|
createAccounts: jest.fn(),
|
|
25
|
+
deleteAccount: jest.fn(),
|
|
24
26
|
discoverAccounts: jest.fn(),
|
|
25
27
|
isAccountCompatible: jest.fn(),
|
|
28
|
+
isAligned: jest.fn().mockReturnValue(false),
|
|
26
29
|
getName: jest.fn(),
|
|
27
30
|
isDisabled: jest.fn(),
|
|
28
31
|
setEnabled: jest.fn(),
|
|
@@ -49,6 +52,8 @@ export function setupBip44AccountProvider({ name = 'Mocked Provider', accounts,
|
|
|
49
52
|
mocks.init.mockImplementation((accountIds) => {
|
|
50
53
|
accountIds.forEach((id) => mocks.accounts.add(id));
|
|
51
54
|
});
|
|
55
|
+
mocks.isAligned.mockImplementation((_context, accountIds) => accountIds.length >= 1 &&
|
|
56
|
+
accountIds.every((id) => mocks.accounts.has(id)));
|
|
52
57
|
if (index === 0) {
|
|
53
58
|
// Make the first provider to always be an `EvmAccountProvider`, since we
|
|
54
59
|
// check for this pre-condition in some methods.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.mjs","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3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C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACrC,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;YACrB,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5B,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,EACrC,IAAI,GAAG,CAAC,EACR,EAAE,GACc;IAChB,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;AACnE,CAAC","sourcesContent":["import type { Bip44Account } from '@metamask/account-api';\nimport {\n BtcScope,\n EthScope,\n SolScope,\n TrxScope,\n XlmScope,\n} from '@metamask/keyring-api';\nimport type { KeyringAccount } from '@metamask/keyring-api';\nimport type { KeyringCapabilities } from '@metamask/keyring-api/v2';\n\nimport { AccountProviderWrapper, EvmAccountProvider } from '../providers';\nimport { GroupIndexRange } from '../utils';\n\nexport type MockAccountProvider = {\n mockAccounts: KeyringAccount[];\n accounts: Set<KeyringAccount['id']>;\n capabilities: KeyringCapabilities;\n constructor: jest.Mock;\n alignAccounts: jest.Mock;\n init: jest.Mock;\n resyncAccounts: jest.Mock;\n getAccount: jest.Mock;\n getAccounts: jest.Mock;\n createAccounts: jest.Mock;\n deleteAccount: jest.Mock;\n discoverAccounts: jest.Mock;\n isAccountCompatible: jest.Mock;\n isAligned: jest.Mock;\n getName: jest.Mock;\n isEnabled: boolean;\n isDisabled: jest.Mock;\n setEnabled: jest.Mock;\n};\n\nexport function makeMockAccountProvider(\n accounts: KeyringAccount[] = [],\n): MockAccountProvider {\n return {\n mockAccounts: accounts,\n accounts: new Set(),\n capabilities: {\n scopes: [\n SolScope.Devnet,\n SolScope.Testnet,\n BtcScope.Testnet,\n TrxScope.Shasta,\n XlmScope.Testnet,\n EthScope.Eoa,\n ],\n bip44: { deriveIndex: true },\n },\n constructor: jest.fn(),\n alignAccounts: jest.fn(),\n init: jest.fn(),\n resyncAccounts: jest.fn(),\n getAccount: jest.fn(),\n getAccounts: jest.fn(),\n createAccounts: jest.fn(),\n deleteAccount: jest.fn(),\n discoverAccounts: jest.fn(),\n isAccountCompatible: jest.fn(),\n isAligned: jest.fn().mockReturnValue(false),\n getName: jest.fn(),\n isDisabled: jest.fn(),\n setEnabled: jest.fn(),\n isEnabled: true,\n };\n}\n\nexport function setupBip44AccountProvider({\n name = 'Mocked Provider',\n accounts,\n mocks = makeMockAccountProvider(),\n index,\n}: {\n name?: string;\n mocks?: MockAccountProvider;\n accounts: KeyringAccount[];\n filter?: (account: KeyringAccount) => boolean;\n index?: number;\n}): MockAccountProvider {\n // You can mock this and all other mocks will re-use that list\n // of accounts.\n mocks.mockAccounts = accounts;\n mocks.accounts = new Set(accounts.map((account) => account.id));\n // Toggle enabled state only\n mocks.setEnabled.mockImplementation((enabled: boolean) => {\n mocks.isEnabled = enabled;\n });\n mocks.isDisabled.mockImplementation(() => !mocks.isEnabled);\n\n const getAccounts = (): KeyringAccount[] =>\n mocks.mockAccounts.filter((account) =>\n [...mocks.accounts].includes(account.id),\n );\n\n mocks.getName.mockImplementation(() => name);\n\n mocks.getAccounts.mockImplementation(getAccounts);\n mocks.getAccount.mockImplementation(\n (id: Bip44Account<KeyringAccount>['id']) =>\n // Assuming this never fails.\n getAccounts().find((account) => account.id === id),\n );\n mocks.createAccounts.mockResolvedValue([]);\n mocks.init.mockImplementation(\n (accountIds: Bip44Account<KeyringAccount>['id'][]) => {\n accountIds.forEach((id) => mocks.accounts.add(id));\n },\n );\n\n mocks.isAligned.mockImplementation(\n (\n _context: { entropySource: string; groupIndex: number },\n accountIds: string[],\n ) =>\n accountIds.length >= 1 &&\n accountIds.every((id) => mocks.accounts.has(id)),\n );\n\n if (index === 0) {\n // Make the first provider to always be an `EvmAccountProvider`, since we\n // check for this pre-condition in some methods.\n Object.setPrototypeOf(mocks, EvmAccountProvider.prototype);\n }\n\n if (index !== 0) {\n Object.setPrototypeOf(mocks, AccountProviderWrapper.prototype);\n }\n\n return mocks;\n}\n\n/**\n * Helper to mock a single createAccounts call while updating the provider's\n * internal state so subsequent getAccount/getAccounts can resolve the accounts.\n *\n * @param provider - The mock provider whose createAccounts call to mock.\n * @param created - The accounts to be returned and persisted in the mock state.\n */\nexport function mockCreateAccountsOnce(\n provider: MockAccountProvider,\n created: KeyringAccount[],\n): void {\n provider.createAccounts.mockImplementationOnce(async () => {\n // Add newly created accounts to the provider's internal store\n for (const acc of created) {\n if (!provider.mockAccounts.some((a) => a.id === acc.id)) {\n provider.mockAccounts.push(acc);\n }\n }\n // Merge IDs into the visible list used by getAccounts/getAccount\n const ids = created.map((a) => a.id);\n for (const id of ids) {\n provider.accounts.add(id);\n }\n\n return created;\n });\n}\n\n/**\n * Helper to convert a group index range to an array of group indices, inclusive of the\n * start and end indices.\n *\n * @param range - The range.\n * @param range.from - The starting index of the range (inclusive).\n * @param range.to - The ending index of the range (inclusive).\n * @returns An array of group indices from `from` to `to`, inclusive.\n */\nexport function toGroupIndexRangeArray({\n from = 0,\n to,\n}: GroupIndexRange): number[] {\n return Array.from({ length: to - from + 1 }, (_, i) => from + i);\n}\n"]}
|
package/dist/utils.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAQA;;;;;;GAMG;AACH,SAAgB,4BAA4B,CAAC,EAC3C,IAAI,GAAG,CAAC,EACR,EAAE,GACc;IAChB,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,oBAAoB,IAAI,gBAAgB,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,EAAE,G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;AAkBD;;;;;;;;;;GAUG;AACI,MAAM,iBAAiB,GAAG,CAG/B,OAAe,EACf,UAAiB,EACjB,OAAkB,EACK,EAAE;IACzB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAA0B,CAAC;IAC1D,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC;IACzB,IAAI,OAAO,EAAE,CAAC;QACZ,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;IAC1B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAbW,QAAA,iBAAiB,qBAa5B;AAEF;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,KAAc;IAC3C,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAFD,wCAEC","sourcesContent":["/**\n * Range-based multichain account creations type.\n */\nexport type GroupIndexRange = {\n from?: number;\n to: number;\n};\n\n/**\n * Asserts that a range is valid.\n *\n * @param range - The range to assert.\n * @param range.from - The starting index of the range (inclusive).\n * @param range.to - The ending index of the range (inclusive).\n */\nexport function assertGroupIndexRangeIsValid({\n from = 0,\n to,\n}: GroupIndexRange): void {\n if (from < 0) {\n throw new Error(`Bad range, from (${from}) must be >= 0`);\n }\n\n if (to < 0) {\n throw new Error(`Bad range, to (${to}) must be >= 0`);\n }\n\n if (to < from) {\n throw new Error(`Bad range, to (${to}) must be >= from (${from})`);\n }\n}\n\n/**\n * Asserts that a group index is valid given the next available group index.\n *\n * @param groupIndex - The group index to assert.\n * @param nextGroupIndex - The next available group index.\n */\nexport function assertGroupIndexIsValid(\n groupIndex: number,\n nextGroupIndex: number,\n): void {\n if (groupIndex > nextGroupIndex) {\n throw new Error(\n `Bad group index, groupIndex (${groupIndex}) cannot be higher than the next available one (<= ${nextGroupIndex})`,\n );\n }\n}\n\n/**\n * Augmented `Error` shape produced by {@link createSentryError}. The runtime\n * value carries a `cause` and (optionally) a structured `context` payload\n * that downstream Sentry tooling can read.\n *\n * The `TContext` type parameter narrows the shape of `context` for callers\n * that know what they put in — most useful in tests when asserting on a\n * captured error.\n */\nexport type SentryError<\n TContext extends Record<string, unknown> = Record<string, unknown>,\n> = Error & {\n cause: Error;\n context?: TContext;\n};\n\n/**\n * Creates a Sentry error from an error message, an inner error and a context.\n *\n * NOTE: Sentry defaults to a depth of 3 when extracting non-native attributes.\n * As such, the context depth shouldn't be too deep.\n *\n * @param message - The error message to create a Sentry error from.\n * @param innerError - The inner error to create a Sentry error from.\n * @param context - The context to add to the Sentry error.\n * @returns A Sentry error.\n */\nexport const createSentryError = <\n TContext extends Record<string, unknown> = Record<string, unknown>,\n>(\n message: string,\n innerError: Error,\n context?: TContext,\n): SentryError<TContext> => {\n const error = new Error(message) as SentryError<TContext>;\n error.cause = innerError;\n if (context) {\n error.context = context;\n }\n return error;\n};\n\n/**\n * Converts an unknown error value to a string message.\n *\n * @param error - The error to convert.\n * @returns The error message if the error is an `Error` instance, otherwise\n * the string representation of the value.\n */\nexport function toErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n"]}
|
package/dist/utils.d.cts
CHANGED
|
@@ -20,6 +20,19 @@ export declare function assertGroupIndexRangeIsValid({ from, to, }: GroupIndexRa
|
|
|
20
20
|
* @param nextGroupIndex - The next available group index.
|
|
21
21
|
*/
|
|
22
22
|
export declare function assertGroupIndexIsValid(groupIndex: number, nextGroupIndex: number): void;
|
|
23
|
+
/**
|
|
24
|
+
* Augmented `Error` shape produced by {@link createSentryError}. The runtime
|
|
25
|
+
* value carries a `cause` and (optionally) a structured `context` payload
|
|
26
|
+
* that downstream Sentry tooling can read.
|
|
27
|
+
*
|
|
28
|
+
* The `TContext` type parameter narrows the shape of `context` for callers
|
|
29
|
+
* that know what they put in — most useful in tests when asserting on a
|
|
30
|
+
* captured error.
|
|
31
|
+
*/
|
|
32
|
+
export type SentryError<TContext extends Record<string, unknown> = Record<string, unknown>> = Error & {
|
|
33
|
+
cause: Error;
|
|
34
|
+
context?: TContext;
|
|
35
|
+
};
|
|
23
36
|
/**
|
|
24
37
|
* Creates a Sentry error from an error message, an inner error and a context.
|
|
25
38
|
*
|
|
@@ -31,7 +44,7 @@ export declare function assertGroupIndexIsValid(groupIndex: number, nextGroupInd
|
|
|
31
44
|
* @param context - The context to add to the Sentry error.
|
|
32
45
|
* @returns A Sentry error.
|
|
33
46
|
*/
|
|
34
|
-
export declare const createSentryError: (message: string, innerError: Error, context?:
|
|
47
|
+
export declare const createSentryError: <TContext extends Record<string, unknown> = Record<string, unknown>>(message: string, innerError: Error, context?: TContext | undefined) => SentryError<TContext>;
|
|
35
48
|
/**
|
|
36
49
|
* Converts an unknown error value to a string message.
|
|
37
50
|
*
|
package/dist/utils.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.cts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,IAAQ,EACR,EAAE,GACH,EAAE,eAAe,GAAG,IAAI,CAYxB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GACrB,IAAI,CAMN;AAED
|
|
1
|
+
{"version":3,"file":"utils.d.cts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,IAAQ,EACR,EAAE,GACH,EAAE,eAAe,GAAG,IAAI,CAYxB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GACrB,IAAI,CAMN;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,CACrB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAChE,KAAK,GAAG;IACV,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,gFAGnB,MAAM,cACH,KAAK,0DASlB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAErD"}
|
package/dist/utils.d.mts
CHANGED
|
@@ -20,6 +20,19 @@ export declare function assertGroupIndexRangeIsValid({ from, to, }: GroupIndexRa
|
|
|
20
20
|
* @param nextGroupIndex - The next available group index.
|
|
21
21
|
*/
|
|
22
22
|
export declare function assertGroupIndexIsValid(groupIndex: number, nextGroupIndex: number): void;
|
|
23
|
+
/**
|
|
24
|
+
* Augmented `Error` shape produced by {@link createSentryError}. The runtime
|
|
25
|
+
* value carries a `cause` and (optionally) a structured `context` payload
|
|
26
|
+
* that downstream Sentry tooling can read.
|
|
27
|
+
*
|
|
28
|
+
* The `TContext` type parameter narrows the shape of `context` for callers
|
|
29
|
+
* that know what they put in — most useful in tests when asserting on a
|
|
30
|
+
* captured error.
|
|
31
|
+
*/
|
|
32
|
+
export type SentryError<TContext extends Record<string, unknown> = Record<string, unknown>> = Error & {
|
|
33
|
+
cause: Error;
|
|
34
|
+
context?: TContext;
|
|
35
|
+
};
|
|
23
36
|
/**
|
|
24
37
|
* Creates a Sentry error from an error message, an inner error and a context.
|
|
25
38
|
*
|
|
@@ -31,7 +44,7 @@ export declare function assertGroupIndexIsValid(groupIndex: number, nextGroupInd
|
|
|
31
44
|
* @param context - The context to add to the Sentry error.
|
|
32
45
|
* @returns A Sentry error.
|
|
33
46
|
*/
|
|
34
|
-
export declare const createSentryError: (message: string, innerError: Error, context?:
|
|
47
|
+
export declare const createSentryError: <TContext extends Record<string, unknown> = Record<string, unknown>>(message: string, innerError: Error, context?: TContext | undefined) => SentryError<TContext>;
|
|
35
48
|
/**
|
|
36
49
|
* Converts an unknown error value to a string message.
|
|
37
50
|
*
|
package/dist/utils.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.mts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,IAAQ,EACR,EAAE,GACH,EAAE,eAAe,GAAG,IAAI,CAYxB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GACrB,IAAI,CAMN;AAED
|
|
1
|
+
{"version":3,"file":"utils.d.mts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,IAAQ,EACR,EAAE,GACH,EAAE,eAAe,GAAG,IAAI,CAYxB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GACrB,IAAI,CAMN;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,CACrB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAChE,KAAK,GAAG;IACV,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,gFAGnB,MAAM,cACH,KAAK,0DASlB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAErD"}
|
package/dist/utils.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAAC,EAC3C,IAAI,GAAG,CAAC,EACR,EAAE,GACc;IAChB,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,oBAAoB,IAAI,gBAAgB,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,kBAAkB,EAAE,sBAAsB,IAAI,GAAG,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,UAAkB,EAClB,cAAsB;IAEtB,IAAI,UAAU,GAAG,cAAc,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,gCAAgC,UAAU,sDAAsD,cAAc,GAAG,CAClH,CAAC;IACJ,CAAC;AACH,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.mjs","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAAC,EAC3C,IAAI,GAAG,CAAC,EACR,EAAE,GACc;IAChB,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,oBAAoB,IAAI,gBAAgB,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,kBAAkB,EAAE,sBAAsB,IAAI,GAAG,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,UAAkB,EAClB,cAAsB;IAEtB,IAAI,UAAU,GAAG,cAAc,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,gCAAgC,UAAU,sDAAsD,cAAc,GAAG,CAClH,CAAC;IACJ,CAAC;AACH,CAAC;AAkBD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAG/B,OAAe,EACf,UAAiB,EACjB,OAAkB,EACK,EAAE;IACzB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAA0B,CAAC;IAC1D,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC;IACzB,IAAI,OAAO,EAAE,CAAC;QACZ,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;IAC1B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC","sourcesContent":["/**\n * Range-based multichain account creations type.\n */\nexport type GroupIndexRange = {\n from?: number;\n to: number;\n};\n\n/**\n * Asserts that a range is valid.\n *\n * @param range - The range to assert.\n * @param range.from - The starting index of the range (inclusive).\n * @param range.to - The ending index of the range (inclusive).\n */\nexport function assertGroupIndexRangeIsValid({\n from = 0,\n to,\n}: GroupIndexRange): void {\n if (from < 0) {\n throw new Error(`Bad range, from (${from}) must be >= 0`);\n }\n\n if (to < 0) {\n throw new Error(`Bad range, to (${to}) must be >= 0`);\n }\n\n if (to < from) {\n throw new Error(`Bad range, to (${to}) must be >= from (${from})`);\n }\n}\n\n/**\n * Asserts that a group index is valid given the next available group index.\n *\n * @param groupIndex - The group index to assert.\n * @param nextGroupIndex - The next available group index.\n */\nexport function assertGroupIndexIsValid(\n groupIndex: number,\n nextGroupIndex: number,\n): void {\n if (groupIndex > nextGroupIndex) {\n throw new Error(\n `Bad group index, groupIndex (${groupIndex}) cannot be higher than the next available one (<= ${nextGroupIndex})`,\n );\n }\n}\n\n/**\n * Augmented `Error` shape produced by {@link createSentryError}. The runtime\n * value carries a `cause` and (optionally) a structured `context` payload\n * that downstream Sentry tooling can read.\n *\n * The `TContext` type parameter narrows the shape of `context` for callers\n * that know what they put in — most useful in tests when asserting on a\n * captured error.\n */\nexport type SentryError<\n TContext extends Record<string, unknown> = Record<string, unknown>,\n> = Error & {\n cause: Error;\n context?: TContext;\n};\n\n/**\n * Creates a Sentry error from an error message, an inner error and a context.\n *\n * NOTE: Sentry defaults to a depth of 3 when extracting non-native attributes.\n * As such, the context depth shouldn't be too deep.\n *\n * @param message - The error message to create a Sentry error from.\n * @param innerError - The inner error to create a Sentry error from.\n * @param context - The context to add to the Sentry error.\n * @returns A Sentry error.\n */\nexport const createSentryError = <\n TContext extends Record<string, unknown> = Record<string, unknown>,\n>(\n message: string,\n innerError: Error,\n context?: TContext,\n): SentryError<TContext> => {\n const error = new Error(message) as SentryError<TContext>;\n error.cause = innerError;\n if (context) {\n error.context = context;\n }\n return error;\n};\n\n/**\n * Converts an unknown error value to a string message.\n *\n * @param error - The error to convert.\n * @returns The error message if the error is an `Error` instance, otherwise\n * the string representation of the value.\n */\nexport function toErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/multichain-account-service",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "Service to manage multichain accounts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ethereum",
|
|
@@ -54,29 +54,29 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@ethereumjs/util": "^9.1.0",
|
|
57
|
-
"@metamask/accounts-controller": "^39.0.
|
|
57
|
+
"@metamask/accounts-controller": "^39.0.3",
|
|
58
58
|
"@metamask/base-controller": "^9.1.0",
|
|
59
|
-
"@metamask/eth-snap-keyring": "^22.0
|
|
59
|
+
"@metamask/eth-snap-keyring": "^22.3.0",
|
|
60
60
|
"@metamask/key-tree": "^10.1.1",
|
|
61
|
-
"@metamask/keyring-api": "^23.
|
|
62
|
-
"@metamask/keyring-controller": "^27.
|
|
61
|
+
"@metamask/keyring-api": "^23.3.0",
|
|
62
|
+
"@metamask/keyring-controller": "^27.1.0",
|
|
63
63
|
"@metamask/keyring-internal-api": "^11.0.1",
|
|
64
64
|
"@metamask/keyring-snap-client": "^9.0.2",
|
|
65
|
-
"@metamask/keyring-utils": "^3.
|
|
65
|
+
"@metamask/keyring-utils": "^3.3.1",
|
|
66
66
|
"@metamask/messenger": "^1.2.0",
|
|
67
|
-
"@metamask/snap-account-service": "^0.
|
|
67
|
+
"@metamask/snap-account-service": "^1.0.0",
|
|
68
68
|
"@metamask/snaps-controllers": "^19.0.0",
|
|
69
69
|
"@metamask/snaps-sdk": "^11.0.0",
|
|
70
70
|
"@metamask/snaps-utils": "^12.1.2",
|
|
71
71
|
"@metamask/superstruct": "^3.1.0",
|
|
72
|
-
"@metamask/utils": "^11.
|
|
72
|
+
"@metamask/utils": "^11.11.0",
|
|
73
73
|
"async-mutex": "^0.5.0",
|
|
74
74
|
"lodash": "^4.17.21"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@metamask/account-api": "^1.0.4",
|
|
78
78
|
"@metamask/auto-changelog": "^6.1.0",
|
|
79
|
-
"@metamask/controller-utils": "^12.
|
|
79
|
+
"@metamask/controller-utils": "^12.3.0",
|
|
80
80
|
"@metamask/eth-hd-keyring": "^14.1.1",
|
|
81
81
|
"@metamask/providers": "^22.1.0",
|
|
82
82
|
"@ts-bridge/cli": "^0.6.4",
|