Skip to content

BOLT 12 offer encoding and building#1719

Merged
TheBlueMatt merged 6 commits intolightningdevkit:mainfrom
jkczyz:2022-09-offer-encoding
Nov 8, 2022
Merged

BOLT 12 offer encoding and building#1719
TheBlueMatt merged 6 commits intolightningdevkit:mainfrom
jkczyz:2022-09-offer-encoding

Conversation

@jkczyz
Copy link
Copy Markdown
Contributor

@jkczyz jkczyz commented Sep 13, 2022

Define an interface for BOLT 12 offer messages. The underlying format consists of the original bytes and the parsed contents.

The bytes are later needed when constructing an invoice_request message. This is because it must mirror all the offer TLV records, including unknown ones, which aren't represented in the contents.

The contents will be used in invoice_request messages to avoid duplication. Some fields while required in a typical user-pays-merchant flow may not be necessary in the merchant-pays-user flow (i.e., refund).

Also, defines a builder for constructing an offer given a required description and node id.

See #1597 for ongoing BOLT 12 work depending on this PR.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants