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.js
Frederik Bolding 8b9b9af13f
Add native browser notification support for Snaps (#13613)
* Initial native notification implementation

* Simplify implementation

* Implementation based on RateLimitController

* Update controllers package

* Add notification to permission list

* Wire up correctly

* Remove snap_notify from the exclusion list
2022-03-17 17:43:18 +01:00

29 lines
893 B
JavaScript

export const CaveatTypes = Object.freeze({
restrictReturnedAccounts: 'restrictReturnedAccounts',
});
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_getBip44Entropy_*': 'snap_getBip44Entropy_*',
'wallet_snap_*': 'wallet_snap_*',
///: END:ONLY_INCLUDE_IN
});
///: BEGIN:ONLY_INCLUDE_IN(flask)
export const PermissionNamespaces = Object.freeze({
snap_getBip44Entropy_: 'snap_getBip44Entropy_*',
wallet_snap_: 'wallet_snap_*',
});
export const EndowmentPermissions = Object.freeze({
'endowment:network-access': 'endowment:network-access',
});
// Methods / permissions in external packages that we are temporarily excluding.
export const ExcludedSnapPermissions = new Set([]);
///: END:ONLY_INCLUDE_IN