bip32DerivePath static method

Uint8List bip32DerivePath(
  1. String mnemonic,
  2. String path, [
  3. NetworkType? networkType
])

Implementation

static Uint8List bip32DerivePath(String mnemonic, String path,
    [bip32.NetworkType? networkType]) {
  final seed = mnemonicToSeed(mnemonic);
  bip32.NetworkType network = networkType ?? _BITCOIN;
  final keyChain = bip32.BIP32.fromSeed(seed, network);
  final keyPair = keyChain.derivePath(path);
  return dynamicToUint8List(keyPair.privateKey!);
}