Skip to content

Multi-chain crypto wallet generator in pure Rust. Simple REST API for BIP39/BIP44 HD wallets across 30+ blockchains. Built as a lightweight, zero-dependency alternative to TrustWallet's wallet-core. No complex builds, no C++ bindings, just clean Rust. Generate Bitcoin, Ethereum, Solana, Cosmos & more. Production-ready with <2ms response times.

Notifications You must be signed in to change notification settings

spikeyrock/multichain-wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Multi-Chain Crypto Wallet API

A high-performance, secure REST API for generating cryptocurrency wallets across 30+ blockchain networks. Built with Rust for maximum performance and security. A TrustWallet Wallet-Core alternative (trying to be) Please support!!

πŸš€ Features

  • 30+ Blockchain Support: Generate wallets for Bitcoin, Ethereum, Solana, Cosmos ecosystem, and many more
  • BIP39 Mnemonic Generation: Support for multiple languages (English, Japanese, Korean, Spanish, Chinese, French, Italian, Czech, Portuguese)
  • HD Wallet Support: Hierarchical Deterministic wallet generation following BIP32/BIP44 standards
  • Symbol-Based API: Simple, intuitive API using currency symbols (BTC, ETH, etc.)
  • Multiple Address Formats: Automatic support for chains with multiple address types (e.g., Bitcoin Legacy/SegWit/Taproot)
  • High Performance: Built with Rust and Actix-web for blazing-fast response times
  • Secure: No private keys are stored; everything is generated on-the-fly
  • CORS Enabled: Ready for web application integration

πŸ“‹ Supported Blockchains

Symbol Blockchain Address Format
BTC Bitcoin Legacy (1...), SegWit (bc1q...), Taproot (bc1p...)
ETH Ethereum 0x...
SOL Solana Base58
XRP Ripple r...
DOGE Dogecoin D...
ATOM Cosmos cosmos1...
OSMO Osmosis osmo1...
JUNO Juno juno1...
SCRT Secret Network secret1...
SEI Sei sei1...
TIA Celestia celestia1...
INJ Injective inj1...
XTZ Tezos tz1...
NEAR NEAR Protocol Hex string
TRX TRON T...
SUI Sui 0x...
AKT Akash akash1...
FIL Filecoin f1...

πŸ› οΈ Installation

Prerequisites

  • Rust 1.75 or higher
  • Cargo

Clone and Build

git clone https://github.com/yourusername/multichain-wallet.git
cd multichain-wallet
cargo build --release

Run

# Development
cargo run

# Production
./target/release/crypto-wallet-api

Docker

# Build
docker build -t multichain-wallet .

# Run
docker run -p 8080:8080 multichain-wallet

πŸ“– API Documentation

Base URL

http://localhost:8080/api/v1

Endpoints

1. Health Check

GET /health

Response:

{
  "status": "healthy",
  "version": "0.1.0",
  "timestamp": 1703123456
}

2. Generate Mnemonic

POST /mnemonic/generate

Request:

{
  "language": "english",
  "word_count": 12
}

Response:

{
  "mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
  "language": "english",
  "word_count": 12,
  "generated_at": 1703123456
}

3. Validate Mnemonic

POST /mnemonic/validate

Request:

{
  "mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
  "language": "english"
}

Response:

{
  "valid": true,
  "word_count": 12,
  "message": "Valid mnemonic phrase"
}

4. Generate Wallet

POST /wallet/generate

Request:

{
  "mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
  "passphrase": "",
  "index": 0,
  "symbol": "ETH"
}

Response (Single address for most coins):

{
  "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
  "chain_name": "Ethereum",
  "chain_symbol": "ETH",
  "address_type": "ethereum",
  "derivation_path": "m/44'/60'/0'/0/0",
  "index": 0,
  "public_key": "02b4632d08485ff1df2db55b9dafd23347d1c47a457072a1e87be26896549a8737",
  "private_key": "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"
}

Response (Array for BTC):

[
  {
    "address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",
    "chain_name": "Bitcoin",
    "chain_symbol": "BTC",
    "address_type": "bitcoin_legacy",
    "derivation_path": "m/44'/0'/0'/0/0",
    "index": 0,
    "public_key": "...",
    "private_key": "..."
  },
  {
    "address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
    "chain_name": "Bitcoin",
    "chain_symbol": "BTC",
    "address_type": "bitcoin_segwit",
    "derivation_path": "m/84'/0'/0'/0/0",
    "index": 0,
    "public_key": "...",
    "private_key": "..."
  },
  {
    "address": "bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297",
    "chain_name": "Bitcoin",
    "chain_symbol": "BTC",
    "address_type": "bitcoin_taproot",
    "derivation_path": "m/86'/0'/0'/0/0",
    "index": 0,
    "public_key": "...",
    "private_key": "..."
  }
]

5. Batch Generate Wallets

POST /wallet/batch

Request:

{
  "mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
  "passphrase": "",
  "start_index": 0,
  "count": 5,
  "symbols": ["BTC", "ETH", "SOL"]
}

6. Get Supported Languages

GET /languages

7. Get Supported Wallet Types

GET /wallet/types

πŸ”§ Configuration

Environment variables:

# Host and Port
APP_HOST=0.0.0.0
APP_PORT=8080

# Logging
APP_LOG_LEVEL=info

πŸ—οΈ Architecture

src/
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ handlers.rs    # HTTP request handlers
β”‚   └── models.rs      # Request/Response models
β”œβ”€β”€ chains/
β”‚   β”œβ”€β”€ bitcoin.rs     # Bitcoin implementation
β”‚   β”œβ”€β”€ ethereum.rs    # Ethereum implementation
β”‚   β”œβ”€β”€ cosmos.rs      # Cosmos ecosystem
β”‚   └── ...           # Other chain implementations
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ chain_info.rs  # Chain metadata
β”‚   β”œβ”€β”€ traits.rs      # Core traits
β”‚   └── types.rs       # Core types
β”œβ”€β”€ services/
β”‚   └── wallet.rs      # Wallet generation service
β”œβ”€β”€ errors.rs          # Error handling
β”œβ”€β”€ config.rs          # Configuration
└── main.rs           # Application entry point

πŸ” Security Considerations

  1. No Storage: Private keys are never stored - they're generated on-demand
  2. Secure Random: Uses cryptographically secure random number generation
  3. Standard Compliance: Follows BIP32/BIP39/BIP44 standards
  4. Memory Safety: Built with Rust for memory safety guarantees

🀝 Contributing

Please see CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests. - will be added soon

πŸ“„ License

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

πŸ™ Acknowledgments

  • rust-bitcoin for Bitcoin support
  • ed25519-dalek for Ed25519 curves
  • bip39 for mnemonic generation
  • All the amazing Rust crypto libraries that make this possible

πŸ“ž Support

  • Create an issue for bug reports or feature requests
  • Will keep adding new chains

Made with ❀️ for the crypto community.

About

Multi-chain crypto wallet generator in pure Rust. Simple REST API for BIP39/BIP44 HD wallets across 30+ blockchains. Built as a lightweight, zero-dependency alternative to TrustWallet's wallet-core. No complex builds, no C++ bindings, just clean Rust. Generate Bitcoin, Ethereum, Solana, Cosmos & more. Production-ready with <2ms response times.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •