π§ͺ Experimental Vibe Coding Project This is an experimental project, 100% vibe coding built with claude code. Expect the unexpected, embrace the chaos, and enjoy the ride! π’
SolSmart - The thinking parser for Solana transactions. An intelligent CLI tool that not only parses transactions but understands them. From basic decoding to AI-powered insights, SolSmart reveals what your transactions really mean.
Built with Bun for blazing fast performance! π
- π Parse any base64-encoded Solana transaction
- π Fetch and parse transactions by signature (with RPC)
- π Support for both Legacy and Versioned (v0) transactions
- π― Automatic instruction parsing for common programs
- π₯οΈ Beautiful interactive CLI interface built with Ink (React for CLIs)
- π Multi-line input support for long transactions
- π§ Detailed instruction breakdown with account roles
- π RPC endpoint management with saved history
- Bun >= 1.0.0 (Install with:
curl -fsSL https://bun.sh/install | bash) - Or Node.js >= 18.0.0 (as fallback)
# Clone the repository
git clone https://github.com/yourusername/sol-smart.git
cd sol-smart
# Install dependencies with Bun (recommended)
bun install
# Or with npm/pnpm/yarn
npm install
# Build the project
bun run build
# Or build for production (minified)
bun run build:prod# Run with hot reload
bun run dev
# Run simple CLI with hot reload
bun run dev:simple
# Run without hot reload
bun run dev:direct# Start interactive mode
bun run start
# Start with RPC pre-configured
bun run start -- --rpc https://api.mainnet-beta.solana.comInteractive flow:
- Choose input type: Base64 or Transaction Signature
- If signature selected, choose or enter RPC endpoint
- Paste your transaction/signature and press Enter
- Navigate the results:
- Press
oto view transaction overview - Press
ito view instruction details - Use arrow keys to select different instructions
- Press
bto parse another transaction - Press
Ctrl+Cto exit
- Press
# Run directly with Bun
bun run src/cli-simple.ts "AVagrLHsMsqnN3nMGnRyGJ9dJJR8Xh/..."
# Or after building and installing globally
sol-smart "AVagrLHsMsqnN3nMGnRyGJ9dJJR8Xh/..."
# Parse by transaction signature
sol-smart "5vH3r2eKpJZKp8kseHBBxZK7HTmZu7khcqVYwYwNjhJP..." --rpc https://api.mainnet-beta.solana.com# Parse a transaction by signature
sol-smart "4YS9iAqznn167KEFKqRHBSDgA3mEwAE7tfPCkBx9ZXX37MnXCtdUG7psDacvC4SyiT8CaZ8q8Y6pUokiPagvjPeH" --rpc https://api.mainnet-beta.solana.com
# Output:
# β
Transaction Overview
# βββββββββββββββββββββββ
# Version: 0
# Fee Payer: 6wXkJRuNuKSoseyvb1nEF8QJr6AFewv5jeBp2A2XLT4a
# Signatures: 1
# Instructions: 4
# ...The parser includes built-in support for:
- System Program: Transfer, CreateAccount, Allocate, Assign
- Memo Program: Text memos
- Compute Budget Program: SetComputeUnitLimit, SetComputeUnitPrice
- Unknown Programs: Shows raw data with preview
More program parsers can be easily added in src/parser/instruction-parsers/.
This project uses Bun for:
- β‘ Faster startup: ~3x faster CLI startup compared to Node.js
- π¦ Better dependency management: Faster installs with built-in package manager
- π₯ Native TypeScript: Run TypeScript directly without transpilation in development
- π οΈ Built-in tooling: Bundler, test runner, and more included
- Parser Core: Uses @solana/kit for transaction decoding
- UI Components: Built with Ink for interactive CLI
- Instruction Parsers: Modular system for parsing program-specific data
- Type Safety: Full TypeScript support throughout
- Build System: Optimized Bun bundler for production builds
# Development
bun run dev # Interactive CLI with hot reload
bun run dev:simple # Simple CLI with hot reload
bun run dev:direct # Run without hot reload
# Building
bun run build # Build for development
bun run build:prod # Build for production (minified)
bun run clean # Clean build directory
# Type checking
bun run typecheck # Run TypeScript type checking
# Production
bun run start # Run interactive CLI
bun run start:simple # Run simple CLITo add support for a new program:
- Create a new parser in
src/parser/instruction-parsers/ - Implement the
InstructionParserinterface - Add the parser to the parsers array in
instruction-parsers/index.ts
- Simulate transactions before execution to preview effects
- Show expected balance changes and state modifications
- Identify potential errors or failures before submission
- Support for both historical and new transaction simulation
- Account Analysis: Show account ownership, token balances, and history
- Program Details: Decode and explain program-specific data structures
- Transaction Effects: Display all state changes, token transfers, and account modifications
- Cost Analysis: Break down transaction fees, compute units, and priority fees
- Cross-Program Invocation (CPI): Visualize the full call stack of nested program calls
- Rich Formatting: Tables, charts, and tree views for complex data
- Natural Language Explanations: "What does this transaction do?" in plain English
- Security Analysis: AI-powered detection of suspicious patterns or potential risks
- Code Generation: Generate similar transactions based on examples
- Interactive Q&A: Ask questions about transactions and get intelligent answers
- Learning Mode: Educational explanations for Solana concepts and patterns
- IDE Integration: Use as a tool within AI coding assistants
- Standardized API: MCP server for transaction parsing capabilities
- Context Sharing: Share parsed transaction data with other MCP tools
- Workflow Automation: Integrate with development workflows and CI/CD pipelines
- Extensible Architecture: Plugin-based system for parsing any Solana program
- Custom Decoders: Support for arbitrary program instruction and account decoding
- IDL Integration: Automatic parsing using Anchor IDLs
- Community Plugins: Marketplace for sharing program-specific parsers
- Dynamic Loading: Load parsers on-demand for any program ID
- Schema Detection: Automatic detection of program data structures
- Transaction Builder: Interactive UI for constructing transactions
- Batch Processing: Parse multiple transactions from files or CSV
- Export Options: JSON, CSV, or custom formats for parsed data
- Historical Analysis: Track patterns and trends across transactions
- Real-time Monitoring: Watch and parse transactions as they happen
We welcome contributions to help implement these features! Here's how you can help:
- Pick a Feature: Choose from the roadmap or propose your own
- Discuss: Open an issue to discuss implementation approach
- Implement: Follow the contribution guidelines
- Submit PR: Create a pull request with your changes
Priority areas for contribution:
- Additional program instruction parsers
- Transaction simulation implementation
- LLM integration proof of concepts
- MCP server implementation
Please feel free to submit a Pull Request or open an issue to discuss ideas!
MIT License - see LICENSE file for details