HDPool API
Usage
Public API
const HDPoolPublicApi = ; const client = ; async { await client; const poolStats = await client; const loginCodeResponse = await client; // Retrieve login code png const loginResponse = await client; client;};
Account API
const HDPoolAccountApi = ; const userId = 12345;const sessionKey = 'rOw7vZuqaC0GbapWGxeUECwLfDJaE2J74aCrmgnRfroolPuMOZUX7GotMRsy'; const client = userId sessionKey; async { await client; const userInfo = await client; const earningsStats = await client; const miners = await client; const pledgeState = await client; const boundPlotter = await client; const depositHistory = await client; const withdrawHistory = await client; const earningsHistory = await client; const expectedEarningsHistory = await client; const poolStats = await client; const nextFreePaymentDate = await client; // When we can send a payout without paying fees await client; // withdraw 5 BHD await client; // Cancel the withdraw with id 1234 const depositAddr= await client; // retrieve your deposit addr client;};
Mining API
const HDPoolMiningApi = ; const accountKey = 'dpvwfv34-xprf-15t2xwb12o8yglm4palf55';const minerName = 'Miner 1';const capacityInGB = 512; const client = accountKey minerName capacityInGB; async { await client; const miningInfo = await client; client; client;};
Obtaining the userId and sessionKey
- Login to hdpool
- Open the dev console (F12) and enter
localStorage.getItem('sess')
into the console - Copy the uid (userId) and key (sessionKey) values
License
GNU GPLv3 (see LICENSE)