Skip to content

MetaMask/snap-solana-wallet

Solana Wallet Snap Monorepo

Hero Illustration

Bringing official Solana support to MetaMask. Create accounts, check balances, and use Solana dApps right from your MetaMask wallet. Simple, secure, and seamless.

Installation

This repository contains the Solana Wallet Snap, which is a plugin for MetaMask. To use it, you'll need to:

  1. First, clone and set up the MetaMask Extension repository
  2. 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.

API Documentation

MetaMask interacts with the Solana Wallet Snap via its JSON-RPC API. The complete API specification is documented in the OpenRPC format.

Viewing the API Documentation

The API documentation is located in packages/snap/openrpc.json. To view it in a user-friendly format:

  1. Go to the OpenRPC Playground, or any other OpenRPC viewer of your liking
  2. Copy the contents of packages/snap/openrpc.json
  3. Paste it into the playground's editor
  4. Explore the interactive documentation with method details, parameters, examples, and error specifications

Available Methods

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

Contributing

We welcome contributions to the Solana Wallet Snap! Please read our Contributing guidelines to get started.

About

Solana Wallet Snap

Resources

License

Apache-2.0, MIT-0 licenses found

Licenses found

Apache-2.0
LICENSE.APACHE2
MIT-0
LICENSE.MIT0

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 15

Languages