Skip to content

request: Add more InvoiceRequest fields to InvoiceRequestFields (accessed via PaymentClaimable) #4169

@MaxFangX

Description

@MaxFangX

Lexe is trying to avoid persisting all offers that are generated, as the offers might never be paid, and the offers include redundant blinded path data which we want to throw away. However, we'd still like to surface much of the original offer information to our users when their offers do get paid.

LDK recovers most of the user-relevant offer fields in the InvoiceRequest sent by the payer. We would like to continue having LDK handle these InvoiceRequests, but we'd like to have access to several more fields of the original offer (received back via InvoiceRequest) to store and perhaps show these to the recipient when we receive a PaymentClaimable event.

We want to see:

  • Original offer amount : not included anywhere in PaymentClaimable
  • absolute_expiry: not included anywhere in PaymentClaimable
  • description : not included anywhere in PaymentClaimable
  • issuer : not included anywhere in PaymentClaimable

We already have access to these fields:

  • Offer id (in Bolt12OfferContext exposed in PaymentClaimable)
  • payer_note : (in InvoiceRequestFields)
  • quantity : (in InvoiceRequestFields)
  • human_readable_name : (in InvoiceRequestFields)

Adding these to InvoiceRequestFields seems like the most straightforward way to accomplish this, but the main requirement is that we can access the fields from somewhere within PaymentClaimable. Would this be possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions