Trait lightning::chain::keysinterface::KeysInterface [−][src]
A trait to describe an object which can get user secrets and key material.
Associated Types
Loading content...Required methods
fn get_node_secret(&self) -> SecretKey
[src]
Get node secret key (aka node_id or network_key).
This method must return the same value each time it is called.
fn get_destination_script(&self) -> Script
[src]
Get a script pubkey which we send funds to when claiming on-chain contestable outputs.
This method should return a different value each time it is called, to avoid linking on-chain funds across channels as controlled to the same user.
fn get_shutdown_pubkey(&self) -> PublicKey
[src]
Get a public key which we will send funds to (in the form of a P2WPKH output) when closing a channel.
This method should return a different value each time it is called, to avoid linking on-chain funds across channels as controlled to the same user.
fn get_channel_signer(
&self,
inbound: bool,
channel_value_satoshis: u64
) -> Self::Signer
[src]
&self,
inbound: bool,
channel_value_satoshis: u64
) -> Self::Signer
Get a new set of Sign for per-channel secrets. These MUST be unique even if you restarted with some stale data!
This method must return a different value each time it is called.
fn get_secure_random_bytes(&self) -> [u8; 32]
[src]
Gets a unique, cryptographically-secure, random 32 byte value. This is used for encrypting onion packets and for temporary channel IDs. There is no requirement that these be persisted anywhere, though they must be unique across restarts.
This method must return a different value each time it is called.
fn read_chan_signer(&self, reader: &[u8]) -> Result<Self::Signer, DecodeError>
[src]
Reads a Signer
for this KeysInterface
from the given input stream.
This is only called during deserialization of other objects which contain
Sign
-implementing objects (ie ChannelMonitor
s and ChannelManager
s).
The bytes are exactly those which <Self::Signer as Writeable>::write()
writes, and
contain no versioning scheme. You may wish to include your own version prefix and ensure
you’ve read all of the provided bytes to ensure no corruption occurred.
Implementors
impl KeysInterface for KeysManager
[src]
type Signer = InMemorySigner
fn get_node_secret(&self) -> SecretKey
[src]
fn get_destination_script(&self) -> Script
[src]
fn get_shutdown_pubkey(&self) -> PublicKey
[src]
fn get_channel_signer(
&self,
_inbound: bool,
channel_value_satoshis: u64
) -> Self::Signer
[src]
&self,
_inbound: bool,
channel_value_satoshis: u64
) -> Self::Signer