diff --git a/wallet/how-to/use-non-evm-networks/index.md b/wallet/how-to/use-non-evm-networks/index.md new file mode 100644 index 0000000000..df07143805 --- /dev/null +++ b/wallet/how-to/use-non-evm-networks/index.md @@ -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. diff --git a/wallet/how-to/use-non-evm-networks/starknet-snap/connect-to-starknet.md b/wallet/how-to/use-non-evm-networks/starknet-snap/connect-to-starknet.md index 07e5f8bf9b..b7257176e3 100644 --- a/wallet/how-to/use-non-evm-networks/starknet-snap/connect-to-starknet.md +++ b/wallet/how-to/use-non-evm-networks/starknet-snap/connect-to-starknet.md @@ -1,6 +1,87 @@ --- -description: Connect +description: Connect your Starknet account to MetaMask sidebar_position: 1 --- -# Connect \ No newline at end of file +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: + + + + + ```bash + yarn add get-starknet starknet@next + ``` + + + + + + ```bash + npm install get-starknet starknet@next + ``` + + + + + +### 2. Start the Snap + +From the root of the created project, install the project dependencies: + + + + + ```bash + yarn start + ``` + + + + + + ```bash + npm start + ``` + + + + + + ### 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. \ No newline at end of file diff --git a/wallet/how-to/use-non-evm-networks/starknet-snap/index.md b/wallet/how-to/use-non-evm-networks/starknet-snap/index.md new file mode 100644 index 0000000000..e7137bcd66 --- /dev/null +++ b/wallet/how-to/use-non-evm-networks/starknet-snap/index.md @@ -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 +--- +