@@ -337,18 +337,29 @@ pub trait KeysInterface: Send + Sync {
337
337
/// A type which implements ChannelKeys which will be returned by get_channel_keys.
338
338
type ChanKeySigner : ChannelKeys ;
339
339
340
- /// Get node secret key (aka node_id or network_key)
340
+ /// Get node secret key (aka node_id or network_key).
341
+ ///
342
+ /// This method must return the same value each time it is called.
341
343
fn get_node_secret ( & self ) -> SecretKey ;
342
- /// Get destination redeemScript to encumber static protocol exit points.
344
+ /// Get a script pubkey which we send funds to when claiming on-chain contestable outputs.
345
+ ///
346
+ /// This method should return a different value each time it is called, for privacy reasons.
343
347
fn get_destination_script ( & self ) -> Script ;
344
- /// Get shutdown_pubkey to use as PublicKey at channel closure
348
+ /// Get a public key which we will send funds to (in the form of a P2WPKH output) when closing
349
+ /// a channel.
350
+ ///
351
+ /// This method should return a different value each time it is called, for privacy reasons.
345
352
fn get_shutdown_pubkey ( & self ) -> PublicKey ;
346
353
/// Get a new set of ChannelKeys for per-channel secrets. These MUST be unique even if you
347
354
/// restarted with some stale data!
355
+ ///
356
+ /// This method must return a different value each time it is called.
348
357
fn get_channel_keys ( & self , inbound : bool , channel_value_satoshis : u64 ) -> Self :: ChanKeySigner ;
349
358
/// Gets a unique, cryptographically-secure, random 32 byte value. This is used for encrypting
350
359
/// onion packets and for temporary channel IDs. There is no requirement that these be
351
360
/// persisted anywhere, though they must be unique across restarts.
361
+ ///
362
+ /// This method must return a different value each time it is called.
352
363
fn get_secure_random_bytes ( & self ) -> [ u8 ; 32 ] ;
353
364
354
365
/// Reads a `ChanKeySigner` for this `KeysInterface` from the given input stream.
0 commit comments