From bd1db0c919b2b3ae2844caa97215655eb9d55d03 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 25 Sep 2023 12:06:25 +0200 Subject: [PATCH] add editorconfig config, fix issues (only whitespace changes) (#1958) --- .editorconfig | 14 +++++++++ Makefile | 3 ++ docs/CNAME | 2 +- docs/devs/websockets.md | 2 +- docs/guide/admin_ui.md | 4 +-- docs/guide/extension-install.md | 10 +++---- docs/guide/faq.md | 50 ++++++++++++++++---------------- docs/guide/fastapi_transition.md | 12 ++++---- docs/index.md | 2 +- 9 files changed, 58 insertions(+), 41 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..ae990f68 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# Top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file, utf-8 charset +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 + +[/lnbits/static/vendor/*] +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset diff --git a/Makefile b/Makefile index dca550d0..df5834d2 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,9 @@ checkprettier: checkblack: poetry run black --check . +checkeditorconfig: + editorconfig-checker + dev: poetry run lnbits --reload diff --git a/docs/CNAME b/docs/CNAME index e7e04e60..a3397b93 100644 --- a/docs/CNAME +++ b/docs/CNAME @@ -1 +1 @@ -docs.lnbits.org \ No newline at end of file +docs.lnbits.org diff --git a/docs/devs/websockets.md b/docs/devs/websockets.md index 9ea53a62..c64d044f 100644 --- a/docs/devs/websockets.md +++ b/docs/devs/websockets.md @@ -9,7 +9,7 @@ nav_order: 2 Websockets ================= -`websockets` are a great way to add a two way instant data channel between server and client. +`websockets` are a great way to add a two way instant data channel between server and client. LNbits has a useful in built websocket tool. With a websocket client connect to (obv change `somespecificid`) `wss://legend.lnbits.com/api/v1/ws/somespecificid` (you can use an online websocket tester). Now make a get to `https://legend.lnbits.com/api/v1/ws/somespecificid/somedata`. You can send data to that websocket by using `from lnbits.core.services import websocketUpdater` and the function `websocketUpdater("somespecificid", "somdata")`. diff --git a/docs/guide/admin_ui.md b/docs/guide/admin_ui.md index 3d3077f3..a5a40ded 100644 --- a/docs/guide/admin_ui.md +++ b/docs/guide/admin_ui.md @@ -52,8 +52,8 @@ $ sudo nano .env -> set: `LNBITS_ADMIN_UI=true` Now start LNbits once in the terminal window -``` -$ poetry run lnbits +``` +$ poetry run lnbits ``` You can now `cat` the Super User ID: ``` diff --git a/docs/guide/extension-install.md b/docs/guide/extension-install.md index ce421d3e..8117e993 100644 --- a/docs/guide/extension-install.md +++ b/docs/guide/extension-install.md @@ -15,7 +15,7 @@ An `Extension Manifest` is a link to a `JSON` file which contains information ab Multiple repositories can be configured. For more information check the [Manifest File](https://github.com/lnbits/lnbits/blob/main/docs/guide/extension-install.md#manifest-file) section. -**LNbits** administrators should configure their instances to use repositories that they trust (like the [lnbits-extensions](https://github.com/lnbits/lnbits-extensions/) one). +**LNbits** administrators should configure their instances to use repositories that they trust (like the [lnbits-extensions](https://github.com/lnbits/lnbits-extensions/) one). > **Warning** > Extensions can have bugs or malicious code, be careful what you install!! @@ -40,9 +40,9 @@ Click the `Manage` button in order to install a particular release of the extens Select the version to be installed (usually the last one) and click `Install`. One can also check the `Release Notes` first. > **Note**: -> +> > For Github repository: the order of the releases is the one in the GitHub releases page -> +> > For Explicit Release: the order of the releases is the one in the "extensions" object @@ -109,12 +109,12 @@ It goes under the `extensions` object and it is of the form: | htmlUrl | string | optional | Link to the extension home page. | | infoNotification | string | optional | Users that have this release installed will see a info message for their extension. For example if the extension support will be terminated soon. | | criticalNotification | string | optional | Reserved for urgent notifications. The admin user will receive a message each time it visits the `Install` page. One example is if the extension has a critical bug. | -| dependencies | list | optional | A list of extension IDs. It signals that those extensions must be installed BEFORE the this one can be installed. +| dependencies | list | optional | A list of extension IDs. It signals that those extensions must be installed BEFORE the this one can be installed. This mode has the advantage of strictly specifying what releases of an extension can be installed. - + ### GitHub Repository It goes under the `repos` object and it is of the form: diff --git a/docs/guide/faq.md b/docs/guide/faq.md index 155fdc20..3d72b5f7 100644 --- a/docs/guide/faq.md +++ b/docs/guide/faq.md @@ -19,24 +19,24 @@ allow-self-payment=1 ``` - +
Funding source only available via tor (e.g. Start9 or Umbrel)

If you want your setup to stay behind tor then only apps, pos and wallets that have tor activated can communicate with your wallets. Most likely you will have trouble when people try to redeem your voucher through onion or when importing your lnbits wallets into a wallet-app that doesnt support tor. If you plan to let LNbits wallets interact with plain internet shops and services you should consider setting up hybrid mode for your node.

- +
Funding source is in a cloud

This means that you might not have access to some files which would allow certain administrative functions. E.g. on Voltage lnd.conf can not be edited. Payments from your node to LNbits wallets can therefore not be configurated in this case atm so you will need to take an extra wallet to send from funding source->wallet x->LNbits wallet (only) for the initial funding of the wallet.

- +
LNbits via clearnet domain

Step by step guide how to convert your Tor only node into a clearnet node to make apps like LNbits accessible via https.

- +
Which funding sources can I use for LNbits?

There are several ways to run a LNbits instance funded from different sources. It is important to choose a source that has a good liquidity and good peers connected. If you use LNbits for public services your users´ payments can then flow happily in both directions. If you would like to fund your LNbits wallet via btc please see section Troubleshooting.

The LNbits manual shows you which sources can be used and how to configure each: CLN, LND, LNPay, Cliche, OpenNode as well as bots.

- +