Skip to content

Persist LNURL successAction data in Lightning transaction records (LUD-09 compliance) #397

@al-munazzim

Description

@al-munazzim

Cross-posted from blinkbitcoin/blink-mobile#3463
Originally reported by @yanascz


Problem

When making an LNURL-pay payment, the successAction field is not persisted with the transaction record. This violates the LUD-09 specification which states:

WALLET should also store successAction data on the transaction record.

Currently, users can only see the successAction content on the payment success screen. If they dismiss it accidentally, the information is lost.

Proposed Backend Changes

This is Part 1 of a cross-stack fix. The mobile app changes (Part 2) are tracked in the original issue.

Changes required:

  1. Database schema: Add success_action field to Lightning transaction records

  2. GraphQL schema: Add successAction field to Transaction type:

    type LnSuccessAction {
      tag: String!       # "message" | "url" | "aes"
      message: String    # For message type
      url: String        # For url type  
      description: String # For url and aes types
    }
    
    type SettlementViaLn {
      preImage: String
      successAction: LnSuccessAction  # NEW
    }
  3. Transaction processing: Capture successAction from LNURL-pay callback and persist it with the transaction

Notes

  • The frontend PR depends on this backend support being deployed first
  • Existing transactions won't have successAction (only affects new transactions going forward)
  • AES-encrypted successAction also requires the preImage for decryption - ensure preImage is preserved

Context: This was filed as a mobile app issue but requires backend changes first. Cross-posting here so the right folks can work on it!

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