1.2.0 • Published 7 years ago
coinhive-nodejs v1.2.0
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)