{"id":16042492,"url":"https://github.com/nylen/node-miner-rpc","last_synced_at":"2025-10-04T20:07:10.152Z","repository":{"id":15007634,"uuid":"17733146","full_name":"nylen/node-miner-rpc","owner":"nylen","description":"CGMiner and BFGMiner RPC client for Node.js","archived":false,"fork":false,"pushed_at":"2014-03-14T02:35:03.000Z","size":100,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T08:02:49.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nylen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-14T02:33:33.000Z","updated_at":"2025-03-09T08:53:40.000Z","dependencies_parsed_at":"2022-09-20T23:02:37.028Z","dependency_job_id":null,"html_url":"https://github.com/nylen/node-miner-rpc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylen%2Fnode-miner-rpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylen%2Fnode-miner-rpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylen%2Fnode-miner-rpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylen%2Fnode-miner-rpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nylen","download_url":"https://codeload.github.com/nylen/node-miner-rpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244147342,"owners_count":20405942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T00:02:04.646Z","updated_at":"2025-10-04T20:07:05.101Z","avatar_url":"https://github.com/nylen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# miner-rpc\n\nThis is a simple Node.js module that talks to the\n[CGMiner](https://github.com/ckolivas/cgminer/blob/master/API-README)\nand\n[BFGMiner](https://github.com/luke-jr/BFGMiner/blob/BFGMiner/README.RPC)\nRPC APIs.\n\n## Installation\n\nMake sure your miner is running with the `--api-listen` option and (if needed)\nan appropriate `--api-allow` option, then:\n\n- In your project folder:\n\n  ```\n  npm install miner-rpc\n  ```\n\n- System-wide, using the command-line script:\n\n  ```\n  sudo npm install -g miner-rpc\n  miner-rpc localhost devs\n  ```\n\n## Usage\n\n`host`, `port`, and `params` are optional.  `host` defaults to **localhost**,\n`port` defaults to **4028**, and `params` is empty by default.\n\n```js\nvar rpc = require('miner-rpc');\n\nvar client = rpc.client(host, port);\n\nclient.get(cmd, params, function(err, data, raw) {\n    // err  : the error that occurred, if any\n    // data : the sanitized response from the miner, with a '_status' property\n    // raw  : the raw response from the miner\n});\n```\n\n## Examples\n\n```js\nclient.get('devs', function(err, data) {\n    // data contains a list of devices active in the miner\n});\n\nclient.get('coin', function(err, data) {\n    // data contains some information about the currency being mined, including\n    // the network difficulty\n});\n\nclient.get('pgaset', '0,fan,80', function(err, data) {\n    // Tries to set device 0 fan to 80%.  If access to privileged commands is\n    // denied, err will be set; otherwise, data will be the status object\n    // returned from the miner.\n});\n```\n\nSee the\n[CGMiner RPC API Readme](https://github.com/ckolivas/cgminer/blob/master/API-README)\nor the\n[BFGMiner RPC API Readme](https://github.com/luke-jr/BFGMiner/blob/BFGMiner/README.RPC)\nfor more example commands.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylen%2Fnode-miner-rpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnylen%2Fnode-miner-rpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylen%2Fnode-miner-rpc/lists"}