{"id":13504197,"url":"https://github.com/talaia-labs/rust-teos","last_synced_at":"2025-03-29T19:30:46.268Z","repository":{"id":37096337,"uuid":"372779680","full_name":"talaia-labs/rust-teos","owner":"talaia-labs","description":"The Eye of Satoshi - Lightning Watchtower","archived":false,"fork":false,"pushed_at":"2024-09-05T21:35:29.000Z","size":680,"stargazers_count":135,"open_issues_count":54,"forks_count":63,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-01T00:32:44.135Z","etag":null,"topics":["bitcoin","lightning-network","rust-lang","watchtower"],"latest_commit_sha":null,"homepage":"https://talaia-labs.github.io/talaia.watch/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/talaia-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-01T09:48:36.000Z","updated_at":"2024-10-15T10:22:50.000Z","dependencies_parsed_at":"2024-01-18T23:44:22.218Z","dependency_job_id":"0f8d2173-0cbd-47c8-bd03-dcb56deb8d65","html_url":"https://github.com/talaia-labs/rust-teos","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talaia-labs%2Frust-teos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talaia-labs%2Frust-teos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talaia-labs%2Frust-teos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talaia-labs%2Frust-teos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/talaia-labs","download_url":"https://codeload.github.com/talaia-labs/rust-teos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246234675,"owners_count":20745014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","lightning-network","rust-lang","watchtower"],"created_at":"2024-07-31T23:00:59.664Z","updated_at":"2025-03-29T19:30:45.813Z","avatar_url":"https://github.com/talaia-labs.png","language":"Rust","funding_links":[],"categories":["Awesome Rust Bitcoin"],"sub_categories":["Rust Bitcoin Cookbook"],"readme":"# The Eye of Satoshi (rust-teos)\n\nThe Eye of Satoshi is a Lightning watchtower compliant with [BOLT13](https://github.com/sr-gi/bolt13), written in Rust.\n\n[![discord](https://img.shields.io/discord/991334710611550208?logo=discord\u0026style=plastic)](https://discord.gg/EyVbrNMDUP)\n[![build](https://img.shields.io/github/actions/workflow/status/talaia-labs/rust-teos/build.yaml?logo=github\u0026style=plastic)](https://github.com/talaia-labs/rust-teos/actions/workflows/build.yaml)\n[![release](https://img.shields.io/github/v/release/talaia-labs/rust-teos?style=plastic)](https://github.com/talaia-labs/rust-teos/releases/latest)\n\n\n`rust-teos` consists of two main crates:\n\n- `teos`: including the tower's main functionality (server-side) and a CLI. Compiling this crate will generate two binaries: `teosd` and `teos-cli`.\n- `teos-common`: including shared functionality between server and client-side (useful to build a client).\n\n## Dependencies\n\nRefer to [DEPENDENCIES.md](DEPENDENCIES.md)\n\n## Installation\nRefer to [INSTALL.md](INSTALL.md)\n\n## Running TEOS\n\nMake sure `bitcoind` is running before running `teosd` (it will fail at startup if it cannot connect to `bitcoind`). [Here](DEPENDENCIES.md#installing-bitcoind) you can find a sample bitcoin.conf.\n\nPlease see [Docker instructions](docker/README.md) for instructions on how to set up `teosd` in Docker.\n\n### Starting the tower daemon ♖\n\nOnce installed, you can start the tower by running:\n\n```\nteosd\n```\n\n### Configuration file and command line parameters\n\n`teosd` comes with a default configuration that can be found at [teos/src/config.rs](teos/src/config.rs). \n\nThe configuration includes, amongst others, where your data folder is placed, what network it connects to, etc.\n\nTo change the configuration defaults you can:\n\n- Define a configuration file named `teos.toml` following the template (check [conf_template.toml](teos/src/conf_template.toml)) and place it in the `data_dir` (that defaults to `~/.teos/`).\n\nand/or \n\n- Add some global options when running the daemon (run `teosd -h` for more info).\n\n### Passing command-line options to `teosd`\n\nSome configuration options can also be specified when running `teosd`. We can, for instance, change the tower data directory as follows:\n\n```\nteosd --datadir=\u003cpath_to_dir\u003e\n```\n\n### Running `teosd` in another network\n\nBy default, `teosd` runs on `mainnet`. In order to run it on another network, you need to change the network parameter in the configuration file or pass the network parameter as a command-line option. Notice that if `teosd` does not find a `bitcoind` node running in the same network that it is set to run, it will refuse to run.\n\nThe configuration file option to change the network where `teosd` will run is `btc_network`:\n\n```\nbtc_network = mainnet\n```\n\nFor regtest, it should look like:\n\n```\nbtc_network = regtest\n```\n\n### Running `teosd` with Tor\n\nThis requires a Tor daemon running on the same machine as `teosd` and a control port open on that daemon.\n\nDownload Tor from the [torproject site](https://www.torproject.org/download/).\n\nTo open Tor's control port, you add the following to the Tor config file ([source](https://2019.www.torproject.org/docs/faq.html.en#torrc)):\n\n```\n## The port on which Tor will listen for local connections from Tor\n## controller applications, as documented in control-spec.txt.\nControlPort 9051\n\n## If you enable the controlport, be sure to enable one of these\n## authentication methods, to prevent attackers from accessing it.\nCookieAuthentication 1\nCookieAuthFileGroupReadable 1\n```\n\nOnce the Tor daemon is running, and the control port is open, make sure to enable `--torsupport` when running `teosd`.\n\n### Tower id and signing key\n\n`teosd` needs a pair of keys that will serve as tower id and signing key. The former can be used by users to identify the tower, whereas the latter is used by the tower to sign responses. These keys are automatically generated on the first run and can be refreshed by running `teosd` with the `--overwritekey` flag. Notice that once a key is overwritten you won't be able to use the previous key again*.\n\n\\* Old keys are actually kept in the tower's database as a fail-safe in case you overwrite them by mistake. However, there is no automated way of switching back to an old key. Feel free to open an issue if you overwrote your key by mistake and need support to recover it.\n\n## Interacting with a TEOS instance\n\nYou can interact with a `teosd` instance (either run by yourself or someone else) by using `teos-cli`. This is an admin tool that has privileged access to the watchtower, and it should therefore only be used within a trusted environment (for example, the same machine).\n\nWhile `teos-cli` works independently of `teosd`, it shares the same configuration file by default, of which it only uses a subset of its settings. The folder can be changed using the `--datadir` command-line argument if desired.\n\nFor help on the available arguments and commands, you can run:\n\n```\nteos-cli -h\n```\n\n### Running teos-cli remotely\n\nTo run `teos-cli` remotely, you'll need to take one extra step. When `teosd` is started up, self-signed certificates are automatically generated for a user to make a secure connection to the remote TEOS watchtower. When the CLI is run locally, it knows where to find these files. But if run remotely, these files need to be copied over to the machine where the CLI is being run.\n\nThe files are generated to the data directory (by default stored at `~/.teos/`). To run remotely, users need to copy the `client.pem`, `client-key.pem`, and `ca.pem` files to the corresponding watchtower data directory on the machine where the CLI is being run. That is, by default, to `~/.teos/` on the remote machine.\n\n## Interacting with TEOS as a client\n### TEOS clients\n\nHere is a list of the available clients for `teos`:\n\n- [watchtower-client for CLN](watchtower-plugin/)\n\n## Contributing \nRefer to [CONTRIBUTING.md](CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalaia-labs%2Frust-teos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftalaia-labs%2Frust-teos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalaia-labs%2Frust-teos/lists"}