HD Wallet / Mnemonic
Generate BIP-39 mnemonics and derive hierarchical-deterministic accounts for both Conflux eSpace and Core Space. All crypto happens in-browser via @scure/bip39 and @scure/bip32.
How it works
generateMnemonic()uses@scure/bip39— browser-safe, audited BIP-39 library.validateMnemonic(phrase)checks word count (12 or 24) and BIP-39 checksum validity.deriveAccounts(mnemonic, { count })follows BIP-44: eSpace coin type 60 (Ethereum path), Core Space coin type 503 (Conflux path).- Both addresses come from the same mnemonic but different derivation paths — they are cryptographically linked.
- Private keys (
a.evmPrivateKey,a.corePrivateKey) are available on each account for signing.
// @cfxdevkit/wallet is a focused re-export from @cfxdevkit/core
import { generateMnemonic, deriveAccounts } from '@cfxdevkit/wallet'Last updated on