bitcoin-hs-0.0.1: Partial implementation of the Bitcoin protocol (as of 2013)

Safe HaskellNone
LanguageHaskell98

Bitcoin.RPC.Call

Description

wrappers around the RPC calls

Synopsis

Documentation

type Call a = ReaderT BitcoinURI IO (Either String a) Source #

Type of an RPC call (without arguments)

runCalls :: BitcoinURI -> ReaderT BitcoinURI IO a -> IO a Source #

Executes the "call monad"

newRequestId :: IO String Source #

Creates a unique request id, using a combination of a counter and a random number.

class ParamList l where Source #

Things which can be converted to an RPC call parameter list.

Minimal complete definition

paramListJSON

Methods

paramListJSON :: l -> [JSValue] Source #

Instances

ParamList () Source # 

Methods

paramListJSON :: () -> [JSValue] Source #

JSON a => ParamList [a] Source # 

Methods

paramListJSON :: [a] -> [JSValue] Source #

(JSON a, JSON b) => ParamList (a, b) Source # 

Methods

paramListJSON :: (a, b) -> [JSValue] Source #

(JSON a, JSON b, JSON c) => ParamList (a, b, c) Source # 

Methods

paramListJSON :: (a, b, c) -> [JSValue] Source #

(JSON a, JSON b, JSON c, JSON d) => ParamList (a, b, c, d) Source # 

Methods

paramListJSON :: (a, b, c, d) -> [JSValue] Source #

(JSON a, JSON b, JSON c, JSON d, JSON e) => ParamList (a, b, c, d, e) Source # 

Methods

paramListJSON :: (a, b, c, d, e) -> [JSValue] Source #

(JSON a, JSON b, JSON c, JSON d, JSON e, JSON f) => ParamList (a, b, c, d, e, f) Source # 

Methods

paramListJSON :: (a, b, c, d, e, f) -> [JSValue] Source #

makeCall :: ParamList l => String -> l -> (JSValue -> Maybe a) -> Call a Source #

Generic API call