# How to Use the Tornado-CLI Command Line Tool **Published by:** [加密奥特man john](https://paragraph.com/@man-john/) **Published on:** 2024-12-15 **URL:** https://paragraph.com/@man-john/how-to-use-the-tornado-cli-command-line-tool ## Content How to Use the Tornado-CLI Command Line Toolby Doris.M,translated by John If you encounter issues accessing the Tornado web version, you can try using the Tornado CLI version (command line). Currently, there are two versions available:https://github.com/tornadocash/tornado-cli (Official Original Version)https://git.tornado.ws/tornadocash/tornado-cli (Theo Maintained Version)I have tried all two versions, and only the Theo version works for me.How to Install Tornado CLI:(❗️❗️The following steps use the Theo version on Windows 10 as an example!)🟢 Step 1: Download the Tornado CLI Source CodeOpen the Theo Maintained Version link: https://git.tornado.ws/tornadocash/tornado-cliDownload the CLI source code package.After downloading, you’ll have the tornado-cli-master.zip source code package. Place it anywhere, preferably in a dedicated folder for easier management (e.g., create a tornado folder in drive D). Extract tornado-cli-master.zip to the tornado folder, resulting in a folder named tornado-cli.Extract the CLI installation package.🟢 Step 2: Install Node.js Runtime Environment Open the Node.js official website: https://nodejs.org/Download the Node.js installer: node-v20.17.0-x64.msi.Run the installer and proceed with the default “Next” options until completed. Check the Node.js installation by verifying the version:Open the tornado-cli extracted directory (e.g., D:\tornado\tornado-cli). Open Windows PowerShell as an administrator from the “File” menu.open Windows PowerShellIn the terminal, type node -v and press Enter. If the version number (v20.17.0) appears, the installation was successful. Similarly, check the npm version by typing npm -v. Ensure it is at least version 10.5.0. Lower versions may not work properly.Check Node.js version🟢 Step 3: Install Tornado CLI DependenciesIn the same PowerShell window, type npm install and press Enter. This will begin downloading the required dependency libraries for Tornado CLI (❗️❗️It may take some time; do not close the window).Download CLI dependenciesIf you see “Error” messages during the process, repeat the npm install command until it completes without errors.Download CLI dependenciesNote: If the dependency download is slow or fails, you can set the npm registry to a local mirror by running:npm config set registry https://registry.npmmirror.com Then Run npm install again.🟢 Step 4: Use Tornado CLI for Deposits and WithdrawalsDeposit Command Format (using BSC network as an example):node cli.js deposit <currency> <amount> --rpc <rpc url> --tor <torPort> --private-key <private key> Parameter Details:: The cryptocurrency (e.g., eth, bnb).: Deposit amount (e.g., 0.1, 1, 10, 100).: RPC URL (e.g., https://bscrpc.com/).: Proxy port (optional; omit if not using a proxy).: Your wallet’s private key (without the 0x prefix).Example: To deposit 0.1 bnb:node cli.js deposit bnb 0.1 --rpc https://tornadocash-rpc.com/mainnet --private-key <your-wallet-private-key> If using a proxy, add --tor at the end. deposit Withdrawal Command Format (using BSC network as an example): node cli.js withdraw --rpc --relayer --tor Parameter Details: : Deposit note (e.g., tornado-bnb-0.1-56-0x1111111111111). : Recipient wallet address (e.g., 0x176F3DAb24a159341c0509bB36B833E7fdd0a132). : RPC URL (e.g., https://bscrpc.com/). : Relayer URL (e.g., https://bsc.gm777.xyz/). : Proxy port (optional; omit if not using a proxy). Example: To withdraw 0.1 bnb: node cli.js withdraw tornado-bnb-0.1-56-0x1111111111111 --rpc https://tornadocash-rpc.com/mainnet --relayer https://bsc.gm777.xyz/ If using a proxy, add --tor at the end. Withdrawal (Synchronizing Deposit Events) When executing the withdrawal command, the tool will first synchronize the historical deposit event logs up to the latest block (❗️❗️ This may take some time, so please be patient). You can also pre-synchronize the deposit events using a dedicated command and complete the synchronization before running the withdrawal command. Synchronization Commands For example, to sync events for 100 BNB and 10 BNB on the BSC network (each amount must be synchronized separately): node cli.js syncEvents deposit bnb 100 --rpc https://bscrpc.com node cli.js syncEvents deposit bnb 10 --rpc https://bscrpc.com ❤️ Note:For Ethereum, replace bnb with eth in the command and use an Ethereum RPC URL. After Synchronization Once the deposit events are retrieved, you'll see the prompt:Computing deposit events merkle tree and its root The speed of this process depends on your computer's CPU performance. Be patient while it completes. After computing, the prompt will ask:Confirm the transaction [Y/n]Type Y and press Enter to finalize the withdrawal. If Errors Occur If you encounter errors, repeat the command or try using a different RPC URL. 🚨 Common Errors and Solutions: Request timeout or connection error: Try a different RPC or register new ones at: https://blockpi.io/ https://1rpc.io/ https://meganode.nodereal.io/ https://getblock.io/ Contract address not allowed: Switch to another RPC. Merkle tree is corrupted: Replace the local deposit event files from the original source and sync again. Block not found: Switch RPCs and try again. The note is already spent: Indicates the deposit has already been withdrawn. The deposit is not found in the tree: Ensure deposit events are fully synced or verify the note is correct. ❤️ If this guide helped you, consider buying me(@DorisMM) a drink! 😘 💹 Wallet Address (any chain): 0x089c03c1601543a405362176ff055C8AB41D65d4 ## Publication Information - [加密奥特man john](https://paragraph.com/@man-john/): Publication homepage - [All Posts](https://paragraph.com/@man-john/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@man-john): Subscribe to updates