miner-rpc
This is a simple Node.js module that talks to the CGMiner and BFGMiner RPC APIs.
Installation
Make sure your miner is running with the --api-listen
option and (if needed)
an appropriate --api-allow
option, then:
-
In your project folder:
npm install miner-rpc
-
System-wide, using the command-line script:
sudo npm install -g miner-rpc miner-rpc localhost devs
Usage
host
, port
, and params
are optional. host
defaults to localhost,
port
defaults to 4028, and params
is empty by default.
var rpc = ; var client = rpc; client;
Examples
client; client; client;
See the CGMiner RPC API Readme or the BFGMiner RPC API Readme for more example commands.