Skip to content

Commit 69d8eeb

Browse files
authored
Merge pull request bitcoin#1657 from TheBlueMatt/2024-07-psbt-dns
Add a PSBT per-output field for BIP 353 DNSSEC Proofs
2 parents 97012a8 + b0d5a07 commit 69d8eeb

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

bip-0174.mediawiki

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,18 @@ required for aggregation. If sorting was done, then the keys must be in the sort
659659
| 0, 2
660660
| [[bip-0373.mediawiki|373]]
661661
|-
662+
| BIP 353 DNSSEC proof
663+
| <tt>PSBT_OUT_DNSSEC_PROOF = 0x35</tt>
664+
| None
665+
| No key data
666+
| <tt><1-byte-length-prefixed BIP 353 human-readable name><RFC 9102-formatted AuthenticationChain DNSSEC Proof></tt>
667+
| A BIP 353 human-readable name (without the ₿ prefix), prefixed by a 1-byte length.
668+
Followed by an [[https://www.rfc-editor.org/rfc/rfc9102.html#name-dnssec-authentication-chain|RFC 9102 DNSSEC <tt>AuthenticationChain</tt>]] (i.e. a series of DNS Resource Records in no particular order) providing a DNSSEC proof to a BIP 353 DNS TXT record.
669+
|
670+
|
671+
| 0, 2
672+
| [[bip-0353.mediawiki|353]]
673+
|-
662674
| Proprietary Use Type
663675
| <tt>PSBT_OUT_PROPRIETARY = 0xFC</tt>
664676
| <tt><compact size uint identifier length> <bytes identifier> <compact size uint subtype> <bytes subkeydata></tt>

bip-0353.mediawiki

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,39 @@ Payment instructions which do contain on-chain addresses which will be re-used S
7070

7171
=== Display ===
7272

73-
When displaying a verified human-readable address, wallets SHOULD prefix it with ₿, i.e. ₿`user`@`domain`. They SHOULD parse recipient information in both `user`@`domain` and ₿`user`@`domain` forms and resolve such entry into recipient information using the above record. For the avoidance of doubt, the ₿ is *not* included in the DNS label which is resolved.
73+
When displaying a verified human-readable name, wallets SHOULD prefix it with ₿, i.e. ₿`user`@`domain`. They SHOULD parse recipient information in both `user`@`domain` and ₿`user`@`domain` forms and resolve such an entry into recipient information using the above record. For the avoidance of doubt, the ₿ is *not* included in the DNS label which is resolved.
7474

75-
Wallets providing the ability for users to "copy" their address information SHOULD copy the underlying URI directly, rather than the human-readable address. This avoids an additional DNS lookup by the application in which it is pasted. Wallets that nevertheless provide users the ability to copy their human-readable address, MUST include the ₿ prefix (i.e. copy it in the form ₿`user`@`domain`).
75+
Wallets providing the ability for users to "copy" their address information SHOULD copy the underlying URI directly, rather than the human-readable name. This avoids an additional DNS lookup by the application in which it is pasted. Wallets that nevertheless provide users the ability to copy their human-readable name, MUST include the ₿ prefix (i.e. copy it in the form ₿`user`@`domain`).
7676

7777
Wallets accepting payment information from external devices (e.g. hardware wallets) SHOULD accept RFC 9102-formatted proofs (as a series of unsorted `AuthenticationChain` records) and, if verification succeeds, SHOULD display the recipient in the form ₿`user`@`domain`.
7878

79+
=== PSBT types ===
80+
81+
Wallets accepting payment information from external devices (e.g. hardware wallets) MAY examine the following per-output PSBT fields to fetch RFC 9102-formatted proofs. Wallets creating PSBTs with recipient information derived from human-readable names SHOULD include the following fields.
82+
83+
When validating the contained proof, clients MUST enforce the inception on all contained RRSigs is no later than the current time and that the expiry of all RRSigs is no earlier than an hour in the past. Clients MAY allow for an expiry up to an hour in the past to allow for delays between PSBT construction and signing only if such a delay is likely to occur in their intended usecase.
84+
85+
{|
86+
! Name
87+
! <tt><keytype></tt>
88+
! <tt><keydata></tt>
89+
! <tt><valuedata></tt>
90+
! <tt><valuedata></tt> Description
91+
! Versions Requiring Inclusion
92+
! Versions Requiring Exclusion
93+
! Versions Allowing Inclusion
94+
|-
95+
| BIP 353 DNSSEC proof
96+
| <tt>PSBT_OUT_DNSSEC_PROOF = 0x35</tt>
97+
| None
98+
| <tt><1-byte-length-prefixed BIP 353 human-readable name without the ₿ prefix><RFC 9102-formatted DNSSEC Proof></tt>
99+
| A BIP 353 human-readable name (without the ₿ prefix), prefixed by a 1-byte length.
100+
Followed by an [[https://www.rfc-editor.org/rfc/rfc9102.html#name-dnssec-authentication-chain|RFC 9102 DNSSEC <tt>AuthenticationChain</tt>]] (i.e. a series of DNS Resource Records in no particular order) providing a DNSSEC proof to a BIP 353 DNS TXT record.
101+
|
102+
|
103+
| 0, 2
104+
|}
105+
79106
== Rationale ==
80107

81108
=== Display ===

0 commit comments

Comments
 (0)