Bringing official Solana support to MetaMask. Create accounts, check balances, and use Solana dApps right from your MetaMask wallet. Simple, secure, and seamless.
This repository contains the Solana Wallet Snap, which is a plugin for MetaMask. To use it, you'll need to:
- First, clone and set up the MetaMask Extension repository
- Then install this snap in your local MetaMask extension development environment:
# In your metamask-extension directory
npm i @metamask/snap-solana-wallet
# or
yarn add @metamask/snap-solana-wallet
This dual repository setup allows you to develop and test the Solana Wallet Snap alongside the main MetaMask extension. The snap is installed as a dependency in the MetaMask extension repository, where it can be tested and integrated.
MetaMask interacts with the Solana Wallet Snap via its JSON-RPC API. The complete API specification is documented in the OpenRPC format.
The API documentation is located in packages/snap/openrpc.json
. To view it in a user-friendly format:
- Go to the OpenRPC Playground, or any other OpenRPC viewer of your liking
- Copy the contents of
packages/snap/openrpc.json
- Paste it into the playground's editor
- Explore the interactive documentation with method details, parameters, examples, and error specifications
The API includes methods for:
- Wallet operations - Account management, transaction signing and broadcasting, and message signing
- Protocol requests - Direct interaction with Solana RPC methods
- Client-only requests (as defined in SIP-31) - For operations like Swap/Bridge without user confirmation
We welcome contributions to the Solana Wallet Snap! Please read our Contributing guidelines to get started.