* fix: add support for trampoline payments in Breez integration
- Introduced `BREEZ_USE_TRAMPOLINE` configuration in `.env.example`.
- Updated `BreezSdkFundingSource` to include `breez_use_trampoline` setting.
- Modified payment request in `breez.py` to utilize the trampoline setting when sending payments.
* Update .env.example
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* Update lnbits/settings.py
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* refactor: streamline payment request formatting in Breez integration
---------
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* Update lndrest.py
- added the ability to receive self payments on the node
[issue] You have to enable circular payment on lnd.conf. Note that lnd.conf doesn't allow allow_self_payment parameter, that is why is necessary to define that on transaction.
* feat: add LND rest `"allow_self_payment"` option
---------
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
* feat: add shortcuts for insert_query and update_query into `Database`
example: await db.insert("table_name", base_model)
* remove where from argument
* chore: code clean-up
* extension manager
* lnbits-qrcode components
* parse date from dict
* refactor: make `settings` a fixture
* chore: remove verbose key names
* fix: time column
* fix: cast balance to `int`
* extension toggle vue3
* vue3 @input migration
* fix: payment extra and payment hash
* fix dynamic fields and ext db migration
* remove shadow on cards in dark theme
* screwed up and made more css pushes to this branch
* attempt to make chip component in settings dynamic fields
* dynamic chips
* qrscanner
* clean init admin settings
* make get_user better
* add dbversion model
* remove update_payment_status/extra/details
* traces for value and assertion errors
* refactor services
* add PaymentFiatAmount
* return Payment on api endpoints
* rename to get_user_from_account
* refactor: just refactor (#2740)
* rc5
* Fix db cache (#2741)
* [refactor] split services.py (#2742)
* refactor: spit `core.py` (#2743)
* refactor: make QR more customizable
* fix: print.html
* fix: qrcode options
* fix: white shadow on dark theme
* fix: datetime wasnt parsed in dict_to_model
* add timezone for conversion
* only parse timestamp for sqlite, postgres does it
* log internal payment success
* fix: export wallet to phone QR
* Adding a customisable border theme, like gradient (#2746)
* fixed mobile scan btn
* fix test websocket
* fix get_payments tests
* dict_to_model skip none values
* preimage none instead of defaulting to 0000...
* fixup test real invoice tests
* fixed pheonixd for wss
* fix nodemanager test settings
* fix lnbits funding
* only insert extension when they dont exist
---------
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Tiago Vasconcelos <talvasconcelos@gmail.com>
Co-authored-by: Arc <ben@arc.wales>
Co-authored-by: Arc <33088785+arcbtc@users.noreply.github.com>
* feat: add boltz client standalone fundingsource
WIP.
https://docs.boltz.exchange/v/boltz-client
this fundingsource utilizing the boltz client standalone function: https://github.com/BoltzExchange/boltz-client/pull/123
this makes him act like a lightning node while submarine swapping everything on liquid network. like aqua does in its wallet.
* feat: paid_invoices_stream
* feat: proper invoice and payment status check
* feat: authenticate over insecure channel aswell
* chore: lint
* docs: add more setup instructions
* chore: add `boltz_client_cert` in frontend
* feat: populate fee_msat in get_payment_status and get_invoice_status
* fixup!
* chore: bundle
* added boltz logo
* add BoltzWallet to __all__
* chore: bump grpcio and protobuf deps and add grpcio-tools as dev dependency
* chore: update protos
* feat: pass description when creating swap
* fixup!
* chore: bundle
---------
Co-authored-by: jackstar12 <jkranawetter05@gmail.com>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* feat: nwc funding source
* implement paid_invoices_stream, fix for unsettled invoices where settled_at is present but None
* cancel pending_payments_lookup_task on cleanup
* Rename subscription_timeout_task to timeout_task
* ensure preimage is not None
* Improve readability, return failed status on expiration in get_payment_status, ensure result_type is checked after error (some implementations might not set a result_type on error)
* fetch account info when possible
* workaround possible race condition on some nwc service providers, improve performance of fallback by using payment_hash from bolt11 invoice
* fundle
* make format
* fix formatting
* fix C901 `_on_message` is too complex (21 > 16)
* format
* fix lint
* format
* fix tests/wallets/test_nwc_wallets.py:80:11: C901 `run` is too complex (17 > 16)
* fix padding
* fix documentation for _verify_event method
* refactoring and fixes
* Split NWCWallet - NWCConnection
* refactor class methods into helpers
* update bundle
* format
* catch NWCError failure codes
* format and fix
* chore: bundle
* add example
* typos
---------
Co-authored-by: Riccardo Balbo <riccardo0blb@gmail.com>
Co-authored-by: benarc <ben@arc.wales>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* add Breez SDK wallet
* use more description status classes
* fix: add try-except
---------
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
Co-authored-by: dni ⚡ <office@dnilabs.com>
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
* Improved customisable homepage and added badge
* Added filled to styling of drop down
* format
* Wrong model
* lint hack
* Update .env.example
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
* reverted
* Spelling
* More explicit
* format
* Added if for badge
* spellling
* Fix for None
---------
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
* feat: corelightning `maxfee` and custom pay command
we should use maxfee instead of calculating the ratio and pass it
through.
also make it possible to run a custom pay command
* change for cln rest aswell
basically use `list` and `type` instead of `List` and `Type`
this is save to use for python3.9 and has been deprecated. also has some
performance drawbacks.
read more here: https://docs.astral.sh/ruff/rules/non-pep585-annotation/
* chore: adhere to ruff's "N" rules
WARN: reinstall failing extensions!
bunch of more consistent variable naming. inspired by this issue.
https://github.com/lnbits/lnbits/issues/2308
* fixup! chore: adhere to ruff's "N" rules
* rename to funding_source
* skip jmeter
---------
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* feat: add `funding_source_max_retries` env setting
* feat: default to zero retries
* feat: exponential retry time increase
* chore: Let's use the same value as the default
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* feat: using 0.25 leads to less awkward numbers
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
---------
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
- add to admin ui
- move to `ExtensionsSettings`
- hide left navbar when disabled
- do not register extension routes on startup
- do not check for installed extensions on startup
- reafctor into register_all_ext_routes
update api methods
add zbd as funding source to settings and js
fix statuses
cast str into int for status method
fix outbound payment hash issue
restore create_invoice
remove print stmts
* feat: add helper methods
* fix: do not try to stop background work on first install
* fix: first stop via function call then try REST API
* fix: `make check`
* fix: prepare for `{ext_id}_stop`
* feat: `cleanup-wallet` cli command
`lnbits-cli db cleanup-wallets` removes all wallets that never had an transaction.
this helps against spammers creating random wallets, eventually slowing down the db.
* add commands
* add to example env
* db_versions was used in app
* add delta as cli argument
* use days unit
* simplify cli argument name (cleanup_wallet_days -> days)!
---------
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* Login form loading
* add first install middleware and settings
* updates
* Login form loading
* add first install middleware and settings
* updates
* only set first install when superuser is created
* refactor first install
* only show if first install
* cleanup
* set password
* update calls
* login superuser on first install
* fix
* fixup!
* fixup!
* fixup!
* fixup!
* fixup!
* last fixup!
* fix mypy and prettier CI errors
* disable first install
* add random super user
* set first install after startup
* remove user id from form
* Update lnbits/core/views/auth_api.py
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
* Update lnbits/core/views/auth_api.py
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
* Update lnbits/middleware.py
Co-authored-by: dni ⚡ <office@dnilabs.com>
* addressing Vlad's comments
* remove super user
* move to transient settings
* fix: show `first_install` page even after a server restart
* fix: do not add `user_id` in the auth token
* fix: `make check` errors
* fix: `username` is not optional for `UpdateSuperuserPassword`
* feat: nicer error message
---------
Co-authored-by: dni ⚡ <office@dnilabs.com>
Co-authored-by: Tiago Vasconcelos <talvasconcelos@gmail.com>
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
* feat: allow all extension deactivation
* doc: updated comment
* fix: make sure `register_routes` executes after installed extensions are checked
* chore: code format
* fix: do not run migration on deactivated extensions
* fix: make sure the deactivated extension list is loaded in time
* feat: register extension routes if extension never loaded before
* fix: move `load_disabled_extension_list`
* doc: disable by default
* feat: show auth configs on the admin UI
* fix: do not access settings on load
* fix: redirect for click on item (not only on text)
* fix: remove `Display Name`
* fix: do not show `Verify email with` if no auth option is available
* feat: show warning before logout
* feat: i18n of account page
* fix: show account icon for user ID login
* fix: always check `isUserAuthorized`
* fix: update the `disclaimer_dialog` message
* feat: hide user ID by default
* fix: redirect from login page when user authorized
* feat: update logout message
* fix: do not translate company names