Skip to content

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

Merged
cfromknecht merged 4 commits intolightningnetwork:masterfrom
cfromknecht:payment-addr
Dec 5, 2019
Merged

parse and generate bolt 11 invoices w/ payment addrs#3788
cfromknecht merged 4 commits intolightningnetwork:masterfrom
cfromknecht:payment-addr

Conversation

@cfromknecht
Copy link
Copy Markdown
Contributor

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 December 4, 2019 19:06
@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 Related to invoices/payments spec labels Dec 5, 2019
Comment thread lnrpc/rpc.proto Outdated
Comment thread lnrpc/invoicesrpc/addinvoice.go Outdated
Comment thread zpay32/invoice_internal_test.go Outdated
Comment thread zpay32/invoice_test.go Outdated
Copy link
Copy Markdown
Contributor

@halseth halseth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

Comment thread zpay32/invoice_test.go Outdated
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.
Copy link
Copy Markdown
Contributor

@joostjager joostjager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, assuming CI becomes green

@cfromknecht cfromknecht merged commit 969fe44 into lightningnetwork:master Dec 5, 2019
@cfromknecht cfromknecht deleted the payment-addr branch December 10, 2019 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

amp payments Related to invoices/payments spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants