Skill — Copyable reference implementation. Use as-is or customize. See Skills Philosophy.
Overview
Generate Ethereum wallets using BIP-39 mnemonics and BIP-32/BIP-44 hierarchical deterministic key derivation. This guide covers the complete workflow from mnemonic generation to Ethereum address derivation.Quick Start
Generate Mnemonic
BIP-39 mnemonics provide human-readable backup for wallet seeds.12-Word Mnemonic (128 bits)
24-Word Mnemonic (256 bits, recommended)
Entropy to Word Count
| Entropy Bits | Words | Security Level |
|---|---|---|
| 128 | 12 | Standard |
| 160 | 15 | Enhanced |
| 192 | 18 | High |
| 224 | 21 | Very High |
| 256 | 24 | Maximum |
Derive Seed from Mnemonic
Convert mnemonic to 64-byte seed using PBKDF2-HMAC-SHA512.Async Derivation
Sync Derivation
Create HD Wallet
Create hierarchical deterministic wallet from seed.Derive Ethereum Accounts
Use BIP-44 pathm/44'/60'/account'/0/index for Ethereum.
Single Account
Multiple Addresses
Multiple Accounts
Get Ethereum Address
Convert private key to Ethereum address.Import Existing Mnemonic
Restore wallet from backed-up mnemonic.Import from Extended Key
Restore from xprv/xpub string.Custom Derivation Paths
Derive keys using any BIP-32 path.Complete Wallet Class Example
Security Best Practices
Entropy Quality
Passphrase Usage
Memory Handling
Storage Guidelines
- Mnemonic: Write on paper, store in fireproof safe, never digital
- Passphrase: Memorize or store separately from mnemonic
- xprv: Treat like private key, never transmit unencrypted
- xpub: Safe to share for watch-only access
API Reference
Bip39 Functions
| Function | Description |
|---|---|
generateMnemonic(bits) | Generate mnemonic (128/160/192/224/256 bits) |
validateMnemonic(mnemonic) | Check if mnemonic is valid BIP-39 |
mnemonicToSeed(mnemonic, passphrase?) | Async seed derivation |
mnemonicToSeedSync(mnemonic, passphrase?) | Sync seed derivation |
HDWallet Functions
| Function | Description |
|---|---|
fromSeed(seed) | Create root key from 64-byte seed |
fromExtendedKey(xprv) | Import from extended private key |
fromPublicExtendedKey(xpub) | Import from extended public key |
derivePath(key, path) | Derive child by BIP-32 path |
deriveChild(key, index) | Derive child by index |
deriveEthereum(key, account, index) | Derive Ethereum address |
getPrivateKey(key) | Get 32-byte private key |
getPublicKey(key) | Get 33-byte compressed public key |
toExtendedPrivateKey(key) | Export xprv string |
toExtendedPublicKey(key) | Export xpub string |
Address Functions
| Function | Description |
|---|---|
Address.fromPublicKey(pubKey) | Create address from 64-byte uncompressed public key |
Address.fromPrivateKey(privKey) | Create address from 32-byte private key |
address.toHex() | Get checksummed hex string |

