bip32
Installation
SKILL.md
BIP32 HD Key Derivation (Multi-Chain)
The bip32 crate natively supports Secp256k1 (Ethereum/EVM). For Ed25519 (Solana), the solana-sdk provides native SLIP-10 derivation functions. From a single master 64-byte seed, you can securely derive accounts for both ecosystems based on standard BIP-44 paths.
Dependency Setup
[dependencies]
bip32 = { version = "0.5", features = ["secp256k1", "mnemonic"] }
alloy-signer-local = "2.0" # For EVM mapping
solana-sdk = "4.0" # For Solana SLIP-10 mapping
solana-derivation-path = "3" # For Solana derivation path parsing
rand_core = { version = "0.6", features = ["std"] } # Required by bip32 for Mnemonic