diff options
| author | Your Name <you@example.com> | 2026-05-19 04:13:11 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-19 04:13:11 +0530 |
| commit | beb73a2eeacf7dbe5e292ce6e26a95a933808267 (patch) | |
| tree | 3a9b711e1475c09ed544b96358587df3e5362555 /main/tollgate_client.h | |
| parent | c75230e551a778408b2e370b208aff76b74c6560 (diff) | |
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
Diffstat (limited to 'main/tollgate_client.h')
| -rw-r--r-- | main/tollgate_client.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 { | |||
| 17 | TG_CLIENT_PAYING, | 17 | TG_CLIENT_PAYING, |
| 18 | TG_CLIENT_PAID, | 18 | TG_CLIENT_PAID, |
| 19 | TG_CLIENT_RENEWING, | 19 | TG_CLIENT_RENEWING, |
| 20 | TG_CLIENT_MINING, | ||
| 20 | TG_CLIENT_ERROR | 21 | TG_CLIENT_ERROR |
| 21 | } tollgate_client_state_t; | 22 | } tollgate_client_state_t; |
| 22 | 23 | ||
| @@ -26,6 +27,8 @@ typedef struct { | |||
| 26 | int step_size_ms; | 27 | int step_size_ms; |
| 27 | char mint_url[TG_CLIENT_MAX_MINT_URL]; | 28 | char mint_url[TG_CLIENT_MAX_MINT_URL]; |
| 28 | char metric[TG_CLIENT_MAX_METRIC]; | 29 | char metric[TG_CLIENT_MAX_METRIC]; |
| 30 | bool mining_available; | ||
| 31 | uint16_t mining_port; | ||
| 29 | } tollgate_discovery_t; | 32 | } tollgate_discovery_t; |
| 30 | 33 | ||
| 31 | esp_err_t tollgate_client_init(void); | 34 | esp_err_t tollgate_client_init(void); |