Portable, decidable boundary of delegated authority.
A mandate states who may propose, which executors and executor contracts may carry an admitted Act, what may be touched, and for which closed purpose, Evidence, time, resource, delegation and revocation constraints. Possessing a mandate reference is not an execution capability.
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 mandate.
Restores a mandate from its canonical map.
Materializes an exact canonical issue draft under the Act that authorized it.
Builds the canonical, validated body frozen by a mandate-issuance Candidate.
Builds and validates a mandate.
Returns whether the mandate has no parent mandate.
Types
@type delegation_policy() :: %{required(String.t()) => boolean() | non_neg_integer()}
@type revocation_mode() :: :cascade | :retained_controller
@type revocation_policy() :: %{ required(String.t()) => revocation_mode() | [String.t()] }
@type t() :: %Spectre.GAM.Mandate{ accountable_ref: String.t(), ceiling: Spectre.GAM.Row.t(), classes: [String.t()], conditions: [Spectre.GAM.Condition.t()], delegation: delegation_policy(), disclosable_labels: [Spectre.GAM.Label.t()], executor_contract_refs: [String.t()], executor_refs: [String.t()], expires_at: integer(), grantor_ref: String.t(), holder_ref: String.t(), meters: %{optional(String.t()) => non_neg_integer()}, not_before: integer(), parent_ref: String.t() | nil, purpose_params: map(), purpose_ref: String.t(), ref: String.t(), revision: pos_integer(), revocation: revocation_policy(), schema_version: 1, scope_refs: [String.t()], source_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 mandate.
Restores a mandate from its canonical map.
Materializes an exact canonical issue draft under the Act that authorized it.
Builds the canonical, validated body frozen by a mandate-issuance Candidate.
Builds and validates a mandate.
Returns whether the mandate has no parent mandate.