From beb73a2eeacf7dbe5e292ce6e26a95a933808267 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 19 May 2026 04:13:11 +0530 Subject: feat(mining): integrate mining subsystem into existing modules - CMakeLists.txt: add 6 mining sources + tcp_transport dependency - config.h/c: mining_payout_mode_t enum, mining config fields, JSON parsing - tollgate_main.c: mining init in start_services(), stratum_client_tick in main loop - tollgate_api.c: GET /mining/job, POST /mining/share, GET /mining/stats endpoints - session.h/c: payment_method_t enum (CASHU/MINING/BYTES) - firewall.h/c: sandbox allowlist for mining port + mint URLs - tollgate_client.h/c: TG_CLIENT_MINING state, mining discovery tag parsing - captive_portal.c: tabbed UI with Cashu/Mine tabs, live hashrate polling --- main/tollgate_client.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main/tollgate_client.h') diff --git a/main/tollgate_client.h b/main/tollgate_client.h index 2055e52..ccee624 100644 --- a/main/tollgate_client.h +++ b/main/tollgate_client.h @@ -17,6 +17,7 @@ typedef enum { TG_CLIENT_PAYING, TG_CLIENT_PAID, TG_CLIENT_RENEWING, + TG_CLIENT_MINING, TG_CLIENT_ERROR } tollgate_client_state_t; @@ -26,6 +27,8 @@ typedef struct { int step_size_ms; char mint_url[TG_CLIENT_MAX_MINT_URL]; char metric[TG_CLIENT_MAX_METRIC]; + bool mining_available; + uint16_t mining_port; } tollgate_discovery_t; esp_err_t tollgate_client_init(void); -- cgit v1.2.3