pub struct GitKelContinuityChecker<'a> { /* private fields */ }Expand description
KEL-based rotation continuity checker backed by a Git repository.
This implementation verifies that there is a valid, unbroken event chain from a pinned KEL tip to the current state, enabling trust to be maintained across key rotations.
§Example
ⓘ
use git2::Repository;
use auths_id::trust::GitKelContinuityChecker;
use auths_core::trust::KelContinuityChecker;
let repo = Repository::open("~/.auths")?;
let checker = GitKelContinuityChecker::new(&repo);
let proof = checker.verify_rotation_continuity(
"did:keri:EPrefix...",
"EOldTipSaid",
&presented_public_key,
)?;Implementations§
Source§impl<'a> GitKelContinuityChecker<'a>
impl<'a> GitKelContinuityChecker<'a>
Sourcepub fn new(repo: &'a Repository) -> Self
pub fn new(repo: &'a Repository) -> Self
Create a new continuity checker for the given repository.
Trait Implementations§
Source§impl KelContinuityChecker for GitKelContinuityChecker<'_>
impl KelContinuityChecker for GitKelContinuityChecker<'_>
Source§fn verify_rotation_continuity(
&self,
did: &str,
pinned_tip_said: &str,
presented_pk: &[u8],
) -> Result<Option<RotationProof>, TrustError>
fn verify_rotation_continuity( &self, did: &str, pinned_tip_said: &str, presented_pk: &[u8], ) -> Result<Option<RotationProof>, TrustError>
Verify that there is a valid, unbroken event chain from
pinned_tip_said
to a state whose current key matches presented_pk. Read moreAuto Trait Implementations§
impl<'a> Freeze for GitKelContinuityChecker<'a>
impl<'a> RefUnwindSafe for GitKelContinuityChecker<'a>
impl<'a> !Send for GitKelContinuityChecker<'a>
impl<'a> !Sync for GitKelContinuityChecker<'a>
impl<'a> Unpin for GitKelContinuityChecker<'a>
impl<'a> UnsafeUnpin for GitKelContinuityChecker<'a>
impl<'a> UnwindSafe for GitKelContinuityChecker<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more