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

1.0.4 • Public • Published

Unofficial Luxor Pool JavaScript API Client

Version Try on RunKit

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

Installation

npm install luxorpool
# or
yarn add luxorpool

Usage

The package needs to be configured with an API key from your Luxor account:

  1. Log in to Luxor.
  2. Go to Settings > API Keys > Generate new Key.
import { Luxor } from 'luxorpool'

const luxor = new Luxor({
  key: 'YOUR_API_KEY',
  coin: 'BTC',
  units: 'TH'
})

async function example() {
  const subaccounts = await luxor.getSubaccounts()
  const hashrate = await luxor.getPoolHashrate()
  const transactions = await luxor.getTransactionHistory('YOUR_SUBACOUNT')
  // etc.
}

Documentation

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

/luxorpool/

    Package Sidebar

    Install

    npm i luxorpool

    Weekly Downloads

    20

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    88.2 kB

    Total Files

    21

    Last publish

    Collaborators

    • scottpickering