pub struct KeyBinding {
pub chain_key: Address,
pub packet_key: OffchainPublicKey,
pub signature: OffchainSignature,
}
Expand description
Holds the signed binding of the chain key and the packet key.
The signature is done via the offchain key to bind it with the on-chain key. The structure then makes it on-chain, making it effectively cross-signed with both keys (offchain and onchain). This is used to attest on-chain that node owns the corresponding packet key and links it with the chain key.
Fields§
§chain_key: Address
§packet_key: OffchainPublicKey
§signature: OffchainSignature
Implementations§
Source§impl KeyBinding
impl KeyBinding
Source§impl KeyBinding
impl KeyBinding
Sourcepub fn from_parts(
chain_key: Address,
packet_key: OffchainPublicKey,
signature: OffchainSignature,
) -> Result<Self>
pub fn from_parts( chain_key: Address, packet_key: OffchainPublicKey, signature: OffchainSignature, ) -> Result<Self>
Re-construct binding from the chain key and packet key, while also verifying the given signature of the binding. Fails if the signature is not valid for the given entries.
Trait Implementations§
Source§impl Clone for KeyBinding
impl Clone for KeyBinding
Source§fn clone(&self) -> KeyBinding
fn clone(&self) -> KeyBinding
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for KeyBinding
impl Debug for KeyBinding
Source§impl Display for KeyBinding
impl Display for KeyBinding
Source§impl PartialEq for KeyBinding
impl PartialEq for KeyBinding
impl StructuralPartialEq for KeyBinding
Auto Trait Implementations§
impl Freeze for KeyBinding
impl RefUnwindSafe for KeyBinding
impl Send for KeyBinding
impl Sync for KeyBinding
impl Unpin for KeyBinding
impl UnwindSafe for KeyBinding
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.