2024-07-11 22:08:42 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "shared.hpp"
|
|
|
|
|
|
|
|
#include <ArduinoJson.h>
|
2024-08-31 15:45:19 +02:00
|
|
|
#include <nostrdisplay_handler.hpp>
|
|
|
|
#include <string>
|
|
|
|
|
2024-08-19 01:53:16 +02:00
|
|
|
#include "esp32/ESP32Platform.h"
|
|
|
|
#include "NostrEvent.h"
|
|
|
|
#include "NostrPool.h"
|
|
|
|
|
2024-07-11 22:08:42 +02:00
|
|
|
#include "price_notify.hpp"
|
|
|
|
#include "block_notify.hpp"
|
2024-09-18 02:00:10 +02:00
|
|
|
#include "lib/timers.hpp"
|
2024-07-11 22:08:42 +02:00
|
|
|
|
2024-08-31 15:45:19 +02:00
|
|
|
void setupNostrNotify(bool asDatasource, bool zapNotify);
|
2024-07-11 22:08:42 +02:00
|
|
|
|
|
|
|
void nostrTask(void *pvParameters);
|
2024-07-15 16:36:51 +02:00
|
|
|
void setupNostrTask();
|
|
|
|
|
2024-08-24 16:27:55 +03:00
|
|
|
boolean nostrConnected();
|
2024-08-31 15:45:19 +02:00
|
|
|
void handleNostrEventCallback(const String &subId, nostr::SignedNostrEvent *event);
|
|
|
|
void handleNostrZapCallback(const String &subId, nostr::SignedNostrEvent *event);
|
|
|
|
|
|
|
|
void onNostrSubscriptionClosed(const String &subId, const String &reason);
|
|
|
|
void onNostrSubscriptionEose(const String &subId);
|