[][src]Trait lightning::chain::keysinterface::KeysInterface

pub trait KeysInterface: Send + Sync {
    fn get_node_secret(&self) -> SecretKey;
fn get_destination_script(&self) -> Script;
fn get_shutdown_pubkey(&self) -> PublicKey;
fn get_channel_keys(&self, inbound: bool) -> ChannelKeys;
fn get_onion_rand(&self) -> (SecretKey, [u8; 32]);
fn get_channel_id(&self) -> [u8; 32]; }

A trait to describe an object which can get user secrets and key material.

Required methods

fn get_node_secret(&self) -> SecretKey

Get node secret key (aka node_id or network_key)

fn get_destination_script(&self) -> Script

Get destination redeemScript to encumber static protocol exit points.

fn get_shutdown_pubkey(&self) -> PublicKey

Get shutdown_pubkey to use as PublicKey at channel closure

fn get_channel_keys(&self, inbound: bool) -> ChannelKeys

Get a new set of ChannelKeys for per-channel secrets. These MUST be unique even if you restarted with some stale data!

fn get_onion_rand(&self) -> (SecretKey, [u8; 32])

Get a secret and PRNG seed for construting an onion packet

fn get_channel_id(&self) -> [u8; 32]

Get a unique temporary channel id. Channels will be referred to by this until the funding transaction is created, at which point they will use the outpoint in the funding transaction.

Loading content...

Implementors

Loading content...