pub fn validate<V: UcanVerifier + ?Sized>(
ucan: &Ucan,
verifier: &V,
now: u64,
) -> Result<(), ChainError>Expand description
The full fail-closed validation a compiler front-end runs before lowering a
UCAN into a ceiling: (1) structure, (2) signatures, (3) delegation chain +
attenuation + temporal validity at now, in that order. Returns Ok(())
only if every link is structurally sound, correctly signed under the hybrid
policy, properly linked, strictly attenuating, within its delegator’s window,
AND live at now (not expired, not future-dated), with the chain no deeper
than MAX_PROOF_DEPTH.
now is the single trusted current time (unix seconds) the caller supplies;
it is threaded unchanged to every link. The caller is responsible for sourcing
a trustworthy clock — the validator never reads “now” from the token.
This is the single entry point S5’s compiler calls; it guarantees that only a genuine, currently-live ceiling reaches the (deferred) bundle-emission stage.