network-bitcoin-1.8.3: An interface to bitcoind.

Safe HaskellNone



An interface to bitcoind's available network-related RPC calls. The implementation of these functions can be found at

If any APIs are missing, patches are always welcome. If you look at the source of this module, you'll see that the interface code is trivial.



type Client = ByteString -> IO ByteString Source #

Client describes authentication credentials and host info for making API requests to the Bitcoin daemon.

getClient :: String -> ByteString -> ByteString -> IO Client Source #

getClient takes a url, rpc username, and rpc password and returns a Client that can be used to make API calls. Each Client encloses a Manager (from http-client) that re-uses connections for requests, so long as the same Client is is used for each call.

getConnectionCount :: Client -> IO Integer Source #

Returns the number of connections to other nodes.

data PeerInfo Source #

Information about a peer node of the Bitcoin network.

The documentation for this data structure is incomplete, as I honestly don't know what some of these fields are for. Patches are welcome!




getPeerInfo :: Client -> IO [PeerInfo] Source #

Returns data about all connected peer nodes.