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

Optional description for Offer and Refund #3018

Merged

Commits on Apr 26, 2024

  1. Optional OfferContents::signing_pubkey

    If an Offer contains a path, the blinded_node_id of the path's final hop
    can be used as the signing pubkey. Make Offer::signing_pubkey and
    OfferContents::signing_pubkey return an Option to support this. Upcoming
    commits will implement this behavior.
    jkczyz committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    520fecf View commit details
    Browse the repository at this point in the history
  2. Allow parsing Offer without signing_pubkey

    If an offer has at least one path, it may omit the signing pubkey and
    use the blinded node id of the last hop of a path to sign an invoice.
    Allow parsing such offers but not yet creating them.
    jkczyz committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    94d5af6 View commit details
    Browse the repository at this point in the history
  3. Add InvoiceRequestTlvStream::paths

    Instead of reusing OfferTlvStream::paths, add a dedicated paths TLV to
    InvoiceRequestTlvStream such that it can be used in Refund. This allows
    for an Offer without a signing_pubkey and still be able to differentiate
    whether an invoice is for an offer or a refund.
    jkczyz committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    61e4fce View commit details
    Browse the repository at this point in the history
  4. Bolt12Invoice for Offer without signing_pubkey

    When parsing a Bolt12Invoice use both the Offer's signing_pubkey and
    paths to determine if it is for an Offer or a Refund. Previously, an
    Offer was required to have a signing_pubkey. But now that it is
    optional, the Offers paths can be used to make the determination.
    Additionally, check that the invoice matches one of the blinded node ids
    from the paths' last hops.
    jkczyz committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    b7635c4 View commit details
    Browse the repository at this point in the history
  5. Don't require Offer::description in API

    Offers currently require a description, though this may change to be
    optional. Remove the description requirement from the API, setting and
    empty string by default.
    jkczyz committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    48cba29 View commit details
    Browse the repository at this point in the history
  6. Don't require Refund::description in API

    Refunds currently require a description, though this may change to be
    optional. Remove the description requirement from the API, setting and
    empty string by default.
    jkczyz committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    db7e696 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. Only require description when offer has an amount

    The spec was changed to allow excluding an offer description if the
    offer doesn't have an amount. However, it is still required when the
    amount is set.
    jkczyz committed May 2, 2024
    Configuration menu
    Copy the full SHA
    e61001f View commit details
    Browse the repository at this point in the history