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

Not all tags are decoded #2

Closed
roeierez opened this issue Apr 29, 2022 · 3 comments
Closed

Not all tags are decoded #2

roeierez opened this issue Apr 29, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@roeierez
Copy link

Thanks a lot for the library!
I have noticed that not all tags are decoded such as "payee pubkey" (identifier 19).
For example in this invoice taken from the example:

lnbc1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpl2pkx2ctnv5sxxmmwwd5kgetjypeh2ursdae8g6twvus8g6rfwvs8qun0dfjkxaq8rkx3yf5tcsyz3d73gafnh3cax9rn449d9p5uxz9ezhhypd0elx87sjle52x86fux2ypatgddc6k63n7erqz25le42c4u4ecky03ylcqca784w

@fusion44 fusion44 self-assigned this Apr 30, 2022
@fusion44 fusion44 added the bug Something isn't working label Apr 30, 2022
@fusion44
Copy link
Owner

Glad you find the library useful! I'll add the missing tags this weekend.

@fusion44
Copy link
Owner

fusion44 commented May 1, 2022

@roeierez I've looked into this today. ID 19 is actually decoded, if present. The example invoice doesn't contain a payee pubkey. You can check that at https://lndecode.com. Other libraries extract the pubkey from the signature and use this as the payee pubkey. I'll add that too and actually implement validating the payment request. Will handle that with #3

In the process I've discovered that support for extracting payment_secret (identifier 16) and feature_bits (identifier 5) missing
and implemented them accordingly.

The library returns now returns a TaggedField with type unknown instead of null when encountering an unknown tag:

return TaggedField('unknown tag: $tag', data);

fusion44 added a commit that referenced this issue May 1, 2022
closes Not all tags are decoded #2
@fusion44 fusion44 closed this as completed May 1, 2022
@roeierez
Copy link
Author

roeierez commented May 1, 2022

@fusion44 Great job! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants