2.1.6 • Published 6 years ago

bitminter v2.1.6

Weekly downloads
3
License
Unlicense
Repository
github
Last release
6 years ago

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

2.1.6

6 years ago

2.1.5

8 years ago

2.1.3

8 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.9

8 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

11 years ago