2020-10-21 23:10:55 +02:00
|
|
|
/**
|
|
|
|
* A string representing the type of environment the application is currently running in
|
|
|
|
* popup - When the user click's the icon in their browser's extension bar; the default view
|
|
|
|
* notification - When the extension opens due to interaction with a Web3 enabled website
|
|
|
|
* fullscreen - When the user clicks 'expand view' to open the extension in a new tab
|
|
|
|
* background - The background process that powers the extension
|
|
|
|
* @typedef {'popup' | 'notification' | 'fullscreen' | 'background'} EnvironmentType
|
|
|
|
*/
|
2021-02-04 19:15:23 +01:00
|
|
|
export const ENVIRONMENT_TYPE_POPUP = 'popup';
|
|
|
|
export const ENVIRONMENT_TYPE_NOTIFICATION = 'notification';
|
|
|
|
export const ENVIRONMENT_TYPE_FULLSCREEN = 'fullscreen';
|
|
|
|
export const ENVIRONMENT_TYPE_BACKGROUND = 'background';
|
2020-10-21 23:10:55 +02:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export const PLATFORM_BRAVE = 'Brave';
|
|
|
|
export const PLATFORM_CHROME = 'Chrome';
|
|
|
|
export const PLATFORM_EDGE = 'Edge';
|
|
|
|
export const PLATFORM_FIREFOX = 'Firefox';
|
|
|
|
export const PLATFORM_OPERA = 'Opera';
|
2018-04-17 08:03:47 +02:00
|
|
|
|
2021-01-20 17:13:14 +01:00
|
|
|
export const MESSAGE_TYPE = {
|
2020-06-04 21:22:45 +02:00
|
|
|
ETH_DECRYPT: 'eth_decrypt',
|
|
|
|
ETH_GET_ENCRYPTION_PUBLIC_KEY: 'eth_getEncryptionPublicKey',
|
|
|
|
ETH_SIGN: 'eth_sign',
|
|
|
|
ETH_SIGN_TYPED_DATA: 'eth_signTypedData',
|
2020-12-08 20:48:47 +01:00
|
|
|
GET_PROVIDER_STATE: 'metamask_getProviderState',
|
2020-12-07 21:09:02 +01:00
|
|
|
LOG_WEB3_SHIM_USAGE: 'metamask_logWeb3ShimUsage',
|
2020-06-04 21:22:45 +02:00
|
|
|
PERSONAL_SIGN: 'personal_sign',
|
2020-12-02 17:49:49 +01:00
|
|
|
WATCH_ASSET: 'wallet_watchAsset',
|
|
|
|
WATCH_ASSET_LEGACY: 'metamask_watchAsset',
|
2021-02-12 16:25:58 +01:00
|
|
|
ADD_ETHEREUM_CHAIN: 'wallet_addEthereumChain',
|
2021-05-10 21:14:21 +02:00
|
|
|
SWITCH_ETHEREUM_CHAIN: 'wallet_switchEthereumChain',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|