pub struct VerificationReport {
pub status: VerificationStatus,
pub chain: Vec<ChainLink>,
pub warnings: Vec<String>,
pub witness_quorum: Option<WitnessQuorum>,
pub anchored: Option<AnchorStatus>,
pub duplicity_warning: Option<DuplicityReport>,
pub freshness: Freshness,
pub as_of: Option<u128>,
}Expand description
Machine-readable verification result containing status, chain details, and warnings.
Fields§
§status: VerificationStatusThe overall verification status
chain: Vec<ChainLink>Details of each link in the verification chain
warnings: Vec<String>Non-fatal warnings encountered during verification
witness_quorum: Option<WitnessQuorum>Optional witness quorum result (present when witness verification was performed)
anchored: Option<AnchorStatus>Whether the attestation is anchored in a verifiable log: the issuer’s KEL via an ixn seal, or a transparency log via an offline inclusion proof verified under a pinned log key.
duplicity_warning: Option<DuplicityReport>Structured duplicity warning from the shared-KEL detector.
Fail-closed: a Some(Diverging { … }) warning makes VerificationReport::is_valid
return false even though status still records that the attestation signature
verified — a forked KEL is not trustworthy. The structured warning also lets
CLI / iOS / CI render a banner and point the user at auths device remove to resolve.
None indicates no divergence was observed (or no shared-KEL
replay was performed).
freshness: FreshnessHow fresh this verdict is under the verifier’s freshness model (ADR 009). The chain
verifier reads no clock and no network, so an offline verify (no fresher source supplied)
names Freshness::Unknown — the report is never a bare Valid that reads as real-time
fresh. A caller that has a fresher source upgrades it via VerificationReport::with_freshness.
#[serde(default)] resolves a missing field to Unknown so pre-field JSON still loads.
as_of: Option<u128>The KEL position this verdict was verified as-of (ADR 009, the {as_of, freshness} pair):
the issuer-KEL tip (seq) the chain was checked against, when the caller supplies one.
The pure chain verifier reads no KEL tip, so it leaves this None (“position unknown”) —
honest, never fabricated; a caller holding the slice position stamps it via
VerificationReport::with_as_of. #[serde(default)] keeps pre-field JSON loadable.
Implementations§
Source§impl VerificationReport
impl VerificationReport
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns true only when the signature status is Valid and no duplicity warning is
present. Fail-closed: a valid signature on a KEL that has forked (Some(Diverging)) is not
trustworthy, so the trust decision refuses even though status records the signature as valid.
Sourcepub fn valid(chain: Vec<ChainLink>) -> Self
pub fn valid(chain: Vec<ChainLink>) -> Self
Creates a new valid VerificationReport with the given chain.
Freshness defaults to Freshness::Unknown: the chain verifier consults no fresher
source, so an offline verify is honestly unconfirmable, never silently fresh. A caller
holding a fresher source upgrades it with VerificationReport::with_freshness.
Sourcepub fn with_status(status: VerificationStatus, chain: Vec<ChainLink>) -> Self
pub fn with_status(status: VerificationStatus, chain: Vec<ChainLink>) -> Self
Creates a new VerificationReport with the given status and chain.
Freshness defaults to Freshness::Unknown (offline, unconfirmable) — see
VerificationReport::valid.
Sourcepub fn with_duplicity_warning(self, warning: DuplicityReport) -> Self
pub fn with_duplicity_warning(self, warning: DuplicityReport) -> Self
Attach a duplicity warning to this report. Leaves status (the signature verdict)
unchanged, but makes VerificationReport::is_valid fail closed — a diverging shared
KEL is not trustworthy even when the per-attestation signature verified.
Sourcepub fn freshness(&self) -> Freshness
pub fn freshness(&self) -> Freshness
The freshness this report names (ADR 009). An offline verify is Freshness::Unknown;
a report built with a fresher source carries its classified grade.
Sourcepub fn with_freshness(self, freshness: Freshness) -> Self
pub fn with_freshness(self, freshness: Freshness) -> Self
Re-stamp this report’s freshness from a fresher-source classification.
The chain verifier itself reads no clock/network, so it always emits Unknown. A caller
that holds a fresher source (a witness head, a transparency-log tip) classifies it through
crate::freshness::FreshnessPolicy and stamps the grade here, so the surfaced verdict
stays honest about what was confirmed.
Args:
freshness: the classified freshness of this otherwise-valid report.
Sourcepub fn as_of(&self) -> Option<u128>
pub fn as_of(&self) -> Option<u128>
The KEL position this report was verified as-of (ADR 009), or None when the pure chain
verifier was given no slice position to report.
Sourcepub fn with_as_of(self, as_of: u128) -> Self
pub fn with_as_of(self, as_of: u128) -> Self
Stamp the issuer-KEL slice position this report was verified as-of. Pairs with
VerificationReport::with_freshness: a caller holding the verified slice records both
how current (as_of) and how fresh (freshness) the otherwise-valid report is.
Args:
as_of: the issuer-KEL tip(seq)the chain was verified against.
Trait Implementations§
Source§impl Clone for VerificationReport
impl Clone for VerificationReport
Source§fn clone(&self) -> VerificationReport
fn clone(&self) -> VerificationReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more