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

feat: decode invoice #140

Merged
merged 2 commits into from
Nov 17, 2023
Merged

feat: decode invoice #140

merged 2 commits into from
Nov 17, 2023

Conversation

rolznz
Copy link
Contributor

@rolznz rolznz commented Nov 17, 2023

Fixes #127

  • in the example a scope is needed to create a client even though the scope is not actually needed and does not make sense. How would we do this in the future? add a new scope?
  • unlike the lightning tools package, there is no mapping of the response type. Should we do basic mapping here again to e.g. expose Javascript dates for the invoice created date and expiry?

@bumi
Copy link
Contributor

bumi commented Nov 17, 2023

in the example a scope is needed to create a client even though the scope is not actually needed and does not make sense. How would we do this in the future? add a new scope?

I think this is fine. If you use the SDK and also have an access token then you have some scope.
Otherwise you can just do fetch("https://api.getalby.com/.../decode/[PR]") and you don't need this SDK.

unlike the lightning tools package, there is no mapping of the response type. Should we do basic mapping here again to e.g. expose Javascript dates for the invoice created date and expiry?

either everywhere or nowhere imo. I guess we don't do it at the other endpoints also.

Copy link
Contributor

@bumi bumi left a comment

Choose a reason for hiding this comment

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

utACK

@rolznz rolznz merged commit 7ed7fe6 into master Nov 17, 2023
1 check 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.

Add support for decoding invoices
2 participants