@@ -8,8 +8,10 @@ pub enum Error {
88 Empty ,
99 DecodeFailed ,
1010 HexDecodeFailed ,
11+ InvalidBech32 ,
1112 InvalidByteSize ,
1213 InvalidSignature ,
14+ InvalidPublicKey ,
1315 // Secp(secp256k1::Error),
1416 Json ( serde_json:: Error ) ,
1517 Generic ( String ) ,
@@ -23,6 +25,7 @@ impl std::cmp::PartialEq for Error {
2325 ( Error :: HexDecodeFailed , Error :: HexDecodeFailed ) => true ,
2426 ( Error :: InvalidSignature , Error :: InvalidSignature ) => true ,
2527 ( Error :: InvalidByteSize , Error :: InvalidByteSize ) => true ,
28+ ( Error :: InvalidPublicKey , Error :: InvalidPublicKey ) => true ,
2629 // This is slightly wrong but whatevs
2730 ( Error :: Json ( ..) , Error :: Json ( ..) ) => true ,
2831 ( Error :: Generic ( left) , Error :: Generic ( right) ) => left == right,
@@ -40,6 +43,8 @@ impl fmt::Display for Error {
4043 Self :: InvalidSignature => write ! ( f, "invalid signature" ) ,
4144 Self :: HexDecodeFailed => write ! ( f, "hex decoding failed" ) ,
4245 Self :: InvalidByteSize => write ! ( f, "invalid byte size" ) ,
46+ Self :: InvalidBech32 => write ! ( f, "invalid bech32 string" ) ,
47+ Self :: InvalidPublicKey => write ! ( f, "invalid public key" ) ,
4348 //Self::Secp(e) => write!(f, "{e}"),
4449 Self :: Json ( e) => write ! ( f, "{e}" ) ,
4550 Self :: Generic ( e) => write ! ( f, "{e}" ) ,
0 commit comments