Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitminter

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitminter

API methods for BitMinter.com (unofficial)

  • 2.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

bitminter

Bitminter API methods for Node.js (unofficial)

npm Build Status Dependency Status Coverage Status Greenkeeper badge

Example

If you want to call users methods, you need to set the apikey. The pool methods work without it.

var bitminter = require ('bitminter') ({
  apikey: 'abc123'
});

bitminter.users.get (function (err, user) {
  if (err) {
    return console.log (err);
  }

  console.log (user.hash_rate);
});

Installation

npm install bitminter

Configuration

The module function takes a configuration object.

settingtypedefaultdescription
apikeystringAccount API key
timeoutnumber5000Wait time in milliseconds
var config = {
  apikey: 'abc123',
  timeout: 30000
};

var bitminter = require ('bitminter') (config);

pool.stats

( callback )

Pool statistics object

bitminter.pool.stats (console.log);

pool.hashrate

( callback )

Current pool hash rate number

bitminter.pool.hashrate (console.log);

pool.workers

( callback )

Current pool workers number

bitminter.pool.workers (console.log);

pool.users

( callback )

Current pool users number

bitminter.pool.users (console.log);

pool.round

( callback )

Current pool round object

bitminter.pool.round (console.log);

pool.blocks

( [options], callback )

Current pool blocks array

optiontypedefaultdescription
maxnumber10Entries to return
offsetnumber0Skip this many entries
commoditystringallLimit commodity, i.e. BTC
bitminter.pool.blocks ({ max: 5 }, console.log);

pool.shifts

( [options], callback )

Current pool shifts array

optiontypedefaultdescription
maxnumber10Entries to return
offsetnumber0Skip this many entries
bitminter.pool.shifts ({ offset: 10 }, console.log);

pool.top50

( callback )

Pool top 50 object

bitminter.pool.top50 (console.log);

users.get

( [username], callback )

Get stats and details object about yourself or a user, provided you have sufficient access.

argumenttyperequireddefaultdescription
usernamestringnonullUsername to lookup
callbackfunctionyesProcess results
// Yourself
bitminter.users.get (console.log);

// Someone else
bitminter.users.get ('SomeUser', console.log);

Unlicense

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to http://unlicense.org/

Author

Franklin van de Meent

Buy me a coffee

Keywords

FAQs

Package last updated on 12 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc