Update source path
This commit is contained in:
parent
80478c9b6f
commit
19c9d8c466
4 changed files with 15 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
module HaskellZcash.Orchard where
|
module ZcashHaskell.Orchard where
|
||||||
|
|
||||||
import C.Zcash
|
import C.Zcash
|
||||||
( rustWrapperIsUA
|
( rustWrapperIsUA
|
||||||
|
@ -7,7 +7,7 @@ import C.Zcash
|
||||||
)
|
)
|
||||||
import qualified Data.ByteString as BS
|
import qualified Data.ByteString as BS
|
||||||
import Foreign.Rust.Marshall.Variable
|
import Foreign.Rust.Marshall.Variable
|
||||||
import HaskellZcash.Types
|
import ZcashHaskell.Types
|
||||||
|
|
||||||
-- | Check if given bytestring is a valid encoded unified address
|
-- | Check if given bytestring is a valid encoded unified address
|
||||||
isValidUnifiedAddress :: BS.ByteString -> Bool
|
isValidUnifiedAddress :: BS.ByteString -> Bool
|
|
@ -1,6 +1,10 @@
|
||||||
module HaskellZcash.Sapling where
|
module ZcashHaskell.Sapling where
|
||||||
|
|
||||||
import C.Zcash (rustWrapperIsShielded, rustWrapperSaplingVkDecode)
|
import C.Zcash
|
||||||
|
( rustWrapperIsShielded
|
||||||
|
, rustWrapperSaplingCheck
|
||||||
|
, rustWrapperSaplingVkDecode
|
||||||
|
)
|
||||||
import qualified Data.ByteString as BS
|
import qualified Data.ByteString as BS
|
||||||
|
|
||||||
-- | Check if given bytesting is a valid encoded shielded address
|
-- | Check if given bytesting is a valid encoded shielded address
|
||||||
|
@ -10,3 +14,7 @@ isValidShieldedAddress = rustWrapperIsShielded
|
||||||
-- | Check if given bytestring is a valid Sapling viewing key
|
-- | Check if given bytestring is a valid Sapling viewing key
|
||||||
isValidSaplingViewingKey :: BS.ByteString -> Bool
|
isValidSaplingViewingKey :: BS.ByteString -> Bool
|
||||||
isValidSaplingViewingKey = rustWrapperSaplingVkDecode
|
isValidSaplingViewingKey = rustWrapperSaplingVkDecode
|
||||||
|
|
||||||
|
-- | Check if the given bytestring for the Sapling viewing key matches the second bytestring for the address
|
||||||
|
matchSaplingAddress :: BS.ByteString -> BS.ByteString -> Bool
|
||||||
|
matchSaplingAddress = rustWrapperSaplingCheck
|
|
@ -5,7 +5,7 @@
|
||||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||||
{-# LANGUAGE UndecidableInstances #-}
|
{-# LANGUAGE UndecidableInstances #-}
|
||||||
|
|
||||||
module HaskellZcash.Types where
|
module ZcashHaskell.Types where
|
||||||
|
|
||||||
import qualified Data.ByteString as BS
|
import qualified Data.ByteString as BS
|
||||||
import Codec.Borsh
|
import Codec.Borsh
|
|
@ -1,4 +1,4 @@
|
||||||
module HaskellZcash.Utils where
|
module ZcashHaskell.Utils where
|
||||||
|
|
||||||
import C.Zcash
|
import C.Zcash
|
||||||
( rustWrapperBech32Decode
|
( rustWrapperBech32Decode
|
||||||
|
@ -8,7 +8,7 @@ import C.Zcash
|
||||||
|
|
||||||
import qualified Data.ByteString as BS
|
import qualified Data.ByteString as BS
|
||||||
import Foreign.Rust.Marshall.Variable
|
import Foreign.Rust.Marshall.Variable
|
||||||
import HaskellZcash.Types
|
import ZcashHaskell.Types
|
||||||
|
|
||||||
-- | Helper function to turn a hex-encoded strings to bytestring
|
-- | Helper function to turn a hex-encoded strings to bytestring
|
||||||
decodeHexText :: String -> BS.ByteString
|
decodeHexText :: String -> BS.ByteString
|
Loading…
Reference in a new issue