From 7f1cc12872726f8d09f203b60217e7554d6c0e3d Mon Sep 17 00:00:00 2001 From: Christian Montoya Date: Tue, 26 Aug 2025 23:04:28 -0400 Subject: [PATCH 1/9] Remove one resource and add 2 others --- snaps/learn/resources.md | 111 ++++++++++++--------------------------- 1 file changed, 34 insertions(+), 77 deletions(-) diff --git a/snaps/learn/resources.md b/snaps/learn/resources.md index 0415bb55159..97490d1520b 100644 --- a/snaps/learn/resources.md +++ b/snaps/learn/resources.md @@ -10,69 +10,38 @@ View the following Snaps resources in addition to this documentation site. ## Primary resources - [Snaps homepage](https://metamask.io/snaps/) -- [Snaps directory](https://snaps.metamask.io/) - A directory of allowlisted - Snaps you can try in the MetaMask extension. -- [SIPs](https://github.com/MetaMask/SIPs) - Suggest new Snaps APIs with - Snaps Improvement Proposals. -- [Builder Engagement Program](https://go.metamask.io/snaps-builders) - - Connect with the Snaps builder engagement team and get support while building - your Snap. +- [Snaps directory](https://snaps.metamask.io/) - A directory of allowlisted Snaps you can try in the MetaMask extension. +- [SIPs](https://github.com/MetaMask/SIPs) - Suggest new Snaps APIs with Snaps Improvement Proposals. ## Example Snaps -- [Example Snaps](https://github.com/MetaMask/snaps/tree/main/packages/examples) - - A directory of Snaps maintained by MetaMask. -- [Linea Voyager](https://github.com/Consensys/linea-voyager-snap) - View Linea - XP balance, PoH status, and current Linea Voyage activations from within MetaMask. -- [Starknet](https://github.com/Consensys/starknet-snap) - Adds Starknet account - and transaction functionality to MetaMask. -- [Simple Keyring Snap](https://github.com/MetaMask/snap-simple-keyring) - An - example account management Snap using the [Keyring API](../reference/keyring-api/index.md). -- [Mystery Fox](https://github.com/Montoya/mystery-fox) - Provides random answers to - questions and showcases interactive UI and images. -- [Farcaster Insights](https://github.com/Montoya/farcaster-insights) - Shows if - the recipient in a transaction request has a Farcaster account and their stats. -- [Smart Account Template](https://github.com/bcnmy/smart-account-keyring-template) - - Template for integrating the Biconomy Smart Account with the - [Keyring API](../reference/keyring-api/index.md). -- [Text Transformer](https://github.com/Montoya/transformer-snap) - Transforms - strings into Unicode bold, italic, and strikethrough characters for use on social - media. Demonstrates [interactive JSX UI](../features/custom-ui/index.md) in a home page. -- [Social Names](https://github.com/Montoya/social-names-snap) - Adds Farcaster and - Lens handles to the send flow and petnames using - [custom name resolution](../features/custom-name-resolution.md). +- [Example Snaps](https://github.com/MetaMask/snaps/tree/main/packages/examples) - A directory of Snaps maintained by MetaMask. +- [Linea Voyager](https://github.com/Consensys/linea-voyager-snap) - View Linea XP balance, PoH status, and current Linea Voyage activations from within MetaMask. +- [Starknet](https://github.com/Consensys/starknet-snap) - Adds Starknet account and transaction functionality to MetaMask. +- [Simple Keyring Snap](https://github.com/MetaMask/snap-simple-keyring) - An example account management Snap using the [Keyring API](../reference/keyring-api/index.md). +- [Mystery Fox](https://github.com/Montoya/mystery-fox) - Provides random answers to questions and showcases interactive UI and images. +- [Farcaster Insights](https://github.com/Montoya/farcaster-insights) - Shows if the recipient in a transaction request has a Farcaster account and their stats. +- [Smart Account Template](https://github.com/bcnmy/smart-account-keyring-template) - Template for integrating the Biconomy Smart Account with the [Keyring API](../reference/keyring-api/index.md). +- [Text Transformer](https://github.com/Montoya/transformer-snap) - Transforms strings into Unicode bold, italic, and strikethrough characters for use on social media. Demonstrates [interactive JSX UI](../features/custom-ui/index.md) in a home page. +- [Social Names](https://github.com/Montoya/social-names-snap) - Adds Farcaster and Lens handles to the send flow and petnames using [custom name resolution](../features/custom-name-resolution.md). ## Developer tools -- [Template Snap](https://github.com/MetaMask/template-snap-monorepo) - A rich template that - includes TypeScript/React and vanilla JavaScript options, a CLI for building, packaging, and - deploying your Snap, and a companion dapp UI you can build on. -- [Test Snaps](https://github.com/MetaMask/snaps/tree/main/packages/test-snaps) - A collection of - test Snaps and [a dapp for evaluating them](https://metamask.github.io/snaps/test-snaps/latest/). -- [`snaps-jest`](https://www.npmjs.com/package/@metamask/snaps-jest) - A Jest preset for end-to-end - testing MetaMask Snaps, including a Jest environment, and a set of Jest matchers. - See [how to test a Snap](../how-to/test-a-snap.md) using `snaps-jest`. -- [Snapper](https://github.com/sayfer-io/Snapper) - A tool for detecting security vulnerabilities, - identifying potential issues, and ensuring best coding practices in your Snap. -- [MetaMask Testing Tools](https://hugomrdias.github.io/metamask/) - A collection of tools for - testing MetaMask, MetaMask Flask, and MetaMask Snaps with [Playwright](https://playwright.dev/), - delivered as an npm package that provides a `createFixture` function that returns a `test` and - `expect` function that can be used to write tests. +- [Template Snap](https://github.com/MetaMask/template-snap-monorepo) - A rich template that includes TypeScript/React and vanilla JavaScript options, a CLI for building, packaging, and deploying your Snap, and a companion dapp UI you can build on. +- [Test Snaps](https://github.com/MetaMask/snaps/tree/main/packages/test-snaps) - A collection of test Snaps and [a dapp for evaluating them](https://metamask.github.io/snaps/test-snaps/latest/). +- [`snaps-jest`](https://www.npmjs.com/package/@metamask/snaps-jest) - A Jest preset for end-to-end testing MetaMask Snaps, including a Jest environment, and a set of Jest matchers. See [how to test a Snap](../how-to/test-a-snap.md) using `snaps-jest`. +- [Snapper](https://github.com/sayfer-io/Snapper) - A tool for detecting security vulnerabilities, identifying potential issues, and ensuring best coding practices in your Snap. +- [MetaMask Testing Tools](https://hugomrdias.github.io/metamask/) - A collection of tools for testing MetaMask, MetaMask Flask, and MetaMask Snaps with [Playwright](https://playwright.dev/), delivered as an npm package that provides a `createFixture` function that returns a `test` and `expect` function that can be used to write tests. +- [Snap Install Tester](https://montoya.github.io/snap-install-tester/) - A simple web tool for loading and installing any Snap from npm. Just provide an npm package id and (optional) version number, then click to install in MetaMask Flask. +- [Snap Connect Example](https://github.com/Montoya/snap-connect-example) - Example code for connecting to MetaMask from a website and interfacing with a Snap in a reliable way. ## Blog posts -- [Making the Wallet Personal](https://thedefiant.io/making-the-wallet-personal) by Christian - Montoya -- [Permissionless Innovation and You](https://metamask.io/news/latest/permissionless-innovation-and-you/) - by Erik Marks -- [Snaps in MetaMask Stable and Where We Go From - Here](https://metamask.io/news/latest/snaps-in-metamask-stable-and-where-we-go-from-here/) by Dan - Finlay -- [MetaMask Snaps Launch with Hardened JavaScript Under the - Hood](https://agoric.com/blog/announcements/metamask-snaps-launch-with-hardened-javascript-under-the-hood) - by Agoric -- [Navigating the Security Landscape of MetaMask Snaps](https://metamask.io/news/developers/navigating-the-security-landscape-of-metamask-snaps/) - by Martin Ortner & Valentin Quelquejay +- [Making the Wallet Personal](https://thedefiant.io/making-the-wallet-personal) by Christian Montoya +- [Permissionless Innovation and You](https://metamask.io/news/latest/permissionless-innovation-and-you/) by Erik Marks +- [Snaps in MetaMask Stable and Where We Go From Here](https://metamask.io/news/latest/snaps-in-metamask-stable-and-where-we-go-from-here/) by Dan Finlay +- [MetaMask Snaps Launch with Hardened JavaScript Under the Hood](https://agoric.com/blog/announcements/metamask-snaps-launch-with-hardened-javascript-under-the-hood) by Agoric +- [Navigating the Security Landscape of MetaMask Snaps](https://metamask.io/news/developers/navigating-the-security-landscape-of-metamask-snaps/) by Martin Ortner & Valentin Quelquejay - [Going Beyond The Secret Recovery Phrase In MetaMask With Account Management Snaps](https://metamask.io/news/latest/going-beyond-the-secret-recovery-phrase-in-metamask-with-account-management/) by Alex Jupiter ## Videos @@ -80,37 +49,25 @@ View the following Snaps resources in addition to this documentation site. - [MetaMask Snaps Public Launch](https://www.youtube.com/watch?v=cbkjbYd71OY) (12 min) - [What is MetaMask Snaps? Main Functions and Features Explained](https://www.youtube.com/watch?v=Dlw9yLpEm7E) (53 mins) - [Deep Dive into MetaMask Snaps](https://www.youtube.com/watch?v=qXEBqamnv5w) (57 min) -- [Building a Universal Web3 Interface](https://vimeo.com/864943019) - (16 min) ([Slides](https://docs.google.com/presentation/d/1pnx6JdpFaj6LsW3B89jqumYgmHvirOE2H-_2S1ggRvY/edit?usp=sharing)) -- [It's Our Wallet, Let's Build It Together](https://www.youtube.com/watch?v=G6qunL2gnjE) (19 min) - ([Slides](https://docs.google.com/presentation/d/1ZjhYF-3mwGmsFdcbDgqgFR6t3YIab4_Hk3dRAWjvSQg/edit?usp=sharing)) -- [Building the Future with MetaMask Snaps](https://www.youtube.com/watch?v=iE8CGzadKZ8&t=288s) (22 min) - ([Slides](https://docs.google.com/presentation/d/1LG8MqRrbb9qSg4m8ZjJXPQFccb9YPc-6387hSNpscpY/edit?usp=sharing)) +- [Building a Universal Web3 Interface](https://vimeo.com/864943019) (16 min) ([Slides](https://docs.google.com/presentation/d/1pnx6JdpFaj6LsW3B89jqumYgmHvirOE2H-_2S1ggRvY/edit?usp=sharing)) +- [It's Our Wallet, Let's Build It Together](https://www.youtube.com/watch?v=G6qunL2gnjE) (19 min) ([Slides](https://docs.google.com/presentation/d/1ZjhYF-3mwGmsFdcbDgqgFR6t3YIab4_Hk3dRAWjvSQg/edit?usp=sharing)) +- [Building the Future with MetaMask Snaps](https://www.youtube.com/watch?v=iE8CGzadKZ8&t=288s) (22 min) ([Slides](https://docs.google.com/presentation/d/1LG8MqRrbb9qSg4m8ZjJXPQFccb9YPc-6387hSNpscpY/edit?usp=sharing)) - [MetaMask Snaps YouTube playlist](https://www.youtube.com/playlist?list=PLJ8kQp5OiaEM6ad6mC1NmJCGJSZm7cBfI) - [How to Build Your Own Polkadot MetaMask Snap](https://www.youtube.com/watch?v=vyb1wVFahvM) (32 min) - [How to Build and Customize a MetaMask Snap](https://www.youtube.com/watch?v=4bt8udi7po0) (47 min) ## Community -- [Snaps GitHub discussions](https://github.com/MetaMask/snaps/discussions) - Browse - discussions and ask questions about Snaps. -- [Consensys Discord](https://discord.gg/consensys) - Ask questions about Snaps on - the **mm-snaps-dev** channel. -- [Snaps GitHub issues](https://github.com/MetaMask/snaps/issues) - If you encounter - any issues with Snaps, open a GitHub issue. +- [Snaps GitHub discussions](https://github.com/MetaMask/snaps/discussions) - Browse discussions and ask questions about Snaps. +- [Consensys Discord](https://discord.gg/consensys) - Ask questions about Snaps on the **mm-snaps-dev** channel. +- [Snaps GitHub issues](https://github.com/MetaMask/snaps/issues) - If you encounter any issues with Snaps, open a GitHub issue. ## Snaps for developers Many Snaps are designed to be used by developers. -- [CubeSigner](https://cubist.dev/cubesigner-snap-hardware-backed-key-management-for-metamask-developers) - - Enables dapp developers to manage keys for Ethereum, Bitcoin, Solana, and more using - secure remote hardware. -- [Galactica ZK Vault](https://docs.galactica.com/galactica-developer-documentation) - - Integrates the Galactica Network for dapps to leverage ZK-proofs for compliant privacy. -- [Hedera Wallet](https://docs.tuum.tech/hedera-wallet-snap) - Build Hedera dapps with - the methods provided by Hedera Wallet. -- [Leap Wallet](https://docs.leapwallet.io/cosmos/leap-metamask-snap/integrating-snaps) - - Connect Cosmos dapps to MetaMask with Leap Wallet. -- [MinaPortal](https://github.com/sotatek-dev/mina-snap/tree/master/packages/snap#methods) - - Build ZkApps on Mina Network with the dapp methods provided by MinaPortal. +- [CubeSigner](https://cubist.dev/cubesigner-snap-hardware-backed-key-management-for-metamask-developers) - Enables dapp developers to manage keys for Ethereum, Bitcoin, Solana, and more using secure remote hardware. +- [Galactica ZK Vault](https://docs.galactica.com/galactica-developer-documentation) - Integrates the Galactica Network for dapps to leverage ZK-proofs for compliant privacy. +- [Hedera Wallet](https://docs.tuum.tech/hedera-wallet-snap) - Build Hedera dapps with the methods provided by Hedera Wallet. +- [Leap Wallet](https://docs.leapwallet.io/cosmos/leap-metamask-snap/integrating-snaps) - Connect Cosmos dapps to MetaMask with Leap Wallet. +- [MinaPortal](https://github.com/sotatek-dev/mina-snap/tree/master/packages/snap#methods) - Build ZkApps on Mina Network with the dapp methods provided by MinaPortal. From 8d0ac8f4dcb0f6442bb9ebd360fe61ac42f47c36 Mon Sep 17 00:00:00 2001 From: Christian Montoya Date: Tue, 26 Aug 2025 23:10:33 -0400 Subject: [PATCH 2/9] More details on how to publish a Snap Also reference the install tester tool instead of the sandbox --- snaps/how-to/publish-a-snap.md | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/snaps/how-to/publish-a-snap.md b/snaps/how-to/publish-a-snap.md index c3bb8964318..5f1178b71b1 100644 --- a/snaps/how-to/publish-a-snap.md +++ b/snaps/how-to/publish-a-snap.md @@ -5,34 +5,23 @@ sidebar_position: 8 # Publish a Snap -Snaps are npm packages, so publishing a Snap is as simple as publishing an npm package. -Refer to the [npm CLI documentation](https://docs.npmjs.com/cli/v8/commands/npm-publish) for details -on publishing to the public registry. -The following details are specific to Snaps: +Snaps are npm packages, so publishing a Snap is as simple as publishing an npm package. Refer to the [npm CLI documentation](https://docs.npmjs.com/cli/v8/commands/npm-publish) for details on publishing to the public registry. The following details are specific to Snaps: - The version in `package.json` and `snap.manifest.json` should match. - The `repository.url` field in `package.json` should match the correct repository for your Snap. - The `source.location.npm.packageName` in `snap.manifest.json` should match the name in `package.json`. -- The `proposedName` in `snap.manifest.json` should be a human-readable name and should not include - the words "MetaMask" or "Snap." -- The image specified in `iconPath` in the manifest file is used as the icon displayed when - installing the Snap, in custom dialogs, and in the settings menu. +- The `proposedName` in `snap.manifest.json` should be a human-readable name and should not include the words "MetaMask" or "Snap." +- The image specified in `iconPath` in the manifest file is used as the icon displayed when installing the Snap, in custom dialogs, and in the settings menu. - This icon should be a valid SVG. - The icon will be cropped in a circle when displayed in MetaMask; you do not need to make the icon circular. + - The icon should only have a transparent background if the icon is clearly visible on both light and dark backgrounds. -After publishing the Snap, any dapp can connect to the Snap by using the Snap ID `npm:[packageName]`. +After publishing the Snap, any dapp can connect to the Snap by using the Snap ID `npm:[packageName]`. You can use the [Snap Install Tester](https://montoya.github.io/snap-install-tester/) with [MetaMask Flask](../get-started/install-flask.md) to verify that your Snap package was published correctly. -:::caution -If you are using the Snap monorepo project generated in the [quickstart](../get-started/quickstart.md), -make sure to only publish the Snap package in `/packages/snap`. -You can use the [Snaps sandbox](test-a-snap.md#test-in-the-sandbox) to verify -that your Snap was published correctly: in the sandbox settings, disable **Use current Snap ID** and specify the npm ID of your Snap. +:::caution If you are using the Snap monorepo project generated in the [quickstart](../get-started/quickstart.md), make sure to only publish the Snap package in `/packages/snap`. -Also, make sure to update the manifest file, icon file, and README to differentiate your Snap from the template. -::: +Also, make sure to update the manifest file, icon file, and README to differentiate your Snap from the template. ::: ## Make a Snap available to users -After publishing a Snap, you can make it available to MetaMask users by -[getting your Snap allowlisted](get-allowlisted.md). -Once allowlisted, anyone can install your Snap in the MetaMask extension. +After publishing a Snap, you can make it available to MetaMask users by [getting your Snap allowlisted](get-allowlisted.md). Once allowlisted, anyone can install your Snap in the MetaMask extension. From 2407391273741895a13a31528bf3a28545817afb Mon Sep 17 00:00:00 2001 From: Christian Montoya Date: Tue, 26 Aug 2025 23:13:00 -0400 Subject: [PATCH 3/9] Remove requirement for builder engagement onboarding --- snaps/how-to/get-allowlisted.md | 127 ++++++++------------------------ 1 file changed, 29 insertions(+), 98 deletions(-) diff --git a/snaps/how-to/get-allowlisted.md b/snaps/how-to/get-allowlisted.md index ad1e43134f7..00f55d99a97 100644 --- a/snaps/how-to/get-allowlisted.md +++ b/snaps/how-to/get-allowlisted.md @@ -7,38 +7,23 @@ sidebar_position: 9 Once you have built your Snap, tested it, and published it to npm, you can make it available to MetaMask users. -If your Snap only uses [open permissions](#open-permissions), anyone can install it on the MetaMask extension. -However, third-party Snaps that use -[protected permissions](#open-permissions) -must be put on an allowlist before users can install them. -This means that at this time, for Snaps that use protected permissions, only those that are reviewed by MetaMask can be installed. -In the future, this system will be opened up. - -:::caution Important -By including a Snap on the allowlist, Consensys is not endorsing, recommending, or guaranteeing the -safety of a Snap for your use or use for any reason. -Always do your own research before installing a Snap. -::: +If your Snap only uses [open permissions](#open-permissions), anyone can install it on the MetaMask extension. However, third-party Snaps that use [protected permissions](#open-permissions) must be put on an allowlist before users can install them. This means that at this time, for Snaps that use protected permissions, only those that are reviewed by MetaMask can be installed. In the future, this system will be opened up. -## Prerequisites +:::caution Important By including a Snap on the allowlist, Consensys is not endorsing, recommending, or guaranteeing the safety of a Snap for your use or use for any reason. Always do your own research before installing a Snap. ::: -- Ensure you have filled out the [Snap Builders Onboarding Form](https://feedback.metamask.io/snaps-onboarding). +## Prerequisites - Ensure that your Snap: - - Has publicly available source code. - You don't need to publish your code with an open source license, but users should be able to read - the source code of the Snap package. + - Has publicly available source code. You don't need to publish your code with an open source license, but users should be able to read the source code of the Snap package. - Is [published](publish-a-snap.md) to npm. - Does not impair MetaMask's compliance with laws or regulations. - Remove any `console` logs, "to-do" comments, and unused permissions or methods. -- Scan your Snap for security vulnerabilities using [Snapper](https://github.com/sayfer-io/Snapper) and - resolve any reported issues. +- Scan your Snap for security vulnerabilities using [Snapper](https://github.com/sayfer-io/Snapper) and resolve any reported issues. -- If your Snap uses any of the following API methods related to key management, you must provide - evidence of a third-party audit from an approved auditor: +- If your Snap uses any of the following API methods related to key management, you must provide evidence of a third-party audit from an approved auditor: - [`snap_getBip32Entropy`](../reference/snaps-api.md#snap_getbip32entropy) - [`snap_getBip32PublicKey`](../reference/snaps-api.md#snap_getbip32publickey) @@ -46,114 +31,61 @@ Always do your own research before installing a Snap. - [`snap_getEntropy`](../reference/snaps-api.md#snap_getentropy) - [`snap_manageAccounts`](../reference/snaps-api.md#snap_manageaccounts) - The audit must cover the Snap source code that is to run within the Snaps system, and any modules - used for key management. - You must provide the commit that was audited and the commit that has any fixes documented in the - audit report. + The audit must cover the Snap source code that is to run within the Snaps system, and any modules used for key management. You must provide the commit that was audited and the commit that has any fixes documented in the audit report. - :::info - A list of approved third-party auditors and details about the audit process are available on the - [MetaMask Snaps Builder Engagement Program](https://consensys.notion.site/Audit-process-1acbc67819dc4631b7a3d6c664e387a3). - ::: + :::info A list of approved third-party auditors and details about the audit process are available on the [MetaMask Snaps Builder Engagement Program](https://consensys.notion.site/Audit-process-1acbc67819dc4631b7a3d6c664e387a3). ::: ## Steps ### 1. Submit your Snap -Fill out the [MetaMask Snaps Directory Information form](https://go.metamask.io/snaps-directory-request). -The form requests information about your Snap, including the following: +Fill out the [MetaMask Snaps Directory Information form](https://go.metamask.io/snaps-directory-request). The form requests information about your Snap, including the following: -- **Snap name** - The name of your Snap. - This must match the `proposedName` field in the Snap [manifest file](../learn/about-snaps/files.md#manifest-file). - You cannot use these words in the name: "MetaMask," "Snap," "Meta," or "Mask." +- **Snap name** - The name of your Snap. This must match the `proposedName` field in the Snap [manifest file](../learn/about-snaps/files.md#manifest-file). You cannot use these words in the name: "MetaMask," "Snap," "Meta," or "Mask." -- **Snap builder name and URL** - The company, project, or personal site for your brand, where users - can learn more about you. +- **Snap builder name and URL** - The company, project, or personal site for your brand, where users can learn more about you. -- **Snap website URL** - A website where users can interact with your Snap. - If your Snap does not require a website to be used, you can leave this blank. - If your Snap works with multiple websites, you can include the URLs of additional websites in the - **long description**, but this URL should be an official website designed to interact with your Snap. +- **Snap website URL** - A website where users can interact with your Snap. If your Snap does not require a website to be used, you can leave this blank. If your Snap works with multiple websites, you can include the URLs of additional websites in the **long description**, but this URL should be an official website designed to interact with your Snap. -- **Snap short description** - A one or two sentence description of your Snap. - Try not to say "is a MetaMask Snap"—users already know this! +- **Snap short description** - A one or two sentence description of your Snap. Try not to say "is a MetaMask Snap"—users already know this! -- **Snap long description** - A description of your Snap's features and how to use them. - You can use line breaks, lists, and URLs. - You cannot use HTML. - If applicable, describe quick steps to onboard and use the Snap. - For example: _After installing the Snap, visit the companion dapp at - https://voyager-snap.linea.build to connect an account and track your Linea Voyage progress._ +- **Snap long description** - A description of your Snap's features and how to use them. You can use line breaks, lists, and URLs. You cannot use HTML. If applicable, describe quick steps to onboard and use the Snap. For example: _After installing the Snap, visit the companion dapp at https://voyager-snap.linea.build to connect an account and track your Linea Voyage progress._ -- **GitHub repository and npm package URLs** - The public GitHub repo that hosts your Snap's - source code, and the npm package of your [published Snap](../how-to/publish-a-snap.md). - If your Snap's source code is hosted on a different site, such as GitLab, you can link to that instead. +- **GitHub repository and npm package URLs** - The public GitHub repo that hosts your Snap's source code, and the npm package of your [published Snap](../how-to/publish-a-snap.md). If your Snap's source code is hosted on a different site, such as GitLab, you can link to that instead. -- **Snap version number to be allowlisted** - The Snap version number as specified in `package.json` - and `snap.manifest.json`. - Make sure that the version numbers match and that the Snap has been built with the correct `shasum`. +- **Snap version number to be allowlisted** - The Snap version number as specified in `package.json` and `snap.manifest.json`. Make sure that the version numbers match and that the Snap has been built with the correct `shasum`. -- **Snap auditor and audit report** - A PDF or URL of the [required audit report](#prerequisites), - if your Snap uses one or more of the key management API methods. - If your Snap doesn't require an audit, leave this field blank. +- **Snap auditor and audit report** - A PDF or URL of the [required audit report](#prerequisites), if your Snap uses one or more of the key management API methods. If your Snap doesn't require an audit, leave this field blank. - :::note - The audit report will be made public. - You can ask your auditor to publish the report on their website and provide the link to us. - ::: + :::note The audit report will be made public. You can ask your auditor to publish the report on their website and provide the link to us. ::: -- **Customer support details** - - [Customer support information](https://consensys.notion.site/Providing-User-Support-Information-cff79a7d896e4da6a2f8a17ce074e585) - to ensure a smooth user experience for your Snap. - This allows MetaMask to escalate any issues that a user might encounter with your Snap. - The escalation contact will be kept confidential within MetaMask, and the rest of the information - will be public. - You must provide an escalation contact and at least one other customer support item. +- **Customer support details** - [Customer support information](https://consensys.notion.site/Providing-User-Support-Information-cff79a7d896e4da6a2f8a17ce074e585) to ensure a smooth user experience for your Snap. This allows MetaMask to escalate any issues that a user might encounter with your Snap. The escalation contact will be kept confidential within MetaMask, and the rest of the information will be public. You must provide an escalation contact and at least one other customer support item. -- **Images** - Screenshots or promotional images to help users get an idea of what your Snap can do. - Here's your opportunity to provide compelling previews of your Snap! +- **Images** - Screenshots or promotional images to help users get an idea of what your Snap can do. Here's your opportunity to provide compelling previews of your Snap! -- **Demo video** - A video walking through how to use your Snap. - This will help MetaMask review your Snap, and might also be used by the MetaMask marketing team. +- **Demo video** - A video walking through how to use your Snap. This will help MetaMask review your Snap, and might also be used by the MetaMask marketing team. ### 2. Allowlist review -Your Snap will be reviewed by the MetaMask Snaps team to ensure it is functional and well-designed. -If the Snap requires an audit, the team will review the audit report to ensure that all -vulnerabilities with medium or higher risk have been addressed. -All Snaps require at least two approvals to be allowlisted. +Your Snap will be reviewed by the MetaMask Snaps team to ensure it is functional and well-designed. If the Snap requires an audit, the team will review the audit report to ensure that all vulnerabilities with medium or higher risk have been addressed. All Snaps require at least two approvals to be allowlisted. ### 3. Directory listing -Once your Snap is on the allowlist, it will appear in the [MetaMask Snaps Directory](https://snaps.metamask.io). -You can direct users to the directory to find and install your Snap. +Once your Snap is on the allowlist, it will appear in the [MetaMask Snaps Directory](https://snaps.metamask.io). You can direct users to the directory to find and install your Snap. ### 4. Distribute your Snap -You can deploy a companion dapp where users can learn about your Snap and install it, or you can -integrate your Snap with your existing dapp. +You can deploy a companion dapp where users can learn about your Snap and install it, or you can integrate your Snap with your existing dapp. -If your Snap is designed to communicate with dapps, you can encourage other dapp developers to -[connect to your Snap](connect-to-a-snap.md). +If your Snap is designed to communicate with dapps, you can encourage other dapp developers to [connect to your Snap](connect-to-a-snap.md). -:::note -While testing your Snap, you might have designed your dapp to require MetaMask Flask. -Once your Snap is allowlisted, you should update your dapp to support any flavor of MetaMask, -and show the orange MetaMask logo instead of the purple Flask logo. -::: +:::note While testing your Snap, you might have designed your dapp to require MetaMask Flask. Once your Snap is allowlisted, you should update your dapp to support any flavor of MetaMask, and show the orange MetaMask logo instead of the purple Flask logo. ::: ### 5. Update your Snap -The allowlist uses strict versioning for all Snaps. -After publishing a new version of your Snap to npm, you must re-submit it for allowlisting by -filling out the -[MetaMask Snaps Directory Information Update form](https://go.metamask.io/snaps-directory-update-request). -Users will not be able to install a new version until it is allowlisted. +The allowlist uses strict versioning for all Snaps. After publishing a new version of your Snap to npm, you must re-submit it for allowlisting by filling out the [MetaMask Snaps Directory Information Update form](https://go.metamask.io/snaps-directory-update-request). Users will not be able to install a new version until it is allowlisted. -You can also update any information about your Snap using the form. -For fields that you don't need to update, you can leave them blank or enter "N/A." -When providing the new version to be allowlisted, you should also note whether previous versions of -your Snap should be removed from the allowlist (that is, replaced with the new version). +You can also update any information about your Snap using the form. For fields that you don't need to update, you can leave them blank or enter "N/A." When providing the new version to be allowlisted, you should also note whether previous versions of your Snap should be removed from the allowlist (that is, replaced with the new version). ## Open permissions @@ -171,7 +103,6 @@ The following is a list of permissions that do not require allowlisting: - [`snap_manageState`](../reference/snaps-api.md#snap_managestate) - [`snap_notify`](../reference/snaps-api.md#snap_notify) -If your Snap only uses permissions from this list, -it can be installed in the MetaMask extension without inclusion on the allowlist. +If your Snap only uses permissions from this list, it can be installed in the MetaMask extension without inclusion on the allowlist. Any permissions not on this list are _protected permissions_ and require allowlisting. From 0c199b955c430544f03544be7c81317571b3e7ae Mon Sep 17 00:00:00 2001 From: Christian Montoya Date: Tue, 26 Aug 2025 23:21:16 -0400 Subject: [PATCH 4/9] Extra callout about Flask --- snaps/get-started/install-flask.md | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/snaps/get-started/install-flask.md b/snaps/get-started/install-flask.md index 14cb0a5a845..f52745a7cab 100644 --- a/snaps/get-started/install-flask.md +++ b/snaps/get-started/install-flask.md @@ -5,31 +5,16 @@ sidebar_position: 1 # Install MetaMask Flask -To build your own Snaps or test upcoming MetaMask features, install the MetaMask Flask browser -extension on [Google Chrome](https://chromewebstore.google.com/detail/metamask-flask-developmen/ljfoeinjpaedjfecbmggjgodbgkmjkjk) -or [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/metamask-flask/). +To build your own Snaps or test upcoming MetaMask features, install the MetaMask Flask browser extension on [Google Chrome](https://chromewebstore.google.com/detail/metamask-flask-developmen/ljfoeinjpaedjfecbmggjgodbgkmjkjk) or [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/metamask-flask/). -Install Flask in a new browser profile, or disable any existing installed versions of MetaMask -before installing Flask. -Running multiple instances of MetaMask in the same browser profile can break dapp interactions. +Install Flask in a new browser profile, or disable any existing installed versions of MetaMask before installing Flask. Running multiple instances of MetaMask in the same browser profile can break dapp interactions. -:::note Developers only -MetaMask Flask is an experimental tool only for developers. -If you are not a developer, you should not install MetaMask Flask. -::: +:::note Developers only MetaMask Flask is an experimental tool only for developers. If you are not a developer, you should not install MetaMask Flask. ::: -:::warning Do not import accounts with funds to Flask -We do not recommend importing your Secret Recovery Phrase from MetaMask stable to MetaMask Flask. -If you import accounts with funds into Flask, you do so at your own risk. -::: +:::warning Do not import accounts with funds to Flask We do not recommend importing your Secret Recovery Phrase from MetaMask stable to MetaMask Flask. If you import accounts with funds into Flask, you do so at your own risk. ::: ## About MetaMask Flask -MetaMask Flask is an experimental playground that provides developers access to upcoming MetaMask features. -While a small set of audited Snaps are allowlisted in the stable version of the MetaMask browser -extension, MetaMask Flask is intended for developers building and testing Snaps locally or from npm. -Also, new MetaMask features are enabled in Flask for testing and developer feedback before they're -enabled in MetaMask stable. -These features appear in the documentation with the **Flask** or **FLASK ONLY** tag. -You can also view Flask-specific features by looking for the **\[FLASK\]** label in the -[MetaMask Extension changelog](https://github.com/MetaMask/metamask-extension/blob/develop/CHANGELOG.md). +MetaMask Flask is an experimental playground that provides developers access to upcoming MetaMask features. While a small set of audited Snaps are allowlisted in the stable version of the MetaMask browser extension, MetaMask Flask is intended for developers building and testing Snaps locally or from npm. Also, new MetaMask features are enabled in Flask for testing and developer feedback before they're enabled in MetaMask stable. These features appear in the documentation with the **Flask** or **FLASK ONLY** tag. You can also view Flask-specific features by looking for the **\[FLASK\]** label in the [MetaMask Extension changelog](https://github.com/MetaMask/metamask-extension/blob/develop/CHANGELOG.md). + +:::note You should not encourage users to install Flask. It is not guaranteed to be reliable. Also, if you do not submit your Snap for the allowlist, it will not be listed in the [MetaMask Snaps Directory](https://snaps.metamask.io), so users will not be able to find your Snap. ::: From 6856a92aa8abc2f82e5cfbd3eb9b369831706b20 Mon Sep 17 00:00:00 2001 From: Christian Montoya Date: Tue, 26 Aug 2025 23:33:56 -0400 Subject: [PATCH 5/9] Update URLs in allowlisting guide --- snaps/how-to/get-allowlisted.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snaps/how-to/get-allowlisted.md b/snaps/how-to/get-allowlisted.md index 00f55d99a97..5a3ce5436d2 100644 --- a/snaps/how-to/get-allowlisted.md +++ b/snaps/how-to/get-allowlisted.md @@ -33,7 +33,7 @@ If your Snap only uses [open permissions](#open-permissions), anyone can install The audit must cover the Snap source code that is to run within the Snaps system, and any modules used for key management. You must provide the commit that was audited and the commit that has any fixes documented in the audit report. - :::info A list of approved third-party auditors and details about the audit process are available on the [MetaMask Snaps Builder Engagement Program](https://consensys.notion.site/Audit-process-1acbc67819dc4631b7a3d6c664e387a3). ::: + :::info A list of approved third-party auditors and details about the audit process are available on the [MetaMask Snaps Wiki](https://github.com/MetaMask/snaps/wiki/Audits). ::: ## Steps @@ -59,7 +59,7 @@ Fill out the [MetaMask Snaps Directory Information form](https://go.metamask.io/ :::note The audit report will be made public. You can ask your auditor to publish the report on their website and provide the link to us. ::: -- **Customer support details** - [Customer support information](https://consensys.notion.site/Providing-User-Support-Information-cff79a7d896e4da6a2f8a17ce074e585) to ensure a smooth user experience for your Snap. This allows MetaMask to escalate any issues that a user might encounter with your Snap. The escalation contact will be kept confidential within MetaMask, and the rest of the information will be public. You must provide an escalation contact and at least one other customer support item. +- **Customer support details** - [Customer support information](https://github.com/MetaMask/snaps/wiki/User-Support-Information) to ensure a smooth user experience for your Snap. This allows MetaMask to escalate any issues that a user might encounter with your Snap. The escalation contact will be kept confidential within MetaMask, and the rest of the information will be public. You must provide an escalation contact and at least one other customer support item. - **Images** - Screenshots or promotional images to help users get an idea of what your Snap can do. Here's your opportunity to provide compelling previews of your Snap! From 0de5d9f63cd7e3f54e2da8b543706daa38941a14 Mon Sep 17 00:00:00 2001 From: Christian Montoya Date: Tue, 26 Aug 2025 23:35:41 -0400 Subject: [PATCH 6/9] Warn about account Snaps --- snaps/features/custom-evm-accounts/index.md | 105 ++++++-------------- 1 file changed, 28 insertions(+), 77 deletions(-) diff --git a/snaps/features/custom-evm-accounts/index.md b/snaps/features/custom-evm-accounts/index.md index 3bdfa4d72e8..c475eb7f249 100644 --- a/snaps/features/custom-evm-accounts/index.md +++ b/snaps/features/custom-evm-accounts/index.md @@ -5,32 +5,26 @@ sidebar_position: 2 # Custom EVM accounts -The Keyring API integrates custom EVM accounts inside MetaMask. -You can use the Keyring API to display custom accounts, such as multi-party computation (MPC) -accounts and [ERC-4337 accounts](#account-abstraction-erc-4337), alongside regular MetaMask accounts -in the user interface: +:::caution MetaMask is not currently accepting allowlisting requests for Custom EVM Account Snaps. ::: + +The Keyring API integrates custom EVM accounts inside MetaMask. You can use the Keyring API to display custom accounts, such as multi-party computation (MPC) accounts and [ERC-4337 accounts](#account-abstraction-erc-4337), alongside regular MetaMask accounts in the user interface:

