Skip to content

Latest commit

 

History

History
74 lines (52 loc) · 2.82 KB

File metadata and controls

74 lines (52 loc) · 2.82 KB

HD Wallet & Multi-Chain Derivation Path Explorer

An interactive web application built with Next.js to explore how different Hierarchical Deterministic (HD) wallets (like MetaMask, Phantom, OKX, and Coinbase Wallet) derive addresses across multiple networks using various BIP-44 derivation paths.

🚀 Overview

This tool helps developers and users understand the relationship between a single mnemonic phrase (seed) and the resulting public addresses on different chains. This doubles a tool for identifying whether or not an address will carry over to another provider given derivation paths may differ.

✨ Key Features

  • Multi-Chain Derivation: Support for Ethereum (ETH), Bitcoin (BTC), Solana (SOL), Aptos (APTOS), Sui (SUI), and Cosmos (COSMOS).
  • Bitcoin Address Types: Generate Legacy (P2PKH), Nested SegWit (P2SH-P2WPKH), Native SegWit (P2WPKH), and Taproot (P2TR) addresses.
  • Wallet Simulation: Compare derivation logic for:
    • MetaMask (ETH focus)
    • Phantom (ETH, SOL, SUI, BTC)
    • OKX Wallet (ETH, SOL, SUI, BTC)
    • Coinbase Wallet (ETH, SOL, BTC)
  • Interactive UI: Real-time generation as you change indices or derivation paths.
  • Custom Paths: Advanced mode for entering arbitrary derivation paths (e.g., m/44'/60'/0'/0/0).

🛠️ How It Works

The application uses standard cryptographic libraries (ethers, bip39, bitcoinjs-lib, etc.) to:

  1. Validate and convert a mnemonic phrase into a seed.
  2. Derive the "Master Key" using BIP-32/BIP-44 standards.
  3. Apply specific derivation paths to produce public keys.
  4. Encode public keys into network-specific address formats (e.g., Bech32 for Cosmos/BTC SegWit, Base58 for Solana).

Technical Stack

  • Framework: Next.js (App Router)
  • Cryptography: ethers.js, bip39, bitcoinjs-lib, tiny-secp256k1, ed25519-hd-key
  • Styling: CSS-in-JS (JSX Styles)

⚠️ Security Warning

NEVER enter a mnemonic phrase that holds real assets into ANY third-party website. This tool is for educational and development purposes only. Always use a freshly generated "test" mnemonic for exploration.

There are no keyloggers here :)

🚦 Getting Started

Prerequisites

  • Node.js (v18 or later)
  • npm, yarn, or pnpm

Installation

  1. Clone the repository:

    git clone <your-repo-url>
    cd hd-wallet-derivation
  2. Install dependencies:

    npm install

Running the App

Start the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

📂 Project Structure

  • src/app/page.js: The main interactive dashboard.
  • src/app/api/btc-address/: Server-side API for complex Bitcoin address generation.
  • src/app/api/cosmos-address/: Server-side API for Cosmos address hashing and encoding.