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

prohashing

1.0.5 • Public • Published

Prohashing JS

Simple implementation of the Prohashing WAMP interface

Installation

npm install prohashing

Dependencies

Config

  • apiKey Your Prohashing API Key
  • degug True or False on whether or not to output debugging information
  • subscribe Either "all" (for all events) or an array containing the events you want to subscribe to.
    Options are : ['miners', 'profitability', 'systemStatus', 'blocks'] . See the API Documentation https://prohashing.com/help.html for full details on each.

Usage

const prohashing = require("prohashing")
const connection = new prohashing({ 
    apiKey: "0a7a6fade943f7b6b9e96b4d1516bfcc733b5158af18d1b43aeec7e45a238c02", 
    debug: false ,
    subscribe : ['systemStatus', 'miners']
})
 
connection.on("minerStatus", (update) => {
    console.log("MINER UPDATE")
    console.log(update)
})
 
connection.on("balanceStatus", (update) => {
    console.log("BALANCE UPDATE")
    console.log(update)
})
 
connection.on("connected", (details, session) => {
    console.log("Connected to Prohashing WAMP")
})
 
connection.on("block", (block) => {
    console.log("BLOCK UPDATE")
    console.log(block)
})
 
connection.on("systemStatus", (status) => {
    console.log("STATUS", status)
})

Keywords

none

Install

npm i prohashing

DownloadsWeekly Downloads

1

Version

1.0.5

License

ISC

Unpacked Size

4.83 kB

Total Files

3

Last publish

Collaborators

  • avatar