Solana Wallet Snap
This package contains the source code for the Solana Wallet Snap - a MetaMask Snap that enables Solana blockchain functionality directly within your MetaMask wallet. The Snap allows users to:
- Create and manage Solana accounts
- View SOL and SPL token balances
- Sign messages and transactions
- Send and receive transactions
- Connect to Solana dApps
The Snap is built using the MetaMask Snaps SDK and integrates with Solana's web3.js library for blockchain interactions. It follows best practices for security and provides a seamless user experience within the familiar MetaMask interface.

Running the snap locally
cp packages/snap/.env.example packages/snap/.env
yarn workspace @metamask/solana-wallet-snap start
[!WARNING]
When snap updates you will need to still reconnect from the dapp to see changes
[!TIP]
Alternatively you can build and serve the snap manually. This can sometimes be more stable than watch mode but requires a manual rebuild and serve anytime there is a change on the snap.
Changing env vars
[!WARNING]
The .env values are bundled into the built snap and affect its shasum. To avoid build failures in CI, make sure your local .env file matches exactly with the CI repository secrets. Any mismatch will cause the CI to reject the build due to different checksums.
If you need to change the environment variables, follow this checklist:
- Update the
packages/snap/.env file with the new keys and/or values
- Update the
packages/snap/.env.example file with the new keys
- Update the 1Password entry with the new values
- Update the GitHub repository secrets with the new values
- Run
yarn start to regenerate the build and its shasum
Building and serving snap manually
yarn workspace @metamask/solana-wallet-snap build
yarn workspace @metamask/solana-wallet-snap serve
Further reading: