Neanderthals Programming Machines
    Have ideas to improve npm?Join in the discussion! »

    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)

    Install

    npm i coinhive-nodejs

    DownloadsWeekly Downloads

    4

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    3.22 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar