Stefan Stammberger
04a93833c5
refactor: rename wallet balance update function
2022-01-15 14:29:55 +01:00
Stefan Stammberger
233a41eb96
feat: implement forward success SSE notifications
...
refs #64
2022-01-15 14:27:08 +01:00
Stefan Stammberger
18822e68cc
fix: don't update wallet if update is pending
2022-01-15 14:03:44 +01:00
Stefan Stammberger
78db9f3d71
feat: implement basic fee revenue endpoint
...
closes #48
2022-01-09 20:20:21 +01:00
Stefan Stammberger
c9a2b78a92
feat: add support for zero amount invoices
...
closes #63
2022-01-09 18:04:10 +01:00
Stefan Stammberger
4157058a54
feat: implement get-system-info backends
...
Raspiblitz and native-python implementations should work.
Only feature still missing is system health related stuff.
refs #47
2021-12-25 16:53:42 +01:00
Stefan Stammberger
9223a14798
fix: typo in blitz hardware implementation
2021-12-25 08:59:53 +01:00
Stefan Stammberger
739ebdd3a1
feat: round percentages in Blitz hardware repo
2021-12-23 16:29:10 +01:00
Stefan Stammberger
a864e134ed
fix: remove deprecated "publicIP" field
2021-12-23 16:04:02 +01:00
Stefan Stammberger
bc53069234
fix: log a warning if a Redis key doesn't exist
2021-12-23 15:25:51 +01:00
Stefan Stammberger
e4c050d4c4
fix: crash when platform was not set in .env file
2021-12-22 21:46:34 +01:00
fusion44
77db3a16cb
Merge pull request #59 from fusion44/raspiblitz-hw-codepath
...
Implement hardware status fetching on RaspiBlitz platform
2021-12-18 13:52:48 +01:00
Stefan Stammberger
228ae2100a
feat: set raspiblitz as default platform
...
Rationale: No need to change RaspiBlitz install scripts
2021-12-18 13:27:47 +01:00
Stefan Stammberger
ab0a8f2575
feat: fetch hardware data via Redis
...
To keep Blitz API platform independent two code paths have been
implemented. A new "platform" .env variable must be set if running
on a raspiblitz to fetch hardware data from Redis. See the comments
in .env_sample for further explanation.
2021-12-15 21:11:46 +01:00
Stefan Stammberger
316b105cb0
feat: implement fee estimation endpoint
...
closes #44
2021-12-06 18:38:01 +01:00
Stefan Stammberger
b51f78a349
Merge branch 'main' of github.com:fusion44/blitz_api into main
2021-12-06 18:36:23 +01:00
Stefan Stammberger
5eb39c52a0
feat: add sync to blitz make target
2021-12-05 21:14:25 +01:00
fusion44
9d16a76133
Merge pull request #56 from escapedcat/docs/readme-update
...
docs: simplify and rework readme
2021-12-05 10:35:37 +01:00
escapedcat
5c36c09bd2
docs: simplify and rework readme
2021-12-05 16:32:51 +08:00
Stefan Stammberger
7e2d383ea5
fix: process payment requests with route hints
...
fixes #54
2021-12-04 12:13:23 +01:00
Stefan Stammberger
20e0457a73
feat: send a wallet_locked_status SSE message
...
When someone connects to the SSE endpoint and the wallet is
locked a message with event name `wallet_lock_status` type is sent:
```js
// only sent when a new SSE connection is established and the wallet is
// locked at the same time
event: wallet_lock_status
data: {"locked": true}
```
When the wallet is unlocked either through SSH or the API, another
event is sent:
```js
// sent always when a new connection is established when the wallet
// is unlocked, or it is sent when the wallet was unlocked after
// connection was established
event: wallet_lock_status
data: {"locked": false}
```
It is always the first thing the client receives. After the unlock
event, the usual warmup data is sent.
refs #34
2021-11-30 19:57:17 +01:00
Stefan Stammberger
8e32b68786
feat: listen for external unlocks via command line
...
refs #34
2021-11-30 17:18:42 +01:00
Stefan Stammberger
a7dfe14aea
feat: round verification_progress value in SSE
...
Bitcoin Core calculates the blockchain verification by including
unconfirmed transactions. This means that everytime there is
a new transaction, a `btc_info` event is fired through the SSE
channel. For clients this information is usually not useful beyond
two digits. Solution: round to two digits for SSE events.
The full floating point value can still be fetched through
`/bitcoin/get-blockhain-info`
closes #52
2021-11-28 10:30:54 +01:00
Stefan Stammberger
71f87e06d7
feat: implement local cookie authentication
...
This is only useful for application running directly on the Raspiblitz.
This will create a file in ~/.blitz_api/.cookie with a valid JWT token.
Local applications can use this to authenticate to the API without
having to ask for the password. This is similar to how Bitcoin Cores
cookie auth works.
2021-11-28 08:42:52 +01:00
Stefan Stammberger
782464b61d
feat: implement handling of locked wallets
...
* new endpoint: /lightning/unlock-wallet
* ln endpoints return HTTP_423_LOCKED status if wallet is locked
* bootup sequence defers ln listeners setup if wallet is locked
refs #34
2021-11-24 11:12:10 +01:00
Stefan Stammberger
ba4aa25c01
chore: update grpc files and add WalletUnlocker
2021-11-23 20:19:03 +01:00
Stefan Stammberger
3c7a22e417
feat: implement /lightning/new-address endpoint
...
closes #43
2021-11-22 21:54:42 +01:00
Stefan Stammberger
63c52d2ba7
fix: encode JWT expiry time as int, not float
...
fixes #46
2021-11-22 20:44:14 +01:00
Stefan Stammberger
7b94aac3d8
feat: add "/system/refresh-token" endpoint
...
closes #41
2021-11-19 18:32:30 +01:00
Stefan Stammberger
bd6d293259
fix: tests and simplify the test code
...
refs# 21
2021-11-19 17:28:39 +01:00
Stefan Stammberger
964514f90c
fix: return HTTP status 401 when unauthorized
...
Previous status code 403 was inappropriately used.
2021-11-19 08:36:15 +01:00
Stefan Stammberger
58af4f56d5
feat: send full LnInfo when a new client connects
2021-11-18 19:50:04 +01:00
Stefan Stammberger
6ca9b97b87
fix: problems with included external packages
...
* Add proper licensing information
* Move sse_starlette to the externals folder
2021-11-18 11:30:48 +01:00
Stefan Stammberger
3a16015f23
chore: update dependencies
...
Package operations: 3 installs, 26 updates, 1 removal
• Removing chardet (4.0.0)
• Updating typing-extensions (3.10.0.2 -> 4.0.0)
• Updating zipp (3.5.0 -> 3.6.0)
• Updating async-timeout (3.0.1 -> 4.0.1)
• Installing frozenlist (1.2.0)
• Updating idna (3.2 -> 3.3)
• Updating importlib-metadata (4.8.1 -> 4.8.2)
• Updating multidict (5.1.0 -> 5.2.0)
• Updating pyparsing (2.4.7 -> 3.0.6)
• Updating aiojobs (0.3.0 -> 1.0.0)
• Installing aiosignal (1.2.0)
• Installing asynctest (0.13.0)
• Updating certifi (2021.5.30 -> 2021.10.8)
• Updating charset-normalizer (2.0.6 -> 2.0.7)
• Updating click (8.0.1 -> 8.0.3)
• Updating fastapi (0.68.1 -> 0.68.2)
• Updating grpcio (1.40.0 -> 1.42.0)
• Updating packaging (21.0 -> 21.3)
• Updating protobuf (3.18.0 -> 3.19.1)
• Updating py (1.10.0 -> 1.11.0)
• Updating regex (2021.9.24 -> 2021.11.10)
• Updating tomli (1.2.1 -> 1.2.2)
• Updating typed-ast (1.4.3 -> 1.5.0)
• Updating yarl (1.6.3 -> 1.7.2)
• Updating aiohttp (3.7.4.post0 -> 3.8.1)
• Updating black (21.9b0 -> 21.11b1)
• Updating deepdiff (5.5.0 -> 5.6.0)
• Updating grpcio-tools (1.40.0 -> 1.42.0)
• Updating pyjwt (2.1.0 -> 2.3.0)
• Updating python-decouple (3.4 -> 3.5)
2021-11-18 11:01:26 +01:00
Stefan Stammberger
2349d917b9
feat: add a "make export" command to Makefile
...
Export will update the requirements.txt file fir pip.
2021-11-18 10:57:27 +01:00
Stefan Stammberger
f9aae93ce9
fix: install problem due to include from git repo
...
fixes #40
2021-11-18 08:31:46 +01:00
Stefan Stammberger
ae59ef9181
feat: implement /lightning/list-all-tx endpoint
...
This call currently fetches all invoices, payments and transactions each
time the endpoint is hit. TODO: Find a better way to cache this.
Possibly it is a good idea to build this list once on startup and
keep it updatedwhen new transactions roll in.
refs #30
2021-11-02 19:02:08 +01:00
Stefan Stammberger
be1f1f6dde
feat: implement /lightning/list-payments endpoint
...
Currently implemented for LND only.
Low level list-payments endpoint in preparation to implement #30 .
2021-10-31 19:33:35 +01:00
Stefan Stammberger
4a6c6e9cf4
feat: implement /lightning/list-invoices endpoint
...
Currently implemented for LND only.
Low level list-invoices endpoint in preparation to implement #30 .
2021-10-31 19:04:39 +01:00
Stefan Stammberger
93d3fe3d51
fix: /lightning/list-onchain-tx route naming
2021-10-31 18:21:46 +01:00
Stefan Stammberger
21f0f389e3
refactor: implement grpc loaders as classmethods
2021-10-31 18:15:43 +01:00
Stefan Stammberger
5e068f0cb1
feat: implement list-onchain-tx endpoint for LND
...
Low level on-chain API in preparation to implement #30 .
2021-10-31 16:49:15 +01:00
fusion44
4d9030eac0
Merge pull request #38 from fusion44/sse-fix
...
fix: sse message composition
2021-10-30 21:46:55 +02:00
Stefan Stammberger
3f8860999b
fix: sse message composition
2021-10-27 19:23:21 +02:00
Stefan Stammberger
0acb332c65
docs: improve lightning/get-balance documentation
...
closes #27
2021-10-16 16:59:52 +02:00
Stefan Stammberger
6ad707e3ea
fix: SSE message JSON encoding
...
fixes #23 , #24 , #25
2021-10-12 21:36:15 +02:00
Stefan Stammberger
4d5ffbc03e
refactor: Shorten the url path of get ln info lite
...
old: /lightning/get-ln-info-lite
new: /lightning/get-info-lite
2021-10-05 19:50:32 +02:00
Stefan Stammberger
27463dfbfe
feat: Send warmup data to new SSE clients
...
closes #9
2021-10-05 19:36:09 +02:00
Stefan Stammberger
2d18e5a33f
refactor: Rename poorly named classes and events
2021-10-05 19:34:06 +02:00
fusion44
54760b04c1
Merge pull request #22 from cstenglein/add-cors-header
...
add CORS headers to responses
2021-10-04 20:17:58 +02:00