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