derive method
Future<Uint8List>
derive(
- List<
int> seed, - Iterable<
DeriveJunction> path, { - Uint8List? output,
override
Derive a child key from a series of given junctions.
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 ECDSA/Secp256k1');
}
deriveHardJunction(output, junction.junctionId, output: output);
}
return Future.value(output);
}