pub struct DelegationWatch { /* private fields */ }Expand description
Waits for the delegator of a local delegated identifier to approve its
event at sn, by following the delegator’s KEL through the delegator’s
witnesses (keripy: app/delegating.py Anchorer.processUnanchoredEscrow, but
without the delegator or delegate writing the seal for the other).
Implementations§
Source§impl DelegationWatch
impl DelegationWatch
Sourcepub fn new(hby: &Habery, delegate: &str, sn: u64) -> Result<Self, WatchError>
pub fn new(hby: &Habery, delegate: &str, sn: u64) -> Result<Self, WatchError>
Watch for approval of delegate‘s event at sn. The delegator and
its witnesses come from hby: the delegator’s KEL and its witnesses’
OOBIs must have been resolved.
Sourcepub fn with_sources(
delegate: &str,
sn: u64,
delpre: &str,
sources: Vec<Source>,
) -> Self
pub fn with_sources( delegate: &str, sn: u64, delpre: &str, sources: Vec<Source>, ) -> Self
Watch with an explicit list of the delegator’s witnesses.
pub fn delegate(&self) -> &str
pub fn delpre(&self) -> &str
pub fn sn(&self) -> u64
Sourcepub fn check(&self, hby: &mut Habery) -> Result<Outcome, WatchError>
pub fn check(&self, hby: &mut Habery) -> Result<Outcome, WatchError>
Check hby as it stands, without fetching anything.
Sourcepub fn next_request(&mut self, hby: &Habery) -> Result<Request, WatchError>
pub fn next_request(&mut self, hby: &Habery) -> Result<Request, WatchError>
The next fetch: the delegator’s KEL from one of its witnesses, taking
them in turn so one unreachable witness doesn’t stall the watch. The
witness list is refreshed from hby first, since the delegator may
have rotated witnesses.
Trait Implementations§
Source§impl Clone for DelegationWatch
impl Clone for DelegationWatch
Source§fn clone(&self) -> DelegationWatch
fn clone(&self) -> DelegationWatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more