CharterAgreementProtocol.CharterRevision (Charter Agreement Protocol v0.2.1)

Copy Markdown View Source

CAP never authorizes.

Closed codec for one unsigned Charter Revision.

Decoding proves canonical syntax and the revision-local contract. Revision chain continuity, acceptance policy, and supersession effects require a verified artifact set and are deliberately evaluated by later surfaces.

Summary

Functions

Decode and validate one canonical unsigned Charter Revision.

Return the revision's domain-separated content digest.

Types

precedence()

@type precedence() :: :legal_text_governs | :machine_terms_govern

t()

@type t() :: %CharterAgreementProtocol.CharterRevision{
  abp_bindings: [CharterAgreementProtocol.CharterRevision.AbpBinding.t()],
  attribution_declaration:
    CharterAgreementProtocol.CharterRevision.AttributionDeclaration.t(),
  canonical_bytes: binary(),
  charter_id: nil | binary(),
  effective_from: CharterAgreementProtocol.Timestamp.t(),
  effective_until: nil | CharterAgreementProtocol.Timestamp.t(),
  extension_outcome: CharterAgreementProtocol.Extension.Outcome.t(),
  extensions: CharterAgreementProtocol.Json.value(),
  legal_text: CharterAgreementProtocol.CharterRevision.LegalText.t(),
  parties: [CharterAgreementProtocol.CharterRevision.Party.t()],
  precedence_declaration: precedence(),
  prev_revision_digest: nil | binary(),
  protocol_revision: 1 | 2,
  receipt_profile: binary(),
  revision_number: pos_integer(),
  supersedes: [binary()],
  termination_rules:
    CharterAgreementProtocol.CharterRevision.TerminationRules.t()
}

Functions

decode(bytes, limits)

@spec decode(term(), CharterAgreementProtocol.Limits.t()) ::
  {:ok, t()} | {:error, CharterAgreementProtocol.Error.t()}

Decode and validate one canonical unsigned Charter Revision.

digest(charter_revision)

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

Return the revision's domain-separated content digest.