Commit graph

178 commits

Author SHA1 Message Date
Christoph Stenglein
5354b7b71d
fix warmup data 2022-10-25 19:37:59 +02:00
Christoph Stenglein
0f907b91a8
re-enable get_app_status 2022-10-25 06:38:23 +02:00
fusion44
beba4332e7
fix: null access crash when no token was supplied
fixes #158
2022-10-18 19:54:14 +02:00
ChuckNorrison
2d05f20fab has no attribute 'decode' fix for redis db
This will only try to decode if it is needed
2022-10-18 18:06:53 +02:00
fusion44
4393132d1c
fix: properly check token on sse requests 2022-10-17 22:11:17 +02:00
Christoph Stenglein
32c7c4a23c
feat: allow cookie & JWT auth for sse/subscribe (#152)
* return cookie on login and check cookie in sse/subscribe

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* allow cookie & JWT auth for sse/subscribe

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* return token object on login to preserve compatibility

* remove unused import

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-16 21:58:23 +02:00
ChuckNorrison
169da2598e
feat: stop log spam for missing tor_web_addr (#154)
* Stop log spam for missing tor_web_addr

In case tor is not used, we can not find a tor_web_addr key in redis db. This will prevent from spamming the journal.

* log Redis DB missing Keys as Info

* log level Redis DB 

only tor as info
2022-10-16 09:40:24 +02:00
fusion44
2941d6132b
fix: raise error when cert file path doesn't exist 2022-10-03 10:51:17 +02:00
fusion44
a4e9f7bf23
fix: add-invoice crash and update docs
A required field was not set and for some reason prior Pydantic versions
didn't notice at all.

closes #150
2022-09-11 19:33:46 +02:00
fusion44
4408a6a58c
fix: disable fetching app status during warmup
On native Linux this was causing the API to ask for root password

refs #143
2022-09-10 15:54:22 +02:00
fusion44
6098c70eee
refactor: send_sse_message to broadcast_sse_msg 2022-09-10 15:52:11 +02:00
fusion44
69d8032900
refactor: sse code into dedicated SSEManager class 2022-09-10 15:48:03 +02:00
fusion44
49bdbab66d
refactor: use a Queue instead of Redis for SSE
refs #60
2022-09-10 13:53:09 +02:00
fusion44
c86a687348
chore: update dependencies 2022-09-10 13:42:50 +02:00
fusion44
3865d89fd5
feat: configure node acces via file paths
closes #146
2022-09-10 07:43:16 +02:00
fusion44
fcb23c2fc0 fix: token expiry time check
fixes #105
2022-08-21 20:08:55 +02:00
fusion44
268bcf5072 feat: add support for bitcoin regtest 2022-08-18 20:13:50 +02:00
fusion44
ecfaadd0c1 fix: check for shell scripts only on RaspiBlitz 2022-08-18 20:11:36 +02:00
fusion44
c6d17a8f8a
feat: improve CLN list channel implementation
refs #140
2022-08-03 20:43:25 +02:00
fusion44
63c4a19f67
refactor: rename list-channel to list-channels
plus some code and docs cosmetics
2022-08-01 21:53:11 +02:00
fusion44
ef34b42119
feat: log negative confirmation results from LND
refs #137
2022-08-01 19:21:29 +02:00
fusion44
565727ac49
fix: properly check for stderr from process 2022-07-31 18:58:58 +02:00
fusion44
41c689a15f
fix: catch another clightning-cli error message
This error appears when the .lightning folder is not accessible
to the lightning-cli
2022-07-31 18:03:41 +02:00
fusion44
6fada4ce42
feat: add some tx conf safeguards to GenericTx
refs #137
2022-07-31 18:01:02 +02:00
fusion44
f282e3af8d
fix: add missing imports 2022-07-25 18:07:35 +02:00
fusion44
f940551409
feat: add JWT token auth to SSE endpoint 2022-07-24 21:26:29 +02:00
fusion44
d5d827ec5d
feat[CLN]: add error checks in LN models 2022-07-23 16:36:55 +02:00
fusion44
1479c00935
feat[CLN]: add error checks on local calls 2022-07-23 16:10:48 +02:00
fusion44
45436bcc8e
fix[CLN]: return onchain funds in sat not msat 2022-07-23 14:48:34 +02:00
fusion44
ce8be908ac
fix: /reboot should reboot and not shutdown 2022-07-23 13:59:38 +02:00
fusion44
92ed1832f8
Implement unlock CLN wallet for RaspiBlitz only (#135)
* feat: implement SSH CLN wallet unlock on the Blitz
* feat: implement API CLN wallet unlock on the Blitz
* feat: return error when wallet is already unlocked
* docs: update unlock-wallet docs
* fix: add more safety checks
    * return 423 error on API calls if wallet locked
    * check if unlock script exits with 1
* fix: call_script deprecation warning crash

closes #133
2022-07-13 07:08:00 +02:00
fusion44
bed65dd97b
fix(CLN): fix multiple issues with send-payment
* CLN PaymentStatus decoding was incorrect
* don't set Amount when user passes None as the amount
* catch gRPC errors and return appropriate status codes
* clarify in docs that implementation behavior is different when
   attempting to pay an already paid invoice

refs #129, refs #131
2022-07-04 21:06:11 +02:00
fusion44
d997b17529
fix: decoding of bolt11 invoices with route hints
refs #129
2022-07-04 18:45:45 +02:00
fusion44
100bb80b17
fix: don't assume that there is a bolt11 string
On keysend payments there usually is no bolt11 string.

refs #125
2022-07-01 21:12:54 +02:00
fusion44
97c51da630
fix: check for none when parsing CLN Payment
refs #129
2022-07-01 20:47:58 +02:00
fusion44
0f06017b1c
feat: add optional currency field to PaymentRequest 2022-07-01 20:12:36 +02:00
fusion44
911e1a7976
fix: handle all LND init events correctly
fixes #130 (LND Unlock Error)
2022-07-01 19:38:57 +02:00
openoms
9203e0c031
feat: call_script with sudo where needed (#127)
* call_script with sudo

* add call_sudo_script and use where needed

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-26 13:13:50 +02:00
fusion44
868070214a
feat: improve error handling and logging 2022-06-26 11:06:56 +02:00
fusion44
d573217bd7
fix(LND_GRPC): two potential async bugs
* gRPC channel not created in all cases
* possible infinite loop while waiting for lnd to boot up

refs #126
2022-06-26 10:59:56 +02:00
fusion44
778139d74c
fix: pre-commit hook error and formatting issues 2022-06-17 21:35:35 +02:00
fusion44
b318a494fc
feat: improve wallet readiness status detection 2022-06-17 21:14:33 +02:00
/rootzoll
453937b0f6
fix core lightning db path (#116) 2022-06-17 00:09:27 +02:00
/rootzoll
cc05605853
filter apps for core lightning & bitcoin-only 2022-06-16 21:17:33 +02:00
/rootzoll
67a9242301
fix bitcoin-only Warumup info (#114) 2022-06-16 15:30:14 +02:00
/rootzoll
cb71b26431
fix setup block (#113) 2022-06-14 14:44:55 +02:00
fusion44
2f5ce09b56
refactor: remove CLN socket impl; code cleanup
This implementation isn't used and was very inefficient due to
py-lightning not supporting asyncio.

Some minor fixes and code formatting
2022-06-12 08:06:55 +02:00
fusion44
c08e604d55
feat: send warmup data as available
When neither BTC nor LN is running:
send hardware_info

When BTC is running and LN is not:
send hardware_info and btc_info

When both are running:
send the full package

This code doesn't keep track of which connection has received
which data already, so it may send data twice data to the client
when the startup state changes. Especially the hardware info
is rather data intensive. This is OK for now, to keep the code simple.

closes #110
2022-06-12 07:59:40 +02:00
/rootzoll
15750e8149
#94 pubkey info on lightning lite info (#108) 2022-06-10 20:52:25 +02:00
fusion44
50fae41158
Merge branch 'main' of github.com:fusion44/blitz_api into startup_refactor 2022-06-10 19:52:18 +02:00