Skip to content

A simple CLI tool to generate secure blockchain wallets and private keys instantly.

License

Notifications You must be signed in to change notification settings

ihedbit/keyforge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

KeyForge

A powerful CLI tool for generating cryptocurrency wallets written in Rust. KeyForge supports generating wallets for multiple blockchain networks including EVM-compatible chains, Bitcoin, Tron, and Solana.

Features

  • πŸ” Generate secure wallets with BIP39 mnemonic phrases
  • 🌐 Support for multiple blockchain networks:
    • EVM (Ethereum, BSC, Polygon, etc.)
    • Bitcoin (P2PKH addresses)
    • Tron (TRX addresses)
    • Solana (SOL addresses)
  • πŸ“ Support for 12 and 24-word mnemonic phrases
  • 🎨 Multiple output formats (text and JSON)
  • πŸ”’ Cryptographically secure random generation
  • ⚑ Fast and lightweight

Installation

Prerequisites

  • Rust 1.70+ installed on your system
  • Git (for cloning the repository)

Build from Source

  1. Clone the repository:
git clone <repository-url>
cd keyforge
  1. Build the project:
cargo build --release
  1. The binary will be available at target/release/keyforge

Install Globally (Optional)

cargo install --path .

Usage

Basic Usage

Generate a wallet with default settings (12 words, text format):

./target/release/keyforge generate --wallet-type evm

Command Options

keyforge generate [OPTIONS] --wallet-type <WALLET_TYPE>

Options:
  -w, --wallet-type <WALLET_TYPE>  Type of wallet to generate [possible values: evm, bitcoin, tron, solana]
  -w, --words <WORDS>              Number of words in mnemonic (12 or 24) [default: 12]
  -f, --format <FORMAT>            Output format (json, text) [default: text]
  -h, --help                       Print help

Examples

Generate an EVM wallet (Ethereum, BSC, Polygon, etc.)

./target/release/keyforge generate --wallet-type evm --words 12

Generate a Bitcoin wallet with 24 words

./target/release/keyforge generate --wallet-type bitcoin --words 24

Generate a Tron wallet in JSON format

./target/release/keyforge generate --wallet-type tron --format json

Generate a Solana wallet

./target/release/keyforge generate --wallet-type solana --words 24

Output Formats

Text Format (Default)

Wallet Type: EVM
Mnemonic (12 words):
virus crisp armed teach deer rebel beauty raise tiny scrub tape honey
Private Key: 0xd30ee30d309ba8f4f9731d0bb354b139f9ba4cd20840bf914e1f2af435c08080
Public Key: 0x04641bf8e327faff648ba6f094a4658fa42e377a71fa070a6611520a3976dbf58a8414516e74bb6aa59783eacd6240cc9d5d077c7cce0cafe0b26d40eecffd5a24
Address: 0x89d36056d6dc87b61daa7992d38064ef5e66fe9c

JSON Format

{
  "mnemonic": "order wear draft news ribbon eight sauce rose this index session exercise cherry quit zero analyst trust hurdle faint solid coral double holiday view",
  "private_key": "f06037fd5b81a57cbb660fbf8eb2109569c4f85137cbd02d8a10fb74e4370b79",
  "public_key": "04248b5c204629435ec96afd7d2db44bf096df2653c4312e68d27d49d2378be9dc9d5afed1e1a74404143ab76c87a74c54cb9e601be59b661285025fa9e78f7667",
  "address": "146CU5vEQaZ5y1WSuAr4dPFgePzK1fE3SH",
  "wallet_type": "Bitcoin",
  "word_count": 24
}

Supported Networks

EVM Networks

  • Ethereum (ETH)
  • Binance Smart Chain (BNB)
  • Polygon (MATIC)
  • Avalanche (AVAX)
  • Arbitrum (ARB)
  • Optimism (OP)
  • And other EVM-compatible chains

Bitcoin

  • Mainnet P2PKH addresses
  • Uses BIP44 derivation path: m/44'/0'/0'/0/0

Tron

  • TRX addresses
  • Uses BIP44 derivation path: m/44'/195'/0'/0/0

Solana

  • SOL addresses
  • Uses seed-based key generation

Security Features

  • Cryptographically Secure: Uses OS-level random number generation
  • BIP39 Compliant: Follows industry-standard mnemonic generation
  • BIP44 Compliant: Uses standard derivation paths for different networks
  • No Network Calls: All operations are performed locally
  • Secure Memory: Private keys are handled securely in memory

Technical Details

Dependencies

  • bip39: BIP39 mnemonic phrase generation
  • bip32: BIP32 hierarchical deterministic key derivation
  • secp256k1: Elliptic curve cryptography
  • sha2, sha3: Cryptographic hash functions
  • clap: Command-line argument parsing
  • serde: Serialization/deserialization

Derivation Paths

  • EVM: m/44'/60'/0'/0/0
  • Bitcoin: m/44'/0'/0'/0/0
  • Tron: m/44'/195'/0'/0/0
  • Solana: Seed-based (first 32 bytes)

Development

Building

cargo build

Running Tests

cargo test

Code Formatting

cargo fmt

Linting

cargo clippy

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Disclaimer

This tool is for educational and development purposes. Always ensure you:

  • Keep your private keys secure
  • Test with small amounts first
  • Understand the risks of cryptocurrency transactions
  • Use official wallets for production use

Support

If you encounter any issues or have questions, please open an issue on the GitHub repository.

About

A simple CLI tool to generate secure blockchain wallets and private keys instantly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages