Commit Graph

169 Commits

Author SHA1 Message Date
Michael Bumann
f625ef7efc Implement addinvoice call 2022-01-19 19:43:29 +01:00
Michael Bumann
818dd78c6f Merge pull request #47 from getAlby/refactor/service-pattern
Refactor/service pattern
2022-01-19 18:11:21 +02:00
kiwiidb
2915d4a094 fix 2 bugs in create user func 2022-01-19 16:59:10 +01:00
kiwiidb
8eef14fccc move service functions to service package 2022-01-19 16:10:55 +01:00
kiwiidb
d3948cce06 remove references to jwt in auth controller 2022-01-19 16:03:39 +01:00
kiwiidb
6a8061e55f split up service 2022-01-19 16:02:53 +01:00
kiwiidb
cbf3cecb32 refactor create endpoint 2022-01-19 15:40:41 +01:00
kiwiidb
18f65e4546 refactor payinvoice 2022-01-19 15:32:22 +01:00
kiwiidb
55fda4d3f4 refactor auth and addinvoice 2022-01-19 15:25:07 +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
0c80998b49 refactor payinvoice 2022-01-19 14:22:16 +01:00
kiwiidb
790239cfa5 refactor create 2022-01-19 14:19:45 +01:00
kiwiidb
ecd4894673 refactor balance 2022-01-19 14:18:34 +01:00
kiwiidb
c0644b1da7 refactor auth 2022-01-19 14:12:53 +01:00
kiwiidb
860e2fa402 refactor addinvoice 2022-01-19 14:10:37 +01:00
kiwiidb
5c3e3b2a30 throw away useless context 2022-01-19 14:01:32 +01:00
kiwiidb
7a2baa6000 rename service file 2022-01-19 13:54:09 +01:00
kiwiidb
e22ab6ce49 rename context to service 2022-01-19 13:53:40 +01:00
Michael Bumann
9b1fd8255c Merge pull request #46 from getAlby/db-model
Db model
2022-01-19 14:47:36 +02:00
Michael Bumann
f8aa8d5962 Reuse user model for account lookup 2022-01-19 13:21:08 +01:00
Michael Bumann
a07aa749f0 Move balance calculationo to User model 2022-01-19 13:16:25 +01:00
Michael Bumann
a6405fb6c4 Calculate user balance 2022-01-19 13:07:44 +01:00
Michael Bumann
ccc8ad8cd5 Comments 2022-01-19 11:46:10 +01:00
Michael Bumann
d86c7b680d Test creating account transactions for outgoing transaction 2022-01-19 11:00:08 +01:00
Michael Bumann
eb0e882941 Create user accounts on user create
Incoming: the account we debit on incoming transactions
Current: the account that we credit on incoming transactions and debit on outgoing transactions (this is the user's balance)
Outgoing: the acount we credit on outgoing transactions
Fees: the account we credit for fees
2022-01-19 10:59:40 +01:00
Michael Bumann
b38357091d Add DB view for easier balance calculation and extend model associations 2022-01-19 10:57:50 +01:00
Viktor Patchev
d56df155e9 Merge pull request #44 from getAlby/feature/default-certificates
lnd: use system certs if none configured
2022-01-18 13:58:30 +01:00
kiwiidb
4945bfcc78 lnd: use system certs if none configured 2022-01-18 13:33:24 +01:00
Michael Bumann
cc57e9b2e3 Merge pull request #43 from getAlby/change-module-path
Update package name to new repo
2022-01-18 12:06:34 +02:00
Viktor Patchev
919affa2db Update package name to new repo 2022-01-18 10:42:53 +01:00
Michael Bumann
9e6172c668 Merge pull request #42 from getAlby/grpc-setup
Setup lnd grpc client
2022-01-17 23:53:58 +02:00
Michael Bumann
b191d19707 Trying to use lnrpc in a controller 2022-01-17 22:52:10 +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
23dd07374f go modules update 2022-01-17 13:54:06 +01:00
Viktor Patchev
2b1de4ba92 fix 2022-01-17 13:53:16 +01:00
Michael Bumann
00e43dc5a3 Ignore log files 2022-01-17 13:18:14 +01:00
Viktor Patchev
fe46f423df remove logs 2022-01-17 12:56:42 +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
0976fd70ca Merge pull request #41 from getAlby/configurable-jwt-expiry
Configurable jwt expiry
2022-01-17 12:42:00 +02: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
bbd9a66302 Merge pull request #40 from getAlby/logging
Logging
2022-01-17 12:09:54 +02:00
Michael Bumann
1150ad6154 Merge remote-tracking branch 'getalby/main' into logging
* getalby/main:
  Minor fixes
2022-01-17 10:43:18 +01:00
Michael Bumann
854f7a8d9e Merge pull request #39 from getAlby/minor-fixes
Minor fixes
2022-01-17 11:42:49 +02:00
Michael Bumann
f3a05ac268 Update log format
if no extension is given we add the date.
if an extension is given we use that path (assuming that's the exact file the user wants)
2022-01-17 10:39:14 +01:00