WaffleAPI
Waffle pool API gem
Installation
Ruby 2+
gem install waffle_api
Usage
require 'waffle_pool'
client = WaffleAPI::Client.new address: '1Ju8U9Ukfc5kiMqzQrRgQBP1JvRkeSv94V'
Get current total hashrate
client.hashrate
Get workers infos
client.worker_hashrates
Will return a JSON array
[
{
"username": "1Ju8U9Ukfc5kiMqzQrRgQBP1JvRkeSv94V_calyhrerig1",
"hashrate": 2529705,
"stalerate": 3.33,
"last_seen": 1398022030,
"str": "2.53 MH/s"
},
{
"username": "1Ju8U9Ukfc5kiMqzQrRgQBP1JvRkeSv94V_dqmsrig1",
"hashrate": 1773702,
"stalerate": 1.61,
"last_seen": 1398022030,
"str": "1.77 MH/s"
}
]
Get balances
client.balances
Will return a JSON array
{
"sent": 1.61039009,
"confirmed": 0.00383488,
"unconverted": 0.011964213459441
}
Get payments
client.recent_payments
Will return a JSON array containing the last 10 payments
[
{
"amount": "0.01715311",
"time": "2014-04-20 16:03:24",
"txn": "8706e0a..."
},
{
"amount": "0.01600557",
"time": "2014-04-20 04:36:01",
"txn": "258dda8..."
},
{
"..."
}
]
Contributing
Licence
Released under the MIT License. See the LICENSE file for further details.

