Struct DelayedPaymentKey
pub struct DelayedPaymentKey(pub PublicKey);
Expand description
A derived key built from a DelayedPaymentBasepoint
and per_commitment_point
.
The delayed payment key is used to pay the commitment state broadcaster their non-HTLC-encumbered funds after a delay. This delay gives their counterparty a chance to punish and claim all the channel funds if the state broadcasted was previously revoked.
[See the BOLT specs] https://github.com/lightning/bolts/blob/master/03-transactions.md#localpubkey-local_htlcpubkey-remote_htlcpubkey-local_delayedpubkey-and-remote_delayedpubkey-derivation for more information on key derivation details.
Tuple Fields§
§0: PublicKey
Implementations§
§impl DelayedPaymentKey
impl DelayedPaymentKey
pub fn from_basepoint<T>(
secp_ctx: &Secp256k1<T>,
countersignatory_basepoint: &DelayedPaymentBasepoint,
per_commitment_point: &PublicKey,
) -> DelayedPaymentKeywhere
T: Signing,
pub fn from_basepoint<T>(
secp_ctx: &Secp256k1<T>,
countersignatory_basepoint: &DelayedPaymentBasepoint,
per_commitment_point: &PublicKey,
) -> DelayedPaymentKeywhere
T: Signing,
Derive a public delayedpubkey using one node’s per_commitment_point
and its countersignatory’s basepoint
pub fn from_secret_key<T>(
secp_ctx: &Secp256k1<T>,
sk: &SecretKey,
) -> DelayedPaymentKeywhere
T: Signing,
pub fn from_secret_key<T>(
secp_ctx: &Secp256k1<T>,
sk: &SecretKey,
) -> DelayedPaymentKeywhere
T: Signing,
Build a delayedpubkey directly from an already-derived private key
pub fn to_public_key(&self) -> PublicKey
pub fn to_public_key(&self) -> PublicKey
Get inner Public Key
Trait Implementations§
§impl Clone for DelayedPaymentKey
impl Clone for DelayedPaymentKey
§fn clone(&self) -> DelayedPaymentKey
fn clone(&self) -> DelayedPaymentKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for DelayedPaymentKey
impl Debug for DelayedPaymentKey
§impl PartialEq for DelayedPaymentKey
impl PartialEq for DelayedPaymentKey
§impl Readable for DelayedPaymentKey
impl Readable for DelayedPaymentKey
§fn read<R>(r: &mut R) -> Result<DelayedPaymentKey, DecodeError>where
R: Read,
fn read<R>(r: &mut R) -> Result<DelayedPaymentKey, DecodeError>where
R: Read,
Self
in from the given Read
.§impl Writeable for DelayedPaymentKey
impl Writeable for DelayedPaymentKey
impl Copy for DelayedPaymentKey
impl Eq for DelayedPaymentKey
impl StructuralPartialEq for DelayedPaymentKey
Auto Trait Implementations§
impl Freeze for DelayedPaymentKey
impl RefUnwindSafe for DelayedPaymentKey
impl Send for DelayedPaymentKey
impl Sync for DelayedPaymentKey
impl Unpin for DelayedPaymentKey
impl UnwindSafe for DelayedPaymentKey
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