Skip to content

0xfnzero/sol-safekey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Sol SafeKey - Secure Solana Wallet & Keystore

Rust SDK Β· CLI Β· Web UI Β· Tauri Desktop Wallet

Open-source, local-first Solana wallet security toolkit with encrypted keystores, 2FA, bot integration, token operations, Pump trading, and Squads multisig.

Crates.io Documentation License GitHub stars GitHub forks

Rust Solana Security

δΈ­ζ–‡ | English | Website | Telegram | Discord


πŸ“‘ Table of Contents

What This Project Provides

Sol SafeKey is an open-source, local-first Solana wallet and key management toolkit. It combines a Rust SDK, CLI, self-hosted web wallet, and Tauri desktop app in one repository, with encrypted Keystore workflows for developers, bot operators, multisig teams, and individual wallet users.

Area Coverage
Interfaces Rust SDK, interactive CLI, Next.js web wallet, Tauri desktop wallet
Wallet security AES-256 encrypted Keystore files, password unlock, hardware fingerprint, optional TOTP 2FA/3FA
Solana operations SOL and SPL Token transfers, Token-2022 assets, WSOL, durable nonce accounts, transaction history
Trading Pump.fun and PumpSwap sells, balance shortcuts, cashback claims
Teams and programs Squads v4 multisig proposals, program deployment, upgrades, and authority management
Automation Bot helper APIs, local Rust API, examples, and bilingual documentation

πŸ“‹ Feature Guide

πŸš€ Quick Start

Installation β†’ β†’ Unlock Wallet β†’ Check Balance

πŸ”‘ Core Functions

πŸ”’ Wallet Management

πŸ›‘οΈ Advanced Security

πŸ’° Solana Operations

Balance & Transfer
WSOL Operations
Token Operations
DEX Operations
Cashback Operations


πŸ“¦ Installation

Install from crates.io (Recommended)

The latest stable release is available on crates.io:

# Install with all features enabled
cargo install sol-safekey --features full

# Verify installation
sol-safekey --version

# Start interactive menu
sol-safekey start

This installs the complete CLI with all features:

  • πŸ” Core encryption - AES-256 password-based encryption
  • πŸ”‘ 2FA/TOTP - Two-factor authentication support
  • 🌐 Solana operations - Full Solana transaction support
  • πŸ’± DEX operations - Pump.fun & PumpSwap trading
  • πŸ’° Cashback - Claim trading cashback rewards

Install from source

# Clone repository
git clone https://github.com/0xfnzero/sol-safekey.git
cd sol-safekey

# Build and install
cargo install --path . --features full

System Requirements

  • Rust: 1.70+ (install from rustup.rs)
  • Operating System: Linux, macOS, or Windows
  • Network: Internet connection for Solana RPC calls

πŸ–₯️ Web and Desktop UI

The self-hosted web wallet, local Rust API, and Tauri desktop app live in this repository under ui/. The API depends directly on the root sol-safekey crate, so the CLI, Rust SDK, web wallet, and desktop wallet use one source tree and one Cargo lockfile.

# Install JavaScript and Rust dependencies
make install

# Start Next.js on :3840 and the local API on :3841
make ui-dev

# Build the embedded web/API binary
make api-build

# Start the Tauri desktop app
make desktop-dev

Open http://127.0.0.1:3840/en/ or http://127.0.0.1:3840/zh/ during development. The release API binary embeds the static frontend and serves it on http://127.0.0.1:3841.

Create or import your first wallet

  1. Open the UI and select Create New Wallet or Import Wallet.
  2. For a new wallet, enter a name and a 10-20 character password. For an existing wallet, select its keystore.json and enter its password.
  3. Download and back up the encrypted Keystore before depositing funds. The password cannot be recovered.
  4. Select the wallet from the wallet picker, then use Receive, Send, or Trade from the wallet page.
  5. Check the selected network and RPC under Settings before signing any transaction.

See the UI Wallet User Guide for wallet management, transfers, trading, multisig workflows, backups, and troubleshooting.

Cargo Feature Flags

  • full - Enable all features (default for CLI)
  • cli - Command-line interface with colored output
  • 2fa - Two-factor authentication (TOTP) support
  • solana-ops - Solana blockchain operations
  • sol-trade-sdk - Trading operations (Pump.fun, PumpSwap)

πŸ“– Complete Interactive Menu Guide

πŸ“– View Complete Interactive Menu Guide β†’ INTERACTIVE_TUTORIAL.md

Comprehensive step-by-step guide for all interactive menu operations, including detailed instructions, use cases, and example outputs for each of the 18 menu options.


πŸ“š Documentation


πŸ” Security

  • βœ… Password Security: stdin pipe only (never in environment variables)
  • βœ… Encryption: AES-256 with PBKDF2 key derivation
  • βœ… Memory Safety: Immediate password cleanup after use
  • βœ… Hardware Fingerprint: Device-based security layer
  • βœ… 2FA Support: Optional two-factor authentication for enhanced security

πŸ› οΈ Available Operations

Wallet Management

  • Create Wallet - Generate new encrypted wallet with AES-256
  • Import Wallet - Import existing wallet from private key or seed phrase
  • Export Wallet - Export wallet to encrypted JSON format
  • View Address - Display wallet public address

SOL Operations

  • Query Balance - Check SOL balance in your wallet
  • Transfer SOL - Send SOL to other addresses
  • Wrap SOL - Convert SOL to WSOL (Wrapped SOL)
  • Unwrap WSOL - Convert WSOL back to SOL
  • Close WSOL ATA - Close WSOL ATA account

Token Operations

  • Transfer SPL Token - Send SPL tokens to other addresses
  • Query Token Balance - Check token balances

DEX Operations

  • πŸ”₯ Pump.fun Sell - Interactive token selling on Pump.fun DEX (internal market only)
  • πŸ”„ PumpSwap Sell - Sell tokens on PumpSwap DEX

Cashback Operations

  • Pump.fun Cashback - View and claim pump.fun cashback (native SOL)
  • PumpSwap Cashback - View and claim PumpSwap cashback (WSOL)

Advanced Features

  • Durable Nonce Accounts - Create and manage nonce accounts for offline signing
  • 2FA Support - Optional two-factor authentication for enhanced security

Transaction Management

  • Check Transaction Status - Query transaction status on Solana

πŸ“– Examples

See examples/bot_example.rs for a complete bot integration example.


🀝 Contributing

Contributions welcome! Please ensure security best practices are followed. Use English for commit and PR descriptions.


πŸ“„ License

MIT License - See LICENSE file for details

About

Local-first Solana wallet toolkit: Rust SDK, CLI, encrypted keystore, Web/Tauri UI, 2FA, bot integration, token transfers, trading and Squads multisig.

Topics

Resources

License

Stars

24 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors