Skip to content

feat(send): add BNRP Bitcoin name resolution to send flow - #865

Open
nlgal wants to merge 2 commits into
secretkeylabs:developfrom
nlgal:feat/bnrp-name-resolution
Open

feat(send): add BNRP Bitcoin name resolution to send flow#865
nlgal wants to merge 2 commits into
secretkeylabs:developfrom
nlgal:feat/bnrp-name-resolution

Conversation

@nlgal

@nlgal nlgal commented May 17, 2026

Copy link
Copy Markdown

Summary

Adds Bitcoin name resolution to the BTC send flow via BNRP (BTC Name Resolution Protocol). Users can now type satoshi.btc, nakamoto.sats, or any supported Bitcoin name directly into the recipient field.

Spec: https://bnrp.name | API: https://api.bnrp.name/v1


What changes

New file:

  • src/app/hooks/useBnrpNameResolution.ts — resolution hook. Calls GET api.bnrp.name/v1/resolve/{name}, returns btc_taproot address (fallback: segwit, p2sh, legacy). Exposes resolve, reset, and typed resolution state (idle | resolving | resolved | error).

Modified file:

  • src/app/components/recipientSelector/index.tsx — wires in useBnrpNameResolution. If the input matches a BNRP TLD, resolution runs before validateBtcAddress. Shows "Resolving..." feedback while in-flight. Displays resolved address on success. Falls back to normal address validation for raw BTC addresses.

Supported TLDs

.btc .sats .x .ord .xbt .gm .unisat .sat


UX

  • Placeholder updated to: "Address or Bitcoin name (satoshi.btc)"
  • While resolving: "Resolving satoshi.btc..." info feedback
  • On success: resolved taproot address shown below input, onNext() fires automatically
  • On failure: "Name not found" error feedback
  • Button disabled + loading spinner during resolution
  • Raw BTC addresses: unchanged behavior

API

GET https://api.bnrp.name/v1/resolve/satoshi.btc

{
  "name": "satoshi.btc",
  "addresses": {
    "btc_taproot": "bc1p...",
    "btc_segwit": null
  }
}

No auth required. No new dependencies.


Protocol extensions

BNRP also defines Lightning Address (BNRP-IP-09), Sign in with Bitcoin (BNRP-IP-10), AI Agent Namespace (BNRP-IP-11), Profile Records (BNRP-IP-12), and Sub-registry Delegation (BNRP-IP-13). Full spec at https://bnrp.name/adopt.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant