Michael Bumann
a4e597ccfc
Comments
2022-01-22 13:30:13 +01:00
Michael Bumann
b54f04701f
Start invoice subscription from the last unsettled invoice
...
We want to get updates starting from those invoices.
This allows us to catch up in case the app was offline while some invoices got settled
2022-01-22 13:24:51 +01:00
Michael Bumann
c75e703d80
Try reconnecting on invoice subscription errors
2022-01-22 12:57:00 +01:00
Michael Bumann
71eabae443
Split up process invoice updates
2022-01-21 21:29:16 +01:00
Michael Bumann
12dbb48c8d
First draft to subscribe for LND invoice update
2022-01-21 20:57:41 +01:00
Michael Bumann
613a485d7e
Merge pull request #54 from getAlby/payinvoice
...
Payinvoice
2022-01-21 21:56:12 +02:00
Michael Bumann
3e088a7652
Pass invoice description hash string to LND
2022-01-21 17:40:52 +01:00
Michael Bumann
2606403489
Use tx to call do the db updates
2022-01-21 15:12:08 +01:00
Michael Bumann
43aba70dd8
Fix invoice preimages for internal payments
...
We create the preimage on incoming invoices. If it is an internal incoming payment (meaning from one user to another user) we use that preimage and save it on the outgoing invoice.
This makes sure we can give wallets the correct preimage for a payment request even though no lightning transaction happened
2022-01-21 13:56:02 +01:00
Michael Bumann
89acf29b24
cleanup
2022-01-21 12:25:19 +01:00
Michael Bumann
f683a22a66
Correct gettxs and getuserinvoices responses
2022-01-21 12:22:49 +01:00
Michael Bumann
228edcbe39
Return user invoices
...
and maybe correctly encode the Buffers?
2022-01-21 11:49:08 +01:00
Michael Bumann
55fbaeea92
nullzero entry for the parent txn
2022-01-21 11:17:19 +01:00
Michael Bumann
a5d1c3f4ed
Add constraint to invoices DB to make sure settled invoices have a preimage saved
...
We just try to store as much potential relevant information as possible.
This could help debugging and verifiying payments if there is an issue
2022-01-21 11:16:48 +01:00
Michael Bumann
2097807c85
Support Amount values as string/integer in request JSON
2022-01-21 11:15:35 +01:00
Michael Bumann
289d7405f1
Rollback only in the SendPayment call
...
this one handles the transactions which is passed to the SendPaymentSync and SendInternalPayment call
2022-01-20 19:00:49 +01:00
Michael Bumann
9ed269dedf
Split up functions for internal vs. external payments
2022-01-20 18:31:03 +01:00
Michael Bumann
7d955a1d7b
Support self-payments
...
If the destination of the invoice is our node we only create internal transaction entries and do not call the underlaying lightning node
2022-01-20 16:50:26 +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
kiwiidb
ef169f7857
fix main branch name in workflow
2022-01-20 15:19:32 +01:00
kiwiidb
955a181a54
use newer dockerfile
2022-01-20 15:17:35 +01:00
Michael Bumann
72e9c9f1fd
Merge pull request #59 from getAlby/feature/ci
...
Feature/ci
2022-01-20 15:46:04 +02:00
Michael Bumann
7d6dc15b8c
Merge branch 'main' into payinvoice
...
* main:
Correct style
Add blank routes required for bluewallet
2022-01-20 14:28:26 +01:00
Michael Bumann
9e78d9001e
Merge pull request #58 from getAlby/blank-routes
...
Add blank routes required for bluewallet
2022-01-20 15:28:04 +02:00
Michael Bumann
1d17708875
Correct style
2022-01-20 14:20:15 +01:00
kiwiidb
f2158de902
add dockerfile and workflow
0.0.1
2022-01-20 14:20:01 +01:00
Michael Bumann
3a67f86a34
Merge main
2022-01-20 14:15:40 +01:00
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