From 70927645e774d53dd04650d68d996670033a8ef1 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Fri, 1 Nov 2024 15:44:32 -0500 Subject: [PATCH] feat: add `MerklePath` --- src/ZcashHaskell/Types.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ZcashHaskell/Types.hs b/src/ZcashHaskell/Types.hs index afa6a81..f87444d 100644 --- a/src/ZcashHaskell/Types.hs +++ b/src/ZcashHaskell/Types.hs @@ -722,6 +722,14 @@ instance FromJSON OrchardAction where a <- obj .: "spendAuthSig" pure $ OrchardAction n r c ephKey encText outText cval a +data MerklePath = MerklePath + { mp_position :: !Int64 + , mp_path :: ![HexString] + } deriving stock (Eq, Prelude.Show, GHC.Generic) + deriving anyclass (SOP.Generic, SOP.HasDatatypeInfo) + deriving anyclass (Data.Structured.Show) + deriving (BorshSize, ToBorsh, FromBorsh) via AsStruct MerklePath + -- | Type for a Orchard note commitment tree newtype OrchardCommitmentTree = OrchardCommitmentTree { orchTree :: HexString