RedPallasPrivateKey.fromBytes constructor
RedPallasPrivateKey.fromBytes(
- List<
int> bytes, - PallasPoint generator
Implementation
factory RedPallasPrivateKey.fromBytes(
List<int> bytes,
PallasPoint generator,
) {
final point = VestaFq.fromBytes(bytes);
final mul = generator * point;
final pointBytes = mul.toBytes();
return RedPallasPrivateKey(
sk: bytes,
publicKey: RedPallasPublicKey(
publicKey: pointBytes,
point: PallasNativePoint.fromBytes(pointBytes),
),
);
}