toHdKey method

Future<Uint8List> toHdKey({
  1. String passphrase = '',
  2. int index = 0,
  3. int coinType = CoinType.icp,
})

Implementation

Future<Uint8List> toHdKey({
  String passphrase = '',
  int index = 0,
  int coinType = CoinType.icp,
}) async {
  final basePath = getPathWithCoinType(coinType: coinType);
  final seed = await toSeed(passphrase: passphrase);
  return AgentDartFFI.impl.mnemonicSeedToKey(
    req: SeedToKeyReq(
      seed: seed,
      path: '$basePath/0/$index',
    ),
  );
}