1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

[FLASK] snaps@0.34.0-flask.1 (#19377)

* snaps@0.34.0-flask.1

* Update LavaMoat policies

* Replace instances of targetKey with targetName

* Replace use of PermissionKeys with PermissionNames

* Use Flask packages in tests for now

* Bump execution env

* Add another mock

* Fix lint
This commit is contained in:
Frederik Bolding 2023-06-05 13:51:19 +02:00 committed by GitHub
parent 1726fb3fd0
commit f03f2d3f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 379 additions and 210 deletions

View File

@ -8,15 +8,17 @@ import {
ExcludedSnapPermissions, ExcludedSnapPermissions,
} from '../../../../../shared/constants/permissions'; } from '../../../../../shared/constants/permissions';
// TODO: Use the exported versions of these functions from the snaps monorepo after stable release.
/** /**
* @returns {Record<string, Record<string, unknown>>} All endowment permission * @returns {Record<string, Record<string, unknown>>} All endowment permission
* specifications. * specifications.
*/ */
export const buildSnapEndowmentSpecifications = () => export const buildSnapEndowmentSpecifications = () =>
Object.values(endowmentPermissionBuilders).reduce( Object.values(endowmentPermissionBuilders).reduce(
(allSpecifications, { targetKey, specificationBuilder }) => { (allSpecifications, { targetName, specificationBuilder }) => {
if (!Object.keys(ExcludedSnapEndowments).includes(targetKey)) { if (!Object.keys(ExcludedSnapEndowments).includes(targetName)) {
allSpecifications[targetKey] = specificationBuilder(); allSpecifications[targetName] = specificationBuilder();
} }
return allSpecifications; return allSpecifications;
}, },
@ -29,9 +31,9 @@ export const buildSnapEndowmentSpecifications = () =>
*/ */
export const buildSnapRestrictedMethodSpecifications = (hooks) => export const buildSnapRestrictedMethodSpecifications = (hooks) =>
Object.values(restrictedMethodPermissionBuilders).reduce( Object.values(restrictedMethodPermissionBuilders).reduce(
(specifications, { targetKey, specificationBuilder, methodHooks }) => { (specifications, { targetName, specificationBuilder, methodHooks }) => {
if (!Object.keys(ExcludedSnapPermissions).includes(targetKey)) { if (!Object.keys(ExcludedSnapPermissions).includes(targetName)) {
specifications[targetKey] = specificationBuilder({ specifications[targetName] = specificationBuilder({
methodHooks: selectHooks(hooks, methodHooks), methodHooks: selectHooks(hooks, methodHooks),
}); });
} }

View File

@ -8,6 +8,14 @@ import {
buildSnapRestrictedMethodSpecifications, buildSnapRestrictedMethodSpecifications,
} from './snap-permissions'; } from './snap-permissions';
// Temporarily replace the snaps packages with the Flask versions.
jest.mock('@metamask/snaps-controllers', () =>
jest.requireActual('@metamask/snaps-controllers-flask'),
);
jest.mock('@metamask/rpc-methods', () =>
jest.requireActual('@metamask/rpc-methods-flask'),
);
describe('buildSnapRestrictedMethodSpecifications', () => { describe('buildSnapRestrictedMethodSpecifications', () => {
it('creates valid permission specification objects', () => { it('creates valid permission specification objects', () => {
const hooks = { const hooks = {
@ -29,7 +37,7 @@ describe('buildSnapRestrictedMethodSpecifications', () => {
Object.values(specifications).forEach((specification) => { Object.values(specifications).forEach((specification) => {
expect(specification).toMatchObject({ expect(specification).toMatchObject({
targetKey: expect.stringMatching(/^(snap_|wallet_)/u), targetName: expect.stringMatching(/^(snap_|wallet_)/u),
methodImplementation: expect.any(Function), methodImplementation: expect.any(Function),
}); });
}); });
@ -43,8 +51,8 @@ describe('buildSnapEndowmentSpecifications', () => {
).toStrictEqual( ).toStrictEqual(
Object.keys(EndowmentPermissions) Object.keys(EndowmentPermissions)
.filter( .filter(
(targetKey) => (targetName) =>
!Object.keys(ExcludedSnapEndowments).includes(targetKey), !Object.keys(ExcludedSnapEndowments).includes(targetName),
) )
.sort(), .sort(),
); );

View File

@ -21,7 +21,7 @@ import {
* The "keys" of all of permissions recognized by the PermissionController. * The "keys" of all of permissions recognized by the PermissionController.
* Permission keys and names have distinct meanings in the permission system. * Permission keys and names have distinct meanings in the permission system.
*/ */
const PermissionKeys = Object.freeze({ const PermissionNames = Object.freeze({
...RestrictedMethods, ...RestrictedMethods,
}); });
@ -101,22 +101,22 @@ export const getPermissionSpecifications = ({
captureKeyringTypesWithMissingIdentities, captureKeyringTypesWithMissingIdentities,
}) => { }) => {
return { return {
[PermissionKeys.eth_accounts]: { [PermissionNames.eth_accounts]: {
permissionType: PermissionType.RestrictedMethod, permissionType: PermissionType.RestrictedMethod,
targetKey: PermissionKeys.eth_accounts, targetName: PermissionNames.eth_accounts,
allowedCaveats: [CaveatTypes.restrictReturnedAccounts], allowedCaveats: [CaveatTypes.restrictReturnedAccounts],
factory: (permissionOptions, requestData) => { factory: (permissionOptions, requestData) => {
if (Array.isArray(permissionOptions.caveats)) { if (Array.isArray(permissionOptions.caveats)) {
throw new Error( throw new Error(
`${PermissionKeys.eth_accounts} error: Received unexpected caveats. Any permitted caveats will be added automatically.`, `${PermissionNames.eth_accounts} error: Received unexpected caveats. Any permitted caveats will be added automatically.`,
); );
} }
// This value will be further validated as part of the caveat. // This value will be further validated as part of the caveat.
if (!requestData.approvedAccounts) { if (!requestData.approvedAccounts) {
throw new Error( throw new Error(
`${PermissionKeys.eth_accounts} error: No approved accounts specified.`, `${PermissionNames.eth_accounts} error: No approved accounts specified.`,
); );
} }
@ -169,7 +169,7 @@ export const getPermissionSpecifications = ({
caveats[0].type !== CaveatTypes.restrictReturnedAccounts caveats[0].type !== CaveatTypes.restrictReturnedAccounts
) { ) {
throw new Error( throw new Error(
`${PermissionKeys.eth_accounts} error: Invalid caveats. There must be a single caveat of type "${CaveatTypes.restrictReturnedAccounts}".`, `${PermissionNames.eth_accounts} error: Invalid caveats. There must be a single caveat of type "${CaveatTypes.restrictReturnedAccounts}".`,
); );
} }
}, },
@ -189,7 +189,7 @@ export const getPermissionSpecifications = ({
function validateCaveatAccounts(accounts, getIdentities) { function validateCaveatAccounts(accounts, getIdentities) {
if (!Array.isArray(accounts) || accounts.length === 0) { if (!Array.isArray(accounts) || accounts.length === 0) {
throw new Error( throw new Error(
`${PermissionKeys.eth_accounts} error: Expected non-empty array of Ethereum addresses.`, `${PermissionNames.eth_accounts} error: Expected non-empty array of Ethereum addresses.`,
); );
} }
@ -197,13 +197,13 @@ function validateCaveatAccounts(accounts, getIdentities) {
accounts.forEach((address) => { accounts.forEach((address) => {
if (!address || typeof address !== 'string') { if (!address || typeof address !== 'string') {
throw new Error( throw new Error(
`${PermissionKeys.eth_accounts} error: Expected an array of Ethereum addresses. Received: "${address}".`, `${PermissionNames.eth_accounts} error: Expected an array of Ethereum addresses. Received: "${address}".`,
); );
} }
if (!identities[address]) { if (!identities[address]) {
throw new Error( throw new Error(
`${PermissionKeys.eth_accounts} error: Received unrecognized address: "${address}".`, `${PermissionNames.eth_accounts} error: Received unrecognized address: "${address}".`,
); );
} }
}); });

View File

@ -144,7 +144,7 @@ describe('PermissionController specifications', () => {
const permissionSpecifications = getPermissionSpecifications({}); const permissionSpecifications = getPermissionSpecifications({});
expect(Object.keys(permissionSpecifications)).toHaveLength(1); expect(Object.keys(permissionSpecifications)).toHaveLength(1);
expect( expect(
permissionSpecifications[RestrictedMethods.eth_accounts].targetKey, permissionSpecifications[RestrictedMethods.eth_accounts].targetName,
).toStrictEqual(RestrictedMethods.eth_accounts); ).toStrictEqual(RestrictedMethods.eth_accounts);
}); });

View File

@ -43,11 +43,26 @@ const createLoggerMiddlewareMock = () => (req, res, next) => {
next(); next();
}; };
// Temporarily replace the snaps packages with the Flask versions.
const proxyPermissions = proxyquire('./controllers/permissions', {
'./snaps/snap-permissions': proxyquire(
'./controllers/permissions/snaps/snap-permissions',
{
// eslint-disable-next-line node/global-require
'@metamask/snaps-controllers': require('@metamask/snaps-controllers-flask'),
// eslint-disable-next-line node/global-require
'@metamask/rpc-methods': require('@metamask/rpc-methods-flask'),
},
),
});
const TEST_SEED = const TEST_SEED =
'debris dizzy just program just float decrease vacant alarm reduce speak stadium'; 'debris dizzy just program just float decrease vacant alarm reduce speak stadium';
const MetaMaskController = proxyquire('./metamask-controller', { const MetaMaskController = proxyquire('./metamask-controller', {
'./lib/createLoggerMiddleware': { default: createLoggerMiddlewareMock }, './lib/createLoggerMiddleware': { default: createLoggerMiddlewareMock },
// Temporarily replace the snaps packages with the Flask versions.
'./controllers/permissions': proxyPermissions,
}).default; }).default;
describe('MetaMaskController', function () { describe('MetaMaskController', function () {

View File

@ -72,6 +72,19 @@ function MockEthContract() {
}; };
} }
// Temporarily replace the snaps packages with the Flask versions.
const proxyPermissions = proxyquire('./controllers/permissions', {
'./snaps/snap-permissions': proxyquire(
'./controllers/permissions/snaps/snap-permissions',
{
// eslint-disable-next-line node/global-require
'@metamask/snaps-controllers': require('@metamask/snaps-controllers-flask'),
// eslint-disable-next-line node/global-require
'@metamask/rpc-methods': require('@metamask/rpc-methods-flask'),
},
),
});
// TODO, Feb 24, 2023: // TODO, Feb 24, 2023:
// ethjs-contract is being added to proxyquire, but we might want to discontinue proxyquire // ethjs-contract is being added to proxyquire, but we might want to discontinue proxyquire
// this is for expediency as we resolve a bug for v10.26.0. The proper solution here would have // this is for expediency as we resolve a bug for v10.26.0. The proper solution here would have
@ -80,10 +93,14 @@ function MockEthContract() {
const MetaMaskController = proxyquire('./metamask-controller', { const MetaMaskController = proxyquire('./metamask-controller', {
'./lib/createLoggerMiddleware': { default: createLoggerMiddlewareMock }, './lib/createLoggerMiddleware': { default: createLoggerMiddlewareMock },
'ethjs-contract': MockEthContract, 'ethjs-contract': MockEthContract,
// Temporarily replace the snaps packages with the Flask versions.
'./controllers/permissions': proxyPermissions,
}).default; }).default;
const MetaMaskControllerMV3 = proxyquire('./metamask-controller', { const MetaMaskControllerMV3 = proxyquire('./metamask-controller', {
'../../shared/modules/mv3.utils': { isManifestV3: true }, '../../shared/modules/mv3.utils': { isManifestV3: true },
// Temporarily replace the snaps packages with the Flask versions.
'./controllers/permissions': proxyPermissions,
}).default; }).default;
const currentNetworkId = '5'; const currentNetworkId = '5';

View File

@ -50,7 +50,7 @@ buildTypes:
- SEGMENT_FLASK_WRITE_KEY - SEGMENT_FLASK_WRITE_KEY
- ALLOW_LOCAL_SNAPS: true - ALLOW_LOCAL_SNAPS: true
- REQUIRE_SNAPS_ALLOWLIST: false - REQUIRE_SNAPS_ALLOWLIST: false
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/0.16.0-flask.1/index.html - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/0.16.1-flask.1/index.html
- SUPPORT_LINK: https://metamask-flask.zendesk.com/hc - SUPPORT_LINK: https://metamask-flask.zendesk.com/hc
- SUPPORT_REQUEST_LINK: https://metamask-flask.zendesk.com/hc/en-us/requests/new - SUPPORT_REQUEST_LINK: https://metamask-flask.zendesk.com/hc/en-us/requests/new
- INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID - INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID
@ -68,7 +68,7 @@ buildTypes:
- SEGMENT_FLASK_WRITE_KEY - SEGMENT_FLASK_WRITE_KEY
- ALLOW_LOCAL_SNAPS: true - ALLOW_LOCAL_SNAPS: true
- REQUIRE_SNAPS_ALLOWLIST: false - REQUIRE_SNAPS_ALLOWLIST: false
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/0.16.0-flask.1/index.html - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/0.16.1-flask.1/index.html
- SUPPORT_LINK: https://metamask-flask.zendesk.com/hc - SUPPORT_LINK: https://metamask-flask.zendesk.com/hc
- SUPPORT_REQUEST_LINK: https://metamask-flask.zendesk.com/hc/en-us/requests/new - SUPPORT_REQUEST_LINK: https://metamask-flask.zendesk.com/hc/en-us/requests/new
- INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID - INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID

View File

@ -1673,37 +1673,16 @@
"console.error": true "console.error": true
}, },
"packages": { "packages": {
"@metamask/permission-controller>@metamask/base-controller": true, "@metamask/base-controller": true,
"@metamask/permission-controller>@metamask/controller-utils": true, "@metamask/controller-utils": true,
"@metamask/permission-controller>nanoid": true, "@metamask/permission-controller>nanoid": true,
"@metamask/utils": true,
"deep-freeze-strict": true, "deep-freeze-strict": true,
"eth-rpc-errors": true, "eth-rpc-errors": true,
"immer": true, "immer": true,
"json-rpc-engine": true "json-rpc-engine": true
} }
}, },
"@metamask/permission-controller>@metamask/base-controller": {
"packages": {
"immer": true
}
},
"@metamask/permission-controller>@metamask/controller-utils": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
"ethereumjs-util": true,
"ethjs>ethjs-unit": true
}
},
"@metamask/permission-controller>nanoid": { "@metamask/permission-controller>nanoid": {
"globals": { "globals": {
"crypto.getRandomValues": true "crypto.getRandomValues": true

View File

@ -1751,37 +1751,16 @@
"console.error": true "console.error": true
}, },
"packages": { "packages": {
"@metamask/permission-controller>@metamask/base-controller": true, "@metamask/base-controller": true,
"@metamask/permission-controller>@metamask/controller-utils": true, "@metamask/controller-utils": true,
"@metamask/permission-controller>nanoid": true, "@metamask/permission-controller>nanoid": true,
"@metamask/utils": true,
"deep-freeze-strict": true, "deep-freeze-strict": true,
"eth-rpc-errors": true, "eth-rpc-errors": true,
"immer": true, "immer": true,
"json-rpc-engine": true "json-rpc-engine": true
} }
}, },
"@metamask/permission-controller>@metamask/base-controller": {
"packages": {
"immer": true
}
},
"@metamask/permission-controller>@metamask/controller-utils": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
"ethereumjs-util": true,
"ethjs>ethjs-unit": true
}
},
"@metamask/permission-controller>nanoid": { "@metamask/permission-controller>nanoid": {
"globals": { "globals": {
"crypto.getRandomValues": true "crypto.getRandomValues": true
@ -1902,15 +1881,15 @@
"@metamask/permission-controller": true, "@metamask/permission-controller": true,
"@metamask/rpc-methods-flask>@metamask/snaps-ui": true, "@metamask/rpc-methods-flask>@metamask/snaps-ui": true,
"@metamask/rpc-methods-flask>@metamask/snaps-utils": true, "@metamask/rpc-methods-flask>@metamask/snaps-utils": true,
"@metamask/rpc-methods-flask>@metamask/utils": true,
"@metamask/rpc-methods-flask>nanoid": true, "@metamask/rpc-methods-flask>nanoid": true,
"@metamask/utils": true,
"eth-rpc-errors": true, "eth-rpc-errors": true,
"superstruct": true "superstruct": true
} }
}, },
"@metamask/rpc-methods-flask>@metamask/snaps-ui": { "@metamask/rpc-methods-flask>@metamask/snaps-ui": {
"packages": { "packages": {
"@metamask/utils": true, "@metamask/rpc-methods-flask>@metamask/utils": true,
"superstruct": true "superstruct": true
} }
}, },
@ -1927,11 +1906,25 @@
"packages": { "packages": {
"@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@noble/hashes": true,
"@metamask/key-tree>@scure/base": true, "@metamask/key-tree>@scure/base": true,
"@metamask/rpc-methods-flask>@metamask/utils": true,
"@metamask/snaps-utils-flask>is-svg": true,
"@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>cron-parser": true,
"@metamask/snaps-utils>fast-json-stable-stringify": true, "@metamask/snaps-utils>fast-json-stable-stringify": true,
"@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true, "@metamask/snaps-utils>validate-npm-package-name": true,
"@metamask/utils": true, "browserify>buffer": true,
"semver": true,
"superstruct": true
}
},
"@metamask/rpc-methods-flask>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"browserify>buffer": true,
"nock>debug": true,
"semver": true, "semver": true,
"superstruct": true "superstruct": true
} }
@ -2087,12 +2080,13 @@
"setTimeout": true "setTimeout": true
}, },
"packages": { "packages": {
"@metamask/base-controller": true,
"@metamask/permission-controller": true, "@metamask/permission-controller": true,
"@metamask/post-message-stream": true, "@metamask/post-message-stream": true,
"@metamask/providers>@metamask/object-multiplex": true, "@metamask/providers>@metamask/object-multiplex": true,
"@metamask/snaps-controllers-flask>@metamask/base-controller": true,
"@metamask/snaps-controllers-flask>@metamask/rpc-methods": true, "@metamask/snaps-controllers-flask>@metamask/rpc-methods": true,
"@metamask/snaps-controllers-flask>@metamask/snaps-utils": true, "@metamask/snaps-controllers-flask>@metamask/snaps-utils": true,
"@metamask/snaps-controllers-flask>@metamask/utils": true,
"@metamask/snaps-controllers-flask>concat-stream": true, "@metamask/snaps-controllers-flask>concat-stream": true,
"@metamask/snaps-controllers-flask>nanoid": true, "@metamask/snaps-controllers-flask>nanoid": true,
"@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>@xstate/fsm": true,
@ -2100,18 +2094,12 @@
"@metamask/snaps-controllers>readable-web-to-node-stream": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true,
"@metamask/snaps-controllers>tar-stream": true, "@metamask/snaps-controllers>tar-stream": true,
"@metamask/snaps-utils>@metamask/snaps-registry": true, "@metamask/snaps-utils>@metamask/snaps-registry": true,
"@metamask/utils": true,
"eth-rpc-errors": true, "eth-rpc-errors": true,
"json-rpc-engine": true, "json-rpc-engine": true,
"json-rpc-middleware-stream": true, "json-rpc-middleware-stream": true,
"pump": true "pump": true
} }
}, },
"@metamask/snaps-controllers-flask>@metamask/base-controller": {
"packages": {
"immer": true
}
},
"@metamask/snaps-controllers-flask>@metamask/rpc-methods": { "@metamask/snaps-controllers-flask>@metamask/rpc-methods": {
"packages": { "packages": {
"@metamask/key-tree": true, "@metamask/key-tree": true,
@ -2119,8 +2107,8 @@
"@metamask/permission-controller": true, "@metamask/permission-controller": true,
"@metamask/snaps-controllers-flask>@metamask/snaps-utils": true, "@metamask/snaps-controllers-flask>@metamask/snaps-utils": true,
"@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": true, "@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": true,
"@metamask/snaps-controllers-flask>@metamask/utils": true,
"@metamask/snaps-controllers-flask>nanoid": true, "@metamask/snaps-controllers-flask>nanoid": true,
"@metamask/utils": true,
"eth-rpc-errors": true, "eth-rpc-errors": true,
"superstruct": true "superstruct": true
} }
@ -2138,18 +2126,32 @@
"packages": { "packages": {
"@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@noble/hashes": true,
"@metamask/key-tree>@scure/base": true, "@metamask/key-tree>@scure/base": true,
"@metamask/snaps-controllers-flask>@metamask/utils": true,
"@metamask/snaps-utils-flask>is-svg": true,
"@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>cron-parser": true,
"@metamask/snaps-utils>fast-json-stable-stringify": true, "@metamask/snaps-utils>fast-json-stable-stringify": true,
"@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true, "@metamask/snaps-utils>validate-npm-package-name": true,
"@metamask/utils": true, "browserify>buffer": true,
"semver": true, "semver": true,
"superstruct": true "superstruct": true
} }
}, },
"@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": { "@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": {
"packages": { "packages": {
"@metamask/utils": true, "@metamask/snaps-controllers-flask>@metamask/utils": true,
"superstruct": true
}
},
"@metamask/snaps-controllers-flask>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true "superstruct": true
} }
}, },
@ -2306,7 +2308,19 @@
}, },
"@metamask/snaps-ui-flask": { "@metamask/snaps-ui-flask": {
"packages": { "packages": {
"@metamask/utils": true, "@metamask/snaps-ui-flask>@metamask/utils": true,
"superstruct": true
}
},
"@metamask/snaps-ui-flask>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true "superstruct": true
} }
}, },
@ -2323,19 +2337,59 @@
"packages": { "packages": {
"@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@noble/hashes": true,
"@metamask/key-tree>@scure/base": true, "@metamask/key-tree>@scure/base": true,
"@metamask/snaps-utils-flask>@metamask/utils": true,
"@metamask/snaps-utils-flask>is-svg": true,
"@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>cron-parser": true,
"@metamask/snaps-utils>fast-json-stable-stringify": true, "@metamask/snaps-utils>fast-json-stable-stringify": true,
"@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true, "@metamask/snaps-utils>validate-npm-package-name": true,
"@metamask/utils": true, "browserify>buffer": true,
"semver": true, "semver": true,
"superstruct": true "superstruct": true
} }
}, },
"@metamask/snaps-utils-flask>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true
}
},
"@metamask/snaps-utils-flask>is-svg": {
"packages": {
"@metamask/snaps-utils-flask>is-svg>fast-xml-parser": true
}
},
"@metamask/snaps-utils-flask>is-svg>fast-xml-parser": {
"globals": {
"entityName": true,
"val": true
},
"packages": {
"@metamask/snaps-utils-flask>is-svg>fast-xml-parser>strnum": true
}
},
"@metamask/snaps-utils>@metamask/snaps-registry": { "@metamask/snaps-utils>@metamask/snaps-registry": {
"packages": { "packages": {
"@metamask/key-tree>@noble/secp256k1": true, "@metamask/key-tree>@noble/secp256k1": true,
"@metamask/utils": true, "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": true,
"superstruct": true
}
},
"@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true "superstruct": true
} }
}, },

