Skip to content

feat: add extra metadata for payments (POC)#247

Merged
im-adithya merged 6 commits intomasterfrom
feat/display-metadata
May 29, 2025
Merged

feat: add extra metadata for payments (POC)#247
im-adithya merged 6 commits intomasterfrom
feat/display-metadata

Conversation

@rolznz
Copy link
Copy Markdown
Contributor

@rolznz rolznz commented Jan 8, 2025

Closes #246
Closes #203

This adds much more context to the transaction list than was there before (normally you pay to a lightning address and afterwards see an empty transaction with no info about it except the amount)

Needs planning on how the data should be structured, there are some new concepts here. I am just showing what is possible with being able to set metadata when paying. This PR also includes showing a lud-18 payer name for received payments.

image

image

image

metadata: {
recipient_data: {
identifier: recipientIdentifier,
description: recipientDescription,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the naming and where description is set here is not great. It comes from the LUD-06 metadata for the invoice. I don't really think this should be in recipient_data?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just remove this from the PR.

@rolznz
Copy link
Copy Markdown
Contributor Author

rolznz commented Apr 9, 2025

TODOs:

  • use typings from Alby JS SDK once it LNClient is merged
  • remove description from recipient data
  • cleanup how components are rendered based on what metadata we have (design it so we can easily display different types of data)

@im-adithya im-adithya added this to the 1.13.0 milestone May 6, 2025
title="Description"
content={transaction.description || "-"}
content={
// TODO: should this description be merged on Alby Hub side?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is best to keep the description as BOLT11 invoice description and use a separate title and text for metadata related fields.

But I think transaction.description || metadata?.recipient_data?.description || metadata.comment can be used for the tx list to give more context than before.

@im-adithya im-adithya merged commit d12b176 into master May 29, 2025
2 checks passed
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.

Display payer_data for received payments Pass metadata to pay_invoice when paying to a lightning address

2 participants