pump-rust-vanity
Production-grade multi-threaded Rust vanity address generator for Solana — 100K+ keys/sec using Rayon parallel iterators with solana-sdk, Base58 pattern matching, prefix/suffix support, security-hardened file output, and Criterion benchmarks.
- License 许可
- MIT
- 最近更新
- 2026-08-01
- Stars
- ★ 2
- Forks
- 3
01 前言 Front Matter
- name
- pump-rust-vanity
- metadata
- { "solanaos": { "homepage": "https://github.com/nirholas/pump-fun-sdk", "requires": { "bins": [ "cargo" ] } } }
- description
- Production-grade multi-threaded Rust vanity address generator for Solana — 100K+ keys/sec using Rayon parallel iterators with solana-sdk, Base58 pattern matching, prefix/suffix support, security-hardened file output, and Criterion benchmarks.
03 SKILL.md 正文
Rust Vanity Generator — High-Performance Solana Address Mining
Production-grade Rust binary achieving 100K+ keys/sec using Rayon parallel iterators with security-hardened file output and Solana CLI compatibility.
Architecture
CLI Args ──► VanityConfig ──► VanityGenerator
│
Rayon par_iter
┌─────┼─────┐
Thread Thread Thread ...
│ │ │
Keypair::new() per iteration
│ │ │
Base58 encode + match
│ │ │
└─────┼─────┘
│
AtomicBool found
│
SecureOutput (0o600)
CLI Arguments
| Argument | Description |
|---|---|
--prefix |
Required Base58 prefix to match |
--suffix |
Optional Base58 suffix |
--output |
Output file path (default: stdout) |
--threads |
Number of threads (default: all CPUs) |
Core Types
struct VanityConfig {
prefix: String,
suffix: Option<String>,
output: Option<PathBuf>,
threads: Option<usize>,
}
struct GeneratedAddress {
keypair: Keypair,
address: String,
attempts: u64,
}
Generation Engine
fn generate(config: &VanityConfig) -> Result<GeneratedAddress> {
let found = AtomicBool::new(false);
let result = (0..num_cpus::get())
.into_par_iter()
.find_map_any(|_| {
let mut attempts = 0u64;
loop {
if found.load(Ordering::Relaxed) { return None; }
attempts += 1;
let keypair = Keypair::new();
let address = keypair.pubkey().to_string();
if matches_pattern(&address, &config) {
found.store(true, Ordering::Relaxed);
return Some(GeneratedAddress { keypair, address, attempts });
}
}
});
result.ok_or_else(|| anyhow!("No match found"))
}
Security Features
| Feature | Implementation |
|---|---|
| CSPRNG | OsRng via solana-sdk |
| Memory cleanup | Zeroize trait on secret key bytes |
| File permissions | 0o600 via std::fs::set_permissions |
| No network | Pure offline operation |
Dependencies
| Crate | Purpose |
|---|---|
solana-sdk |
Keypair generation, Base58, signing |
rayon |
Data-parallel iteration |
clap |
CLI argument parsing |
anyhow |
Error handling |
criterion |
Benchmarking |
Testing
cargo test # Unit + integration tests
cargo test --test security_tests # Security-focused tests
cargo bench # Criterion benchmarks
Patterns to Follow
- Only use
solana-sdkfor cryptographic operations - Use
Zeroizeon all key material - Set file permissions to
0o600immediately after writing - Use
AtomicBoolfor cross-thread termination signaling - Use
find_map_anyfor early termination on first match
Common Pitfalls
- Base58 is case-sensitive —
pump≠Pump - Longer prefixes grow exponentially harder (~58× per character)
Keypair::new()uses OS entropy — do not seed with user inputrayonthread pool size should match CPU cores for optimal throughput
04 同仓库更多 Skills
solana-dev
End-to-end Solana development playbook (Jan 2026). Prefer Solana Foundation framework-kit (@solana/client + @solana/react-hooks) for React/Next.js UI. Prefer @solana/kit for all new client/RPC/transaction code. When legacy dependencies require web3.js, isolate it behind @solana/web3-compat (or @solana/web3.js as a true legacy fallback). Covers wallet-standard-first connection (incl. ConnectorKit), Anchor/Pinocchio programs, Codama-based client generation, LiteSVM/Mollusk/Surfpool testing, and security checklists.
xurl
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
wurk-integration
WURK API integration for monetizing agents with x402 payments on Solana/Base - create social jobs, custom challenges, and agent help tasks
workflows
Manage application workflows including configuration, restart, and removal.
web-search
Search the web, fetch content, extract branding profiles, and capture screenshots from URLs. Use for real-time information, API documentation, current events, design matching, and visual reference.
weather
Get current weather and forecasts via wttr.in or Open-Meteo. Use when: user asks about weather, temperature, or forecasts for any location. NOT for: historical weather data, severe weather alerts, or detailed meteorological analysis. No API key needed.