coinhive-nodejs

1.2.0 • Public • Published

Coinhive NodeJs module

initialization

var coinhive = require('coinhive-nodejs');
var mycoinhive = new coinhive('public_key', 'private_key');

Create a link with coinhive

const params = {
  link: 'https://thomas-t.fr', // The link where you want to redirect
  hashes: 1024, // The number of hashes you want for redirect the user
  onError: function(params){
    // This function is optional
  }
}
 
const callback = function(link){
  // Make an happy world with your link :)
}
mycoinhive.create_link(params, callback)

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i coinhive-nodejs

    Weekly Downloads

    1

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    3.22 kB

    Total Files

    4

    Last publish

    Collaborators

    • thomast_404