From bc1ee2430a5a0d2dad6811b68fbf34b10b815dfe Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Fri, 15 Mar 2024 12:26:28 -0500 Subject: [PATCH] Improve dependency on Haskoin for downstream --- src/ZcashHaskell/Transparent.hs | 3 ++- src/ZcashHaskell/Types.hs | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ZcashHaskell/Transparent.hs b/src/ZcashHaskell/Transparent.hs index 690fa4c..140bdbb 100644 --- a/src/ZcashHaskell/Transparent.hs +++ b/src/ZcashHaskell/Transparent.hs @@ -35,6 +35,7 @@ import ZcashHaskell.Types , Seed(..) , ToBytes(..) , TransparentAddress(..) + , TransparentSpendingKey(..) , TransparentType(..) , ZcashNet(..) , getTransparentPrefix @@ -64,7 +65,7 @@ genTransparentPrvKey :: Seed -- ^ The cryptographic seed of the wallet -> CoinType -- ^ The coin type constant to be used -> AccountId -- ^ The index of the account to be used - -> IO XPrvKey + -> IO TransparentSpendingKey genTransparentPrvKey hdseed ctype accid = do let coin = getValue ctype ioCtx <- createContext diff --git a/src/ZcashHaskell/Types.hs b/src/ZcashHaskell/Types.hs index 12a27a2..091d661 100644 --- a/src/ZcashHaskell/Types.hs +++ b/src/ZcashHaskell/Types.hs @@ -38,6 +38,7 @@ import Data.Word import qualified GHC.Generics as GHC import qualified Generics.SOP as SOP import Haskoin.Address (Address) +import Haskoin.Crypto.Keys.Extended (XPrvKey) -- * General -- @@ -256,6 +257,9 @@ data TransparentType | P2PKH deriving (Eq, Prelude.Show, Read) +-- | Type for transparent spending key +type TransparentSpendingKey = XPrvKey + -- | Type to represent a transparent Zcash addresses data TransparentAddress = TransparentAddress { ta_type :: !TransparentType