Skip to content

sgns::securecrdt::CandidateCore

#include <SecureCrdtCandidate.hpp>

Public Functions

Name
std::optional< std::vector< uint8_t > > CanonicalBytes() const
std::optional< std::string > Hash() const
bool operator==(const CandidateCore & other) const
std::optional< CandidateCore > DecodeCanonical(const std::vector< uint8_t > & bytes)

Public Attributes

Name
constexpr uint8_t ENCODING_VERSION
constexpr std::string_view RECORD_DOMAIN
uint8_t encoding_version
std::string domain
uint16_t network_id
CandidateKind kind
uint64_t version
std::string expected_previous_hash
std::string authorizing_policy_hash
std::vector< uint8_t > payload

Public Functions Documentation

function CanonicalBytes

std::optional< std::vector< uint8_t > > CanonicalBytes() const

function Hash

std::optional< std::string > Hash() const

function operator==

bool operator==(
    const CandidateCore & other
) const

function DecodeCanonical

static std::optional< CandidateCore > DecodeCanonical(
    const std::vector< uint8_t > & bytes
)

Public Attributes Documentation

variable ENCODING_VERSION

static constexpr uint8_t ENCODING_VERSION = 1;

variable RECORD_DOMAIN

static constexpr std::string_view RECORD_DOMAIN = "SGNS_SECURECRDT_CANDIDATE_V1";

variable encoding_version

uint8_t encoding_version = ENCODING_VERSION;

variable domain

std::string domain;

variable network_id

uint16_t network_id = 0;

variable kind

CandidateKind kind = CandidateKind::TrustPolicy;

variable version

uint64_t version = 0;

variable expected_previous_hash

std::string expected_previous_hash;

variable authorizing_policy_hash

std::string authorizing_policy_hash;

variable payload

std::vector< uint8_t > payload;

Updated on 2026-09-25 at 15:46:10 +0000