btcintel

Sign in with a NIP-98 event and open a T3 session

POST /v1/auth/nip98
quién puede llamarla
Una sesión
una firma NIP-98
qué cuesta
1 petición de la cuota
niveles y claves
cuán reciente
Nunca en caché
cada respuesta lleva la altura del índice y la del nodo
Herramienta MCP
Ninguna
En esta página

The request carries Authorization: Nostr <base64(kind 27235 event)> per NIP-98: tag u = this exact URL, method = POST, created_at within ±60 s, a payload tag (SHA-256 of the body) whenever a body is sent; the signature verifies; the event id is single use. A nonce tag must equal the btci_login cookie that GET /v1/auth/nonce set in this browser and name an unspent nonce; the login spends it. While LOGIN_NONCE_REQUIRED is false a login without the tag is accepted and counted; with it true, refused (401). On success a session of 30 days is created and the cookie btci_session is set (HttpOnly; Secure; SameSite=Lax; Path=/; Domain=.btcintel.io). No account, password or email exists: the identity is the public key, and no private key ever reaches btcintel. At most 10 logins per key and 30 per address each hour.

Parámetros

No toma parámetros.

Qué responde

201 · application/json

The session is open; the cookie is on the response.

Cabeceras: Set-Cookie

CampoTipoQué lleva
pubkeystring64 hex characters.
npubstringThe key as an npub (NIP-19).
tierstringAlways t3: a signed-in key's tier.
expires_atstringWhen the session ends: 30 days after the login.
session_idstringThe row id (SHA-256 of the cookie token) as /v1/auth/me lists it.
quotaobjectWhat tier t3 allows.
esquema AuthSession
  • pubkey string obligatorio — 64 hex characters.
  • npub string — The key as an npub (NIP-19).
  • tier string obligatorio — Always t3: a signed-in key's tier. · uno de "t3"
  • expires_at string (date-time) obligatorio — When the session ends: 30 days after the login.
  • session_id string obligatorio — The row id (SHA-256 of the cookie token) as /v1/auth/me lists it.
  • quota Quota — What tier t3 allows.
    • requests_per_min integer — The requests a minute the tier refills, on average.
    • burst_per_min integer — The most requests the tier lets through at once: its bucket, refilled at requests_per_min.
    • requests_per_day integer — The requests a UTC day the tier allows. 0 sets no daily cap.
    • bulk_max_subjects integer — The most subjects one bulk lookup may name. 0 falls back to 20, t0's number.
    • publish_per_day integer — The Community events a UTC day each author may publish through the API at this tier. 0 sets no daily cap. Who may publish at all is decided apart: a person signed in with their key, or a key with the community:publish scope and an allowed npub; t0 and t1 cannot.
    • feedback_per_day integer — Feedback entries per caller per UTC day.
    • proposals_per_day integer — Curated proposals per caller per UTC day.
    • disputes_per_day integer — Disputes per caller per UTC day.
    • scopes array de string — The scopes of the tier. Absent from a key's row, whose own scopes stand beside it.

Errores

EstadoCódigoCuándo
401unauthorizedunauthorized: the request does not say who makes it, or what it offers does not verify: no key or session where one is needed, or a password, a code, a passkey or a signed event that does not check. The message says what is missing.
422nip98_invalidThe NIP-98 event was refused (nip98_invalid): wrong URL or method, stale, bad signature, wrong payload hash, or used before; the message names the reason.
429quota_exceededquota_exceeded: the caller's tier ran out of requests for the minute or the day. Retry-After says when to try again; every rate-limited answer carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and X-RateLimit-Tier. While the deployment runs in log-only mode the decision is logged instead and X-RateLimit-Policy: log-only is set.
501not_configurednot_configured: this deployment does not run what the route needs, for example the mempool engine, accounts, the intel store or watchlists. The message names it.

Cada uno llega en el sobre de error único, y ninguno se guarda en caché: un error lleva Cache-Control: no-store.

Ejemplo

Sin fragmento. Esta ruta pide una sesión iniciada (la cookie que pone btcintel.io) o una firma NIP-98 de tu firmante Nostr, nunca una clave, así que ningún fragmento puede ejecutarla desde una shell. Ver Identidad.