Struct RevocationKey
pub struct RevocationKey(pub PublicKey);
Expand description
The revocation key is used to allow a channel party to revoke their state - giving their counterparty the required material to claim all of their funds if they broadcast that state.
Each commitment transaction has a revocation key based on the basepoint and per_commitment_point which is used in both commitment and HTLC transactions.
See [the BOLT spec for derivation details] https://github.com/lightning/bolts/blob/master/03-transactions.md#revocationpubkey-derivation
Tuple Fields§
§0: PublicKey
Implementations§
§impl RevocationKey
impl RevocationKey
pub fn from_basepoint<T>(
secp_ctx: &Secp256k1<T>,
countersignatory_basepoint: &RevocationBasepoint,
per_commitment_point: &PublicKey,
) -> RevocationKeywhere
T: Verification,
pub fn from_basepoint<T>(
secp_ctx: &Secp256k1<T>,
countersignatory_basepoint: &RevocationBasepoint,
per_commitment_point: &PublicKey,
) -> RevocationKeywhere
T: Verification,
Derives a per-commitment-transaction revocation public key from one party’s per-commitment
point and the other party’s RevocationBasepoint
. This is the public equivalent of
chan_utils::derive_private_revocation_key
- using only public keys to derive a public
key instead of private keys.
Note that this is infallible iff we trust that at least one of the two input keys are randomly generated (ie our own).
pub fn to_public_key(&self) -> PublicKey
pub fn to_public_key(&self) -> PublicKey
Get inner Public Key
Trait Implementations§
§impl Clone for RevocationKey
impl Clone for RevocationKey
§fn clone(&self) -> RevocationKey
fn clone(&self) -> RevocationKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for RevocationKey
impl Debug for RevocationKey
§impl Hash for RevocationKey
impl Hash for RevocationKey
§impl PartialEq for RevocationKey
impl PartialEq for RevocationKey
§impl Readable for RevocationKey
impl Readable for RevocationKey
§fn read<R>(r: &mut R) -> Result<RevocationKey, DecodeError>where
R: Read,
fn read<R>(r: &mut R) -> Result<RevocationKey, DecodeError>where
R: Read,
Self
in from the given Read
.§impl Writeable for RevocationKey
impl Writeable for RevocationKey
impl Copy for RevocationKey
impl Eq for RevocationKey
impl StructuralPartialEq for RevocationKey
Auto Trait Implementations§
impl Freeze for RevocationKey
impl RefUnwindSafe for RevocationKey
impl Send for RevocationKey
impl Sync for RevocationKey
impl Unpin for RevocationKey
impl UnwindSafe for RevocationKey
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request