zcash-haskell-0.7.0.1: Utilities to interact with the Zcash blockchain
Copyright2022-2024 Vergara Technologies
LicenseMIT
Maintainerpitmutt@vergara.tech
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe-Inferred
LanguageHaskell2010

ZcashHaskell.Sapling

Description

Functions to interact with the Sapling shielded pool of the Zcash blockchain.

Synopsis

Documentation

isValidShieldedAddress :: ByteString -> Bool #

Check if given bytesting is a valid encoded shielded address

isValidSaplingViewingKey :: ByteString -> Bool #

Check if given bytestring is a valid Sapling viewing key

matchSaplingAddress :: ByteString -> ByteString -> Bool #

Check if the given bytestring for the Sapling viewing key matches the second bytestring for the address

decodeSaplingOutput :: ByteString -> ShieldedOutput -> Maybe DecodedNote #

Attempt to decode the given raw tx with the given Sapling viewing key

decodeSaplingOutputEsk :: SaplingSpendingKey -> ShieldedOutput -> ZcashNet -> Scope -> Integer -> Maybe DecodedNote #

Attempt to decode the given raw tx with the given Sapling spending key

genSaplingSpendingKey :: Seed -> CoinType -> Int -> Maybe SaplingSpendingKey #

Attempts to obtain a sapling SpendingKey using a HDSeed

genSaplingPaymentAddress :: Int -> SaplingSpendingKey -> Maybe SaplingReceiver #

Attempts to generate a sapling Payment Address using an ExtendedSpendingKey and a Diversifier Index

genSaplingInternalAddress :: SaplingSpendingKey -> Maybe SaplingReceiver #

Generate an internal Sapling address

updateSaplingCommitmentTree #

Arguments

:: SaplingCommitmentTree

the base tree

-> HexString

the new note commitment

-> Maybe SaplingCommitmentTree 

Update a Sapling commitment tree

getSaplingWitness :: SaplingCommitmentTree -> Maybe SaplingWitness #

Get the Sapling incremental witness from a commitment tree

getSaplingNotePosition :: SaplingWitness -> Integer #

Get the Sapling note position from a witness

encodeSaplingAddress :: ZcashNet -> SaplingReceiver -> Maybe Text #

Encode a SaplingReceiver into HRF text

getNetId :: [Word8] -> ZcashNet #

Helper to get de Nework Id from FFI response

decodeSaplingAddress :: ByteString -> Maybe SaplingAddress #

decode a Sapling address

Orphan instances