1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00
metamask-extension/shared/constants/permissions.ts
David Drazic 5e746dcc2f
[FLASK] Add snap cronjobs (#16239)
* Add Cronjob controller configuration

* Add Cronjob permission icon and description

* Add lint fix changes

* Add missing action to the allow-list

* Fix permission

* Fix icon and message

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2022-11-09 13:18:47 +01:00

34 lines
1.2 KiB
TypeScript

export const CaveatTypes = Object.freeze({
restrictReturnedAccounts: 'restrictReturnedAccounts' as const,
});
export const RestrictedMethods = Object.freeze({
eth_accounts: 'eth_accounts',
///: BEGIN:ONLY_INCLUDE_IN(flask)
snap_confirm: 'snap_confirm',
snap_notify: 'snap_notify',
snap_manageState: 'snap_manageState',
snap_getBip32PublicKey: 'snap_getBip32PublicKey',
snap_getBip32Entropy: 'snap_getBip32Entropy',
snap_getBip44Entropy: 'snap_getBip44Entropy',
'wallet_snap_*': 'wallet_snap_*',
///: END:ONLY_INCLUDE_IN
} as const);
///: BEGIN:ONLY_INCLUDE_IN(flask)
export const PermissionNamespaces = Object.freeze({
wallet_snap_: 'wallet_snap_*',
} as const);
export const EndowmentPermissions = Object.freeze({
'endowment:network-access': 'endowment:network-access',
'endowment:long-running': 'endowment:long-running',
'endowment:transaction-insight': 'endowment:transaction-insight',
'endowment:cronjob': 'endowment:cronjob',
} as const);
// Methods / permissions in external packages that we are temporarily excluding.
export const ExcludedSnapPermissions = new Set(['snap_dialog']);
export const ExcludedSnapEndowments = new Set(['endowment:keyring']);
///: END:ONLY_INCLUDE_IN