pub struct NotarizationEnvelope {
pub aph_version: String,
pub context: Vec<String>,
pub type: Vec<String>,
pub id: String,
pub issuer: String,
pub valid_from: String,
pub valid_until: String,
pub credential_subject: CredentialSubject,
pub linked_mandate: Option<LinkedMandate>,
pub credential_status: Option<CredentialStatusEntry>,
pub proof: EnvelopeProofs,
}Expand description
Top-level APH envelope. JSON-LD compatible W3C VC 2.0 credential.
Fields§
§aph_version: StringAPH version pin ("0.1").
context: Vec<String>JSON-LD @context array. Always begins with W3C VC 2.0 context.
type: Vec<String>JSON-LD type array; MUST include "VerifiableCredential" and
"AgentSendAuthorizationCredential".
id: Stringurn:uuid:... envelope identifier.
issuer: StringDID of the notary service.
valid_from: StringRFC 3339 issuance timestamp.
valid_until: StringRFC 3339 expiry timestamp.
credential_subject: CredentialSubjectInner credential subject (the notarized claim).
linked_mandate: Option<LinkedMandate>Optional link to an AP2 IntentMandate (for cross-protocol mandates).
credential_status: Option<CredentialStatusEntry>Revocation status reference for the parent Delegation Mandate named
by credentialSubject.policy.delegationMandateId — NOT for this
envelope (spec §6.3.3.1 narrows the W3C reading, and
crate::credential_status carries the argument).
skip_serializing_if is load-bearing, not tidiness. Unlike
linked_mandate directly above — which §7.1.1 permits to appear as an
explicit null — this field is OMITTED when absent, so an envelope
carrying no status reference is BYTE-IDENTICAL to one written before
the field existed. That identity is what keeps every published example,
every golden fixture and all four real Ed25519 signatures valid without
regeneration: the signing base is this struct serialized and
canonicalized (crate::crypto::proof_base::signing_base), so a bare
#[serde(default)] here would emit "credentialStatus":null, change
those bytes, and invalidate every signature over them.
proof: EnvelopeProofsCryptographic proof: a single notary proof, or a two-element proof
chain (spec §7.1.11). See EnvelopeProofs.