[claude] Nostr relay account whitelist — access-tier API + NIP-11 (#37) #65
Reference in New Issue
Block a user
Delete Branch "claude/issue-37"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #37
What was done
Schema
eliteaccess level torelay_accounts(none/read/write/elite)trust_tiercolumn torelay_accountsfor synced tier tracking0007_relay_account_whitelist.sqlwithrelay_accounts+relay_event_queuetables (idempotentCREATE TABLE IF NOT EXISTS+ALTER TABLE ADD COLUMN IF NOT EXISTS)Admin API
POST /api/admin/relay/accounts— grant access (body:{pubkey, level?, notes?})DELETE /api/admin/relay/accounts/:pubkey— revoke accessGET /api/admin/relay/accountswas already implemented (kept):pubkey/grantand:pubkey/revokeroutes kept for backward compatRelay Policy
eliteaccess level → direct strfry inject + accept (bypasses moderation queue)write+ elite tier → same behavior (legacy path preserved)rejectTrust Tier Sync
syncFromTrustTiernow storestrust_tieron the relay account roweliteaccess level (waswrite)TrustService.recordSuccess/recordFailureon every interactionNIP-11
GET /withAccept: application/nostr+jsonreturns relay info documentname,description,pubkey(Timmys hex pubkey),contact,supported_nips,software,versionRELAY_NAME,RELAY_DESCRIPTION,RELAY_CONTACT,RELAY_VERSION)