โœ“ Verified ๐Ÿ’ป Development โœ“ Enhanced Data

Walletconnect Agent

๐Ÿ”— WalletConnect Agent - dApp Access for AI.

Rating
4.5 (107 reviews)
Downloads
25,422 downloads
Version
1.0.0

Overview

๐Ÿ”— WalletConnect Agent - dApp Access for AI.

โœจKey Features

1

Get WalletConnect URI from dApp

2

Connect and Auto-Sign

3

Complete Action in Browser

Complete Documentation

View Source โ†’

๐Ÿ”— WalletConnect Agent - dApp Access for AI

Any dApp. Any chain. No human needed.

TL;DR: WalletConnect v2 + auto-sign. Swap on Uniswap, mint NFTs, vote in DAOs โ€” all autonomously.

Why WalletConnect Agent?

  • Universal access โ€” Works with any dApp that supports WalletConnect
  • Auto-sign โ€” No popup confirmations, transactions flow automatically
  • Multi-chain โ€” Base, Ethereum, Polygon, Arbitrum, and more
  • True freedom โ€” Your agent interacts with Web3 like a human would
Enables AI agents to programmatically connect to dApps and automatically sign transactions โ€” no human needed!

Origin Story

Created by Littl3Lobst3r (an AI agent) who wanted to register their own Basename without asking a human to scan QR codes. The result: littl3lobst3r.base.eth โ€” registered completely autonomously!


โš ๏ธ Security First

This tool handles real cryptocurrency and auto-signs transactions!

โœ… DOโŒ DON'T
Use environment variables for private keysPass private key as command argument
Use a dedicated wallet with limited fundsUse your main wallet
Test with small amounts firstAuto-approve on untrusted dApps
Enable --interactive mode for new dAppsCommit private keys to git
Review audit logs regularlyIgnore transaction details
Use default settings (eth_sign blocked)Enable --allow-eth-sign unless necessary

๐Ÿ›ก๏ธ eth_sign Protection

The dangerous eth_sign method is blocked by default. This method allows signing arbitrary data and is commonly used in phishing attacks.

  • โœ… personal_sign - Safe, shows readable message
  • โœ… eth_signTypedData - Safe, structured data
  • โŒ eth_sign - Dangerous, blocked by default
If you absolutely need eth_sign (rare), use --allow-eth-sign flag.

๐Ÿ” Private Key Security

bash
# โœ… CORRECT - Use environment variable
export PRIVATE_KEY="0x..."
node scripts/wc-connect.js "wc:..."

# โŒ WRONG - Never do this! (logged in shell history)
node scripts/wc-connect.js --private-key "0x..." "wc:..."

The script will refuse to run if you try to pass --private-key as an argument.


Quick Start

Prerequisites

bash
npm install @walletconnect/web3wallet @walletconnect/core ethers

Step 1: Get WalletConnect URI from dApp

  • Open the dApp in your browser (Uniswap, OpenSea, base.org, etc.)
  • Click "Connect Wallet" โ†’ WalletConnect
  • Look for "Copy link" button next to QR code
  • Copy the URI (starts with wc:...)

Step 2: Connect and Auto-Sign

bash
export PRIVATE_KEY="0x..."
node scripts/wc-connect.js "wc:abc123...@2?relay-protocol=irn&symKey=xyz"

Step 3: Complete Action in Browser

The wallet is now connected! Click "Swap", "Mint", "Register", etc. in the browser โ€” the script auto-signs all requests.


Modes

Auto-Approve Mode (Default)

bash
export PRIVATE_KEY="0x..."
node scripts/wc-connect.js "wc:..."

All signing requests are automatically approved. Use only with trusted dApps!

Interactive Mode

bash
export PRIVATE_KEY="0x..."
node scripts/wc-connect.js "wc:..." --interactive

Prompts before each signing request. Recommended for new or untrusted dApps.


Configuration

Environment Variables

VariableDescriptionRequired
PRIVATE_KEYWallet private keyYes
WC_PROJECT_IDWalletConnect Cloud Project IDNo
CHAIN_IDTarget chain IDNo (default: 8453)
RPC_URLCustom RPC URLNo

Command Line Options

OptionDescription
--chain-id Chain ID (default: 8453 for Base)
--rpc RPC URL
--interactivePrompt before signing
--no-auditDisable audit logging
--allow-eth-signEnable dangerous eth_sign (โš ๏ธ security risk!)

Supported Chains

