Page
Library
Module
Module type
Parameter
Class
Class type
Source
BitcoinOCaml interface to the official Bitcoin client API.
Raised when connection parameter is not given and no default connection exists.
Raised when connection parameter is not given and no default connection exists.
Error reported by the Bitcoin client.
Error reported by the Bitcoin client.
Unexpected response from the Bitcoin client
Unexpected response from the Bitcoin client
Connection error reported by the HTTPCLIENT
Bitcoin address (hash of the public portion of public/private ECDSA keypair)
Besides the default account, one may also create named accounts
Besides the default account, one may also create named accounts
Amount in BTC, represented as a multiple of Bitcoin's base unit (= 10 nanoBTC).
Amount in BTC, represented as a multiple of Bitcoin's base unit (= 10 nanoBTC).
Transaction identifier
type txoutput_t = txid_t * intTransaction identifier
Transaction output
Hex representation of mining work data
Multi-signature addresses may take either format
type assoc_t = (string * Yojson.Safe.json) listNode representation
Association list
module type HTTPCLIENT = sig ... endInterface that any module offering HTTP POST client calls must obey. Note that the module may require POST calls to be wrapped under a custom monad, which must also be provided (use the identity monad if no actual monad is required).
module type CONNECTION = sig ... endModule encapsulating all connection information.
module type ENGINE = sig ... endActual engine offering the Bitcoin API.
val amount_of_float : float -> amount_tConverts a BTC quantity expressed as a float into its amount_t representation.
val float_of_amount : amount_t -> floatConverts a BTC quantity expressed as an amount_t into its float representation.
module Make
(Httpclient : HTTPCLIENT)
(Connection : CONNECTION) :
ENGINE with type 'a monad_t = 'a Httpclient.Monad.tFunctor that takes a concrete implementation of a HTTPCLIENT and actual CONNECTION information, and creates a module with signature ENGINE offering an API for communicating with a Bitcoin client.