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 6
6
//! appropriate keyring materials to others lightning components, as such node_id, destination_script.
7
7
//!
8
8
9
+
10
+ use bitcoin:: blockdata:: script:: Script ;
11
+
12
+ use secp256k1:: key:: SecretKey ;
13
+
9
14
use ln:: msgs;
10
15
11
16
/// A trait to describe a wallet which sould receive data to be able to spend onchain outputs
@@ -18,3 +23,15 @@ pub trait WalletInterface: Send + Sync {
18
23
/// BOTL 3 derivation scheme.
19
24
fn handle_spendable_output ( & self , msg : & msgs:: SpendableOutputs ) ;
20
25
}
26
+
27
+ /// A trait to describe an object which should get secrets from user wallet and apply derivation
28
+ /// to provide keys materials downstream
29
+ pub trait KeysInterface : Send + Sync {
30
+ /// User wallet has to provide this KeysInterface with a master seed used to derive
31
+ /// node_id as /0' and destination_script as /N'
32
+ fn provide_master_seed ( & self , seed : [ u8 ; 32 ] ) ;
33
+ /// Get node secret key to derive node_id
34
+ fn get_node_secret ( & self ) -> Option < SecretKey > ;
35
+ /// Get destination script to encumber protocol exit points
36
+ fn get_destination_script ( & self ) -> Option < Script > ;
37
+ }
You can’t perform that action at this time.
0 commit comments