btcintel

A bunker link to use the custodied key in another app

POST /v1/auth/npub/bunker
quién puede llamarla
Una sesión
la sesión de una cuenta · con un segundo factor
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

Needs aal 2. A one-time link, bunker://<pubkey>?relay=wss://relay.btcintel.io&secret=…, valid ten minutes, that Primal, Amethyst, Amber, nsec.app or any NIP-46 client connects with; the explorer shows it as a QR. name is what the account calls the app; perms are what the app may ask the signer for: sign_event:<kind> per kind, sign_event for every kind, nip44_encrypt, nip44_decrypt, nip04_encrypt, nip04_decrypt; the default is signing the Community kinds (0, 1, 1111, 1985, 5). One open link per key: a new one replaces the last. 409 when the account's key is its own; 501 when the signer runs without a relay; 503 signing_off while features.signing is false.

Parámetros

NombreDóndeTipoObligatorioQué hace
namecuerpostringopcionalWhat the account calls the app, at most 80 characters. It shows in GET /v1/auth/npub/clients.
permscuerpoarrayopcionalWhat the app may ask the signer for: sign_event:<kind>, sign_event for every kind, nip44_encrypt, nip44_decrypt, nip04_encrypt, nip04_decrypt. The signer's defaults when left out.

El cuerpo es application/json, y puede omitirse.

esquema
  • name string — What the account calls the app, at most 80 characters. It shows in GET /v1/auth/npub/clients. · como mucho 80 caracteres
  • perms array de string — What the app may ask the signer for: sign_event:<kind>, sign_event for every kind, nip44_encrypt, nip44_decrypt, nip04_encrypt, nip04_decrypt. The signer's defaults when left out.

Qué responde

201 · application/json

The link; the QR payload is bunker_url.

CampoTipoQué lleva
bunker_urlstringThe one-time link the app connects with: bunker://, the key's pubkey, the relay and a secret. It is the QR's payload too.
pubkeystringThe custodied key's public key, 64 hex: the signer the app talks to.
npubstringThat key as an npub.
relaystringThe relay the app and the signer talk through.
permsarrayWhat the app may ask for, sorted: the defaults when none were sent.
expires_atstringWhen the link lapses unless an app connects with it: ten minutes from now.
esquema
  • bunker_url string obligatorio — The one-time link the app connects with: bunker://, the key's pubkey, the relay and a secret. It is the QR's payload too.
  • pubkey string obligatorio — The custodied key's public key, 64 hex: the signer the app talks to.
  • npub string obligatorio — That key as an npub.
  • relay string obligatorio — The relay the app and the signer talk through.
  • perms array de string obligatorio — What the app may ask for, sorted: the defaults when none were sent.
  • expires_at string (date-time) obligatorio — When the link lapses unless an app connects with it: ten minutes from now.

Errores

EstadoCódigoCuándo
400invalid_inputMalformed input (invalid_input).
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.
403forbiddenforbidden: the caller is known but may not do this: a key without the scope or the tier the action needs, a session without an npub, a second factor or a recent sign-in, an operator without the role or switched off, or a source that does not allow it. The message says which.
404not_foundnot_found: what the path names is not known: not in the index (for a transaction, not in the node's mempool either), or no such record. The message says which.
409conflictconflict: the state refuses the change, for example a dispute of this caller's already open, a dispute or a claim no longer open, an address that belongs to another account, or a thing done already. The message says which.
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.
503signing_off, unavailablesigning_off: the custodied signer is switched off (SIGNING_ENABLED), keys stay encrypted and exportable later; or unavailable: the signer service is not answering.

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.