Commit graph

40 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
04f4c9f5a1
Return null values in admin proto (#936)
* Use null value for non existent squeak

* Return null value in rpc for get profile when not found

* Return null value in rpc for get peer when not found

* Return null value in rpc for get profile by name when not found

* Return null value in rpc for get profile by address when not found

* Return null value in rpc for get offer and sent payment when not found
2021-08-14 18:52:17 -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
c8072a0c25
Tear down itest fixtures after yield (#789) 2021-02-06 01:40:25 -08: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
yzernik
aaf6ae975d Revert changes to use natural primary keys 2021-02-04 03:15:02 -08:00
Jonathan Zernik
64cf97dfe9
Try changing peer primary key to hash, not done (#782)
* Try changing peer primary key to hash, not done

* Got backend working with peer hash as primary key

* Got frontend working with peer hash as primary key for peer
2021-02-04 00:09:58 -08:00
yzernik
ebd61823aa Revert back the revert to use address for profile primary key 2021-02-03 20:53:00 -08:00
Jonathan Zernik
855d357ca4
Revert to using integer primary key for profile table (#783) 2021-02-03 01:42:47 -08:00
Jonathan Zernik
7c5734bd86
Use addresss for profile primary key (#779)
* Use address as primary key for profile table

* Delete old sql query comments

* Update frontend to use address for profile primary key

* Fix profiles page data table goto action

* Fix usage of get profile by address in remaining frontend
2021-02-02 20:54:11 -08:00
Jonathan Zernik
7a6a9477ee
Use default name when empty (#774)
* Disallow empty name for contact profile

* Disallow empty name for signing profile

* Disallow empty name for peer
2021-01-31 23:34:42 -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
83c0b295e9
Add rename profile rpc method (#682)
* Add rpc method to rename profile

* Add web endpoint for rename profile
2021-01-24 16:53:09 -08:00
Jonathan Zernik
22f6b4fc3c
Add precommit hooks (#526) 2020-12-28 23:52:32 -08:00
Jonathan Zernik
ba5ab85163
Add unique constraints for profile name and address (#414) 2020-11-08 11:32:07 -05:00
Jonathan Zernik
b29a8ca8ea
Remove whitelisted attribute, use following to build whitelist (#386)
* Remove whitelisted attribute, use following to build whitelist

* Fix update whitelist on set profile following method

* Remove whitelist feature toggle from fronted

* Update frontend build
2020-11-05 14:12:23 -05: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
8c4db6f85a
Rename squeaknode docker container (#377) 2020-11-04 23:35:32 -05: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
8d1bb513ac
Run codeformat with tox (#258) 2020-09-26 01:51:41 -07:00
Jonathan Zernik
2486a05d60
Rename subscription to peer (#212)
* Rename subscription to peer

* Rename subscribed to downloading

* Rename publishing to uploading

* Rename subcription to peer in frontend
2020-08-03 04:20:05 -07:00
Jonathan Zernik
3c1d7aca36
Add set subscribed rpc method (#197)
* Add set subscribed rpc method

* Add set publishing rpc method
2020-08-01 16:51:23 -07:00
Jonathan Zernik
a3cd29f430
Run codeformat (#184) 2020-07-31 16:47:17 -07:00
Jonathan Zernik
80713c94ea
Use network config from config file to set paramas (#182) 2020-07-31 03:06:10 -07:00
yzernik
06eb835103 Add fixture for contact profile 2020-07-29 04:33:05 -07:00
Jonathan Zernik
bda3afcbd8
Add itests for post squeak (#166)
* Add itests cases for post squeak for success and failutre from non whitelisted key

* Use fixture for saved squeak hash in buy squeak est

* Clean up buy squeak test
2020-07-29 04:16:09 -07:00
Jonathan Zernik
5f734ff142
Fix whitelist refresh (#165)
* Fix refreshing whitelist when it changes, and fix the itest

* Use fixture to get whitelisted signing key.
2020-07-29 02:57:23 -07:00
yzernik
d3baa6de86 Rename fixture to set network params in itest 2020-07-28 23:05:48 -07:00
yzernik
2f206d5c96 Set network params in itest in setup fixture 2020-07-28 23:00:05 -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