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

BOLT 12 outbound PaymentId #2468

Merged
merged 6 commits into from
Aug 29, 2023

Commits on Aug 29, 2023

  1. Split InvoiceRequest::verify_and_respond_using_derived_keys

    InvoiceRequest::verify_and_respond_using_derived_keys takes a payment
    hash. To avoid generating one for invoice requests that ultimately
    cannot be verified, split the method into one for verifying and another
    for responding.
    jkczyz committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    21fa551 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    971cb20 View commit details
    Browse the repository at this point in the history
  3. Add an encryption key to ExpandedKey for Offers

    Metadata such as the PaymentId should be encrypted when included in an
    InvoiceRequest or a Refund, as it is user data and is exposed to the
    payment recipient. Add an encryption key to ExpandedKey for this purpose
    instead of reusing offers_base_key.
    jkczyz committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    4fafae0 View commit details
    Browse the repository at this point in the history
  4. Add a ChaCha20 utility for encrypting a block

    This hides an encryption implementation detail from callers.
    jkczyz committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    4732484 View commit details
    Browse the repository at this point in the history
  5. Add a ChaCha20 utility for encrypting in place

    Similar to ChaCha20::encrypt_single_block only encrypts in-place.
    jkczyz committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    861e0ee View commit details
    Browse the repository at this point in the history
  6. Include PaymentId in payer metadata

    When receiving a BOLT 12 invoice originating from either an invoice
    request or a refund, the invoice should only be paid once. To accomplish
    this, require that the invoice includes an encrypted payment id in the
    payer metadata. This allows ChannelManager to track a payment when
    requesting but prior to receiving the invoice. Thus, it can determine if
    the invoice has already been paid.
    jkczyz committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    7a3e06b View commit details
    Browse the repository at this point in the history