v0.0.11 - All auth tests working

This commit is contained in:
Your Name
2025-09-10 11:08:33 -04:00
parent 30473100b8
commit 6a4e15670d
10 changed files with 556 additions and 104 deletions

View File

@@ -97,6 +97,12 @@ typedef struct {
int error_code; // NOSTR_SUCCESS or specific error code
char reason[256]; // Human-readable reason for denial/acceptance
char pubkey[65]; // Extracted pubkey from validated event (if available)
// NEW: File data for upload operations (Option 1 implementation)
unsigned char *file_data; // File content buffer (malloc'd by validator)
size_t file_size; // Size of file data in bytes
char expected_hash[65]; // Expected SHA-256 hash from Blossom event
int owns_file_data; // 1 if validator owns memory, 0 if not
} nostr_request_result_t;
// Challenge structure for NIP-42
@@ -126,8 +132,12 @@ int nostr_generate_nip42_challenge(char* challenge_out, size_t challenge_size, c
const char* nostr_request_validator_get_last_violation_type(void);
void nostr_request_validator_clear_violation(void);
// File data cleanup function
void nostr_request_result_free_file_data(nostr_request_result_t* result);
// Upload handling
void handle_upload_request(void);
void handle_upload_request_with_validation(nostr_request_result_t* validation_result);
// Blob metadata structure
typedef struct {