toWIFByCoin method

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

Implementation

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