2020-10-29 14:35:17 -04:00
# squeaknode
2020-07-02 21:18:10 -07:00
2021-12-29 16:12:28 -08:00
[](https://github.com/squeaknode/squeaknode/releases)
2022-02-28 18:19:25 -08:00
[](https://github.com/squeaknode/squeaknode/actions/workflows/ci.yml)
2021-12-27 17:22:34 -08:00
[](https://codecov.io/gh/squeaknode/squeaknode)
[](https://gitter.im/squeaknode/squeaknode?utm_source=badge& utm_medium=badge& utm_campaign=pr-badge& utm_content=badge)
2021-10-01 23:18:23 +01:00
2021-11-08 05:08:08 -08:00
A peer-to-peer status feed with posts unlocked by Lightning.
2022-04-05 00:57:01 -07:00

2022-02-23 17:26:19 -08:00
2021-11-08 05:08:08 -08:00
Squeaknode allows you to create, view, buy, and sell squeaks.
2022-04-26 19:39:38 -07:00
A squeak is an immutable, signed structure that:
2022-04-03 22:55:20 -07:00
* contains up to 280 utf-8 characters of text, encrypted (can only be decrypted with access to the decryption key obtained by lightning payment)
2021-11-08 05:08:08 -08:00
* contains the height and block hash of the latest bitcoin block
2022-04-26 19:39:38 -07:00
* contains the public key of the author
2021-12-28 09:56:38 -08:00
* contains the public key of the recipient, if the text is end-to-end encrypted
2022-04-03 22:55:20 -07:00
* contains the hash of another squeak, if the squeak is a reply
* can be used to derive a unique hash
2021-11-08 05:08:08 -08:00
The protocol is defined [here ](https://github.com/yzernik/squeak/blob/master/docs/PROTOCOL.md ).
2020-07-02 21:18:10 -07:00
2021-11-04 23:28:27 -07:00
## Installation
2020-07-02 21:18:10 -07:00
2021-11-04 23:28:27 -07:00
### Requirements
2021-10-05 03:02:26 -07:00
* a Bitcoin node
2020-12-27 23:49:44 -08:00
* an LND node
2021-01-08 02:42:32 -08:00
* Python 3.6 or later
2020-11-04 23:18:04 -05:00
2021-09-28 23:55:31 -07:00
#### Optional
* a Tor SOCKS5 proxy (you can open Tor Browser and run it in the background)
2021-11-04 23:28:27 -07:00
### Step 1. Create the configuration
2022-05-02 16:45:13 -07:00
> Create a **config.ini** file and fill in the relevant sections to connect to your Bitcoin node and LND node:
2021-11-04 23:28:27 -07:00
```
[node]
network=mainnet
2022-05-08 12:41:44 -07:00
[lightning]
backend=lnd
lnd_tls_cert_path=~/.lnd/tls.cert
2022-05-11 18:47:23 -07:00
lnd_macaroon_path=~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon
2021-11-04 23:28:27 -07:00
[bitcoin]
rpc_host=localhost
rpc_port=8332
rpc_user=devuser
rpc_pass=devpass
[tor]
proxy_ip=localhost
proxy_port=9150
[webadmin]
enabled=true
username=devuser
password=devpass
```
2022-05-08 12:41:44 -07:00
If you want to use [c-lightning ](https://github.com/ElementsProject/lightning ) as the Lightning Network node backend instead of [LND ](https://github.com/lightningnetwork/lnd ), replace the `lightning` section with the following:
```
[lightning]
backend=clightning
clightning_rpc_file=~/.lightning/lightning-rpc
```
2021-11-13 13:33:36 -08:00
Add any other [configs ](docs/configuration.md ) that you need.
2021-11-04 23:28:27 -07:00
### Step 2. Install squeaknode:
2021-11-11 03:09:37 -08:00
```
pip install squeaknode
```
Or install from source
2021-11-04 23:28:27 -07:00
```
2021-12-29 18:48:53 -08:00
python3 -m venv venv
2021-11-04 23:33:00 -07:00
source venv/bin/activate
pip install .
2021-11-04 23:28:27 -07:00
```
### Step 3. Start squeaknode:
```
2021-11-04 23:33:00 -07:00
squeaknode --config config.ini
2021-11-04 23:28:27 -07:00
```
Go to http://localhost:12994/ and use the username/password in **config.ini** to log in.
2020-10-29 14:35:17 -04:00
## Test
2021-01-08 02:42:32 -08:00
### Unit tests:
#### Requirements
* tox
2020-10-29 14:35:17 -04:00
```
2021-11-04 23:33:00 -07:00
make test
2020-10-29 14:35:17 -04:00
```
2021-01-08 02:42:32 -08:00
### Integration tests:
#### Requirements
* docker-compose
* jq
2020-10-29 14:35:17 -04:00
```
2021-11-04 23:33:00 -07:00
make itest
2020-10-29 14:35:17 -04:00
```
2021-11-01 20:45:09 -07:00
2022-01-05 16:13:51 -05:00
## Release + Commit Verification
All releases and all maintainer commits as of January 5, 2022 are signed by key `D761F27D9B20BA52` (yzernik@gmail .com). The key can be found [in this repo ](https://github.com/squeaknode/squeaknode/blob/master/PGP.txt ) and [on the Squeaknode website ](https://squeaknode.org/pgp.txt ).
2021-12-17 05:50:37 -08:00
## Telegram
[Join our Telegram group! ](https://t.me/squeaknode )
2021-11-01 20:45:09 -07:00
## License
Distributed under the MIT License. See [LICENSE file ](LICENSE ).