class
VrfVerificationKeyA VRF verification key used by stake pools to verify leadership selection.
Base classes
- class cardano::VRFPublicKey
- Represents a VRF public key.
Constructors, destructors, conversion operators
-
VrfVerificationKey(std::
span<const uint8_t, VRF_PUBLIC_KEY_SIZE> key_bytes) explicit - Construct a new VrfVerificationKey object from a byte vector.
Public functions
- auto bytes() const → const PubKeyByteArray& constexpr
- Return a constant reference to the public key byte array.
- auto keyHash() const → std::array< uint8_t, 32 > -> auto
- Compute the blake2b-256 hash of the verification key.
-
void saveToFile(std::
string_view fpath) const - Export the key to a file in the cardano node JSON format.
-
auto verifyProof(std::
span<const uint8_t> msg, std:: span<const uint8_t> proof) const → bool - Verify a VRF proof from the associated secret key.
-
auto verifySignature(std::
span<const uint8_t> msg, std:: span<const uint8_t, SIGNATURE_SIZE> sig) const → bool - Verify a signature using the public key.
Function documentation
cardano:: stake_pool:: VrfVerificationKey:: VrfVerificationKey(std:: span<const uint8_t, VRF_PUBLIC_KEY_SIZE> key_bytes) explicit
Construct a new VrfVerificationKey object from a byte vector.
Parameters | |
---|---|
key_bytes | The byte vector containing the key. |
auto cardano:: stake_pool:: VrfVerificationKey:: keyHash() const → std::array< uint8_t, 32 >
Compute the blake2b-256 hash of the verification key.
Returns | The key hash as a 32 byte array. |
---|
void cardano:: stake_pool:: VrfVerificationKey:: saveToFile(std:: string_view fpath) const
Export the key to a file in the cardano node JSON format.
Parameters | |
---|---|
fpath | Path to the file to be (over)written. |