# Tornado CLI
Modern Toolsets for [Privacy Pools](https://www.forbes.com/sites/tomerniv/2023/09/07/privacy-pools-bridging-the-gap-between-blockchain-and-regulatory-compliance) on Ethereum
[![Telegram Badge](https://img.shields.io/badge/Join%20Group-telegram?style=flat&logo=telegram&color=blue&link=https%3A%2F%2Ft.me%2Ftornadoofficial)](https://t.me/tornadoofficial) [![Element Badge](https://img.shields.io/badge/Join%20Element%20Chat-Element?style=flat&logo=element&color=green&link=https%3A%2F%2Felement.tornadocash.social%2F)](https://element.tornadocash.social) [![Discourse Badge](https://img.shields.io/badge/Discourse-Discourse?style=flat&logo=Discourse&color=black&link=https%3A%2F%2Fforum.tornado.ws%2F)](https://forum.tornado.ws/)
### About Tornado CLI
Tornado CLI is a complete rewrite of old tornado-cli command line tool with the following changes
+ Rewritten to [TypeScript](https://www.typescriptlang.org/)
+ Built on top of modern tech stacks like [Ethers.js V6](https://docs.ethers.org/v6/) or [TypeChain](https://github.com/dethcrypto/TypeChain)
+ Creates resource heavy Merkle Trees on a separate thread using Web Workers / Worker Threads
+ Resilient API requests made by [cross-fetch](https://www.npmjs.com/package/cross-fetch) and retries, especially for Tor Users
+ Modular design
### How to install Tornado CLI
Download and install the latest [Node.js](https://nodejs.org/en/download/) LTS version (Current: 20.x).
You also need to install [Yarn](https://yarnpkg.com/) 1.x package manager using following command
```bash
$ npm i -g yarn
```
If you have git installed on your system, clone the master branch.
```bash
$ git clone https://git.tornado.ws/tornadocash/tornado-cli
```
Or, download the archive file from git: https://git.tornado.ws/tornadocash/tornado-cli/archive/master.zip
After downloading or cloning the repository, you must install necessary libraries using the following command.
```bash
$ cd tornado-cli
$ yarn
```
If you want to use Tor connection to conceal ip address, install [Tor Browser](https://www.torproject.org/download/) and add `--tor-port 9150` for `yarn start` if you connect tor with browser. (For non tor-browser tor service you can use the default 9050 port).
Note that you should reset your tor connection by restarting the browser every time when you deposit & withdraw otherwise you will have the same exit node used for connection.
### Configuration
Commands like `yarn deposit`, `yarn depositInvoice` or `yarn send` would require either a valid view-only wallet address or mnemonic or a private key to perform actions ( Because, if you want to deposit to pools or send the token, you would need your wallet right? ).
You can apply those values with two options
1. Refer the `VIEW_ONLY` or `MNEMONIC` or `PRIVATE_KEY` value from the `.env.example` file and create a new `.env` file with the appropriate value.
2. Supply command-line options `--view-only` or `--mnemonic` or `--private-key` during the commands.
### How to start
1. `yarn start --help`
2. If you want to use a secure, anonymous tor connection add `--tor-port