View File

@ -1751,37 +1751,16 @@
"console.error": true "console.error": true
}, },
"packages": { "packages": {
"@metamask/permission-controller>@metamask/base-controller": true, "@metamask/base-controller": true,
"@metamask/permission-controller>@metamask/controller-utils": true, "@metamask/controller-utils": true,
"@metamask/permission-controller>nanoid": true, "@metamask/permission-controller>nanoid": true,
"@metamask/utils": true,
"deep-freeze-strict": true, "deep-freeze-strict": true,
"eth-rpc-errors": true, "eth-rpc-errors": true,
"immer": true, "immer": true,
"json-rpc-engine": true "json-rpc-engine": true
} }
}, },
"@metamask/permission-controller>@metamask/base-controller": {
"packages": {
"immer": true
}
},
"@metamask/permission-controller>@metamask/controller-utils": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
"ethereumjs-util": true,
"ethjs>ethjs-unit": true
}
},
"@metamask/permission-controller>nanoid": { "@metamask/permission-controller>nanoid": {
"globals": { "globals": {
"crypto.getRandomValues": true "crypto.getRandomValues": true
@ -1902,15 +1881,15 @@
"@metamask/permission-controller": true, "@metamask/permission-controller": true,
"@metamask/rpc-methods-flask>@metamask/snaps-ui": true, "@metamask/rpc-methods-flask>@metamask/snaps-ui": true,
"@metamask/rpc-methods-flask>@metamask/snaps-utils": true, "@metamask/rpc-methods-flask>@metamask/snaps-utils": true,
"@metamask/rpc-methods-flask>@metamask/utils": true,
"@metamask/rpc-methods-flask>nanoid": true, "@metamask/rpc-methods-flask>nanoid": true,
"@metamask/utils": true,
"eth-rpc-errors": true, "eth-rpc-errors": true,
"superstruct": true "superstruct": true
} }
}, },
"@metamask/rpc-methods-flask>@metamask/snaps-ui": { "@metamask/rpc-methods-flask>@metamask/snaps-ui": {
"packages": { "packages": {
"@metamask/utils": true, "@metamask/rpc-methods-flask>@metamask/utils": true,
"superstruct": true "superstruct": true
} }
}, },
@ -1927,11 +1906,25 @@
"packages": { "packages": {
"@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@noble/hashes": true,
"@metamask/key-tree>@scure/base": true, "@metamask/key-tree>@scure/base": true,
"@metamask/rpc-methods-flask>@metamask/utils": true,
"@metamask/snaps-utils-flask>is-svg": true,
"@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>cron-parser": true,
"@metamask/snaps-utils>fast-json-stable-stringify": true, "@metamask/snaps-utils>fast-json-stable-stringify": true,
"@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true, "@metamask/snaps-utils>validate-npm-package-name": true,
"@metamask/utils": true, "browserify>buffer": true,
"semver": true,
"superstruct": true
}
},
"@metamask/rpc-methods-flask>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"browserify>buffer": true,
"nock>debug": true,
"semver": true, "semver": true,
"superstruct": true "superstruct": true
} }
@ -2087,12 +2080,13 @@
"setTimeout": true "setTimeout": true
}, },
"packages": { "packages": {
"@metamask/base-controller": true,
"@metamask/permission-controller": true, "@metamask/permission-controller": true,
"@metamask/post-message-stream": true, "@metamask/post-message-stream": true,
"@metamask/providers>@metamask/object-multiplex": true, "@metamask/providers>@metamask/object-multiplex": true,
"@metamask/snaps-controllers-flask>@metamask/base-controller": true,
"@metamask/snaps-controllers-flask>@metamask/rpc-methods": true, "@metamask/snaps-controllers-flask>@metamask/rpc-methods": true,
"@metamask/snaps-controllers-flask>@metamask/snaps-utils": true, "@metamask/snaps-controllers-flask>@metamask/snaps-utils": true,
"@metamask/snaps-controllers-flask>@metamask/utils": true,
"@metamask/snaps-controllers-flask>concat-stream": true, "@metamask/snaps-controllers-flask>concat-stream": true,
"@metamask/snaps-controllers-flask>nanoid": true, "@metamask/snaps-controllers-flask>nanoid": true,
"@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>@xstate/fsm": true,
@ -2100,18 +2094,12 @@
"@metamask/snaps-controllers>readable-web-to-node-stream": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true,
"@metamask/snaps-controllers>tar-stream": true, "@metamask/snaps-controllers>tar-stream": true,
"@metamask/snaps-utils>@metamask/snaps-registry": true, "@metamask/snaps-utils>@metamask/snaps-registry": true,
"@metamask/utils": true,
"eth-rpc-errors": true, "eth-rpc-errors": true,
"json-rpc-engine": true, "json-rpc-engine": true,
"json-rpc-middleware-stream": true, "json-rpc-middleware-stream": true,
"pump": true "pump": true
} }
}, },
"@metamask/snaps-controllers-flask>@metamask/base-controller": {
"packages": {
"immer": true
}
},
"@metamask/snaps-controllers-flask>@metamask/rpc-methods": { "@metamask/snaps-controllers-flask>@metamask/rpc-methods": {
"packages": { "packages": {
"@metamask/key-tree": true, "@metamask/key-tree": true,
@ -2119,8 +2107,8 @@
"@metamask/permission-controller": true, "@metamask/permission-controller": true,
"@metamask/snaps-controllers-flask>@metamask/snaps-utils": true, "@metamask/snaps-controllers-flask>@metamask/snaps-utils": true,
"@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": true, "@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": true,
"@metamask/snaps-controllers-flask>@metamask/utils": true,
"@metamask/snaps-controllers-flask>nanoid": true, "@metamask/snaps-controllers-flask>nanoid": true,
"@metamask/utils": true,
"eth-rpc-errors": true, "eth-rpc-errors": true,
"superstruct": true "superstruct": true
} }
@ -2138,18 +2126,32 @@
"packages": { "packages": {
"@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@noble/hashes": true,
"@metamask/key-tree>@scure/base": true, "@metamask/key-tree>@scure/base": true,
"@metamask/snaps-controllers-flask>@metamask/utils": true,
"@metamask/snaps-utils-flask>is-svg": true,
"@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>cron-parser": true,
"@metamask/snaps-utils>fast-json-stable-stringify": true, "@metamask/snaps-utils>fast-json-stable-stringify": true,
"@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true, "@metamask/snaps-utils>validate-npm-package-name": true,
"@metamask/utils": true, "browserify>buffer": true,
"semver": true, "semver": true,
"superstruct": true "superstruct": true
} }
}, },
"@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": { "@metamask/snaps-controllers-flask>@metamask/snaps-utils>@metamask/snaps-ui": {
"packages": { "packages": {
"@metamask/utils": true, "@metamask/snaps-controllers-flask>@metamask/utils": true,
"superstruct": true
}
},
"@metamask/snaps-controllers-flask>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true "superstruct": true
} }
}, },
@ -2306,7 +2308,19 @@
}, },
"@metamask/snaps-ui-flask": { "@metamask/snaps-ui-flask": {
"packages": { "packages": {
"@metamask/utils": true, "@metamask/snaps-ui-flask>@metamask/utils": true,
"superstruct": true
}
},
"@metamask/snaps-ui-flask>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true "superstruct": true
} }
}, },
@ -2323,19 +2337,59 @@
"packages": { "packages": {
"@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@noble/hashes": true,
"@metamask/key-tree>@scure/base": true, "@metamask/key-tree>@scure/base": true,
"@metamask/snaps-utils-flask>@metamask/utils": true,
"@metamask/snaps-utils-flask>is-svg": true,
"@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>cron-parser": true,
"@metamask/snaps-utils>fast-json-stable-stringify": true, "@metamask/snaps-utils>fast-json-stable-stringify": true,
"@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>rfdc": true,
"@metamask/snaps-utils>validate-npm-package-name": true, "@metamask/snaps-utils>validate-npm-package-name": true,
"@metamask/utils": true, "browserify>buffer": true,
"semver": true, "semver": true,
"superstruct": true "superstruct": true
} }
}, },
"@metamask/snaps-utils-flask>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true
}
},
"@metamask/snaps-utils-flask>is-svg": {
"packages": {
"@metamask/snaps-utils-flask>is-svg>fast-xml-parser": true
}
},
"@metamask/snaps-utils-flask>is-svg>fast-xml-parser": {
"globals": {
"entityName": true,
"val": true
},
"packages": {
"@metamask/snaps-utils-flask>is-svg>fast-xml-parser>strnum": true
}
},
"@metamask/snaps-utils>@metamask/snaps-registry": { "@metamask/snaps-utils>@metamask/snaps-registry": {
"packages": { "packages": {
"@metamask/key-tree>@noble/secp256k1": true, "@metamask/key-tree>@noble/secp256k1": true,
"@metamask/utils": true, "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": true,
"superstruct": true
}
},
"@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"browserify>buffer": true,
"nock>debug": true,
"semver": true,
"superstruct": true "superstruct": true
} }
}, },

