* feat: add generic lnurl error response handler
this is used multiple times in extensions to safeguard `views_lnurl.py`
endpoint to not return a wrong lnurl error response.
you use it by just setting following on your lnurl router/view
```
withdraw_ext_lnurl = APIRouter(prefix="/api/v1/lnurl")
withdraw_ext_lnurl.route_class = LNURLErrorResponseHandler
```
* 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>
* fix: db helpers to be used with timestamps
those helpers are used in boltz extension and they did not take dates
into consideration yet
* vlad picks
* refactor get_placeholder
---------
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>
closes#2599
special thanks to bitkarrot for figuring that out, it was actually
initialized twice, the decorator alone is enough!
also was issue for first_install middleware
* refactor: add status column to apipayments
keep track of the payment status with an enum and persist it as string
to db. `pending`, `success`, `failed`.
- database migration
- remove deleting of payments, failed payments stay
* Fix for phoenixd and lnurlp nostr usage
- Support description, restricted to 128 characters
- Support descriptionHash
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
Co-authored-by: Vic <vic@example.com>
* feat: add payment tab
* feat: add buttons
* feat: persist `pay to enable` changes
* fix: do not disable extension on upgrade
* fix: show releases tab first
* feat: extract `enableExtension` logic
* refactor: rename routes
* feat: show dialog for paying extension
* feat: create invoice to enable
* refactor: extract enable/disable extension logic
* feat: add extra info to UserExtensions
* feat: check payment for extension enable
* fix: parsing
* feat: admins must not pay
* fix: code checks
* fix: test
* refactor: extract extension activate/deactivate to the `api` side
* feat: add `get_user_extensions `
* feat: return explicit `requiresPayment`
* feat: add `isPaymentRequired` to extension list
* fix: `paid_to_enable` status
* fix: ui layout
* feat: show QR Code
* feat: wait for invoice to be paid
* test: removed deprecated test and dead code
* feat: add re-check button
* refactor: rename paths for endpoints
* feat: i18n
* feat: add `{"success": True}`
* test: fix listener
* fix: rebase errors
* chore: update bundle
* fix: return error status code for the HTML error pages
* fix: active extension loading from file system
* chore: temp commit
* fix: premature optimisation
* chore: make check
* refactor: remove extracted logic
* chore: code format
* fix: enable by default after install
* fix: use `discard` instead of `remove` for `set`
* chore: code format
* fix: better error code
* fix: check for stop function before invoking
* feat: check if the wallet belongs to the admin user
* refactor: return 402 Requires Payment
* chore: more typing
* chore: temp checkout different branch for tests
* fix: too much typing
* fix: remove try-except
* fix: typo
* fix: manual format
* fix: merge issue
* remove this line
---------
Co-authored-by: dni ⚡ <office@dnilabs.com>