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

Proposal: Adding contentMetadata and contentMetadataUri Fields in PayerData for Lud-18 #209

Open
wants to merge 1 commit into
base: luds
Choose a base branch
from

Conversation

pavanjoshi914
Copy link
Contributor

Abstract

The current PayerData record of LUD-18 only includes fields such as PayerId, PayerName, PayerEmail, and PayerAddress. However, there is no provision for including metadata about the content for which the payment is made. This lack of provision for content metadata can lead to a lack of clarity regarding the content being paid for.
To address this issue, we propose to add two fields to the PayerData record, namely contentMetadata and contentMetadataUri.

By including the contentMetadata and contentMetadataUri fields in the PayerData record of LUD-18, LNURL-supported wallets can display information about the content being paid for to their users. This information can include details such as the content type, title, author, and any other relevant information. This can help users make informed decisions about the content they are paying for, and can also help content creators to promote their content more effectively. Additionally, this metadata can be used to facilitate content discovery, analytics of payment-sources and thus allowing users to search and filter content based on their preferences. Overall, the inclusion of contentMetadata and contentMetadataUri fields in LUD-18 can greatly enhance the user experience and improve the efficiency of payment processing.

Introduction:

LNURL is a widely adopted protocol for facilitating payments over the Lightning Network. It has enabled seamless and efficient payments for a variety of use cases. The payerData field is an essential component of the Lud-18 standard. However, the current Lud-18 standard does not include any fields to store information about the content for which the payment is being made. This information, known as content metadata, is important for tracking and analysing the different payment sources, give better user experience and a meaning to transaction history.

Objectives:

The primary objective of adding these new fields is to facilitate widespread adoption of LUD-18 and provide a more comprehensive and standardized way of tracking and analysing different payment sources, provider better user experience for transaction history. The proposed fields will enable LNURL supported wallets to store relevant metadata associated with the digital content for which the payment is made.

Proposal Details:

The proposed fields are as follows:

contentMetadata: This field will contain the metadata associated with the digital content for which the payment is made. The metadata could include information such as the title, author, publisher, date of publication, and other relevant details. Metadata is directly attached in the PayerData in form of JSON object

contentMetadataUri: This field will contain a URI that points to the location of the metadata associated with the digital content. This URI could be a link to an API endpoint, or any other location where the metadata is stored and can be retrieved from the Uri using a simgle GET request.

The reason for introducing two fields is to provide flexibility in how content metadata is managed and stored. Any of them or both the fields can be included.

The contentMetadata field will allow for direct association of metadata with the payment transaction, which can be useful in cases where the metadata is relatively small or the metadata changes frequently. On the other hand, the contentMetadataUri field will allow for referencing metadata stored externally, which can be useful in cases where the metadata is large or more complex, and requires a separate storage and management system

Implementation:

The content metadata can be included in the payerData field as a JSON object. The JSON object can contain different key-value pairs to represent various aspects of the content, such as title, description, author, genre, duration, format, and so on. The proposed fields, contentMetadata or contentMetadataUri, can be added to the JSON object to store the content metadata and the URI where the metadata can be accessed, respectively. The format of the JSON object remains same while using any of the field.

For example, the payerData field could contain the following JSON object:

"payerData": {
  "contentMetadata": {
    "title": "The Great Gatsby",
    "author": "F. Scott Fitzgerald",
    "genre": "Classic Literature",
    "duration": "5 hours",
    "format": "Audiobook",
    "language": "English"
  },

OR
  "contentMetadataUri": "https://example.com/great-gatsby-metadata.json"
}

Use Cases:

Adding content metadata to the payerData field can have several use cases. Some of them are:

  • Better Payment Management: By including content metadata, payment processors(wallets) can have better visibility into the nature of the content for which payments are being made. This can help in better payment management and creation of clean transaction history using filters

  • Improved User Experience: Users can benefit from having access to content metadata, as it provides additional information about the content they are paying for. This can help them make more informed decisions and enhance their overall experience.

  • Recommendation/Marketing: The content metadata can also be used for marketing purposes, such as promoting new releases, providing personalized recommendations, or creating targeted advertising campaigns.

  • Analytics: analysing different payment sources using content metadata to give better insights to the users about the payment a user is receiving

Conclusion:

The proposed addition of the contentMetadata and contentMetadataUri fields in the payerData field of the Lud-18 standard will provide a standardized and comprehensive way of tracking and analysing different payment sources giving more meaning to transaction history and many more. The inclusion of these fields will benefit content providers, payment processors, and end-users by providing improved tracking and a better user experience,

…lated to content for which payment is done

add contentMetadata field to attach metadata directly to payerData
add contentMetadataUri to reference metadata stored at any external location
signed-off-by: [email protected]
@fiatjaf
Copy link
Collaborator

fiatjaf commented Apr 7, 2023

I'm all for passing more and more structured data when that makes sense. The problem I see here is that the chances of this getting traction are negligible.

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.

2 participants