lib: add JSON instance to Signature type (#1764)

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
Evgeny
2026-04-14 19:47:20 +01:00
committed by GitHub
parent bc5ea42bec
commit 43cdf55f3b
+7
View File
@@ -816,6 +816,13 @@ instance CryptoSignature (Signature s) => StrEncoding (Signature s) where
strDecode = decodeSignature
{-# INLINE strDecode #-}
instance CryptoSignature (Signature s) => ToJSON (Signature s) where
toJSON = strToJSON
toEncoding = strToJEncoding
instance CryptoSignature (Signature s) => FromJSON (Signature s) where
parseJSON = strParseJSON "Signature"
instance CryptoSignature (Signature s) => Encoding (Signature s) where
smpEncode = smpEncode . signatureBytes
{-# INLINE smpEncode #-}