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

parse and generate bolt 11 invoices w/ payment addrs #3788

merged 4 commits into from Dec 5, 2019


Copy link

@cfromknecht cfromknecht commented Dec 4, 2019

Split off from #3679

This PR:

  • adds decoding of invoice payment addresses in the s field
  • adds ability to set payment address on invoice via functional option
  • generates a random payment address for all newly created invoices
  • exposes payment addresses via decodepayreq

This will enable #3415 to properly test receiving crowd funded mpp payments via the SendToRoute rpcs.

@cfromknecht cfromknecht requested review from joostjager and removed request for Roasbeef Dec 4, 2019
@cfromknecht cfromknecht changed the title Payment addr parse and generate bolt 11 invoices w/ payment addrs Dec 4, 2019
@cfromknecht cfromknecht added this to the 0.9.0 milestone Dec 5, 2019
@cfromknecht cfromknecht added v0.9.0 payments spec labels Dec 5, 2019
lnrpc/rpc.proto Show resolved Hide resolved
lnrpc/invoicesrpc/addinvoice.go Show resolved Hide resolved
zpay32/invoice_internal_test.go Show resolved Hide resolved
zpay32/invoice_test.go Outdated Show resolved Hide resolved
halseth approved these changes Dec 5, 2019
Copy link

@halseth halseth left a comment


zpay32/invoice_test.go Outdated Show resolved Hide resolved
cfromknecht added 4 commits Dec 5, 2019
This commit also consolidates the existing code duplication in parsing
payment hashes and description hashes into a single, combined method for
parsing 32-byte values. A similar change is made for encoding 32-byte

zpay32/invoice: consolidate 32-byte encoding logic
This commit modifies Lighting.AddInvoice and InvoicesRPC.AddHoldInvoice
to include the node's supported feature bits on the invoice. For now
this only includes the optional TLV Onion Payload bit.
Copy link

@joostjager joostjager left a comment

LGTM, assuming CI becomes green

@joostjager joostjager added this to Needs Review in v0.9.0-beta Dec 5, 2019
@cfromknecht cfromknecht merged commit 969fe44 into lightningnetwork:master Dec 5, 2019
1 of 2 checks passed
v0.9.0-beta automation moved this from Needs Review to Done Dec 5, 2019
@cfromknecht cfromknecht deleted the payment-addr branch Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
amp payments spec v0.9.0
No open projects

Successfully merging this pull request may close these issues.

None yet

3 participants