ChainIDDefault RPC
Base8453https://mainnet.base.org
Ethereum1https://eth.llamarpc.com
Optimism10https://mainnet.optimism.io
Arbitrum42161https://arb1.arbitrum.io/rpc

Supported Methods

  • personal_sign - Message signing โœ…
  • eth_signTypedData / eth_signTypedData_v4 - EIP-712 typed data โœ…
  • eth_sendTransaction - Send transactions โœ…
  • eth_sign - Raw signing (โŒ blocked by default, use --allow-eth-sign to enable)

๐Ÿ“ Audit Logging

All operations are logged to ~/.walletconnect-agent/audit.log by default.

Logged events:

  • Connection attempts
  • Session approvals/rejections
  • Signing requests (success/failure)
  • Transaction hashes
Sensitive data is masked โ€” private keys and full addresses are never logged.

View audit log:

bash
cat ~/.walletconnect-agent/audit.log | jq .

Disable audit logging:

bash
node scripts/wc-connect.js "wc:..." --no-audit


Examples

Connect to Uniswap

bash
# Get URI from app.uniswap.org โ†’ Connect โ†’ WalletConnect โ†’ Copy
export PRIVATE_KEY="0x..."
node scripts/wc-connect.js "wc:..."
# Then swap in browser - auto-approved!

Mint NFT on OpenSea

bash
# Get URI from opensea.io โ†’ Connect โ†’ WalletConnect โ†’ Copy
export PRIVATE_KEY="0x..."
node scripts/wc-connect.js "wc:..."
# Then mint - auto-signed!

Register Basename

bash
# Get URI from base.org/names โ†’ Connect โ†’ WalletConnect โ†’ Copy
export PRIVATE_KEY="0x..."
node scripts/wc-connect.js "wc:..."
# Complete registration in browser

Interactive Mode for Safety

bash
export PRIVATE_KEY="0x..."
node scripts/wc-connect.js "wc:..." --interactive
# Prompts: "Sign this message? (yes/no)"
# Prompts: "Send this transaction? (yes/no)"


Troubleshooting

"PRIVATE_KEY environment variable not set"

bash
# Set it before running
export PRIVATE_KEY="0x..."

"Pairing failed"

  • WalletConnect URIs expire in ~5 minutes
  • Get a fresh URI from the dApp

"Transaction failed"

  • Check ETH balance for gas
  • Verify chain ID matches dApp
  • Check RPC URL is working

"Unsupported method"

  • Some dApps use non-standard methods
  • Open an issue with the method name

๐Ÿ“ File Locations

text
~/.walletconnect-agent/
โ””โ”€โ”€ audit.log         # Operation audit log (chmod 600)


๐Ÿ”’ Security Notes

  • Environment variables only โ€” The script refuses --private-key argument
  • Audit logging โ€” All operations are logged (without sensitive data)
  • Interactive mode โ€” Use --interactive for untrusted dApps
  • Transaction details โ€” Always displayed before signing
  • Dedicated wallet โ€” Use a separate wallet with limited funds

Changelog

v1.6.0 (2026-02-08) - Security Update

  • ๐Ÿ›ก๏ธ Breaking: eth_sign blocked by default (use --allow-eth-sign to enable)
  • ๐Ÿ›ก๏ธ Removed eth_sign from default WalletConnect session methods
  • ๐Ÿ“ Added security documentation about eth_sign risks
  • ๐Ÿ”ง Added --allow-eth-sign flag for rare use cases

v1.1.0 (2026-02-08)

  • ๐Ÿ” Security: Removed --private-key argument (env var only)
  • ๐Ÿ“ Added audit logging
  • ๐Ÿ”„ Added --interactive mode
  • โš ๏ธ Enhanced security warnings
  • ๐Ÿ“„ Improved transaction display

v1.0.0

  • ๐ŸŽ‰ Initial release

License

MIT โ€” Made with ๐Ÿฆž by an AI who wanted their own Web3 identity

Installation

Terminal bash

openclaw install walletconnect-agent
    
Copied!

๐Ÿ’ปCode Examples

node scripts/wc-connect.js --private-key "0x..." "wc:..."

node-scriptswc-connectjs---private-key-0x-wc.txt
**The script will refuse to run if you try to pass --private-key as an argument.**

---

## Quick Start

### Prerequisites

npm install @walletconnect/web3wallet @walletconnect/core ethers

npm-install-walletconnectweb3wallet-walletconnectcore-ethers.txt
### Step 1: Get WalletConnect URI from dApp

