Commit graph

210 commits

Author SHA1 Message Date
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
ac3279c532
Improve node init (#1940)
* Eliminate squeak params from controller and network manager

* Separate instantiation from initialization of objects in node class
2022-02-13 03:23:11 -08:00
Jonathan Zernik
d347534b55
Display private squeaks (#1914)
* Update squeak display entry in proto for private squeaks

* Add select private message recipient in make squeak dialog

* Show recipient of private squeak in squeak thread item

* Use squeak content str is null to determine background color of squeak component

* Update frontend build

* Refactor private squeak indicator to separate component

* Remove old comments

* Got private message recipient indicator working in thread item and detail item

* Add decrypt squeak dialog

* Got button showing for unlocked but encrypted squeak

* Show lock icon for squeak thread item when unlocked but still encypted

* Comment out get secret key method of controller

* Add rpc method for decrypt squeak content

* Got decrypt content working with recipient private key

* Update frontend build
2021-12-28 18:40:09 -08: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
75d0b0634d
Split save secret key and unlock content methods (#1909)
* Split save secret key and unlock content methods of squeak store

* Unlock squeak content automatically after saving private key when squeak is not private
2021-12-27 21:13:56 -08:00
Jonathan Zernik
aef9afda61
Split set secret key and set decrypted content into separate methods of squeak db class (#1908) 2021-12-27 19:53:35 -08:00
Jonathan Zernik
e827db2ef7
Refactor unlock squeak method of squeak store (#1907) 2021-12-27 19:28:14 -08:00
Jonathan Zernik
9a2d37edb6
Add more tests for squeak store (#1905)
* Use mock db for tests in squeak store

* Add assertion about event listener call in save squeak test

* Add test for save squeak when max squeaks is exceeded

* Add test for save squeak when max squeaks per pubkey per block is exceeded
2021-12-27 17:56:05 -08:00
Jonathan Zernik
d2e61a02f4
Validate squeak against blockchain inside squeak store class (#1902) 2021-12-27 17:00:03 -08:00
Jonathan Zernik
e6e59bb3fb
Include block header in make squeak method (#1900)
* Update make squeak method to include block header in return value

* Remove type hint from make squeak in twitter forwarder
2021-12-27 14:17:12 -08:00
Jonathan Zernik
cf64664a44
Update squeaklib to support private messages (#1898)
* 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

* Got itest passing with refactored squeak_store

* Remove unused config from squeak store class
2021-12-27 01:15:05 -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
1a159a5f10
Fix max squeaks per public key per block height config (#1896) 2021-12-26 10:08:00 -08:00
Jonathan Zernik
0ecb73fac3
Update squeaklib and use new msg type (#1894)
* Use updated squeaklib with offer msg removed

* Bump squeaklib version and use methods to check if message has offer
2021-12-25 19:47:07 -08:00
Jonathan Zernik
b5801097b8
Implement squeak store v3 (#1886)
* Add test for insert squeak in squeak store

* Add test for delete squeak in squeak store

* Add test for save and get sent offer

* Add test for get received offer in squeak store

* Add subscription methods for squeak store

* Use squeak store in squeak controller

* Use squeak store for save squeak method in controller

* Use squeak store for unlock squeak method in controller

* Add comment to make squeak method

* Use squeak_store for more methods in controller

* Use squeak_store for price policy in controller

* Use squeak_store for create signing profile in controller

* Use squeak_store for more profile methods in controller

* Use squeak_store for more profile methods in controller

* Use squeak_store for create peer method in controller

* Use squeak_store for more peer methods in controller

* Use squeak_store for pay offer method in controller

* Use squeak_store for get sent payments and received payments method in controller

* Use squeak_store for get received offers method in controller

* Use squeak store for delete expired offers method

* Use squeak store for get squeak entries methods

* Use squeak store for save received offer method of controller

* Use squeak store for get followed public keys method of controller

* Use squeak store for reprocess received payments method of controller

* Use squeak store for delete old squeaks method of controller

* Use squeak store for like and unlike squeak method of controller

* Use squeak store for get connected peers method of controller

* Use squeak store for add and remove twitter account methods of controller

* Remove squeak_db param from controller constructor

* Use squeak core in squeak store for save squeak andunlock squeak

* Use squeak core in squeak store for make and get sent offer

* Remove old comments

* Remove more old comments

* Use squeak core in squeak store for save received offer

* Use squeak core in squeak store for pay received offer

* Use squeak core in squeak store for get interested struct

* Update twitter forwarder to use squeak store instead of squeak controller

* Update squeak deletion worker to use squeak store instead of squeak controller

* Delete old comments with lines about squeak controller

* Update squeak forwarder worker to use squeak store instead of squeak controller

* Update squeak secret key forwarder worker to use squeak store instead of squeak controller

* Update delete expired offers worker to use squeak store instead of squeak controller

* Update peer subscription workers to use squeak store instead of squeak controller

* Update peer autoconnect worker to use squeak store instead of squeak controller

* Remove usage of squeak controller in download manager start method.

* Add network handler class

* Remove unused constructor params from network handler

* Remove old comments
2021-12-25 09:47:55 -08:00
Jonathan Zernik
c2aeb344bc
Implement node settings (#1884)
* Implement node settings class

* Fix price policy for zero price

* Remove old comment

* Remove old comments

* Remove old comments
2021-12-23 08:33:40 -08:00
Jonathan Zernik
9f0d5e4097
Include bearer token in twitter account (#1881)
* Got twitter forwarder working with bearer token in twitter accounts table

* Update frontend to use bearer token in twitter account

* Update frontend build
2021-12-22 16:10:03 -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
ed9cf92ccc
Use custom class for get secret key reply to peer (#1831)
* Use custom class for get secret key reply to peer

* Update connection class to use secret key reply

* Rename get secret key reply method
2021-11-29 01:56:57 -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
de2f84e6f8
Use polymorphic class for downloaded object (#1787) 2021-11-07 18:50:27 -08:00
Jonathan Zernik
c96f7c7f7f
Add price policy class to determine sell price (#1785) 2021-11-07 04:40:17 -08:00
Jonathan Zernik
c0141effcb
Implement share for free with saved peer (#1782)
* Add share_for_free column to peer table in db and to core struct

* Got set share for free toggle working in frontend

* Got share for free working with price zero in controller
2021-11-07 02:21:13 -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
a8745d0dbd
Add test for download result to message (#1739) 2021-10-26 21:46:35 -07:00
Jonathan Zernik
8daeee2717
Return immediately from download when zero connected peers (#1733) 2021-10-26 15:27:06 -07:00
Jonathan Zernik
00eb68cf72
Add test for is interested for download interest (#1728) 2021-10-25 16:49:25 -07:00
Jonathan Zernik
635dff92ac
Fix shutdown threadpool in download manager (#1727)
* Fix shutdown threadpool in download manager

* Call event.wait with timeout value so it stops eventually

* Cancel all running downloads when download manager shuts down
2021-10-25 16:24:19 -07:00
Jonathan Zernik
dbc6c31381
Make download async (#1725)
* Use active download class for explicit downloads

* Delete old temporary interest manager and expiringdict dependency

* Delete old comments related to temporary interest manager

* Add log line after successful download single squeak

* Add unit test for mark download complete

* Add unit test for wait for stop method of download

* Add test for download hash not interested

* Add test for get download result

* Add test for initiate download for hash download

* Add test for initiate download for interest download

* Rename interest download

* Remove commented old method

* Remove another comment from active download

* Use limit 1 for hash download

* Rename wait for complete method of download
2021-10-25 14:48:12 -07:00
Jonathan Zernik
0b1f0a9257
Use custom db error when db init fails (#1720) 2021-10-24 16:53:39 -07:00
Jonathan Zernik
583d076394
Use payment hash as parameter for set received offer paid (#1718) 2021-10-24 16:19:23 -07:00
Jonathan Zernik
b2d5326d34
Delete received offers when out of configured retention from download time (#1708) 2021-10-23 09:34:21 -07:00
Jonathan Zernik
dea903e98e
Add tests for get received payment summary and get sent payment summary (#1705) 2021-10-23 09:04:20 -07:00
Jonathan Zernik
cb0a5971ec
Add test for get latest settle index and clear settle indexes (#1704) 2021-10-23 08:51:23 -07:00
Jonathan Zernik
dca65ede97
Add test for yield received payments from settle index (#1703) 2021-10-23 08:38:44 -07:00
Jonathan Zernik
d0754d27a3
Add test for duplicate inserted received payment db method (#1702) 2021-10-23 08:24:58 -07:00
Jonathan Zernik
773b38de2f
Add test for get multiple received payments db method (#1700) 2021-10-23 08:16:09 -07:00
Jonathan Zernik
4c71be584a
Add test for set sent offer paid (#1698)
* Add test for set sent offer paid

* Add test for set sent offer not paid
2021-10-23 00:26:04 -07:00
Jonathan Zernik
5d739bd4d0
Add tests for delete expired sent offers db method (#1696) 2021-10-22 23:24:44 -07:00
Jonathan Zernik
ee6e7ca1a9
Add test for get sent offers (#1695) 2021-10-22 23:04:40 -07:00
Jonathan Zernik
dc6cef8cff
Add test for get sent offer by squeak and peer (#1693) 2021-10-22 22:20:10 -07:00
Jonathan Zernik
76e1bd29cc
Add test for get sent offer by payment hash missing (#1692) 2021-10-22 19:02:04 -07:00
Jonathan Zernik
74222b9a62
Add test for get sent offer by payment hash (#1691) 2021-10-22 18:56:07 -07:00
Jonathan Zernik
a14cbb4663
Add test for get sent payment with non existent id (#1690) 2021-10-22 18:41:33 -07:00
Jonathan Zernik
a9c97c5df7
Add test for get inserted sent payments (#1689) 2021-10-22 18:36:47 -07:00
Jonathan Zernik
cc1a2c0a2b
Add test for get inserted sent payment db method (#1685) 2021-10-22 18:03:18 -07:00
Jonathan Zernik
3fc34c8965
Add test for set received offer paid db method (#1678) 2021-10-22 17:16:37 -07:00
Jonathan Zernik
faa7a9513a
Add test for delete expired received offers (#1672) 2021-10-22 16:01:52 -07:00