CAP never authorizes.
Charter Agreement Protocol.
The implemented foundation provides strict base64url, bounded deterministic JSON decoding, RFC 8785 canonicalization, domain-separated tagged digests, typed value-free errors, table-driven artifact validation, and a drift-resistant conformance-corpus loader. Artifact-specific verification surfaces land on top of this foundation.
Summary
Functions
Build an Acceptance signing input after honest-signer set checks.
Assemble a validated signing input and exact raw 64-byte signature.
Build a typed set of charter artifacts without verifying them.
Decode one canonical unsigned Charter Revision.
Decode one canonical attached Party Descriptor.
Return one decoded Party Descriptor's content digest.
Build a canonical Party Descriptor signing input without signing.
Compute the unique governing revision in a verified view at one UTC instant.
Build a canonical Receipt signing input without signing.
Return one decoded Charter Revision's content digest.
Build a Termination signing input after honest-signer set checks.
Verify one Acceptance against exact revision and descriptor-chain facts.
Verify a complete caller-supplied charter artifact view.
Verify one Party Descriptor at genesis or against a verified predecessor.
Verify a complete in-view descriptor chain and retain fork evidence.
Verify one receipt against revision-only or full-chain context.
Verify one termination notice against exact revision and descriptor-chain facts.
Functions
@spec acceptance_signing_input(term(), CharterAgreementProtocol.ArtifactSet.t()) :: {:ok, CharterAgreementProtocol.SigningInput.t()} | {:error, CharterAgreementProtocol.Error.t()}
Build an Acceptance signing input after honest-signer set checks.
@spec assemble_compact(term(), term()) :: {:ok, binary()} | {:error, CharterAgreementProtocol.Error.t()}
Assemble a validated signing input and exact raw 64-byte signature.
@spec build_set(term(), term(), term(), term()) :: {:ok, CharterAgreementProtocol.ArtifactSet.t()} | {:error, CharterAgreementProtocol.Error.t()}
Build a typed set of charter artifacts without verifying them.
@spec decode_charter_revision(term(), CharterAgreementProtocol.Limits.t()) :: {:ok, CharterAgreementProtocol.CharterRevision.t()} | {:error, CharterAgreementProtocol.Error.t()}
Decode one canonical unsigned Charter Revision.
@spec decode_party_descriptor(term(), CharterAgreementProtocol.Limits.t()) :: {:ok, CharterAgreementProtocol.PartyDescriptor.t()} | {:error, CharterAgreementProtocol.Error.t()}
Decode one canonical attached Party Descriptor.
@spec descriptor_digest(CharterAgreementProtocol.PartyDescriptor.t()) :: binary()
Return one decoded Party Descriptor's content digest.
@spec descriptor_signing_input(term()) :: {:ok, CharterAgreementProtocol.SigningInput.t()} | {:error, CharterAgreementProtocol.Error.t()}
Build a canonical Party Descriptor signing input without signing.
@spec governing_revision(term(), term()) :: {:ok, binary() | :contested | :none} | {:error, CharterAgreementProtocol.Error.t()}
Compute the unique governing revision in a verified view at one UTC instant.
@spec receipt_signing_input(term()) :: {:ok, CharterAgreementProtocol.SigningInput.t()} | {:error, CharterAgreementProtocol.Error.t()}
Build a canonical Receipt signing input without signing.
@spec revision_digest(CharterAgreementProtocol.CharterRevision.t()) :: binary()
Return one decoded Charter Revision's content digest.
@spec termination_signing_input(term(), CharterAgreementProtocol.ArtifactSet.t()) :: {:ok, CharterAgreementProtocol.SigningInput.t()} | {:error, CharterAgreementProtocol.Error.t()}
Build a Termination signing input after honest-signer set checks.
@spec verify_acceptance( term(), CharterAgreementProtocol.CharterRevision.t(), CharterAgreementProtocol.DescriptorChain.t(), CharterAgreementProtocol.Limits.t() ) :: {:ok, CharterAgreementProtocol.AcceptanceFacts.t()} | {:error, CharterAgreementProtocol.Error.t()}
Verify one Acceptance against exact revision and descriptor-chain facts.
@spec verify_chain( term(), term(), term(), term(), CharterAgreementProtocol.Limits.t() ) :: {:ok, CharterAgreementProtocol.ChainFacts.t()} | {:error, CharterAgreementProtocol.Error.t()}
Verify a complete caller-supplied charter artifact view.
@spec verify_descriptor( term(), nil | CharterAgreementProtocol.DescriptorFacts.t(), CharterAgreementProtocol.Limits.t() ) :: {:ok, CharterAgreementProtocol.DescriptorFacts.t()} | {:error, CharterAgreementProtocol.Error.t()}
Verify one Party Descriptor at genesis or against a verified predecessor.
@spec verify_descriptor_chain(term(), CharterAgreementProtocol.Limits.t()) :: {:ok, CharterAgreementProtocol.DescriptorChain.t()} | {:error, CharterAgreementProtocol.Error.t()}
Verify a complete in-view descriptor chain and retain fork evidence.
@spec verify_receipt( term(), CharterAgreementProtocol.ChainFacts.t() | CharterAgreementProtocol.CharterRevision.t(), CharterAgreementProtocol.Limits.t() ) :: {:ok, CharterAgreementProtocol.ReceiptFacts.t()} | {:error, CharterAgreementProtocol.Error.t()}
Verify one receipt against revision-only or full-chain context.
@spec verify_termination( term(), CharterAgreementProtocol.CharterRevision.t(), CharterAgreementProtocol.DescriptorChain.t(), CharterAgreementProtocol.Limits.t() ) :: {:ok, CharterAgreementProtocol.TerminationFacts.t()} | {:error, CharterAgreementProtocol.Error.t()}
Verify one termination notice against exact revision and descriptor-chain facts.