Commit graph

168 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
fbc66c9813
Fix change profile name default (#2013)
* Fix default value for change profile name

* Partially fix set sell price dialog

* Fix itest in progress

* Fix get sell price
2022-03-17 23:24:50 -07:00
Jonathan Zernik
a8ba458fad
Fixed itests (#2014) 2022-03-17 22:48:13 -07:00
Jonathan Zernik
68e69e55c8
Use http for peer connection (#2002)
* Got basic web server running for peer

* Got squeak route and lookup route working

* Got secret key route working

* Got offer endpoint working

* Remove old comment

* Move peer server code to server subdir

* Create client subdir for peer client

* Return empty list for lookup when pubkeys is empty

* Add peer client and network controller class

* Remove old network code

* Remove old block subscription worker

* Remove network handler class

* Remove more old classes

* Add back twitter forwarder worker

* Remove download methods from controller

* Add websocket endpoint

* Add websocket subscribe method

* Add websocket client library

* Fetch squeaks from peer (slowly) on UI timeline load

* Fetch squeaks from peer (slowly) on UI pubkey squeaks load

* Got download squeaks working with HTTP requests

* Fixed external address method in controller

* Remove download pubkey squeak button and action

* Remove unused connection displays from peer ana peers page

* Fix 404 not found for offer endpoint

* Better handling of null cases in peer client downloader

* Simplify peer downloader

* Create subclass for range download

* Got single squeak download working

* Fix itest for get external address
2022-03-17 14:38:46 -07:00
Jonathan Zernik
4d349005d4
Simplify add peer UI (#1999)
* Remove non-null constraint on peer name

* Remove validation requiring non-empty name for peer

* Update database to use autoconnect true by default

* Remove connect peer button and modal from peers page

* Show saved peers tab by default in peers page

* Update frontend build
2022-03-15 17:38:18 -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
6233890e5b
Remove squeak detail include in squeak entry (#1837)
* Got squeak details dialog working without details rpc request

* Remove get squeak detail from rpc proto

* Update frontend build

* Remove old get squeak detail itest

* Remove unused fixture for squeak detail item
2021-11-30 22:25:43 -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
1658ea65fd
Do handshake in connection class, use queue for synchronous connect peer (#1370)
* Do handshake in connection class, use queue for synchronous connect peer

* Update handshake timer in connection class

* Initialize peer in connection manager

* Remove old comments in peer handler

* Remove unused local_address param from peer handler

* Remove old comment for sleep in itest

* Fix stop waiting indicator after peer connect fail
2021-09-20 20:53:44 -07:00
Jonathan Zernik
3df4ec3927
Got itest working for get peer by address (#1364) 2021-09-20 15:13:29 -07:00
Jonathan Zernik
ba7425d009
Include saved peer in connected peer rpc message (#1361)
* Use ConnecterPeer class for return type of controller methods

* Got itest working for include saved peer in get connected peers
2021-09-20 13:25:53 -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
220007e5ca
Show error on connect failure (#1281)
* Run connect peer method in peer client synchronously

* Got itest working for failed connect peer command
2021-09-13 18:56:58 -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
b2858d714b
Paginate received payments (#1234)
* Add pagination to get received payments rpc

* Add pagination to received payments frontend page

* Comment unused method used for streaming in timeline page

* Run frontend lint

* Update frontend build
2021-09-08 17:54:49 -07:00
Jonathan Zernik
dc524f80ec
Change create time sent payment to integer (#1221)
* Change created time in sent payment to milliseconds integer

* Change time field of sent payment rpc message to ms

* Update frontend for sent payment to get new milliseconds field

* Update frontend build

* Use milliseconds for received offer created time in database

* Use milliseconds for sent offer created time in database

* Change created time to milliseconds for received payment

* Update frontend to use milliseconds for received payment

* Update frontend to use milliseconds for peer and profile in database

* Change created time and liked time to milliseconds for squeak

* Remove use of datetime module from squeak db

* Fix get liked time in milliseconds in frontend

* Update frontend build

* Simplify squeak retention query
2021-09-07 21:14:17 -07:00
Jonathan Zernik
4b76ad832d
Add pagination for sent payments (#1220)
* Add pagination to get sent payments rpc method

* Got frontend mostly working for paginating sent payments

* Fix warning for missing arg in load sent payments effect

* Update frontend build
2021-09-07 09:26:34 -07:00
Jonathan Zernik
3402527f26
Add input for set custom price (#1214)
* Add rpc method for set profile custom sell price

* Got change profile custom price in frontend working

* Run frontend lint

* Update frontend build

* Got send offers with correct custom price working
2021-09-06 19:28:40 -07:00
Jonathan Zernik
b45a37081f
Include secret key invs in getsqueaks response (#1200)
* Refactor get local squeaks method in peer message handler

* Include invs for secret keys in reply to getsqueaks msg

* Handle invs for secret keys in handle inv method

* Got subscription itest working

* Change log level for new squeak worker and new secret key worker

* Got itest for subscription working even without slowing down mining

* Delete old commented lookup method in controller

* Use constants for inv types in new squeak worker and new secret key worker
2021-09-05 18:22:38 -07:00
Jonathan Zernik
c9b88ffd4a
Send secret key when profile configured to free (#1197)
* Set up itest for sending free secret key

* Got itest working for download and unlock free squeak

* Simplified getting offer or free secret key from controller

* Rename get offer method of controller
2021-09-05 14:38:52 -07:00
Jonathan Zernik
76ad744936
Updrage squeaklib to 0.7.1 (#1194)
* Updrage squeaklib to 0.7.1

* Add case to handle secret key msg in peer msg handler

* Add fields for custom price and use custom price to profile table

* Got itest working with new profile fields

* Use default values for profile struct constructor

* Fix db migration to use use profile columns

* Got itest passing for set use custom price

* Show custom price or default price in profile page

* Change wording of selling with price in profile page

* Got set use custom price toggle working in configure profile dialog
2021-09-05 12:30:58 -07:00
Jonathan Zernik
cb10b2f6c4
Add pagination for replies (#1174)
* Implement pagination for get reply squeaks

* Got replies pagination working

* Remove log lines from requests js

* Update frontend build
2021-09-03 18:56:14 -07:00
Jonathan Zernik
fd9a75b417
Add pagination to get address squeaks rpc (#1173)
* Add pagination to get address squeaks rpc

* Implement frontend pagination for address squeaks page

* Got pagination working on address squeaks page

* Update frontend build

* Run frontend lint

* Update frontend build
2021-09-03 17:00:38 -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
a0129558d4
Implement block subscription client (#1141)
* Got block subscription working in background thread

* Use separate port for hashblock zeromq subscription

* Update subscription on new block

* Enable checking for block range in interest match function

* Remove unused zmq subscriptions

* Fix squeak interest match function
2021-09-01 06:06:11 -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
0a8d30d5fc
Add pagination (#1073)
* Got tuple comparison for timeline pagination query working

* Include limit parameter in get timeline rpc

* Got view more squeaks frontend button working

* Got basic pagination working

* Include squeak time in display rpc struct

* Got pagination working

* Fix sql query to break ties manually in comparison

* Update frontend build
2021-08-27 05:31:37 -07:00
Jonathan Zernik
e78c2560bb
Make reply to hash nullable (#1057)
* Make reply to hash column nullable

* Add itest for null reply_to field
2021-08-24 17:39:49 -07:00
Jonathan Zernik
dd4ddabb5a
Load squeak display entry without deserializing squeak object (#1052)
* Load squeak display entry without deserializing squeak object

* Use block time column instead of block header in squeak table

* Include block time in squeak display response
2021-08-24 05:09:00 -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
9023131112
Add subscribe msg (#1016)
* Added subscribe message and send after connection handshake

* Added new squeak worker

* Got itest working for subscribe squeaks peer message

* Update peer squeak subscriptions on follow profile changed.

* Remove sync squeaks worker
2021-08-22 01:46:05 -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