pub struct Mandate {Show 14 fields
pub grant_id: String,
pub grantor: String,
pub issuer_sig: Option<String>,
pub objective_hash: Option<String>,
pub scope: Vec<String>,
pub audience: String,
pub parent_request_id: Option<String>,
pub delegation_depth: u32,
pub issued_at: String,
pub expiry: String,
pub max_delegation: u32,
pub revocation: Revocation,
pub grantee: Option<String>,
pub chain: Vec<Grant>,
}Expand description
The per-hop authorization an action was exercised under.
Fields§
§grant_id: StringId of the capability grant this hop was minted from.
grantor: StringWho issued the grant (parent hop / operator). Ed25519 pubkey,
base64url-no-pad, so a verifier can check issuer_sig offline.
issuer_sig: Option<String>Grantor’s signature over the grant’s canonical bytes (see Grant).
Optional in the receipt because a verifier may resolve the grant (and
its signature) out of band by grant_id; when present it lets the
grant chain be walked fully offline.
objective_hash: Option<String>Hash of the declared task/intent this hop serves.
scope: Vec<String>Allowed action set. Each entry is an exact label (payments.charge)
or a family glob (payments.*). An empty scope authorizes nothing.
audience: StringWho this grant is FOR. Prevents cross-audience replay (a grant minted for audience A cannot authorize an action against audience B).
parent_request_id: Option<String>The delegation edge this hop descends from.
delegation_depth: u32Hops from the root grant. Caps re-delegation together with
max_delegation.
issued_at: StringRFC 3339 instant the grant became valid.
expiry: StringRFC 3339 instant the grant expires (exclusive upper bound).
max_delegation: u32Deepest this grant may be re-minted.
revocation: RevocationRevocation source + (optional) revoked-at timestamp.
grantee: Option<String>Base64url-no-pad Ed25519 public key the grant was issued to, mirrored
from Grant::grantee so a verifier can check the receipt’s signer
against it without resolving the chain.
None means the grant was bearer. A verifier must report that rather
than pass silently: a valid signature proves who signed the receipt and
who issued the grant, never that the two are related.
chain: Vec<Grant>Ancestors of this grant, root-first, each carrying its own
issuer_sig. Optional and skipped when empty so existing v2 receipts
keep byte-identical canonical bytes.
Carried inline rather than fetched: issuer_sig already exists so one
receipt can be checked offline, and that promise breaks the moment
verifying a delegated action requires N network round-trips. The
carrier’s ordering is not trusted – see resolve_grant_chain.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mandate
impl<'de> Deserialize<'de> for Mandate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Mandate
impl StructuralPartialEq for Mandate
Auto Trait Implementations§
impl Freeze for Mandate
impl RefUnwindSafe for Mandate
impl Send for Mandate
impl Sync for Mandate
impl Unpin for Mandate
impl UnsafeUnpin for Mandate
impl UnwindSafe for Mandate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.