fromSeedWithHdPath static method

Future<Ed25519HDKeyPair> fromSeedWithHdPath({
  1. required List<int> seed,
  2. required String hdPath,
})

Construct a new Ed25519HDKeyPair from a seed and a derivation path hdPath.

Implementation

static Future<Ed25519HDKeyPair> fromSeedWithHdPath({
  required List<int> seed,
  required String hdPath,
}) async {
  final KeyData keyData = await ED25519_HD_KEY.derivePath(hdPath, seed);

  return Ed25519HDKeyPair._(
    privateKey: keyData.key,
    publicKey: Ed25519HDPublicKey(
      await ED25519_HD_KEY.getPublicKey(keyData.key, false),
    ),
  );
}