Compare commits
2 commits
75c95b03dc
...
f95ebc7b00
Author | SHA1 | Date | |
---|---|---|---|
f95ebc7b00 | |||
09cee9a064 |
4 changed files with 12 additions and 6 deletions
|
@ -5,13 +5,15 @@ 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.4.0]
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- Function to encode a human-readable transparent address
|
||||
- Function to generate a seed phrase
|
||||
- Implementations of `Read` for types
|
||||
- Function to make RPC calls to `zebrad`
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: zcash-haskell
|
||||
version: 0.4.1
|
||||
version: 0.4.2
|
||||
git: "https://git.vergara.tech/Vergara_Tech/zcash-haskell"
|
||||
license: MIT
|
||||
author: "Rene Vergara"
|
||||
|
|
|
@ -26,6 +26,7 @@ import Control.Monad.IO.Class
|
|||
import Data.Aeson
|
||||
import qualified Data.ByteString as BS
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Text.Encoding as E
|
||||
import Foreign.Rust.Marshall.Variable
|
||||
import Network.HTTP.Simple
|
||||
import ZcashHaskell.Types
|
||||
|
@ -62,13 +63,16 @@ makeZcashCall username password m p = do
|
|||
-- | Make a Zebra RPC call
|
||||
makeZebraCall ::
|
||||
(MonadIO m, FromJSON a)
|
||||
=> Int -- ^ Port for `zebrad`
|
||||
=> T.Text -- ^ Hostname for `zebrad`
|
||||
-> Int -- ^ Port for `zebrad`
|
||||
-> T.Text -- ^ RPC method to call
|
||||
-> [Data.Aeson.Value] -- ^ List of parameters
|
||||
-> m (Response a)
|
||||
makeZebraCall port m params = do
|
||||
makeZebraCall host port m params = do
|
||||
let payload = RpcCall "2.0" "zh" m params
|
||||
let myRequest =
|
||||
setRequestBodyJSON payload $
|
||||
setRequestPort port $ setRequestMethod "POST" defaultRequest
|
||||
setRequestPort port $
|
||||
setRequestHost (E.encodeUtf8 host) $
|
||||
setRequestMethod "POST" defaultRequest
|
||||
httpJSON myRequest
|
||||
|
|
|
@ -5,7 +5,7 @@ cabal-version: 1.12
|
|||
-- see: https://github.com/sol/hpack
|
||||
|
||||
name: zcash-haskell
|
||||
version: 0.4.1
|
||||
version: 0.4.2
|
||||
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