@@ -108,6 +108,18 @@ pub enum Error {
108
108
CannotRecoverAdaptorSecret ,
109
109
/// Given adaptor signature is not valid for the provided combination of public key, encryption key and message
110
110
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 ,
111
123
}
112
124
113
125
// Passthrough Debug to Display, since errors should be user-visible
@@ -127,6 +139,12 @@ impl fmt::Display for Error {
127
139
Error :: Upstream ( inner) => return write ! ( f, "{}" , inner) ,
128
140
Error :: InvalidTweakLength => "Tweak must of size 32" ,
129
141
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" ,
130
148
} ;
131
149
132
150
f. write_str ( str)
0 commit comments