1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-10-13 14:03:47 +00:00

BIP‑353: Clarify TXT record structure and concatenation order (single RR; RDATA order; no cross‑RR joins) (#2000)

This commit is contained in:
Mark E. Jeftovic 2025-10-10 20:12:06 -04:00 committed by GitHub
parent 3d0bab3cc2
commit 1cf4130876
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,7 +36,9 @@ Thus, using TXT records to store Bitcoin payment instructions allows for human-r
Bitcoin wallets MUST NOT prefer to use DNS-based resolving when methods with explicit public keys or addresses are available. In other words, if a standard Bitcoin address or direct BIP 21 URI is available or would suffice, Bitcoin wallets MUST prefer to use that instead.
=== Records ===
Payment instructions are indexed by both a user and a domain. Instructions for a given <code>user</code> and <code>domain</code> are stored at <code>user</code>.user._bitcoin-payment.<code>domain</code> in a single TXT record.
Payment instructions are indexed by both a user and a domain. Instructions for a given <code>user</code> and <code>domain</code> are stored at <code>user</code>.user._bitcoin-payment.<code>domain</code> in a single TXT RR.
The TXT RRs RDATA <b>MUST</b> consist of one or more DNS <code><character-string></code>s (see [[https://www.rfc-editor.org/rfc/rfc1035#section-3.3.14|RFC&nbsp;1035&nbsp;§3.3.14]]), each ≤255 bytes.
All payment instructions MUST be DNSSEC-signed.
@ -52,7 +54,9 @@ For payment instructions that have a built-in expiry time (e.g. Lightning BOLT 1
Clients resolving Bitcoin payment instructions MUST ignore any TXT records at the same label which do not begin with (ignoring case) "bitcoin:". Resolvers encountering multiple "bitcoin:"-matching TXT records at the same label MUST treat the records as invalid and refuse to use any payment instructions therein.
Clients resolving Bitcoin payment instructions MUST concatenate all strings in the TXT record before processing the complete URI.<ref>TXT records are defined as "one or more character-strings" in [[https://www.rfc-editor.org/rfc/rfc1035#section-3.3.14|RFC 1035]], and a "character-string" is a single byte (with a max value of 255) followed by that many characters.</ref>
Clients resolving Bitcoin payment instructions <b>MUST</b> reconstruct the <code>bitcoin:</code> URI by concatenating the TXT RRs <code><character-string></code> fields in <b>RDATA order</b>, without inserting separators, before parsing.<ref>DNS TXT RDATA consists of one or more length-prefixed strings with a maximum of 255 bytes of content; see RFC&nbsp;1035&nbsp;§3.3.14.</ref>
Clients <b>MUST NOT</b> concatenate across multiple TXT RRs at the same owner name.
Clients resolving Bitcoin payment instructions MUST fully validate DNSSEC signatures leading to the DNS root (including any relevant CNAME or DNAME records) and MUST NOT accept DNSSEC signatures which use SHA-1 or RSA with keys shorter than 1024 bits. Resolvers MAY accept SHA-1 DS records.