bitcoindevkit / bitcoindevkit/bdk_wallet
Support DNS payment instructions, BIP353
- Dominant language
- Rust
- Stars
- 59
- Forks
- 105
- Avg merge
- 10d 9h
- Merged PRs (30d)
- 1
Description
**Describe the enhancement**
A new transaction builder crate should add an optional feature to enable DNS payment instructions support. If this option is enabled the builder will include a new function to add a recipient via their DNS payment instructions name, i.e. `₿user@domain` or `user@domain`, instead of a bitcoin address.
An error must be thrown if the DNS payment instructions lookup does not return valid payment instructions that include an on-chain address. An error should also be thrown if the user supplied payment amount does not equal the returned payment instructions fixed amount or is not in the min/max range for a configurable amount.
If a DNS payment instructions derived address is used for an output then the `PSBT_OUT_DNSSEC_PROOF` must also be included in the resulting PSBT.
**Use case**
This feature will allow a wallet developer to enable paying recipients via their human readable DNS payment instructions name. It will also allow hardware wallets that support BIP353 to validate and display the recipients payment instructions name.
Initially this will only support static on-chain addresses which are likely to be reused and thus be less private. But when BDK is able to support Silent Payments this feature can be used in a way that avoids address reuse.
For a full run-down of the pros/cons see [BIP353](https://bips.dev/353/).
**Additional context**
[BIP 21: URI Scheme](https://bips.dev/21/)
[BIP 353: DNS Payment Instructions](https://bips.dev/353/)
[BIP 352: Silent Payments](https://bips.dev/352/)
@thebluematt created a new [bitcoin-payment-instructions](https://docs.rs/bitcoin-payment-instructions/latest/bitcoin_payment_instructions/index.html) crate to lookup, validate and parse DNS bitcoin payment instructions. It should make the implementation of this feature pretty straight forward. See [discussion on discord](https://discord.com/channels/753336465005608961/753367451319926827/1357813717051506688).
Contributor guide
Assessment
This issue has not been assessed yet.