2023-11-07 00:11:12 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
#include <ArduinoJson.h>
|
2023-11-30 21:38:01 +00:00
|
|
|
#include <HTTPClient.h>
|
|
|
|
#include <esp_timer.h>
|
|
|
|
#include <esp_websocket_client.h>
|
2023-11-30 21:56:50 +00:00
|
|
|
|
|
|
|
#include <cstring>
|
2023-11-30 21:38:01 +00:00
|
|
|
#include <string>
|
2023-11-07 00:11:12 +00:00
|
|
|
|
2023-11-30 21:56:50 +00:00
|
|
|
#include "lib/led_handler.hpp"
|
|
|
|
#include "lib/screen_handler.hpp"
|
|
|
|
#include "lib/shared.hpp"
|
|
|
|
|
2023-11-30 21:38:01 +00:00
|
|
|
// using namespace websockets;
|
2023-11-07 00:11:12 +00:00
|
|
|
|
|
|
|
void setupBlockNotify();
|
|
|
|
|
2023-11-30 21:38:01 +00:00
|
|
|
void onWebsocketEvent(void *handler_args, esp_event_base_t base,
|
|
|
|
int32_t event_id, void *event_data);
|
|
|
|
void onWebsocketMessage(esp_websocket_event_data_t *event_data);
|
2023-11-07 00:11:12 +00:00
|
|
|
|
2023-11-12 11:38:28 +00:00
|
|
|
void setBlockHeight(uint newBlockHeight);
|
|
|
|
uint getBlockHeight();
|
2024-03-10 19:24:55 +00:00
|
|
|
|
|
|
|
void setBlockMedianFee(uint blockMedianFee);
|
|
|
|
uint getBlockMedianFee();
|
|
|
|
|
2023-11-08 11:18:59 +00:00
|
|
|
bool isBlockNotifyConnected();
|
2024-01-31 22:45:26 +00:00
|
|
|
void stopBlockNotify();
|
|
|
|
bool getBlockNotifyInit();
|