Copyright | 2022-2024 Vergara Technologies |
---|---|
License | MIT |
Maintainer | pitmutt@vergara.tech |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- decodeSaplingOutputEsk :: SaplingSpendingKey -> ShieldedOutput -> ZcashNet -> Scope -> Integer -> Maybe DecodedNote
- genSaplingSpendingKey :: Seed -> CoinType -> Int -> Maybe SaplingSpendingKey
- genSaplingPaymentAddress :: Int -> SaplingSpendingKey -> Maybe SaplingReceiver
- genSaplingInternalAddress :: SaplingSpendingKey -> Maybe SaplingReceiver
- updateSaplingCommitmentTree :: SaplingCommitmentTree -> HexString -> Maybe SaplingCommitmentTree
- getSaplingWitness :: SaplingCommitmentTree -> Maybe SaplingWitness
- getSaplingNotePosition :: SaplingWitness -> Integer
- updateSaplingWitness :: SaplingWitness -> [HexString] -> SaplingWitness
- encodeSaplingAddress :: ZcashNet -> SaplingReceiver -> Maybe Text
- getNetId :: [Word8] -> ZcashNet
- decodeSaplingAddress :: ByteString -> Maybe SaplingAddress
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
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
:: 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
updateSaplingWitness :: SaplingWitness -> [HexString] -> SaplingWitness #
encodeSaplingAddress :: ZcashNet -> SaplingReceiver -> Maybe Text #
Encode a SaplingReceiver into HRF text
decodeSaplingAddress :: ByteString -> Maybe SaplingAddress #
decode a Sapling address