deriveHardJunction method
Derive a single hard junction.
Implementation
Uint8List deriveHardJunction(List<int> seed, List<int> junction,
{Uint8List? output}) {
final bytes = ByteOutput();
StrCodec.codec.encodeTo('Secp256k1HDKD', bytes);
U8ArrayCodec(super.seedSize).encodeTo(seed, bytes);
U8ArrayCodec(junction.length).encodeTo(junction, bytes);
final digest = Blake2bDigest(digestSize: 32);
final jose = bytes.toBytes();
digest.update(jose, 0, jose.length);
output ??= Uint8List(32);
digest.doFinal(output, 0);
return output;
}