Skip to content

fix(payments): surface payment preimage on send result [AMB-2789]#25

Open
wthrajat wants to merge 2 commits into
mainfrom
rajat/amb-2789-payments-sdk-surface-payment-preimage-on-send-result
Open

fix(payments): surface payment preimage on send result [AMB-2789]#25
wthrajat wants to merge 2 commits into
mainfrom
rajat/amb-2789-payments-sdk-surface-payment-preimage-on-send-result

Conversation

@wthrajat

Copy link
Copy Markdown
Member

What this does

The send functions dropped the payment preimage that LND and litd already return in the send-payment stream. This adds it.

Why

The preimage is the proof that a payment went through. It's needed for L402 and any proof-of-payment flow. Before this, the only way to get it was setting AMBOSS_SDK_DEBUG=1 and reading the raw stream by hand. An external builder flagged this as their main blocker.

Changes

  • NodePaymentResult now has an optional preimage field.
  • The LND and litd stream update types now include payment_preimage.
  • sendLndPayment and sendAssetPayment copy it into the terminal result.
  • Updated the lnd test to assert the preimage is surfaced.

No behavior change for existing callers — it's a new optional field.

Linear: AMB-2789

wthrajat added 2 commits July 16, 2026 19:27
LND and litd return payment_preimage in the send-payment stream but the
SDK dropped it. Add preimage to NodePaymentResult and the stream update
types, and pass it through in sendLndPayment and sendAssetPayment so
callers can use it as proof of payment (L402 etc.).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant