feat: bip321 request parsing and creation #1716
No reviewers
Labels
No labels
DB & Storage
Deployment
Error Handling & Logging
Maintenance
Payment Backend
backport
backport v0.13.x
backport v0.14.x
backport v0.15.x
bindings
blocked
bug
cdk-sql
ci
cli
deps
documentation
duplicate
enhancement
good first issue
help wanted
invalid
keep-open
ldk-node-ui
migrations
mint
mutation-testing
needs rebase
needs review
new nut
nut change
question
ready
rust-version
rustfmt
stacked hold
stale
testing
wallet
weekly-report
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cashubtc/cdk!1716
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "thesimplekid/bip_321"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just final-checkbefore committing@codex review
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
d379a268ebℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@ -0,0 +1,571 @@//! BIP 321 Payment Instruction HelpersThe parser always calls
PaymentInstructions::parsewithbitcoin::Network::Bitcoin, so valid testnet/regtest payment instructions (e.g.,tb1...addresses or non-mainnet Lightning invoices) will be rejected even though this API is exposed as a general wallet helper. This makesparse_payment_instructionunusable in non-mainnet environments and can break integration/regtest workflows; the network should be inferred from input or passed in by the caller rather than fixed to mainnet.Useful? React with 👍 / 👎.
@codex review
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
a748bcb37bℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The CLI now always passes
bitcoin::Network::Bitcoinfor BIP353 melt quotes, so parsing will reject valid non-mainnet on-chain methods embedded in resolved BIP321 instructions (e.g.,tb1/bcrt1fallbacks). Sincecdk-clihas no network override here, users operating against testnet/regtest-style deployments can’t request BIP353 quotes when records include those addresses.Useful? React with 👍 / 👎.
@ -0,0 +1,571 @@//! BIP 321 Payment Instruction Helpersmelt_human_readable_quoteonly falls back to Lightning Address when it seesError::Bip353Resolve, but this mapping currently converts any parse failure of an already-resolvedbitcoin:URI intoBip353Resolve. In practice, a BIP353 DNS record that resolves successfully but contains an invalid/unusable BOLT12 payload will be treated as a resolution failure and silently trigger LNURL fallback, which contradicts the no-fallback-on-unusable-BOLT12 behavior and can change payment routing for addresses that publish both mechanisms.Useful? React with 👍 / 👎.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.