pub struct NodeIdentity { /* private fields */ }Expand description
Lightning node identity derived from an HD seed.
The node identity includes the node’s public key (node ID) and the secret key used for signing.
Implementations§
Source§impl NodeIdentity
impl NodeIdentity
Sourcepub fn from_seed(seed: &[u8]) -> Result<Self, LightningError>
pub fn from_seed(seed: &[u8]) -> Result<Self, LightningError>
Derive node identity from an HD seed (64 bytes).
Uses a deterministic derivation from the seed.
Sourcepub fn from_secret_key(secret_key: SecretKey) -> Self
pub fn from_secret_key(secret_key: SecretKey) -> Self
Create from an existing secret key.
Sourcepub fn public_key(&self) -> &PublicKey
pub fn public_key(&self) -> &PublicKey
Get the public key.
Sourcepub fn secret_key(&self) -> &SecretKey
pub fn secret_key(&self) -> &SecretKey
Get the secret key (use with caution).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeIdentity
impl RefUnwindSafe for NodeIdentity
impl Send for NodeIdentity
impl Sync for NodeIdentity
impl Unpin for NodeIdentity
impl UnwindSafe for NodeIdentity
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
Mutably borrows from an owned value. Read more