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

Introduce Reply Paths for BOLT12 Invoice in Offers Flow. #3163

Merged
merged 5 commits into from
Sep 11, 2024

Commits on Sep 6, 2024

  1. HMAC Construction and Verification for PaymentHash

    When a InvoiceError is received for a sent BOLT12Invoice, the
    corresponding PaymentHash is to be logged. Introduce hmac construction
    and verification function for PaymentHash for this purpose.
    shaavan committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    e2ee325 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. Introduce Verification trait.

    - The trait defines the public method one may define for creating and
      verifying the HMAC.
    - Using a pub trait to define these method allows the flexibility for
      other `OffersMessageHandler` construct to construct the HMAC and
    authenticate the message.
    shaavan committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    6500277 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. Add HMAC, and nonce to OffersContext::InboundPayment

    Introduce HMAC and nonce calculation when sending Invoice with
    reply path, so that if we receive InvoiceError back for the
    corresponding Invoice we can verify the payment hash before logging it.
    shaavan committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    8b479ac View commit details
    Browse the repository at this point in the history
  2. Add reply_path to BOLT12Invoices in Offers Flow

    1. Introduced reply_path in BOLT12Invoices to address a gap in error handling.
       Previously, if a BOLT12Invoice sent in the offers flow generated an Invoice Error,
       the payer had no way to send this error back to the payee.
    2. By adding a reply_path to the Invoice Message, the payer can now communicate
       any errors back to the payee, ensuring better error handling and communication
       within the offers flow.
    shaavan committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    a4bf936 View commit details
    Browse the repository at this point in the history
  3. Update Offers Test to Verify BOLT12 Invoice Reply Paths

    1. Updated the Offers Test to check the reply paths in BOLT12 Invoices.
    2. Changed the `extract_invoice` return type from `Option<BlindedMessagePath>`
       to `BlindedMessagePath` since all BOLT12Invoices now have a corresponding
       reply path by default.
    shaavan committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    7b49993 View commit details
    Browse the repository at this point in the history