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
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
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
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
Christoph Stenglein
2ab56ca774
only allow localhst:3000 since other ports are not needed
2021-10-04 17:36:56 +02:00
Christoph Stenglein
c7cd337bf8
add CORS headers to responses
2021-10-04 17:30:01 +02:00
Stefan Stammberger
a8355687d4
feat: implement send coins (on-chain) endpoint
...
closes #15
2021-10-03 20:55:28 +02:00
Stefan Stammberger
8d1357cf09
feat: use secrets.compare_digest in login
...
More info:
https://fastapi.tiangolo.com/advanced/security/http-basic-auth/#timing-attacks
2021-10-03 10:58:46 +02:00
Stefan Stammberger
0dfe740978
fix: remove wrong import
2021-10-03 10:32:06 +02:00
Stefan Stammberger
acf7c7a03d
fix: Argument errors in Bip9Statistics.from_rpc
2021-10-02 12:02:29 +02:00
Stefan Stammberger
8ce482d6a8
refactor: move main.py file into the "app" package
...
This is in preparation to adding testing functionalities.
Also applied some formatting and removed unused imports to main.py
2021-10-02 10:01:17 +02:00
Stefan Stammberger
abc8b258ff
fix: BtcLocalAddress.from_rpc method
2021-10-01 22:31:22 +02:00
Stefan Stammberger
640418795e
feat: improve naming conventions of APIs
2021-09-26 21:57:55 +02:00
Christoph Stenglein
7ddf166f14
change debug script path
2021-09-26 18:21:38 +02:00
Stefan Stammberger
070ac2131c
fix: update wrong PyJWT version
...
Also: don't silently eat exceptions when decoding a JWT token
2021-09-25 17:58:53 +02:00
Stefan Stammberger
ffdfe9fed6
feat: implement decode pay req endpoint
...
closes #16
2021-09-20 17:00:36 +02:00
Stefan Stammberger
43783549d1
feat: implement get a raw system logs endpoint
...
Not tested yet on a real Raspiblitz!
refs #18
2021-09-20 11:22:50 +02:00
Stefan Stammberger
9dfd95032a
refactor: move code from lnd impl to repository
...
This avoids duplicated code with other ln implementations later on.
This also pushes LightningStatus object to the SSE channel
instead of the full LnInfo object.
refs #11
2021-09-07 20:59:23 +02:00
Stefan Stammberger
c673394fa8
refactor: system API
...
refs #11
2021-09-05 20:23:59 +02:00
Stefan Stammberger
79be6eaf34
refactor: lightning API
...
refs #11
2021-09-05 19:19:53 +02:00
Stefan Stammberger
f482c441cc
chore: format all files using black
2021-09-05 08:56:53 +02:00
Stefan Stammberger
f0b911db1e
refactor: bitcoin API
...
refs #11
2021-09-04 15:38:17 +02:00
Stefan Stammberger
2b03882907
refactor: rename "password_a" to "password"
2021-08-17 18:53:53 +02:00
Stefan Stammberger
7ecf29cef0
feat: enhancements to /system/login
...
* password_a must now be posted in the request body as a json object
* password is now read from the .env file instead of hardcoded
* password will be checked if it is min 8 chars
* one_time_password is not yet in use and optional
2021-08-17 18:34:05 +02:00
Stefan Stammberger
343d1703dd
chore: auto-format grpc files
2021-08-14 13:47:51 +02:00
Stefan Stammberger
0c90450bea
feat: improve how to fetch wallet balances
...
* /lightning/getbalance now returns onchain funds and channel
balances as one object
* changes to the wallet balance are now pushed through the SSE channel
2021-08-03 21:20:24 +02:00
Stefan Stammberger
e65c5bfc3f
feat: implement LN info endpoint / SSE messages
2021-08-02 20:30:18 +02:00
Stefan Stammberger
54dd7b77f3
feat: add more data to get bitcoin info response
2021-08-01 10:32:43 +02:00
Stefan Stammberger
464f22ac54
fix: multiple small updates for hw info endpoint
...
* disk stats where not included when getting hardware info
* update hardware info endpoint response description
* rename disk "partition_usage_bytes" to "partition_total_bytes"
2021-08-01 07:50:24 +02:00
Stefan Stammberger
38c93f6b58
feat: implement sendpayment endpoint for LND
2021-07-27 21:10:25 +02:00
Stefan Stammberger
da5d97a550
feat: watch for invoice changes and push via SSE
...
Currently only LND is implemented.
2021-07-25 18:15:26 +02:00
Stefan Stammberger
c33351d968
refactor: move some config vars to the .env file
2021-07-25 17:24:33 +02:00
Stefan Stammberger
bba02d03e3
feat: create gRPC channel in async mode
...
Previously any subscriptions blocked the whole app when
listening to events and all other calls are async now too.
2021-07-25 16:52:34 +02:00
Stefan Stammberger
4b75243cde
feat: add lightning AddInvoice endpoint
...
Though, only LND is implemented at the moment.
2021-07-21 19:38:49 +02:00
Stefan Stammberger
a44717547f
feat: LND loading adapted
...
- the .env file should contain the cert in HEX format
- gRPC channel is now created during load within the LND utils class
closes #3
2021-07-21 18:58:35 +02:00
Stefan Stammberger
2019d34cfa
fix: use asyncio.sleep instead of time.sleep
2021-07-18 09:39:13 +02:00