Commit graph

196 commits

Author SHA1 Message Date
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
rootzoll
62965584fd correct file ownership after make sync 2022-06-30 12:48:58 +02:00
rootzoll
91becc8873 fix changed path/user of blitzapi on raspiblitz 2022-06-30 12:44:13 +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
1cfab33a5c
Merge pull request #119 from openoms/fix-dependencies
fix: install for python 3.9 and add hash
2022-06-19 10:30:04 +02:00
openoms
b54ee77745
fix: install for python 3.9 and add hash 2022-06-18 22:45:56 +01:00
pre-commit-ci[bot]
47d3d1023c
[pre-commit.ci] pre-commit autoupdate (#112)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v3.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v3.2.0...v4.3.0)
- [github.com/psf/black: 21.9b0 → 22.3.0](https://github.com/psf/black/compare/21.9b0...22.3.0)
- [github.com/pycqa/isort: 5.6.4 → 5.10.1](https://github.com/pycqa/isort/compare/5.6.4...5.10.1)

* [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-17 21:39:48 +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
a373957914
Merge pull request #109 from fusion44/startup_refactor
Startup process refactoring

fixes #97
2022-06-10 20:04:27 +02:00
fusion44
50fae41158
Merge branch 'main' of github.com:fusion44/blitz_api into startup_refactor 2022-06-10 19:52:18 +02:00
fusion44
eb87b0501b
refactor: send warmup data to SSE clients
refs #97
2022-06-10 19:45:55 +02:00
fusion44
4f33bdfc79
fix: send a disabled msg when ln_node is "none"
refs #97
2022-06-08 20:39:12 +02:00
fusion44
95ed6e812e
refactor: improve startup procedure for CLN too
refs #97
2022-06-08 19:25:45 +02:00
fusion44
41cc8208e7
refactor: move bitcoin config the bitcoin repo 2022-06-06 20:21:19 +02:00
fusion44
493d8039fa
refactor: improve startup procedure
During startup the API will try to connect to Bitcoin Core and the
Lightning Node. If it can't connect it will check every "n" seconds
(currently 2s) and connect when available. A new SSE event
called "system_startup_info" is introduced. This event contains
all startup status information during the startup procedure.

The old wallet_locked event is obsolete.

Sample:
--------------------------
event: system_startup_info
data: {"bitcoin": "offline", "bitcoin_msg": "", "lightning": "offline", "lightning_msg": "Unable to connect to LND daemon, waiting..."}
--------------------------
event: system_startup_info
data: {"bitcoin": "done", "bitcoin_msg": "", "lightning": "offline", "lightning_msg": "Unable to connect to LND daemon, waiting..."}
--------------------------
event: system_startup_info
data: {"bitcoin": "done", "bitcoin_msg": "", "lightning": "locked", "lightning_msg": "Wallet locked, unlock it to enable full RPC access"}
--------------------------
event: system_startup_info
data: {"bitcoin": "done", "bitcoin_msg": "", "lightning": "done", "lightning_msg": ""}
--------------------------
event: system_startup_info
data: {"bitcoin": "done", "bitcoin_msg": "", "lightning": "bootstraping", "lightning_msg": "RPC not yet available"}
--------------------------

refs #97
2022-06-06 19:29:21 +02:00
/rootzoll
2962b522b7
Fix Update Setup (#107)
* #104 fix default value
* handle update state on setup
2022-06-06 15:36:30 +02:00
rootzoll
ec39b9aeb1 #102 change error string detail 2022-06-06 09:54:28 +02:00
Christoph Stenglein
80282c318f
add correct expiry time definition and set to 60m (#104) 2022-06-06 09:42:52 +02:00
/rootzoll
d890907028
#100 fix bitcoin-only (#101) 2022-06-04 16:45:32 +02:00
fusion44
887d44be44
chores: remove unused health messages; Fix typos
closes remove confusing "health" message in system_info #95
2022-06-04 14:46:03 +02:00
fusion44
762b79fde2
refactor: make running without LN explicit in .env 2022-06-04 14:16:19 +02:00
fusion44
de9a96e621
feat: implement Core Lightning gRPC backend (#98)
Some remaining issues with current implementation:

Some remaining issues with current implementation:

* Some calls require shell access to lightning-cli as some gRPC calls are not yet implemented
* Getting on-chain fund flows is not as nice as it is with LND and required access to the Core Lightning SQlite database
* With current API you can only get current outputs
* High probability of bugs arising

closes #45
2022-06-04 14:10:44 +02:00
fusion44
bb6d6a6bff
chore: dep update; update version to 0.5.0 2022-05-28 12:38:10 +02:00
geco91
0054945171
Exclude .git on sync_to_blitz (#91) 2022-05-27 01:03:37 +02:00
fusion44
a34dd7954c
chore: apply pre_commit, fix typos, update deps 2022-05-18 18:20:13 +02:00
rootzoll
79a1690d11 fix if softforks unavailable 2022-05-18 17:31:43 +02:00
/rootzoll
57f733ebb5
Adding identity_uri to /lightning/get-info (#89) 2022-05-18 00:14:35 +02:00
/rootzoll
5f9bdf4a45
merge: add connection info endpoint (#86) 2022-05-12 19:49:01 +02:00
/rootzoll
d5a7e3f186
Channels: Open, List & Close (#82) 2022-05-09 19:45:18 +02:00
/rootzoll
8fa239f135
Add endpoint to change passwords (#85) 2022-05-09 19:32:47 +02:00
/rootzoll
ce7f82c106
Installapps (#78)
Adding functionallity for setup & installing additional apps ... run with the latest raspiblitz dev scripts.
2022-05-05 13:27:59 +02:00
fusion44
1a230d3214
fix: LND wallet balance request code 2022-04-17 07:58:34 +02:00
fusion44
7d452be179
feat: implement "rawblock" zmq sub as a fallback
Lightning Polar only exposes "rawblock" and not "hashblock
=> make it configurable which one to use
2022-04-05 16:40:18 +02:00
rootzoll
943ee4386b fix post data 2022-03-30 00:59:04 +02:00
rootzoll
a05d71de78 add lightning sync info 2022-03-25 11:33:52 +01:00
rootzoll
8d9c2c7599 add sync status endpoint 2022-03-24 21:56:44 +01:00
fusion44
efdb1c1057
feat: add shutdown/reboot SSE events on initiation
plus:
* add some more documentation
* add error handling when the script fails to run
* a bit of refactoring

refs #70
2022-03-24 20:17:56 +01:00