-
Notifications
You must be signed in to change notification settings - Fork 5
Rename & move the script to the right directory
Once the web server is configured to rewrite url requests .well-known/lnurlp/anything
to .well-known/lnurlp/anything.php
, the index.php
(inside public/
) script needs to be renamed with the wanted username part of the lightning address, such as for a wanted ln address ben@anything.dne
, the script must be named ben.php
.
Then, the script needs to be in the subdirectory .well-known/lnurlp/
of your web root directory of your web server such as https://www.yourwebsite.dne/.well-known/lnurlp/ points to your $WEBROOT/.well-known/lnurlp/
directory.
The following need to be changed according to your apiEndpoint
and apiKey
that your LNbits wallet provides, be sure to use the invoice/read key.
# lightning-config.php
return (new LightningConfig())
->setDomain('localhost')
->setReceiver('default-receiver')
->setSendableRange(min: 100_000, max: 10_000_000_000)
->setCallbackUrl('localhost:8000/callback')
->setBackends([
'user-1' => (new LnBitsBackendConfig())
->setApiEndpoint('http://localhost:5000')
->setApiKey('api_key-1'),
'user-2' => (new LnBitsBackendConfig())
->setApiEndpoint('http://localhost:5000')
->setApiKey('api_key-2')
]);
Please note that the
min
andmax
do not reflect the actual min/max sendable amount, it depends on the capacity of your LN backend