Commit graph

172 commits

Author SHA1 Message Date
Jonathan Zernik
555d6eea61
Add get payment summary rpc (#704)
* Get received payment summary rpc

* Rename get received payment summary function

* Get sent payment summary in rpc

* Add itest case for sent payment summary

* Add web endpoint for get payment summary

* Remove old fields from received payment summary
2021-01-25 21:06:48 -08:00
Jonathan Zernik
af7de6483a
Add rename peer rpc method (#683)
* Add rename peer rpc method

* Add web endpoint for rename peer
2021-01-24 17:41:53 -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
edc2d4175b
Fix sync single squeak (#676) 2021-01-22 22:00:20 -08:00
Jonathan Zernik
dbff72ec57
Add replies display rpc method (#674)
* Add get replies display entries rpc method

* Add assertion for get replies test case

* Show replies in squeak page

* Show replies in frontend
2021-01-22 18:32:05 -08:00
Jonathan Zernik
0bb54f1958
Use time_s for payment times (#673)
* Use time_s for payment times

* Update static build
2021-01-21 22:21:38 -08:00
Jonathan Zernik
5d31ca3689
Add valid column to sent payment table (#670)
* Add valid column to sent payment table

* Show valid field in sent payments frontend
2021-01-21 20:18:04 -08:00
Jonathan Zernik
dc04f75160
Add import signing profile (#666)
* Add rpc method to import signing profile

* Got import signing profile working
2021-01-20 12:44:04 -08:00
Jonathan Zernik
4b0f3bc637
Add rpc method to get private key (#664)
* Add rpc method to get private key

* Add export private key to frontend
2021-01-20 11:41:02 -08:00
Jonathan Zernik
4ad3232325
Rename get post squeak rpc methods (#659)
* Rename download squeak rpc method

* Fix name of upload squeak rpc method

* Rename download squeak rpc method

* Rename download offer peer rpc method

* Fix comments in peer rpc server proto

* Rename methods in peer client.
2021-01-14 21:32:55 -08:00
Jonathan Zernik
1d4baaa5fa
Redo peer protocol (#658)
* Add lookup squeaks to download peer rpc method

* Added peer rpc method for lookup squeaks to upload

* Got itest passing with new peer rpc

* Fix upload lookup method in peer server servicer
2021-01-14 20:38:38 -08:00
Jonathan Zernik
41278868bd
Create base class network sync (#639)
* itest passing with refactored peer sync

* Fix query for downloading peers

* Delete old network sync

* Revert "Delete old network sync"

This reverts commit 91d5620129.

* Delete old network sync
2021-01-13 17:41:50 -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
1414c2163f
Delete sent offer and received offer after payment (#601)
* Delete sent offer and received offer after payment

* Fix itest for deleted offers after payment
2021-01-11 11:34:49 -08:00
Jonathan Zernik
138ef7d984
Add squeak core module (#587)
* Add squeak_core module

* Remove unused import

* Delete squeakblockverifier

* Use squeak_core to make squeak

* Remove blockchain client from controller

* Move create offer method to squeak core

* Add some type hints

* Move get buy offer method to squeak_core

* Delete commented old get buy offer block

* Add pay_offer to squeak_core

* Add get received payments generator function to squak core

* Add get_offer method to squeak_core

* Remove lightning_client property from peer_task

* Remove old comments from payment verifier class

* Use bytes internally for payment_hash

* Represent secret_key as bytes internally
2021-01-10 09:31:41 -08:00
Jonathan Zernik
cede35ed55
Fix serialization of payment hash db (#579)
* Use postgres for db in itest

* Fix serialization of payment hash in db tables
2021-01-08 00:48:16 -08:00
Jonathan Zernik
c984d41bcc
Use type hints for controller methods, and use bytes internally for s… (#578)
* Use type hints for controller methods, and use bytes internally for squeak hash

* Change internal representation of squeak_hash to bytes
2021-01-07 23:32:14 -08:00
Jonathan Zernik
a57021ab0c
Use typed config (#566)
* Use typed config

* Use typed config

* Got bitcoin connection working in main config

* Use better defaults for lnd configs

* Got test working for get network using config fixture

* Use sqk_dir_path instead of sqk_dir

* Add logging of bitcoin configs

* Don't use config option when config file doesn't exist
2021-01-05 23:39:04 -08:00
Jonathan Zernik
59c73c85b3
Add get network rpc method (#563) 2021-01-05 14:37:20 -08:00
Jonathan Zernik
6e42663c12
Add sync package (#543)
* Move network sync modules to new sync package

* Run sync worker thread from main module

* Got sync worker working in admin handler

* Use squeak_controller in sync_controller

* Use squeak_controller in peer task

* Remove old commented args replaced by squeak_controller

* Use squeak_controller method to get best block height

* Improve constructor for network sync task

* Improve constructor for network sync task
2021-01-02 05:46:49 -08:00
Jonathan Zernik
b2766f5ab0
Add admin rpc enabled config (#535)
* Add config to enable admin rpc server

* Allow squeaknode to run on mainnet

* Clean up main module more

* Clean up configs in main module more
2020-12-31 19:49:26 -08:00
Jonathan Zernik
98d9b5a87d
Make dockerfile run with cmd (#529)
* Add cmd to dockerfile

* Remove waiting for cert file in start script

* Output docker container dirs before starting script

* Remove failing ls line

* Add lnd tls cert path and macaroon path env vars

* Add env vars for webadmin congis
2020-12-31 00:05:20 -08:00
Jonathan Zernik
9b14c8016b
Package for umbrel (#528)
* Switch dockerfile base image to buster

* Try to make build work for umbrel

* Remove libs from Dockerfile

* Add build-essential to dockerfile

* Make sqk_dir configurable with environment variable

* Use new env var names
2020-12-30 16:46:48 -08:00
Jonathan Zernik
22f6b4fc3c
Add precommit hooks (#526) 2020-12-28 23:52:32 -08:00
Jonathan Zernik
34ec5deee8
Use python slim docker base image (#516)
* Use python slim image for both squeaknode and test

* Clean up dockerfiles

* Reorder dockerfile for squeaknode

* Load alembic config file from packaged module

* Alembic directory is now loaded from packaged module

* Got multi-stage docker build working

* Removed old app directory from docker config

* Remove commented package data arg from setup.py

* Remove unused alembic graft from manifest

* Fix extra space in alembic revision
2020-12-27 04:59:59 -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
c62d4229cf
Remove btcd cert shared volume (#486)
* Remove shared volume for btcd cert file

* Got ssl cert working as a config

* Remove old comment about adding ssl certificate in dockerfile
2020-11-24 01:18:53 -05:00
Jonathan Zernik
a43576a10e
Use bitcoincore for bitcoin node (#481)
* Got docker-compose working with bitcoin-core

* Got itest working

* Add bitcoin use_ssl config

* Rename service to bitcoin-core in docker-compose
2020-11-23 14:43:17 -05:00
Jonathan Zernik
d25a56ccb1
Subscribe received payments (#471)
* Got subscribe received payments working

* Add test for subscribe received payments
2020-11-21 03:30:45 -05:00
Jonathan Zernik
c5e5889135
Rename get timeline squeak displays (#469)
* Rename get timeline squeak displays and don't filter for following

* Update static build
2020-11-20 23:26:14 -05:00
Jonathan Zernik
0c072ae470
Include client_addr in sent_offer and received_payment tables (#458) 2020-11-13 04:29:20 -05:00
Jonathan Zernik
4e17c4611d
Make fields nullable false in models (#456) 2020-11-13 00:42:28 -05:00
Jonathan Zernik
2c8d6e0df5
Fix timestamp in get received payments (#453)
* Fix timestamp in get received payment rpc

* Update static build

* Fix proto numbering of received payment

* Include log line with returned received payments

* Lg the received payments reply

* Lg received payments reply list

* Lg received payments reply list

* Fix received payment component

* Remove log lines from frontend

* Remove log lines for received payment
2020-11-12 14:04:28 -05:00
Jonathan Zernik
1d68e0b569
Add sent offer table (#451)
* Rename received payments to sent offers

* Add received payments table

* Add get received payments rpc method

* Rename old received payment to sent offer in frontend

* Add received payment frontend component

* Improve logging of error in admin web request
2020-11-12 04:02:28 -05:00
Jonathan Zernik
2f8d718518
Add received payments worker (#450)
* Got subscribe invoices worker working

* Improve error message in lnd invoice worker

* Only mark received payments if paid if the invoice is settled

* Check if invoice is settled before marking received payment as paid

* Pass settle index as param to mark paid db method

* Add migration to include settle_index in sent payments table

* Got latest settle index query working, I think

* Only return received payments that are already paid in db query

* Remove unused column from get latest settle index query

* Update static build
2020-11-11 22:02:26 -05:00
Jonathan Zernik
0dde62bf46
Add received payments table and get it in rpc method (#443) 2020-11-11 03:04:09 -05:00
Jonathan Zernik
b1d8d133e6
Show time in sent payment (#431)
* Get time field in sent payment rpc

* Show sent payment time in frontend
2020-11-10 15:55:26 -05:00
Jonathan Zernik
6641e64995
Use msat as price unit (#427)
* Use price_msat for config and internally

* Use price_msat in admin protocol for offer message

* Use price_msat in sent payments table and protocol

* Update frontend to use new protocol with price_msat for offer

* Update static build
2020-11-10 02:35:24 -05:00
Jonathan Zernik
0a50a377e0
Add get profile by name rpc method (#415) 2020-11-08 12:09:46 -05:00
Jonathan Zernik
ba5ab85163
Add unique constraints for profile name and address (#414) 2020-11-08 11:32:07 -05:00
Jonathan Zernik
12a8ddc88f
Add squeak detail page (#412)
* Created squeak detail page

* Add get squeak details rpc method

* Got squeak serialized data to show

* Put style back

* Show raw squeak data in text field

* Show hash in squeak details page

* Include link to zoom in to squeak detail page from squeak page

* Update static build and frontend makefile
2020-11-07 22:19:24 -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
724f72f1e5
Use more config defaults (#376)
* Use default configs for webadmin

* Remove sqlite config from config file

* Use default config for sqk dir

* Use derived default lnd tls cert path in config

* Use default config for macaroon path

* Remove macaroon path config from docker config.ini

* Got mainnet working in docker

* Update readme

* Remove unused network param in docker config.ini file

* Update readme
2020-11-04 23:18:04 -05:00
Jonathan Zernik
225cd7fdf1
Use better config defaults (#375)
* Use default ports for bitcoin rpc

* Use default configs for lnd ports

* Use default configs for server host/port and admin host/port
2020-11-04 21:24:04 -05:00
Jonathan Zernik
611e13c07f
New config class (#374)
* Create new config class

* Load lnd configs from new config class

* Use new config class for server and webadmin

* Use new config for webadmin

* Fix boolean configs for webadmin

* Use new config class for squeaknode configs

* Use new config for postgresql configs

* Use configparser get method for all configs

* Remove old configparser from main module
2020-11-04 19:06:49 -05:00
Jonathan Zernik
d73b40c4c3
Rename getoffer rpc method (#373) 2020-11-04 07:19:39 -05:00