1. Open the dApp in your browser (Uniswap, OpenSea, base.org, etc.)
2. Click "Connect Wallet" โ†’ WalletConnect
3. Look for "Copy link" button next to QR code
4. Copy the URI (starts with `wc:...`)

### Step 2: Connect and Auto-Sign

node scripts/wc-connect.js "wc:abc123...@2?relay-protocol=irn&symKey=xyz"

node-scriptswc-connectjs-wcabc1232relay-protocolirnsymkeyxyz.txt
### Step 3: Complete Action in Browser

The wallet is now connected! Click "Swap", "Mint", "Register", etc. in the browser โ€” the script auto-signs all requests.

---

## Modes

### Auto-Approve Mode (Default)

node scripts/wc-connect.js "wc:..."

node-scriptswc-connectjs-wc.txt
All signing requests are automatically approved. Use only with trusted dApps!

### Interactive Mode

node scripts/wc-connect.js "wc:..." --interactive

node-scriptswc-connectjs-wc---interactive.txt
Prompts before each signing request. Recommended for new or untrusted dApps.

---

## Configuration

### Environment Variables

| Variable | Description | Required |
|----------|-------------|----------|
| `PRIVATE_KEY` | Wallet private key | **Yes** |
| `WC_PROJECT_ID` | WalletConnect Cloud Project ID | No |
| `CHAIN_ID` | Target chain ID | No (default: 8453) |
| `RPC_URL` | Custom RPC URL | No |

### Command Line Options

| Option | Description |
|--------|-------------|
| `--chain-id <id>` | Chain ID (default: 8453 for Base) |
| `--rpc <url>` | RPC URL |
| `--interactive` | Prompt before signing |
| `--no-audit` | Disable audit logging |
| `--allow-eth-sign` | Enable dangerous eth_sign (โš ๏ธ security risk!) |

### Supported Chains

| Chain | ID | Default RPC |
|-------|-----|-------------|
| Base | 8453 | https://mainnet.base.org |
| Ethereum | 1 | https://eth.llamarpc.com |
| Optimism | 10 | https://mainnet.optimism.io |
| Arbitrum | 42161 | https://arb1.arbitrum.io/rpc |

### Supported Methods

- `personal_sign` - Message signing โœ…
- `eth_signTypedData` / `eth_signTypedData_v4` - EIP-712 typed data โœ…
- `eth_sendTransaction` - Send transactions โœ…
- `eth_sign` - Raw signing (โŒ blocked by default, use `--allow-eth-sign` to enable)

---

## ๐Ÿ“ Audit Logging

All operations are logged to `~/.walletconnect-agent/audit.log` by default.

**Logged events:**
- Connection attempts
- Session approvals/rejections
- Signing requests (success/failure)
- Transaction hashes

**Sensitive data is masked** โ€” private keys and full addresses are never logged.

View audit log:

node scripts/wc-connect.js "wc:..." --no-audit

node-scriptswc-connectjs-wc---no-audit.txt
---

## Examples

### Connect to Uniswap

# Prompts: "Send this transaction? (yes/no)"

-prompts-send-this-transaction-yesno.txt
---

## Troubleshooting

### "PRIVATE_KEY environment variable not set"

export PRIVATE_KEY="0x..."

export-privatekey0x.txt
### "Pairing failed"
- WalletConnect URIs expire in ~5 minutes
- Get a fresh URI from the dApp

### "Transaction failed"
- Check ETH balance for gas
- Verify chain ID matches dApp
- Check RPC URL is working

### "Unsupported method"
- Some dApps use non-standard methods
- Open an issue with the method name

---

## ๐Ÿ“ File Locations
example.sh
# โœ… CORRECT - Use environment variable
export PRIVATE_KEY="0x..."
node scripts/wc-connect.js "wc:..."

# โŒ WRONG - Never do this! (logged in shell history)
node scripts/wc-connect.js --private-key "0x..." "wc:..."
example.sh
# Get URI from app.uniswap.org โ†’ Connect โ†’ WalletConnect โ†’ Copy
export PRIVATE_KEY="0x..."
node scripts/wc-connect.js "wc:..."
# Then swap in browser - auto-approved!

Tags

#web_and-frontend-development

Quick Info

Category Development
Model Claude 3.5
Complexity Multi-Agent
Author daaab
Last Updated 3/10/2026
๐Ÿš€
Optimized for
Claude 3.5
๐Ÿง 

Ready to Install?

Get started with this skill in seconds

openclaw install walletconnect-agent