import { Link } from 'react-router-dom'; import { ShieldCheck, ExternalLink, AlertTriangle } from 'lucide-react'; import { Card, CardContent } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { NIP05_PROVIDERS } from '@/lib/nip05Providers'; import { cn } from '@/lib/utils'; interface Nip05RequiredProps { /** What the user is trying to do, e.g. "tour organizers", "sellers". */ role?: string; /** Extra sentence explaining why it matters for this feature. */ reason?: string; /** "gate" = full centered card (blocks the page). "banner" = inline notice. */ variant?: 'gate' | 'banner'; /** Accent hex color. Defaults to the app red used for required gates. */ color?: string; className?: string; } /** * Consistent "NIP-05 verification required" prompt used across create/become * flows. Lists the curated, working providers (see lib/nip05Providers) and * links to Settings. Single source of truth so obsolete providers never linger. */ export function Nip05Required({ role = 'creators', reason, variant = 'gate', color = '#ef4444', className, }: Nip05RequiredProps) { const providerList = (
Get a free / cheap NIP-05
{reason ?? `To prevent spam and build trust, ${role} need a verified Nostr address (NIP-05).`}
{reason ?? `To prevent spam and build trust, ${role} must have NIP-05 verification.`}
NIP-05 proves your identity by linking your Nostr profile to a domain — like{' '} you@example.com.