json: deserialize note ids into bytes

This commit is contained in:
William Casarin
2023-07-06 17:09:39 -07:00
parent 7b26948101
commit 1ba597fc0a
9 changed files with 84 additions and 29 deletions

View File

@@ -6,6 +6,7 @@ pub enum Error {
MessageDecodeFailed,
InvalidSignature,
Json(serde_json::Error),
Hex(hex::FromHexError),
Generic(String),
}
@@ -36,3 +37,9 @@ impl From<serde_json::Error> for Error {
Error::Json(e)
}
}
impl From<hex::FromHexError> for Error {
fn from(e: hex::FromHexError) -> Self {
Error::Hex(e)
}
}