Compare commits
No commits in common. "874db2907eca4d2a6ae8c50bf0864daca3290b19" and "148abd95d0fcce4b4a5a0569a9bedd55a17b8140" have entirely different histories.
874db2907e
...
148abd95d0
4 changed files with 19 additions and 28 deletions
|
@ -5,12 +5,6 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.6.2.0]
|
||||
|
||||
### Changed
|
||||
|
||||
- Performance enhancement for transaction creation
|
||||
|
||||
## [0.6.1.1]
|
||||
|
||||
### Added
|
||||
|
|
6
configure
vendored
6
configure
vendored
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
echo -e "\n"
|
||||
echo "export PKG_CONFIG_PATH=$(pwd)/librustzcash-wrapper/target/x86_64-unknown-linux-gnu/debug:\$PKG_CONFIG_PATH" | tee -a ~/.bashrc
|
||||
echo "export LD_LIBRARY_PATH=$(pwd)/librustzcash-wrapper/target/x86_64-unknown-linux-gnu/debug:\$LD_LIBRARY_PATH" | tee -a ~/.bashrc
|
||||
|
||||
echo "export PKG_CONFIG_PATH=$HOME/.local/share/zcash-haskell:\$PKG_CONFIG_PATH" | tee -a ~/.bashrc
|
||||
echo "export LD_LIBRARY_PATH=$HOME/.local/share/zcash-haskell:\$LD_LIBRARY_PATH" | tee -a ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
|
|
@ -136,25 +136,22 @@ createTransaction ::
|
|||
-> Bool -- ^ True to build, False to estimate fee
|
||||
-> Either TxError HexString
|
||||
createTransaction sapAnchor orchAnchor tSpend sSpend oSpend outgoing sParams oParams znet bh build =
|
||||
processResult $! txResult
|
||||
if BS.length (hexBytes txResult) > 1
|
||||
then Right txResult
|
||||
else case head (BS.unpack $ hexBytes txResult) of
|
||||
0 -> Left InsufficientFunds
|
||||
1 -> Left ChangeRequired
|
||||
2 -> Left Fee
|
||||
3 -> Left Balance
|
||||
4 -> Left TransparentBuild
|
||||
5 -> Left SaplingBuild
|
||||
6 -> Left OrchardBuild
|
||||
7 -> Left OrchardSpend
|
||||
8 -> Left OrchardRecipient
|
||||
9 -> Left SaplingBuilderNotAvailable
|
||||
10 -> Left OrchardBuilderNotAvailable
|
||||
_ -> Left ZHError
|
||||
where
|
||||
processResult :: HexString -> Either TxError HexString
|
||||
processResult input =
|
||||
if BS.length (hexBytes input) > 1
|
||||
then Right input
|
||||
else case head (BS.unpack $ hexBytes input) of
|
||||
0 -> Left InsufficientFunds
|
||||
1 -> Left ChangeRequired
|
||||
2 -> Left Fee
|
||||
3 -> Left Balance
|
||||
4 -> Left TransparentBuild
|
||||
5 -> Left SaplingBuild
|
||||
6 -> Left OrchardBuild
|
||||
7 -> Left OrchardSpend
|
||||
8 -> Left OrchardRecipient
|
||||
9 -> Left SaplingBuilderNotAvailable
|
||||
10 -> Left OrchardBuilderNotAvailable
|
||||
_ -> Left ZHError
|
||||
txResult =
|
||||
withPureBorshVarBuffer $
|
||||
rustWrapperCreateTx
|
||||
|
|
|
@ -5,7 +5,7 @@ cabal-version: 3.0
|
|||
-- see: https://github.com/sol/hpack
|
||||
|
||||
name: zcash-haskell
|
||||
version: 0.6.2.0
|
||||
version: 0.6.1.1
|
||||
synopsis: Utilities to interact with the Zcash blockchain
|
||||
description: Please see the README on the repo at <https://git.vergara.tech/Vergara_Tech/zcash-haskell#readme>
|
||||
category: Blockchain
|
||||
|
|
Loading…
Reference in a new issue