Skip to content
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

Allow custom data fields in the htlc payload #3670

Closed
joostjager opened this issue Nov 3, 2019 · 1 comment
Closed

Allow custom data fields in the htlc payload #3670

joostjager opened this issue Nov 3, 2019 · 1 comment
Labels
database Related to the database/storage of LND HTLC payments Related to invoices/payments

Comments

@joostjager
Copy link
Contributor

joostjager commented Nov 3, 2019

With the introduction of the new tlv payload format in lightning/bolts#619, it has become possible to deliver arbitrary data to intermediate hops and/or the final destination in a standardized way.

This enables several new use cases. Some examples:

  • When depositing into an exchange account, attach the account number to the final hop payload so the exchange knows where to credit the funds.
  • Send a chat message to the recipient and add IM capabilities to the Lightning Network

Most of the code that is required for this on the sender side was already added in #3362. In this PR, the rpc interface was extended to pass in a generic type-value map with a payment request.

However, this functionality was disabled in #3575 before the release of lnd 0.8. At the time, we wanted to take a bit more time to finalize the database serialization format. PR #3744 re-enables it again.

The receiver also needs to process custom records when they arrive. Custom data should be written to the invoice database and rpc clients should be able to query for it and/or receive it as part of the invoice notifications. PR #3742 is implementing this.

@joostjager joostjager added database Related to the database/storage of LND HTLC payments Related to invoices/payments labels Nov 3, 2019
@joostjager
Copy link
Contributor Author

The PRs implementing this have been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Related to the database/storage of LND HTLC payments Related to invoices/payments
Projects
None yet
Development

No branches or pull requests

1 participant