We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc5ea42 commit 43cdf55Copy full SHA for 43cdf55
1 file changed
src/Simplex/Messaging/Crypto.hs
@@ -816,6 +816,13 @@ instance CryptoSignature (Signature s) => StrEncoding (Signature s) where
816
strDecode = decodeSignature
817
{-# INLINE strDecode #-}
818
819
+instance CryptoSignature (Signature s) => ToJSON (Signature s) where
820
+ toJSON = strToJSON
821
+ toEncoding = strToJEncoding
822
+
823
+instance CryptoSignature (Signature s) => FromJSON (Signature s) where
824
+ parseJSON = strParseJSON "Signature"
825
826
instance CryptoSignature (Signature s) => Encoding (Signature s) where
827
smpEncode = smpEncode . signatureBytes
828
{-# INLINE smpEncode #-}
0 commit comments