2021-02-04 19:15:23 +01:00
|
|
|
export const APPROVAL_TYPE = 'wallet_requestPermissions';
|
2020-12-14 17:04:26 +01:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export const WALLET_PREFIX = 'wallet_';
|
2020-01-27 23:42:03 +01:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export const HISTORY_STORE_KEY = 'permissionsHistory';
|
2020-01-27 23:42:03 +01:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export const LOG_STORE_KEY = 'permissionsLog';
|
2020-01-27 23:42:03 +01:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export const METADATA_STORE_KEY = 'domainMetadata';
|
2020-01-27 23:42:03 +01:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export const METADATA_CACHE_MAX_SIZE = 100;
|
2020-05-26 23:06:15 +02:00
|
|
|
|
2020-05-28 05:35:09 +02:00
|
|
|
export const CAVEAT_TYPES = {
|
|
|
|
limitResponseLength: 'limitResponseLength',
|
|
|
|
filterResponse: 'filterResponse',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2020-01-27 23:42:03 +01:00
|
|
|
|
|
|
|
export const NOTIFICATION_NAMES = {
|
2020-12-08 20:48:47 +01:00
|
|
|
accountsChanged: 'metamask_accountsChanged',
|
|
|
|
unlockStateChanged: 'metamask_unlockStateChanged',
|
|
|
|
chainChanged: 'metamask_chainChanged',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2020-01-27 23:42:03 +01:00
|
|
|
|
2020-12-08 20:48:47 +01:00
|
|
|
export const LOG_IGNORE_METHODS = [
|
|
|
|
'wallet_registerOnboarding',
|
|
|
|
'wallet_watchAsset',
|
2021-02-04 19:15:23 +01:00
|
|
|
];
|
2020-01-27 23:42:03 +01:00
|
|
|
|
2020-03-16 18:13:22 +01:00
|
|
|
export const LOG_METHOD_TYPES = {
|
|
|
|
restricted: 'restricted',
|
|
|
|
internal: 'internal',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2020-03-16 18:13:22 +01:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export const LOG_LIMIT = 100;
|
2020-03-16 18:13:22 +01:00
|
|
|
|
2020-01-27 23:42:03 +01:00
|
|
|
export const SAFE_METHODS = [
|
|
|
|
'eth_blockNumber',
|
|
|
|
'eth_call',
|
|
|
|
'eth_chainId',
|
|
|
|
'eth_coinbase',
|
2020-12-15 00:21:15 +01:00
|
|
|
'eth_decrypt',
|
2020-01-27 23:42:03 +01:00
|
|
|
'eth_estimateGas',
|
2021-09-02 19:26:32 +02:00
|
|
|
'eth_feeHistory',
|
2020-01-27 23:42:03 +01:00
|
|
|
'eth_gasPrice',
|
|
|
|
'eth_getBalance',
|
|
|
|
'eth_getBlockByHash',
|
|
|
|
'eth_getBlockByNumber',
|
|
|
|
'eth_getBlockTransactionCountByHash',
|
|
|
|
'eth_getBlockTransactionCountByNumber',
|
|
|
|
'eth_getCode',
|
2020-12-15 00:21:15 +01:00
|
|
|
'eth_getEncryptionPublicKey',
|
2020-01-27 23:42:03 +01:00
|
|
|
'eth_getFilterChanges',
|
|
|
|
'eth_getFilterLogs',
|
|
|
|
'eth_getLogs',
|
2020-12-15 00:21:15 +01:00
|
|
|
'eth_getProof',
|
2020-01-27 23:42:03 +01:00
|
|
|
'eth_getStorageAt',
|
|
|
|
'eth_getTransactionByBlockHashAndIndex',
|
|
|
|
'eth_getTransactionByBlockNumberAndIndex',
|
|
|
|
'eth_getTransactionByHash',
|
|
|
|
'eth_getTransactionCount',
|
|
|
|
'eth_getTransactionReceipt',
|
|
|
|
'eth_getUncleByBlockHashAndIndex',
|
|
|
|
'eth_getUncleByBlockNumberAndIndex',
|
|
|
|
'eth_getUncleCountByBlockHash',
|
|
|
|
'eth_getUncleCountByBlockNumber',
|
|
|
|
'eth_getWork',
|
|
|
|
'eth_hashrate',
|
|
|
|
'eth_mining',
|
|
|
|
'eth_newBlockFilter',
|
|
|
|
'eth_newFilter',
|
|
|
|
'eth_newPendingTransactionFilter',
|
|
|
|
'eth_protocolVersion',
|
|
|
|
'eth_sendRawTransaction',
|
|
|
|
'eth_sendTransaction',
|
|
|
|
'eth_sign',
|
|
|
|
'eth_signTypedData',
|
|
|
|
'eth_signTypedData_v1',
|
|
|
|
'eth_signTypedData_v3',
|
2020-04-01 01:54:16 +02:00
|
|
|
'eth_signTypedData_v4',
|
2020-01-27 23:42:03 +01:00
|
|
|
'eth_submitHashrate',
|
|
|
|
'eth_submitWork',
|
|
|
|
'eth_syncing',
|
|
|
|
'eth_uninstallFilter',
|
2020-12-15 00:21:15 +01:00
|
|
|
'metamask_getProviderState',
|
2020-12-08 20:48:47 +01:00
|
|
|
'metamask_watchAsset',
|
2020-12-15 00:21:15 +01:00
|
|
|
'net_listening',
|
|
|
|
'net_peerCount',
|
|
|
|
'net_version',
|
|
|
|
'personal_ecRecover',
|
|
|
|
'personal_sign',
|
2020-12-08 20:48:47 +01:00
|
|
|
'wallet_watchAsset',
|
2020-12-15 00:21:15 +01:00
|
|
|
'web3_clientVersion',
|
|
|
|
'web3_sha3',
|
2021-02-04 19:15:23 +01:00
|
|
|
];
|