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

CreateInvoice return no response #167

Open
Thomas-AnhDao opened this issue Oct 17, 2022 · 1 comment
Open

CreateInvoice return no response #167

Thomas-AnhDao opened this issue Oct 17, 2022 · 1 comment

Comments

@Thomas-AnhDao
Copy link

I'm creating invoice by using ln-service lib, but the createInvoice doesn't return anything. Here is my code:

const lnService = require('ln-service');

async function main() {
  try {
    const { lnd } = lnService.authenticatedLndGrpc({
      cert: 'my_cert',
      macaroon: 'my_macaroon',
      socket: 'host:port',
    });

    const invoice = await lnService.createInvoice({
      lnd,
      tokens: 100,
    });
    console.log("invoice", invoice);
  } catch (err) {
    console.log("err", err);
  }
}

main()
@alexbosworth
Copy link
Owner

take a look at the test
https://github.com/alexbosworth/ln-service/blob/master/test/integration/test_create_invoice.js

you can npm i ln-service and run the test with node test_create_invoice.js if you want to play around with it

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

No branches or pull requests

2 participants