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

Add "long" payment reference calculator function #1448

Open
2 tasks
MantisClone opened this issue Sep 6, 2024 · 0 comments
Open
2 tasks

Add "long" payment reference calculator function #1448

MantisClone opened this issue Sep 6, 2024 · 0 comments

Comments

@MantisClone
Copy link
Member

MantisClone commented Sep 6, 2024

Problem(s)

The RN SDK provides a PaymentReferenceCalculator calculates the "short" payment reference but not the "long" payment reference.

Also, the short and long payment Reference aren't in the docs.

Proposed Solution

  • Add a function to the PaymentReferenceCalculator that calculates the "long" payment reference.
  • Add documentation about what is short and long payment reference with links to the calcualtor.

Details

  • The payment reference input to transferFromWithReferenceAndFee() is 8-byte "short" payment reference (see attached image)
  • The payment reference output from the TransferWithReferenceAndFee event is the "long" keccak256 hash of the 8-byte short payment reference (see attached image)
  • The payments-subgraph indexes the "long" keccak256 hash of the 8-byte short payment reference
  • The RN SDK calculates the "long" hash when querying the payments subgraph <-- Use this to create the new function in PaymentReferenceCalculator.

Additional Detail

  • If someone gets the "long" payment reference from the payments-subgraph, there's no way to figure out the corresponding "short" payment reference. I think this is okay 🙆‍♀️

Reference

Screenshots

Image
Image

@MantisClone MantisClone converted this from a draft issue Sep 6, 2024
@MantisClone MantisClone moved this from 🆕 New to 🐞🧹 Backlog: Bug, Tech Debt, or Chore in Request Network Tech Backlog Sep 25, 2024
@MantisClone MantisClone moved this from 🐞🧹 Backlog: Bug, Tech Debt, or Chore to 🔖 Sprint Backlog in Request Network Tech Backlog Sep 30, 2024
@MantisClone MantisClone moved this from 🔖 Sprint Backlog to ✨ Backlog: Enhancements in Request Network Tech Backlog Sep 30, 2024
@MantisClone MantisClone moved this from ✨ Backlog: Enhancements to 🎫 Backlog in Request Network Tech Backlog Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎫 Backlog
Development

No branches or pull requests

2 participants