From f7b463aca1ae36ecee5512cea149402b70bf9a9e Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 30 Sep 2025 15:02:49 -0400 Subject: [PATCH] Fixing whitelist and blacklist functionality --- Makefile | 2 +- api/button.html | 134 -- api/index.html | 26 +- relay.pid | 2 +- src/main.c | 2806 +------------------------------- src/nip009.c | 313 ++++ src/nip011.c | 454 ++++++ src/nip013.c | 190 +++ src/nip040.c | 173 ++ src/nip042.c | 180 ++ src/request_validator.c | 8 +- src/subscriptions.c | 723 ++++++++ src/subscriptions.h | 91 ++ src/websockets.c | 901 ++++++++++ src/websockets.h | 49 + tests/1_nip_test.sh | 210 ++- tests/nip42_test.log | 88 + tests/white_black_list_test.sh | 1054 ------------ tests/white_black_test.sh | 244 +++ 19 files changed, 3651 insertions(+), 3997 deletions(-) delete mode 100644 api/button.html create mode 100644 src/nip009.c create mode 100644 src/nip011.c create mode 100644 src/nip013.c create mode 100644 src/nip040.c create mode 100644 src/nip042.c create mode 100644 src/subscriptions.c create mode 100644 src/subscriptions.h create mode 100644 src/websockets.c create mode 100644 src/websockets.h create mode 100644 tests/nip42_test.log delete mode 100755 tests/white_black_list_test.sh create mode 100755 tests/white_black_test.sh diff --git a/Makefile b/Makefile index 6a883c6..d407639 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ LIBS = -lsqlite3 -lwebsockets -lz -ldl -lpthread -lm -L/usr/local/lib -lsecp256k BUILD_DIR = build # Source files -MAIN_SRC = src/main.c src/config.c src/request_validator.c +MAIN_SRC = src/main.c src/config.c src/request_validator.c src/nip009.c src/nip011.c src/nip013.c src/nip040.c src/nip042.c src/websockets.c src/subscriptions.c NOSTR_CORE_LIB = nostr_core_lib/libnostr_core_x64.a # Architecture detection diff --git a/api/button.html b/api/button.html deleted file mode 100644 index d68664b..0000000 --- a/api/button.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - Embedded NOSTR_LOGIN_LITE - - - - -
-
Login
-
- - - - - - - - \ No newline at end of file diff --git a/api/index.html b/api/index.html index 2c88a60..d474cec 100644 --- a/api/index.html +++ b/api/index.html @@ -547,7 +547,7 @@ -
+