pub struct ReputationRebind {
pub id: EventId,
pub bound_identity: PublicKey,
pub new_identity: PublicKey,
pub issuer: PublicKey,
pub created_at: u64,
pub expiration: u64,
}Expand description
A parsed, verified rebind authorisation: the identity a source account is bound to at an issuer consents to moving the binding to a new identity.
Fields§
§id: EventIdEvent id.
bound_identity: PublicKeyThe identity that signed it, which must be the one currently bound.
new_identity: PublicKeyThe identity the binding moves to (p).
issuer: PublicKeyThe issuer key it is valid at (issuer).
created_at: u64When it was signed.
expiration: u64When it stops being valid.
Implementations§
Source§impl ReputationRebind
impl ReputationRebind
Sourcepub fn build(
bound_identity: &Keys,
issuer: &PublicKey,
new_identity: &PublicKey,
created_at: Timestamp,
lifetime: u64,
) -> Result<Event, AttestationError>
pub fn build( bound_identity: &Keys, issuer: &PublicKey, new_identity: &PublicKey, created_at: Timestamp, lifetime: u64, ) -> Result<Event, AttestationError>
Sign a rebind authorisation with the currently bound identity.
lifetime is at most REBIND_MAX_LIFETIME_SECS.
Sourcepub fn parse(event: &Event, now: Timestamp) -> Result<Self, AttestationError>
pub fn parse(event: &Event, now: Timestamp) -> Result<Self, AttestationError>
Parse and verify a rebind authorisation.
Whether the signer is the identity actually bound, whether issuer
is the receiver’s own issuer key, and whether p is the destination
of the export request it travels in, is the caller’s to check.
Sourcepub fn parse_json(json: &str, now: Timestamp) -> Result<Self, AttestationError>
pub fn parse_json(json: &str, now: Timestamp) -> Result<Self, AttestationError>
ReputationRebind::parse on a JSON serialisation.
Trait Implementations§
Source§impl Clone for ReputationRebind
impl Clone for ReputationRebind
Source§impl Debug for ReputationRebind
impl Debug for ReputationRebind
impl Eq for ReputationRebind
Source§impl PartialEq for ReputationRebind
impl PartialEq for ReputationRebind
impl StructuralPartialEq for ReputationRebind
Auto Trait Implementations§
impl Freeze for ReputationRebind
impl RefUnwindSafe for ReputationRebind
impl Send for ReputationRebind
impl Sync for ReputationRebind
impl Unpin for ReputationRebind
impl UnsafeUnpin for ReputationRebind
impl UnwindSafe for ReputationRebind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more