Struct Enrollment

Define enrollment data (enrollment data = validator)

struct Enrollment ;

Fields

NameTypeDescription
commitment geod24.bitblob.BitBlob!(64L)
enroll_sig agora.crypto.Schnorr.Signature
MinValidatorCount immutable(uint)The minimum number of validators required to create a block
utxo_key geod24.bitblob.BitBlob!(64L)

Methods

NameDescription
computeHash (dg) Implements hashing support

Example

test for the computeHash function

import agora.crypto.Key;
import std.conv;
Hash inithash = Enrollment.init.hashFull();
assert(Enrollment(hashFull(1)).hashFull() != inithash);
assert(Enrollment(Hash.init, hashFull(2)).hashFull() != inithash);
assert(Enrollment(Hash.init, Hash.init,
    KeyPair.random().sign(Enrollment.init)).hashFull() == inithash);