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§
Source§impl RevocationKey
impl RevocationKey
Sourcepub fn from_basepoint<T: Verification>(
secp_ctx: &Secp256k1<T>,
countersignatory_basepoint: &RevocationBasepoint,
per_commitment_point: &PublicKey,
) -> Self
pub fn from_basepoint<T: Verification>( secp_ctx: &Secp256k1<T>, countersignatory_basepoint: &RevocationBasepoint, per_commitment_point: &PublicKey, ) -> Self
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).
Sourcepub fn to_public_key(&self) -> PublicKey
pub fn to_public_key(&self) -> PublicKey
Get inner Public Key
Trait Implementations§
Source§impl Clone for RevocationKey
impl Clone for RevocationKey
Source§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