Commit graph

50 commits

Author SHA1 Message Date
Jonathan Zernik
2cabb8197a
Use only named volumes in docker-compose (#2221)
* Use only named volumes in docker-compose

* Try fixing itest with new docker compose

* Update development doc
2022-06-09 17:58:18 -07:00
Jonathan Zernik
2cd39d05bf
Wait for first successful download single squeak (#2176)
* Got download single squeak working with return after successful download

* Remove comments and log lines

* Remove log lines
2022-04-27 01:58:28 -07:00
Jonathan Zernik
bff7bbbc4b
Use squeak store to encapsulate all core fns (#2030)
* Revert "Remove usage of squeak_core from squeak_store (#2029)"

This reverts commit bd15c653aa.

* Add make squeak method to squeak store class

* Add pay offer method to squeak store

* Remove squeak_core from controller constructor

* Remove default port param from controller constructor

* Fix broken itests

* Got download single squeak working synchronously
2022-03-26 20:42:42 -07:00
Jonathan Zernik
a8ba458fad
Fixed itests (#2014) 2022-03-17 22:48:13 -07:00
Jonathan Zernik
20d651df8e
Implement unlock private squeak (#1910)
* Add method stub for unlock private squeak in controller class

* Add methods to unlock private squeak in controller

* Remove todo comments

* Add test for create and decrypt private squeak in core module

* Update handler method for make squeak to support recipient profile id

* Add itest for make private squeak and unlock content as author
2021-12-28 01:07:59 -08:00
Jonathan Zernik
51f412d75f
Update squeaklib to support private messages (#1897)
* Update squeaklib and update import from keys module

* Rename signing key variable to private key in test util

* Fix calling make squeak function

* Update db data file to v3

* Add recipient public key column to squeak table

* Got squeak entry db query working with alias for profiles table

* Add test for make squeak with recipient

* Add test case for get profile from squeak entry query

* Got outer join with recipient profile working

* Use outer join to get recipient profile for all squeak entry db queries
2021-12-27 00:56:31 -08:00
Jonathan Zernik
cb8e8f2256
Remove old rpc servicer methods for bearer token commands (#1882) 2021-12-22 16:52:47 -08:00
Jonathan Zernik
5198467889
Use new squeak protocol with schnorr and pubkey as identifier (#1870)
* Got all tests in core dir passing

* Got all tests in db dir passing

* Got tests for admin dir passing

* Got all unit tests passing

* Added migration for squeak table and profile table using new pubkey

* Re-start db migrations with new data-v2.db file

* Fix column type for profile public key

* Got all itests passing

* Log the public key in hex in create contact profile handle fn

* Rename rpc methods to use pubkey instead of address

* Got frontend mostly working with new profile pubkey

* Update frontend to use pubkey instead of address

* Change size of squeak profile detail item

* Update create contact profile dialog to use pubkey

* Update twitter account item to use pubkey

* Include label for pubkey in profile detail item

* Decrease size of profile detail item

* Update frontend build

* Improve logging of requests in handler
2021-12-20 09:28:38 -08:00
Jonathan Zernik
0a5d0d1d10
Remove profile custom price (#1807)
* Remove custom price from profile

* Remove profile custom price from frontend

* Update frontend build
2021-11-19 00:04:07 -08:00
Jonathan Zernik
488ed5dfc4
Add global sell price setting (#1791)
* Add sell price setting to db

* Add rpc method for set and get sell price setting

* Fix servicer methods for get and set sell price

* Add settings page in frontend

* Include default sell price in get sell price rpc

* Show sell price in settings page

* Got set sell price working in frontend

* Remove frontend validation of sell price dialog

* Use sell price from settings when determining price

* Add rpc to clear sell price setting

* Add clear sell price to frontend

* Remove unused imports in frontend

* Update frontend build
2021-11-10 01:53:55 -08:00
Jonathan Zernik
6c40891ad8
Add twitter forwarder (#1755)
* Add twitter stream class

* Got twitter forwarder subscription working

* Add config table in db with twitter bearer token

* Only run forward tweets task when twitter bearer token and twitter handles are not null

* Add twitter page to frontend and add button to set bearer token

* Reload bearer token in ui after setting value

* Add twitter accounts table to db

* Got get twitter accounts request working

* Display twitter account list items in twitter page

* Show twitter accounts in twitter page

* Got create squeak from tweet working

* Update twitter stream upon twitter accounts changes

* Got terminate twitter stream connection working

* Update frontend build

* Remove print statements from itest

* Remove main function from twitter stream module

* Make tweet forwarder worker run as daemon thread

* Use custom config for subscribe tweets retry interval
2021-11-04 19:10:00 -07:00
Jonathan Zernik
79e59bdf97
Return download result in rpc responses for download commands (#1731)
* Return download result in rpc responses for download commands

* Remove commented sleep statements in itest
2021-10-26 01:46:18 -07:00
Jonathan Zernik
4ca835b2fb
Replace use_tor field with network in peer address (#1558)
* Replace use_tor field with network in peer address

* Got itest passing with network column in db.

* Got frontend working with network (ipv4 or torv3) configurable

* Fix go to peer address page navigation from sent payment and received payment
2021-10-10 21:00:56 -07:00
Jonathan Zernik
9f6307cbb3
Add rpc to get default peer port (#1556)
* Added get default peer port rpc command

* Use default port in connect peer dialog

* Got default port working on create peer dialog

* Got default port working in both connect peer and create peer.

* Remove default peer usage in create peer backend

* Remove default peer handling for connect peer in backend

* Reset port back to empty when use custom is checked or unchecked.
2021-10-10 00:30:27 -07:00
Jonathan Zernik
12f7b62349
Add toggle for connect with tor (#1550)
* Added use_tor option to peer address class and grpc message

* Got itest passing without tor

* Got peer connection working in UI with tor toggle

* Able to connect to with and without tor

* Got save peer working with tor and without tor

* Add use_tor field to peer address everywhere.

* Fix usage of useMemo in peer address page
2021-10-09 22:26:54 -07:00
Jonathan Zernik
6aae503de8
Create lightning client base class (#1542)
* Add unit test for add invoice in test lnd lightning client

* Add new create invoice method of lightning client and add unit test
2021-10-08 20:40:58 -07:00
Jonathan Zernik
411f050c93
Got itest working with lnd using tor for both listen and connect (#1495)
* Got itest working with lnd using tor for both listen and connect

* Got itest working with configurable target address for lnd tor config

* Update development doc with tor service in background services
2021-10-04 18:33:16 -07:00
Jonathan Zernik
ed13f363f7
Remove unused bxor function (#1462) 2021-10-01 21:37:10 -07:00
Jonathan Zernik
38a7a1af87
Got itest working for text search (#1287)
* Got itest working for text search

* Use util function to get search results in itest
2021-09-14 20:47:11 -07:00
Jonathan Zernik
5e561e6ec2
Implemented get external address rpc method (#1236)
* Implemented get external address rpc method

* Display external address on peers page in frontend

* Update frontend build
2021-09-08 20:15:32 -07:00
Jonathan Zernik
408ec42340
Implement download squeaks rpc (#1168)
* Implement download squeaks rpc

* Handle replyto hash in download squeaks method
2021-09-03 10:45:00 -07:00
Jonathan Zernik
e2933784ac
Use only ancestors rpc for squeak page (#1118)
* Got squeak page working without get squeak entry rpc, no streaming yet

* Implement subscribe ancestors

* Got subscribe ancestors working in frontend with download squeak click

* Delete old comments

* Update frontend build

* Remove old log lines
2021-08-30 20:08:37 -07:00
Jonathan Zernik
c801060d35
Add subscribe address display squeaks (#1112)
* Implement rpc command for subscribe address squeak entires

* Got subscription working for address squeaks

* Implemented download squeaks for address rpc

* Fix handling new squeak items from subscription appending to state array

* Update frontend build
2021-08-30 02:43:44 -07:00
Jonathan Zernik
a0d78844da
Download squeaks with custom params (#1108)
* Add rpc method for subscribe squeak entry

* Download squeak without reloading page using squeak entry subscription

* Fix stream termination of component unmount for subscribe squeak entry

* Update frontend build
2021-08-29 22:39:10 -07:00
Jonathan Zernik
620cdae96c
Add license headers (#1080)
* Add pre-commit hook for license headers

* Configure pre-commit hook for license headers only for python

* Add license headers to python files
2021-08-27 18:31:53 -07:00
Jonathan Zernik
21246dd151
Rename sync squeaks to download squeaks (#1036)
* Rename download_squeaks rpc

* Fix proto definition comment

* Rename download_squeak rpc

* Fix proto definition comment
2021-08-23 00:16:36 -07:00
Jonathan Zernik
720a8a16f5
Improve itest with more util functions for rpc calls (#1014)
* Add itest for lookup squeak with getsqueaks method

* Simplify itest for download single squeak

* Use util function for get profile rpc method in itest

* Add more util methods for itest rpc calls

* Use util rpc function more in itest

* Add rpc util function for download squeaks

* Add rpc util function for create contact profile

* Add rpc util function for create signing profile

* Use rpc util function for create delete profile

* Use rpc util function for import profile
2021-08-21 20:28:52 -07:00
Jonathan Zernik
b9ac4b86b4
Use peer address struct in requests (#1004)
* Update connect peer and disconnect peer rpc to use peer addrss struct

* Update get connected peer rpc to use peer addrss struct

* Use peer address struct in create saved peer rpc

* Use peer address struct in squeak peer struct

* Use peer address for requests functions in frontend

* Update frontend build
2021-08-21 00:54:48 -07:00
Jonathan Zernik
f9197f7035
Remove uploading and downloading fields and add autoconnect field in … (#993)
* Remove uploading and downloading fields and add autoconnect field in all backend code

* Remove uploading and downloading fields and add autoconnect in frontend

* Update frontend build
2021-08-20 15:46:54 -07:00
Jonathan Zernik
99f3ff24c4
Add connected peers subscription (#970)
* Add connected peers subscription rpc command

* Got rpc streaming command for subscribe connected peers working
2021-08-19 19:59:14 -07:00
Jonathan Zernik
aab50fa287
Add peer address page (#927)
* Go to peer address page on connected peer item click

* Added disconnect button to peer address page

* Add get connected peer rpc method

* Add disconnect button to peer address page

* Add both connect and disconnect button to peer address page

* Update frontend build
2021-08-12 21:59:26 -07:00
Jonathan Zernik
e64289be7d
Use host port to connect peer (#926)
* Use host and port for connect_peer rpc command

* Use host and port for disconnect peer command

* Got connect peer dialog frontend working

* Add disconnect peer request frontend function

* Update frontend build
2021-08-12 19:53:25 -07:00
Jonathan Zernik
fef9625592
Got itest working (#904) 2021-08-10 20:57:59 -07:00
Jonathan Zernik
7d266cdf5e
Split peer server client (#901)
* Split peer server and peer client

* Got itest passing

* Catch exception when closing peer socket

* Reconfigure all itests to run
2021-08-10 02:16:46 -07:00
Jonathan Zernik
f652915355
Use tcp peer connection (#900)
* Got basic tcp connection working

* Got passing itest for open tcp connection

* Got most of protocol working. still need to send offer correctly

* Got offer from peer over tcp connectrion

* Got single squeak download working on tcp connection

* Remove rpc peer client

* Remove old rpc clients

* Remove old squeak client modules

* Got sharesqueaks peer message working

* Remove peer rpc server

* Remove server rpc fixtures

* Remove old itests

* Remove old sync modules

* Run worker background task to keep peers synced

* Add peer connection worker

* Add test for disconnect peer

* Remove old itest util

* Delete old peer rpc client helpers.

* Handle insert duplicate received offer

* Use more specific exception handling for duplicate offer insert
2021-07-09 21:07:46 -07:00
Jonathan Zernik
387aa13893
Use autoincrement for primary keys (#788)
* Change db model to use bigint with autoincrement

* Add constraint on host and port in peer table

* Use autoincrement in database model
2021-02-06 01:24:31 -08:00
Jonathan Zernik
627acea07c
Add custom profile image (#745)
* Add profile image field to db

* Add set profile image rpc

* Got clear profile image working

* Add has custom profile image field in profile rpc respones
2021-01-29 01:27:59 -08:00
Jonathan Zernik
5572ee07d0
Use bytes for server proto (#626)
* Use bytes for squeak_hash in getsqueak method

* Use bytes for squeak hash in get offer rpc

* Use bytes for hash field in squeak message in proto

* Use bytes for hashes in lookup response

* Remove old commented code

* Use bytes for squeak hash in peer client post

* Remove old comments
2021-01-12 19:13:40 -08:00
Jonathan Zernik
22f6b4fc3c
Add precommit hooks (#526) 2020-12-28 23:52:32 -08:00
Jonathan Zernik
293cbc4db5
Got all flake8 checks passing (#514)
* Got all flake8 checks passing

* Remove reorder imports from codecheck tox env
2020-12-26 04:56:46 -08:00
Jonathan Zernik
62f21874f1
Autoformat python code with tox command (#510) 2020-12-26 02:01:22 -08:00
Jonathan Zernik
00fc72514f
Use squeaklib with ptlc (#502)
* Rename secret_key

* More work to convert to using PTLC

* Updated most code for PTLC

* More work to use ptlc with secret key

* Got itest passing

* Remove unused import

* Use version 0.5.0 of squeaklib

* Added simple unit test for squeak controller

* Use modular addition subtraction for secret key nonce tweak

* Move util to core folder

* Store secret key as hex in database

* Store nonce as hex in db
2020-12-25 20:17:54 -08:00
Jonathan Zernik
ab3284dafc
Use hex string for squeak hash everywhere (#384)
* Use hex string for squeak hash everywhere

* Fix squeak hash in post squeak method
2020-11-05 12:54:59 -05: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
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
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
Jonathan Zernik
8d1bb513ac
Run codeformat with tox (#258) 2020-09-26 01:51:41 -07:00
Jonathan Zernik
b88dce6146
Move main module (#252)
* Move main module out of server folder

* Check which database is used to load engine

* Remove imported lnd proto modules in lightning client
2020-08-20 00:34:14 -07:00
Jonathan Zernik
a3cd29f430
Run codeformat (#184) 2020-07-31 16:47:17 -07:00
Jonathan Zernik
f10816df4a
Split itests (#162)
* Factor out util functions from itest

* Split up itest into two tests

* Create separate itest for rate limit

* Add itest for reply squeaks and ancestors request

* Add separate itest for create profiles

* Make separate itest for create contact profile

* Use fixtures for stubs in itest

* Use fixtures for all itests

* Use fixture for lightning client
2020-07-28 22:43:30 -07:00