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: add decode invoice function #131

Closed
wants to merge 4 commits into from
Closed

Conversation

rolznz
Copy link
Contributor

@rolznz rolznz commented Nov 14, 2023

fixes #127

adds only one dependency

src/light-bolt11-decoder.d.ts Outdated Show resolved Hide resolved
@@ -2,3 +2,4 @@ export * as auth from "./auth";
export * as types from "./types";
export * as webln from "./webln";
export { Client } from "./client";
export * from "./decodeInvoice";
Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm, I don't think this is a nice API.
Just exposing the global function because that people don't have to import it from the light-bolt11-decoder.

doesn't this make more sense to have in the Invoice https://github.com/getAlby/js-lightning-tools/blob/master/src/invoice.ts

So I can initialize an invoice and then have all the data available there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bumi sounds good to me. Would it make sense for this sdk to depend on lightning-tools? or should people install both packages as they are doing now? I think it would be nice to have some support for decoding invoices in this library?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update: we could add a small link to the README

Decoding Invoices

See lightning-tools

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