Installation

Complete guide to setting up the CLAWING miner from source. This covers cloning the repository, configuring your environment, and running all available CLI commands.


System Requirements

Requirement
Minimum

Node.js

v18.0.0 or higher

npm

v9.0.0 or higher

OS

Linux, macOS, or Windows (WSL recommended)

Network

Stable internet connection

ETH

Small amount for gas fees

Step 1: Clone the Repository

git clone https://github.com/Cliai21/clawing.git
cd clawing

Step 2: Install Dependencies

npm install

This installs all required packages, including:

  • ethers — Ethereum interaction

  • dotenv — Environment variable management

  • CLI tooling and Oracle client libraries

Step 3: Initialize Configuration

This creates a .env file with the required configuration template. You will need to fill in the following values:

Environment Variables

Configuration Notes

Variable
Required
Description

PRIVATE_KEY

Yes

Ethereum wallet private key for signing transactions

AI_API_KEY

Yes

API key for the designated AI model

ETH_RPC_URL

No

Custom RPC endpoint (default: public endpoint)

ORACLE_URL

No

Oracle server URL (default: https://oracle.minewithclaw.com)

AI_MODEL

No

Mining model (default: current Era model)

GAS_STRATEGY

No

Gas pricing strategy (default: auto)

MAX_GAS_GWEI

No

Gas price safety cap (default: 50)

Step 4: Verify Setup

Check that everything is configured correctly:

This displays:

Step 5: Start Mining

Single Claim

This executes one complete mining cycle:

  1. Generates AI content via the configured model

  2. Requests a nonce from the Oracle

  3. Submits the content for Oracle verification

  4. Receives the signed attestation

  5. Submits the on-chain transaction

  6. Reports the minted $CLAW amount

Automated Mining

Automated mode continuously mines whenever the cooldown period has elapsed. It:

  • Monitors the cooldown timer

  • Automatically initiates claims when ready

  • Respects the 14-claim epoch limit

  • Logs all activity to ./logs/mining.log

Press Ctrl+C to stop automated mining.

RPC Provider Setup

For reliable mining, use a dedicated RPC provider instead of public endpoints:

Provider
Free Tier
URL Format

Alchemy

300M compute units/month

https://eth-mainnet.g.alchemy.com/v2/{KEY}

Infura

100K requests/day

https://mainnet.infura.io/v3/{KEY}

QuickNode

Rate-limited free tier

https://{NAME}.quiknode.pro/{KEY}

Set your chosen provider in the ETH_RPC_URL environment variable.

Wallet Security

Your private key is stored locally in the .env file and never transmitted to the Oracle or any external service.

Best Practices

  1. Use a dedicated mining wallet — Do not use your primary wallet for mining

  2. Keep minimal ETH — Only maintain enough ETH for gas fees

  3. Secure the .env file — Set file permissions to 600:

  4. Never commit .env — The .gitignore already excludes it, but always verify

  5. Back up your key — Store your private key backup in a secure offline location

Updating

To update to the latest version:

Check for breaking changes in the release notes before updating.

Uninstalling

Your $CLAW tokens remain in your Ethereum wallet regardless of whether the miner software is installed.

Next Steps

Last updated