Skip to content

Conversation

@sdmg15
Copy link

@sdmg15 sdmg15 commented Dec 11, 2025

This PR adds BIP353 payment instructions support. The issue related to this PR can be found at bitcoindevkit/bdk_wallet#13.

Changes done:

  • Added a feature flag bip353 to conditionally enable the support
  • Provides resolve_dns_recipient(hrn, amount, network), this will resolve and validate the payment against what the resolution returned using a default resolver. The call to this function will return a Payment containing scriptBuf, amount, and dnssec_proof (which can be added to PSBT)
  • Provides resolve_dns_recipient_with_resolver(resolver, hrn, amount, network) this will do the same as the previous function but this time using the user provided resolver.

TODO

  • Add tests
  • Wrap the ParseError into an internal error type?
  • Finish with implementing resolve_dns_recipient_with_resolver

Questions

  • The interfaces are async, should be provide synchronous one or let the end user decides what to do ?
  • For FixedPaymentInstructions I was thinking of making the amount parameter as Option so that would mean the user is just ready to pay what the resolution returns, instead of him inputting a wrong amount. What do you think?

The functions added here are standalone. I'm happy to get guidance on how they could fit together with that is already implemented here

@aagbotemi
Copy link
Collaborator

I see this was previously in bdk_wallet and was moved to bdk_tx based on the comment that all transaction building logic is being consolidated here.

This PR doesn’t currently use any bdk_wallet or bdk_tx APIs, and BIP353 itself doesn’t explicitly participate in transaction building. So, it's not the core responsibility of bdk_tx.

I think it would be appropriate to have this in bdk-cli, where we already have experimental features. I'd recommend moving it there instead.

@sdmg15
Copy link
Author

sdmg15 commented Dec 15, 2025

Thanks for your inputs @aagbotemi, and yeah indeed it doesn't actually uses any API currently defined here, that's why I called them "standalone". It's more at a usable level than abstract as to what bdk-tx is offering I think too.
I feel like it could fit both in bdk-cli and bdk_wallet. Will discuss this with the other team during meeting.

@notmandatory
Copy link
Member

I agree with @aagbotemi and I've added a related comment to the original issue here: bitcoindevkit/bdk_wallet#13 (comment)

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.

3 participants