Commit Graph

158 Commits

Author SHA1 Message Date
Michael Bumann
95a979a05f Merge branch 'main' into feature/configurable-port 2022-01-23 19:42:52 +02:00
Michael Bumann
f6559a6a0c Make port configurable 2022-01-22 23:11:13 +01:00
Michael Bumann
a4e597ccfc Comments 2022-01-22 13:30:13 +01:00
Michael Bumann
12dbb48c8d First draft to subscribe for LND invoice update 2022-01-21 20:57:41 +01:00
Michael Bumann
90a686677f Save invoice destination
And save the node pubkey in the service to make it usable
2022-01-20 15:41:50 +01:00
Michael Bumann
31570b8adf Add blank routes required for bluewallet 2022-01-20 14:02:32 +01:00
Michael Bumann
c06a749b8d Merge pull request #51 from getAlby/no-panic
Panic less
2022-01-20 14:52:31 +02:00
kiwiidb
7c51383feb replace all panics with log.Fatal 2022-01-20 13:44:59 +01:00
kiwiidb
d3466aa0cc remove pointer to interface 2022-01-20 13:24:59 +01:00
Michael Bumann
56a3f79506 Cleanup 2022-01-19 21:42:42 +01:00
Michael Bumann
237d0153bd Merge pull request #49 from getAlby/getbtc
Add /getbtc endpoint
2022-01-19 22:40:28 +02:00
Michael Bumann
c47e5ef7a6 Format 2022-01-19 18:45:01 +01:00
Michael Bumann
eeb9d3cf24 Panic less 2022-01-19 18:18:19 +01:00
Michael Bumann
c6600c36ed Comments 2022-01-19 18:12:28 +01:00
Michael Bumann
65fe75d7ce Introduce a Blank controller for unsported endpoints 2022-01-19 17:56:33 +01:00
Michael Bumann
5c5f600147 Add /getinfo endpoint
For now we simple return the getinfo response from LND.
In the future we should limit the response and exactly define the response value.
Also we should add some caching here to not always needing to hit the lightning node
2022-01-19 17:40:06 +01:00
Michael Bumann
585a8504e5 Add /getbtc endpoint
We do not support on chain transactions but for backwards compatibility we still implement these endpoints.
Here we return an empty array.
This is consumed by: a28a2b96bc/class/wallets/lightning-custodian-wallet.js (L327)
2022-01-19 17:18:50 +01:00
kiwiidb
8eef14fccc move service functions to service package 2022-01-19 16:10:55 +01:00
kiwiidb
b8fb826ea5 move config to lib 2022-01-19 14:40:27 +01:00
kiwiidb
a83fbc6067 add constructor funcs for controllers 2022-01-19 14:35:46 +01:00
kiwiidb
5c3e3b2a30 throw away useless context 2022-01-19 14:01:32 +01:00
kiwiidb
e22ab6ce49 rename context to service 2022-01-19 13:53:40 +01:00
Viktor Patchev
919affa2db Update package name to new repo 2022-01-18 10:42:53 +01:00
Michael Bumann
7c007791ec Setup LND connection 2022-01-17 22:37:40 +01:00
Michael Bumann
aabbfc33b5 Merge master and use correct lnd version 2022-01-17 18:45:47 +01:00
Viktor Patchev
5cf32d83b0 lnd options from env 2022-01-17 14:56:14 +01:00
Viktor Patchev
2b1de4ba92 fix 2022-01-17 13:53:16 +01:00
Viktor Patchev
2bf39e0f97 Setup lnd grpc client 2022-01-17 12:53:47 +01:00
Michael Bumann
855cb236ba Cleanup 2022-01-17 11:51:47 +01:00
Michael Bumann
d7f57a9dd7 Panic if configs are missing 2022-01-17 11:25:54 +01:00
Michael Bumann
316cc77324 Add configs to env example file 2022-01-17 11:12:50 +01:00
Michael Bumann
6478c6e0db Make JWT expiry configurable and require to set a JWT secret 2022-01-17 11:11:28 +01:00
Michael Bumann
866be7bd91 Hide echo banner 2022-01-17 10:26:29 +01:00
Michael Bumann
4cec10a999 Cleanup filename 2022-01-17 10:24:42 +01:00
Michael Bumann
698323a8d9 Echo logging 2022-01-17 10:19:17 +01:00
Roman Useinov
e7e5904829 UserMiddleware added 2022-01-16 14:02:58 +00:00
Michael Bumann
1b347c5177 Move JWT middleware config to tokens and load UserId into the context 2022-01-16 13:26:42 +00:00
Michael Bumann
95512462f6 Cleanup typos (#28)
* Typo

* Typoc
2022-01-16 14:13:45 +01:00
Michael Bumann
8bc060697f Only warn if the .env file can not be loaded (#29)
.env files should be optional in a production environment it is likely that the env variables are set explicitely and not through a file
2022-01-16 14:10:27 +01:00
Roman Useinov
628071160c Cleanup (#25)
* remove cmd folder as we are going to have only one entrypoint

* get rid of pkg directory

* rename test -> integration_tests as unit tests should reside next to the actual files they are testing

* database migration WIP

* reinstate gorm boilerplate in the addinvoice for now to make it compile

* introduce migrations

* add Makefile

* don't use unsigned types for database mappings

* migrations work now

* add build target

* use echo groups

* gorm removed

* add envconfig

* fix comments
2022-01-16 00:49:19 +01:00
Viktor Patchev
1ee2bdb909 Change folder structure 2022-01-10 21:15:30 +01:00
Michael Bumann
51eb9b493d Merge branch 'main' into addinvoice-endpoint 2022-01-08 17:02:30 +02:00
Viktor Patchev
8618139539 Merge pull request #6 from bumi/add-logging
Add logging and recover middlewares
2022-01-08 10:55:13 +01:00
Viktor Patchev
e69c1bc0bd Merge branch 'main' into http-req-body-limit 2022-01-08 10:53:13 +01:00
Viktor Patchev
3460c89954 Change req body limit to 250K 2022-01-08 10:51:43 +01:00
Viktor Patchev
645a63ba28 Fix adding jwt middleware 2022-01-08 10:44:18 +01:00
Viktor Patchev
86ac428767 Merge branch 'main' into addinvoice-endpoint 2022-01-08 10:41:30 +01:00
Michael Bumann
0dae101e93 Merge branch 'main' into graceful-shutdown 2022-01-08 11:35:08 +02:00
Viktor Patchev
4cb8996aa3 Add default rate limiter 2022-01-07 20:47:16 +01:00
Viktor Patchev
87af4fcd93 Server graceful shutdown 2022-01-07 20:41:50 +01:00