pub struct TrustLists { /* private fields */ }Expand description
The consumer’s trust-list state: pins, held versions, floors.
Implementations§
Source§impl TrustLists
impl TrustLists
Sourcepub fn refuse_unknown_issuer_revocation(self, refuse: bool) -> Self
pub fn refuse_unknown_issuer_revocation(self, refuse: bool) -> Self
Local policy: also refuse, in Self::add_verified, a list whose
issuer-key revocation status is unknown (an Unknown verdict, or no
complete RFC-ACDP-0014 discovery). RFC-ACDP-0020 §5.2 step 5 refuses only
on an applied revocation and allows this as local policy.
Sourcepub fn with_floors(self, floors: BTreeMap<Series, u64>) -> Self
pub fn with_floors(self, floors: BTreeMap<Series, u64>) -> Self
Restore the floors persisted by an earlier run (§5.3).
Sourcepub fn floors(&self) -> &BTreeMap<Series, u64>
pub fn floors(&self) -> &BTreeMap<Series, u64>
The floors to persist (§5.3): per pin, the highest serial among the valid versions held, retracted ones included. Never decreases.
Sourcepub async fn add_verified(
&mut self,
list: &VerifiedContext,
resolver: &WebResolver,
) -> Result<usize, ListRejected>
pub async fn add_verified( &mut self, list: &VerifiedContext, resolver: &WebResolver, ) -> Result<usize, ListRejected>
Hold a list version retrieved and verified by
VerifiedContext::fetch (§5.2 step 1, with RFC-ACDP-0014
revocation per the fetch policy).
Retractions (§5.3) are read from the retrieved
registry_state.lifecycle_events: only events whose actor is the
issuer and that verify under the issuer’s key count. A
registry-actor retraction never withdraws a list.
Sourcepub fn add_offline(
&mut self,
raw: &Value,
retractions: &[Value],
issuer_key_revoked: bool,
) -> Result<usize, ListRejected>
pub fn add_offline( &mut self, raw: &Value, retractions: &[Value], issuer_key_revoked: bool, ) -> Result<usize, ListRejected>
Hold a did:key-issued list carried out of band (§7): a retrieved
body or its signed publish-request form, with any issuer-signed
lifecycle events. issuer_key_revoked is the caller’s
RFC-ACDP-0014 §7 verdict for the issuer key.
Sourcepub fn select(&self, t: DateTime<Utc>) -> Vec<PinState>
pub fn select(&self, t: DateTime<Utc>) -> Vec<PinState>
§5.4 latest-pass state of every pin at t, against the floors.
Sourcepub fn evaluate(
&self,
body: &VerifiedContext,
t: DateTime<Utc>,
capabilities: Option<&[String]>,
) -> NodeTrust
pub fn evaluate( &self, body: &VerifiedContext, t: DateTime<Utc>, capabilities: Option<&[String]>, ) -> NodeTrust
§6.2 for one verified body at t. The receipt input is the
verified receipt’s registry key (never its key_fingerprint);
capabilities is C, the profiles the body’s registry advertises,
when the consumer fetched them.
Sourcepub fn report(
&self,
bodies: &[&VerifiedContext],
t: DateTime<Utc>,
capabilities: &BTreeMap<String, Vec<String>>,
) -> TrustReport
pub fn report( &self, bodies: &[&VerifiedContext], t: DateTime<Utc>, capabilities: &BTreeMap<String, Vec<String>>, ) -> TrustReport
The §8 latest-pass report over bodies at t. capabilities
maps a lowercase registry origin to its advertised profiles.