@@ -108,6 +108,18 @@ pub enum Error {
108108 CannotRecoverAdaptorSecret ,
109109 /// Given adaptor signature is not valid for the provided combination of public key, encryption key and message
110110 CannotVerifyAdaptorSignature ,
111+ /// Cannot establish Musig pre-session
112+ InvalidMusigPreSession ,
113+ /// Invalid tweak to Musig public key
114+ InvalidMusigTweak ,
115+ /// Cannot establish a Musig session
116+ InvalidMusigSession ,
117+ /// Invalid Musig public nonces
118+ InvalidMusigPubNonce ,
119+ /// Invalid Musig partial signature
120+ InvalidMusigPartSig ,
121+ /// Cannot extract Musig secret adaptor
122+ InvalidMusigExtract ,
111123}
112124
113125// Passthrough Debug to Display, since errors should be user-visible
@@ -127,6 +139,12 @@ impl fmt::Display for Error {
127139 Error :: Upstream ( inner) => return write ! ( f, "{}" , inner) ,
128140 Error :: InvalidTweakLength => "Tweak must of size 32" ,
129141 Error :: TweakOutOfBounds => "Tweak must be less than secp curve order" ,
142+ Error :: InvalidMusigPreSession => "failed to create Musig pre-session" ,
143+ Error :: InvalidMusigTweak => "malformed Musig tweak" ,
144+ Error :: InvalidMusigSession => "failed to create a Musig session" ,
145+ Error :: InvalidMusigPubNonce => "malformed Musig public nonce(s)" ,
146+ Error :: InvalidMusigPartSig => "malformed Musig partial signature" ,
147+ Error :: InvalidMusigExtract => "failed to extract Musig secret adaptor" ,
130148 } ;
131149
132150 f. write_str ( str)
0 commit comments