v0.2.11 - Picky shit

This commit is contained in:
Your Name
2025-09-06 07:12:47 -04:00
parent 6de9518de7
commit 6f51f445b7
11 changed files with 693 additions and 104 deletions

View File

@@ -12,7 +12,8 @@
#define CONFIG_DESCRIPTION_MAX_LENGTH 256
#define CONFIG_XDG_DIR_NAME "c-relay"
#define CONFIG_FILE_NAME "c_relay_config_event.json"
#define CONFIG_PRIVKEY_ENV "C_RELAY_CONFIG_PRIVKEY"
#define CONFIG_ADMIN_PRIVKEY_ENV "C_RELAY_ADMIN_PRIVKEY"
#define CONFIG_RELAY_PRIVKEY_ENV "C_RELAY_PRIVKEY"
#define NOSTR_PUBKEY_HEX_LENGTH 64
#define NOSTR_PRIVKEY_HEX_LENGTH 64
#define NOSTR_EVENT_ID_HEX_LENGTH 64
@@ -220,4 +221,10 @@ int sign_nostr_event(const cJSON* event, const char* privkey_hex, char* signatur
// Write configuration event to file
int write_config_event_to_file(const cJSON* event);
// Helper function to generate random private key
int generate_random_private_key(char* privkey_hex, size_t buffer_size);
// Helper function to derive public key from private key
int derive_public_key(const char* privkey_hex, char* pubkey_hex, size_t buffer_size);
#endif // CONFIG_H