Pure Dart mnemonic-based wallet derivation for multiple chains.
bitcoin- legacy P2PKH (1...)bitcoinSegwit- native SegWit / bech32 (bc1q...)dogecoinethbnbtronxrpl- native XRP Ledger (r...)xrpEvm- EVM-style XRP address (0x...)solanasui- Ed25519 + Blake2b address (0x...)
- Derive private key, public key, and address from a mnemonic
- Batch derivation across all supported chains
- Chain metadata lookup by chain id
- Pure Dart implementation with unit tests
import 'package:multi_chain_wallet/wallet_derivation.dart';
Future<void> main() async {
const mnemonic =
'baby pretty venture start report sick shuffle axis tube laugh cement train';
final ethWallet = await MnemonicWallet.derive(
mnemonic: mnemonic,
chain: SupportedChain.eth,
);
final xrplWallet = await MnemonicWallet.derive(
mnemonic: mnemonic,
chain: SupportedChain.xrpl,
);
final canonical = SupportedChainX.fromChainId(60);
final allFor60 = SupportedChainX.allForChainId(60);
print(ethWallet.address);
print(xrplWallet.address);
print(canonical);
print(allFor60);
}chainIdin this package follows the BIP44 / SLIP-0044 coin type style used by derivation paths.- Some chains share the same id. For example
eth,bnb, andxrpEvmall map to60. suiuses pathm/44'/784'/0'/0'/0'and address0x + blake2b-256(0x00 || publicKey).SupportedChainX.fromChainIdreturns the canonical default chain for that id.SupportedChainX.allForChainIdreturns every supported chain that shares the same id.
Before publishing to pub.dev, make sure you also set:
homepagerepositoryissue_tracker- a license file such as
LICENSE
Then run:
dart pub publish --dry-run
dart pub publish