Building a Lightning App (Lapp) - Discussion

Hello, I don’t get a Merchant Key. I got a private Key and and btcpay pair code but then not a merchant key. What I am doing wrong?

After clicking enter on the command from the picture I get a very long message but not the merchant key. I tried it also with the other mentioned commands from the video but then I get the message from the second picture.

Hopefully, someone can help. I cannot go further without solving this problem.

Your paring key seems to be expired. If you took to long between creating the paring key in the store and running the command you will get this error.

Hello Alko89,

I am trying again to get this to work. I use Windows. I initially used the command that Filip provided in the video (see the image). It didn’t work. So I used the command provided on the course page. Can you assist me in resolving this?

Thanks!

David

What version of node are you using? Did you install the latest one?

You can also try set NODE_OPTIONS=--openssl-legacy-provider if it helps, but its probably best you update.

Hello Alko89,

I really appreciate your help so far. Unfortunately, it didn’t work. I installed the latest version of node js (version 17.9.0), restarted my computer, and then followed Filip’s instructions in order as presented by the video. Please see the images of the node js download that I used and the screenshot of my powershell. Please advise what should I try now.

  • David

Try set NODE_OPTIONS=--openssl-legacy-provider

Hi Alko89,

I tried that, and it didn’t work. I have my local node up through bitcoind in regtest too. Doing my best trying to get this to work. I’m following the directions but am still getting the same error.

Here is what I did:

  1. In Powershell - set the node options and then went to my directory:
    PS C:\Users\David> set NODE_OPTIONS=–openssl-legacy-provider
    PS C:\Users\David> cd “C:\Users\David\Desktop\nghiem\ivan on tech\lightning”

  2. PS C:\Users\David\Desktop\nghiem\ivan on tech\lightning> git clone https://github.com/filipmartinsson/lightning-app-boilerplate.git

  3. PS C:\Users\David\Desktop\nghiem\ivan on tech\lightning> cd “C:\Users\David\Desktop\nghiem\ivan on tech\lightning\lightning-app-boilerplate”
    PS C:\Users\David\Desktop\nghiem\ivan on tech\lightning\lightning-app-boilerplate> npm install

  4. PS C:\Users\David\Desktop\nghiem\ivan on tech\lightning\lightning-app-boilerplate> node -p “require(‘btcpay’).crypto.generate_keypair().getPrivate(‘hex’)”

12b7d6ebb4298b367d6e680bfc097a4a887918564d1c4f731cc29722a7a788a5 (this is my generated key)

  1. created my token and generated the pairing code

  2. PS C:\Users\David\Desktop\nghiem\ivan on tech\lightning\lightning-app-boilerplate> node -e “const btcpay=require(‘btcpay’); new btcpay.BTCPayClient(‘https://lightning.filipmartinsson.com/’, btcpay.crypto.load_keypair(Buffer.from(‘12b7d6ebb4298b367d6e680bfc097a4a887918564d1c4f731cc29722a7a788a5’, ‘hex’))).pair_client(‘1mKMsKL’).then(console.log).catch(console.error)”

Hi Alko89,

Did you get a chance to see my reply? Is there anything else that I can try?

Best,

David

Hello,

I’m still trying to figure this out. I cannot get past the ‘Creating API Keys’. Can anyone help me?

Hi,

I guess i have same or alike problem.

Did not get the merchant key with the provided command.

I run an umbrel full node on a RaspberyPi with 1TB SSH disk, just fine.
(set up as in this (dutch) video)

I added the BTCPay server as app to this node and created a store and got the BTCpay-key and paircode.

From a VCS git-bash prompt I run the command from my laptop (in same LAN as the node):

node -e "const btcpay=require('btcpay'); new btcpay.BTCPayClient('<btcpayIpv4>', btcpay.crypto.load_keypair(Buffer.from('<btcpayKey>', 'hex'))).pair_client('<btcpayPaircode>').then(console.log).catch(console.error)"

with the 3 <> replaced by my values.

I added a few console.log lines to the BTCpay client.js code to debug what happens,
The “unsigned_request” functions returns resp , which contains this line in the html output:

We’re sorry but Umbrel doesn’t work properly without JavaScript enabled. Please enable it to continue

That makes it clear(!), but how to solve this??

How to enable Javascript at this umbrel node?

Regards,
Cas

Hi CasNWK,

Thank you for confirming that there is a problem with the command. I’m still stuck at this point in the course and CANNOT proceed. I’m hoping that the Academy can either provide a solution or update the course.

I’m sorry, but I’m not familiar with Umbrel. If you have an issue with running their node, then you should contact their support for help.

Hello Filip, I am lost early on! I have created my store. I am now trying to scroll down to where it says Lightning Network (under derivation path) but my page isn’t the same. I am on Windows 10 under Store Settings. I can’t find the area anywhere that you click ‘modify’. I don’t see Lightning Network (experimental) anywhere on the page.

hi @Cryptojuice

The app has been updated since the video has been recorded, but you can still get the access token in Settings -> Access Token

hey man thank you so much

Once I go to access token I have two info boxes, Label, and Public Key. Is this the right place? What do I put in those boxes? Do I just put an address from my hardware wallet?

You don’t have to input anything, you just have to generate the the token to use with the library.

Hi Alko89,

Some good news – I finally got it to work. What happened is that instead of just downloading and installing the latest version of Node.js, I deleted the entire program from my computer first. Once that was just, I installed the latest Node.js. Just doing that resolved my issues.

  • David
1 Like

Hi it seems that your lightning node is down. I cannot open the channel on the address

Hello together,
I have a problem with my Webpage. I followed Filips instruction in the Checking for Lightning Payment video, at first when I tried the next step my Online Store displayed a Lightning invoice window and I tried to make a payment which failed because the Zap wallet was buggy and Fillips node was down.
Today I restarted the page and it shows error messages.
Does anyone know the reason and a solution for the problem.
Thanks in advance for your help.
Capture d’écran 2022-08-24 à 10.51.13