-
Notifications
You must be signed in to change notification settings - Fork 116
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
[feature]: add RPC for determining the amount of an asset that will be sent if an invoice is paid #1238
Comments
ZZiigguurraatt
changed the title
[feature]: add RPC for determining the amount of an assets that will be sent if an invoice is paid
[feature]: add RPC for determining the amount of an asset that will be sent if an invoice is paid
Dec 4, 2024
FYI RPC endpoints |
Roasbeef
added a commit
to Roasbeef/taproot-assets
that referenced
this issue
Dec 13, 2024
In this commit, we implement the `DecodeAssetInvoice` command. This command allows a caller to decode a normal LN invoice, adding the asset specific information along the way. This includes the corresponding asset unit amount, asset group information, and also the decimal display information. Fixes lightninglabs#1238
Roasbeef
added a commit
to Roasbeef/taproot-assets
that referenced
this issue
Dec 13, 2024
In this commit, we implement the `DecodeAssetPayReq` command. This command allows a caller to decode a normal LN invoice, adding the asset specific information along the way. This includes the corresponding asset unit amount, asset group information, and also the decimal display information. Fixes lightninglabs#1238
Roasbeef
added a commit
to Roasbeef/taproot-assets
that referenced
this issue
Dec 15, 2024
In this commit, we implement the `DecodeAssetPayReq` command. This command allows a caller to decode a normal LN invoice, adding the asset specific information along the way. This includes the corresponding asset unit amount, asset group information, and also the decimal display information. Fixes lightninglabs#1238
Roasbeef
added a commit
that referenced
this issue
Dec 17, 2024
In this commit, we implement the `DecodeAssetPayReq` command. This command allows a caller to decode a normal LN invoice, adding the asset specific information along the way. This includes the corresponding asset unit amount, asset group information, and also the decimal display information. Fixes #1238
Roasbeef
added a commit
to Roasbeef/taproot-assets
that referenced
this issue
Dec 18, 2024
In this commit, we implement the `DecodeAssetPayReq` command. This command allows a caller to decode a normal LN invoice, adding the asset specific information along the way. This includes the corresponding asset unit amount, asset group information, and also the decimal display information. Fixes lightninglabs#1238
Roasbeef
added a commit
to Roasbeef/taproot-assets
that referenced
this issue
Dec 18, 2024
In this commit, we implement the `DecodeAssetPayReq` command. This command allows a caller to decode a normal LN invoice, adding the asset specific information along the way. This includes the corresponding asset unit amount, asset group information, and also the decimal display information. Fixes lightninglabs#1238
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
If I try to pay an invoice in sat using an asset, I currently have no idea how many assets will be sent, so I don't know if I want to make the payment or not.
Describe the solution you'd like
Add an RPC that will read an invoice and make an RFQ and see what the exchange rate is with the channel peer and let the user know how many assets that is equivalent to.
Actually there should be two RFQ queries that should be made. First we should query for the sats amount as if we are only paying our direct channel peer. Next, a second RFQ query should be made for the total amount to send, including routing fees to the final destination. We should then present the difference between the two as the routing fees that must be paid in the asset units. This way the user can see if they have a high or low exchange rate and also high or low routing fees.
Describe alternatives you've considered
Not any good alternatives.
Additional context
This also helps with troubleshooting in test networks, in addition to real world uses where a user wants to make sure they aren't getting ripped off with their exchange rate before sending. Also, if the asset is not very divisible and routing fees are low, do we have to round up the asset a considerable amount to pay routing fees? I have no idea right now because I can't see the exchange rate before sending.
The text was updated successfully, but these errors were encountered: