Skip to main content

💻 CLI

Welcome to the Thirdwave Command Line Interface (CLI) Getting Started Guide! This guide will help you install and configure the Thirdwave CLI tool to interact with the Wallet Intelligence API. Whether you are a developer or a non-technical user, these step-by-step instructions will guide you through the process.

What is the Thirdwave CLI?

The Thirdwave CLI is a command-line tool designed to interact with the Wallet Intelligence API. It allows you to manage configurations, look up EVM wallets, and perform various other tasks directly from your terminal. This tool simplifies the process of accessing and managing data related to blockchain wallets.

Prerequisites

Before installing the Thirdwave CLI, you need to have Homebrew and Node.js installed on your system.

Homebrew

Homebrew is a package manager for macOS and Linux. If you don't have Homebrew installed, you can install it by following the instructions on Homebrew's official website.

Installation:

  1. Open a terminal window.

  2. Paste the following command and press Enter:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Node.js

Node.js is a JavaScript runtime that allows you to run JavaScript code on your computer. To install Node.js using Homebrew, open a terminal window and run the following command:

brew install node@22

This command will install Node.js and npm (Node Package Manager), which is required to install the Thirdwave CLI.

Thirdwave CLI Installation

Once you have Homebrew and Node.js installed, you can proceed with installing the Thirdwave CLI.

  1. Open a terminal window.
  2. Run the following command to install the Thirdwave CLI globally on your system:

npm install -g thirdwave

This command will fetch the Thirdwave CLI code from npm's registry and install it.

Configuration

The Thirdwave CLI requires an API key to interact with the Thirdwave API. Follow these steps to obtain and configure your API key:

  1. Visit Thirdwave Developer Documentation.

  2. You can obtain a key for free by registering an account on our platform and generating an API key in your account settings.

  3. Once you have your API Key, open a terminal window and run the following command to initialize the configuration:

    thirdwave config init

  4. You will be prompted to enter your API key. Fetch the API key from your account settings page and enter it into the prompt.

Basic Commands

General Usage

The Thirdwave CLI has several commands that you can use to interact with the API. Below are some of the most commonly used commands.

thirdwave [COMMAND]

Available Commands and Topics

  • config: Manage configuration values.
  • wallets: Look up EVM wallets and retrieve wallet-level insights including activity, balances, and transaction data.
  • erc20-tokens: Fetch details on ERC-20 tokens held in a wallet.
  • native-tokens: Retrieve balances of native tokens across major blockchains.
  • active-chains: Display blockchains that the wallet actively interacts with.
  • autocomplete: Display autocomplete installation instructions.
  • help: Display help for Thirdwave CLI.
  • update: Update the Thirdwave CLI.
  • version: Check the current version.

Using the Wallets Command

The wallets command allows you to look up information about EVM wallets. Below are some examples of how to use this command.

Basic Wallet Lookup

thirdwave wallets 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

Lookup with CSV Format

thirdwave wallets --format=csv 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 0x588031347beaa0d43978bc8c0094138a67d1a071

Lookup with JSON Format

thirdwave wallets --format=json 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 0x588031347beaa0d43978bc8c0094138a67d1a071

Batch Lookup from a File

You can also perform a batch lookup of multiple wallet addresses by piping input from a file.

cat wallets.txt | thirdwave wallets

Using the ERC-20 Tokens Command

The erc20-tokens command retrieves details about ERC-20 token balances for a given wallet.

Parameters Returned

  • address: The wallet address being queried.
  • balance: The balance of the ERC-20 token held by the wallet, expressed in token units.
  • blockchain: The blockchain where the ERC-20 token is held (e.g., Ethereum, Base).
  • contract_address: The smart contract address of the ERC-20 token.

Examples

  • Retrieve ERC-20 token balances for a wallet:

    thirdwave erc20-tokens 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
  • Export results in JSON format:

    thirdwave erc20-tokens --format=json 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

Using the Native Tokens Command

The native-tokens command retrieves the balances of native tokens (e.g., ETH, BNB) held by a wallet across major blockchains.

Parameters Returned

  • address: The wallet address being queried.
  • <blockchain>: The balance of the native token held by the wallet on the respective blockchain. Supported blockchains include Ethereum, BNB, Polygon, Arbitrum, and Base.

Examples

  • Retrieve native token balances for a wallet:

    thirdwave native-tokens 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
  • Export results in JSON format:

    thirdwave native-tokens --format=json 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

Using the Active Chains Command

The active-chains command identifies the blockchain networks where a wallet currently holds tokens. This can be helpful to optimize targeted airdrops or rewards, ensuring incentives are distributed to users with engagement on relevant networks.

Parameters Returned

  • address: The wallet address being queried.
  • active_chains: A set of key-value pairs where the key is the blockchain (e.g., ethereum, polygon, base) and the value is a boolean (true or false) indicating whether the wallet has been active on that blockchain.

Examples

  • Check active blockchains for a wallet:

    thirdwave active-chains 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
  • Export results in JSON format:

    thirdwave active-chains --format=json 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

Troubleshooting and Help

Common Issues

  • Issue: Command not found.
    • Solution: Ensure you have installed Node.js and npm correctly. Check your PATH environment variable.
  • Issue: Invalid API key.
    • Solution: Double-check the API key entered during the thirdwave config init step. Generate a new key if necessary.
  • Issue: Try updating the CLI if you are still facing issues.
    • Solution: Run npm install -g thirdwave to update to the latest version.

If you encounter any issues or need further assistance, you can use the help command to display detailed help information for any command.

thirdwave help

FAQs

  • How do I update the Thirdwave CLI?
    • Run npm install -g thirdwave to update to the latest version.
  • Can I use the CLI on Windows?
    • Yes, the Thirdwave CLI is compatible with Windows. Ensure you have Node.js installed.

Other Resources

Check out these other pages to learn more about how to get the most out of Wallet Intelligence:

  • Tools Overview - Choose the best access method.
  • Use Cases - Step-by-step Wallet Intelligence use cases.
  • FAQs - Review commonly asked questions.
  • Glossary - Get detailed definitions & methodologies for Wallet Intelligence fields as well as general terminology.
  • Contact Us - See all the different ways to contact our team for support.