@@ -26,6 +26,8 @@ use bitcoin::hashes::sha256::Hash as Sha256;
26
26
use bitcoin:: hashes:: sha256d:: Hash as Sha256dHash ;
27
27
use bitcoin:: hash_types:: WPubkeyHash ;
28
28
29
+ #[ cfg( taproot) ]
30
+ use bitcoin:: secp256k1:: All ;
29
31
use bitcoin:: secp256k1:: { KeyPair , PublicKey , Scalar , Secp256k1 , SecretKey , Signing } ;
30
32
use bitcoin:: secp256k1:: ecdh:: SharedSecret ;
31
33
use bitcoin:: secp256k1:: ecdsa:: { RecoverableSignature , Signature } ;
@@ -49,6 +51,8 @@ use crate::prelude::*;
49
51
use core:: convert:: TryInto ;
50
52
use core:: ops:: Deref ;
51
53
use core:: sync:: atomic:: { AtomicUsize , Ordering } ;
54
+ #[ cfg( taproot) ]
55
+ use musig2:: types:: { PartialSignature , PublicNonce } ;
52
56
use crate :: io:: { self , Error } ;
53
57
use crate :: ln:: features:: ChannelTypeFeatures ;
54
58
use crate :: ln:: msgs:: { DecodeError , MAX_VALUE_MSAT } ;
@@ -1117,6 +1121,45 @@ impl EcdsaChannelSigner for InMemorySigner {
1117
1121
}
1118
1122
}
1119
1123
1124
+ #[ cfg( taproot) ]
1125
+ impl TaprootChannelSigner for InMemorySigner {
1126
+ fn generate_local_nonce_pair ( & self , secp_ctx : & Secp256k1 < All > ) -> PublicNonce {
1127
+ todo ! ( )
1128
+ }
1129
+
1130
+ fn partially_sign_counterparty_commitment ( & self , commitment_tx : & CommitmentTransaction , preimages : Vec < PaymentPreimage > , secp_ctx : & Secp256k1 < All > ) -> Result < ( PartialSignature , Vec < Signature > ) , ( ) > {
1131
+ todo ! ( )
1132
+ }
1133
+
1134
+ fn partially_sign_holder_commitment_and_htlcs ( & self , commitment_tx : & HolderCommitmentTransaction , secp_ctx : & Secp256k1 < All > ) -> Result < ( PartialSignature , Vec < Signature > ) , ( ) > {
1135
+ todo ! ( )
1136
+ }
1137
+
1138
+ fn sign_justice_revoked_output ( & self , justice_tx : & Transaction , input : usize , amount : u64 , per_commitment_key : & SecretKey , secp_ctx : & Secp256k1 < All > ) -> Result < Signature , ( ) > {
1139
+ todo ! ( )
1140
+ }
1141
+
1142
+ fn sign_justice_revoked_htlc ( & self , justice_tx : & Transaction , input : usize , amount : u64 , per_commitment_key : & SecretKey , htlc : & HTLCOutputInCommitment , secp_ctx : & Secp256k1 < All > ) -> Result < Signature , ( ) > {
1143
+ todo ! ( )
1144
+ }
1145
+
1146
+ fn sign_holder_htlc_transaction ( & self , htlc_tx : & Transaction , input : usize , htlc_descriptor : & HTLCDescriptor , secp_ctx : & Secp256k1 < All > ) -> Result < Signature , ( ) > {
1147
+ todo ! ( )
1148
+ }
1149
+
1150
+ fn sign_counterparty_htlc_transaction ( & self , htlc_tx : & Transaction , input : usize , amount : u64 , per_commitment_point : & PublicKey , htlc : & HTLCOutputInCommitment , secp_ctx : & Secp256k1 < All > ) -> Result < Signature , ( ) > {
1151
+ todo ! ( )
1152
+ }
1153
+
1154
+ fn partially_sign_closing_transaction ( & self , closing_tx : & ClosingTransaction , secp_ctx : & Secp256k1 < All > ) -> Result < PartialSignature , ( ) > {
1155
+ todo ! ( )
1156
+ }
1157
+
1158
+ fn sign_holder_anchor_input ( & self , anchor_tx : & Transaction , input : usize , secp_ctx : & Secp256k1 < All > ) -> Result < Signature , ( ) > {
1159
+ todo ! ( )
1160
+ }
1161
+ }
1162
+
1120
1163
const SERIALIZATION_VERSION : u8 = 1 ;
1121
1164
1122
1165
const MIN_SERIALIZATION_VERSION : u8 = 1 ;
0 commit comments