Improve mining pool interface, added GoBrrr pool, Public Pool and Satoshi Radio pool

This commit is contained in:
Djuri Baars 2024-12-20 04:00:09 +01:00
parent f613c7e9a1
commit aeee5238b3
19 changed files with 274 additions and 26 deletions

View file

@ -1,5 +0,0 @@
#include <array>
#include <string>
std::array<std::string, NUM_SCREENS> parseMiningPoolStatsHashRate(std::string text);
std::array<std::string, NUM_SCREENS> parseMiningPoolStatsDailyEarnings(int sats, std::string label);

View file

@ -1138,8 +1138,134 @@ const unsigned char epd_icons_noderunners_logo [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0
}; };
// 'gobrrr', 122x122px
const unsigned char epd_icons_gobrrr_logo [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb3, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x10, 0x48, 0x84, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x24, 0x84, 0x20, 0x21, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x82, 0x25, 0x19, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xf8, 0x28, 0x18, 0x20, 0x41, 0x4c, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xe0, 0x83, 0x21, 0x88, 0x84, 0x21, 0x01, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0x8c, 0x48, 0x24, 0x09, 0x24, 0x82, 0x60, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0x21, 0x08, 0x80, 0x61, 0x08, 0x18, 0x0a, 0x3f, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xfc, 0x02, 0x22, 0x19, 0x04, 0x42, 0x41, 0x88, 0x0f, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xf0, 0x98, 0x82, 0x42, 0x1b, 0x11, 0x04, 0x21, 0x23, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xe2, 0x20, 0x50, 0x42, 0xff, 0xe4, 0x64, 0x24, 0x83, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xc8, 0x46, 0x14, 0x93, 0xff, 0xf8, 0x01, 0x84, 0x28, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0x03, 0x10, 0x81, 0x0f, 0xff, 0xfe, 0x98, 0x11, 0x08, 0x3f, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xfe, 0x24, 0x01, 0x24, 0x5f, 0xff, 0xff, 0x02, 0x42, 0x42, 0x3f, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xfc, 0x88, 0xa9, 0x04, 0x3f, 0xff, 0xff, 0x90, 0x48, 0x21, 0x0f, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xf8, 0x42, 0x22, 0x51, 0xbf, 0xf3, 0xff, 0xc5, 0x09, 0x0c, 0x47, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xf3, 0x10, 0x40, 0x00, 0x7f, 0xc0, 0x7f, 0xc4, 0x21, 0x10, 0x93, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xe0, 0x25, 0x14, 0xaa, 0xff, 0x0c, 0x1f, 0xc8, 0x84, 0x42, 0x09, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xe4, 0x80, 0x04, 0x82, 0xfe, 0x21, 0x0f, 0x82, 0x50, 0x88, 0x63, 0xff, 0xff, 0xc0,
0xff, 0xff, 0x84, 0x4a, 0xc8, 0x11, 0xfc, 0x81, 0x27, 0x21, 0x06, 0x23, 0x00, 0xff, 0xff, 0xc0,
0xff, 0xff, 0x91, 0x10, 0x02, 0x45, 0xfc, 0x18, 0x42, 0x18, 0x3f, 0xf0, 0x18, 0x7f, 0xff, 0xc0,
0xff, 0xff, 0x10, 0x91, 0x31, 0x13, 0xf9, 0x42, 0x10, 0x82, 0x7f, 0xfc, 0x82, 0x3f, 0xff, 0xc0,
0xff, 0xfe, 0x46, 0x04, 0x04, 0x43, 0xf8, 0x04, 0x8c, 0x21, 0xff, 0xfe, 0x62, 0x1f, 0xff, 0xc0,
0xff, 0xfc, 0x00, 0x62, 0x42, 0x13, 0xf8, 0xb0, 0x41, 0x0c, 0xff, 0xff, 0x08, 0xcf, 0xff, 0xc0,
0xff, 0xfc, 0xa9, 0x08, 0x98, 0x8b, 0xf2, 0x03, 0x10, 0xc3, 0xff, 0xff, 0x80, 0x0f, 0xff, 0xc0,
0xff, 0xf8, 0x81, 0x04, 0x80, 0x8b, 0xf2, 0x48, 0x26, 0x13, 0xf8, 0x3f, 0xd5, 0x27, 0xff, 0xc0,
0xff, 0xf2, 0x14, 0x61, 0x24, 0x23, 0xf0, 0x88, 0x80, 0x17, 0xf0, 0x0f, 0xc4, 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, 0xff, 0xf3, 0xfe, 0x7f, 0x93, 0x04, 0x1f, 0xc0,
0xfc, 0x88, 0xcf, 0xff, 0xff, 0xf2, 0x1f, 0xff, 0xff, 0xf1, 0xff, 0xff, 0x84, 0x49, 0x2f, 0xc0,
0xfc, 0x46, 0x0f, 0xff, 0xff, 0xf8, 0x8f, 0xff, 0xff, 0xf0, 0xff, 0xfe, 0x20, 0x40, 0x8f, 0xc0,
0xfc, 0x10, 0x27, 0xff, 0xff, 0xfc, 0xa7, 0xff, 0xfe, 0xf2, 0x7f, 0xfe, 0x29, 0x12, 0x1f, 0xc0,
0xf9, 0x81, 0x27, 0xf0, 0x2f, 0xfe, 0x01, 0xff, 0xf8, 0x12, 0x3f, 0xf8, 0x82, 0x12, 0x47, 0xc0,
0xf8, 0x29, 0x0f, 0xe2, 0x01, 0xff, 0x18, 0x7f, 0xc1, 0x00, 0x87, 0x80, 0x12, 0x40, 0x47, 0xc0,
0xfa, 0x22, 0x4f, 0xe8, 0xc4, 0xff, 0x22, 0x00, 0x04, 0x4c, 0x10, 0x25, 0x40, 0x4c, 0x17, 0xc0,
0xf8, 0x84, 0x17, 0xe1, 0x10, 0xff, 0x00, 0x80, 0x24, 0x41, 0x40, 0x04, 0x19, 0x01, 0x87, 0xc0,
0xf1, 0x11, 0x27, 0xe4, 0x12, 0x7f, 0x4c, 0x24, 0x91, 0x11, 0x0c, 0xd0, 0x81, 0x30, 0x27, 0xc0,
0xf4, 0x40, 0x8f, 0xe4, 0x82, 0x7f, 0x11, 0x12, 0x01, 0x12, 0x21, 0x02, 0x44, 0x06, 0x23, 0xc0,
0xf0, 0x8c, 0x07, 0xe0, 0xa4, 0xff, 0x13, 0x12, 0x64, 0xc2, 0x42, 0x32, 0x30, 0xc0, 0x8b, 0xc0,
0xf2, 0x21, 0x67, 0xea, 0x08, 0xff, 0x7f, 0x4f, 0xcf, 0xe5, 0xfb, 0xf8, 0xfe, 0x18, 0x43, 0xc0,
0xf2, 0x10, 0x0f, 0xe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xc0, 0x57, 0xf0, 0x8f, 0xff, 0x84, 0x24, 0x2f, 0xc0,
0xfc, 0x42, 0x0f, 0xfb, 0x7e, 0x04, 0x3f, 0x19, 0x07, 0xc6, 0x2f, 0xff, 0xa4, 0x90, 0x0f, 0xc0,
0xfe, 0x10, 0xa0, 0x78, 0x78, 0x90, 0x80, 0x01, 0x20, 0x00, 0x0f, 0xff, 0x88, 0x42, 0xdf, 0xc0,
0xfe, 0x84, 0x80, 0x38, 0x38, 0x86, 0x00, 0xc4, 0x20, 0x29, 0x40, 0x00, 0x42, 0x08, 0x1f, 0xc0,
0xfe, 0x24, 0x12, 0x02, 0x02, 0x20, 0x64, 0x10, 0x8c, 0x81, 0x13, 0xfc, 0x11, 0x89, 0x3f, 0xc0,
0xff, 0x11, 0x24, 0xc2, 0x90, 0x22, 0x09, 0x26, 0x10, 0x94, 0x24, 0xf9, 0x88, 0x21, 0x3f, 0xc0,
0xff, 0x41, 0x21, 0x10, 0x85, 0x89, 0x88, 0x20, 0x42, 0x10, 0x80, 0xf2, 0x22, 0x24, 0x3f, 0xc0,
0xff, 0x8c, 0x08, 0x11, 0x24, 0x08, 0x22, 0x89, 0x22, 0x42, 0x4a, 0x64, 0x10, 0x84, 0xff, 0xc0,
0xff, 0x80, 0xc4, 0x88, 0x10, 0x42, 0x02, 0x08, 0x88, 0x49, 0x10, 0x09, 0x44, 0x90, 0x7f, 0xc0,
0xff, 0xd2, 0x17, 0xef, 0xdf, 0xff, 0xfd, 0xf6, 0xff, 0xff, 0xff, 0xc0, 0x08, 0x12, 0xff, 0xc0,
0xff, 0xc2, 0x1b, 0x76, 0xed, 0xb5, 0xb7, 0x77, 0x66, 0xb6, 0x6d, 0xe4, 0xa3, 0x02, 0xff, 0xc0,
0xff, 0xe8, 0xdb, 0x5b, 0x36, 0x6d, 0xb6, 0xd9, 0xbb, 0xad, 0xb6, 0x64, 0x20, 0x61, 0xff, 0xc0,
0xff, 0xe0, 0x1d, 0xdb, 0xdb, 0xce, 0x6d, 0xbe, 0xdb, 0x6d, 0xb7, 0xb1, 0x0c, 0x0d, 0xff, 0xc0,
0xff, 0xf5, 0x06, 0xdc, 0xdb, 0x73, 0xdb, 0x66, 0xdc, 0xdb, 0x6d, 0x81, 0x11, 0x83, 0xff, 0xc0,
0xff, 0xf1, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x48, 0x40, 0x33, 0xff, 0xc0,
0xff, 0xf8, 0x25, 0x26, 0xac, 0x89, 0x2c, 0xb3, 0x26, 0x26, 0x9a, 0x4c, 0xca, 0x07, 0xff, 0xc0,
0xff, 0xfc, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xf7, 0xbc, 0x8f, 0xff, 0xc0,
0xff, 0xfc, 0x9a, 0xd9, 0x53, 0x66, 0xd3, 0x4c, 0xd9, 0x99, 0x6d, 0xb6, 0xe6, 0x3f, 0xff, 0xc0,
0xff, 0xfe, 0x1b, 0x6f, 0x7d, 0xbb, 0x7d, 0xf7, 0x6e, 0xef, 0x6d, 0xbb, 0x7a, 0x1f, 0xff, 0xc0,
0xff, 0xff, 0x4d, 0xb3, 0xa6, 0xdb, 0x4d, 0x37, 0x6e, 0xed, 0xb6, 0xcd, 0x98, 0xff, 0xff, 0xc0,
0xff, 0xff, 0x26, 0xdc, 0xfb, 0x6d, 0xf7, 0xd9, 0xb3, 0x35, 0xb6, 0xf6, 0xec, 0x3f, 0xff, 0xc0,
0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xe4, 0x22, 0x04, 0x92, 0x08, 0x24, 0x48, 0x88, 0x49, 0x09, 0x11, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xe2, 0x48, 0x90, 0x00, 0x82, 0x04, 0x84, 0x92, 0x00, 0x40, 0x45, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xf8, 0x84, 0x93, 0x29, 0x31, 0x90, 0x91, 0x11, 0x96, 0x14, 0x87, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xf9, 0x21, 0x00, 0x44, 0x04, 0x22, 0x10, 0x44, 0x10, 0x91, 0x2f, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xfe, 0x08, 0x4c, 0x44, 0x90, 0x22, 0x46, 0x00, 0x40, 0x82, 0x1f, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xfe, 0x92, 0x21, 0x10, 0x84, 0x88, 0x40, 0xaa, 0x4a, 0x24, 0x9f, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0x81, 0x01, 0x02, 0x22, 0x09, 0x18, 0x21, 0x08, 0x20, 0x7f, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xcc, 0x54, 0x62, 0x28, 0xc1, 0x03, 0x04, 0x21, 0x8a, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xf0, 0x84, 0x08, 0x81, 0x14, 0x60, 0x48, 0x84, 0x0b, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xf8, 0x89, 0x08, 0x44, 0x10, 0x0c, 0x22, 0x50, 0x67, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xfe, 0x20, 0xc3, 0x12, 0x43, 0x01, 0x84, 0x06, 0x1f, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0x06, 0x10, 0x20, 0x88, 0x60, 0x11, 0x20, 0xbf, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xd0, 0x11, 0x24, 0x20, 0x8c, 0x48, 0x91, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xf1, 0x44, 0x43, 0x0c, 0x01, 0x02, 0x07, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xfc, 0x08, 0x90, 0x41, 0x31, 0x30, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0x22, 0x04, 0x31, 0x04, 0x05, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0x21, 0x84, 0x42, 0x45, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x28, 0x04, 0x48, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc2, 0x51, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 8032) // Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 8032)
const int epd_icons_allArray_LEN = 7; const int epd_icons_allArray_LEN = 8;
const unsigned char* epd_icons_allArray[epd_icons_allArray_LEN] = { const unsigned char* epd_icons_allArray[epd_icons_allArray_LEN] = {
epd_icons_pickaxe, epd_icons_pickaxe,
epd_icons_rocket_launch, epd_icons_rocket_launch,
@ -1147,5 +1273,6 @@ const unsigned char* epd_icons_allArray[epd_icons_allArray_LEN] = {
epd_icons_bitaxe_logo, epd_icons_bitaxe_logo,
epd_icons_ocean_logo, epd_icons_ocean_logo,
epd_icons_braiins_logo, epd_icons_braiins_logo,
epd_icons_noderunners_logo epd_icons_noderunners_logo,
epd_icons_gobrrr_logo
}; };

View file

@ -12,6 +12,8 @@ public:
PoolStats parseResponse(const JsonDocument &doc) const override; PoolStats parseResponse(const JsonDocument &doc) const override;
LogoData getLogo() const override; LogoData getLogo() const override;
bool supportsDailyEarnings() const override { return true; } bool supportsDailyEarnings() const override { return true; }
bool hasLogo() const override { return true; }
std::string getDisplayLabel() const override { return "BRAIINS/POOL"; } // Fallback if needed
std::string getDailyEarningsLabel() const override { return "sats/earned"; } std::string getDailyEarningsLabel() const override { return "sats/earned"; }
private: private:
static int getHashrateMultiplier(const std::string &unit); static int getHashrateMultiplier(const std::string &unit);

View file

@ -0,0 +1,14 @@
// src/noderunners/noderunners_pool.cpp
#include "gobrrr_pool.hpp"
std::string GoBrrrPool::getApiUrl() const {
return "https://pool.gobrrr.me/api/client/" + poolUser;
}
LogoData GoBrrrPool::getLogo() const {
return LogoData {
.data = epd_icons_allArray[7],
.width = 122,
.height = 122
};
}

View file

@ -0,0 +1,15 @@
#pragma once
#include "lib/mining_pool/mining_pool_interface.hpp"
#include "lib/mining_pool/public_pool/public_pool.hpp"
#include <icons/icons.h>
class GoBrrrPool : public PublicPool {
public:
std::string getApiUrl() const override;
bool hasLogo() const override { return true; }
std::string getDisplayLabel() const override { return "GOBRRR/POOL"; }
LogoData getLogo() const override;
};

View file

@ -12,7 +12,9 @@ public:
virtual void prepareRequest(HTTPClient& http) const = 0; virtual void prepareRequest(HTTPClient& http) const = 0;
virtual std::string getApiUrl() const = 0; virtual std::string getApiUrl() const = 0;
virtual PoolStats parseResponse(const JsonDocument& doc) const = 0; virtual PoolStats parseResponse(const JsonDocument& doc) const = 0;
virtual bool hasLogo() const = 0;
virtual LogoData getLogo() const = 0; virtual LogoData getLogo() const = 0;
virtual std::string getDisplayLabel() const = 0;
virtual bool supportsDailyEarnings() const = 0; virtual bool supportsDailyEarnings() const = 0;
virtual std::string getDailyEarningsLabel() const = 0; virtual std::string getDailyEarningsLabel() const = 0;

View file

@ -1,7 +1,7 @@
#include "mining_pool_stats_handler.hpp" #include "mining_pool_stats_handler.hpp"
#include <iostream> #include <iostream>
std::array<std::string, NUM_SCREENS> parseMiningPoolStatsHashRate(std::string text) std::array<std::string, NUM_SCREENS> parseMiningPoolStatsHashRate(std::string text, const MiningPoolInterface& pool)
{ {
std::array<std::string, NUM_SCREENS> ret; std::array<std::string, NUM_SCREENS> ret;
ret.fill(""); // Initialize all elements to empty strings ret.fill(""); // Initialize all elements to empty strings
@ -55,15 +55,18 @@ std::array<std::string, NUM_SCREENS> parseMiningPoolStatsHashRate(std::string te
ret[NUM_SCREENS - 1] = label; ret[NUM_SCREENS - 1] = label;
if (pool.hasLogo()) {
ret[0] = "mdi:miningpool"; ret[0] = "mdi:miningpool";
} else {
ret[0] = pool.getDisplayLabel();
}
return ret; return ret;
} }
std::array<std::string, NUM_SCREENS> parseMiningPoolStatsDailyEarnings(int sats, std::string label) std::array<std::string, NUM_SCREENS> parseMiningPoolStatsDailyEarnings(int sats, std::string label, const MiningPoolInterface& pool)
{ {
std::array<std::string, NUM_SCREENS> ret; std::array<std::string, NUM_SCREENS> ret;
ret.fill(""); // Initialize all elements to empty strings ret.fill(""); // Initialize all elements to empty strings
@ -109,7 +112,11 @@ std::array<std::string, NUM_SCREENS> parseMiningPoolStatsDailyEarnings(int sats,
ret[NUM_SCREENS - 1] = label; ret[NUM_SCREENS - 1] = label;
ret[0] = "mdi:miningpool"; if (pool.hasLogo()) {
ret[0] = "mdi:miningpool";
} else {
ret[0] = pool.getDisplayLabel();
}
return ret; return ret;
} }

View file

@ -0,0 +1,8 @@
#include <array>
#include <string>
#ifndef UNITY_TEST
#include "lib/mining_pool/mining_pool_interface.hpp"
#endif
std::array<std::string, NUM_SCREENS> parseMiningPoolStatsHashRate(std::string text, const MiningPoolInterface& pool);
std::array<std::string, NUM_SCREENS> parseMiningPoolStatsDailyEarnings(int sats, std::string label, const MiningPoolInterface& pool);

View file

@ -1,15 +1,15 @@
// src/noderunners/noderunners_pool.cpp // src/noderunners/noderunners_pool.cpp
#include "noderunners_pool.hpp" #include "noderunners_pool.hpp"
void NodeRunnersPool::prepareRequest(HTTPClient& http) const { void NoderunnersPool::prepareRequest(HTTPClient& http) const {
// Empty as NodeRunners doesn't need special headers // Empty as NodeRunners doesn't need special headers
} }
std::string NodeRunnersPool::getApiUrl() const { std::string NoderunnersPool::getApiUrl() const {
return "https://pool.noderunners.network/api/v1/users/" + poolUser; return "https://pool.noderunners.network/api/v1/users/" + poolUser;
} }
PoolStats NodeRunnersPool::parseResponse(const JsonDocument& doc) const { PoolStats NoderunnersPool::parseResponse(const JsonDocument& doc) const {
std::string hashrateStr = doc["hashrate1m"].as<std::string>(); std::string hashrateStr = doc["hashrate1m"].as<std::string>();
char unit = hashrateStr.back(); char unit = hashrateStr.back();
std::string value = hashrateStr.substr(0, hashrateStr.size() - 1); std::string value = hashrateStr.substr(0, hashrateStr.size() - 1);
@ -22,7 +22,7 @@ PoolStats NodeRunnersPool::parseResponse(const JsonDocument& doc) const {
}; };
} }
LogoData NodeRunnersPool::getLogo() const { LogoData NoderunnersPool::getLogo() const {
return LogoData { return LogoData {
.data = epd_icons_allArray[6], .data = epd_icons_allArray[6],
.width = 122, .width = 122,
@ -30,7 +30,10 @@ LogoData NodeRunnersPool::getLogo() const {
}; };
} }
int NodeRunnersPool::getHashrateMultiplier(char unit) { int NoderunnersPool::getHashrateMultiplier(char unit) {
if (unit == '0')
return 0;
static const std::unordered_map<char, int> multipliers = { static const std::unordered_map<char, int> multipliers = {
{'Z', 21}, {'E', 18}, {'P', 15}, {'T', 12}, {'Z', 21}, {'E', 18}, {'P', 15}, {'T', 12},
{'G', 9}, {'M', 6}, {'K', 3} {'G', 9}, {'M', 6}, {'K', 3}

View file

@ -4,7 +4,7 @@
#include "lib/mining_pool/mining_pool_interface.hpp" #include "lib/mining_pool/mining_pool_interface.hpp"
#include <icons/icons.h> #include <icons/icons.h>
class NodeRunnersPool : public MiningPoolInterface { class NoderunnersPool : public MiningPoolInterface {
public: public:
void setPoolUser(const std::string& user) override { poolUser = user; } void setPoolUser(const std::string& user) override { poolUser = user; }
@ -14,7 +14,9 @@ public:
LogoData getLogo() const override; LogoData getLogo() const override;
bool supportsDailyEarnings() const override { return false; } bool supportsDailyEarnings() const override { return false; }
std::string getDailyEarningsLabel() const override { return ""; } std::string getDailyEarningsLabel() const override { return ""; }
bool hasLogo() const override { return true; }
std::string getDisplayLabel() const override { return "NODE/RUNNERS"; } // Fallback if needed
private: protected:
static int getHashrateMultiplier(char unit); static int getHashrateMultiplier(char unit);
}; };

View file

@ -10,6 +10,9 @@ public:
std::string getApiUrl() const override; std::string getApiUrl() const override;
PoolStats parseResponse(const JsonDocument& doc) const override; PoolStats parseResponse(const JsonDocument& doc) const override;
LogoData getLogo() const override; LogoData getLogo() const override;
bool hasLogo() const override { return true; }
std::string getDisplayLabel() const override { return "OCEAN/POOL"; } // Fallback if needed
bool supportsDailyEarnings() const override { return true; } bool supportsDailyEarnings() const override { return true; }
std::string getDailyEarningsLabel() const override { return "sats/block"; } std::string getDailyEarningsLabel() const override { return "sats/block"; }
}; };

View file

@ -1,15 +1,20 @@
#include "pool_factory.hpp" #include "pool_factory.hpp"
const char* PoolFactory::MINING_POOL_NAME_OCEAN = "ocean"; const char* PoolFactory::MINING_POOL_NAME_OCEAN = "ocean";
const char* PoolFactory::MINING_POOL_NAME_NODERUNNERS = "noderunners"; const char* PoolFactory::MINING_POOL_NAME_NODERUNNERS = "noderunners";
const char* PoolFactory::MINING_POOL_NAME_BRAIINS = "braiins"; const char* PoolFactory::MINING_POOL_NAME_BRAIINS = "braiins";
const char* PoolFactory::MINING_POOL_NAME_SATOSHI_RADIO = "satoshi_radio";
const char* PoolFactory::MINING_POOL_NAME_PUBLIC_POOL = "public_pool";
const char* PoolFactory::MINING_POOL_NAME_GOBRRR_POOL = "gobrrr_pool";
std::unique_ptr<MiningPoolInterface> PoolFactory::createPool(const std::string& poolName) { std::unique_ptr<MiningPoolInterface> PoolFactory::createPool(const std::string& poolName) {
static const std::unordered_map<std::string, std::function<std::unique_ptr<MiningPoolInterface>()>> poolFactories = { static const std::unordered_map<std::string, std::function<std::unique_ptr<MiningPoolInterface>()>> poolFactories = {
{MINING_POOL_NAME_OCEAN, []() { return std::make_unique<OceanPool>(); }}, {MINING_POOL_NAME_OCEAN, []() { return std::make_unique<OceanPool>(); }},
{MINING_POOL_NAME_NODERUNNERS, []() { return std::make_unique<NodeRunnersPool>(); }}, {MINING_POOL_NAME_NODERUNNERS, []() { return std::make_unique<NoderunnersPool>(); }},
{MINING_POOL_NAME_BRAIINS, []() { return std::make_unique<BraiinsPool>(); }} {MINING_POOL_NAME_BRAIINS, []() { return std::make_unique<BraiinsPool>(); }},
{MINING_POOL_NAME_SATOSHI_RADIO, []() { return std::make_unique<SatoshiRadioPool>(); }},
{MINING_POOL_NAME_PUBLIC_POOL, []() { return std::make_unique<PublicPool>(); }},
{MINING_POOL_NAME_GOBRRR_POOL, []() { return std::make_unique<GoBrrrPool>(); }}
}; };
auto it = poolFactories.find(poolName); auto it = poolFactories.find(poolName);

View file

@ -5,6 +5,9 @@
#include "noderunners/noderunners_pool.hpp" #include "noderunners/noderunners_pool.hpp"
#include "braiins/brains_pool.hpp" #include "braiins/brains_pool.hpp"
#include "ocean/ocean_pool.hpp" #include "ocean/ocean_pool.hpp"
#include "satoshi_radio/satoshi_radio_pool.hpp"
#include "public_pool/public_pool.hpp"
#include "gobrrr_pool/gobrrr_pool.hpp"
class PoolFactory { class PoolFactory {
public: public:
@ -13,7 +16,10 @@ class PoolFactory {
return { return {
MINING_POOL_NAME_OCEAN, MINING_POOL_NAME_OCEAN,
MINING_POOL_NAME_NODERUNNERS, MINING_POOL_NAME_NODERUNNERS,
MINING_POOL_NAME_BRAIINS MINING_POOL_NAME_SATOSHI_RADIO,
MINING_POOL_NAME_BRAIINS,
MINING_POOL_NAME_PUBLIC_POOL,
MINING_POOL_NAME_GOBRRR_POOL
}; };
} }
@ -32,4 +38,7 @@ class PoolFactory {
static const char* MINING_POOL_NAME_OCEAN; static const char* MINING_POOL_NAME_OCEAN;
static const char* MINING_POOL_NAME_NODERUNNERS; static const char* MINING_POOL_NAME_NODERUNNERS;
static const char* MINING_POOL_NAME_BRAIINS; static const char* MINING_POOL_NAME_BRAIINS;
static const char* MINING_POOL_NAME_SATOSHI_RADIO;
static const char* MINING_POOL_NAME_PUBLIC_POOL;
static const char* MINING_POOL_NAME_GOBRRR_POOL;
}; };

View file

@ -0,0 +1,21 @@
// src/noderunners/noderunners_pool.cpp
#include "public_pool.hpp"
std::string PublicPool::getApiUrl() const {
return "https://public-pool.io:40557/api/client/" + poolUser;
}
PoolStats PublicPool::parseResponse(const JsonDocument& doc) const {
uint64_t totalHashrate = 0;
for (JsonVariantConst worker : doc["workers"].as<JsonArrayConst>()) {
totalHashrate += static_cast<uint64_t>(std::llround(worker["hashRate"].as<double>()));
}
return PoolStats{
.hashrate = std::to_string(totalHashrate),
.dailyEarnings = std::nullopt // Public Pool doesn't support daily earnings
};
}

View file

@ -0,0 +1,15 @@
#pragma once
#include "lib/mining_pool/mining_pool_interface.hpp"
#include "lib/mining_pool/noderunners/noderunners_pool.hpp"
#include <icons/icons.h>
class PublicPool : public NoderunnersPool {
public:
std::string getApiUrl() const override;
bool hasLogo() const override { return false; }
std::string getDisplayLabel() const override { return "PUBLIC/POOL"; }
PoolStats parseResponse(const JsonDocument& doc) const override;
};

View file

@ -0,0 +1,6 @@
// src/noderunners/noderunners_pool.cpp
#include "satoshi_radio_pool.hpp"
std::string SatoshiRadioPool::getApiUrl() const {
return "https://pool.satoshiradio.nl/api/v1/users/" + poolUser;
}

View file

@ -0,0 +1,14 @@
#pragma once
#include "lib/mining_pool/mining_pool_interface.hpp"
#include "lib/mining_pool/noderunners/noderunners_pool.hpp"
#include <icons/icons.h>
class SatoshiRadioPool : public NoderunnersPool {
public:
std::string getApiUrl() const override;
bool hasLogo() const override { return false; }
std::string getDisplayLabel() const override { return "SATOSHI/RADIO"; } // Fallback if needed
};

View file

@ -38,10 +38,10 @@ void workerTask(void *pvParameters) {
case TASK_MINING_POOL_STATS_UPDATE: { case TASK_MINING_POOL_STATS_UPDATE: {
if (getCurrentScreen() == SCREEN_MINING_POOL_STATS_HASHRATE) { if (getCurrentScreen() == SCREEN_MINING_POOL_STATS_HASHRATE) {
taskEpdContent = taskEpdContent =
parseMiningPoolStatsHashRate(getMiningPoolStatsHashRate()); parseMiningPoolStatsHashRate(getMiningPoolStatsHashRate(), *getMiningPool());
} else if (getCurrentScreen() == SCREEN_MINING_POOL_STATS_EARNINGS) { } else if (getCurrentScreen() == SCREEN_MINING_POOL_STATS_EARNINGS) {
taskEpdContent = taskEpdContent =
parseMiningPoolStatsDailyEarnings(getMiningPoolStatsDailyEarnings(), getMiningPool()->getDailyEarningsLabel()); parseMiningPoolStatsDailyEarnings(getMiningPoolStatsDailyEarnings(), getMiningPool()->getDailyEarningsLabel(), *getMiningPool());
} }
setEpdContent(taskEpdContent); setEpdContent(taskEpdContent);
break; break;

View file

@ -6,7 +6,7 @@
#include <data_handler.hpp> #include <data_handler.hpp>
#include <bitaxe_handler.hpp> #include <bitaxe_handler.hpp>
#include <mining_pool_stats_handler.hpp> #include "lib/mining_pool/mining_pool_stats_handler.hpp"
#include "lib/epd.hpp" #include "lib/epd.hpp"
#include "lib/shared.hpp" #include "lib/shared.hpp"