feat: relay membership with NIP-43 compliance (#448)

This commit is contained in:
tlongwell-block
2026-05-01 19:11:32 -04:00
committed by GitHub
parent 05ba08412c
commit 3cabe94c2b
23 changed files with 2254 additions and 18 deletions
+12
View File
@@ -329,3 +329,15 @@ CREATE TABLE pubkey_allowlist (
added_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
note TEXT
);
-- ── Relay members (NIP-43) ────────────────────────────────────────────────────
CREATE TABLE IF NOT EXISTS relay_members (
pubkey TEXT PRIMARY KEY,
role TEXT NOT NULL CHECK (role IN ('owner', 'admin', 'member')),
added_by TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_relay_members_role ON relay_members(role);