vrfVerify method
Implementation
@override
bool vrfVerify(List<int> message, List<int> vrfSign,
{List<int>? context, List<int>? extra}) {
if (vrfSign.length != _SubstrateSr25519SignerConst.vrfResultLength) {
throw ArgumentException(
"Invalid VrfSign bytes length. excepted: ${_SubstrateSr25519SignerConst.vrfResultLength} got: ${vrfSign.length} ");
}
final MerlinTranscript vrfScript =
_SubstrateSr25519SignerUtils.vrfScript(extra: extra);
final MerlinTranscript script =
_SubstrateSr25519SignerUtils.substrateVrfSignScript(message, context);
final VRFPreOut output =
VRFPreOut(vrfSign.sublist(0, SchnorrkelKeyCost.vrfPreOutLength));
final VRFProof proof =
VRFProof.fromBytes(vrfSign.sublist(SchnorrkelKeyCost.vrfPreOutLength));
return _verifier.vrfVerify(script, output, proof, verifyScript: vrfScript);
}