purify
C++ Purify implementation with native circuit and BPP support
Loading...
Searching...
No Matches
purify::accountable::ConstructionReceiptPayload Class Reference

Canonical public payload for a coalition construction receipt. More...

#include <construction_receipt.hpp>

Public Member Functions

Bytes serialize () const
const UInt512 & recovery_root () const noexcept
std::span< const ConstructionReceiptSetupEntry > setup_entries () const noexcept
std::span< const ConstructionReceiptAnchorEntry > anchor_entries () const noexcept
std::size_t serialized_size () const noexcept

Static Public Member Functions

static Result< ConstructionReceiptPayload > create (UInt512 recovery_root, std::vector< ConstructionReceiptSetupEntry > setup_entries, std::vector< ConstructionReceiptAnchorEntry > anchor_entries)
static Result< ConstructionReceiptPayload > deserialize (std::span< const unsigned char > encoded)

Static Public Attributes

static constexpr unsigned char kSerializationVersion = 4
static constexpr std::size_t kFixedHeaderSize = 1 + 64 + 4 + 4
static constexpr std::size_t kSetupEntrySize
static constexpr std::size_t kAnchorEntrySize

Detailed Description

This type commits to public inputs only. It is not a proof and does not represent proof acceptance. The recovery root identifies the coalition setup in the authenticated registry. Anchor identities are supplied by the deterministic surrounding construction context and are bound by construction_receipt_statement_digest(). They are deliberately not duplicated in the on-chain payload.

Definition at line 78 of file construction_receipt.hpp.

Member Function Documentation

◆ anchor_entries()

◆ create()

Result< ConstructionReceiptPayload > purify::accountable::ConstructionReceiptPayload::create ( UInt512 recovery_root,
std::vector< ConstructionReceiptSetupEntry > setup_entries,
std::vector< ConstructionReceiptAnchorEntry > anchor_entries )
staticnodiscard

◆ deserialize()

◆ recovery_root()

const UInt512 & purify::accountable::ConstructionReceiptPayload::recovery_root ( ) const
inlinenodiscardnoexcept

◆ serialize()

Bytes purify::accountable::ConstructionReceiptPayload::serialize ( ) const
nodiscard

◆ serialized_size()

std::size_t purify::accountable::ConstructionReceiptPayload::serialized_size ( ) const
inlinenodiscardnoexcept

Definition at line 115 of file construction_receipt.hpp.

References kAnchorEntrySize, kFixedHeaderSize, and kSetupEntrySize.

Referenced by serialize().

◆ setup_entries()

std::span< const ConstructionReceiptSetupEntry > purify::accountable::ConstructionReceiptPayload::setup_entries ( ) const
inlinenodiscardnoexcept

Field Documentation

◆ kAnchorEntrySize

std::size_t purify::accountable::ConstructionReceiptPayload::kAnchorEntrySize
staticconstexpr
Initial value:
=
std::array< unsigned char, 32 > ScalarBytes
Big-endian 32-byte scalar encoding.
Definition bppp.hpp:30
static constexpr std::size_t kSerializedSize

Definition at line 85 of file construction_receipt.hpp.

Referenced by serialized_size().

◆ kFixedHeaderSize

std::size_t purify::accountable::ConstructionReceiptPayload::kFixedHeaderSize = 1 + 64 + 4 + 4
staticconstexpr

◆ kSerializationVersion

unsigned char purify::accountable::ConstructionReceiptPayload::kSerializationVersion = 4
staticconstexpr

Definition at line 80 of file construction_receipt.hpp.

Referenced by deserialize(), and serialize().

◆ kSetupEntrySize

std::size_t purify::accountable::ConstructionReceiptPayload::kSetupEntrySize
staticconstexpr
Initial value:

Definition at line 82 of file construction_receipt.hpp.

Referenced by serialized_size().


The documentation for this class was generated from the following files: