From b99a633316e239d6016e107b35ff0015866b73e7 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Sun, 9 Feb 2025 08:22:55 -0600 Subject: [PATCH] feat: add Read instances to VKs --- src/ZcashHaskell/Types.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ZcashHaskell/Types.hs b/src/ZcashHaskell/Types.hs index 0621e40..e80250c 100644 --- a/src/ZcashHaskell/Types.hs +++ b/src/ZcashHaskell/Types.hs @@ -689,7 +689,7 @@ data ValidAddress data ValidVk = FullVk !UnifiedFullViewingKey | IncomingVk !UnifiedIncomingViewingKey - deriving stock (Eq, Prelude.Show) + deriving stock (Eq, Prelude.Show, Read) -- | Type to represent a Unified Full Viewing Key data UnifiedFullViewingKey = UnifiedFullViewingKey @@ -697,7 +697,7 @@ data UnifiedFullViewingKey = UnifiedFullViewingKey , o_key :: !BS.ByteString -- ^ Raw bytes of the Orchard Full Viewing Key as specified in [ZIP-316](https://zips.z.cash/zip-0316) , s_key :: !BS.ByteString -- ^ Raw bytes of the Sapling Full Viewing Key as specified in [ZIP-316](https://zips.z.cash/zip-0316) , t_key :: !BS.ByteString -- ^ Raw bytes of the P2PKH chain code and public key as specified in [ZIP-316](https://zips.z.cash/zip-0316) - } deriving stock (Eq, Prelude.Show, GHC.Generic) + } deriving stock (Eq, Prelude.Show, GHC.Generic, Read) deriving anyclass (SOP.Generic, SOP.HasDatatypeInfo) deriving anyclass (Data.Structured.Show) deriving (BorshSize, ToBorsh, FromBorsh) via AsStruct UnifiedFullViewingKey @@ -708,7 +708,7 @@ data UnifiedIncomingViewingKey = UnifiedIncomingViewingKey , i_o_key :: !BS.ByteString -- ^ Raw bytes of the Orchard Incoming Viewing Key as specified in [ZIP-316](https://zips.z.cash/zip-0316) , i_s_key :: !BS.ByteString -- ^ Raw bytes of the Sapling Incoming Viewing Key as specified in [ZIP-316](https://zips.z.cash/zip-0316) , i_t_key :: !BS.ByteString -- ^ Raw bytes of the P2PKH chain code and public key as specified in [ZIP-316](https://zips.z.cash/zip-0316) - } deriving stock (Eq, Prelude.Show, GHC.Generic) + } deriving stock (Eq, Prelude.Show, GHC.Generic, Read) deriving anyclass (SOP.Generic, SOP.HasDatatypeInfo) deriving anyclass (Data.Structured.Show) deriving (BorshSize, ToBorsh, FromBorsh) via AsStruct