pub struct LocalKeyset {
pub funding_pubkey: LocalPubkey,
pub revocation_basepoint: LocalPubkey,
pub payment_basepoint: LocalPubkey,
pub delayed_payment_basepoint: LocalPubkey,
pub htlc_basepoint: LocalPubkey,
pub first_per_commitment_point: LocalPubkey,
pub shutdown_scriptpubkey: Option<PubkeyScript>,
pub static_remotekey: bool,
}Expand description
Set of keys used by the core of the channel. It does not include HTLC
basepoint which is managed separately by super::Htlc extension.
Fields§
§funding_pubkey: LocalPubkeyPublic key used in the funding outpoint multisig
revocation_basepoint: LocalPubkeyBase point for deriving keys used for penalty spending paths
payment_basepoint: LocalPubkeyBase point for deriving keys in to_remote
delayed_payment_basepoint: LocalPubkeyBase point for deriving keys in to_local time-locked spending paths
htlc_basepoint: LocalPubkeyBase point for deriving HTLC-related keys
first_per_commitment_point: LocalPubkeyBase point for deriving keys used for penalty spending paths
shutdown_scriptpubkey: Option<PubkeyScript>Allows the sending node to commit to where funds will go on mutual close, which the remote node should enforce even if a node is compromised later.
static_remotekey: boolIf option_static_remotekey or option_anchors is negotiated, the
remotepubkey is simply the remote node’s payment_basepoint, otherwise
it is calculated as above using the remote node’s payment_basepoint.
Implementations§
Source§impl LocalKeyset
impl LocalKeyset
Sourcepub fn with<C: Signing>(
secp: &Secp256k1<C>,
channel_source: KeySource,
channel_xpriv: ExtendedPrivKey,
shutdown_scriptpubkey: Option<PubkeyScript>,
) -> Self
pub fn with<C: Signing>( secp: &Secp256k1<C>, channel_source: KeySource, channel_xpriv: ExtendedPrivKey, shutdown_scriptpubkey: Option<PubkeyScript>, ) -> Self
Derives keyset from a channel extended key using LNPBP-46 standard
Trait Implementations§
Source§impl Clone for LocalKeyset
impl Clone for LocalKeyset
Source§fn clone(&self) -> LocalKeyset
fn clone(&self) -> LocalKeyset
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LocalKeyset
impl Debug for LocalKeyset
Source§impl<'de> Deserialize<'de> for LocalKeyset
impl<'de> Deserialize<'de> for LocalKeyset
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for LocalKeyset
impl Display for LocalKeyset
Source§impl DumbDefault for LocalKeyset
impl DumbDefault for LocalKeyset
Source§fn dumb_default() -> Self
fn dumb_default() -> Self
Source§impl PartialEq for LocalKeyset
impl PartialEq for LocalKeyset
Source§impl Serialize for LocalKeyset
impl Serialize for LocalKeyset
Source§impl StrictDecode for LocalKeyset
impl StrictDecode for LocalKeyset
Source§fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
std::io::Read instance; must either
construct an instance or return implementation-specific error type.Source§fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
StrictDecode::strict_decode. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed. Use io::Cursor over the buffer and
StrictDecode::strict_decode to avoid such failures.Source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
path and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed if file contains remaining
data after the object reconstruction.Source§impl StrictEncode for LocalKeyset
impl StrictEncode for LocalKeyset
Source§fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
std::io::Write instance; must return result
with either amount of bytes encoded – or implementation-specific
error type.Source§fn strict_serialize(&self) -> Result<Vec<u8>, Error>
fn strict_serialize(&self) -> Result<Vec<u8>, Error>
StrictEncode::strict_encode
functionSource§impl ToYamlString for LocalKeyset
Available on crate feature serde only.
impl ToYamlString for LocalKeyset
serde only.Source§fn to_yaml_string(&self) -> String
fn to_yaml_string(&self) -> String
self into a YAML-encoded stringimpl Eq for LocalKeyset
impl StructuralPartialEq for LocalKeyset
Auto Trait Implementations§
impl Freeze for LocalKeyset
impl RefUnwindSafe for LocalKeyset
impl Send for LocalKeyset
impl Sync for LocalKeyset
impl Unpin for LocalKeyset
impl UnwindSafe for LocalKeyset
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
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§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.