slushpool
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

Slush Pool JavaScript Library

Version Try on RunKit

This unofficial Slush Pool library provides convenient access to the Slush Pool API from client-side and server-side JavaScript applications.

Installation

npm install slushpool
# or
yarn add slushpool

Usage

The package needs to be configured with an access token from your Slush Pool account:

  1. Log in to Slush Pool.
  2. Go to Settings > Access Profiles.
  3. Select an existing access profile or create a new one.
  4. Select Allow access to web APIs in the access profile details.
  5. Click Generate new token.
  6. Click Save.
import slushpool from 'slushpool'

async function example() {
  slushpool.init('YOUR_SLUSH_POOL_ACCESS_TOKEN')
  const stats = await slushpool.stats()
  const profile = await slushpool.profile()
  const rewards = await slushpool.rewards()
  const workers = await slushpool.workers()
}

Documentation

This library is a pretty lightweight wrapper around the Slush Pool API, so Slush Pool's API documentation is probably helpful. It also includes type definitions, so it should be convenient for TypeScript folks.

Package Sidebar

Install

npm i slushpool

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

31.9 kB

Total Files

8

Last publish

Collaborators

  • scottpickering