-
-
Notifications
You must be signed in to change notification settings - Fork 951
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8c3685
commit c27a96d
Showing
3 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
description: Interact with users' accounts on non-EVM networks | ||
--- | ||
|
||
# Use non-EVM networks | ||
You can connect to non-EVM networks and interact with users' accounts on these networks using MetaMask Snaps. | ||
|
||
## Non-EVM networks | ||
|
||
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. |
85 changes: 83 additions & 2 deletions
85
wallet/how-to/use-non-evm-networks/starknet-snap/connect-to-starknet.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,87 @@ | ||
--- | ||
description: Connect | ||
description: Connect your Starknet account to MetaMask | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Connect | ||
import Tabs from "@theme/Tabs"; | ||
import TabItem from "@theme/TabItem"; | ||
|
||
# Connect your Starknet account to MetaMask | ||
|
||
To connect your dapp to the Starknet network in MetaMask, you can use the `get-starknet` library. | ||
This library simplifies the process of connecting to the Starknet Snap, allowing you to interact with users' Starknet accounts in MetaMask. | ||
`get-starknet` also enables dapps to interact with other wallets in the Starknet ecosystem. | ||
|
||
## Prerequisites | ||
|
||
- [MetaMask installed](https://metamask.io/download/) | ||
- A text editor (for example, [VS Code](https://code.visualstudio.com/)) | ||
- [Node](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) version 20.11 or later | ||
- [Yarn](https://yarnpkg.com/) | ||
- A JavaScript or TypeScript project set up | ||
|
||
## Add `get-starknet` to your project | ||
|
||
Add both the [`get-starknet`](https://github.com/MetaMask/snaps/tree/main/packages/create-snap) library and the latest version of the `starknet.js` library to your project's dependencies: | ||
|
||
- [MetaMask installed](https://metamask.io/download/) | ||
- A text editor (for example, [VS Code](https://code.visualstudio.com/)) | ||
- [Node](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) version 20.11 or later | ||
- [Yarn](https://yarnpkg.com/) | ||
- A JavaScript or TypeScript project set up | ||
|
||
|
||
## Connect using `get-starknet` | ||
|
||
### 1. Add `get-starknet` to your project | ||
|
||
Add the [`get-starknet`](https://github.com/MetaMask/snaps/tree/main/packages/create-snap) library and the latest version of the `starknet.js` library to your project's dependencies: | ||
|
||
<Tabs> | ||
<TabItem value="yarn" label="Yarn" default> | ||
|
||
```bash | ||
yarn add get-starknet starknet@next | ||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="npm" label="npm"> | ||
|
||
```bash | ||
npm install get-starknet starknet@next | ||
``` | ||
|
||
</TabItem> | ||
|
||
</Tabs> | ||
|
||
### 2. Start the Snap | ||
|
||
From the root of the created project, install the project dependencies: | ||
|
||
<Tabs> | ||
<TabItem value="yarn" label="Yarn" default> | ||
|
||
```bash | ||
yarn start | ||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="npm" label="npm"> | ||
|
||
```bash | ||
npm start | ||
``` | ||
|
||
</TabItem> | ||
|
||
</Tabs> | ||
|
||
### 3. Connect to the Snap | ||
|
||
On the dapp, select **Connect**. The MetaMask extension displays and prompts you to approve the Snap's permissions. | ||
After it is connected, select **Send message** to display a custom message within a confirmation | ||
dialog in MetaMask. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
sidebar_position: 1 | ||
sidebar_label: Starknet | ||
description: Learn about how Starknet Snap connects to MetaMask using `get-starknet`. | ||
tags: | ||
- Snaps | ||
- non-EVM | ||
--- | ||
|