@@ -110,6 +110,22 @@ pub enum Error {
110
110
CannotRecoverAdaptorSecret ,
111
111
/// Given adaptor signature is not valid for the provided combination of public key, encryption key and message
112
112
CannotVerifyAdaptorSignature ,
113
+ /// Cannot establish Musig pre-session
114
+ InvalidMusigPreSession ,
115
+ /// Invalid tweak to Musig public key
116
+ InvalidMusigTweak ,
117
+ /// Cannot establish a Musig session
118
+ InvalidMusigSession ,
119
+ /// Invalid Musig public nonces
120
+ CannotGenMusigNonce ,
121
+ /// Invalid Musig public nonce
122
+ InvalidMusigPubNonce ,
123
+ /// Invalid Musig aggregated nonce
124
+ InvalidMusigAggNonce ,
125
+ /// Invalid Musig partial signature
126
+ InvalidMusigPartSig ,
127
+ /// Cannot extract Musig secret adaptor
128
+ InvalidMusigExtract ,
113
129
}
114
130
115
131
// Passthrough Debug to Display, since errors should be user-visible
@@ -129,6 +145,14 @@ impl fmt::Display for Error {
129
145
Error :: Upstream ( inner) => return write ! ( f, "{}" , inner) ,
130
146
Error :: InvalidTweakLength => "Tweak must of size 32" ,
131
147
Error :: TweakOutOfBounds => "Tweak must be less than secp curve order" ,
148
+ Error :: InvalidMusigPreSession => "failed to create Musig pre-session" ,
149
+ Error :: InvalidMusigTweak => "malformed Musig tweak" ,
150
+ Error :: InvalidMusigSession => "failed to create a Musig session" ,
151
+ Error :: CannotGenMusigNonce => "failed to create a Musig nonce pair" ,
152
+ Error :: InvalidMusigPubNonce => "malformed Musig public nonce(s)" ,
153
+ Error :: InvalidMusigAggNonce => "malformed Musig aggregated nonce" ,
154
+ Error :: InvalidMusigPartSig => "malformed Musig partial signature" ,
155
+ Error :: InvalidMusigExtract => "failed to extract Musig secret adaptor" ,
132
156
} ;
133
157
134
158
f. write_str ( str)
0 commit comments