Skip to content

Commit

Permalink
Add Snaps diagrams (#1123)
Browse files Browse the repository at this point in the history
* Add Snaps diagrams

* address feedback

* add note about SRP
  • Loading branch information
alexandratran authored Feb 7, 2024
1 parent c893340 commit 2142519
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Binary file added snaps/assets/snaps-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added snaps/assets/snaps-getentropy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions snaps/concepts/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,26 @@ For example, a Snap can add support for different blockchain protocols, add cust
provide additional functionality using its own APIs.
This allows MetaMask to be used with a far more diverse set of protocols, dapps, and services.

## Diagrams

The following diagram outlines the high-level architecture of the Snaps system:

![Snaps architecture diagram](../assets/snaps-architecture.png)

The following diagram illustrates how Snaps can derive keys using
[`snap_getBip32Entropy`](../reference/snaps-api.md#snap_getbip32entropy),
[`snap_getBip44Entropy`](../reference/snaps-api.md#snap_getbip44entropy), and
[`snap_getEntropy`](../reference/snaps-api.md#snap_getentropy):

![Snaps get entropy diagram](../assets/snaps-getentropy.png)

:::note
Snaps cannot access the user's Secret Recovery Phrase.
Snaps can only derive keys using the provided methods.
Furthermore, Snaps cannot derive Ethereum keys and any Snap that derives keys must undergo a
security audit before it can be made available to MetaMask users.
:::

## Technical overview

A Snap is a JavaScript program run in an isolated and secure [execution environment](execution-environment.md).
Expand Down

0 comments on commit 2142519

Please sign in to comment.