npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nirholas/solana-wallet-toolkit

v1.0.2

Published

[![npm version](https://img.shields.io/npm/v/@nirholas/solana-wallet-toolkit.svg)](https://www.npmjs.com/package/@nirholas/solana-wallet-toolkit)

Readme

Solana Wallet Toolkit

Rust TypeScript Solana

Secure, auditable toolkit for Solana wallet generation and vanity addresses — using only official Solana Labs libraries.

🔑 Key Features

  • Vanity Address Generation — Generate addresses with custom prefixes/suffixes
  • Multi-threaded Search — Parallel generation using all CPU cores
  • Rust & TypeScript — High-performance Rust CLI + Node.js library
  • Secure File Output — Keypairs saved with 0600 permissions
  • Solana CLI Compatible — Output format works with solana CLI tools
  • 100% Offline — No network calls, fully air-gappable
  • Auditable Code — Clean, documented source code

⚠️ DISCLAIMER - EDUCATIONAL PURPOSES ONLY - NO LIABILITY

THIS SOFTWARE IS PROVIDED FOR EDUCATIONAL AND RESEARCH PURPOSES ONLY.

DO NOT USE WITH REAL FUNDS WITHOUT THOROUGH SECURITY REVIEW.

The author(s) accept NO LIABILITY for any damages, losses, or consequences arising from the use of this software. By using this software, you acknowledge that you are solely responsible for your actions and any outcomes.

This software is provided "AS IS" without warranty of any kind. The author(s) make no guarantees about the security, correctness, or fitness for any purpose.

ALWAYS:

  • Audit the code yourself before any use
  • Use hardware wallets for significant funds
  • Understand that vanity address generation has inherent risks
  • Generate keys on an air-gapped, offline machine

🔒 Security

This toolkit uses ONLY official libraries from Solana Labs. No third-party cryptographic code.

| Implementation | Library | Repository | Maintainer | |----------------|---------|------------|------------| | Rust | solana-sdk | solana-labs/solana | Solana Labs | | TypeScript | @solana/web3.js | solana-labs/solana-web3.js | Solana Labs | | Shell | solana-keygen | solana-labs/solana | Solana Labs |

All cryptographic operations (Ed25519 key generation, signing) are handled by these official packages. The toolkit code only provides CLI interface and pattern matching logic.

Non-Cryptographic Dependencies

These standard libraries handle CLI, parallelism, and file I/O — none touch private keys:

| Package | Purpose | Used By | |---------|---------|---------| | clap | CLI argument parsing | Rust | | rayon | Parallel processing | Rust | | serde | JSON serialization | Rust | | zeroize | Secure memory clearing | Rust |

Security Best Practices

  1. Run offline — Disconnect from the internet when generating wallets
  2. Audit the code — It's open source, verify it yourself
  3. Never share private keys or keypair files
  4. Store secrets securely — Use hardware wallets for significant funds
  5. Verify file permissions — Keypair files should be 0600 (owner read/write only)

📦 Installation

Rust (Recommended - Fastest)

# Clone the repository
git clone https://github.com/nirholas/solana-wallet-toolkit.git
cd solana-wallet-toolkit/rust

# Build release binary
cargo build --release

# Binary is at target/release/solana-vanity

TypeScript / Node.js

cd solana-wallet-toolkit/typescript

# Install dependencies
npm install

# Build
npm run build

Shell Scripts (Uses solana-keygen)

# Requires Solana CLI tools installed
# https://docs.solana.com/cli/install-solana-cli-tools

cd solana-wallet-toolkit/scripts
chmod +x *.sh

🚀 Usage

Rust CLI

# Generate address starting with "ABC"
./solana-vanity --prefix ABC

# Generate address ending with "XYZ"
./solana-vanity --suffix XYZ

# Both prefix and suffix
./solana-vanity --prefix AB --suffix 99

# Case-insensitive matching
./solana-vanity --prefix abc --ignore-case

# Specify number of threads
./solana-vanity --prefix ABC --threads 8

# Custom output file
./solana-vanity --prefix Sol --output my-wallet.json

# Generate multiple addresses
./solana-vanity --prefix A --count 5

# Estimate time without generating (dry run)
./solana-vanity --prefix ABCD --dry-run

# Quiet mode (just output public key)
./solana-vanity --prefix AB --quiet

TypeScript CLI

# Using ts-node
npx ts-node src/index.ts --prefix ABC

# Or after building
node dist/index.js --prefix ABC --suffix XYZ

TypeScript Library

import { VanityGenerator } from 'solana-vanity-ts';

const generator = new VanityGenerator({
  prefix: 'Sol',
  ignoreCase: true,
  onProgress: (attempts, rate) => {
    console.log(`${attempts} attempts, ${rate}/sec`);
  }
});

const result = await generator.generate();
console.log(`Found: ${result.publicKey}`);
console.log(`Attempts: ${result.attempts}`);

Shell Scripts

# Generate vanity address using solana-keygen grind
./scripts/generate-vanity.sh Sol

# Batch generate from file
./scripts/batch-generate.sh prefixes.txt

# Verify a keypair file
./scripts/verify-keypair.sh my-wallet.json

⏱️ Vanity Address Time Estimates

Solana addresses use Base58 encoding (58 possible characters per position).

| Characters | Difficulty | Est. Time (8 cores) | |------------|------------|---------------------| | 1 | 1 in 58 | Instant | | 2 | 1 in 3,364 | < 1 second | | 3 | 1 in 195,112 | ~2 seconds | | 4 | 1 in 11,316,496 | ~2 minutes | | 5 | 1 in 656,356,768 | ~2 hours | | 6 | 1 in 38+ billion | ~4 days | | 7+ | 1 in 2+ trillion | Weeks to months |

Note: Case-insensitive matching roughly doubles your chances for letter characters.

Times depend on your hardware. The Rust implementation typically achieves 50,000-100,000+ keys/second per thread.


📁 Project Structure

solana-wallet-toolkit/
├── rust/                    # High-performance Rust implementation
│   ├── src/
│   │   ├── main.rs          # CLI entry point
│   │   ├── lib.rs           # Library exports
│   │   ├── generator.rs     # Core generation logic
│   │   ├── matcher.rs       # Pattern matching
│   │   ├── output.rs        # File output (Solana CLI format)
│   │   └── security.rs      # Secure memory handling
│   ├── Cargo.toml
│   └── README.md
│
├── typescript/              # Node.js implementation
│   ├── src/
│   │   ├── index.ts         # CLI entry point
│   │   └── lib/
│   │       ├── generator.ts # Core generation logic
│   │       ├── matcher.ts   # Pattern matching
│   │       ├── output.ts    # File output
│   │       └── security.ts  # Security utilities
│   ├── package.json
│   └── README.md
│
├── scripts/                 # Shell script wrappers
│   ├── generate-vanity.sh   # Single address generation
│   ├── batch-generate.sh    # Batch generation
│   ├── verify-keypair.sh    # Keypair verification
│   └── utils.sh             # Shared utilities
│
├── tests/                   # Test suites
│   ├── cli/                 # CLI tests
│   ├── integration/         # Cross-implementation tests
│   ├── fuzz/                # Fuzz testing
│   └── stress/              # Stress tests
│
├── security/                # Security documentation
│   ├── SECURITY_CHECKLIST.md
│   └── audit-*.md
│
├── docs/                    # Documentation
│   └── cli-guide.md
│
└── tools/                   # Utility tools
    ├── verify-keypair.ts
    └── check-file-permissions.sh

🔍 How It Works

Key Generation

  1. Generate random Ed25519 keypair using solana-sdk / @solana/web3.js
  2. Get the public key (32 bytes)
  3. Encode as Base58 string (Solana address format)
  4. Check if address matches the pattern
  5. Repeat until match found

Pattern Matching

  • Prefix: Check if address starts with the pattern
  • Suffix: Check if address ends with the pattern
  • Case-insensitive: Compare lowercase versions

Output Format

Keypairs are saved in Solana CLI JSON format — a JSON array of 64 bytes:

  • Bytes 0-31: Ed25519 secret key seed
  • Bytes 32-63: Public key
[174,47,154,16,202,193,206,113,199,190,53,133,169,175,31,56,...]

This format is compatible with solana config set --keypair and other Solana CLI tools.


🆚 Comparison with Other Tools

| Feature | This Toolkit | solana-keygen grind | Others | |---------|-------------|---------------------|--------| | Library | Official solana-sdk | Official | Varies | | Languages | Rust, TypeScript, Shell | Rust | Varies | | Multi-threaded | Yes | Yes | Some | | Prefix/Suffix | Yes | Prefix only | Some | | Case-insensitive | Yes | No | Some | | Secure Permissions | Yes (0600) | Yes | Rarely | | Memory Zeroization | Yes | Yes | Rarely | | Dry Run/Estimate | Yes | No | Rarely | | Library API | Yes | No | Some | | Auditable | Yes | Yes | Varies |


🧪 Testing

# Run all tests
./run-all-tests.sh

# Rust tests
cd rust && cargo test

# TypeScript tests
cd typescript && npm test

# Integration tests
./tests/integration/test_keypair_validity.sh
./tests/integration/test_output_compatibility.sh

🤖 For AI / LLM / Vibe Coders

Quick Copy-Paste Examples

Rust:

use solana_sdk::signer::keypair::Keypair;
use solana_sdk::signature::Signer;

// Generate random keypair
let keypair = Keypair::new();
println!("Address: {}", keypair.pubkey());

// Save to file (Solana CLI format)
let bytes = keypair.to_bytes();
let json = serde_json::to_string(&bytes.to_vec())?;
std::fs::write("keypair.json", json)?;

TypeScript:

import { Keypair } from '@solana/web3.js';

// Generate random keypair
const keypair = Keypair.generate();
console.log('Address:', keypair.publicKey.toBase58());

// Save to file
const json = JSON.stringify(Array.from(keypair.secretKey));
fs.writeFileSync('keypair.json', json, { mode: 0o600 });

📜 License

All rights reserved. See LICENSE for details.


👤 Author

nich@nichxbtgithub.com/nirholas


🔗 Related Projects


📚 Resources


🏷️ Keywords

solana wallet rust typescript cli vanity-address keypair ed25519 private-key address-generator solana-sdk web3js cryptocurrency blockchain cold-storage offline-wallet air-gapped open-source educational



🌐 Live HTTP Deployment

Solana Wallet Toolkit is deployed and accessible over HTTP via MCP Streamable HTTP transport — no local installation required.

Endpoint:

https://modelcontextprotocol.name/mcp/solana-wallet-toolkit

Connect from any MCP Client

Add to your MCP client configuration (Claude Desktop, Cursor, SperaxOS, etc.):

{
  "mcpServers": {
    "solana-wallet-toolkit": {
      "type": "http",
      "url": "https://modelcontextprotocol.name/mcp/solana-wallet-toolkit"
    }
  }
}

Available Tools (4)

| Tool | Description | |------|-------------| | get_sol_price | Current SOL price | | get_solana_defi | Solana DeFi protocols | | get_price | Get crypto prices | | search_coins | Search Solana tokens |

Example Requests

Current SOL price:

curl -X POST https://modelcontextprotocol.name/mcp/solana-wallet-toolkit \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_sol_price","arguments":{}}}'

Solana DeFi protocols:

curl -X POST https://modelcontextprotocol.name/mcp/solana-wallet-toolkit \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_solana_defi","arguments":{}}}'

Get crypto prices:

curl -X POST https://modelcontextprotocol.name/mcp/solana-wallet-toolkit \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_price","arguments":{"ids":"solana","vs_currencies":"usd"}}}'

List All Tools

curl -X POST https://modelcontextprotocol.name/mcp/solana-wallet-toolkit \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Also Available On

  • SperaxOS - source for the MCP marketplace. The hosted marketplace is offline while hosting is being migrated.
  • All 27 MCP servers — See the full catalog at modelcontextprotocol.name

Powered by modelcontextprotocol.name — the open MCP HTTP gateway

Documentation

Full documentation site: https://nirholas.github.io/solana-wallet-toolkit/