@metamask-previews/multichain-account-service 0.6.0-preview-3734aa94 → 0.6.0-preview-d71561e3
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 +0 -7
- package/dist/MultichainAccountGroup.cjs.map +1 -1
- package/dist/MultichainAccountGroup.d.cts +2 -2
- package/dist/MultichainAccountGroup.d.cts.map +1 -1
- package/dist/MultichainAccountGroup.d.mts +2 -2
- package/dist/MultichainAccountGroup.d.mts.map +1 -1
- package/dist/MultichainAccountGroup.mjs.map +1 -1
- package/dist/MultichainAccountService.cjs +0 -29
- package/dist/MultichainAccountService.cjs.map +1 -1
- package/dist/MultichainAccountService.d.cts +2 -20
- package/dist/MultichainAccountService.d.cts.map +1 -1
- package/dist/MultichainAccountService.d.mts +2 -20
- package/dist/MultichainAccountService.d.mts.map +1 -1
- package/dist/MultichainAccountService.mjs +0 -29
- package/dist/MultichainAccountService.mjs.map +1 -1
- package/dist/MultichainAccountWallet.cjs +0 -66
- package/dist/MultichainAccountWallet.cjs.map +1 -1
- package/dist/MultichainAccountWallet.d.cts +2 -19
- package/dist/MultichainAccountWallet.d.cts.map +1 -1
- package/dist/MultichainAccountWallet.d.mts +2 -19
- package/dist/MultichainAccountWallet.d.mts.map +1 -1
- package/dist/MultichainAccountWallet.mjs +0 -66
- package/dist/MultichainAccountWallet.mjs.map +1 -1
- package/dist/providers/AccountProviderWrapper.cjs +0 -3
- package/dist/providers/AccountProviderWrapper.cjs.map +1 -1
- package/dist/providers/AccountProviderWrapper.d.cts +0 -1
- package/dist/providers/AccountProviderWrapper.d.cts.map +1 -1
- package/dist/providers/AccountProviderWrapper.d.mts +0 -1
- package/dist/providers/AccountProviderWrapper.d.mts.map +1 -1
- package/dist/providers/AccountProviderWrapper.mjs +0 -3
- package/dist/providers/AccountProviderWrapper.mjs.map +1 -1
- package/dist/providers/BaseBip44AccountProvider.cjs.map +1 -1
- package/dist/providers/BaseBip44AccountProvider.d.cts +1 -5
- package/dist/providers/BaseBip44AccountProvider.d.cts.map +1 -1
- package/dist/providers/BaseBip44AccountProvider.d.mts +1 -5
- package/dist/providers/BaseBip44AccountProvider.d.mts.map +1 -1
- package/dist/providers/BaseBip44AccountProvider.mjs.map +1 -1
- package/dist/providers/EvmAccountProvider.cjs +2 -50
- package/dist/providers/EvmAccountProvider.cjs.map +1 -1
- package/dist/providers/EvmAccountProvider.d.cts +2 -77
- package/dist/providers/EvmAccountProvider.d.cts.map +1 -1
- package/dist/providers/EvmAccountProvider.d.mts +2 -77
- package/dist/providers/EvmAccountProvider.d.mts.map +1 -1
- package/dist/providers/EvmAccountProvider.mjs +3 -51
- package/dist/providers/EvmAccountProvider.mjs.map +1 -1
- package/dist/providers/SolAccountProvider.cjs +4 -43
- package/dist/providers/SolAccountProvider.cjs.map +1 -1
- package/dist/providers/SolAccountProvider.d.cts +1 -3
- package/dist/providers/SolAccountProvider.d.cts.map +1 -1
- package/dist/providers/SolAccountProvider.d.mts +1 -3
- package/dist/providers/SolAccountProvider.d.mts.map +1 -1
- package/dist/providers/SolAccountProvider.mjs +2 -41
- package/dist/providers/SolAccountProvider.mjs.map +1 -1
- package/dist/tests/accounts.cjs +6 -12
- package/dist/tests/accounts.cjs.map +1 -1
- package/dist/tests/accounts.d.cts +1 -5
- package/dist/tests/accounts.d.cts.map +1 -1
- package/dist/tests/accounts.d.mts +1 -5
- package/dist/tests/accounts.d.mts.map +1 -1
- package/dist/tests/accounts.mjs +1 -7
- package/dist/tests/accounts.mjs.map +1 -1
- package/dist/tests/messenger.cjs +0 -4
- package/dist/tests/messenger.cjs.map +1 -1
- package/dist/tests/messenger.d.cts.map +1 -1
- package/dist/tests/messenger.d.mts.map +1 -1
- package/dist/tests/messenger.mjs +0 -4
- package/dist/tests/messenger.mjs.map +1 -1
- package/dist/tests/providers.cjs +0 -1
- package/dist/tests/providers.cjs.map +1 -1
- package/dist/tests/providers.d.cts +0 -1
- package/dist/tests/providers.d.cts.map +1 -1
- package/dist/tests/providers.d.mts +0 -1
- package/dist/tests/providers.d.mts.map +1 -1
- package/dist/tests/providers.mjs +0 -1
- package/dist/tests/providers.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +3 -17
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +3 -17
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -2
- package/dist/utils.cjs +0 -19
- package/dist/utils.cjs.map +0 -1
- package/dist/utils.d.cts +0 -3
- package/dist/utils.d.cts.map +0 -1
- package/dist/utils.d.mts +0 -3
- package/dist/utils.d.mts.map +0 -1
- package/dist/utils.mjs +0 -14
- package/dist/utils.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messenger.mjs","sourceRoot":"","sources":["../../src/tests/messenger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,kCAAkC;AAUtD;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,SAAS,EAGjB,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oCAAoC,CAClD,SAA8C;IAE9C,OAAO,SAAS,CAAC,aAAa,CAAC;QAC7B,IAAI,EAAE,0BAA0B;QAChC,aAAa,EAAE;YACb,+BAA+B;YAC/B,iCAAiC;YACjC,mCAAmC;SACpC;QACD,cAAc,EAAE;YACd,+BAA+B;YAC/B,wCAAwC;YACxC,2CAA2C;YAC3C,8BAA8B;YAC9B,+BAA+B;YAC/B,4BAA4B;
|
|
1
|
+
{"version":3,"file":"messenger.mjs","sourceRoot":"","sources":["../../src/tests/messenger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,kCAAkC;AAUtD;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,SAAS,EAGjB,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oCAAoC,CAClD,SAA8C;IAE9C,OAAO,SAAS,CAAC,aAAa,CAAC;QAC7B,IAAI,EAAE,0BAA0B;QAChC,aAAa,EAAE;YACb,+BAA+B;YAC/B,iCAAiC;YACjC,mCAAmC;SACpC;QACD,cAAc,EAAE;YACd,+BAA+B;YAC/B,wCAAwC;YACxC,2CAA2C;YAC3C,8BAA8B;YAC9B,+BAA+B;YAC/B,4BAA4B;SAC7B;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { Messenger } from '@metamask/base-controller';\n\nimport type {\n AllowedActions,\n AllowedEvents,\n MultichainAccountServiceActions,\n MultichainAccountServiceEvents,\n MultichainAccountServiceMessenger,\n} from '../types';\n\n/**\n * Creates a new root messenger instance for testing.\n *\n * @returns A new Messenger instance.\n */\nexport function getRootMessenger() {\n return new Messenger<\n MultichainAccountServiceActions | AllowedActions,\n MultichainAccountServiceEvents | AllowedEvents\n >();\n}\n\n/**\n * Retrieves a restricted messenger for the MultichainAccountService.\n *\n * @param messenger - 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 messenger: ReturnType<typeof getRootMessenger>,\n): MultichainAccountServiceMessenger {\n return messenger.getRestricted({\n name: 'MultichainAccountService',\n allowedEvents: [\n 'KeyringController:stateChange',\n 'AccountsController:accountAdded',\n 'AccountsController:accountRemoved',\n ],\n allowedActions: [\n 'AccountsController:getAccount',\n 'AccountsController:getAccountByAddress',\n 'AccountsController:listMultichainAccounts',\n 'SnapController:handleRequest',\n 'KeyringController:withKeyring',\n 'KeyringController:getState',\n ],\n });\n}\n"]}
|
package/dist/tests/providers.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.cjs","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";AAAA,wCAAwC;;;AAGxC,uDAAuD;
|
|
1
|
+
{"version":3,"file":"providers.cjs","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";AAAA,wCAAwC;;;AAGxC,uDAAuD;AAYvD,SAAgB,uBAAuB,CACrC,WAA6B,EAAE;IAE/B,OAAO;QACL,QAAQ;QACR,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;QACrB,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE;QACtB,cAAc,EAAE,IAAI,CAAC,EAAE,EAAE;QACzB,yBAAyB,EAAE,IAAI,CAAC,EAAE,EAAE;QACpC,mBAAmB,EAAE,IAAI,CAAC,EAAE,EAAE;KAC/B,CAAC;AACJ,CAAC;AAXD,0DAWC;AAED,SAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,KAAK,GAAG,uBAAuB,EAAE,EACjC,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,GAKpB;IACC,8DAA8D;IAC9D,eAAe;IACf,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAE1B,MAAM,WAAW,GAAG,GAAG,EAAE,CACvB,KAAK,CAAC,QAAQ,CAAC,MAAM,CACnB,CAAC,OAAO,EAAE,EAAE,CAAC,IAAA,4BAAc,EAAC,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CACxD,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAClD,KAAK,CAAC,UAAU,CAAC,kBAAkB,CACjC,CAAC,EAAsC,EAAE,EAAE;IACzC,6BAA6B;IAC7B,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,CACrD,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC;AA1BD,oDA0BC","sourcesContent":["/* eslint-disable jsdoc/require-jsdoc */\n\nimport type { Bip44Account } from '@metamask/account-api';\nimport { isBip44Account } from '@metamask/account-api';\nimport type { KeyringAccount } from '@metamask/keyring-api';\n\nexport type MockAccountProvider = {\n accounts: KeyringAccount[];\n getAccount: jest.Mock;\n getAccounts: jest.Mock;\n createAccounts: jest.Mock;\n discoverAndCreateAccounts: jest.Mock;\n isAccountCompatible?: jest.Mock;\n};\n\nexport function makeMockAccountProvider(\n accounts: KeyringAccount[] = [],\n): MockAccountProvider {\n return {\n accounts,\n getAccount: jest.fn(),\n getAccounts: jest.fn(),\n createAccounts: jest.fn(),\n discoverAndCreateAccounts: jest.fn(),\n isAccountCompatible: jest.fn(),\n };\n}\n\nexport function setupAccountProvider({\n accounts,\n mocks = makeMockAccountProvider(),\n filter = () => true,\n}: {\n mocks?: MockAccountProvider;\n accounts: KeyringAccount[];\n filter?: (account: KeyringAccount) => boolean;\n}): MockAccountProvider {\n // You can mock this and all other mocks will re-use that list\n // of accounts.\n mocks.accounts = accounts;\n\n const getAccounts = () =>\n mocks.accounts.filter(\n (account) => isBip44Account(account) && filter(account),\n );\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\n return mocks;\n}\n"]}
|
|
@@ -7,7 +7,6 @@ export type MockAccountProvider = {
|
|
|
7
7
|
createAccounts: jest.Mock;
|
|
8
8
|
discoverAndCreateAccounts: jest.Mock;
|
|
9
9
|
isAccountCompatible?: jest.Mock;
|
|
10
|
-
getName: jest.Mock;
|
|
11
10
|
};
|
|
12
11
|
export declare function makeMockAccountProvider(accounts?: KeyringAccount[]): MockAccountProvider;
|
|
13
12
|
export declare function setupAccountProvider({ accounts, mocks, filter, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.cts","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA8B;AAE5D,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC;IACtB,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC;IACvB,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC;IAC1B,yBAAyB,EAAE,IAAI,CAAC,IAAI,CAAC;IACrC,mBAAmB,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"providers.d.cts","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA8B;AAE5D,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC;IACtB,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC;IACvB,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC;IAC1B,yBAAyB,EAAE,IAAI,CAAC,IAAI,CAAC;IACrC,mBAAmB,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;CACjC,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,QAAQ,GAAE,cAAc,EAAO,GAC9B,mBAAmB,CASrB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,KAAiC,EACjC,MAAmB,GACpB,EAAE;IACD,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC;CAC/C,GAAG,mBAAmB,CAkBtB"}
|
|
@@ -7,7 +7,6 @@ export type MockAccountProvider = {
|
|
|
7
7
|
createAccounts: jest.Mock;
|
|
8
8
|
discoverAndCreateAccounts: jest.Mock;
|
|
9
9
|
isAccountCompatible?: jest.Mock;
|
|
10
|
-
getName: jest.Mock;
|
|
11
10
|
};
|
|
12
11
|
export declare function makeMockAccountProvider(accounts?: KeyringAccount[]): MockAccountProvider;
|
|
13
12
|
export declare function setupAccountProvider({ accounts, mocks, filter, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.mts","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA8B;AAE5D,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC;IACtB,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC;IACvB,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC;IAC1B,yBAAyB,EAAE,IAAI,CAAC,IAAI,CAAC;IACrC,mBAAmB,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"providers.d.mts","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA8B;AAE5D,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC;IACtB,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC;IACvB,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC;IAC1B,yBAAyB,EAAE,IAAI,CAAC,IAAI,CAAC;IACrC,mBAAmB,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;CACjC,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,QAAQ,GAAE,cAAc,EAAO,GAC9B,mBAAmB,CASrB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,KAAiC,EACjC,MAAmB,GACpB,EAAE;IACD,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC;CAC/C,GAAG,mBAAmB,CAkBtB"}
|
package/dist/tests/providers.mjs
CHANGED
|
@@ -8,7 +8,6 @@ export function makeMockAccountProvider(accounts = []) {
|
|
|
8
8
|
createAccounts: jest.fn(),
|
|
9
9
|
discoverAndCreateAccounts: jest.fn(),
|
|
10
10
|
isAccountCompatible: jest.fn(),
|
|
11
|
-
getName: jest.fn(),
|
|
12
11
|
};
|
|
13
12
|
}
|
|
14
13
|
export function setupAccountProvider({ accounts, mocks = makeMockAccountProvider(), filter = () => true, }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.mjs","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":"AAAA,wCAAwC;AAGxC,OAAO,EAAE,cAAc,EAAE,8BAA8B;
|
|
1
|
+
{"version":3,"file":"providers.mjs","sourceRoot":"","sources":["../../src/tests/providers.ts"],"names":[],"mappings":"AAAA,wCAAwC;AAGxC,OAAO,EAAE,cAAc,EAAE,8BAA8B;AAYvD,MAAM,UAAU,uBAAuB,CACrC,WAA6B,EAAE;IAE/B,OAAO;QACL,QAAQ;QACR,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;QACrB,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE;QACtB,cAAc,EAAE,IAAI,CAAC,EAAE,EAAE;QACzB,yBAAyB,EAAE,IAAI,CAAC,EAAE,EAAE;QACpC,mBAAmB,EAAE,IAAI,CAAC,EAAE,EAAE;KAC/B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,KAAK,GAAG,uBAAuB,EAAE,EACjC,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,GAKpB;IACC,8DAA8D;IAC9D,eAAe;IACf,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAE1B,MAAM,WAAW,GAAG,GAAG,EAAE,CACvB,KAAK,CAAC,QAAQ,CAAC,MAAM,CACnB,CAAC,OAAO,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CACxD,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAClD,KAAK,CAAC,UAAU,CAAC,kBAAkB,CACjC,CAAC,EAAsC,EAAE,EAAE;IACzC,6BAA6B;IAC7B,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,CACrD,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/* eslint-disable jsdoc/require-jsdoc */\n\nimport type { Bip44Account } from '@metamask/account-api';\nimport { isBip44Account } from '@metamask/account-api';\nimport type { KeyringAccount } from '@metamask/keyring-api';\n\nexport type MockAccountProvider = {\n accounts: KeyringAccount[];\n getAccount: jest.Mock;\n getAccounts: jest.Mock;\n createAccounts: jest.Mock;\n discoverAndCreateAccounts: jest.Mock;\n isAccountCompatible?: jest.Mock;\n};\n\nexport function makeMockAccountProvider(\n accounts: KeyringAccount[] = [],\n): MockAccountProvider {\n return {\n accounts,\n getAccount: jest.fn(),\n getAccounts: jest.fn(),\n createAccounts: jest.fn(),\n discoverAndCreateAccounts: jest.fn(),\n isAccountCompatible: jest.fn(),\n };\n}\n\nexport function setupAccountProvider({\n accounts,\n mocks = makeMockAccountProvider(),\n filter = () => true,\n}: {\n mocks?: MockAccountProvider;\n accounts: KeyringAccount[];\n filter?: (account: KeyringAccount) => boolean;\n}): MockAccountProvider {\n // You can mock this and all other mocks will re-use that list\n // of accounts.\n mocks.accounts = accounts;\n\n const getAccounts = () =>\n mocks.accounts.filter(\n (account) => isBip44Account(account) && filter(account),\n );\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\n return mocks;\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 AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type { RestrictedMessenger } from '@metamask/base-controller';\nimport type {\n
|
|
1
|
+
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type { RestrictedMessenger } from '@metamask/base-controller';\nimport type {\n KeyringControllerGetStateAction,\n KeyringControllerStateChangeEvent,\n KeyringControllerWithKeyringAction,\n} from '@metamask/keyring-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 MultichainAccountServiceGetIsAlignmentInProgressAction = {\n type: `${typeof serviceName}:getIsAlignmentInProgress`;\n handler: MultichainAccountService['getIsAlignmentInProgress'];\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 | MultichainAccountServiceGetIsAlignmentInProgressAction;\n\n/**\n * All events that {@link MultichainAccountService} publishes so that other modules\n * can subscribe to them.\n */\nexport type MultichainAccountServiceEvents = never;\n\n/**\n * All actions registered by other modules that {@link MultichainAccountService}\n * calls.\n */\nexport type AllowedActions =\n | AccountsControllerListMultichainAccountsAction\n | AccountsControllerGetAccountAction\n | AccountsControllerGetAccountByAddressAction\n | SnapControllerHandleSnapRequestAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerGetStateAction;\n\n/**\n * All events published by other modules that {@link MultichainAccountService}\n * subscribes to.\n */\nexport type 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 = RestrictedMessenger<\n 'MultichainAccountService',\n MultichainAccountServiceActions | AllowedActions,\n MultichainAccountServiceEvents | AllowedEvents,\n AllowedActions['type'],\n AllowedEvents['type']\n>;\n"]}
|
package/dist/types.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { AccountsControllerAccountAddedEvent, AccountsControllerAccountRemovedEvent, AccountsControllerGetAccountAction, AccountsControllerGetAccountByAddressAction, AccountsControllerListMultichainAccountsAction } from "@metamask/accounts-controller";
|
|
2
2
|
import type { RestrictedMessenger } from "@metamask/base-controller";
|
|
3
|
-
import type {
|
|
4
|
-
import type { NetworkControllerFindNetworkClientIdByChainIdAction, NetworkControllerGetNetworkClientByIdAction } from "@metamask/network-controller";
|
|
3
|
+
import type { KeyringControllerGetStateAction, KeyringControllerStateChangeEvent, KeyringControllerWithKeyringAction } from "@metamask/keyring-controller";
|
|
5
4
|
import type { HandleSnapRequest as SnapControllerHandleSnapRequestAction } from "@metamask/snaps-controllers";
|
|
6
5
|
import type { MultichainAccountService, serviceName } from "./MultichainAccountService.cjs";
|
|
7
6
|
export type MultichainAccountServiceGetMultichainAccountGroupAction = {
|
|
@@ -44,15 +43,11 @@ export type MultichainAccountServiceGetIsAlignmentInProgressAction = {
|
|
|
44
43
|
type: `${typeof serviceName}:getIsAlignmentInProgress`;
|
|
45
44
|
handler: MultichainAccountService['getIsAlignmentInProgress'];
|
|
46
45
|
};
|
|
47
|
-
export type MultichainAccountServiceCreateMultichainAccountWalletAction = {
|
|
48
|
-
type: `${typeof serviceName}:createMultichainAccountWallet`;
|
|
49
|
-
handler: MultichainAccountService['createMultichainAccountWallet'];
|
|
50
|
-
};
|
|
51
46
|
/**
|
|
52
47
|
* All actions that {@link MultichainAccountService} registers so that other
|
|
53
48
|
* modules can call them.
|
|
54
49
|
*/
|
|
55
|
-
export type MultichainAccountServiceActions = MultichainAccountServiceGetMultichainAccountGroupAction | MultichainAccountServiceGetMultichainAccountGroupsAction | MultichainAccountServiceGetMultichainAccountWalletAction | MultichainAccountServiceGetMultichainAccountWalletsAction | MultichainAccountServiceCreateNextMultichainAccountGroupAction | MultichainAccountServiceCreateMultichainAccountGroupAction | MultichainAccountServiceSetBasicFunctionalityAction | MultichainAccountServiceAlignWalletAction | MultichainAccountServiceAlignWalletsAction | MultichainAccountServiceGetIsAlignmentInProgressAction
|
|
50
|
+
export type MultichainAccountServiceActions = MultichainAccountServiceGetMultichainAccountGroupAction | MultichainAccountServiceGetMultichainAccountGroupsAction | MultichainAccountServiceGetMultichainAccountWalletAction | MultichainAccountServiceGetMultichainAccountWalletsAction | MultichainAccountServiceCreateNextMultichainAccountGroupAction | MultichainAccountServiceCreateMultichainAccountGroupAction | MultichainAccountServiceSetBasicFunctionalityAction | MultichainAccountServiceAlignWalletAction | MultichainAccountServiceAlignWalletsAction | MultichainAccountServiceGetIsAlignmentInProgressAction;
|
|
56
51
|
/**
|
|
57
52
|
* All events that {@link MultichainAccountService} publishes so that other modules
|
|
58
53
|
* can subscribe to them.
|
|
@@ -62,7 +57,7 @@ export type MultichainAccountServiceEvents = never;
|
|
|
62
57
|
* All actions registered by other modules that {@link MultichainAccountService}
|
|
63
58
|
* calls.
|
|
64
59
|
*/
|
|
65
|
-
export type AllowedActions = AccountsControllerListMultichainAccountsAction | AccountsControllerGetAccountAction | AccountsControllerGetAccountByAddressAction | SnapControllerHandleSnapRequestAction | KeyringControllerWithKeyringAction | KeyringControllerGetStateAction
|
|
60
|
+
export type AllowedActions = AccountsControllerListMultichainAccountsAction | AccountsControllerGetAccountAction | AccountsControllerGetAccountByAddressAction | SnapControllerHandleSnapRequestAction | KeyringControllerWithKeyringAction | KeyringControllerGetStateAction;
|
|
66
61
|
/**
|
|
67
62
|
* All events published by other modules that {@link MultichainAccountService}
|
|
68
63
|
* subscribes to.
|
|
@@ -73,13 +68,4 @@ export type AllowedEvents = KeyringControllerStateChangeEvent | AccountsControll
|
|
|
73
68
|
* {@link MultichainAccountService} needs to access.
|
|
74
69
|
*/
|
|
75
70
|
export type MultichainAccountServiceMessenger = RestrictedMessenger<'MultichainAccountService', MultichainAccountServiceActions | AllowedActions, MultichainAccountServiceEvents | AllowedEvents, AllowedActions['type'], AllowedEvents['type']>;
|
|
76
|
-
/**
|
|
77
|
-
* The context for a provider discovery.
|
|
78
|
-
*/
|
|
79
|
-
export type ProviderDiscoveryContext = {
|
|
80
|
-
stopped: boolean;
|
|
81
|
-
running?: Promise<void>;
|
|
82
|
-
groupIndex: number;
|
|
83
|
-
count: number;
|
|
84
|
-
};
|
|
85
71
|
//# 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,mCAAmC,EACnC,qCAAqC,EACrC,kCAAkC,EAClC,2CAA2C,EAC3C,8CAA8C,EAC/C,sCAAsC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,kCAAkC;AACrE,OAAO,KAAK,EACV
|
|
1
|
+
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { AccountsControllerAccountAddedEvent, AccountsControllerAccountRemovedEvent, AccountsControllerGetAccountAction, AccountsControllerGetAccountByAddressAction, AccountsControllerListMultichainAccountsAction } from "@metamask/accounts-controller";
|
|
2
2
|
import type { RestrictedMessenger } from "@metamask/base-controller";
|
|
3
|
-
import type {
|
|
4
|
-
import type { NetworkControllerFindNetworkClientIdByChainIdAction, NetworkControllerGetNetworkClientByIdAction } from "@metamask/network-controller";
|
|
3
|
+
import type { KeyringControllerGetStateAction, KeyringControllerStateChangeEvent, KeyringControllerWithKeyringAction } from "@metamask/keyring-controller";
|
|
5
4
|
import type { HandleSnapRequest as SnapControllerHandleSnapRequestAction } from "@metamask/snaps-controllers";
|
|
6
5
|
import type { MultichainAccountService, serviceName } from "./MultichainAccountService.mjs";
|
|
7
6
|
export type MultichainAccountServiceGetMultichainAccountGroupAction = {
|
|
@@ -44,15 +43,11 @@ export type MultichainAccountServiceGetIsAlignmentInProgressAction = {
|
|
|
44
43
|
type: `${typeof serviceName}:getIsAlignmentInProgress`;
|
|
45
44
|
handler: MultichainAccountService['getIsAlignmentInProgress'];
|
|
46
45
|
};
|
|
47
|
-
export type MultichainAccountServiceCreateMultichainAccountWalletAction = {
|
|
48
|
-
type: `${typeof serviceName}:createMultichainAccountWallet`;
|
|
49
|
-
handler: MultichainAccountService['createMultichainAccountWallet'];
|
|
50
|
-
};
|
|
51
46
|
/**
|
|
52
47
|
* All actions that {@link MultichainAccountService} registers so that other
|
|
53
48
|
* modules can call them.
|
|
54
49
|
*/
|
|
55
|
-
export type MultichainAccountServiceActions = MultichainAccountServiceGetMultichainAccountGroupAction | MultichainAccountServiceGetMultichainAccountGroupsAction | MultichainAccountServiceGetMultichainAccountWalletAction | MultichainAccountServiceGetMultichainAccountWalletsAction | MultichainAccountServiceCreateNextMultichainAccountGroupAction | MultichainAccountServiceCreateMultichainAccountGroupAction | MultichainAccountServiceSetBasicFunctionalityAction | MultichainAccountServiceAlignWalletAction | MultichainAccountServiceAlignWalletsAction | MultichainAccountServiceGetIsAlignmentInProgressAction
|
|
50
|
+
export type MultichainAccountServiceActions = MultichainAccountServiceGetMultichainAccountGroupAction | MultichainAccountServiceGetMultichainAccountGroupsAction | MultichainAccountServiceGetMultichainAccountWalletAction | MultichainAccountServiceGetMultichainAccountWalletsAction | MultichainAccountServiceCreateNextMultichainAccountGroupAction | MultichainAccountServiceCreateMultichainAccountGroupAction | MultichainAccountServiceSetBasicFunctionalityAction | MultichainAccountServiceAlignWalletAction | MultichainAccountServiceAlignWalletsAction | MultichainAccountServiceGetIsAlignmentInProgressAction;
|
|
56
51
|
/**
|
|
57
52
|
* All events that {@link MultichainAccountService} publishes so that other modules
|
|
58
53
|
* can subscribe to them.
|
|
@@ -62,7 +57,7 @@ export type MultichainAccountServiceEvents = never;
|
|
|
62
57
|
* All actions registered by other modules that {@link MultichainAccountService}
|
|
63
58
|
* calls.
|
|
64
59
|
*/
|
|
65
|
-
export type AllowedActions = AccountsControllerListMultichainAccountsAction | AccountsControllerGetAccountAction | AccountsControllerGetAccountByAddressAction | SnapControllerHandleSnapRequestAction | KeyringControllerWithKeyringAction | KeyringControllerGetStateAction
|
|
60
|
+
export type AllowedActions = AccountsControllerListMultichainAccountsAction | AccountsControllerGetAccountAction | AccountsControllerGetAccountByAddressAction | SnapControllerHandleSnapRequestAction | KeyringControllerWithKeyringAction | KeyringControllerGetStateAction;
|
|
66
61
|
/**
|
|
67
62
|
* All events published by other modules that {@link MultichainAccountService}
|
|
68
63
|
* subscribes to.
|
|
@@ -73,13 +68,4 @@ export type AllowedEvents = KeyringControllerStateChangeEvent | AccountsControll
|
|
|
73
68
|
* {@link MultichainAccountService} needs to access.
|
|
74
69
|
*/
|
|
75
70
|
export type MultichainAccountServiceMessenger = RestrictedMessenger<'MultichainAccountService', MultichainAccountServiceActions | AllowedActions, MultichainAccountServiceEvents | AllowedEvents, AllowedActions['type'], AllowedEvents['type']>;
|
|
76
|
-
/**
|
|
77
|
-
* The context for a provider discovery.
|
|
78
|
-
*/
|
|
79
|
-
export type ProviderDiscoveryContext = {
|
|
80
|
-
stopped: boolean;
|
|
81
|
-
running?: Promise<void>;
|
|
82
|
-
groupIndex: number;
|
|
83
|
-
count: number;
|
|
84
|
-
};
|
|
85
71
|
//# 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,mCAAmC,EACnC,qCAAqC,EACrC,kCAAkC,EAClC,2CAA2C,EAC3C,8CAA8C,EAC/C,sCAAsC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,kCAAkC;AACrE,OAAO,KAAK,EACV
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
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 AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type { RestrictedMessenger } from '@metamask/base-controller';\nimport type {\n
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type { RestrictedMessenger } from '@metamask/base-controller';\nimport type {\n KeyringControllerGetStateAction,\n KeyringControllerStateChangeEvent,\n KeyringControllerWithKeyringAction,\n} from '@metamask/keyring-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 MultichainAccountServiceGetIsAlignmentInProgressAction = {\n type: `${typeof serviceName}:getIsAlignmentInProgress`;\n handler: MultichainAccountService['getIsAlignmentInProgress'];\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 | MultichainAccountServiceGetIsAlignmentInProgressAction;\n\n/**\n * All events that {@link MultichainAccountService} publishes so that other modules\n * can subscribe to them.\n */\nexport type MultichainAccountServiceEvents = never;\n\n/**\n * All actions registered by other modules that {@link MultichainAccountService}\n * calls.\n */\nexport type AllowedActions =\n | AccountsControllerListMultichainAccountsAction\n | AccountsControllerGetAccountAction\n | AccountsControllerGetAccountByAddressAction\n | SnapControllerHandleSnapRequestAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerGetStateAction;\n\n/**\n * All events published by other modules that {@link MultichainAccountService}\n * subscribes to.\n */\nexport type 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 = RestrictedMessenger<\n 'MultichainAccountService',\n MultichainAccountServiceActions | AllowedActions,\n MultichainAccountServiceEvents | AllowedEvents,\n AllowedActions['type'],\n AllowedEvents['type']\n>;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/multichain-account-service",
|
|
3
|
-
"version": "0.6.0-preview-
|
|
3
|
+
"version": "0.6.0-preview-d71561e3",
|
|
4
4
|
"description": "Service to manage multichain accounts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
"@metamask/keyring-internal-api": "^8.1.0",
|
|
54
54
|
"@metamask/keyring-snap-client": "^7.0.0",
|
|
55
55
|
"@metamask/keyring-utils": "^3.1.0",
|
|
56
|
-
"@metamask/scure-bip39": "^2.1.1",
|
|
57
56
|
"@metamask/snaps-sdk": "^9.0.0",
|
|
58
57
|
"@metamask/snaps-utils": "^11.0.0",
|
|
59
58
|
"@metamask/superstruct": "^3.1.0"
|
package/dist/utils.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertMnemonicToWordlistIndices = exports.convertEnglishWordlistIndicesToCodepoints = void 0;
|
|
4
|
-
const english_1 = require("@metamask/scure-bip39/dist/wordlists/english.js");
|
|
5
|
-
const convertEnglishWordlistIndicesToCodepoints = (wordlistIndices) => {
|
|
6
|
-
return Buffer.from(Array.from(new Uint16Array(wordlistIndices.buffer))
|
|
7
|
-
.map((i) => english_1.wordlist[i])
|
|
8
|
-
.join(' '));
|
|
9
|
-
};
|
|
10
|
-
exports.convertEnglishWordlistIndicesToCodepoints = convertEnglishWordlistIndicesToCodepoints;
|
|
11
|
-
const convertMnemonicToWordlistIndices = (mnemonic) => {
|
|
12
|
-
const indices = mnemonic
|
|
13
|
-
.toString()
|
|
14
|
-
.split(' ')
|
|
15
|
-
.map((word) => english_1.wordlist.indexOf(word));
|
|
16
|
-
return new Uint8Array(new Uint16Array(indices).buffer);
|
|
17
|
-
};
|
|
18
|
-
exports.convertMnemonicToWordlistIndices = convertMnemonicToWordlistIndices;
|
|
19
|
-
//# sourceMappingURL=utils.cjs.map
|
package/dist/utils.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,6EAAwE;AAEjE,MAAM,yCAAyC,GAAG,CACvD,eAA2B,EACnB,EAAE;IACV,OAAO,MAAM,CAAC,IAAI,CAChB,KAAK,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;SAChD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAQ,CAAC,CAAC,CAAC,CAAC;SACvB,IAAI,CAAC,GAAG,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,yCAAyC,6CAQpD;AAEK,MAAM,gCAAgC,GAAG,CAC9C,QAAgB,EACJ,EAAE;IACd,MAAM,OAAO,GAAG,QAAQ;SACrB,QAAQ,EAAE;SACV,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACzC,OAAO,IAAI,UAAU,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC,CAAC;AARW,QAAA,gCAAgC,oCAQ3C","sourcesContent":["import { wordlist } from '@metamask/scure-bip39/dist/wordlists/english';\n\nexport const convertEnglishWordlistIndicesToCodepoints = (\n wordlistIndices: Uint8Array,\n): Buffer => {\n return Buffer.from(\n Array.from(new Uint16Array(wordlistIndices.buffer))\n .map((i) => wordlist[i])\n .join(' '),\n );\n};\n\nexport const convertMnemonicToWordlistIndices = (\n mnemonic: string,\n): Uint8Array => {\n const indices = mnemonic\n .toString()\n .split(' ')\n .map((word) => wordlist.indexOf(word));\n return new Uint8Array(new Uint16Array(indices).buffer);\n};\n"]}
|
package/dist/utils.d.cts
DELETED
package/dist/utils.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.cts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yCAAyC,oBACnC,UAAU,KAC1B,MAMF,CAAC;AAEF,eAAO,MAAM,gCAAgC,aACjC,MAAM,KACf,UAMF,CAAC"}
|
package/dist/utils.d.mts
DELETED
package/dist/utils.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.mts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yCAAyC,oBACnC,UAAU,KAC1B,MAMF,CAAC;AAEF,eAAO,MAAM,gCAAgC,aACjC,MAAM,KACf,UAMF,CAAC"}
|
package/dist/utils.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { wordlist } from "@metamask/scure-bip39/dist/wordlists/english.js";
|
|
2
|
-
export const convertEnglishWordlistIndicesToCodepoints = (wordlistIndices) => {
|
|
3
|
-
return Buffer.from(Array.from(new Uint16Array(wordlistIndices.buffer))
|
|
4
|
-
.map((i) => wordlist[i])
|
|
5
|
-
.join(' '));
|
|
6
|
-
};
|
|
7
|
-
export const convertMnemonicToWordlistIndices = (mnemonic) => {
|
|
8
|
-
const indices = mnemonic
|
|
9
|
-
.toString()
|
|
10
|
-
.split(' ')
|
|
11
|
-
.map((word) => wordlist.indexOf(word));
|
|
12
|
-
return new Uint8Array(new Uint16Array(indices).buffer);
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=utils.mjs.map
|
package/dist/utils.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,wDAAqD;AAExE,MAAM,CAAC,MAAM,yCAAyC,GAAG,CACvD,eAA2B,EACnB,EAAE;IACV,OAAO,MAAM,CAAC,IAAI,CAChB,KAAK,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;SAChD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;SACvB,IAAI,CAAC,GAAG,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAC9C,QAAgB,EACJ,EAAE;IACd,MAAM,OAAO,GAAG,QAAQ;SACrB,QAAQ,EAAE;SACV,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACzC,OAAO,IAAI,UAAU,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC,CAAC","sourcesContent":["import { wordlist } from '@metamask/scure-bip39/dist/wordlists/english';\n\nexport const convertEnglishWordlistIndicesToCodepoints = (\n wordlistIndices: Uint8Array,\n): Buffer => {\n return Buffer.from(\n Array.from(new Uint16Array(wordlistIndices.buffer))\n .map((i) => wordlist[i])\n .join(' '),\n );\n};\n\nexport const convertMnemonicToWordlistIndices = (\n mnemonic: string,\n): Uint8Array => {\n const indices = mnemonic\n .toString()\n .split(' ')\n .map((word) => wordlist.indexOf(word));\n return new Uint8Array(new Uint16Array(indices).buffer);\n};\n"]}
|