Commit graph

347 commits

Author SHA1 Message Date
Jonathan Zernik
537bb8439b
Use ssl for flask server (#319)
* Use ssl for flask server

* Use window location protocol to get https or http in frontend

* Make use_ssl configurable

* Remove log port in frontend
2020-10-24 18:04:56 -04:00
Jonathan Zernik
9ed4d79c78
Use host volume for btcd data (#318) 2020-10-24 14:12:32 -04:00
Jonathan Zernik
ce31be284d
Build frontend code in sqkserver dockerfile (#317) 2020-10-24 11:31:10 -04:00
Jonathan Zernik
f321785d60
Change default web server port (#316) 2020-10-23 22:22:34 -04:00
Jonathan Zernik
ee27bcb6ee
Add config to enable admin web server (#315) 2020-10-23 21:31:06 -04:00
Jonathan Zernik
6f8e556bcf
Make web server port configurable (#314)
* Make host and port for web server configurable

* Add webadmin host and port to config file

* Use current host and port in web frontend

* Remove envoy and frontend from docker compose

* Remove envoy

* Remove unused postgres docker volume
2020-10-23 21:16:50 -04:00
Jonathan Zernik
70f6766d6b
Convert more rpc to flask requests (#313)
* Convert connect peer and disconnect peer to http requests in frontend

* Convert pay offer request in frontend to use flask

* Convert open and close channel to flask in frontend

* Convert get offer and get offers frontend to use flask endpoints

* Use flask endpoint for get peer request in frontend

* Convert set peer attributes to use flask endpoint in frontend

* Convert get signing and contact profiles to use flask in frontend

* Convert more frontend functions to use flask endpoint

* convert all frontend functions to use flask endpoint
2020-10-23 16:16:42 -04:00
Jonathan Zernik
438f396b80
Simplify lnd client (#312)
* Simplify macaroon creds in lnd client

* Update lnd client to handle request objects

* Use lnd stub for lnd requests in handler

* Use helper function for all lnd methods in web service

* Remove unused lnd methods in comments
2020-10-23 00:42:11 -04:00
Jonathan Zernik
7cdbac12e6
Remove old log line from web service (#311) 2020-10-22 22:57:30 -04:00
Jonathan Zernik
d3d7e6e604
Add admin web server (#310)
* Add basic flask web server

* Use ubuntu as docker base image for frontend docker build

* Got web frontend server running inside sqkserver

* Got client request throught flask working

* Refactor makerequest function in frontend

* Support sending request to flask server

* Use request and reply in flask for set profile sharing method

* Handle request object in flask for get followed squeaks route

* Use flask endpoint for lnd getinfo

* Use flask endpoint for walletbalance

* Use flask for gettransactions endpoint

* Use flask endpoint for lnd methods

* Add set profile properties methods to flask

* Move request, response protobuf to handler class

* Move request, reply inside handler for get signing profiles

* Move request, reply to handler for get contact profiles

* Move request, reply to handler for get squeak profile

* Move request reply for get profile by address to handler

* Move request reply to handler for set profile attributes

* Move request reply to handler for delete profile

* Move request reply for make squeak to handler

* Move request reply to handler for get squeak display

* Move request reply to get address squeak displays

* Move request reply to handler for ancestor squeaks

* Move request reply to handler for delete squeak

* Move request reply to handler for create peer and get peer

* Move request reply to handler for peer set attributes

* Move request reply to handler for more methods

* Move request reply to handler for another method

* Move request reply to handler for more methods

* Move more request reply to handler

* Move request reply to handler for all methods

* Remove message conversion helper methods from servicer class

* Remove duplicate protobuf conversion functions

* Fix flask handling of requests

* Remove old protobuf conversion methods in comments

* Use helper method to simplify web server routes functions
2020-10-22 22:52:40 -04:00
Jonathan Zernik
7ce8aff7c0
Delete offers when squeak deleted (#309) 2020-10-19 15:26:40 -04:00
Jonathan Zernik
8c5fbeb5b4
Improve dialog message for pay offer (#308) 2020-10-19 13:16:51 -04:00
Jonathan Zernik
9060ba67ca
Rename rpc request functions (#307)
* Renamed some of the rpc request functions to include request in name

* Update more rpc function names

* Rename more rpc methods

* Rename all rpc request functions

* Remove old comments

* Remove console logs and alerts from rpc methods

* Remove console logs from rpc request functions

* Remove console log line

* Handle buy error more gracefully

* Handle errors in open/close channel

* Handle alert errors for makesqueak dialog

* Handle error with alert in create signing/contact profile
2020-10-19 13:08:51 -04:00
Jonathan Zernik
df20352908
Organize frontend client requests in module (#306)
* Refactor getFollowedSqueaks into requests module

* Simplify getsqueaks method

* Refactor client requests in wallet page to requests module

* Make request name functions consistent

* Refactor set following profile function into requests module

* Refactor all rpc calls from profile page to requests module

* Refactor rpc functions out of lightning node

* Refactor rpc functions out of squeak peers page

* Refactor rpc functions out of buy offer dialog

* Refactor rpc functions out of close channel dialog

* Refactor rpc functions out of buy page

* Refactor rpc functions out of channel page

* Refactor rpc function out of offer page

* Refactor rpc functions out of peer page

* Refactor rpc functions out of profiles page

* Refactor rpc functions out of make squeak dialog

* Refactor rpc out of squeak page

* Refactor rpc out of squeak address page

* Delete connect peer dialog

* Refactor rpc out of create contact profile dialog

* Refactor rpc out of create signing profile dialog

* Refactor rpc out of create peer dialog

* Refactor rpc out of delete peer dialog

* Refactor rpc out of delete profile dialog

* Refactor rpc out of delete squeak dialog

* Refactor rpc out of open channel dialog

* Refactor rpc out of receive bitcoin dialog
2020-10-19 11:43:08 -04:00
Jonathan Zernik
248dd5f988
Show pending open channels (#305)
* Show pending open channels in channels tab in wallet page

* Show pending open channels for lightning node
2020-10-18 22:28:53 -04:00
Jonathan Zernik
a28e04b106
Improve channel item component (#304)
* Improve channel item component

* Fix clearing offers for squeak on squeak download
2020-10-18 21:37:42 -04:00
Jonathan Zernik
3b284ab699
Handle failed payment (#302)
* Show popup error message when payment failes

* Remove log lines from pay offer backend method
2020-10-18 19:29:14 -04:00
Jonathan Zernik
e29f5f174c
Add pay offer dialog (#301)
* Add pay offer dialog to offer component

* Show offer info in buyoffer dialog

* Remove old amount state from pay offer dialog

* Fix import pay offer request in pay offer dialog

* Go to squeak page after pay offer

* Fix text of pay offer button
2020-10-18 17:41:45 -04:00
Jonathan Zernik
7051a07361
Add rpc method for get sent payment by id (#300) 2020-10-18 16:23:59 -04:00
Jonathan Zernik
e834547cf6
Get sent payments working in test (#299) 2020-10-18 14:26:58 -04:00
Jonathan Zernik
a8ef9bc8b4
Check preimage hash (#298)
* Check preimage hash after pay offer

* Only try to unlock squeak when preimage hash is correct
2020-10-18 01:42:07 -04:00
Jonathan Zernik
2e6777ccd9
Remove log lines from pay offer method (#297) 2020-10-18 00:44:18 -04:00
Jonathan Zernik
8ebdc754ca
Add pay offer dialog and backend method (#296)
* Add insert sent payment method

* Delete db container from itest

* Add other container in itest

* Connect to other squeak node in itest

* Use client lightning container for itest to get offers from main node

* Get offers itest working

* Open channel to buy offer in itest

* Successfully pay offer

* Remove old print statements from itest

* Successfully unlock squeak in pay offer method

* Assert that decrypted content is correct in pay offer itest
2020-10-18 00:27:49 -04:00
Jonathan Zernik
e9cfcd00c9
Add routes tab to lightning node page (#295) 2020-10-15 20:39:59 -04:00
Jonathan Zernik
aef185830b
Remove todo comment in get offer (#294) 2020-10-15 20:24:23 -04:00
Jonathan Zernik
88c137c0ed
Use peer host as default when lnd host not specified (#293) 2020-10-15 19:58:56 -04:00
Jonathan Zernik
a2a3af0cd4
Add channel page (#291)
* Add channel page

* Add channel page

* Add channels tab to wallet page

* Add close channel dialog

* Close channel working
2020-10-15 19:34:47 -04:00
Jonathan Zernik
416803b7e2
Only show relevant channels for node in channels tab in node page (#290) 2020-10-15 15:47:02 -04:00
yzernik
18918c563f Remove close channel button 2020-10-15 12:08:58 -07:00
yzernik
bff44f3448 Show correct value for hasOpenChannel to lightning node 2020-10-13 13:38:47 -07:00
Jonathan Zernik
571bbe5bed
Remove unused db params module (#289) 2020-10-13 12:46:42 -07:00
Jonathan Zernik
4d5482af3b
Wait for lnd tls cert to exist in docker volume before start sqkserver (#288) 2020-10-13 12:22:34 -07:00
Jonathan Zernik
8386e7e570
Show channels (#287)
* Show channels in channels tab

* Show channel in channels tab works
2020-10-13 07:37:18 -07:00
Jonathan Zernik
7f56df48d5
Add open channel dialog (#285)
* Add open channel dialog

* Show pubkey in open channel dialog

* Fix open channel dialog

* Improve transaction colors

* Show more info in channels tab
2020-10-13 07:13:58 -07:00
Jonathan Zernik
92a77ce7bb
Add subscribe channel events rpc (#283)
* Add subscribe channel events rpc

* Upgrade lnd to 0.11.1 (#284)

* Got test working for open and close channel with subscriptions
2020-10-11 07:01:35 -07:00
Jonathan Zernik
f6f03b2a0f
Upgrade lnd to 0.11.1 (#284) 2020-10-11 05:33:29 -07:00
Jonathan Zernik
45b089ce93
Add open channel close channel (#282)
* Add open channel and close channel rpc

* Use different context managers for open channel and connect peer

* Add test for opening channel rpc
2020-10-11 04:21:07 -07:00
Jonathan Zernik
4bd11da03b
Show peers list (#281)
* Add new tab for peers in wallet page

* Show peers list in peers tabl

* Include address in peer list item

* Go to lightning node page from peers list item click
2020-10-11 01:23:44 -07:00
yzernik
4860641bd8 Show disconnect peer button in lightning node page 2020-10-10 04:12:26 -07:00
Jonathan Zernik
8b9f87990d
Show peer connection in lightning node (#280)
* Show peer connection status for lightning node

* Add connect peer button to lightning node page

* Add test for connect peer

* Add working test for list peers and connect peer

* Add test for disconnect peer

* Fix sqk dir config

* Fix sqk_dir config

* Successfully connect to sqkserver_other in docker-compose

* Remove unused dialog from lightning node page
2020-10-09 05:55:32 -07:00
azernik
1b81730220
use constant for squeak directory path (#274)
* use constant for squeak directory path

* fixed issues with squeak directory path constant
2020-10-08 22:07:51 -07:00
Jonathan Zernik
48b1b34338
Add list peers rpc method (#279) 2020-10-05 07:18:14 -07:00
Jonathan Zernik
d9a06024dc
Go to lightning node from offer page on click (#278) 2020-10-04 03:17:40 -07:00
Jonathan Zernik
f3c7653c60
Add offer page (#277) 2020-10-04 01:16:06 -07:00
Jonathan Zernik
d822ab97ca
Remove unnecessary div from transactions grid (#276) 2020-10-03 23:28:04 -07:00
Jonathan Zernik
9de4db766a
Improve transctions display in wallet transactions tab (#275) 2020-10-03 20:21:35 -07:00
Jonathan Zernik
41a6a87545
Use docker-compose build with option to fix dockerignore (#273) 2020-10-02 19:09:05 -07:00
Jonathan Zernik
b1f67abee2
Implement transaction item frontend component (#268) 2020-09-30 04:16:55 -07:00
Jonathan Zernik
24d041348f
Add test for send coins (#267)
* Add itest for sendcoins and get transactions

* Rename send coins itest
2020-09-30 01:37:23 -07:00
Jonathan Zernik
3a6011c645
Add get transactions rpc (#266)
* Add get transactions rpc method

* Use context manager for opening channel in itest

* Set up lnd connection in open connection context manager
2020-09-29 23:07:58 -07:00