const HpoolApi = require('hpool-api');
(async () => {
const client = new HpoolApi('my-api-key', 'my-user-name', 'connection cookie string');
try {
const capacity = await client.getPoolCapacityInGB();
const onlineUser = await client.getPoolUserOnline();
const onlineMiner = await client.getPoolMinerOnline();
const pendingBalance = await client.getPendingBalance();
const mortgageInfo = await client.getMortgageInfo();
const miner = await client.getMiner();
const minedBlocksHistory = await client.getMinedBlocksHistory();
const earningsHistory = await client.getEarningsHistory();
const earningDetailsHistory = await client.getEarningDetailsHistory();
const submittedDeadlinesHistory = await client.getSubmittedDeadlinesHistory();
const balanceActivityHistory = await client.getBalanceActivityHistory();
const withdrawHistory = await client.getWithdrawHistory();
const boundPlotter = await client.getBoundPlotter();
} catch (err) {
console.error(err);
}
})();
GNU GPLv3 (see LICENSE)