@metamask-previews/accounts-controller 40.0.0-preview-0f8c056e2 → 40.0.0-preview-0305ce0
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 +1 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +5 -1
- package/dist/utils.js.map +1 -1
- package/package.json +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
21
21
|
- Bump `deepmerge` from `^4.2.2` to `^4.3.1` ([#10437](https://github.com/MetaMask/core/pull/10437))
|
|
22
22
|
- Bump `ethereum-cryptography` from `^2.1.2` to `^2.2.1` ([#10485](https://github.com/MetaMask/core/pull/10485))
|
|
23
23
|
- Bump `lodash-es` from `^4.17.21` to `^4.18.1` ([#10447](https://github.com/MetaMask/core/pull/10447))
|
|
24
|
+
- Bump `@metamask/network-controller` from `^37.0.0` to `^37.0.1` ([#10658](https://github.com/MetaMask/core/pull/10658))
|
|
24
25
|
|
|
25
26
|
## [40.0.0]
|
|
26
27
|
|
package/dist/utils.d.ts
CHANGED
|
@@ -79,6 +79,10 @@ export declare function isMpcKeyringType(keyringType: KeyringTypes | string): bo
|
|
|
79
79
|
/**
|
|
80
80
|
* Check if a keyring type is a skipped keyring (Money or MPC keyring).
|
|
81
81
|
*
|
|
82
|
+
* A skipped keyring is one that should be ignored during account
|
|
83
|
+
* re-synchronization with the `KeyringController` (through `:stateChange` events
|
|
84
|
+
* or `updateAccounts` calls).
|
|
85
|
+
*
|
|
82
86
|
* @param keyringType - The account's keyring type.
|
|
83
87
|
* @returns True if the keyring type is considered a skipped keyring, false otherwise.
|
|
84
88
|
*/
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"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UIDFromAddressOfNormalAccount(address) {
|
|
|
82
82
|
export function isNormalKeyringType(keyringType) {
|
|
83
83
|
return (!isSnapKeyringType(keyringType) &&
|
|
84
84
|
!isSnapKeyringV2Type(keyringType) &&
|
|
85
|
-
!
|
|
85
|
+
!isSkippedKeyringType(keyringType));
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* Check if a keyring type is a Snap keyring.
|
|
@@ -141,6 +141,10 @@ export function isMpcKeyringType(keyringType) {
|
|
|
141
141
|
/**
|
|
142
142
|
* Check if a keyring type is a skipped keyring (Money or MPC keyring).
|
|
143
143
|
*
|
|
144
|
+
* A skipped keyring is one that should be ignored during account
|
|
145
|
+
* re-synchronization with the `KeyringController` (through `:stateChange` events
|
|
146
|
+
* or `updateAccounts` calls).
|
|
147
|
+
*
|
|
144
148
|
* @param keyringType - The account's keyring type.
|
|
145
149
|
* @returns True if the keyring type is considered a skipped keyring, false otherwise.
|
|
146
150
|
*/
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAOlC;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,WAAmB;IACnD,QAAQ,WAAW,EAAE,CAAC;QACpB,KAAK,YAAY,CAAC,MAAM,EAAE,CAAC;YACzB,OAAO,SAAS,CAAC;QACnB,CAAC;QACD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;QACjE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC;QAClC,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC","sourcesContent":["import { KeyringType } from '@metamask/keyring-api/v2';\nimport type { KeyringObject } from '@metamask/keyring-controller';\nimport { KeyringTypes } from '@metamask/keyring-controller';\nimport type { InternalAccount } from '@metamask/keyring-internal-api';\nimport type { Infer } from '@metamask/superstruct';\nimport { is, number, string, type } from '@metamask/superstruct';\nimport { hexToBytes } from '@metamask/utils';\nimport { sha256 } from 'ethereum-cryptography/sha256';\nimport { v4 as uuid } from 'uuid';\n\nimport type { AccountId } from './AccountsController.js';\n\n// This is exported by the `uuid` package, but not importable in ESM.\ntype V4Options = Exclude<Parameters<typeof uuid>[0], undefined>;\n\n/**\n * Returns the name of the keyring type.\n *\n * @param keyringType - The type of the keyring.\n * @returns The name of the keyring type.\n */\nexport function keyringTypeToName(keyringType: string): string {\n switch (keyringType) {\n case KeyringTypes.simple: {\n return 'Account';\n }\n case KeyringTypes.hd: {\n return 'Account';\n }\n case KeyringTypes.trezor: {\n return 'Trezor';\n }\n case KeyringTypes.oneKey: {\n return 'OneKey';\n }\n case KeyringTypes.ledger: {\n return 'Ledger';\n }\n case KeyringTypes.lattice: {\n return 'Lattice';\n }\n case KeyringTypes.qr: {\n return 'QR';\n }\n case KeyringType.Snap:\n case KeyringTypes.snap: {\n return 'Snap Account';\n }\n // NOTE: We don't use those keyrings/accounts within this controller. However, since this\n // function only use the keyring type to return a name, we still support it here in case\n // clients need it.\n // FIXME: This should probably live in the `KeyringController` package instead.\n case KeyringTypes.money: {\n return 'Money';\n }\n case KeyringTypes.mpc: {\n return 'MPC';\n }\n default: {\n throw new Error(`Unknown keyring ${keyringType}`);\n }\n }\n}\n\n/**\n * Generates a UUID v4 options from a given Ethereum address.\n *\n * @param address - The Ethereum address to generate the UUID from.\n * @returns The UUID v4 options.\n */\nexport function getUUIDOptionsFromAddressOfNormalAccount(\n address: string,\n): V4Options {\n const v4options = {\n random: sha256(hexToBytes(address)).slice(0, 16),\n };\n\n return v4options;\n}\n\n/**\n * Generates a UUID from a given Ethereum address.\n *\n * @param address - The Ethereum address to generate the UUID from.\n * @returns The generated UUID.\n */\nexport function getUUIDFromAddressOfNormalAccount(address: string): string {\n return uuid(getUUIDOptionsFromAddressOfNormalAccount(address));\n}\n\n/**\n * Check if a keyring type is considered a \"normal\" keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is considered a \"normal\" keyring, false otherwise.\n */\nexport function isNormalKeyringType(\n keyringType: KeyringTypes | string,\n): boolean {\n return (\n !isSnapKeyringType(keyringType) &&\n !isSnapKeyringV2Type(keyringType) &&\n !isMoneyKeyringType(keyringType)\n );\n}\n\n/**\n * Check if a keyring type is a Snap keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is considered a Snap keyring, false otherwise.\n */\nexport function isSnapKeyringType(keyringType: KeyringTypes | string): boolean {\n return keyringType === (KeyringTypes.snap as string);\n}\n\n/**\n * Check if a keyring type is a Snap keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is considered a Snap keyring, false otherwise.\n */\nexport function isSnapKeyringV2Type(\n keyringType: KeyringTypes | KeyringType | string,\n): boolean {\n return keyringType === (KeyringType.Snap as string);\n}\n\n/**\n * Check if a keyring type is a simple keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is considered a simple keyring, false otherwise.\n */\nexport function isSimpleKeyringType(\n keyringType: KeyringTypes | string,\n): boolean {\n return keyringType === (KeyringTypes.simple as string);\n}\n\n/**\n * Check if a keyring is a HD keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring is a HD keyring, false otherwise.\n */\nexport function isHdKeyringType(keyringType: KeyringTypes | string): boolean {\n return keyringType === (KeyringTypes.hd as string);\n}\n\n/**\n * Check if a keyring type is a Money keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is a Money keyring, false otherwise.\n */\nexport function isMoneyKeyringType(\n keyringType: KeyringTypes | string,\n): boolean {\n return keyringType === (KeyringTypes.money as string);\n}\n\n/**\n * Check if a keyring type is a MPC keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is a MPC keyring, false otherwise.\n */\nexport function isMpcKeyringType(keyringType: KeyringTypes | string): boolean {\n return keyringType === (KeyringTypes.mpc as string);\n}\n\n/**\n * Check if a keyring type is a skipped keyring (Money or MPC keyring).\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is considered a skipped keyring, false otherwise.\n */\nexport function isSkippedKeyringType(\n keyringType: KeyringTypes | string,\n): boolean {\n return isMoneyKeyringType(keyringType) || isMpcKeyringType(keyringType);\n}\n\n/**\n * Get the derivation path for the index of an account within a EVM HD keyring.\n *\n * @param index - The account index.\n * @returns The derivation path.\n */\nexport function getEvmDerivationPathForIndex(index: number): string {\n const purpose = '44';\n const coinType = '60'; // Ethereum.\n return `m/${purpose}'/${coinType}'/0'/0/${index}`;\n}\n\n/**\n * Get the group index from a keyring object (EVM HD keyring only) and an address.\n *\n * @param keyring - The keyring object.\n * @param address - The address to match.\n * @returns The group index for that address, undefined if not able to match the address.\n */\nexport function getEvmGroupIndexFromAddressIndex(\n keyring: KeyringObject,\n address: string,\n): number | undefined {\n // TODO: Remove this function once EVM HD keyrings start using the new unified\n // keyring API.\n\n // NOTE: We mostly put that logic in a separate function so we can easily add coverage\n // for (supposedly) unreachable code path.\n\n if (!isHdKeyringType(keyring.type)) {\n // We cannot extract the group index from non-HD keyrings.\n return undefined;\n }\n\n // We need to find the account index from its HD keyring. We assume those\n // accounts are ordered, thus we can use their index to compute their\n // derivation path and group index.\n const groupIndex = keyring.accounts.findIndex(\n // NOTE: This is ok to use `toLowerCase` here, since we're only dealing\n // with EVM addresses.\n (accountAddress) => accountAddress.toLowerCase() === address.toLowerCase(),\n );\n\n // If for some reason, we cannot find this address, then the caller made a mistake\n // and it did not use the proper keyring object. For now, we do not fail and just\n // consider this account as \"simple account\".\n if (groupIndex === -1) {\n console.warn(`! Unable to get group index for HD account: \"${address}\"`);\n return undefined;\n }\n\n return groupIndex;\n}\n\n/**\n * HD keyring account for Snap accounts that handles non-EVM HD accounts. (e.g the\n * Solana Snap).\n *\n * NOTE: We use `superstruct.type` here `superstruct.object` since it allows\n * extra-properties than a Snap might add in its `options`.\n */\nexport const HdSnapKeyringAccountOptionsStruct = type({\n entropySource: string(),\n index: number(),\n derivationPath: string(),\n});\nexport type HdSnapKeyringAccountOptions = Infer<\n typeof HdSnapKeyringAccountOptionsStruct\n>;\n\n/**\n * HD keyring account for Snap accounts that handles non-EVM HD accounts.\n */\nexport type HdSnapKeyringAccount = InternalAccount & {\n options: InternalAccount['options'] & HdSnapKeyringAccountOptions;\n};\n\n/**\n * Check if an account is an HD Snap keyring account.\n *\n * @param account - Snap keyring account.\n * @returns True if valid, false otherwise.\n */\nexport function isHdSnapKeyringAccount(\n account: InternalAccount,\n): account is HdSnapKeyringAccount {\n return is(account.options, HdSnapKeyringAccountOptionsStruct);\n}\n\nexport function constructAccountIdByAddress(\n accountsMap: Record<AccountId, InternalAccount>,\n): Record<string, AccountId> {\n const accounts = Object.values(accountsMap);\n return accounts.reduce<Record<string, AccountId>>((acc, account) => {\n acc[account.address] = account.id;\n return acc;\n }, {});\n}\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO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O,EAAE,iCAAiC,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,WAA+C;IAE/C,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC5C,OAAO,QAAQ,CAAC,MAAM,CAA4B,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;QACjE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC;QAClC,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC","sourcesContent":["import { KeyringType } from '@metamask/keyring-api/v2';\nimport type { KeyringObject } from '@metamask/keyring-controller';\nimport { KeyringTypes } from '@metamask/keyring-controller';\nimport type { InternalAccount } from '@metamask/keyring-internal-api';\nimport type { Infer } from '@metamask/superstruct';\nimport { is, number, string, type } from '@metamask/superstruct';\nimport { hexToBytes } from '@metamask/utils';\nimport { sha256 } from 'ethereum-cryptography/sha256';\nimport { v4 as uuid } from 'uuid';\n\nimport type { AccountId } from './AccountsController.js';\n\n// This is exported by the `uuid` package, but not importable in ESM.\ntype V4Options = Exclude<Parameters<typeof uuid>[0], undefined>;\n\n/**\n * Returns the name of the keyring type.\n *\n * @param keyringType - The type of the keyring.\n * @returns The name of the keyring type.\n */\nexport function keyringTypeToName(keyringType: string): string {\n switch (keyringType) {\n case KeyringTypes.simple: {\n return 'Account';\n }\n case KeyringTypes.hd: {\n return 'Account';\n }\n case KeyringTypes.trezor: {\n return 'Trezor';\n }\n case KeyringTypes.oneKey: {\n return 'OneKey';\n }\n case KeyringTypes.ledger: {\n return 'Ledger';\n }\n case KeyringTypes.lattice: {\n return 'Lattice';\n }\n case KeyringTypes.qr: {\n return 'QR';\n }\n case KeyringType.Snap:\n case KeyringTypes.snap: {\n return 'Snap Account';\n }\n // NOTE: We don't use those keyrings/accounts within this controller. However, since this\n // function only use the keyring type to return a name, we still support it here in case\n // clients need it.\n // FIXME: This should probably live in the `KeyringController` package instead.\n case KeyringTypes.money: {\n return 'Money';\n }\n case KeyringTypes.mpc: {\n return 'MPC';\n }\n default: {\n throw new Error(`Unknown keyring ${keyringType}`);\n }\n }\n}\n\n/**\n * Generates a UUID v4 options from a given Ethereum address.\n *\n * @param address - The Ethereum address to generate the UUID from.\n * @returns The UUID v4 options.\n */\nexport function getUUIDOptionsFromAddressOfNormalAccount(\n address: string,\n): V4Options {\n const v4options = {\n random: sha256(hexToBytes(address)).slice(0, 16),\n };\n\n return v4options;\n}\n\n/**\n * Generates a UUID from a given Ethereum address.\n *\n * @param address - The Ethereum address to generate the UUID from.\n * @returns The generated UUID.\n */\nexport function getUUIDFromAddressOfNormalAccount(address: string): string {\n return uuid(getUUIDOptionsFromAddressOfNormalAccount(address));\n}\n\n/**\n * Check if a keyring type is considered a \"normal\" keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is considered a \"normal\" keyring, false otherwise.\n */\nexport function isNormalKeyringType(\n keyringType: KeyringTypes | string,\n): boolean {\n return (\n !isSnapKeyringType(keyringType) &&\n !isSnapKeyringV2Type(keyringType) &&\n !isSkippedKeyringType(keyringType)\n );\n}\n\n/**\n * Check if a keyring type is a Snap keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is considered a Snap keyring, false otherwise.\n */\nexport function isSnapKeyringType(keyringType: KeyringTypes | string): boolean {\n return keyringType === (KeyringTypes.snap as string);\n}\n\n/**\n * Check if a keyring type is a Snap keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is considered a Snap keyring, false otherwise.\n */\nexport function isSnapKeyringV2Type(\n keyringType: KeyringTypes | KeyringType | string,\n): boolean {\n return keyringType === (KeyringType.Snap as string);\n}\n\n/**\n * Check if a keyring type is a simple keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is considered a simple keyring, false otherwise.\n */\nexport function isSimpleKeyringType(\n keyringType: KeyringTypes | string,\n): boolean {\n return keyringType === (KeyringTypes.simple as string);\n}\n\n/**\n * Check if a keyring is a HD keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring is a HD keyring, false otherwise.\n */\nexport function isHdKeyringType(keyringType: KeyringTypes | string): boolean {\n return keyringType === (KeyringTypes.hd as string);\n}\n\n/**\n * Check if a keyring type is a Money keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is a Money keyring, false otherwise.\n */\nexport function isMoneyKeyringType(\n keyringType: KeyringTypes | string,\n): boolean {\n return keyringType === (KeyringTypes.money as string);\n}\n\n/**\n * Check if a keyring type is a MPC keyring.\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is a MPC keyring, false otherwise.\n */\nexport function isMpcKeyringType(keyringType: KeyringTypes | string): boolean {\n return keyringType === (KeyringTypes.mpc as string);\n}\n\n/**\n * Check if a keyring type is a skipped keyring (Money or MPC keyring).\n *\n * A skipped keyring is one that should be ignored during account\n * re-synchronization with the `KeyringController` (through `:stateChange` events\n * or `updateAccounts` calls).\n *\n * @param keyringType - The account's keyring type.\n * @returns True if the keyring type is considered a skipped keyring, false otherwise.\n */\nexport function isSkippedKeyringType(\n keyringType: KeyringTypes | string,\n): boolean {\n return isMoneyKeyringType(keyringType) || isMpcKeyringType(keyringType);\n}\n\n/**\n * Get the derivation path for the index of an account within a EVM HD keyring.\n *\n * @param index - The account index.\n * @returns The derivation path.\n */\nexport function getEvmDerivationPathForIndex(index: number): string {\n const purpose = '44';\n const coinType = '60'; // Ethereum.\n return `m/${purpose}'/${coinType}'/0'/0/${index}`;\n}\n\n/**\n * Get the group index from a keyring object (EVM HD keyring only) and an address.\n *\n * @param keyring - The keyring object.\n * @param address - The address to match.\n * @returns The group index for that address, undefined if not able to match the address.\n */\nexport function getEvmGroupIndexFromAddressIndex(\n keyring: KeyringObject,\n address: string,\n): number | undefined {\n // TODO: Remove this function once EVM HD keyrings start using the new unified\n // keyring API.\n\n // NOTE: We mostly put that logic in a separate function so we can easily add coverage\n // for (supposedly) unreachable code path.\n\n if (!isHdKeyringType(keyring.type)) {\n // We cannot extract the group index from non-HD keyrings.\n return undefined;\n }\n\n // We need to find the account index from its HD keyring. We assume those\n // accounts are ordered, thus we can use their index to compute their\n // derivation path and group index.\n const groupIndex = keyring.accounts.findIndex(\n // NOTE: This is ok to use `toLowerCase` here, since we're only dealing\n // with EVM addresses.\n (accountAddress) => accountAddress.toLowerCase() === address.toLowerCase(),\n );\n\n // If for some reason, we cannot find this address, then the caller made a mistake\n // and it did not use the proper keyring object. For now, we do not fail and just\n // consider this account as \"simple account\".\n if (groupIndex === -1) {\n console.warn(`! Unable to get group index for HD account: \"${address}\"`);\n return undefined;\n }\n\n return groupIndex;\n}\n\n/**\n * HD keyring account for Snap accounts that handles non-EVM HD accounts. (e.g the\n * Solana Snap).\n *\n * NOTE: We use `superstruct.type` here `superstruct.object` since it allows\n * extra-properties than a Snap might add in its `options`.\n */\nexport const HdSnapKeyringAccountOptionsStruct = type({\n entropySource: string(),\n index: number(),\n derivationPath: string(),\n});\nexport type HdSnapKeyringAccountOptions = Infer<\n typeof HdSnapKeyringAccountOptionsStruct\n>;\n\n/**\n * HD keyring account for Snap accounts that handles non-EVM HD accounts.\n */\nexport type HdSnapKeyringAccount = InternalAccount & {\n options: InternalAccount['options'] & HdSnapKeyringAccountOptions;\n};\n\n/**\n * Check if an account is an HD Snap keyring account.\n *\n * @param account - Snap keyring account.\n * @returns True if valid, false otherwise.\n */\nexport function isHdSnapKeyringAccount(\n account: InternalAccount,\n): account is HdSnapKeyringAccount {\n return is(account.options, HdSnapKeyringAccountOptionsStruct);\n}\n\nexport function constructAccountIdByAddress(\n accountsMap: Record<AccountId, InternalAccount>,\n): Record<string, AccountId> {\n const accounts = Object.values(accountsMap);\n return accounts.reduce<Record<string, AccountId>>((acc, account) => {\n acc[account.address] = account.id;\n return acc;\n }, {});\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/accounts-controller",
|
|
3
|
-
"version": "40.0.0-preview-
|
|
3
|
+
"version": "40.0.0-preview-0305ce0",
|
|
4
4
|
"description": "Manages internal accounts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ethereum",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"build:only-clean": "rimraf './dist' './tsconfig.build.tsbuildinfo'",
|
|
40
40
|
"changelog:update": "../../scripts/update-changelog.sh @metamask/accounts-controller",
|
|
41
41
|
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/accounts-controller",
|
|
42
|
-
"lint:tsconfigs": "
|
|
43
|
-
"lint:tsconfigs:fix": "
|
|
44
|
-
"messenger-action-types:check": "
|
|
45
|
-
"messenger-action-types:generate": "
|
|
42
|
+
"lint:tsconfigs": "node --import ../../scripts/resolver/register.ts --experimental-transform-types ../../scripts/lint-tsconfigs/lint-tsconfigs.ts",
|
|
43
|
+
"lint:tsconfigs:fix": "node --import ../../scripts/resolver/register.ts --experimental-transform-types ../../scripts/lint-tsconfigs/lint-tsconfigs.ts --fix",
|
|
44
|
+
"messenger-action-types:check": "node --import ../../scripts/resolver/register.ts --experimental-transform-types ../../packages/messenger-cli/src/cli.ts --formatter oxfmt --esm --check",
|
|
45
|
+
"messenger-action-types:generate": "node --import ../../scripts/resolver/register.ts --experimental-transform-types ../../packages/messenger-cli/src/cli.ts --formatter oxfmt --esm --generate",
|
|
46
46
|
"since-latest-release": "../../scripts/since-latest-release.sh",
|
|
47
47
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
|
|
48
48
|
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@metamask/keyring-sdk": "^3.1.0",
|
|
60
60
|
"@metamask/keyring-utils": "^5.0.0",
|
|
61
61
|
"@metamask/messenger": "^3.0.0",
|
|
62
|
-
"@metamask/network-controller": "^37.0.
|
|
62
|
+
"@metamask/network-controller": "^37.0.1",
|
|
63
63
|
"@metamask/superstruct": "^3.4.1",
|
|
64
64
|
"@metamask/utils": "^12.0.0",
|
|
65
65
|
"deepmerge": "^4.3.1",
|
|
@@ -78,7 +78,6 @@
|
|
|
78
78
|
"jest": "^30.5.2",
|
|
79
79
|
"rimraf": "^6.1.3",
|
|
80
80
|
"ts-jest": "^29.4.14",
|
|
81
|
-
"tsx": "^4.23.15",
|
|
82
81
|
"typedoc": "^0.25.13",
|
|
83
82
|
"typedoc-plugin-missing-exports": "^2.0.0",
|
|
84
83
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|