derive method

  1. @override
Future<Uint8List> derive(
  1. List<int> seed,
  2. Iterable<DeriveJunction> path, {
  3. Uint8List? output,
})
override

Implementation

@override
Future<Uint8List> derive(List<int> seed, Iterable<DeriveJunction> path,
    {Uint8List? output}) {
  output ??= Uint8List.fromList(seed);
  for (final junction in path) {
    if (junction.isSoft) {
      throw SubstrateBip39Exception.invalidPath(
          'Soft key derivation is not supported for ED25519');
    }
    deriveHardJunction(output, junction.junctionId, output: output);
  }
  return Future.value(output);
}