Closed prusnak closed 2 years ago
Edit: it seems I observe the same error even when I install lnurl globally (npm install -g lnurl
)
It looks like your config.json is missing "store"
. It might not be so intuitive, but the store and lightning configurations are defined as objects in the config.json file. For example:
{
"host": "localhost",
"port": 3000,
"url": "http://localhost:3000",
"endpoint": "/lnurl",
"auth": {
"apiKeys": []
},
"lightning": {
"backend": "lnd",
"config": {}
},
"store": {
"backend": "memory",
"config": {}
}
}
You are correct. It was indeed missing store
. Thanks!
I got confused, because when passing arguments via command-line, the lnurl
command correctly uses default values for store
. So I assumed it is not mandatory to add this to the config json file.
I think it's a reasonable expectation that the defaults should be used when providing a config file. I'll mark that as a bug and fix it when I have a bit of time. Thanks for bringing it to my attention.
Fixed and will be in the next release.
Steps to reproduce:
npm install lnurl
(without-g
)./node_modules/.bin/lnurl server --configFile ./config.json
Oddly enough, this works when I specify options from config file manually on the command line. š¤·
I am using NodeJS 14.x