Skip to content

Commit

Permalink
add additional suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
joaniefromtheblock committed Sep 18, 2024
1 parent 3d8ef91 commit b915696
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
8 changes: 6 additions & 2 deletions wallet/how-to/use-non-evm-networks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import CardList from "@site/src/components/CardList"

# Use non-EVM networks

You can connect to non-EVM networks and interact with users' accounts on these networks using [MetaMask Snaps](../../../snaps).
You can connect to non-EVM networks and interact with users' accounts on these networks using existing [MetaMask Snaps](https://metamask.io/snaps/).

[Non-EVM networks](../../../snaps/features/non-evm-networks/) are blockchain networks that are not compatible with the Ethereum Virtual Machine (EVM).
Non-EVM networks are blockchain networks that are not compatible with the Ethereum Virtual Machine (EVM).

Non-EVM dapps and MetaMask can't directly interact with each other.
By connecting to dedicated non-EVM Snaps, you can extend the functionality of MetaMask and integrate non-EVM networks into your existing MetaMask workflow.

MetaMask provides Snaps for the following networks:

<CardList
items={[
{
Expand All @@ -23,3 +25,5 @@ By connecting to dedicated non-EVM Snaps, you can extend the functionality of Me
},
]}
/>

See the [full list of available non-EVM Snaps](https://snaps.metamask.io/interoperability).
27 changes: 13 additions & 14 deletions wallet/how-to/use-non-evm-networks/starknet/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,29 @@ sidebar_position: 1

# Use Starknet

Starknet is a Layer 2 network built on Ethereum. To interact with Starknet accounts in MetaMask, which is a non-EVM network, you need to use the Starknet Snap.
Starknet is a non-EVM Layer 2 network. To interact with Starknet accounts in MetaMask, you need to use the Starknet Snap.

You can use `wallet_invokeSnap` or `get-starknet` to integrate with Starknet dapps.
You can use the `get-starknet` library or the `wallet_invokeSnap` JSON-RPC method to connect to the Starknet Snap.
The choice depends on your specific use case and development preferences.

Both methods enable developers to connect Starknet dapps with wallet solutions.

`wallet_invokeSnap`:
- Requires precise method names and parameter structures.
- Handles both MetaMask-specific and Starknet-specific errors.
- Designed for operating within the MetaMask framework.
- Manages lower-level StarkNet interactions directly.
- Results are in more detailed, lower-level code.

`get-starknet`:
- Provides a high-level API that abstracts complex operations.
- Offers standardized error handling.
- Supports multiple wallets, not limited to MetaMask.
- Manages wallet connections and Starknet interactions.
- Results are in more readable code.

`wallet_invokeSnap`:
- Requires precise method names and parameter structures.
- Handles both MetaMask-specific and Starknet-specific errors.
- Is designed for operating within the MetaMask framework.
- Manages lower-level Starknet interactions directly.
- Provides results in more detailed, lower-level code.


:::note

The `get-starknet` method is recommended for simplified integration with the non-EVM Starknet network.
We recommend using the `get-starknet` library for a most use cases.

:::

Expand All @@ -48,7 +47,7 @@ This allows users to send Starknet transactions, sign Starknet messages, and man

A dapp with `get-starknet` installed interacts with MetaMask as follows:

1. The dapp uses `get-starknet` to request the user connect to MetaMask. If the user doesn't have the Starknet Snap installed, MetaMask prompts the user to connect and approve the installation.
1. The dapp uses `get-starknet` to request the user connect to MetaMask. If the user doesn't have the Starknet Snap installed, MetaMask automatically prompts the user to connect and approve the addition.

1. After the dapp is connected to MetaMask and the Starknet Snap, `get-starknet` receives a Starknet Windows Object (SWO), which represents the MetaMask wallet with Starknet functionality.

Expand Down Expand Up @@ -88,7 +87,7 @@ sequenceDiagram
get->>dapp: Notify change
```

The `get-starknet` library offers several key features that streamline how dapps interact with the StarkNet network through MetaMask."
The `get-starknet` library offers several key features that improve how dapps interact with the StarkNet network through MetaMask."

- The `WalletAccount` uses a specified provider to access data from the StarkNet network.
- For transactions, `get-starknet` prepares the data and sends it to MetaMask for signing via StarkNet Snap.
Expand Down

0 comments on commit b915696

Please sign in to comment.