File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1064,6 +1064,12 @@ impl KeysManager {
10641064 Err ( _) => panic ! ( "Your rng is busted" ) ,
10651065 }
10661066 }
1067+
1068+ /// Gets the "node_id" secret key used to sign gossip announcements, decode onion data, etc.
1069+ pub fn get_node_secret_key ( & self ) -> SecretKey {
1070+ self . node_secret
1071+ }
1072+
10671073 /// Derive an old [`WriteableEcdsaChannelSigner`] containing per-channel secrets based on a key derivation parameters.
10681074 pub fn derive_channel_keys ( & self , channel_value_satoshis : u64 , params : & [ u8 ; 32 ] ) -> InMemorySigner {
10691075 let chan_id = u64:: from_be_bytes ( params[ 0 ..8 ] . try_into ( ) . unwrap ( ) ) ;
@@ -1458,6 +1464,17 @@ impl PhantomKeysManager {
14581464 pub fn derive_channel_keys ( & self , channel_value_satoshis : u64 , params : & [ u8 ; 32 ] ) -> InMemorySigner {
14591465 self . inner . derive_channel_keys ( channel_value_satoshis, params)
14601466 }
1467+
1468+ /// Gets the "node_id" secret key used to sign gossip announcements, decode onion data, etc.
1469+ pub fn get_node_secret_key ( & self ) -> SecretKey {
1470+ self . inner . get_node_secret_key ( )
1471+ }
1472+
1473+ /// Gets the "node_id" secret key of the phantom node used to sign invoices, decode the
1474+ /// last-hop onion data, etc.
1475+ pub fn get_phantom_node_secret_key ( & self ) -> SecretKey {
1476+ self . phantom_secret
1477+ }
14611478}
14621479
14631480// Ensure that EcdsaChannelSigner can have a vtable
You can’t perform that action at this time.
0 commit comments