pump-rust-vanity
Build production Rust vanity-address tooling for Pump.fun/Solana wallets with Rayon parallelism, solana-sdk key generation, Base58 prefix/suffix matching, secure file output, zeroization, and Criterion benchmarks. Use for high-throughput vanity generation.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- pump-rust-vanity
- description
- Build production Rust vanity-address tooling for Pump.fun/Solana wallets with Rayon parallelism, solana-sdk key generation, Base58 prefix/suffix matching, secure file output, zeroization, and Criterion benchmarks. Use for high-throughput vanity generation.
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
zkrouter
Self-hosted OpenAI-compatible LLM router — smart tier-based routing, ZK-stamped routing decisions, mode overrides, free OpenRouter at install via the Birth bot. Save 60-80% on inference costs by routing to the cheapest capable model across 12+ OpenRouter models.
zk
For custom ZK Solana programs and privacy-preserving applications to prevent double spending. Guide to integrate rent-free nullifier PDAs for double-spend prevention.
zk-omni-messaging
Zero-knowledge omnichain messaging between Robinhood Chain and Solana using CheshireZkOmniMessenger (msgType 4) with nullifier anti-replay and the zk-omni-relayer service.
zerion-wallet-data
Use when the user asks to check a wallet's portfolio, token balances, DeFi positions, PnL, transaction history, or NFTs. Provides interpreted on-chain data across 40+ EVM chains and Solana via x402 pay-per-request or API key — no raw RPC decoding needed.
youtube-clipper
YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video
yield-optimization
Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit/withdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter/exit a position, or check portfolio balances.