pub trait At9pCapsuleResolver: Send + Sync {
// Provided methods
fn verify_bytes(
&self,
did: &str,
capsule_bytes: &[u8],
) -> Result<VerifiedAt9pKeys> { ... }
fn resolve(&self, did: &str) -> Result<VerifiedAt9pKeys> { ... }
}Expand description
Verifies a did:at9p capsule and yields its content-verified subject keys.
The A4 GATE pipeline (canon-gate → hash-gate(H512 == cid512) → sig-gate,
#884) lives in hyprstream-pds beside the capsule schema. The lower
hyprstream-rpc crate — which both the admission gate (crate::admission) and
this resolver belong to — cannot depend on pds, so the GATE is abstracted
behind this object-safe trait and implemented in pds over
hyprstream_pds::at9p_gate::verify_did_at9p.
Two entry points, each fail-closed on any GATE failure (never a default-Ok):
verify_bytes— the admission path: the peer presented its capsule bytes over the channel; the GATE decides whether to accept them. Used byadmit_key_against_did’sdid:at9parm to bind the verified hybrid keys into thecrate::envelope::KeyedPqTrustStore(#894).resolve— the resolver path: fetch the capsule bytes fordidfrom the (untrusted) mainline locator (#890, Track C) and GATE-verify them. Used by this module’sdid:at9parm to derivePqHybridassurance.
The default impls return Err so a configuration that supplies only one path
(admission today; the locator is not wired) leaves the other fail-closed rather
than silently degrading.
Provided Methods§
Sourcefn verify_bytes(
&self,
did: &str,
capsule_bytes: &[u8],
) -> Result<VerifiedAt9pKeys>
fn verify_bytes( &self, did: &str, capsule_bytes: &[u8], ) -> Result<VerifiedAt9pKeys>
GATE-verify capsule_bytes the peer presented for did:at9p:<cid512>
(admission path). Pure over the bytes — no fetch, no I/O.
Sourcefn resolve(&self, did: &str) -> Result<VerifiedAt9pKeys>
fn resolve(&self, did: &str) -> Result<VerifiedAt9pKeys>
Fetch the capsule for did from the untrusted locator and GATE-verify it
(resolver path). The locator itself is Track C (#890); until it is wired an
honest implementation returns Err.