Note
This project is in early development and may change significantly. You should still do your own due diligence when using it.
Also, be careful of your settings if you have auto-explain on, or you could easily run up your bill!
A MetaMask Snap that uses Claude AI to explain blockchain transactions in plain English, helping users understand what they're signing before they sign it.
- Built-in buttons to quickly send transaction/signature context to your AI of choice
- EIP-712 Hash calculation directly in MetaMask
- Auto-explain mode for seamless transaction analysis
- Buttons to bring your hex data to an ABI decoding site for further inspection
- node
- You'll know you've installed it right if you can run
node --versionand get a response likev20.0.0or higher
- You'll know you've installed it right if you can run
- yarn
- You'll know you've installed it right if you can run
yarn --versionand get a response like1.22.0
- You'll know you've installed it right if you can run
- MetaMask Flask
- Development version of MetaMask that supports Snaps
- git
- You'll know you've installed it right if you can run
git --versionand get a response likegit version 2.33.0
- You'll know you've installed it right if you can run
No environment variables are required! Users provide their own Claude API keys through the Snap's interface.
git clone https://github.com/your-username/wise-signer-snap
cd wise-signer-snap
yarn install
yarn startThis will:
- Install all dependencies
- Build the Snap
- Start a local server on
http://localhost:8000
To install the Snap in MetaMask Flask:
- Open MetaMask Flask
- Navigate to
http://localhost:8000in your browser - Click "Connect" when prompted to install the Snap
- Go to chrome://extensions.
- Toggle Developer mode on in the top right corner.
- Find MetaMask Flask, and select Details.
- Under Inspect views, select
offscreen.html.
-
Configure the Snap:
- Click on the Snap in MetaMask (Menu → Snaps → AI Transaction Explainer)
- Paste your Claude API key and click "Save API Key"
- Choose your preferred model:
- Claude Opus 4.1: Most capable, best for complex transactions
- Claude Opus 4: More balanced performance and speed
- Claude Sonnet 4: Balanced performance and speed
- Claude Sonnet 3.7: Fastest responses
- Toggle "Auto-Explain" based on your preference
When you encounter a transaction:
- With Auto-Explain Enabled: The Snap automatically analyzes the transaction and shows an AI explanation
- With Auto-Explain Disabled: Click "Ask AI inside metamask" to get an analysis
- Without API Key: The Snap shows decoded transaction details and prompts you to add an API key
The AI will:
- Identify the contract and method being called
- Explain what the transaction will do
- Highlight any risks or concerns
- Search for information about addresses involved
- Format the explanation with markdown for easy reading
MIT License - see LICENSE.* file for details
- Built on MetaMask Snaps
- Powered by Claude AI
- Transaction decoding by @metamask/eth-sig-util
