lnd
lnd copied to clipboard
lnrpc: Add metadata field to `AddInvoice` and `DecodePayReq`
Change Description
Add the ability to set the invoice Metadata
field in the AddInvoice
RPC and to see said metadata via DecodePayReq
. This is very useful when needing to send some bytes with the invoice while still allowing the user to use the Memo field for messages
Steps to Test
- Create an invoice using the
AddInvoice
RPC and using themetadata
field. - Decode said invoice with
DecodePayReq
and observe themetadata
field.
Pull Request Checklist
Testing
- [X] Your PR passes all CI checks.
- [X] Tests covering the positive and negative (error paths) are included.
- [ ] Bug fixes contain tests triggering the bug to prevent regressions.
Code Style and Documentation
- [X] The change obeys the Code Documentation and Commenting guidelines, and lines wrap at 80.
- [X] Commits follow the Ideal Git Commit Structure.
- [ ] Any new logging statements use an appropriate subsystem and logging level.
- [ ] Any new lncli commands have appropriate tags in the comments for the rpc in the proto file.
- [ ] There is a change description in the release notes, or
[skip ci]
in the commit message for small changes.
📝 Please see our Contribution Guidelines for further guidance.