Portable proposal with no authority or execution capability.
A candidate contains every field that may materially affect classification,
mandate matching, consent or admission. identity_key provides idempotency:
the same key and material digest is the same proposal; the same key with a
different digest is a conflict for the kernel to reject.
consent is one closed, portable declaration of the exact material a person
must evaluate. Consent uses a separate pre-consent binding covering that
declaration and every other field knowable before presentation. Only verified
approval Evidence for that Presentation may be excluded to break the causal
cycle; all other Evidence remains bound. The final candidate digest still
covers the Presentation and every Evidence ref.
Summary
Functions
Returns the plain, string-keyed ledger representation.
Returns the content-derived reference, independent of an assigned ref.
Returns the stable digest of the complete candidate.
Restores a candidate from its canonical map and verifies its digest.
Returns exactly the fields bound by material_digest.
Builds and validates a candidate, computing its material digest and ref.
Returns the exact, acyclic candidate material bound by a Presentation.
Returns the content address of presentation_binding/2.
Fields a proposer may supply before the Turn binds proposer and Scope.
Types
@type t() :: %Spectre.GAM.Candidate{ accountable_ref: String.t(), class: String.t(), consent: Spectre.GAM.Consent.t() | nil, consequence: term(), disclosure: Spectre.GAM.Disclosure.t() | nil, evidence_refs: [String.t()], executor_contract_ref: String.t(), executor_ref: String.t(), identity_key: String.t(), material_digest: String.t(), meter_requests: %{optional(String.t()) => non_neg_integer()}, observation_window_ms: non_neg_integer(), presentation_ref: String.t() | nil, proposer_ref: String.t(), purpose_params: map(), purpose_ref: String.t(), ref: String.t(), requested_mandate_ref: String.t() | nil, row: Spectre.GAM.Row.t(), schema_version: 1, scope_ref: String.t(), subject_refs: [String.t()], target_refs: [String.t()] }
Functions
Returns the plain, string-keyed ledger representation.
Returns the content-derived reference, independent of an assigned ref.
Returns the stable digest of the complete candidate.
Restores a candidate from its canonical map and verifies its digest.
Returns exactly the fields bound by material_digest.
Builds and validates a candidate, computing its material digest and ref.
Returns the exact, acyclic candidate material bound by a Presentation.
Returns the content address of presentation_binding/2.
@spec request_fields() :: [atom()]
Fields a proposer may supply before the Turn binds proposer and Scope.