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

ZcashHaskell.Utils

Description

A set of functions to assist in the handling of elements of the Zcash protocol, allowing for decoding of memos, addresses and viewing keys.

Synopsis

Utility functions

decodeBech32 :: ByteString -> RawData #

Decode the given bytestring using Bech32

encodeBech32m :: ByteString -> ByteString -> Text #

Encode the given Human Readable Part and bytestring as a Bech32m string

encodeBech32 :: ByteString -> ByteString -> Text #

Encode the given Human Readable Part and bytestring as a Bech32 string

f4Jumble :: ByteString -> ByteString #

Apply the F4Jumble transformation to the given bytestring

f4UnJumble :: ByteString -> ByteString #

Apply the inverse F4Jumble transformation to the given bytestring

Node interaction

makeZcashCall :: (MonadIO m, FromJSON a) => ByteString -> ByteString -> Text -> [Value] -> m (Response a) #

Make a Zcash RPC call

makeZebraCall #

Arguments

:: FromJSON a 
=> Text

Hostname for zebrad

-> Int

Port for zebrad

-> Text

RPC method to call

-> [Value]

List of parameters

-> IO (Either String a) 

Make a Zebra RPC call

createTransaction #

Arguments

:: Maybe SaplingCommitmentTree

to obtain the Sapling anchor

-> Maybe OrchardCommitmentTree

to obtain the Orchard anchor

-> [TransparentTxSpend]

the list of transparent notes to spend

-> [SaplingTxSpend]

the list of Sapling notes to spend

-> [OrchardTxSpend]

the list of Orchard notes to spend

-> [OutgoingNote]

the list of outgoing notes, including change notes

-> ZcashNet

the network to be used

-> Int

target block height

-> Bool

True to build, False to estimate fee

-> Either TxError HexString