Merge pull request #1391 from raistlinthewiz/next
Added two brand new api calls; getblockstats and getpoolinfo
This commit is contained in:
commit
9f7e81748e
11
POOLS.md
11
POOLS.md
@ -177,13 +177,16 @@ Small Time Miners are running various stratum only pools for different coins.
|
||||
|
||||
### [Coinium.org](http://www.coinium.org/ "Coinium.org") ([@raistlinthewiz](https://github.com/raistlinthewiz/ "raistlinthewiz on GitHub"))
|
||||
|
||||
[Coinium.org](http://coinium.org/ "Coinium.org") - high performance pool network that is hosted in UK.
|
||||
[Coinium.org](http://coinium.org/ "Coinium.org") - high performance pool network.
|
||||
|
||||
| Pool URL | Coin | Avg. Hashrate | Avg. Active Workers | Notes |
|
||||
| -------------------------------- | ----- | ------------: | ------------------: | ----- |
|
||||
| http://doge.coinium.org | DOGE | 50 Mhs | ~100 workers | PPLNS |
|
||||
| http://emd.coinium.org | EMD | 10 Mhs | ~10 workers | PPLNS |
|
||||
| http://earth.coinium.org | EAC | 15 Mhs | ~30 workers | PPLNS |
|
||||
| http://earth.coinium.org | EAC | 600 Mhs | ~500 workers | PPLNS |
|
||||
| http://cat.coinium.org | CAT | 100 Mhs | ~100 workers | PPLNS |
|
||||
| http://doge.coinium.org | DOGE | 50 Mhs | ~100 workers | PPLNS |
|
||||
| http://emd.coinium.org | EMD | 15 Mhs | ~30 workers | PPLNS |
|
||||
| http://lot.coinium.org | LOT | 15 Mhs | ~30 workers | PPLNS |
|
||||
| http://moon.coinium.org | MOON | 15 Mh s | ~30 workers | PPLNS |
|
||||
|
||||
### t3chie
|
||||
|
||||
|
||||
19
public/include/pages/api/getblockstats.inc.php
Normal file
19
public/include/pages/api/getblockstats.inc.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
// Make sure we are called from index.php
|
||||
if (!defined('SECURITY')) die('Hacking attempt');
|
||||
|
||||
// Check if the API is activated
|
||||
$api->isActive();
|
||||
|
||||
// Check user token
|
||||
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
||||
|
||||
$blocks = $statistics->getLastBlocksbyTime();
|
||||
|
||||
// Output JSON format
|
||||
echo $api->get_json($blocks);
|
||||
|
||||
// Supress master template
|
||||
$supress_master = 1;
|
||||
?>
|
||||
35
public/include/pages/api/getpoolinfo.inc.php
Normal file
35
public/include/pages/api/getpoolinfo.inc.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
// Make sure we are called from index.php
|
||||
if (!defined('SECURITY')) die('Hacking attempt');
|
||||
|
||||
// Check if the API is activated
|
||||
$api->isActive();
|
||||
|
||||
// Check user token
|
||||
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
||||
|
||||
// Output JSON format
|
||||
$data = array(
|
||||
// coin info
|
||||
'currency' => $config[currency],
|
||||
'coinname' => $config[gettingstarted][coinname],
|
||||
// coin algorithm info
|
||||
'cointarget' => $config[cointarget],
|
||||
'coindiffchangetarget' => $config[coindiffchangetarget],
|
||||
'algorithm' => $config[algorithm],
|
||||
// stratum
|
||||
'stratumport' => $config[gettingstarted][stratumport],
|
||||
// payments
|
||||
'payout_system' => $config[payout_system],
|
||||
'min_ap_threshold' => $config[ap_threshold][min],
|
||||
'max_ap_threshold' => $config[ap_threshold][max],
|
||||
'txfee' => $config[txfee],
|
||||
'fees' => $config[fees],
|
||||
);
|
||||
|
||||
echo $api->get_json($data);
|
||||
|
||||
// Supress master template
|
||||
$supress_master = 1;
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user