Account management Snap accounts in MetaMask UI

-To use the Keyring API, you first [implement the API in an account management Snap](create-account-snap.md) -(also known as an "account Snap"). -You can then [call Keyring API methods from a companion dapp](create-companion-dapp.md) -to enable users to create and interact with the custom accounts. +To use the Keyring API, you first [implement the API in an account management Snap](create-account-snap.md) (also known as an "account Snap"). You can then [call Keyring API methods from a companion dapp](create-companion-dapp.md) to enable users to create and interact with the custom accounts. :::tip see also - [Create an account management Snap](create-account-snap.md) - [Create an account management companion dapp](create-companion-dapp.md) - [Account management Snap security guidelines](security.md) -- [Keyring API reference](../../reference/keyring-api/index.md) - ::: +- [Keyring API reference](../../reference/keyring-api/index.md) ::: ## System context diagram -The following diagram shows the system context when interacting with accounts managed by an account -management Snap: +The following diagram shows the system context when interacting with accounts managed by an account management Snap:

@@ -51,19 +45,13 @@ The diagram contains the following components: - **User** - The user interacting with the dapp, the Snap companion dapp, and MetaMask. - **Dapp** - The dapp requesting an action to be performed on an account. -- **MetaMask** - The wallet the dapp connects to. - MetaMask routes requests to the account management Snap and lets the user perform some level of - account management. -- **Snap** - The account management Snap that implements the Keyring API to manage the user's - accounts and handle requests that use these accounts. -- **Snap companion dapp** - The Snap's user interface component that allows the user to interact with - the Snap to manage accounts and requests. +- **MetaMask** - The wallet the dapp connects to. MetaMask routes requests to the account management Snap and lets the user perform some level of account management. +- **Snap** - The account management Snap that implements the Keyring API to manage the user's accounts and handle requests that use these accounts. +- **Snap companion dapp** - The Snap's user interface component that allows the user to interact with the Snap to manage accounts and requests. ## Account management Snap installation flow -The first process a user encounters when using an account management Snap is the Snap installation flow. -This process can be initiated through MetaMask's or the Snap companion dapp. -The flow looks like the following: +The first process a user encounters when using an account management Snap is the Snap installation flow. This process can be initiated through MetaMask's or the Snap companion dapp. The flow looks like the following: ```mermaid %%{ @@ -97,16 +85,11 @@ User ->> MetaMask: Approve permissions MetaMask -->>- Site: OK ``` -The MetaMask account selection modal has an option called **Add account Snap**. -This option shows a list of account management Snaps. -Each Snap redirects the user to the companion dapp that contains the user interface to configure and -manage the Snap. +The MetaMask account selection modal has an option called **Add account Snap**. This option shows a list of account management Snaps. Each Snap redirects the user to the companion dapp that contains the user interface to configure and manage the Snap. ## Custom account creation flow -Once the account management Snap is installed, the user can use the Snap companion dapp to create or -import custom accounts. -The flow looks like the following: +Once the account management Snap is installed, the user can use the Snap companion dapp to create or import custom accounts. The flow looks like the following: ```mermaid %%{ @@ -137,24 +120,17 @@ Snap -->>- Site: OK Site -->>- User: Done ``` -The companion dapp presents a user interface allowing the user to configure their custom account. -The dapp creates an account using [`keyring_createAccount`](../../reference/keyring-api/account-management/index.md#keyring_createaccount). +The companion dapp presents a user interface allowing the user to configure their custom account. The dapp creates an account using [`keyring_createAccount`](../../reference/keyring-api/account-management/index.md#keyring_createaccount). -The Snap keeps track of the accounts that it creates using [`snap_manageState`](../../reference/snaps-api.md#snap_managestate). -Once the Snap has created an account, it notifies MetaMask using -[`snap_manageAccounts`](../../reference/snaps-api.md#snap_manageaccounts). +The Snap keeps track of the accounts that it creates using [`snap_manageState`](../../reference/snaps-api.md#snap_managestate). Once the Snap has created an account, it notifies MetaMask using [`snap_manageAccounts`](../../reference/snaps-api.md#snap_manageaccounts). Once the Snap has created an account, that account can be used to sign messages and transactions. ## Transaction flows -The Keyring API supports two flows for handling requests: [synchronous](#synchronous-transaction-flow) -and [asynchronous](#asynchronous-transaction-flow). +The Keyring API supports two flows for handling requests: [synchronous](#synchronous-transaction-flow) and [asynchronous](#asynchronous-transaction-flow). -In general, you should use the asynchronous flow when the request requires user interaction (for -example, using a hardware key or a threshold signature scheme) or when the request takes a long time -to complete. -You should use the synchronous flow for any other use case. +In general, you should use the asynchronous flow when the request requires user interaction (for example, using a hardware key or a threshold signature scheme) or when the request takes a long time to complete. You should use the synchronous flow for any other use case. ### Synchronous transaction flow @@ -192,14 +168,9 @@ MetaMask -->>- Dapp: result Dapp -->>- User: Done ``` -The flow starts when a user or dapp initiates a sign request. -At that point, MetaMask detects that this interaction is requested for an account controlled by the -account management Snap. +The flow starts when a user or dapp initiates a sign request. At that point, MetaMask detects that this interaction is requested for an account controlled by the account management Snap. -After the user approves the transaction in MetaMask, MetaMask calls -[`keyring_submitRequest`](../../reference/keyring-api/account-management/index.md#keyring_submitrequest), -which receives the original RPC request and returns a response with `pending` set to `false`, and -`result` set to the requested signature. +After the user approves the transaction in MetaMask, MetaMask calls [`keyring_submitRequest`](../../reference/keyring-api/account-management/index.md#keyring_submitrequest), which receives the original RPC request and returns a response with `pending` set to `false`, and `result` set to the requested signature. ### Asynchronous transaction flow @@ -254,29 +225,15 @@ deactivate Site Dapp -->>- User: Done ``` -The flow starts the same way as the [synchronous flow](#synchronous-transaction-flow): a user or -dapp initiates a sign request. -After approval, MetaMask calls -[`keyring_submitRequest`](../../reference/keyring-api/account-management/index.md#keyring_submitrequest). - -Since the Snap doesn't answer the request directly, it stores the pending request in its internal -state using [`snap_manageState`](../../reference/snaps-api.md#snap_managestate). -The Snap sends a `{ pending: true, redirect? }` response to indicate that the request will be -handled asynchronously. -This response can optionally contain a redirect URL that MetaMask will open in a new tab to allow -the user to interact with the Snap companion dapp. - -The companion dapp gets the Snap's pending request using -[`keyring_getRequest`](../../reference/keyring-api/account-management/index.md#keyring_getrequest). -It resolves the request using -[`keyring_approveRequest`](../../reference/keyring-api/account-management/index.md#keyring_approverequest), -and the Snap resolves the request using [`snap_manageAccounts`](../../reference/snaps-api.md#snap_manageaccounts), -notifying MetaMask of the result. +The flow starts the same way as the [synchronous flow](#synchronous-transaction-flow): a user or dapp initiates a sign request. After approval, MetaMask calls [`keyring_submitRequest`](../../reference/keyring-api/account-management/index.md#keyring_submitrequest). + +Since the Snap doesn't answer the request directly, it stores the pending request in its internal state using [`snap_manageState`](../../reference/snaps-api.md#snap_managestate). The Snap sends a `{ pending: true, redirect? }` response to indicate that the request will be handled asynchronously. This response can optionally contain a redirect URL that MetaMask will open in a new tab to allow the user to interact with the Snap companion dapp. + +The companion dapp gets the Snap's pending request using [`keyring_getRequest`](../../reference/keyring-api/account-management/index.md#keyring_getrequest). It resolves the request using [`keyring_approveRequest`](../../reference/keyring-api/account-management/index.md#keyring_approverequest), and the Snap resolves the request using [`snap_manageAccounts`](../../reference/snaps-api.md#snap_manageaccounts), notifying MetaMask of the result. ## EOA methods -An account management Snap can implement the following methods to support dapp requests from -externally owned accounts (EOAs): +An account management Snap can implement the following methods to support dapp requests from externally owned accounts (EOAs): - [`personal_sign`](../../reference/keyring-api/chain-methods.md#personal_sign) - [`eth_signTypedData_v4`](../../reference/keyring-api/chain-methods.md#eth_signtypeddata_v4) @@ -285,16 +242,11 @@ externally owned accounts (EOAs): ## Account abstraction (ERC-4337) -:::flaskOnly -::: +:::flaskOnly ::: -Account abstraction, specified by [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337), introduces -_user operations_ and enables users to manage smart contract accounts containing arbitrary -verification logic. -Users can use these ERC-4337 accounts instead of externally owned accounts as primary accounts. +Account abstraction, specified by [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337), introduces _user operations_ and enables users to manage smart contract accounts containing arbitrary verification logic. Users can use these ERC-4337 accounts instead of externally owned accounts as primary accounts. -An account management Snap can implement the following methods to support dapp requests from -ERC-4337 accounts: +An account management Snap can implement the following methods to support dapp requests from ERC-4337 accounts: - [`eth_prepareUserOperation`](../../reference/keyring-api/chain-methods.md#eth_prepareuseroperation) - [`eth_patchUserOperation`](../../reference/keyring-api/chain-methods.md#eth_patchuseroperation) @@ -347,8 +299,7 @@ MetaMask ->> MetaMask: Submit userOp to bundler and wait for transaction hash MetaMask -->>- Dapp: Transaction hash ``` -See the [ERC-4337 methods](../../reference/keyring-api/chain-methods.md#erc-4337-methods) for more -information about their parameters and response details. +See the [ERC-4337 methods](../../reference/keyring-api/chain-methods.md#erc-4337-methods) for more information about their parameters and response details. ## Examples From 42c73489d76314c0e1ddca35ab16abb02d9ec35d Mon Sep 17 00:00:00 2001 From: Christian Montoya Date: Wed, 27 Aug 2025 13:32:45 -0400 Subject: [PATCH 7/9] Update index.md --- snaps/features/custom-evm-accounts/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snaps/features/custom-evm-accounts/index.md b/snaps/features/custom-evm-accounts/index.md index c475eb7f249..3d989baa249 100644 --- a/snaps/features/custom-evm-accounts/index.md +++ b/snaps/features/custom-evm-accounts/index.md @@ -5,7 +5,9 @@ sidebar_position: 2 # Custom EVM accounts -:::caution MetaMask is not currently accepting allowlisting requests for Custom EVM Account Snaps. ::: +::: caution +MetaMask is not currently accepting allowlisting requests for Custom EVM Account Snaps. +::: The Keyring API integrates custom EVM accounts inside MetaMask. You can use the Keyring API to display custom accounts, such as multi-party computation (MPC) accounts and [ERC-4337 accounts](#account-abstraction-erc-4337), alongside regular MetaMask accounts in the user interface: From 0768209b681830971b46ce171c1b6e1c7e91aed3 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Thu, 28 Aug 2025 13:34:06 -0700 Subject: [PATCH 8/9] revert line breaks and update prettier config --- .prettierrc | 2 +- snaps/features/custom-evm-accounts/index.md | 104 ++++++++++++----- snaps/get-started/install-flask.md | 35 ++++-- snaps/how-to/get-allowlisted.md | 123 +++++++++++++++----- snaps/how-to/publish-a-snap.md | 25 ++-- snaps/learn/resources.md | 109 +++++++++++------ 6 files changed, 294 insertions(+), 104 deletions(-) diff --git a/.prettierrc b/.prettierrc index b04acc0f13d..9f08df99e72 100644 --- a/.prettierrc +++ b/.prettierrc @@ -7,7 +7,7 @@ "singleQuote": true, "tabWidth": 2, "trailingComma": "es5", - "proseWrap": "never", + "proseWrap": "preserve", "printWidth": 100, "htmlWhitespaceSensitivity": "css", "vueIndentScriptAndStyle": true diff --git a/snaps/features/custom-evm-accounts/index.md b/snaps/features/custom-evm-accounts/index.md index 3d989baa249..e6835ca1dd3 100644 --- a/snaps/features/custom-evm-accounts/index.md +++ b/snaps/features/custom-evm-accounts/index.md @@ -5,28 +5,35 @@ sidebar_position: 2 # Custom EVM accounts -::: caution +:::caution MetaMask is not currently accepting allowlisting requests for Custom EVM Account Snaps. ::: -The Keyring API integrates custom EVM accounts inside MetaMask. You can use the Keyring API to display custom accounts, such as multi-party computation (MPC) accounts and [ERC-4337 accounts](#account-abstraction-erc-4337), alongside regular MetaMask accounts in the user interface: +The Keyring API integrates custom EVM accounts inside MetaMask. +You can use the Keyring API to display custom accounts, such as multi-party computation (MPC) +accounts and [ERC-4337 accounts](#account-abstraction-erc-4337), alongside regular MetaMask accounts +in the user interface:

