Commit graph

71 commits

Author SHA1 Message Date
Jonathan Zernik
afd3af091a
Use default peer port config when port not specified (#2218) 2022-05-24 21:41:56 -07:00
Jonathan Zernik
ed360ff3d1
Add clightning backend support (#2205)
* Add c-lightning support

* Got subscribe paid invoices working with c-lightning

* Remove log lines

* Use a single config section for all lightning configs

* Fix itest config

* Update configuration doc with new confis
2022-05-08 12:41:44 -07:00
Jonathan Zernik
80155f1fb7
Fix exception handling in squeak_core payment subscription (#2204) 2022-05-06 18:31:11 -07:00
Jonathan Zernik
7658a4d95c
Upgrade squeaklib to v013 (#2165)
* Upgrade to squeaklib v0.13

* Allow different squeak types in server reponse

* Add core method for create resqueak.

* Add make resqueak method for squeak store

* Update db migration to include resqueak hash

* Add db method to insert and get resqueak

* Return resqueak as squeak entry in db query method

* Add RPC method for make resqueak

* Got make resqueak modal working in frontend

* Show different content for resqueak in frontend

* Show resqueaed squeak in display

* Show resqueak correctly

* Got resqueak display working on squeak card component

* Fix display for missing resqueaked squeak.

* Fix display for missing resqueaked squeak in squeak card.

* Got resqueak from squeak card working

* Fix prevent default action on resqueak unlock click

* Fix prevent default on make reply squeak in squeak card

* Got number of replies to resqueaked squeak working

* Fix click on squeak card

* Fix too many characters warning message

* Fix click on squeak card image and name and pubkey

* Rename set reply modal state function

* Fix toggle modals for resqueaked squeak

* Fix form submit action for squeak modals

* Include num resqueaks and num resqueaked resqueaks in get squeak entry db query

* Show number of resqueaks in frontend

* Fix distinct count in query for num replies and num resqueaks

* Update resqueaked squeak in slice state

* Update frontend build
2022-04-24 17:54:07 -07:00
Jonathan Zernik
964477ceb0
Delete interests module (#2073) 2022-03-29 18:55:49 -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
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
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
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
07bf467692
Add docstring and test for get_hash function (#1631) 2021-10-18 00:16:08 -07:00
Jonathan Zernik
fd6ad232e1
Add function to get private key from profile (#1619) 2021-10-16 19:35:24 -07:00
Jonathan Zernik
5a339605f3
Add fixture for offer to global conftest (#1601)
* Add fixture for offer to global conftest

* Remove old not none assertion
2021-10-15 17:02:53 -07:00
Jonathan Zernik
2a25ea6f1c
Add fixture for sent payment in global conftest (#1600) 2021-10-15 16:51:16 -07:00
Jonathan Zernik
d9e3053dbd
Add assertion for unpack offer with skip check payment point (#1598) 2021-10-14 23:48:23 -07:00
Jonathan Zernik
2ba722858b
Simplify unit test assertions for create offer (#1597) 2021-10-14 23:44:32 -07:00
Jonathan Zernik
84f7159d39
Add test for subscribe received payments (#1596)
* Add test for get received payments method of squeak core

* Add assertion on number of received payments in test.
2021-10-14 23:22:56 -07:00
Jonathan Zernik
d351613880
Add tests for squeak entry to message and profile to message (#1593)
* Add tests for squeak entry to message and profile to message

* Move fixtures for admin module to separate conftest

* Add test for peer to msg

* Use global fixture for peer_address in squeak core test

* Move common fixtures to global conftest

* Add fixture for received offer

* Add unit test for received offer to msg

* Add fixture for sent offer

* Rename received offer to msg function
2021-10-14 19:57:48 -07:00
Jonathan Zernik
efdcbdeaef
Add test for check payment point with success (#1591) 2021-10-12 21:17:21 -07:00
Jonathan Zernik
ee7ace8e8e
Add test for case when lnd getinfo has no uris (#1590) 2021-10-12 20:15:07 -07:00
Jonathan Zernik
535aa741e1
Combine reduntant tests for squeak core create offer (#1588) 2021-10-12 19:51:56 -07:00
Jonathan Zernik
0dcbeea7c4
Add assertions on sent payment attributes (#1587) 2021-10-12 19:39:18 -07:00
Jonathan Zernik
c7fa4ec47c
Add test for send payment with failure (#1586) 2021-10-12 19:29:21 -07:00
Jonathan Zernik
dd927036a5
Add block_info fixture to global conftest (#1584) 2021-10-12 19:00:44 -07:00
Jonathan Zernik
8a317baabd
Add test for create offer without nonce (#1583) 2021-10-12 17:24:36 -07:00
Jonathan Zernik
1e1e3738c9
Remove old comments from squeak core unit test (#1581) 2021-10-12 16:47:33 -07:00
Jonathan Zernik
fb3b7fcd3a
Add test for invalid block hash (#1580)
* Add test for invalid block hash in get block header method

* Add test for invalid squeak hash in unpack offer method

* Add assertions for exception messages in squeak core tests
2021-10-12 16:45:41 -07:00
Jonathan Zernik
3dcc2681d5
Simplify unit tests for interests (#1579) 2021-10-12 15:11:38 -07:00
Jonathan Zernik
bae8063c28
Add test for fail to make squeak with contact profile (#1578) 2021-10-12 14:45:14 -07:00
Jonathan Zernik
c48450598b
Add check for payment point in unpack offer (#1577)
* Add check for payment point in unpack offer

* Update TODO comment for enable checking payment point
2021-10-12 14:28:18 -07:00
Jonathan Zernik
f694123777
Remove secret key field of sent offer (#1568)
* Remove secret_key column from sent_offers db table

* Allow secret_key column to be null in downgrade migration

* Set default value of secret key for sent offer in db downgrade

* Remove comment from db downgrage function

* Try making downgrade for secret key column work

* Try formatting update op in downgrade function

* Try defining sent offers table inline in downgrade function

* Fix batch alter column in downgrade function
2021-10-12 00:29:21 -07:00
Jonathan Zernik
ace600f4c6
Added unit tests for generate nonce functions (#1564) 2021-10-11 18:59:48 -07:00
Jonathan Zernik
0f11eb4f99
Got outline of tests for squeak core methods (#1562)
* Got outline of tests for squeak core methods

* Split squeak core test fixtures into seller and buyer

* Add unit tests for decrypt content from sent payment in squeak core
2021-10-11 18:22:20 -07:00
Jonathan Zernik
f49874c1e6
Improve squeak core tests (#1560)
* Use fixture for block in mock bitcoin client

* Simplify unit test for make squeak method

* Simplify make squeak method even more

* Added unit test for create offer

* Add TODO comment for preimage fixture
2021-10-10 23:48:06 -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
2a55b44b97
Add get timeline squeak entries test (#1518)
* WIP: most of timeline db query test

* Got unit test for timeline query working with followed profile

* Remove old commented create signing profile function
2021-10-05 19:38:35 -07:00
Jonathan Zernik
9c599ee0e3
Add test util functions (#1515)
* Create test utils module for unit tests

* Improve squeak db unit tests using generated block header object

* Add assertion for block time in get squeak entry test
2021-10-05 15:28:25 -07:00
Jonathan Zernik
2e0fc25051
Got unit test working for insert and retrieve squeak in db (#1488) 2021-10-03 20:39:24 -07:00
Jonathan Zernik
1ede8b9468
Move create saved peer function to peers module (#1473) 2021-10-02 11:25:08 -07:00
Jonathan Zernik
e2bd6ae384
Add profiles module with unit tests (#1468) 2021-10-02 02:48:09 -07:00
Jonathan Zernik
f68d8628ea
Move secret key tweak functions to secret keys module (#1464) 2021-10-02 00:07:51 -07:00
Jonathan Zernik
77fda8114f
Create squeaks module (#1460)
* Create new squeaks module in core and add make squeak function

* Move get_hash function to squeaks module

* Add unit test for squeaks module

* Add check squeak function to squeaks module

* Add get decrypted content function to squeaks module

* Add function to get payment point in squeaks module

* Use conftest for fixtures in core directory

* Add test cases for squeak matches interest function

* Remove old comment in squeak core
2021-10-01 21:24:09 -07:00
Jonathan Zernik
62f5e332a8
Refactor core interest functions (#1449)
* Convert iterable to list in interest unit tests

* Refactor interests functions into separate module

* Simplify assertions in test interests unit tests
2021-09-30 21:59:55 -07:00
Jonathan Zernik
86088f4a9a
Use differential interests after updating subscribed interests (#1424) 2021-09-26 20:25:51 -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
26fced200d
Upgrade squeaklib to version 7 (#1188)
* Use newer version of squeaklib with decryption key outside squeak object

* Remove todo comment about clearing decryption key before insert squeak in db
2021-09-04 16:58:33 -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