v0.0.14 - Still working on commenting out old code and deleting

This commit is contained in:
Your Name
2025-09-11 07:48:33 -04:00
parent cafaa2f2e2
commit e1741fb1fc
10 changed files with 225 additions and 22 deletions

View File

@@ -83,12 +83,14 @@ generate_admin_keys() {
create_admin_event() {
local method="$1"
local endpoint="$2"
local content="admin_request"
local expiration=$(($(date +%s) + 3600)) # 1 hour from now
# Create Nostr event with nak - always use "admin" tag for admin operations
local event=$(nak event -k 24242 -c "$content" \
--tag t="admin" \
# Create Nostr event with nak - use kind 33335 for admin/configuration events
local event=$(nak event -k 33335 -c "$content" \
--tag method="$method" \
--tag endpoint="$endpoint" \
--tag expiration="$expiration" \
--sec "$ADMIN_PRIVKEY")
@@ -102,8 +104,8 @@ send_admin_request() {
log_info "Testing $method $endpoint"
# Create authenticated Nostr event
local event=$(create_admin_event "$method")
# Create authenticated Nostr event with method and endpoint
local event=$(create_admin_event "$method" "$endpoint")
local auth_header="Nostr $(echo "$event" | base64 -w 0)"
# Send request with curl