class
ColdVerificationKeyA stake pool verification key (Ed25519 public key).
Public functions
-
auto asBech32() const → std::
string - Serialize the key bytes as a Bech32 string.
-
auto bytes() const → const std::
array<uint8_t, ed25519:: PUBLIC_KEY_SIZE>& constexpr - Return the key as a byte vector.
-
auto poolId() const → std::
array<uint8_t, STAKE_ POOL_ ID_ SIZE> - Generate the pool ID as an array of bytes.
-
void saveToFile(std::
string_view fpath) const - Export the key to a file in the cardano node JSON format.
-
auto verifySignature(std::
span<const uint8_t> msg, std:: span<const uint8_t, ed25519:: SIGNATURE_SIZE> sig) const → bool - Verify a signature using the verification key.
Function documentation
std:: string cardano:: stake_pool:: ColdVerificationKey:: asBech32() const
Serialize the key bytes as a Bech32 string.
Returns | String representing the formatted key. |
---|
std:: array<uint8_t, STAKE_ POOL_ ID_ SIZE> cardano:: stake_pool:: ColdVerificationKey:: poolId() const
Generate the pool ID as an array of bytes.
Returns | Pool ID as an array of bytes. |
---|
void cardano:: stake_pool:: ColdVerificationKey:: 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. |
bool cardano:: stake_pool:: ColdVerificationKey:: verifySignature(std:: span<const uint8_t> msg,
std:: span<const uint8_t, ed25519:: SIGNATURE_SIZE> sig) const
Verify a signature using the verification key.
Parameters | |
---|---|
msg | A span of bytes (uint8_t) representing the original message. |
sig | A span of 64 bytes (uint8_t) representing the signature. |