diff options
Diffstat (limited to 'main/stratum_client.h')
| -rw-r--r-- | main/stratum_client.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/main/stratum_client.h b/main/stratum_client.h new file mode 100644 index 0000000..e143439 --- /dev/null +++ b/main/stratum_client.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #ifndef STRATUM_CLIENT_H | ||
| 2 | #define STRATUM_CLIENT_H | ||
| 3 | |||
| 4 | #include "esp_err.h" | ||
| 5 | #include "stratum_proxy.h" | ||
| 6 | #include <stdint.h> | ||
| 7 | #include <stdbool.h> | ||
| 8 | |||
| 9 | typedef struct { | ||
| 10 | bool connected; | ||
| 11 | char pool_host[128]; | ||
| 12 | uint16_t pool_port; | ||
| 13 | uint32_t nbits; | ||
| 14 | uint64_t difficulty; | ||
| 15 | uint64_t shares_accepted; | ||
| 16 | uint64_t shares_rejected; | ||
| 17 | bool sv2_active; | ||
| 18 | } stratum_client_state_t; | ||
| 19 | |||
| 20 | esp_err_t stratum_client_init(void); | ||
| 21 | esp_err_t stratum_client_start(void); | ||
| 22 | void stratum_client_stop(void); | ||
| 23 | esp_err_t stratum_client_submit_share(uint32_t job_id, uint32_t nonce, uint32_t ntime, uint32_t version); | ||
| 24 | const stratum_client_state_t *stratum_client_get_state(void); | ||
| 25 | void stratum_client_tick(void); | ||
| 26 | |||
| 27 | #endif | ||