-
Notifications
You must be signed in to change notification settings - Fork 1
Payout address env var #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Introduces PAYOUT_ADDRESS for simplified payout configuration, supporting multiple formats (LNURL, Lightning Address, Bolt12, BIP-353). Legacy withdrawal variables are deprecated. Co-authored-by: nick <[email protected]>
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: nick <[email protected]>
|
@martinsaposnic does it make sense to simplify the send action on lightning-js to just handle any sort of address? |
Co-authored-by: nick <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cbdc99b046
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cbdc99b046
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…-address-env-var-8667 # Conflicts: # package-lock.json
| case 'lightning_address': | ||
| case 'bip353': | ||
| // LNURL, Lightning Address, and BIP-353 all use the same payment method | ||
| await node.payLNUrl(address, amount) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to parse the payment instructions at the bip353 address to figure out what to use? Is it common for people to put an lnurl address behind bip-353? Thought sticking a Bolt12 offer at the bip-353 address would be the most common case (onchain aside)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is leveraging the fact that payLNUrl is actually just doing bitcoin-payment-instructions and handles it for you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Confusing method name
| break | ||
|
|
||
| case 'lnurl': | ||
| case 'lightning_address': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For lightning_address as it is implemented now I think the payment type is still ambiguous. I think we have to try fetching an invoice first from an LNURL server then fallback to fetching payment instructions from a DNS server. could also it it the other way around but LNUrl is more common right now.
Introduce a new PAYOUT_ADDRESS env var that simplifies payout configuration
by accepting multiple formats: LNURL, Lightning Address, Bolt12 Offer, and
BIP-353. The address type is automatically detected based on format.
Add a new unified
payouthandler that mdk.com can call without needingto specify the payment type. The handler reads PAYOUT_ADDRESS, detects
the address type, and routes to the appropriate payment method.
Legacy WITHDRAWAL_BOLT_11, WITHDRAWAL_BOLT_12, and WITHDRAWAL_LNURL env
vars are maintained for backwards compatibility but now emit deprecation
warnings encouraging migration to PAYOUT_ADDRESS.
Changes:
payoutroute in route.tsLinear Issue: MDK-405