Tornado CLI usage guide

This is a guide on how to use the command line interface (CLI) tool to interact with Classic, in the case where the frontend application is inaccessible or if there is no working working RPC endpoints that work because of being subject to rate-limiting. This document is meant for individuals with little technical knowledge.

If you familiar with git, cmd and so on, click here
  1. Install git, if not already installed
  2. Install latest nvm here
  3. Open cmd as administrator
  4. git clone
  5. nvm install 14.21.3
  6. Install node-gyp dependencies [Optional]
  7. npm install

Use according to docs.

Step 1: Install NVM

To install NodeJS easily and manage the different versions will use an open source implementation called Node Version Manager (NVM)


Visit the releases page of the nvm-windows repository and download the latest publication of the program, as highlighted below.

For this part you’ll need to be able to open (extract) .zip files, most operating systems allow this. Open the location where the file was downloaded to and open the file. It should create a folder in the same location with the resulting files, inside there should be an .exe file open it to start the installation.

After finishing the installation go to your taskbar on the bottom left where the Windows logo is and search for “Powershell”, right click and select “Run as administrator”. Once it opens type in


If it responds with a version and help page (like on picture below), you have successfully installed NVM.


On Linux operating systems it is very easy to install NVM, open your “Terminal” application found by using the search function. Enter one of the following commands.

curl -o- | bash


wget -qO- | bash

Once it finishes installing type in

nvm -v

If it responds with a version if it has you have successfully installed NVM.

Step 2: Install NodeJS

Now you need to install NodeJS using NVM, the CLI tool requires version 14 or less to work.

nvm install 14.21.3
nvm use 14.21.3

If both have successfully worked try to test if node and npm is installed by typing.

node -v

It should return version v14.21.3.
Set up node version

If it shows error message, like node is not recognized, just reopen console (Terminal / Powershell) as administrator.

Step 3: Download CLI tool

Visit the tornado-cli repository page and download the latest publication of the program, as highlighted below.

Open the location where the file was downloaded to and open the file. It should create a folder in the same location with the resulting files, reopen “Terminal” or “Powershell” as described previously (Make sure to “Run as administrator” if using Windows)

Type the following command: cd <path-to-cli>
Replace <path-to-cli> with real path: copy it from system explorer into the “Terminal” or “Powershell” window, and press enter. If successful the folder name should show on the left side, check example on the GIF below.

Change directory to cli folder

Final step install the packages.

npm install

If everything installed ok, you are ready to use the CLI tool. If you got an error related to “permissions” on Linux use sudo before npm and on Windows reopen Powershell as Administrator. Don’t pay attention if it says about warnings or vulnerabilities, it is normal behaviour:

If npm install failed (really, don't do this for no reason)

Download node-gyp compiler and its dependecies

Run on opened Powershell or Terminal window: npm i -g node-gyp

Install latest Python from official site (just click big download button).

Install latest Visual Studio Build Tools: open this link and download will start automatically. When file named vs_BuildTools.exe is uploaded, just run it and follow instructions in corresponding window, select `.


Open terminal and run: sudo apt-get install -y build-essentials

Step 4: Use CLI tool

From here you can follow the instructions on the offical repo to use the CLI for withdrawing or depositing from the same window in the previous step.

Quick withdrawal guide

Prepare your private note and address to which you will withdraw.

Open Powershell or Terminal in CLI directory (you already know how to do it) and run following command: node cli.js withdraw <your note> <your address> --relayer <relayer link>
node cli.js withdraw <your note> <your address> --private-key <private key>

For example: node cli.js withdraw tornado-eth-0.1-5-0xf73dd6833ccbcc046c44228c8e2aa312bf49e08389dadc7c65e6a73239867b7ef49c705c4db227e2fadd8489a494b6880bdcb6016047e019d1abec1c7652 0x8589427373D6D84E98730D7795D8f6f8731FDA16 --relayer

If there is no active relayers on chain or you want to withdraw using private key, first make sure that:

  1. Private key is from wallet to which you withdraw funds
  2. You have enough base chain currency on your wallet to cover the withdrawal fee

When events cache fetching is finished and SNARK withdrawal proof generated, you will see confirmation prompt:

If you are satisfied with gas fee and relayer fee, type Y and press “Enter”.
After sending withdrawal transaction to the blockchain, a link to the transaction in block explorer will appear in console (Terminal/Powershell):


If you don’t like default RPC from config.js, you can find RPC endpoints on or check recommended RPC links in README

Written by xGozzy, edited & updated by Theo.

hello, I’ve implemented the tutorial as above but it appears like this and will continue to fetched endlessly. what do I have to do? i have also tried using a vpn but cant!

I withdraw using the private key because there is no active relayer in optimism

Just don’t set up --rpc parameter - while withdrawing, CLI will select fastest default RPC for your chain.

Next, wait for the events to sync up to the actual block - the last one that is currently in the blockchain - and then you can withdraw.

Am i using this right?
I get “merkle tree is corrupted”

I deposited through with wallet A
Now on cli i’m withdrawing to wallet B with wallet B’s private keys

That’s good or no?

Reload cache for your currency/amount from git and try to withdraw again.
As I see in Telegram, you tried to withdraw on Arbitrum chain, download deposit cache file here and replace current file in your cache/arbitrum directory with it.