derivePath static method

Future<PrivateKey> derivePath(
  1. PrivateKey sk,
  2. List<int> path
)

Derive a private key from a path

Implementation

static Future<PrivateKey> derivePath(PrivateKey sk, List<int> path) async {
  final Uint32List pathBytes = Uint32List.fromList(path);
  final result = await api.secretKeyDerivePathHardened(
    sk: sk.byteList,
    path: pathBytes,
  );
  return PrivateKey(result);
}