Account management Snap accounts in MetaMask UI

-To use the Keyring API, you first [implement the API in an account management Snap](create-account-snap.md) (also known as an "account Snap"). You can then [call Keyring API methods from a companion dapp](create-companion-dapp.md) to enable users to create and interact with the custom accounts. +To use the Keyring API, you first [implement the API in an account management Snap](create-account-snap.md) +(also known as an "account Snap"). You can then [call Keyring API methods from a companion dapp](create-companion-dapp.md) to enable +users to create and interact with the custom accounts. :::tip see also - [Create an account management Snap](create-account-snap.md) - [Create an account management companion dapp](create-companion-dapp.md) - [Account management Snap security guidelines](security.md) -- [Keyring API reference](../../reference/keyring-api/index.md) ::: +- [Keyring API reference](../../reference/keyring-api/index.md) + ::: ## System context diagram -The following diagram shows the system context when interacting with accounts managed by an account management Snap: +The following diagram shows the system context when interacting with accounts managed by an account +management Snap:

@@ -47,13 +54,19 @@ The diagram contains the following components: - **User** - The user interacting with the dapp, the Snap companion dapp, and MetaMask. - **Dapp** - The dapp requesting an action to be performed on an account. -- **MetaMask** - The wallet the dapp connects to. MetaMask routes requests to the account management Snap and lets the user perform some level of account management. -- **Snap** - The account management Snap that implements the Keyring API to manage the user's accounts and handle requests that use these accounts. -- **Snap companion dapp** - The Snap's user interface component that allows the user to interact with the Snap to manage accounts and requests. +- **MetaMask** - The wallet the dapp connects to. + MetaMask routes requests to the account management Snap and lets the user perform some level of + account management. +- **Snap** - The account management Snap that implements the Keyring API to manage the user's + accounts and handle requests that use these accounts. +- **Snap companion dapp** - The Snap's user interface component that allows the user to interact with + the Snap to manage accounts and requests. ## Account management Snap installation flow -The first process a user encounters when using an account management Snap is the Snap installation flow. This process can be initiated through MetaMask's or the Snap companion dapp. The flow looks like the following: +The first process a user encounters when using an account management Snap is the Snap installation flow. +This process can be initiated through MetaMask's or the Snap companion dapp. +The flow looks like the following: ```mermaid %%{ @@ -87,11 +100,16 @@ User ->> MetaMask: Approve permissions MetaMask -->>- Site: OK ``` -The MetaMask account selection modal has an option called **Add account Snap**. This option shows a list of account management Snaps. Each Snap redirects the user to the companion dapp that contains the user interface to configure and manage the Snap. +The MetaMask account selection modal has an option called **Add account Snap**. +This option shows a list of account management Snaps. +Each Snap redirects the user to the companion dapp that contains the user interface to configure and +manage the Snap. ## Custom account creation flow -Once the account management Snap is installed, the user can use the Snap companion dapp to create or import custom accounts. The flow looks like the following: +Once the account management Snap is installed, the user can use the Snap companion dapp to create or +import custom accounts. +The flow looks like the following: ```mermaid %%{ @@ -122,17 +140,24 @@ Snap -->>- Site: OK Site -->>- User: Done ``` -The companion dapp presents a user interface allowing the user to configure their custom account. The dapp creates an account using [`keyring_createAccount`](../../reference/keyring-api/account-management/index.md#keyring_createaccount). +The companion dapp presents a user interface allowing the user to configure their custom account. +The dapp creates an account using [`keyring_createAccount`](../../reference/keyring-api/account-management/index.md#keyring_createaccount). -The Snap keeps track of the accounts that it creates using [`snap_manageState`](../../reference/snaps-api.md#snap_managestate). Once the Snap has created an account, it notifies MetaMask using [`snap_manageAccounts`](../../reference/snaps-api.md#snap_manageaccounts). +The Snap keeps track of the accounts that it creates using [`snap_manageState`](../../reference/snaps-api.md#snap_managestate). +Once the Snap has created an account, it notifies MetaMask using +[`snap_manageAccounts`](../../reference/snaps-api.md#snap_manageaccounts). Once the Snap has created an account, that account can be used to sign messages and transactions. ## Transaction flows -The Keyring API supports two flows for handling requests: [synchronous](#synchronous-transaction-flow) and [asynchronous](#asynchronous-transaction-flow). +The Keyring API supports two flows for handling requests: [synchronous](#synchronous-transaction-flow) +and [asynchronous](#asynchronous-transaction-flow). -In general, you should use the asynchronous flow when the request requires user interaction (for example, using a hardware key or a threshold signature scheme) or when the request takes a long time to complete. You should use the synchronous flow for any other use case. +In general, you should use the asynchronous flow when the request requires user interaction (for +example, using a hardware key or a threshold signature scheme) or when the request takes a long time +to complete. +You should use the synchronous flow for any other use case. ### Synchronous transaction flow @@ -170,9 +195,14 @@ MetaMask -->>- Dapp: result Dapp -->>- User: Done ``` -The flow starts when a user or dapp initiates a sign request. At that point, MetaMask detects that this interaction is requested for an account controlled by the account management Snap. +The flow starts when a user or dapp initiates a sign request. +At that point, MetaMask detects that this interaction is requested for an account controlled by the +account management Snap. -After the user approves the transaction in MetaMask, MetaMask calls [`keyring_submitRequest`](../../reference/keyring-api/account-management/index.md#keyring_submitrequest), which receives the original RPC request and returns a response with `pending` set to `false`, and `result` set to the requested signature. +After the user approves the transaction in MetaMask, MetaMask calls +[`keyring_submitRequest`](../../reference/keyring-api/account-management/index.md#keyring_submitrequest), +which receives the original RPC request and returns a response with `pending` set to `false`, and +`result` set to the requested signature. ### Asynchronous transaction flow @@ -227,15 +257,29 @@ deactivate Site Dapp -->>- User: Done ``` -The flow starts the same way as the [synchronous flow](#synchronous-transaction-flow): a user or dapp initiates a sign request. After approval, MetaMask calls [`keyring_submitRequest`](../../reference/keyring-api/account-management/index.md#keyring_submitrequest). - -Since the Snap doesn't answer the request directly, it stores the pending request in its internal state using [`snap_manageState`](../../reference/snaps-api.md#snap_managestate). The Snap sends a `{ pending: true, redirect? }` response to indicate that the request will be handled asynchronously. This response can optionally contain a redirect URL that MetaMask will open in a new tab to allow the user to interact with the Snap companion dapp. - -The companion dapp gets the Snap's pending request using [`keyring_getRequest`](../../reference/keyring-api/account-management/index.md#keyring_getrequest). It resolves the request using [`keyring_approveRequest`](../../reference/keyring-api/account-management/index.md#keyring_approverequest), and the Snap resolves the request using [`snap_manageAccounts`](../../reference/snaps-api.md#snap_manageaccounts), notifying MetaMask of the result. +The flow starts the same way as the [synchronous flow](#synchronous-transaction-flow): a user or +dapp initiates a sign request. +After approval, MetaMask calls +[`keyring_submitRequest`](../../reference/keyring-api/account-management/index.md#keyring_submitrequest). + +Since the Snap doesn't answer the request directly, it stores the pending request in its internal +state using [`snap_manageState`](../../reference/snaps-api.md#snap_managestate). +The Snap sends a `{ pending: true, redirect? }` response to indicate that the request will be +handled asynchronously. +This response can optionally contain a redirect URL that MetaMask will open in a new tab to allow +the user to interact with the Snap companion dapp. + +The companion dapp gets the Snap's pending request using +[`keyring_getRequest`](../../reference/keyring-api/account-management/index.md#keyring_getrequest). +It resolves the request using +[`keyring_approveRequest`](../../reference/keyring-api/account-management/index.md#keyring_approverequest), +and the Snap resolves the request using [`snap_manageAccounts`](../../reference/snaps-api.md#snap_manageaccounts), +notifying MetaMask of the result. ## EOA methods -An account management Snap can implement the following methods to support dapp requests from externally owned accounts (EOAs): +An account management Snap can implement the following methods to support dapp requests from +externally owned accounts (EOAs): - [`personal_sign`](../../reference/keyring-api/chain-methods.md#personal_sign) - [`eth_signTypedData_v4`](../../reference/keyring-api/chain-methods.md#eth_signtypeddata_v4) @@ -244,11 +288,16 @@ An account management Snap can implement the following methods to support dapp r ## Account abstraction (ERC-4337) -:::flaskOnly ::: +:::flaskOnly +::: -Account abstraction, specified by [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337), introduces _user operations_ and enables users to manage smart contract accounts containing arbitrary verification logic. Users can use these ERC-4337 accounts instead of externally owned accounts as primary accounts. +Account abstraction, specified by [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337), introduces +_user operations_ and enables users to manage smart contract accounts containing arbitrary +verification logic. +Users can use these ERC-4337 accounts instead of externally owned accounts as primary accounts. -An account management Snap can implement the following methods to support dapp requests from ERC-4337 accounts: +An account management Snap can implement the following methods to support dapp requests from +ERC-4337 accounts: - [`eth_prepareUserOperation`](../../reference/keyring-api/chain-methods.md#eth_prepareuseroperation) - [`eth_patchUserOperation`](../../reference/keyring-api/chain-methods.md#eth_patchuseroperation) @@ -301,7 +350,8 @@ MetaMask ->> MetaMask: Submit userOp to bundler and wait for transaction hash MetaMask -->>- Dapp: Transaction hash ``` -See the [ERC-4337 methods](../../reference/keyring-api/chain-methods.md#erc-4337-methods) for more information about their parameters and response details. +See the [ERC-4337 methods](../../reference/keyring-api/chain-methods.md#erc-4337-methods) for more +information about their parameters and response details. ## Examples diff --git a/snaps/get-started/install-flask.md b/snaps/get-started/install-flask.md index f52745a7cab..07c045fd8b2 100644 --- a/snaps/get-started/install-flask.md +++ b/snaps/get-started/install-flask.md @@ -5,16 +5,37 @@ sidebar_position: 1 # Install MetaMask Flask -To build your own Snaps or test upcoming MetaMask features, install the MetaMask Flask browser extension on [Google Chrome](https://chromewebstore.google.com/detail/metamask-flask-developmen/ljfoeinjpaedjfecbmggjgodbgkmjkjk) or [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/metamask-flask/). +To build your own Snaps or test upcoming MetaMask features, install the MetaMask Flask browser +extension on [Google Chrome](https://chromewebstore.google.com/detail/metamask-flask-developmen/ljfoeinjpaedjfecbmggjgodbgkmjkjk) +or [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/metamask-flask/). -Install Flask in a new browser profile, or disable any existing installed versions of MetaMask before installing Flask. Running multiple instances of MetaMask in the same browser profile can break dapp interactions. +Install Flask in a new browser profile, or disable any existing installed versions of MetaMask +before installing Flask. +Running multiple instances of MetaMask in the same browser profile can break dapp interactions. -:::note Developers only MetaMask Flask is an experimental tool only for developers. If you are not a developer, you should not install MetaMask Flask. ::: +:::note Developers only +MetaMask Flask is an experimental tool only for developers. +If you are not a developer, you should not install MetaMask Flask. +::: -:::warning Do not import accounts with funds to Flask We do not recommend importing your Secret Recovery Phrase from MetaMask stable to MetaMask Flask. If you import accounts with funds into Flask, you do so at your own risk. ::: +:::warning Do not import accounts with funds to Flask +We do not recommend importing your Secret Recovery Phrase from MetaMask stable to MetaMask Flask. +If you import accounts with funds into Flask, you do so at your own risk. +::: ## About MetaMask Flask -MetaMask Flask is an experimental playground that provides developers access to upcoming MetaMask features. While a small set of audited Snaps are allowlisted in the stable version of the MetaMask browser extension, MetaMask Flask is intended for developers building and testing Snaps locally or from npm. Also, new MetaMask features are enabled in Flask for testing and developer feedback before they're enabled in MetaMask stable. These features appear in the documentation with the **Flask** or **FLASK ONLY** tag. You can also view Flask-specific features by looking for the **\[FLASK\]** label in the [MetaMask Extension changelog](https://github.com/MetaMask/metamask-extension/blob/develop/CHANGELOG.md). - -:::note You should not encourage users to install Flask. It is not guaranteed to be reliable. Also, if you do not submit your Snap for the allowlist, it will not be listed in the [MetaMask Snaps Directory](https://snaps.metamask.io), so users will not be able to find your Snap. ::: +MetaMask Flask is an experimental playground that provides developers access to upcoming MetaMask features. +While a small set of audited Snaps are allowlisted in the stable version of the MetaMask browser +extension, MetaMask Flask is intended for developers building and testing Snaps locally or from npm. +Also, new MetaMask features are enabled in Flask for testing and developer feedback before they're +enabled in MetaMask stable. +These features appear in the documentation with the **Flask** or **FLASK ONLY** tag. +You can also view Flask-specific features by looking for the **\[FLASK\]** label in the +[MetaMask Extension changelog](https://github.com/MetaMask/metamask-extension/blob/develop/CHANGELOG.md). + +:::note +You should not encourage end users to install Flask. +It is not guaranteed to be reliable. +Also, if you do not [submit your Snap for the allowlist](../how-to/get-allowlisted.md), it will not be listed in the [MetaMask Snaps Directory](https://snaps.metamask.io), so users will not be able to find your Snap. +::: diff --git a/snaps/how-to/get-allowlisted.md b/snaps/how-to/get-allowlisted.md index 5a3ce5436d2..63c314fb512 100644 --- a/snaps/how-to/get-allowlisted.md +++ b/snaps/how-to/get-allowlisted.md @@ -7,23 +7,36 @@ sidebar_position: 9 Once you have built your Snap, tested it, and published it to npm, you can make it available to MetaMask users. -If your Snap only uses [open permissions](#open-permissions), anyone can install it on the MetaMask extension. However, third-party Snaps that use [protected permissions](#open-permissions) must be put on an allowlist before users can install them. This means that at this time, for Snaps that use protected permissions, only those that are reviewed by MetaMask can be installed. In the future, this system will be opened up. - -:::caution Important By including a Snap on the allowlist, Consensys is not endorsing, recommending, or guaranteeing the safety of a Snap for your use or use for any reason. Always do your own research before installing a Snap. ::: +If your Snap only uses [open permissions](#open-permissions), anyone can install it on the MetaMask extension. +However, third-party Snaps that use +[protected permissions](#open-permissions) +must be put on an allowlist before users can install them. +This means that at this time, for Snaps that use protected permissions, only those that are reviewed by MetaMask can be installed. +In the future, this system will be opened up. + +:::caution Important +By including a Snap on the allowlist, Consensys is not endorsing, recommending, or guaranteeing the +safety of a Snap for your use or use for any reason. +Always do your own research before installing a Snap. +::: ## Prerequisites - Ensure that your Snap: - - Has publicly available source code. You don't need to publish your code with an open source license, but users should be able to read the source code of the Snap package. + - Has publicly available source code. + You don't need to publish your code with an open source license, but users should be able to read + the source code of the Snap package. - Is [published](publish-a-snap.md) to npm. - Does not impair MetaMask's compliance with laws or regulations. - Remove any `console` logs, "to-do" comments, and unused permissions or methods. -- Scan your Snap for security vulnerabilities using [Snapper](https://github.com/sayfer-io/Snapper) and resolve any reported issues. +- Scan your Snap for security vulnerabilities using [Snapper](https://github.com/sayfer-io/Snapper) and + resolve any reported issues. -- If your Snap uses any of the following API methods related to key management, you must provide evidence of a third-party audit from an approved auditor: +- If your Snap uses any of the following API methods related to key management, you must provide + evidence of a third-party audit from an approved auditor: - [`snap_getBip32Entropy`](../reference/snaps-api.md#snap_getbip32entropy) - [`snap_getBip32PublicKey`](../reference/snaps-api.md#snap_getbip32publickey) @@ -31,61 +44,112 @@ If your Snap only uses [open permissions](#open-permissions), anyone can install - [`snap_getEntropy`](../reference/snaps-api.md#snap_getentropy) - [`snap_manageAccounts`](../reference/snaps-api.md#snap_manageaccounts) - The audit must cover the Snap source code that is to run within the Snaps system, and any modules used for key management. You must provide the commit that was audited and the commit that has any fixes documented in the audit report. + The audit must cover the Snap source code that is to run within the Snaps system, and any modules + used for key management. + You must provide the commit that was audited and the commit that has any fixes documented in the + audit report. - :::info A list of approved third-party auditors and details about the audit process are available on the [MetaMask Snaps Wiki](https://github.com/MetaMask/snaps/wiki/Audits). ::: + :::info + A list of approved third-party auditors and details about the audit process are available on the + [MetaMask Snaps Wiki](https://github.com/MetaMask/snaps/wiki/Audits). + ::: ## Steps ### 1. Submit your Snap -Fill out the [MetaMask Snaps Directory Information form](https://go.metamask.io/snaps-directory-request). The form requests information about your Snap, including the following: +Fill out the [MetaMask Snaps Directory Information form](https://go.metamask.io/snaps-directory-request). +The form requests information about your Snap, including the following: -- **Snap name** - The name of your Snap. This must match the `proposedName` field in the Snap [manifest file](../learn/about-snaps/files.md#manifest-file). You cannot use these words in the name: "MetaMask," "Snap," "Meta," or "Mask." +- **Snap name** - The name of your Snap. + This must match the `proposedName` field in the Snap [manifest file](../learn/about-snaps/files.md#manifest-file). + You cannot use these words in the name: "MetaMask," "Snap," "Meta," or "Mask." -- **Snap builder name and URL** - The company, project, or personal site for your brand, where users can learn more about you. +- **Snap builder name and URL** - The company, project, or personal site for your brand, where users + can learn more about you. -- **Snap website URL** - A website where users can interact with your Snap. If your Snap does not require a website to be used, you can leave this blank. If your Snap works with multiple websites, you can include the URLs of additional websites in the **long description**, but this URL should be an official website designed to interact with your Snap. +- **Snap website URL** - A website where users can interact with your Snap. + If your Snap does not require a website to be used, you can leave this blank. + If your Snap works with multiple websites, you can include the URLs of additional websites in the + **long description**, but this URL should be an official website designed to interact with your Snap. -- **Snap short description** - A one or two sentence description of your Snap. Try not to say "is a MetaMask Snap"—users already know this! +- **Snap short description** - A one or two sentence description of your Snap. + Try not to say "is a MetaMask Snap"—users already know this! -- **Snap long description** - A description of your Snap's features and how to use them. You can use line breaks, lists, and URLs. You cannot use HTML. If applicable, describe quick steps to onboard and use the Snap. For example: _After installing the Snap, visit the companion dapp at https://voyager-snap.linea.build to connect an account and track your Linea Voyage progress._ +- **Snap long description** - A description of your Snap's features and how to use them. + You can use line breaks, lists, and URLs. + You cannot use HTML. + If applicable, describe quick steps to onboard and use the Snap. + For example: _After installing the Snap, visit the companion dapp at + https://voyager-snap.linea.build to connect an account and track your Linea Voyage progress._ -- **GitHub repository and npm package URLs** - The public GitHub repo that hosts your Snap's source code, and the npm package of your [published Snap](../how-to/publish-a-snap.md). If your Snap's source code is hosted on a different site, such as GitLab, you can link to that instead. +- **GitHub repository and npm package URLs** - The public GitHub repo that hosts your Snap's + source code, and the npm package of your [published Snap](../how-to/publish-a-snap.md). + If your Snap's source code is hosted on a different site, such as GitLab, you can link to that instead. -- **Snap version number to be allowlisted** - The Snap version number as specified in `package.json` and `snap.manifest.json`. Make sure that the version numbers match and that the Snap has been built with the correct `shasum`. +- **Snap version number to be allowlisted** - The Snap version number as specified in `package.json` and + `snap.manifest.json`. + Make sure that the version numbers match and that the Snap has been built with the correct `shasum`. -- **Snap auditor and audit report** - A PDF or URL of the [required audit report](#prerequisites), if your Snap uses one or more of the key management API methods. If your Snap doesn't require an audit, leave this field blank. +- **Snap auditor and audit report** - A PDF or URL of the [required audit report](#prerequisites), + if your Snap uses one or more of the key management API methods. + If your Snap doesn't require an audit, leave this field blank. - :::note The audit report will be made public. You can ask your auditor to publish the report on their website and provide the link to us. ::: + :::note + The audit report will be made public. + You can ask your auditor to publish the report on their website and provide the link to us. + ::: -- **Customer support details** - [Customer support information](https://github.com/MetaMask/snaps/wiki/User-Support-Information) to ensure a smooth user experience for your Snap. This allows MetaMask to escalate any issues that a user might encounter with your Snap. The escalation contact will be kept confidential within MetaMask, and the rest of the information will be public. You must provide an escalation contact and at least one other customer support item. +- **Customer support details** - [Customer support information](https://github.com/MetaMask/snaps/wiki/User-Support-Information) + to ensure a smooth user experience for your Snap. + This allows MetaMask to escalate any issues that a user might encounter with your Snap. + The escalation contact will be kept confidential within MetaMask, and the rest of the information will be public. + You must provide an escalation contact and at least one other customer support item. -- **Images** - Screenshots or promotional images to help users get an idea of what your Snap can do. Here's your opportunity to provide compelling previews of your Snap! +- **Images** - Screenshots or promotional images to help users get an idea of what your Snap can do. + Here's your opportunity to provide compelling previews of your Snap! -- **Demo video** - A video walking through how to use your Snap. This will help MetaMask review your Snap, and might also be used by the MetaMask marketing team. +- **Demo video** - A video walking through how to use your Snap. + This will help MetaMask review your Snap, and might also be used by the MetaMask marketing team. ### 2. Allowlist review -Your Snap will be reviewed by the MetaMask Snaps team to ensure it is functional and well-designed. If the Snap requires an audit, the team will review the audit report to ensure that all vulnerabilities with medium or higher risk have been addressed. All Snaps require at least two approvals to be allowlisted. +Your Snap will be reviewed by the MetaMask Snaps team to ensure it is functional and well-designed. +If the Snap requires an audit, the team will review the audit report to ensure that all +vulnerabilities with medium or higher risk have been addressed. +All Snaps require at least two approvals to be allowlisted. ### 3. Directory listing -Once your Snap is on the allowlist, it will appear in the [MetaMask Snaps Directory](https://snaps.metamask.io). You can direct users to the directory to find and install your Snap. +Once your Snap is on the allowlist, it will appear in the [MetaMask Snaps Directory](https://snaps.metamask.io). +You can direct users to the directory to find and install your Snap. ### 4. Distribute your Snap -You can deploy a companion dapp where users can learn about your Snap and install it, or you can integrate your Snap with your existing dapp. +You can deploy a companion dapp where users can learn about your Snap and install it, or you can integrate your Snap with +your existing dapp. -If your Snap is designed to communicate with dapps, you can encourage other dapp developers to [connect to your Snap](connect-to-a-snap.md). +If your Snap is designed to communicate with dapps, you can encourage other dapp developers to +[connect to your Snap](connect-to-a-snap.md). -:::note While testing your Snap, you might have designed your dapp to require MetaMask Flask. Once your Snap is allowlisted, you should update your dapp to support any flavor of MetaMask, and show the orange MetaMask logo instead of the purple Flask logo. ::: +:::note +While testing your Snap, you might have designed your dapp to require MetaMask Flask. +Once your Snap is allowlisted, you should update your dapp to support any flavor of MetaMask, +and show the orange MetaMask logo instead of the purple Flask logo. +::: ### 5. Update your Snap -The allowlist uses strict versioning for all Snaps. After publishing a new version of your Snap to npm, you must re-submit it for allowlisting by filling out the [MetaMask Snaps Directory Information Update form](https://go.metamask.io/snaps-directory-update-request). Users will not be able to install a new version until it is allowlisted. +The allowlist uses strict versioning for all Snaps. +After publishing a new version of your Snap to npm, you must re-submit it for allowlisting by +filling out the +[MetaMask Snaps Directory Information Update form](https://go.metamask.io/snaps-directory-update-request). +Users will not be able to install a new version until it is allowlisted. -You can also update any information about your Snap using the form. For fields that you don't need to update, you can leave them blank or enter "N/A." When providing the new version to be allowlisted, you should also note whether previous versions of your Snap should be removed from the allowlist (that is, replaced with the new version). +You can also update any information about your Snap using the form. +For fields that you don't need to update, you can leave them blank or enter "N/A." +When providing the new version to be allowlisted, you should also note whether previous versions of +your Snap should be removed from the allowlist (that is, replaced with the new version). ## Open permissions @@ -103,6 +167,7 @@ The following is a list of permissions that do not require allowlisting: - [`snap_manageState`](../reference/snaps-api.md#snap_managestate) - [`snap_notify`](../reference/snaps-api.md#snap_notify) -If your Snap only uses permissions from this list, it can be installed in the MetaMask extension without inclusion on the allowlist. +If your Snap only uses permissions from this list, +it can be installed in the MetaMask extension without inclusion on the allowlist. Any permissions not on this list are _protected permissions_ and require allowlisting. diff --git a/snaps/how-to/publish-a-snap.md b/snaps/how-to/publish-a-snap.md index 5f1178b71b1..b3c61e11b06 100644 --- a/snaps/how-to/publish-a-snap.md +++ b/snaps/how-to/publish-a-snap.md @@ -5,23 +5,34 @@ sidebar_position: 8 # Publish a Snap -Snaps are npm packages, so publishing a Snap is as simple as publishing an npm package. Refer to the [npm CLI documentation](https://docs.npmjs.com/cli/v8/commands/npm-publish) for details on publishing to the public registry. The following details are specific to Snaps: +Snaps are npm packages, so publishing a Snap is as simple as publishing an npm package. +Refer to the [npm CLI documentation](https://docs.npmjs.com/cli/v8/commands/npm-publish) for details +on publishing to the public registry. +The following details are specific to Snaps: - The version in `package.json` and `snap.manifest.json` should match. - The `repository.url` field in `package.json` should match the correct repository for your Snap. - The `source.location.npm.packageName` in `snap.manifest.json` should match the name in `package.json`. -- The `proposedName` in `snap.manifest.json` should be a human-readable name and should not include the words "MetaMask" or "Snap." -- The image specified in `iconPath` in the manifest file is used as the icon displayed when installing the Snap, in custom dialogs, and in the settings menu. +- The `proposedName` in `snap.manifest.json` should be a human-readable name and should not include + the words "MetaMask" or "Snap." +- The image specified in `iconPath` in the manifest file is used as the icon displayed when + installing the Snap, in custom dialogs, and in the settings menu. - This icon should be a valid SVG. - The icon will be cropped in a circle when displayed in MetaMask; you do not need to make the icon circular. - The icon should only have a transparent background if the icon is clearly visible on both light and dark backgrounds. -After publishing the Snap, any dapp can connect to the Snap by using the Snap ID `npm:[packageName]`. You can use the [Snap Install Tester](https://montoya.github.io/snap-install-tester/) with [MetaMask Flask](../get-started/install-flask.md) to verify that your Snap package was published correctly. +After publishing the Snap, any dapp can connect to the Snap by using the Snap ID `npm:[packageName]`. +You can use the [Snap Install Tester](https://montoya.github.io/snap-install-tester/) with [MetaMask Flask](../get-started/install-flask.md) to verify that your Snap package was published correctly. -:::caution If you are using the Snap monorepo project generated in the [quickstart](../get-started/quickstart.md), make sure to only publish the Snap package in `/packages/snap`. +:::caution +If you are using the Snap monorepo project generated in the [quickstart](../get-started/quickstart.md), +make sure to only publish the Snap package in `/packages/snap`. -Also, make sure to update the manifest file, icon file, and README to differentiate your Snap from the template. ::: +Also, make sure to update the manifest file, icon file, and README to differentiate your Snap from the template. +::: ## Make a Snap available to users -After publishing a Snap, you can make it available to MetaMask users by [getting your Snap allowlisted](get-allowlisted.md). Once allowlisted, anyone can install your Snap in the MetaMask extension. +After publishing a Snap, you can make it available to MetaMask users by +[getting your Snap allowlisted](get-allowlisted.md). +Once allowlisted, anyone can install your Snap in the MetaMask extension. diff --git a/snaps/learn/resources.md b/snaps/learn/resources.md index 97490d1520b..572520f833e 100644 --- a/snaps/learn/resources.md +++ b/snaps/learn/resources.md @@ -10,38 +10,69 @@ View the following Snaps resources in addition to this documentation site. ## Primary resources - [Snaps homepage](https://metamask.io/snaps/) -- [Snaps directory](https://snaps.metamask.io/) - A directory of allowlisted Snaps you can try in the MetaMask extension. -- [SIPs](https://github.com/MetaMask/SIPs) - Suggest new Snaps APIs with Snaps Improvement Proposals. +- [Snaps directory](https://snaps.metamask.io/) - A directory of allowlisted + Snaps you can try in the MetaMask extension. +- [SIPs](https://github.com/MetaMask/SIPs) - Suggest new Snaps APIs with + Snaps Improvement Proposals. ## Example Snaps -- [Example Snaps](https://github.com/MetaMask/snaps/tree/main/packages/examples) - A directory of Snaps maintained by MetaMask. -- [Linea Voyager](https://github.com/Consensys/linea-voyager-snap) - View Linea XP balance, PoH status, and current Linea Voyage activations from within MetaMask. -- [Starknet](https://github.com/Consensys/starknet-snap) - Adds Starknet account and transaction functionality to MetaMask. -- [Simple Keyring Snap](https://github.com/MetaMask/snap-simple-keyring) - An example account management Snap using the [Keyring API](../reference/keyring-api/index.md). -- [Mystery Fox](https://github.com/Montoya/mystery-fox) - Provides random answers to questions and showcases interactive UI and images. -- [Farcaster Insights](https://github.com/Montoya/farcaster-insights) - Shows if the recipient in a transaction request has a Farcaster account and their stats. -- [Smart Account Template](https://github.com/bcnmy/smart-account-keyring-template) - Template for integrating the Biconomy Smart Account with the [Keyring API](../reference/keyring-api/index.md). -- [Text Transformer](https://github.com/Montoya/transformer-snap) - Transforms strings into Unicode bold, italic, and strikethrough characters for use on social media. Demonstrates [interactive JSX UI](../features/custom-ui/index.md) in a home page. -- [Social Names](https://github.com/Montoya/social-names-snap) - Adds Farcaster and Lens handles to the send flow and petnames using [custom name resolution](../features/custom-name-resolution.md). +- [Example Snaps](https://github.com/MetaMask/snaps/tree/main/packages/examples) - + A directory of Snaps maintained by MetaMask. +- [Linea Voyager](https://github.com/Consensys/linea-voyager-snap) - View Linea + XP balance, PoH status, and current Linea Voyage activations from within MetaMask. +- [Starknet](https://github.com/Consensys/starknet-snap) - Adds Starknet account + and transaction functionality to MetaMask. +- [Simple Keyring Snap](https://github.com/MetaMask/snap-simple-keyring) - An + example account management Snap using the [Keyring API](../reference/keyring-api/index.md). +- [Mystery Fox](https://github.com/Montoya/mystery-fox) - Provides random answers to + questions and showcases interactive UI and images. +- [Farcaster Insights](https://github.com/Montoya/farcaster-insights) - Shows if + the recipient in a transaction request has a Farcaster account and their stats. +- [Smart Account Template](https://github.com/bcnmy/smart-account-keyring-template) - + Template for integrating the Biconomy Smart Account with the + [Keyring API](../reference/keyring-api/index.md). +- [Text Transformer](https://github.com/Montoya/transformer-snap) - Transforms + strings into Unicode bold, italic, and strikethrough characters for use on social + media. Demonstrates [interactive JSX UI](../features/custom-ui/index.md) in a home page. +- [Social Names](https://github.com/Montoya/social-names-snap) - Adds Farcaster and + Lens handles to the send flow and petnames using + [custom name resolution](../features/custom-name-resolution.md). ## Developer tools -- [Template Snap](https://github.com/MetaMask/template-snap-monorepo) - A rich template that includes TypeScript/React and vanilla JavaScript options, a CLI for building, packaging, and deploying your Snap, and a companion dapp UI you can build on. -- [Test Snaps](https://github.com/MetaMask/snaps/tree/main/packages/test-snaps) - A collection of test Snaps and [a dapp for evaluating them](https://metamask.github.io/snaps/test-snaps/latest/). -- [`snaps-jest`](https://www.npmjs.com/package/@metamask/snaps-jest) - A Jest preset for end-to-end testing MetaMask Snaps, including a Jest environment, and a set of Jest matchers. See [how to test a Snap](../how-to/test-a-snap.md) using `snaps-jest`. -- [Snapper](https://github.com/sayfer-io/Snapper) - A tool for detecting security vulnerabilities, identifying potential issues, and ensuring best coding practices in your Snap. -- [MetaMask Testing Tools](https://hugomrdias.github.io/metamask/) - A collection of tools for testing MetaMask, MetaMask Flask, and MetaMask Snaps with [Playwright](https://playwright.dev/), delivered as an npm package that provides a `createFixture` function that returns a `test` and `expect` function that can be used to write tests. -- [Snap Install Tester](https://montoya.github.io/snap-install-tester/) - A simple web tool for loading and installing any Snap from npm. Just provide an npm package id and (optional) version number, then click to install in MetaMask Flask. +- [Template Snap](https://github.com/MetaMask/template-snap-monorepo) - A rich template that + includes TypeScript/React and vanilla JavaScript options, a CLI for building, packaging, and + deploying your Snap, and a companion dapp UI you can build on. +- [Test Snaps](https://github.com/MetaMask/snaps/tree/main/packages/test-snaps) - A collection of + test Snaps and [a dapp for evaluating them](https://metamask.github.io/snaps/test-snaps/latest/). +- [`snaps-jest`](https://www.npmjs.com/package/@metamask/snaps-jest) - A Jest preset for end-to-end + testing MetaMask Snaps, including a Jest environment, and a set of Jest matchers. + See [how to test a Snap](../how-to/test-a-snap.md) using `snaps-jest`. +- [Snapper](https://github.com/sayfer-io/Snapper) - A tool for detecting security vulnerabilities, + identifying potential issues, and ensuring best coding practices in your Snap. +- [MetaMask Testing Tools](https://hugomrdias.github.io/metamask/) - A collection of tools for + testing MetaMask, MetaMask Flask, and MetaMask Snaps with [Playwright](https://playwright.dev/), + delivered as an npm package that provides a `createFixture` function that returns a `test` and + `expect` function that can be used to write tests. +- [Snap Install Tester](https://montoya.github.io/snap-install-tester/) - A simple web tool for loading and installing any Snap from npm. + Just provide an npm package ID and (optional) version number, then click to install in MetaMask Flask. - [Snap Connect Example](https://github.com/Montoya/snap-connect-example) - Example code for connecting to MetaMask from a website and interfacing with a Snap in a reliable way. ## Blog posts -- [Making the Wallet Personal](https://thedefiant.io/making-the-wallet-personal) by Christian Montoya -- [Permissionless Innovation and You](https://metamask.io/news/latest/permissionless-innovation-and-you/) by Erik Marks -- [Snaps in MetaMask Stable and Where We Go From Here](https://metamask.io/news/latest/snaps-in-metamask-stable-and-where-we-go-from-here/) by Dan Finlay -- [MetaMask Snaps Launch with Hardened JavaScript Under the Hood](https://agoric.com/blog/announcements/metamask-snaps-launch-with-hardened-javascript-under-the-hood) by Agoric -- [Navigating the Security Landscape of MetaMask Snaps](https://metamask.io/news/developers/navigating-the-security-landscape-of-metamask-snaps/) by Martin Ortner & Valentin Quelquejay +- [Making the Wallet Personal](https://thedefiant.io/making-the-wallet-personal) by Christian + Montoya +- [Permissionless Innovation and You](https://metamask.io/news/latest/permissionless-innovation-and-you/) + by Erik Marks +- [Snaps in MetaMask Stable and Where We Go From + Here](https://metamask.io/news/latest/snaps-in-metamask-stable-and-where-we-go-from-here/) by Dan + Finlay +- [MetaMask Snaps Launch with Hardened JavaScript Under the + Hood](https://agoric.com/blog/announcements/metamask-snaps-launch-with-hardened-javascript-under-the-hood) + by Agoric +- [Navigating the Security Landscape of MetaMask Snaps](https://metamask.io/news/developers/navigating-the-security-landscape-of-metamask-snaps/) + by Martin Ortner & Valentin Quelquejay - [Going Beyond The Secret Recovery Phrase In MetaMask With Account Management Snaps](https://metamask.io/news/latest/going-beyond-the-secret-recovery-phrase-in-metamask-with-account-management/) by Alex Jupiter ## Videos @@ -49,25 +80,37 @@ View the following Snaps resources in addition to this documentation site. - [MetaMask Snaps Public Launch](https://www.youtube.com/watch?v=cbkjbYd71OY) (12 min) - [What is MetaMask Snaps? Main Functions and Features Explained](https://www.youtube.com/watch?v=Dlw9yLpEm7E) (53 mins) - [Deep Dive into MetaMask Snaps](https://www.youtube.com/watch?v=qXEBqamnv5w) (57 min) -- [Building a Universal Web3 Interface](https://vimeo.com/864943019) (16 min) ([Slides](https://docs.google.com/presentation/d/1pnx6JdpFaj6LsW3B89jqumYgmHvirOE2H-_2S1ggRvY/edit?usp=sharing)) -- [It's Our Wallet, Let's Build It Together](https://www.youtube.com/watch?v=G6qunL2gnjE) (19 min) ([Slides](https://docs.google.com/presentation/d/1ZjhYF-3mwGmsFdcbDgqgFR6t3YIab4_Hk3dRAWjvSQg/edit?usp=sharing)) -- [Building the Future with MetaMask Snaps](https://www.youtube.com/watch?v=iE8CGzadKZ8&t=288s) (22 min) ([Slides](https://docs.google.com/presentation/d/1LG8MqRrbb9qSg4m8ZjJXPQFccb9YPc-6387hSNpscpY/edit?usp=sharing)) +- [Building a Universal Web3 Interface](https://vimeo.com/864943019) + (16 min) ([Slides](https://docs.google.com/presentation/d/1pnx6JdpFaj6LsW3B89jqumYgmHvirOE2H-_2S1ggRvY/edit?usp=sharing)) +- [It's Our Wallet, Let's Build It Together](https://www.youtube.com/watch?v=G6qunL2gnjE) (19 min) + ([Slides](https://docs.google.com/presentation/d/1ZjhYF-3mwGmsFdcbDgqgFR6t3YIab4_Hk3dRAWjvSQg/edit?usp=sharing)) +- [Building the Future with MetaMask Snaps](https://www.youtube.com/watch?v=iE8CGzadKZ8&t=288s) (22 min) + ([Slides](https://docs.google.com/presentation/d/1LG8MqRrbb9qSg4m8ZjJXPQFccb9YPc-6387hSNpscpY/edit?usp=sharing)) - [MetaMask Snaps YouTube playlist](https://www.youtube.com/playlist?list=PLJ8kQp5OiaEM6ad6mC1NmJCGJSZm7cBfI) - [How to Build Your Own Polkadot MetaMask Snap](https://www.youtube.com/watch?v=vyb1wVFahvM) (32 min) - [How to Build and Customize a MetaMask Snap](https://www.youtube.com/watch?v=4bt8udi7po0) (47 min) ## Community -- [Snaps GitHub discussions](https://github.com/MetaMask/snaps/discussions) - Browse discussions and ask questions about Snaps. -- [Consensys Discord](https://discord.gg/consensys) - Ask questions about Snaps on the **mm-snaps-dev** channel. -- [Snaps GitHub issues](https://github.com/MetaMask/snaps/issues) - If you encounter any issues with Snaps, open a GitHub issue. +- [Snaps GitHub discussions](https://github.com/MetaMask/snaps/discussions) - Browse + discussions and ask questions about Snaps. +- [Consensys Discord](https://discord.gg/consensys) - Ask questions about Snaps on + the **mm-snaps-dev** channel. +- [Snaps GitHub issues](https://github.com/MetaMask/snaps/issues) - If you encounter + any issues with Snaps, open a GitHub issue. ## Snaps for developers Many Snaps are designed to be used by developers. -- [CubeSigner](https://cubist.dev/cubesigner-snap-hardware-backed-key-management-for-metamask-developers) - Enables dapp developers to manage keys for Ethereum, Bitcoin, Solana, and more using secure remote hardware. -- [Galactica ZK Vault](https://docs.galactica.com/galactica-developer-documentation) - Integrates the Galactica Network for dapps to leverage ZK-proofs for compliant privacy. -- [Hedera Wallet](https://docs.tuum.tech/hedera-wallet-snap) - Build Hedera dapps with the methods provided by Hedera Wallet. -- [Leap Wallet](https://docs.leapwallet.io/cosmos/leap-metamask-snap/integrating-snaps) - Connect Cosmos dapps to MetaMask with Leap Wallet. -- [MinaPortal](https://github.com/sotatek-dev/mina-snap/tree/master/packages/snap#methods) - Build ZkApps on Mina Network with the dapp methods provided by MinaPortal. +- [CubeSigner](https://cubist.dev/cubesigner-snap-hardware-backed-key-management-for-metamask-developers) - + Enables dapp developers to manage keys for Ethereum, Bitcoin, Solana, and more using + secure remote hardware. +- [Galactica ZK Vault](https://docs.galactica.com/galactica-developer-documentation) - + Integrates the Galactica Network for dapps to leverage ZK-proofs for compliant privacy. +- [Hedera Wallet](https://docs.tuum.tech/hedera-wallet-snap) - Build Hedera dapps with + the methods provided by Hedera Wallet. +- [Leap Wallet](https://docs.leapwallet.io/cosmos/leap-metamask-snap/integrating-snaps) - + Connect Cosmos dapps to MetaMask with Leap Wallet. +- [MinaPortal](https://github.com/sotatek-dev/mina-snap/tree/master/packages/snap#methods) - + Build ZkApps on Mina Network with the dapp methods provided by MinaPortal. From b063392c02edb8a37e9fc229ec1a69c4d366778d Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Thu, 28 Aug 2025 13:43:18 -0700 Subject: [PATCH 9/9] more edits and remove onboarding form from quickstart --- snaps/features/custom-evm-accounts/index.md | 5 +++-- snaps/get-started/quickstart.md | 2 -- snaps/how-to/get-allowlisted.md | 14 ++++++++------ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/snaps/features/custom-evm-accounts/index.md b/snaps/features/custom-evm-accounts/index.md index e6835ca1dd3..8e061f1e8e6 100644 --- a/snaps/features/custom-evm-accounts/index.md +++ b/snaps/features/custom-evm-accounts/index.md @@ -19,8 +19,9 @@ in the user interface:

To use the Keyring API, you first [implement the API in an account management Snap](create-account-snap.md) -(also known as an "account Snap"). You can then [call Keyring API methods from a companion dapp](create-companion-dapp.md) to enable -users to create and interact with the custom accounts. +(also known as an "account Snap"). +You can then [call Keyring API methods from a companion dapp](create-companion-dapp.md) +to enable users to create and interact with the custom accounts. :::tip see also diff --git a/snaps/get-started/quickstart.md b/snaps/get-started/quickstart.md index 2d16ed1efab..74f65a023b7 100644 --- a/snaps/get-started/quickstart.md +++ b/snaps/get-started/quickstart.md @@ -189,8 +189,6 @@ You've now successfully connected, installed, interacted with, and customized yo ## Next steps -- Fill out the [Snap Builders Onboarding Form](https://feedback.metamask.io/snaps-onboarding) to - allow the MetaMask Snaps team to engage with you and provide support as you begin to develop your Snap. - To learn more about the Snaps system, review [fundamental Snaps concepts](../learn/about-snaps/index.md) and try the [Snaps tutorials](../learn/tutorials/gas-estimation.md). - To implement specific features and use cases, see the [Snaps feature guides](../features/cron-jobs.md). diff --git a/snaps/how-to/get-allowlisted.md b/snaps/how-to/get-allowlisted.md index 63c314fb512..de44c0bb491 100644 --- a/snaps/how-to/get-allowlisted.md +++ b/snaps/how-to/get-allowlisted.md @@ -87,8 +87,8 @@ The form requests information about your Snap, including the following: source code, and the npm package of your [published Snap](../how-to/publish-a-snap.md). If your Snap's source code is hosted on a different site, such as GitLab, you can link to that instead. -- **Snap version number to be allowlisted** - The Snap version number as specified in `package.json` and - `snap.manifest.json`. +- **Snap version number to be allowlisted** - The Snap version number as specified in `package.json` + and `snap.manifest.json`. Make sure that the version numbers match and that the Snap has been built with the correct `shasum`. - **Snap auditor and audit report** - A PDF or URL of the [required audit report](#prerequisites), @@ -100,10 +100,12 @@ The form requests information about your Snap, including the following: You can ask your auditor to publish the report on their website and provide the link to us. ::: -- **Customer support details** - [Customer support information](https://github.com/MetaMask/snaps/wiki/User-Support-Information) +- **Customer support details** - + [Customer support information](https://github.com/MetaMask/snaps/wiki/User-Support-Information) to ensure a smooth user experience for your Snap. This allows MetaMask to escalate any issues that a user might encounter with your Snap. - The escalation contact will be kept confidential within MetaMask, and the rest of the information will be public. + The escalation contact will be kept confidential within MetaMask, and the rest of the information + will be public. You must provide an escalation contact and at least one other customer support item. - **Images** - Screenshots or promotional images to help users get an idea of what your Snap can do. @@ -126,8 +128,8 @@ You can direct users to the directory to find and install your Snap. ### 4. Distribute your Snap -You can deploy a companion dapp where users can learn about your Snap and install it, or you can integrate your Snap with -your existing dapp. +You can deploy a companion dapp where users can learn about your Snap and install it, or you can +integrate your Snap with your existing dapp. If your Snap is designed to communicate with dapps, you can encourage other dapp developers to [connect to your Snap](connect-to-a-snap.md).