View File

@ -1673,37 +1673,16 @@
"console.error": true "console.error": true
}, },
"packages": { "packages": {
"@metamask/permission-controller>@metamask/base-controller": true, "@metamask/base-controller": true,
"@metamask/permission-controller>@metamask/controller-utils": true, "@metamask/controller-utils": true,
"@metamask/permission-controller>nanoid": true, "@metamask/permission-controller>nanoid": true,
"@metamask/utils": true,
"deep-freeze-strict": true, "deep-freeze-strict": true,
"eth-rpc-errors": true, "eth-rpc-errors": true,
"immer": true, "immer": true,
"json-rpc-engine": true "json-rpc-engine": true
} }
}, },
"@metamask/permission-controller>@metamask/base-controller": {
"packages": {
"immer": true
}
},
"@metamask/permission-controller>@metamask/controller-utils": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/utils": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true,
"ethereumjs-util": true,
"ethjs>ethjs-unit": true
}
},
"@metamask/permission-controller>nanoid": { "@metamask/permission-controller>nanoid": {
"globals": { "globals": {
"crypto.getRandomValues": true "crypto.getRandomValues": true

View File

@ -252,24 +252,24 @@
"@metamask/metamask-eth-abis": "^3.0.0", "@metamask/metamask-eth-abis": "^3.0.0",
"@metamask/notification-controller": "^3.0.0", "@metamask/notification-controller": "^3.0.0",
"@metamask/obs-store": "^8.1.0", "@metamask/obs-store": "^8.1.0",
"@metamask/permission-controller": "^3.2.0", "@metamask/permission-controller": "^4.0.0",
"@metamask/phishing-controller": "^3.0.0", "@metamask/phishing-controller": "^3.0.0",
"@metamask/post-message-stream": "^6.0.0", "@metamask/post-message-stream": "^6.0.0",
"@metamask/providers": "^10.2.1", "@metamask/providers": "^10.2.1",
"@metamask/rate-limit-controller": "^2.0.0", "@metamask/rate-limit-controller": "^2.0.0",
"@metamask/rpc-methods": "^0.32.2", "@metamask/rpc-methods": "^0.32.2",
"@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.33.1-flask.1", "@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.34.0-flask.1",
"@metamask/safe-event-emitter": "^2.0.0", "@metamask/safe-event-emitter": "^2.0.0",
"@metamask/scure-bip39": "^2.0.3", "@metamask/scure-bip39": "^2.0.3",
"@metamask/signature-controller": "^2.0.0", "@metamask/signature-controller": "^2.0.0",
"@metamask/slip44": "^3.0.0", "@metamask/slip44": "^3.0.0",
"@metamask/smart-transactions-controller": "^3.1.0", "@metamask/smart-transactions-controller": "^3.1.0",
"@metamask/snaps-controllers": "^0.32.2", "@metamask/snaps-controllers": "^0.32.2",
"@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.33.1-flask.1", "@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.34.0-flask.1",
"@metamask/snaps-ui": "^0.32.2", "@metamask/snaps-ui": "^0.32.2",
"@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.33.1-flask.1", "@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.34.0-flask.1",
"@metamask/snaps-utils": "^0.32.2", "@metamask/snaps-utils": "^0.32.2",
"@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.33.1-flask.1", "@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.34.0-flask.1",
"@metamask/subject-metadata-controller": "^2.0.0", "@metamask/subject-metadata-controller": "^2.0.0",
"@metamask/swappable-obj-proxy": "^2.1.0", "@metamask/swappable-obj-proxy": "^2.1.0",
"@metamask/utils": "^5.0.0", "@metamask/utils": "^5.0.0",

View File

@ -14,8 +14,8 @@ describe('EndowmentPermissions', () => {
[ [
'endowment:long-running', 'endowment:long-running',
...Object.keys(endowmentPermissionBuilders).filter( ...Object.keys(endowmentPermissionBuilders).filter(
(targetKey) => (targetName) =>
!Object.keys(ExcludedSnapEndowments).includes(targetKey), !Object.keys(ExcludedSnapEndowments).includes(targetName),
), ),
].sort(), ].sort(),
); );
@ -28,8 +28,8 @@ describe('RestrictedMethods', () => {
[ [
'eth_accounts', 'eth_accounts',
...Object.keys(restrictedMethodPermissionBuilders).filter( ...Object.keys(restrictedMethodPermissionBuilders).filter(
(targetKey) => (targetName) =>
!Object.keys(ExcludedSnapPermissions).includes(targetKey), !Object.keys(ExcludedSnapPermissions).includes(targetName),
), ),
].sort(), ].sort(),
); );

165
yarn.lock
View File

@ -4420,7 +4420,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@metamask/permission-controller@npm:^3.0.0, @metamask/permission-controller@npm:^3.1.0, @metamask/permission-controller@npm:^3.2.0": "@metamask/permission-controller@npm:^3.0.0, @metamask/permission-controller@npm:^3.1.0":
version: 3.2.0 version: 3.2.0
resolution: "@metamask/permission-controller@npm:3.2.0" resolution: "@metamask/permission-controller@npm:3.2.0"
dependencies: dependencies:
@ -4440,6 +4440,26 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@metamask/permission-controller@npm:^4.0.0":
version: 4.0.0
resolution: "@metamask/permission-controller@npm:4.0.0"
dependencies:
"@metamask/approval-controller": ^3.0.0
"@metamask/base-controller": ^3.0.0
"@metamask/controller-utils": ^4.0.0
"@metamask/utils": ^5.0.2
"@types/deep-freeze-strict": ^1.1.0
deep-freeze-strict: ^1.1.1
eth-rpc-errors: ^4.0.2
immer: ^9.0.6
json-rpc-engine: ^6.1.0
nanoid: ^3.1.31
peerDependencies:
"@metamask/approval-controller": ^3.0.0
checksum: ac07f6180321f875df1ced0e0c60e872a32b334d5c04c280736ad5bf7c292cf07c97a2e9b49d24ed17145f302e83d24c46d5a4fc423e4a1c939b717c8fa653ec
languageName: node
linkType: hard
"@metamask/phishing-controller@npm:^3.0.0": "@metamask/phishing-controller@npm:^3.0.0":
version: 3.0.0 version: 3.0.0
resolution: "@metamask/phishing-controller@npm:3.0.0" resolution: "@metamask/phishing-controller@npm:3.0.0"
@ -4521,21 +4541,21 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@metamask/rpc-methods-flask@npm:@metamask/rpc-methods@0.33.1-flask.1, @metamask/rpc-methods@npm:^0.33.1-flask.1": "@metamask/rpc-methods-flask@npm:@metamask/rpc-methods@0.34.0-flask.1, @metamask/rpc-methods@npm:^0.34.0-flask.1":
version: 0.33.1-flask.1 version: 0.34.0-flask.1
resolution: "@metamask/rpc-methods@npm:0.33.1-flask.1" resolution: "@metamask/rpc-methods@npm:0.34.0-flask.1"
dependencies: dependencies:
"@metamask/key-tree": ^7.0.0 "@metamask/key-tree": ^7.0.0
"@metamask/permission-controller": ^3.2.0 "@metamask/permission-controller": ^4.0.0
"@metamask/snaps-ui": ^0.33.1-flask.1 "@metamask/snaps-ui": ^0.34.0-flask.1
"@metamask/snaps-utils": ^0.33.1-flask.1 "@metamask/snaps-utils": ^0.34.0-flask.1
"@metamask/types": ^1.1.0 "@metamask/types": ^1.1.0
"@metamask/utils": ^5.0.0 "@metamask/utils": ^6.0.0
"@noble/hashes": ^1.1.3 "@noble/hashes": ^1.1.3
eth-rpc-errors: ^4.0.3 eth-rpc-errors: ^4.0.3
nanoid: ^3.1.31 nanoid: ^3.1.31
superstruct: ^1.0.3 superstruct: ^1.0.3
checksum: 1a7fd246944b68c8b70ab64e5db544b175b68195cca4a2692bf34bca7f5c55eab248156e4702152f044c49c644ad82a92d1b328fcfa876291665d2a8c2ae7dce checksum: e6f05ab479f1136561a86dc313f5cbcfb3588bcdc5d8c723bafca81b2f07dc9f835586d70c0373fc6d1a194288c5010025eb6af47f9becfebbfacf0422e393b9
languageName: node languageName: node
linkType: hard linkType: hard
@ -4631,20 +4651,20 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@metamask/snaps-controllers-flask@npm:@metamask/snaps-controllers@0.33.1-flask.1": "@metamask/snaps-controllers-flask@npm:@metamask/snaps-controllers@0.34.0-flask.1":
version: 0.33.1-flask.1 version: 0.34.0-flask.1
resolution: "@metamask/snaps-controllers@npm:0.33.1-flask.1" resolution: "@metamask/snaps-controllers@npm:0.34.0-flask.1"
dependencies: dependencies:
"@metamask/approval-controller": ^2.0.0 "@metamask/approval-controller": ^3.0.0
"@metamask/base-controller": ^2.0.0 "@metamask/base-controller": ^3.0.0
"@metamask/object-multiplex": ^1.2.0 "@metamask/object-multiplex": ^1.2.0
"@metamask/permission-controller": ^3.2.0 "@metamask/permission-controller": ^4.0.0
"@metamask/post-message-stream": ^6.1.2 "@metamask/post-message-stream": ^6.1.2
"@metamask/rpc-methods": ^0.33.1-flask.1 "@metamask/rpc-methods": ^0.34.0-flask.1
"@metamask/snaps-execution-environments": ^0.33.1-flask.1 "@metamask/snaps-execution-environments": ^0.34.0-flask.1
"@metamask/snaps-registry": ^1.2.0 "@metamask/snaps-registry": ^1.2.1
"@metamask/snaps-utils": ^0.33.1-flask.1 "@metamask/snaps-utils": ^0.34.0-flask.1
"@metamask/utils": ^5.0.0 "@metamask/utils": ^6.0.0
"@xstate/fsm": ^2.0.0 "@xstate/fsm": ^2.0.0
concat-stream: ^2.0.0 concat-stream: ^2.0.0
cron-parser: ^4.5.0 cron-parser: ^4.5.0
@ -4657,7 +4677,7 @@ __metadata:
pump: ^3.0.0 pump: ^3.0.0
readable-web-to-node-stream: ^3.0.2 readable-web-to-node-stream: ^3.0.2
tar-stream: ^2.2.0 tar-stream: ^2.2.0
checksum: 26fcba72c8bcb84783a970db4af2bfec65429a7206eadc05856873739b85aebd75b0d8d6062eadb9fffce30c436f79ff4bbca9d15e9e80016f1b27ac5e8693bc checksum: 9c61f6b3dcc9d25411447a5b434bf2b1713190333a472f7e0f74bf644aebf140e58ba3e21b4df1a6d425180a916379868ae1932be044b675f1f365c5765b5f50
languageName: node languageName: node
linkType: hard linkType: hard
@ -4712,16 +4732,16 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@metamask/snaps-execution-environments@npm:^0.33.1-flask.1": "@metamask/snaps-execution-environments@npm:^0.34.0-flask.1":
version: 0.33.1-flask.1 version: 0.34.0-flask.1
resolution: "@metamask/snaps-execution-environments@npm:0.33.1-flask.1" resolution: "@metamask/snaps-execution-environments@npm:0.34.0-flask.1"
dependencies: dependencies:
"@metamask/object-multiplex": ^1.2.0 "@metamask/object-multiplex": ^1.2.0
"@metamask/post-message-stream": ^6.1.2 "@metamask/post-message-stream": ^6.1.2
"@metamask/providers": ^10.2.1 "@metamask/providers": ^10.2.1
"@metamask/rpc-methods": ^0.33.1-flask.1 "@metamask/rpc-methods": ^0.34.0-flask.1
"@metamask/snaps-utils": ^0.33.1-flask.1 "@metamask/snaps-utils": ^0.34.0-flask.1
"@metamask/utils": ^5.0.0 "@metamask/utils": ^6.0.0
eth-rpc-errors: ^4.0.3 eth-rpc-errors: ^4.0.3
json-rpc-engine: ^6.1.0 json-rpc-engine: ^6.1.0
nanoid: ^3.1.31 nanoid: ^3.1.31
@ -4729,28 +4749,28 @@ __metadata:
ses: ^0.18.1 ses: ^0.18.1
stream-browserify: ^3.0.0 stream-browserify: ^3.0.0
superstruct: ^1.0.3 superstruct: ^1.0.3
checksum: e86d70befbb6e3639368d7974f3e89ef343be1932a606a4b77ddfafdc0ed672a227481458e8935392bad9494c82deb75b6e1761606baea08ff165f4e6974f262 checksum: 384105334b3346fbdffca18eb9934391bb88e0c06022e17afdd235be91b0bc434ce26680ee3fb81bd99dd601e376b4e8448f02f7fdb379914d7bcbf4ce3a92e5
languageName: node languageName: node
linkType: hard linkType: hard
"@metamask/snaps-registry@npm:^1.2.0": "@metamask/snaps-registry@npm:^1.2.0, @metamask/snaps-registry@npm:^1.2.1":
version: 1.2.0 version: 1.2.1
resolution: "@metamask/snaps-registry@npm:1.2.0" resolution: "@metamask/snaps-registry@npm:1.2.1"
dependencies: dependencies:
"@metamask/utils": ^5.0.0 "@metamask/utils": ^6.0.0
"@noble/secp256k1": ^1.7.1 "@noble/secp256k1": ^1.7.1
superstruct: ^1.0.3 superstruct: ^1.0.3
checksum: d0534680e713ca94e41cbb86f5f700aaf8c1f36b88fc1ed24b4669f11f8583b6d949f6724b8d9fd518a6210131af4ea7822e73ce34e64649dbe29a28850c6682 checksum: d2d5b743a8b55b6f685708b2b694534585329585c6d94819328e270fd77c68c0bede88b866821db9c22a667eca1f4961ed860d83b438cf009bd1c4df6e75b78a
languageName: node languageName: node
linkType: hard linkType: hard
"@metamask/snaps-ui-flask@npm:@metamask/snaps-ui@0.33.1-flask.1, @metamask/snaps-ui@npm:^0.33.1-flask.1": "@metamask/snaps-ui-flask@npm:@metamask/snaps-ui@0.34.0-flask.1, @metamask/snaps-ui@npm:^0.34.0-flask.1":
version: 0.33.1-flask.1 version: 0.34.0-flask.1
resolution: "@metamask/snaps-ui@npm:0.33.1-flask.1" resolution: "@metamask/snaps-ui@npm:0.34.0-flask.1"
dependencies: dependencies:
"@metamask/utils": ^5.0.0 "@metamask/utils": ^6.0.0
superstruct: ^1.0.3 superstruct: ^1.0.3
checksum: 52f00f1ac1e23da1fbb0307cd5bdc620cf9c235ee94a6cb6fb4fd38da0677a5d8df501952e3b7119bac918c3a56e8ffe453cbff0b2be35d3b882882deac65dc4 checksum: 1d8dbede166f5d6da08ad4cca4d6b6f64d282aeb9858a19ebd54274054014266e1ae089014fa6e786baf5f69f6df211c6e6c12399760f81a45cd5f0c508a1e77
languageName: node languageName: node
linkType: hard linkType: hard
@ -4764,30 +4784,31 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@metamask/snaps-utils-flask@npm:@metamask/snaps-utils@0.33.1-flask.1, @metamask/snaps-utils@npm:^0.33.1-flask.1": "@metamask/snaps-utils-flask@npm:@metamask/snaps-utils@0.34.0-flask.1, @metamask/snaps-utils@npm:^0.34.0-flask.1":
version: 0.33.1-flask.1 version: 0.34.0-flask.1
resolution: "@metamask/snaps-utils@npm:0.33.1-flask.1" resolution: "@metamask/snaps-utils@npm:0.34.0-flask.1"
dependencies: dependencies:
"@babel/core": ^7.20.12 "@babel/core": ^7.20.12
"@babel/types": ^7.18.7 "@babel/types": ^7.18.7
"@metamask/base-controller": ^2.0.0 "@metamask/base-controller": ^3.0.0
"@metamask/permission-controller": ^3.2.0 "@metamask/permission-controller": ^4.0.0
"@metamask/providers": ^10.2.1 "@metamask/providers": ^10.2.1
"@metamask/snaps-registry": ^1.2.0 "@metamask/snaps-registry": ^1.2.1
"@metamask/snaps-ui": ^0.33.1-flask.1 "@metamask/snaps-ui": ^0.34.0-flask.1
"@metamask/utils": ^5.0.0 "@metamask/utils": ^6.0.0
"@noble/hashes": ^1.1.3 "@noble/hashes": ^1.1.3
"@scure/base": ^1.1.1 "@scure/base": ^1.1.1
cron-parser: ^4.5.0 cron-parser: ^4.5.0
eth-rpc-errors: ^4.0.3 eth-rpc-errors: ^4.0.3
fast-deep-equal: ^3.1.3 fast-deep-equal: ^3.1.3
fast-json-stable-stringify: ^2.1.0 fast-json-stable-stringify: ^2.1.0
is-svg: ^4.4.0
rfdc: ^1.3.0 rfdc: ^1.3.0
semver: ^7.3.7 semver: ^7.3.7
ses: ^0.18.1 ses: ^0.18.1
superstruct: ^1.0.3 superstruct: ^1.0.3
validate-npm-package-name: ^5.0.0 validate-npm-package-name: ^5.0.0
checksum: 15a87d290423a31f3113aa65cb7076e5220f5697e4614eb9f4b7bf1e4b55e83a6545f05311d34555e05e111e94309f75154ae889eb593beef71010e9dae18c12 checksum: bc4ff9460dce673e00a0a82c81b61f7a9ddb1ca18331236a0d68f7ed07c14edb2c7bbdec5817b446970c7e3761ddbdcabf129721e1f1c5376c39e126cdf3221c
languageName: node languageName: node
linkType: hard linkType: hard
@ -4876,6 +4897,19 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@metamask/utils@npm:^6.0.0":
version: 6.0.0
resolution: "@metamask/utils@npm:6.0.0"
dependencies:
"@ethereumjs/tx": ^4.1.2
"@types/debug": ^4.1.7
debug: ^4.3.4
semver: ^7.3.8
superstruct: ^1.0.3
checksum: 502a75c82af729f813a08382e8ca5e3bfab7903a377b375e781ffcd5541e3a57b468a0daf02bb8e5c5bcb9051408f51c1ffb7a92b90bfd89946e7691c1117ca9
languageName: node
linkType: hard
"@multiformats/base-x@npm:^4.0.1": "@multiformats/base-x@npm:^4.0.1":
version: 4.0.1 version: 4.0.1
resolution: "@multiformats/base-x@npm:4.0.1" resolution: "@multiformats/base-x@npm:4.0.1"
@ -16657,6 +16691,17 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"fast-xml-parser@npm:^4.1.3":
version: 4.2.2
resolution: "fast-xml-parser@npm:4.2.2"
dependencies:
strnum: ^1.0.5
bin:
fxparser: src/cli/cli.js
checksum: f0e687927ddc11b2ba9e434d8bf77ef759b6692639dd2dd731e2f30201319e7c70dec08a103dd67a1af7a27f176246502d9d0f5325b5b5b99ab49665fa876857
languageName: node
linkType: hard
"fastq@npm:^1.6.0": "fastq@npm:^1.6.0":
version: 1.6.0 version: 1.6.0
resolution: "fastq@npm:1.6.0" resolution: "fastq@npm:1.6.0"
@ -20308,6 +20353,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"is-svg@npm:^4.4.0":
version: 4.4.0
resolution: "is-svg@npm:4.4.0"
dependencies:
fast-xml-parser: ^4.1.3
checksum: cd5a0ba1af653e4897721913b0b80de968fa5b19eb1a592412f4672d3a1203935d183c2a9dbf61d68023739ee43d3761ea795ae1a9f618c6098a9e89eacdd256
languageName: node
linkType: hard
"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": "is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3":
version: 1.0.4 version: 1.0.4
resolution: "is-symbol@npm:1.0.4" resolution: "is-symbol@npm:1.0.4"
@ -23965,25 +24019,25 @@ __metadata:
"@metamask/metamask-eth-abis": ^3.0.0 "@metamask/metamask-eth-abis": ^3.0.0
"@metamask/notification-controller": ^3.0.0 "@metamask/notification-controller": ^3.0.0
"@metamask/obs-store": ^8.1.0 "@metamask/obs-store": ^8.1.0
"@metamask/permission-controller": ^3.2.0 "@metamask/permission-controller": ^4.0.0
"@metamask/phishing-controller": ^3.0.0 "@metamask/phishing-controller": ^3.0.0
"@metamask/phishing-warning": ^2.1.0 "@metamask/phishing-warning": ^2.1.0
"@metamask/post-message-stream": ^6.0.0 "@metamask/post-message-stream": ^6.0.0
"@metamask/providers": ^10.2.1 "@metamask/providers": ^10.2.1
"@metamask/rate-limit-controller": ^2.0.0 "@metamask/rate-limit-controller": ^2.0.0
"@metamask/rpc-methods": ^0.32.2 "@metamask/rpc-methods": ^0.32.2
"@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.33.1-flask.1" "@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.34.0-flask.1"
"@metamask/safe-event-emitter": ^2.0.0 "@metamask/safe-event-emitter": ^2.0.0
"@metamask/scure-bip39": ^2.0.3 "@metamask/scure-bip39": ^2.0.3
"@metamask/signature-controller": ^2.0.0 "@metamask/signature-controller": ^2.0.0
"@metamask/slip44": ^3.0.0 "@metamask/slip44": ^3.0.0
"@metamask/smart-transactions-controller": ^3.1.0 "@metamask/smart-transactions-controller": ^3.1.0
"@metamask/snaps-controllers": ^0.32.2 "@metamask/snaps-controllers": ^0.32.2
"@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.33.1-flask.1" "@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.34.0-flask.1"
"@metamask/snaps-ui": ^0.32.2 "@metamask/snaps-ui": ^0.32.2
"@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.33.1-flask.1" "@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.34.0-flask.1"
"@metamask/snaps-utils": ^0.32.2 "@metamask/snaps-utils": ^0.32.2
"@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.33.1-flask.1" "@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.34.0-flask.1"
"@metamask/subject-metadata-controller": ^2.0.0 "@metamask/subject-metadata-controller": ^2.0.0
"@metamask/swappable-obj-proxy": ^2.1.0 "@metamask/swappable-obj-proxy": ^2.1.0
"@metamask/test-dapp": ^6.0.0 "@metamask/test-dapp": ^6.0.0
@ -31917,6 +31971,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"strnum@npm:^1.0.5":
version: 1.0.5
resolution: "strnum@npm:1.0.5"
checksum: 651b2031db5da1bf4a77fdd2f116a8ac8055157c5420f5569f64879133825915ad461513e7202a16d7fec63c54fd822410d0962f8ca12385c4334891b9ae6dd2
languageName: node
linkType: hard
"style-loader@npm:^0.21.0": "style-loader@npm:^0.21.0":
version: 0.21.0 version: 0.21.0
resolution: "style-loader@npm:0.21.0" resolution: "style-loader@npm:0.21.0"