Building a Lightning App (Lapp) - Discussion

Your key has expired. You generate a new one and try again. :slight_smile:

I’m getting this message after I test the connection ā€œError while connecting to the API (Response status code does not indicate success: 502 (Bad Gateway).)ā€.
Does this
(type=charge;server=https://api-token:6ba722c01e01846c671fed7a6909bbda8ebedf0b842fd75c9a82220132b34e60@lightning.filipmartinsson.com:443/lightning-charge/btc/)
work or its outdated?How do I go around this issue?

Where do you encounter this error? I have checked the server and it seems that all services are working. I have updated the server, so you can try again.

Still giving me the same error, when I test the connection.
How about using internal node?what’s the different between use custom node vs use internal node?

Still giving me the same error, when I test the connection.
How about using internal node?what’s the different between use custom node vs use internal node?

1 Like

Yes you should be using the internal node. This was changed in the update of btcpay, but I guess the note got lost after the move to the new academy platform.

Can I get a rundown of what I need to install before I’m able to use these commands?
So far I’ve installed:
node.js
git

but I can’t even get the ā€œnpm installā€ command to work
image

what else am I missing here?

Hi, I tried installing just now and seemed to work fine for me. On windows you might need to also install Python to make it work.

1 Like

I did a Python repair and it worked. Thanks!

1 Like

Dear all,
I hope to get some help to better understand the Lightning Network. The questions are as follow:

  1. Do both ends of the opened, Lightning Network, channel have to create a transaction of the same amout in BTC?

  2. What is the recommended funding amount to open a channel for private transfers (peer-2-peer) and retail purchases?

  3. Is it possible to open a one way channel of any amount of BTC to facilitate transactions flow though the opened channel?

  4. Do Lightning nodes have bilateral and/or unilateral multiple channels?

  5. If Lightning nodes have bilateral multiple channels, how do they negotiate the initial funding to open a channel for retail purposes? Assuming higher amounts of BTC flow.

  6. Can the channels of a node be closed by simply signing the respective transactions between nodes and withdraw all funds?

  7. Is the network flow affected by such action, and how can this be solved?

  8. Can a Zap wallet be funded direclty from my bank account through (SEPA) or through an exchange account such as Kraken, Bianance, Coinbase, etc.

  9. Will this course cover setting up a BTCPayServer node on the mainnet assuming that a full BTC node is already running?

Many thanks in advance for the feedback.

1 Like

No, to create a channel only one node needs to open a channel. It can also be funded from one side only.

There is no recommended amount to open a channel, it can be any size really. Though some nodes will only accept channels with a minimum amount that needs to be funded.

Yes, I answered this in 1.

Not sure what you mean. A channel can only be open between two nodes. To connect to other nodes, a new channel has to be open. Every single channel can either be unilateral or bilateral.

Again if you mean this by opening a channel to multiple nodes, its not possible. And the initial funding doesn’t have to be negotiated because each side can fund the channel with any balance they want. If they want to open a channel with the same value, a verbal agreement would have to be made.

Yes.

Not really. If the channel was used by other nodes to make payments on that route, a new one would be found.

I’m not aware of any service that would support SEPA txs and not many exchanges support Lightning at this moment.

No, the BTCPayServer for the course is already setup. But a docker version is fairly straightforward to setup. It also contains a pruned BTC node and lightning node.

1 Like

Hi Filip,

I’m not getting the btcpay pop up when directed to localhost:3000/invoice

invoice.jade

script(src="https://lightning.filipmartinsson.com/modal/btcpay.js")
script(type='test/javascript').
  window.onload = function(){
    var id = "#{invoiceId}"
    window.btcpay.showInvoice(id);
  }

I enabled pop ups in my browser too.

image

The command ā€œgit clone https://github.com/filipmartinsson/lightning-app-boilerplate.gitā€ does not work in WIN10 PowerShell.

Is there another way to solve this issue other than installing node.js and python as suggested by

and

Why Windows PowerShell cannot recognise ā€œgit cloneā€ command line but Apple OS can? :confused:

Thanks in advance for your help and insight :slightly_smiling_face:

Can you check the console for errors?

Did you install git on your system? Git on windows comes installed with its own shell and I’m not sure how to configure it for powershell. Checking online I found this:

https://git-scm.com/book/ms/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Powershell

1 Like

Thank you very much. I ended up downloading Git for Windows, the command ā€œgit clone https://github.com/filipmartinsson/lightning-app-boilerplate.gitā€ works just fine in WIN10 PowerShell :smiley:

Gave it another go and no luck.
Screenshot 2021-10-27 at 11.03.52

Quick help!

I am running WIN10 and I have installed Nodejs and Git, hoping to overcome certain command lines execution errors in PowerShell. It worked fine up until ā€œnpm startā€ command line.

The command ā€œnpm startā€ produces the following outcome:

npm start_PowerShell ERROR

Q.1. How can I overcome this issue?
Q.2. Are there other command line terminals more suitable to work with apart from PowerShell?
Q.3. I attempted to view ā€œindex.jadeā€ file on my browsers (Firefox and GoogleChrome) but to no avail. The tags for headings, paragraphs and buttons do not reflect on the browser–just the plain text written in Atom. How do I solve this issue?

Thanks as always, :pray:

Hello there,

I am planning to set up my own LN node. Where am I able to find documentation for this purpose without spending hours online looking for it?

Thanks as always,

1 Like

Can you add a console log to get endpoint in invoice.js.

client.get_invoice(invoiceId)
  .then(invoice => {
    console.log("OK");
    console.log(invoice);
  })
  .catch(err => {
    console.log("Error");
    console.log(err);
  })