From 9ca702a68e5ac2e9893bf4f6826686cb3ae99a56 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Tue, 13 Aug 2024 07:56:25 -0500 Subject: [PATCH] Add `ValidAddress` --- CHANGELOG.md | 1 + src/ZcashHaskell/Types.hs | 8 ++++++++ zcash-haskell.cabal | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f3492f..64af8aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.6.2.2] - Added JSON instances for `ZcashNet` +- Added `ValidAddress` ## [0.6.2.1] diff --git a/src/ZcashHaskell/Types.hs b/src/ZcashHaskell/Types.hs index f806413..d6bfd2e 100644 --- a/src/ZcashHaskell/Types.hs +++ b/src/ZcashHaskell/Types.hs @@ -583,6 +583,14 @@ data RawUA = RawUA deriving anyclass (Data.Structured.Show) deriving (BorshSize, ToBorsh, FromBorsh) via AsStruct RawUA +-- | A type to handle user-entered addresses +data ValidAddress + = Unified !UnifiedAddress + | Sapling !SaplingAddress + | Transparent !TransparentAddress + | Exchange !ExchangeAddress + deriving stock (Eq, Prelude.Show) + -- | Type to represent a Unified Full Viewing Key data UnifiedFullViewingKey = UnifiedFullViewingKey { net :: !Word8 -- ^ Number representing the network the key belongs to. @1@ for @mainnet@, @2@ for @testnet@ and @3@ for @regtestnet@. diff --git a/zcash-haskell.cabal b/zcash-haskell.cabal index 27924ee..436bf5a 100644 --- a/zcash-haskell.cabal +++ b/zcash-haskell.cabal @@ -5,7 +5,7 @@ cabal-version: 3.0 -- see: https://github.com/sol/hpack name: zcash-haskell -version: 0.6.2.1 +version: 0.6.2.2 synopsis: Utilities to interact with the Zcash blockchain description: Please see the README on the repo at category: Blockchain -- 2.34.1