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

ZcashHaskell.Orchard

Description

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

Synopsis

Documentation

genOrchardSpendingKey #

Arguments

:: Seed

The cryptographic seed for the wallet

-> CoinType

The coin type constant

-> AccountId

The index of the account to be used

-> Maybe OrchardSpendingKey 

Derives an Orchard spending key for the given seed and account ID

genOrchardReceiver #

Arguments

:: Int

The index of the address to be created

-> Scope

External for wallet addresses, Internal for change addresses

-> OrchardSpendingKey

The spending key

-> Maybe OrchardReceiver 

Derives an Orchard receiver for the given spending key and index

isValidUnifiedAddress :: ByteString -> Maybe UnifiedAddress #

Checks if given bytestring is a valid encoded unified address

decodeUfvk :: ByteString -> Maybe UnifiedFullViewingKey #

Attempts to decode the given bytestring into a Unified Full Viewing Key

matchOrchardAddress :: ByteString -> ByteString -> Bool #

Check if the given UVK matches the UA given

decryptOrchardAction :: UnifiedFullViewingKey -> OrchardAction -> Maybe DecodedNote #

Attempts to decode the given OrchardAction using the given UnifiedFullViewingKey.

decryptOrchardActionSK :: OrchardSpendingKey -> Scope -> OrchardAction -> Maybe DecodedNote #

Attemtps to decode the given OrchardAction using the given OrchardSpendingKey

updateOrchardCommitmentTree #

Arguments

:: OrchardCommitmentTree

the base tree

-> HexString

the new note commitment

-> Maybe OrchardCommitmentTree 

Update a Orchard commitment tree

getOrchardWitness :: OrchardCommitmentTree -> Maybe OrchardWitness #

Get the Orchard incremental witness from a commitment tree

getOrchardNotePosition :: OrchardWitness -> Integer #

Get the Sapling note position from a witness

updateOrchardWitness :: OrchardWitness -> [HexString] -> OrchardWitness #

Update the witness of an Orchard note

parseAddress :: ByteString -> Maybe ValidAddress #

Parse a potential Zcash address