Struct lightning::chain::keysinterface::ChannelKeys
source · pub struct ChannelKeys {
pub funding_key: SecretKey,
pub revocation_base_key: SecretKey,
pub payment_base_key: SecretKey,
pub delayed_payment_base_key: SecretKey,
pub htlc_base_key: SecretKey,
pub commitment_seed: [u8; 32],
}
Expand description
Set of lightning keys needed to operate a channel as described in BOLT 3
Fields
funding_key: SecretKey
Private key of anchor tx
revocation_base_key: SecretKey
Local secret key for blinded revocation pubkey
payment_base_key: SecretKey
Local secret key used in commitment tx htlc outputs
delayed_payment_base_key: SecretKey
Local secret key used in HTLC tx
htlc_base_key: SecretKey
Local htlc secret key used in commitment tx htlc outputs
commitment_seed: [u8; 32]
Commitment seed
Implementations
sourceimpl ChannelKeys
impl ChannelKeys
sourcepub fn new_from_seed(seed: &[u8; 32]) -> ChannelKeys
pub fn new_from_seed(seed: &[u8; 32]) -> ChannelKeys
Generate a set of lightning keys needed to operate a channel by HKDF-expanding a given random 32-byte seed
Trait Implementations
sourceimpl Clone for ChannelKeys
impl Clone for ChannelKeys
sourcefn clone(&self) -> ChannelKeys
fn clone(&self) -> ChannelKeys
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<R: Read> Readable<R> for ChannelKeys
impl<R: Read> Readable<R> for ChannelKeys
sourcefn read(r: &mut R) -> Result<Self, DecodeError>
fn read(r: &mut R) -> Result<Self, DecodeError>
Reads a Self in from the given Read
Auto Trait Implementations
impl RefUnwindSafe for ChannelKeys
impl Send for ChannelKeys
impl Sync for ChannelKeys
impl Unpin for ChannelKeys
impl UnwindSafe for ChannelKeys
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more