CharterAgreementProtocol.Receipt (Charter Agreement Protocol v0.2.1)

Copy Markdown View Source

CAP never authorizes.

Closed Receipt codec and view-relative cross-check verifier.

Chain context re-verifies the retained artifact set, verifies the issuing party signature, and compares the claimed revision with governance at the caller-authored receipt instant. Revision-only context cannot resolve a charter key or governance view; its facts add :signature to not_verified and report governance as undetermined.

Only bilaterally accepted revision facts contribute role-to-descriptor mappings in chain context. Proposed revision bytes are unauthenticated data and cannot promote a counterparty key into another charter role.

Grant and deployment fields prove exact digest naming only. They never establish live authority, execution, or effect truth.

Summary

Functions

Return a Receipt's domain-separated content digest.

Verify one attached receipt against revision-only or full-chain context.

Types

t()

@type t() :: %CharterAgreementProtocol.Receipt{
  agent_party_role: binary(),
  charter_id: binary(),
  decision: :accepted | :rejected,
  deployment_digest: binary(),
  envelope: CharterAgreementProtocol.CompactJws.t(),
  extension_outcome: CharterAgreementProtocol.Extension.Outcome.t(),
  extensions: CharterAgreementProtocol.Json.value(),
  grant: CharterAgreementProtocol.Receipt.Grant.t(),
  invocation_id: binary(),
  issuing_party_role: binary(),
  occurred_at: CharterAgreementProtocol.Timestamp.t(),
  outcome: :effect_committed | :no_effect | :indeterminate,
  protocol_revision: 1 | 2,
  recorded_at: CharterAgreementProtocol.Timestamp.t(),
  revision_digest: binary(),
  revision_number: pos_integer()
}

Functions

digest(receipt)

@spec digest(t()) :: binary()

Return a Receipt's domain-separated content digest.

verify(compact, context, limits)

Verify one attached receipt against revision-only or full-chain context.