Commit graph

374 commits

Author SHA1 Message Date
Jonathan Zernik
e66dbdeebd
Create peer sync task class (#350)
* Create peer sync task class

* Convery peer upload to subclass of peer sync tsk

* Use network task class for download task

* Use network task class for single squeak download

* comment unused network sync methods

* Remove old network controller methods

* Move all peer task methods into peer task class

* Move get offer method into peer sync class

* Delete get offer class

* Upload timeline squeaks using network task subclass

* Fix upload squeaks to only upload unlocked squeaks

* Remove unused synctask class
2020-10-31 21:48:25 -04:00
Jonathan Zernik
d42f2362f3
Only accept unlocked squeak post (#351)
* Only accept squeak upload post if unlocked

* Fix handling of invalid squeak upload in squeak post rpc method
2020-10-31 21:31:08 -04:00
Jonathan Zernik
fc81868e45
Add download single squeak method (#349)
* Add download single squeak method

* Add test for download squeak rpc method

* Imprive peerdownload class to only use block height only for sync method
2020-10-30 23:31:16 -04:00
Jonathan Zernik
b29cc9e925
Add build instructions for protoc in readme (#348)
* Add build instructions for protoc in readme

* Fix protoc download urls
2020-10-30 12:42:32 -04:00
Jonathan Zernik
f8cda6fef2
Organize frontend (#346)
* Remove intermediate squeak-node-frontend dir

* Create build-protos.sh

* Fix build-protos script in readme
2020-10-29 23:21:38 -04:00
Jonathan Zernik
927299cef0
Allow frontend testing without login (#345)
* Frontend testing working in dev mode

* Make login_disabled and cors configs configurables

* Update frontend readme
2020-10-29 18:22:01 -04:00
Jonathan Zernik
add72380ef
Add step to build docker-compose in readme (#343) 2020-10-29 16:19:08 -04:00
Jonathan Zernik
99ddc2df77
Rename to squeaknode (#342)
* Rename squeakserver to squeaknode and get itest passing

* Fix itest dockerfile

* Rename more squeakserver to squeaknode

* Rename database from squeakserver to squeaknode

* Update readme

* Remove frontend/build from git

* Rename squeakserver to squeaknode in tox and main
2020-10-29 14:35:17 -04:00
Jonathan Zernik
363a5eef0c
Remove log lines in admin handle (#338) 2020-10-29 13:21:58 -04:00
Jonathan Zernik
400d7faf5c
Use host machine volumes for lnd and sqk (#337) 2020-10-29 01:39:15 -04:00
Jonathan Zernik
b68d393778
Handle flask request errors (#336)
* Handle flask rpc request errors

* Show failed requests in alert in frontend
2020-10-29 01:23:49 -04:00
Jonathan Zernik
a8564418b6
Show login and logout menu in frontend (#335) 2020-10-28 21:36:21 -04:00
Jonathan Zernik
0f875f8071
Add logout button (#334) 2020-10-28 20:30:23 -04:00
Jonathan Zernik
6faea1b525
Add login required for all flask endpoints (#333) 2020-10-28 19:37:59 -04:00
Jonathan Zernik
bac8d27072
Fix external lnd host env (#332)
* Fix lnd external host env

* Open port 9735 on lnd host in docker
2020-10-28 15:58:19 -04:00
Jonathan Zernik
d135f59250
Fix static url path for flask (#331) 2020-10-28 15:37:19 -04:00
Jonathan Zernik
0be9ade5ad
Include static react assets in setup install (#330)
* Include react build assets in static folder in setup install

* Remove comments from flask app startup
2020-10-28 15:00:21 -04:00
Jonathan Zernik
cf4699d6f8
Remove unused proto dir copy in dockerfile (#329) 2020-10-28 14:48:49 -04:00
Jonathan Zernik
cd4caa0447
Ignore generated python pb2 files (#328)
* Got setup.py install working I think

* Got setup.py build working with both templates and protos

* Delete unused old proto dir inside squeakserver
2020-10-28 14:26:25 -04:00
Jonathan Zernik
287d0f34ca
Simplify sqkserver docker (#327)
* Simplify sqkserver docker by copying entire repository to image

* Got flask templates working without custom root path

* Remove unused comment in setup.py
2020-10-27 01:04:48 -04:00
Jonathan Zernik
5c4bfbc076
Remove frontend docker (#326) 2020-10-26 22:13:43 -04:00
Jonathan Zernik
478fdc944d
Build frontend outside docker (#325)
* Build frontend outside docker and commit in git

* Update sqkserver dockerfile to use build folder from host

* Add makebuild script to frontend folder
2020-10-26 21:59:40 -04:00
Jonathan Zernik
864db3d04e
Put frontend code in static folder (#324)
* Create webapp module in admin folder for flask app

* Almost working, but templates folder is still not included in packaged setup.py install output

* Update manifest file

* Got flask app working with templates
2020-10-25 21:49:58 -04:00
Jonathan Zernik
5292a15884
Remove other node from docker-compose (#323) 2020-10-25 15:35:17 -04:00
Jonathan Zernik
aa11e0180f
Rename title in template files (#322) 2020-10-24 23:24:22 -04:00
Jonathan Zernik
79d7a45e32
Use authentication for web app (#321)
* Require authentication for web app index page

* Got template working for login page

* Got fake login working

* Add logout endpoint

* Remove old comment

* Got login working

* Remove log lines
2020-10-24 23:13:16 -04:00
Jonathan Zernik
8422654513
Remove unused load use ssl function (#320) 2020-10-24 18:09:02 -04:00
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