From bc81dc5a287bcff91416338b4f2330702a2eedcb Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Thu, 5 Oct 2023 10:52:57 +0200 Subject: [PATCH] update main branch to 0.11.0 (#1994) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [FIX] correct amount in fiat tracking (#1934) * better debug log * fix: convert msat to sat for fiat amount * [CHORE] update to version 0.11.0 (#1933) * [FIX] codeql for dev branch (#1935) * [FEAT] create data folder if it doesnt exist (#1930) * [FEAT] improve update_admin_settings (#1903) * [FEAT] improve update_admin_settings while working on the push notification pr i found it very hard just to update 2 settings inside the db, so i improved upon update_admin_settings. now you just need to provide a dict with key/values you want to update inside db. also debugging the endpoints for update_settings i found despite the type of `EditableSettings` fastapi did in fact pass a dict. * t * use `EditableSettings` as param in update_settings * fix settings model validation we previously overrode the pydantic validation with our own method * make `LnbitsSettings` a `BaseModel` and only add `BaseSettings` later this allows us to instantiate `EditableSettings` without the environment values being loaded in * add test * forbid extra fields in update api * fixup * add test * test datadir * move UpdateSettings * fix compat * fixup webpush --------- Co-authored-by: jacksn * [TEST] use clean db in postgres tests (#1928) * [CORE] Document CoreLightningRestWallet (#1920) * document CoreLightningRestWallet * pushed to comment * fixed base64 comment --------- Co-authored-by: Ben * [TEST] use test data as mockdata (#1929) * add db group to cli * delete mock_data.zip * generate migration data through tests * [BUG] self payments for the same wallet (#1914) * [BUG] self payments for fakewallet make it possible to pay to yourself on fakewallet f * bugfix selfpayments for fakewallet * delete by wallet and fix previous_payment check (#1919) --------- Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com> * [REFACTOR] core/__init__ to not have circular import issues (#1876) * F541 fix remove unused workflow and combine linters into one add lnbits/static to ruff ignore remote setupnode ignore upgrades for mypy ignore F401 for __init__ files unused noqa ignore upgrades for black F821: undefine name disabled and logged webhook_listener for opennode and lnpay because they are obvisouly not working E402: module level import not at top of file fixup revert breaking changes wait for PR #1876 https://github.com/lnbits/lnbits/pull/1876 E721 fixes, only popped up for python3.9 not 3.10 [REFACTOR] core/__init__ to not have circular import issues WIP add db for backwards compat fix pyright make mypy happy again pyright did not catch those, i think mypy got confused with relative imports. maybe we should use absolute ones everywhere E402: module level import not at top of file dont forget to add core_app rebase on ruff pr f remo format * fix clnrest * ignore E402 in conftest * refactoring issues --------- Co-authored-by: jacksn * make wallets name prettier! (#1918) * make wallets name prettier! * Update lnbits/core/templates/admin/index.html Co-authored-by: dni ⚡ * Update lnbits/core/templates/admin/index.html Co-authored-by: dni ⚡ --------- Co-authored-by: Arc <33088785+arcbtc@users.noreply.github.com> Co-authored-by: dni ⚡ * Fix payments chart (#1851) * feat: payment history endpoint * test payment history * use new endpoint in frontend * refactor tests * [CHORE] bugfix formatting prettier (#1936) * do not show deleted wallets (#1942) * do not show deleted wallets * rename parameter for clarity * extension loader: do not panic! (#1945) * Revert "do not show deleted wallets (#1942)" (#1947) This reverts commit 1ee2d53069c6e3e8287b6bd3e22d67c42fdbf723. * remove LNURL-p description_hash validation (#1951) * [CHORE] update dependencies, unsafe pip packages, fastapi (#1609) * d * middleware needs to be initialised before startup runs on python3.11 update secp256k1 update psycopg * update fastapi to v0.103 * fix webpush * bump dependencies * ruff issue * lock versions * bump versions --------- Co-authored-by: jacksn * [FEAT] Focus cursor to textarea (#1959) * Focus cursor to textarea Fix need for additional click to textarea before pasting * [FEAT] autofocus textarea on paste request closes #1959 * format arba * bundle --------- Co-authored-by: dni ⚡ * add editorconfig config, fix issues (only whitespace changes) (#1958) * adding bolt11 lib and removing bolt11.py from the codebase (#1817) * add latest bolt11 lib decode exception handling for create_payment fix json response for decode bugfix hexing description hash improvement on bolt11 lib update to bolt11 2.0.1 fix clnrest * bolt 2.0.4 * refactor core/crud.py * catch bolt11 erxception clnrest * Updated guide for extension development for current extension management process (#1962) * Startup optimization: nonblocking expiry check (#1943) * nonblocking expiry check * autoruff * smaller interval --------- Co-authored-by: dni ⚡ * Support custom path for installed extensions (#1940) * feat: the more you fuck around the more you learn * feat: backwards compatible static file loading * refactor: update paths for extension files * refactor: var renaming * doc: update `LNBITS_EXTENSIONS_PATH` documentation * fix: default folder install * feat: install ext without external path * doc: `PYTHONPATH` no longer required * fix: add warnings * fix: missing path * refactor: re-order statements * fix: hardcoded path separator --------- Co-authored-by: dni ⚡ * [FEAT] Node Managment (#1895) * [FEAT] Node Managment feat: node dashboard channels and transactions fix: update channel variables better types refactor ui add onchain balances and backend_name mock values for fake wallet remove app tab start implementing peers and channel management peer and channel management implement channel closing add channel states, better errors seperate payments and invoices on transactions tab display total channel balance feat: optional public page feat: show node address fix: port conversion feat: details dialog on transactions fix: peer info without alias fix: rename channel balances small improvements to channels tab feat: pagination on transactions tab test caching transactions refactor: move WALLET into wallets module fix: backwards compatibility refactor: move get_node_class to nodes modules post merge bundle fundle feat: disconnect peer feat: initial lnd support only use filtered channels for total balance adjust closing logic add basic node tests add setting for disabling transactions tab revert unnecessary changes add tests for invoices and payments improve payment and invoice implementations the previously used invoice fixture has a session scope, but a new invoice is required tests and bug fixes for channels api use query instead of body in channel delete delete requests should generally not use a body take node id through path instead of body for delete endpoint add peer management tests more tests for errors improve error handling rename id and pubkey to peer_id for consistency remove dead code fix http status codes make cache keys safer cache node public info comments for node settings rename node prop in frontend adjust tests to new status codes cln: use amount_msat instead of value for onchain balance turn transactions tab off by default enable transactions in tests only allow super user to create or delete fix prop name in admin navbar --------- Co-authored-by: jacksn * [FEAT] cleanup GET /wallet endpoint, add wallet api routes (#1932) * [FEAT] cleanup GET /wallet endpoint, add wallet api route this removes the functionalitiy to create accounts and wallets via the GET /wallet endpoint in generic.py it add endpoints inside the api.py for it and the frontend is modified to use the api endpoints this also simplifies for the `feat/login` for the route. * remove stale generic tests and add api tests * bug wrong endpoint create account * vlad nitpick * added checkif deleted is 404 * reload after renaming wallet * another iteration with vlad * create new wallet if it none exist * fix delete refresh * formatting * Don't create user if allowed users is set (#1822) * dont allow creating of users when allowed users are set * add info to .env.example --------- Co-authored-by: dni ⚡ * fix typos (#1969) * fix: node ranks (#1968) * [BUG] bundle is broken (#1972) * [BUG] Fix bad transation call (#1973) * fix: `:label="$('xxx')` to :label="$t('xxx') * chore: commit bundles * chore: remove extra file * fix: catch sse exceptions (#1971) * Add Markdown capability globally (#1965) * add markdown capability globally * add markdown to site description * add showdown to package.json remove it from vendor.json, its bundled * formatting * io * Update lnbits/core/templates/core/index.html --------- Co-authored-by: dni ⚡ * feat: remove commit version (#1980) * nix: fix nixosModule and build (#1979) * lnbits/settings: get LNBITS_COMMIT from envvar if available There is no other way of setting the git commit at runtime, for build systems like Nix that allow you to hermetically define envvars derived from the source that will be available reproducibly at runtime * nix: update potree2nix and nixosModule This is a general refactor that gets everything building and passing the vmTest again * Update nix/modules/lnbits-service.nix --------- Co-authored-by: Pavol Rusnak * catch exceptions in migrations for extensions (#1987) * fix: admin_ui js error (#1982) * fix: admin_ui js error undefined formData.lnbits_allowed_currencies JS error in console * vlad suggestion * update: to 0.11.1 * revert: update --------- Co-authored-by: jackstar12 <62219658+jackstar12@users.noreply.github.com> Co-authored-by: dni ⚡ Co-authored-by: jacksn Co-authored-by: Ben Co-authored-by: Tiago Vasconcelos Co-authored-by: Arc <33088785+arcbtc@users.noreply.github.com> Co-authored-by: arbadacarba <63317640+arbadacarbaYK@users.noreply.github.com> Co-authored-by: Pavol Rusnak Co-authored-by: blackcoffeexbt <87530449+blackcoffeexbt@users.noreply.github.com> Co-authored-by: Vlad Stan Co-authored-by: Matthew Croughan --- .editorconfig | 14 + .env.example | 17 +- .github/workflows/codeql.yml | 4 +- Makefile | 12 +- README.md | 2 +- docs/CNAME | 2 +- docs/devs/extensions.md | 21 +- 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/guide/wallets.md | 10 +- docs/index.md | 2 +- flake.lock | 52 +- flake.nix | 18 +- lnbits/app.py | 67 +- lnbits/bolt11.py | 372 +- lnbits/commands.py | 31 +- lnbits/core/__init__.py | 29 +- lnbits/core/crud.py | 114 +- lnbits/core/db.py | 5 + lnbits/core/helpers.py | 2 +- lnbits/core/models.py | 15 +- lnbits/core/services.py | 16 +- lnbits/core/static/js/index.js | 15 +- lnbits/core/static/js/node.js | 178 + lnbits/core/static/js/service-worker.js | 2 +- lnbits/core/static/js/wallet.js | 119 +- lnbits/core/tasks.py | 21 +- lnbits/core/templates/admin/_tab_funding.html | 25 +- .../admin/_tab_security_notifications.html | 2 +- lnbits/core/templates/admin/_tab_server.html | 2 +- lnbits/core/templates/admin/_tab_theme.html | 2 +- lnbits/core/templates/admin/index.html | 15 + lnbits/core/templates/core/extensions.html | 2 +- lnbits/core/templates/core/index.html | 4 +- lnbits/core/templates/core/wallet.html | 19 +- lnbits/core/templates/node/_tab_channels.html | 312 + .../core/templates/node/_tab_dashboard.html | 70 + .../templates/node/_tab_transactions.html | 316 + lnbits/core/templates/node/index.html | 500 ++ lnbits/core/templates/node/public.html | 143 + lnbits/core/views/admin_api.py | 24 +- lnbits/core/views/api.py | 190 +- lnbits/core/views/generic.py | 229 +- lnbits/core/views/node_api.py | 188 + lnbits/core/views/public_api.py | 11 +- lnbits/db.py | 11 +- lnbits/extension_manager.py | 65 +- lnbits/helpers.py | 10 +- lnbits/lnurl.py | 7 +- lnbits/middleware.py | 2 +- lnbits/nodes/__init__.py | 15 + lnbits/nodes/base.py | 223 + lnbits/nodes/cln.py | 323 ++ lnbits/nodes/lndrest.py | 382 ++ lnbits/server.py | 6 +- lnbits/settings.py | 68 +- lnbits/static/bundle.min.js | 19 +- lnbits/static/i18n/br.js | 1 - lnbits/static/i18n/cn.js | 1 - lnbits/static/i18n/de.js | 1 - lnbits/static/i18n/en.js | 19 +- lnbits/static/i18n/es.js | 1 - lnbits/static/i18n/fr.js | 1 - lnbits/static/i18n/it.js | 1 - lnbits/static/i18n/jp.js | 1 - lnbits/static/i18n/nl.js | 1 - lnbits/static/i18n/pi.js | 1 - lnbits/static/i18n/pl.js | 1 - lnbits/static/i18n/pt.js | 1 - lnbits/static/i18n/we.js | 1 - lnbits/static/js/base.js | 52 +- lnbits/static/js/components.js | 11 +- lnbits/static/vendor.json | 1 + lnbits/static/vendor/showdown.js | 5157 +++++++++++++++++ lnbits/tasks.py | 57 +- lnbits/templates/base.html | 32 +- lnbits/wallets/__init__.py | 5 +- lnbits/wallets/base.py | 10 +- lnbits/wallets/corelightning.py | 19 +- lnbits/wallets/corelightningrest.py | 14 +- lnbits/wallets/fake.py | 80 +- lnbits/wallets/lndrest.py | 3 + nix/modules/lnbits-service.nix | 2 + nix/tests/nixos-module/default.nix | 1 + package-lock.json | 24 + package.json | 5 +- poetry.lock | 1692 +++--- pyproject.toml | 60 +- tests/conftest.py | 65 +- tests/core/views/test_admin_api.py | 40 + tests/core/views/test_api.py | 138 +- tests/core/views/test_generic.py | 52 +- tests/core/views/test_node_api.py | 171 + tests/data/mock_data.zip | Bin 6827 -> 0 bytes tests/helpers.py | 48 + 98 files changed, 10289 insertions(+), 1884 deletions(-) create mode 100644 .editorconfig create mode 100644 lnbits/core/db.py create mode 100644 lnbits/core/static/js/node.js create mode 100644 lnbits/core/templates/node/_tab_channels.html create mode 100644 lnbits/core/templates/node/_tab_dashboard.html create mode 100644 lnbits/core/templates/node/_tab_transactions.html create mode 100644 lnbits/core/templates/node/index.html create mode 100644 lnbits/core/templates/node/public.html create mode 100644 lnbits/core/views/node_api.py create mode 100644 lnbits/nodes/__init__.py create mode 100644 lnbits/nodes/base.py create mode 100644 lnbits/nodes/cln.py create mode 100644 lnbits/nodes/lndrest.py create mode 100644 lnbits/static/vendor/showdown.js create mode 100644 tests/core/views/test_admin_api.py create mode 100644 tests/core/views/test_node_api.py delete mode 100644 tests/data/mock_data.zip diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..ae990f68f --- /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/.env.example b/.env.example index 6771412d3..8412d7d24 100644 --- a/.env.example +++ b/.env.example @@ -15,6 +15,7 @@ LNBITS_ALLOWED_IPS="" LNBITS_BLOCKED_IPS="" # Allow users and admins by user IDs (comma separated list) +# if set new users will not be able to create accounts LNBITS_ALLOWED_USERS="" LNBITS_ADMIN_USERS="" # Extensions only admin can access @@ -40,6 +41,11 @@ LNBITS_HIDE_API=false # GitHub has rate-limits for its APIs. The limit can be increased specifying a GITHUB_TOKEN # LNBITS_EXT_GITHUB_TOKEN=github_pat_xxxxxxxxxxxxxxxxxx +# Path where extensions will be installed (defaults to `./lnbits/`). +# Inside this directory the `extensions` and `upgrades` sub-directories will be created. +# LNBITS_EXTENSIONS_PATH="/path/to/some/dir" + + # Extensions to be installed by default. If an extension from this list is uninstalled then it will be re-installed on the next restart. # The extension must be removed from this list in order to not be re-installed. LNBITS_EXTENSIONS_DEFAULT_INSTALL="tpos" @@ -91,6 +97,12 @@ SPARK_TOKEN=myaccesstoken # CoreLightningWallet CORELIGHTNING_RPC="/home/bob/.lightning/bitcoin/lightning-rpc" +# CoreLightningRestWallet +CORELIGHTNING_REST_URL=http://127.0.0.1:8185/ +# Path or BASE64/HEX STRING +CORELIGHTNING_REST_MACAROON="/path/to/clnrest/access.macaroon" +CORELIGHTNING_REST_CERT="/path/to/clnrest/tls.cert" + # LnbitsWallet LNBITS_ENDPOINT=https://legend.lnbits.com LNBITS_KEY=LNBITS_ADMIN_KEY @@ -133,8 +145,3 @@ ECLAIR_PASS=eclairpw # Enter /api in LightningTipBot to get your key LNTIPS_API_KEY=LNTIPS_ADMIN_KEY LNTIPS_API_ENDPOINT=https://ln.tips - -# Cashu Mint -# Use a long-enough random (!) private key. -# Once set, you cannot change this key as for now. -CASHU_PRIVATE_KEY="SuperSecretPrivateKey" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3d2fb213e..5cdd4139b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,9 +2,9 @@ name: codeql on: push: - branches: [main, ] + branches: [main, dev] pull_request: - branches: [main] + branches: [main, dev] schedule: - cron: '0 12 * * 5' diff --git a/Makefile b/Makefile index b1e2b4f68..df5834d24 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,9 @@ checkprettier: checkblack: poetry run black --check . +checkeditorconfig: + editorconfig-checker + dev: poetry run lnbits --reload @@ -48,18 +51,17 @@ test-real-wallet: poetry run pytest test-migration: - rm -rf ./migration-data - mkdir -p ./migration-data - unzip tests/data/mock_data.zip -d ./migration-data + LNBITS_ADMIN_UI=True \ + make test HOST=0.0.0.0 \ PORT=5002 \ - LNBITS_DATA_FOLDER="./migration-data" \ + LNBITS_DATA_FOLDER="./tests/data" \ timeout 5s poetry run lnbits --host 0.0.0.0 --port 5002 || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi HOST=0.0.0.0 \ PORT=5002 \ LNBITS_DATABASE_URL="postgres://lnbits:lnbits@localhost:5432/migration" \ timeout 5s poetry run lnbits --host 0.0.0.0 --port 5002 || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi - LNBITS_DATA_FOLDER="./migration-data" \ + LNBITS_DATA_FOLDER="./tests/data" \ LNBITS_DATABASE_URL="postgres://lnbits:lnbits@localhost:5432/migration" \ poetry run python tools/conv.py diff --git a/README.md b/README.md index a53a83dc7..db0d7122c 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ LNURL has a fallback scheme, so if scanned by a regular QR code reader it can de ![lnurl fallback](https://i.imgur.com/CPBKHIv.png) Using **lnbits.com/?lightning="LNURL-withdraw"** will trigger a withdraw that builds an LNbits wallet. -Example use would be an ATM, which utilises LNURL, if the user scans the QR with a regular QR code scanner app, they will still be able to access the funds. +Example use would be an ATM, which utilizes LNURL, if the user scans the QR with a regular QR code scanner app, they will still be able to access the funds. ![lnurl ATM](https://i.imgur.com/Gi6bn3L.jpg) diff --git a/docs/CNAME b/docs/CNAME index e7e04e603..a3397b934 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/extensions.md b/docs/devs/extensions.md index 83ad1cb46..a70f085ff 100644 --- a/docs/devs/extensions.md +++ b/docs/devs/extensions.md @@ -6,13 +6,13 @@ nav_order: 2 --- -Making extensions +Extension set up ================= -Start off by cloning the [example extension](https://github.com/lnbits/example) into your `lnbits/extensions` folder and renaming it to `mysuperplugin`: +Start off by creating a fork of the [example extension](https://github.com/lnbits/example) into own GitHub repository and rename the repository to `mysuperplugin`: ```sh -cd lnbits/extensions -git clone https://github.com/lnbits/example.git --depth=1 mysuperplugin # Let's not use dashes or anything; it doesn't like those. +cd [my-working-folder] +git clone https://github.com/[my-user-name]/mysuperplugin.git --depth=1 # Let's not use dashes or anything; it doesn't like those. cd mysuperplugin rm -rf .git/ find . -type f -print0 | xargs -0 sed -i 's/example/mysuperplugin/g' # Change all occurrences of 'example' to your plugin name 'mysuperplugin'. @@ -20,7 +20,18 @@ mv templates/example templates/mysuperplugin # Rename templates folder. ``` - if you are on macOS and having difficulty with 'sed', consider `brew install gnu-sed` and use 'gsed', without -0 option after xargs. -Going over the example extension's structure: +1. Edit `manifest.json` and change the organisation name to your GitHub username. +1. Push your changes to GitHub. +1. In GitHub create a new release for your extension repo. Tag the release with `0.0.1` +1. Copy the URL of the extension's raw `manifest.json` URL `https://raw.githubusercontent.com/[my-user-name]/mysuperplugin/master/manifest.json` +1. If you are using the LMNbits Admin UI, go to the Admin UI > Server > Extension Sources, click "Add", paste the URL, then click "Save" +1. If you are configuring LNbits via environment variables, add the URL to the .env file's `LNBITS_EXTENSIONS_MANIFESTS` variable. Restart the LNbits python process +1. You will now see your extension in the LNbits > Extensions list. Click "Enable" to enable it. +1. ... +1. Profit!!! + +Extension structure explained +----------------------------- * views_api.py: This is where your public API would go. It will be exposed at "$DOMAIN/$PLUGIN/$ROUTE". For example: https://lnbits.com/mysuperplugin/api/v1/tools. * views.py: The `/` path will show up as your plugin's home page in lnbits' UI. Other pages you can define yourself. The `templates` folder should explain itself in relation to this. * migrations.py: Create database tables for your plugin. They'll be created automatically when you start lnbits. diff --git a/docs/devs/websockets.md b/docs/devs/websockets.md index 9ea53a624..c64d044fd 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 3d3077f36..a5a40dedb 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 ce421d3e2..8117e993b 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 155fdc208..3d72b5f78 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.

- + /g,"$1").replace(//g,"$1")),Sa(c,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));l+=t.length-h.length,t=h,M(c,l-u,l)}else{var f=t.indexOf("<");if(0===f){if(va.test(t)){var p=t.indexOf("--\x3e");if(p>=0){e.shouldKeepComment&&e.comment(t.substring(4,p),l,l+p+3),k(p+3);continue}}if(ga.test(t)){var m=t.indexOf("]>");if(m>=0){k(m+2);continue}}var v=t.match(ma);if(v){k(v[0].length);continue}var g=t.match(pa);if(g){var _=l;k(g[0].length),M(g[1],_,l);continue}var y=S();if(y){C(y),Sa(y.tagName,t)&&k(1);continue}}var b=void 0,w=void 0,x=void 0;if(f>=0){for(w=t.slice(f);!(pa.test(w)||ha.test(w)||va.test(w)||ga.test(w)||(x=w.indexOf("<",1))<0);)f+=x,w=t.slice(f);b=t.substring(0,f)}f<0&&(b=t),b&&k(b.length),e.chars&&b&&e.chars(b,l-b.length,l)}if(t===n){e.chars&&e.chars(t),!r.length&&e.warn&&e.warn('Mal-formatted tag at end of template: "'+t+'"',{start:l+t.length});break}}function k(e){l+=e,t=t.substring(e)}function S(){var e=t.match(ha);if(e){var n,i,r={tagName:e[1],attrs:[],start:l};for(k(e[0].length);!(n=t.match(fa))&&(i=t.match(ua)||t.match(la));)i.start=l,k(i[0].length),i.end=l,r.attrs.push(i);if(n)return r.unarySlash=n[1],k(n[0].length),r.end=l,r}}function C(t){var n=t.tagName,l=t.unarySlash;o&&("p"===i&&sa(n)&&M(i),s(n)&&i===n&&M(n));for(var u=a(n)||!!l,c=t.attrs.length,d=new Array(c),h=0;h=0&&r[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=r.length-1;u>=a;u--)(u>a||!t&&e.warn)&&e.warn("tag <"+r[u].tag+"> has no matching end tag.",{start:r[u].start,end:r[u].end}),e.end&&e.end(r[u].tag,n,o);r.length=a,i=a&&r[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,o):"p"===s&&(e.start&&e.start(t,[],!1,n,o),e.end&&e.end(t,n,o))}M()}(t,{warn:Ma,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,n,a,s,c){var d=r&&r.ns||Da(t);K&&"svg"===d&&(n=function(t){for(var e=[],n=0;n, / or =.",{start:t.start+t.name.indexOf("["),end:t.start+t.name.length})})),"style"!==(f=m).tag&&("script"!==f.tag||f.attrsMap.type&&"text/javascript"!==f.attrsMap.type)||rt()||(m.forbidden=!0,Ma("Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <"+t+">, as they will not be parsed.",{start:m.start}));for(var v=0;v cannot be keyed. Place the key on real elements instead.",vr(t,"key")),t.for){var n=t.iterator2||t.iterator1,i=t.parent;n&&n===e&&i&&"transition-group"===i.tag&&Ma("Do not use v-for index as key on children, this is the same as not using keys.",vr(t,"key"),!0)}t.key=e}}(t),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=gr(t,"ref");e&&(t.ref=e,t.refInFor=function(t){var e=t;for(;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?((e=_r(t,"scope"))&&Ma('the "scope" attribute for scoped slots have been deprecated and replaced by "slot-scope" since 2.5. The new "slot-scope" attribute can also be used on plain elements in addition to