Commit Graph

593 Commits

Author SHA1 Message Date
Michael Bumann
31570b8adf Add blank routes required for bluewallet 2022-01-20 14:02:32 +01:00
Michael Bumann
6822b274e5 Add check payment endpoint 2022-01-20 13:58:46 +01:00
Michael Bumann
c06a749b8d Merge pull request #51 from getAlby/no-panic
Panic less
2022-01-20 14:52:31 +02:00
Michael Bumann
1719fe65c4 Merge pull request #57 from getAlby/fix/remove-interface-pointer
Fix/remove-interface-pointer
2022-01-20 14:52:14 +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
70a7e1a8eb Add DB constraints to check for user balances 2022-01-20 02:03:51 +01:00
Michael Bumann
d4183c100b Add payinvoice endpoint 2022-01-20 01:57:31 +01:00
Michael Bumann
1db6f77dd9 Add check payment endpoint 2022-01-19 22:11:24 +01:00
Michael Bumann
56a3f79506 Cleanup 2022-01-19 21:42:42 +01:00
Michael Bumann
93e74d125f Merge pull request #53 from getAlby/user-service
User service for all user related functions
2022-01-19 22:41:00 +02:00
Michael Bumann
237d0153bd Merge pull request #49 from getAlby/getbtc
Add /getbtc endpoint
2022-01-19 22:40:28 +02:00
Michael Bumann
6a8d4bd52c Merge pull request #50 from getAlby/getinfo
Add /getinfo endpoint
2022-01-19 22:39:55 +02:00
Michael Bumann
3d0d7f6dae Merge pull request #52 from getAlby/addinvoice
Implement addinvoice call
2022-01-19 22:39:32 +02:00
Michael Bumann
7bd74a69d8 User service for all user related functions 2022-01-19 21:16:20 +01:00
Michael Bumann
f625ef7efc Implement addinvoice call 2022-01-19 19:43:29 +01: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
9e772a95a8 Add missing ln service 2022-01-19 17:48:43 +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
163dcb725c Fix 2022-01-19 17:36:58 +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
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
Viktor Patchev
478a1da937 Populate Readme 2022-01-19 16:25:39 +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