org.plasmalabs.consensus.models.EligibilityCertificateValidator.scala Maven / Gradle / Ivy
The newest version!
package org.plasmalabs.consensus.models
object EligibilityCertificateValidator extends scalapb.validate.Validator[org.plasmalabs.consensus.models.EligibilityCertificate] {
def validate(input: org.plasmalabs.consensus.models.EligibilityCertificate): scalapb.validate.Result =
scalapb.validate.Result.run(io.envoyproxy.pgv.BytesValidation.length("EligibilityCertificate.vrfSig", input.vrfSig, 80)) &&
scalapb.validate.Result.run(io.envoyproxy.pgv.BytesValidation.length("EligibilityCertificate.vrfVK", input.vrfVK, 32)) &&
scalapb.validate.Result.run(io.envoyproxy.pgv.BytesValidation.length("EligibilityCertificate.thresholdEvidence", input.thresholdEvidence, 32)) &&
scalapb.validate.Result.run(io.envoyproxy.pgv.BytesValidation.length("EligibilityCertificate.eta", input.eta, 32))
}