Add keypair & update pubkey
Keypair & FullKeypair match structs in damus ios Signed-off-by: kernelkind <kernelkind@gmail.com> Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
William Casarin
parent
b8177459ab
commit
e04c8821d5
@@ -8,8 +8,10 @@ pub enum Error {
|
||||
Empty,
|
||||
DecodeFailed,
|
||||
HexDecodeFailed,
|
||||
InvalidBech32,
|
||||
InvalidByteSize,
|
||||
InvalidSignature,
|
||||
InvalidPublicKey,
|
||||
// Secp(secp256k1::Error),
|
||||
Json(serde_json::Error),
|
||||
Generic(String),
|
||||
@@ -23,6 +25,7 @@ impl std::cmp::PartialEq for Error {
|
||||
(Error::HexDecodeFailed, Error::HexDecodeFailed) => true,
|
||||
(Error::InvalidSignature, Error::InvalidSignature) => true,
|
||||
(Error::InvalidByteSize, Error::InvalidByteSize) => true,
|
||||
(Error::InvalidPublicKey, Error::InvalidPublicKey) => true,
|
||||
// This is slightly wrong but whatevs
|
||||
(Error::Json(..), Error::Json(..)) => true,
|
||||
(Error::Generic(left), Error::Generic(right)) => left == right,
|
||||
@@ -40,6 +43,8 @@ impl fmt::Display for Error {
|
||||
Self::InvalidSignature => write!(f, "invalid signature"),
|
||||
Self::HexDecodeFailed => write!(f, "hex decoding failed"),
|
||||
Self::InvalidByteSize => write!(f, "invalid byte size"),
|
||||
Self::InvalidBech32 => write!(f, "invalid bech32 string"),
|
||||
Self::InvalidPublicKey => write!(f, "invalid public key"),
|
||||
//Self::Secp(e) => write!(f, "{e}"),
|
||||
Self::Json(e) => write!(f, "{e}"),
|
||||
Self::Generic(e) => write!(f, "{e}"),
|
||||
|
||||
Reference in New Issue
Block a user