mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
a861cc6dae
Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com> Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
38 lines
1.3 KiB
TypeScript
38 lines
1.3 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_dialog: 'snap_dialog',
|
|
snap_notify: 'snap_notify',
|
|
snap_manageState: 'snap_manageState',
|
|
snap_getBip32PublicKey: 'snap_getBip32PublicKey',
|
|
snap_getBip32Entropy: 'snap_getBip32Entropy',
|
|
snap_getBip44Entropy: 'snap_getBip44Entropy',
|
|
snap_getEntropy: 'snap_getEntropy',
|
|
'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',
|
|
'endowment:ethereum-provider': 'endowment:ethereum-provider',
|
|
'endowment:rpc': 'endowment:rpc',
|
|
} as const);
|
|
|
|
// Methods / permissions in external packages that we are temporarily excluding.
|
|
export const ExcludedSnapPermissions = new Set([]);
|
|
export const ExcludedSnapEndowments = new Set(['endowment:keyring']);
|
|
///: END:ONLY_INCLUDE_IN
|