@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
1 lines • 1.83 kB
Source Map (JSON)
{"version":3,"file":"get-preferences.mjs","sourceRoot":"","sources":["../../../src/types/methods/get-preferences.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * This method does not accept any parameters.\n */\nexport type GetPreferencesParams = never;\n\n/**\n * An object containing the user's MetaMask preferences.\n */\nexport type GetPreferencesResult = {\n /**\n * The user's locale setting as a [language\n * code](https://github.com/MetaMask/metamask-extension/blob/main/app/_locales/index.json).\n */\n locale: string;\n\n /**\n * The user's preferred fiat currency code (e.g., `\"usd\"`, `\"eur\"`).\n */\n currency: string;\n\n /**\n * Whether the user has chosen to hide balances in the MetaMask UI.\n */\n hideBalances: boolean;\n\n /**\n * Whether to run transactions and signatures through security alert\n * providers before submitting.\n */\n useSecurityAlerts: boolean;\n\n /**\n * Whether to simulate transactions and signatures to preview their effects\n * before the user confirms.\n */\n simulateOnChainActions: boolean;\n\n /**\n * Whether to automatically detect and add ERC-20 tokens to the user's\n * wallet.\n */\n useTokenDetection: boolean;\n\n /**\n * Whether to fetch token balances in an aggregated manner for improved\n * performance.\n */\n batchCheckBalances: boolean;\n\n /**\n * Whether to display NFT media (images, videos) in the MetaMask UI.\n */\n displayNftMedia: boolean;\n\n /**\n * Whether to automatically detect and add NFTs to the user's wallet.\n */\n useNftDetection: boolean;\n\n /**\n * Whether to fetch token price data from an external pricing source.\n */\n useExternalPricingData: boolean;\n\n /**\n * Whether to show testnet networks in the MetaMask UI.\n */\n showTestnets: boolean;\n};\n"]}