Skip to content

Commit

Permalink
Better clarifications for publishing snaps (MetaMask#897)
Browse files Browse the repository at this point in the history
* Update snaps publishing documentation - fixes MetaMask#643

1. Clarify the requirements for the icon
2. Call out that only the snap package should be published when using the template.
3. Mention how to use the Simulator to test it.

* Update develop-a-snap.md

Clarify all surfaces for snap icon
  • Loading branch information
Montoya authored Aug 25, 2023
1 parent 22433d2 commit 905631d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions snaps/how-to/develop-a-snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,19 @@ on publishing to the public registry.
The following details are specific to Snaps:

- The version in `package.json` and `snap.manifest.json` must match.
- The image specified in `iconPath` in the manifest file is used as the icon displayed when
installing and displaying confirmations from the 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 must 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.

After publishing the snap, any dapp can connect to the snap by using the snap ID `npm:[packageName]`.

:::caution
If you are using the snap template, make sure to only publish the snap package in `/packages/snap`.
You can use the [Snaps Simulator](https://metamask.github.io/snaps/snaps-simulator/staging/#/manifest) to verify
that your snap was published correctly — just click on "localhost" in the top right corner and change the
snap location to be "npm" and the ID of your snap.
:::

## Distribute your snap

Since snaps are currently intended for a developer audience, MetaMask doesn't currently facilitate
Expand Down

0 comments on commit 905631d

Please sign in to comment.