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
merged 4 commits into from Dec 5, 2019

Conversation

@cfromknecht
Copy link
Collaborator

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 halseth and Roasbeef as code owners Dec 4, 2019
@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 force-pushed the cfromknecht:payment-addr branch from cd5fe80 to f683c69 Dec 5, 2019
@cfromknecht cfromknecht added this to the 0.9.0 milestone 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
halseth approved these changes Dec 5, 2019
Copy link
Collaborator

halseth left a comment

LGTM

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
values.

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.
@cfromknecht cfromknecht force-pushed the cfromknecht:payment-addr branch from f683c69 to abb7f4f Dec 5, 2019
@cfromknecht cfromknecht requested a review from joostjager Dec 5, 2019
Copy link
Collaborator

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
1 of 2 checks passed
coverage/coveralls Coverage decreased (-0.04%) to 62.141%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
v0.9.0-beta automation moved this from Needs Review to Done Dec 5, 2019
@cfromknecht cfromknecht deleted the cfromknecht:payment-addr branch Dec 10, 2019
@cfromknecht cfromknecht added the amp label Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v0.9.0-beta
  
Done
3 participants
You can’t perform that action at this time.