Copyright | 2022-2024 Vergara Technologies |
---|---|
License | MIT |
Maintainer | pitmutt@vergara.tech |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
ZcashHaskell.Sapling
Contents
Description
Functions to interact with the Sapling shielded pool of the Zcash blockchain.
Synopsis
- isValidShieldedAddress :: ByteString -> Bool
- getShieldedOutputs :: HexString -> [ShieldedOutput]
- serializeShieldedOutput :: ShieldedOutput -> ByteString
- isValidSaplingViewingKey :: ByteString -> Bool
- matchSaplingAddress :: ByteString -> ByteString -> Bool
- decodeSaplingOutput :: ByteString -> ShieldedOutput -> Maybe DecodedNote
- decodeSaplingOutputFvk :: ByteString -> ShieldedOutput -> Scope -> Int64 -> Maybe DecodedNote
- decodeSaplingOutputIvk :: ByteString -> ShieldedOutput -> Maybe DecodedNote
- decodeSaplingOutputEsk :: SaplingSpendingKey -> ShieldedOutput -> ZcashNet -> Scope -> Integer -> Maybe DecodedNote
- genSaplingSpendingKey :: Seed -> CoinType -> Int -> Maybe SaplingSpendingKey
- genSaplingPaymentAddress :: Int -> SaplingSpendingKey -> Maybe SaplingReceiver
- genSaplingReceiverFvk :: Int -> ByteString -> Maybe SaplingReceiver
- genSaplingReceiverIvk :: Int -> ByteString -> Maybe SaplingReceiver
- genSaplingInternalAddress :: SaplingSpendingKey -> Maybe SaplingReceiver
- genSaplingInternalAddressFvk :: ByteString -> Maybe SaplingReceiver
- getSaplingNodeValue :: ByteString -> Maybe HexString
- combineSaplingNodes :: Int8 -> HexString -> HexString -> Maybe HexString
- getSaplingRootTest :: Int8 -> HexString
- getSaplingTreeParts :: SaplingCommitmentTree -> Maybe SaplingTree
- getSaplingTreeAnchor :: SaplingCommitmentTree -> HexString
- getSaplingPathAnchor :: HexString -> MerklePath -> HexString
- getSaplingFrontier :: SaplingCommitmentTree -> Maybe SaplingFrontier
- updateSaplingCommitmentTree :: SaplingFrontier -> HexString -> Maybe SaplingFrontier
- getSaplingWitness :: SaplingFrontier -> Maybe SaplingWitness
- getSaplingNotePosition :: SaplingWitness -> Integer
- updateSaplingWitness :: SaplingWitness -> [HexString] -> SaplingWitness
- encodeSaplingAddress :: ZcashNet -> SaplingReceiver -> Maybe Text
- getNetId :: [Word8] -> ZcashNet
- decodeSaplingAddress :: ByteString -> Maybe SaplingAddress
- deriveSaplingFvk :: SaplingSpendingKey -> Maybe HexString
- deriveSaplingIvk :: SaplingSpendingKey -> Maybe HexString
Documentation
isValidShieldedAddress :: ByteString -> Bool #
Check if given bytesting is a valid encoded shielded address
getShieldedOutputs :: HexString -> [ShieldedOutput] #
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
decodeSaplingOutputFvk :: ByteString -> ShieldedOutput -> Scope -> Int64 -> Maybe DecodedNote #
Attempt to decode the given ShieldedOutput
using the given Sapling full viewing key
decodeSaplingOutputIvk :: ByteString -> ShieldedOutput -> Maybe DecodedNote #
Attempt to decode the given ShieldedOutput
using the given Sapling incoming 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
genSaplingReceiverFvk :: Int -> ByteString -> Maybe SaplingReceiver #
Attempts to generate a Sapling receiver using an full viewing key and a diversifier index
genSaplingReceiverIvk :: Int -> ByteString -> Maybe SaplingReceiver #
Attempts to generate a Sapling receiver using an incoming viewing key and a diversifier index
genSaplingInternalAddress :: SaplingSpendingKey -> Maybe SaplingReceiver #
Generate an internal Sapling address
genSaplingInternalAddressFvk :: ByteString -> Maybe SaplingReceiver #
Generate a change Sapling receiver from Full Viewing Key
getSaplingNodeValue :: ByteString -> Maybe HexString #
combineSaplingNodes :: Int8 -> HexString -> HexString -> Maybe HexString #
getSaplingRootTest :: Int8 -> HexString #
getSaplingTreeAnchor :: SaplingCommitmentTree -> HexString #
getSaplingPathAnchor :: HexString -> MerklePath -> HexString #
Arguments
:: SaplingFrontier | the base tree |
-> HexString | the new note commitment |
-> Maybe SaplingFrontier |
Update a Sapling commitment tree
getSaplingWitness :: SaplingFrontier -> Maybe SaplingWitness #
Get the Sapling incremental witness from a commitment tree
getSaplingNotePosition :: SaplingWitness -> Integer #
Get the Sapling note position from a witness
updateSaplingWitness :: SaplingWitness -> [HexString] -> SaplingWitness #
encodeSaplingAddress :: ZcashNet -> SaplingReceiver -> Maybe Text #
Encode a SaplingReceiver into HRF text
decodeSaplingAddress :: ByteString -> Maybe SaplingAddress #
decode a Sapling address
Arguments
:: SaplingSpendingKey | The Sapling spending key |
-> Maybe HexString |
Derive a Sapling Full Viewing Key
Arguments
:: SaplingSpendingKey | The Sapling spending key |
-> Maybe HexString |
Derive a Sapling Incoming Viewing Key
Orphan instances
FromJSON RawTxResponse # | |
Methods parseJSON :: Value -> Parser RawTxResponse # parseJSONList :: Value -> Parser [RawTxResponse] # |