newKey function

Bip32 newKey(
  1. String mnemonic,
  2. int coinType,
  3. int index
)

Implementation

Bip32 newKey(String mnemonic, int coinType, int index) {
  final node = Bip32.fromSeed(mnemonicToSeed(mnemonic));
  final accountNode =
      node.deriveHardened(44).deriveHardened(coinType).deriveHardened(0);
  return accountNode.derive(0).derive(index);
}