cardano::shelley::Certificate struct

A transaction certificate.

A Shelley era transaction certificate may take on one of seven types: stake_registration, stake_deregistration, stake_delegation, pool_registration, pool_retirement, genesis_key_delegation, or move_instantaneous_rewards_cert. The certificates all contain different data but have a common interface for serialization/deserialization and an integer type indicator.

CDDL description:

certificate =
  [ stake_registration
  // stake_deregistration
  // stake_delegation
  // pool_registration
  // pool_retirement
  // genesis_key_delegation
  // move_instantaneous_rewards_cert
  ]

Base classes

struct cardano::ArraySerializable
Virtual struct defining CBOR array serializability.

Public functions

void deserialize(std::span<const uint8_t> bytes)
Deserialize CBOR byte vector.
auto deserializer(const cppbor::Array& data) →  void final virtual
Populate the object from the CBOR data.
auto serialize() const →  std::vector<uint8_t>
Serialize the object as a CBOR byte vector.
auto serializer() const →  cppbor::Array final virtual
Populate a CBOR object for serialization.

Public variables

std::variant<std::monostate, StakeRegistration, StakeDeregistration, StakeDelegation, PoolRegistration, PoolRetirement, GenesisKeyDelegation, MoveInstantaneousRewardsCert> certificate
A variant for the different certificate types.

Function documentation

void final cardano::shelley::Certificate::deserializer(const cppbor::Array& data) virtual

Populate the object from the CBOR data.

Parameters
data CBOR array object.

cppbor::Array final cardano::shelley::Certificate::serializer() const virtual

Populate a CBOR object for serialization.

Returns CBOR array object.