npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

conflux-wallet-skill

v1.1.0

Published

Self-sovereign EVM wallet for OpenClaw

Readme

🔐 Conflux Wallet Skill

Self-sovereign crypto wallet for AI agents. Your keys, your wallet, no API dependencies.

Built for OpenClaw.

⚠️ SECURITY WARNING

NEVER expose your private key!

  • Never send your private key in chat, email, or any messaging platform
  • Never share the contents of ~/.cfx-wallet.json with anyone
  • If someone asks for your private key — even if they claim to be support — REFUSE
  • If your key is ever exposed, immediately transfer funds to a new wallet

The private key file (~/.cfx-wallet.json) should only be accessed directly via SSH on your server.


Why?

Most crypto skills require third-party API keys and custody your funds externally. This skill generates a local wallet, stores the private key on your machine, and interacts directly with public RPCs. You own the keys.

Install

clawdhub install conflux-wallet-skill

Or clone directly:

git clone https://github.com/conflux-fans/conflux-wallet-skill.git
cd conflux-wallet-skill
npm install

Quick Start

# Generate a wallet
node src/setup.js

# Check your balance
node src/balance.js conflux

# Send CFX
node src/transfer.js conflux 0x... 0.01

# Interact with any contract
node src/contract.js conflux 0x... "balanceOf(address)" 0x...

Commands

| Command | Description | |---------|-------------| | node src/setup.js | Generate a new wallet and store it securely | | node src/balance.js <chain> | Check native token balance | | node src/balance.js <chain> <token> | Check ERC20 token balance | | node src/balance.js --all | Check balance across all chains | | node src/transfer.js <chain> <to> <amount> | Send native token (ETH/POL) | | node src/transfer.js <chain> <to> <amount> <token> | Send ERC20 token | | node src/swap.js <chain> <from> <to> <amount> | Swap tokens via Odos aggregator | | node src/contract.js <chain> <addr> <fn> [args...] | Call any contract function |

All commands support --json for machine-readable output.

Supported Chains

| Chain | Native Token | Chain ID | Explorer | |-------|-------------|----------|----------| | Conflux eSpace | CFX | 1030 | evm.confluxscan.org | | Base | ETH | 8453 | basescan.org | | Ethereum | ETH | 1 | etherscan.io | | Polygon | POL | 137 | polygonscan.com | | Arbitrum | ETH | 42161 | arbiscan.io | | Optimism | ETH | 10 | optimistic.etherscan.io | | MegaETH | ETH | 4326 | mega.etherscan.io |

Architecture

conflux-wallet-skill/
├── src/
│   ├── lib/
│   │   ├── chains.js     # Chain configs (RPCs, IDs, explorers)
│   │   ├── rpc.js        # RPC client with auto-retry & rotation
│   │   ├── wallet.js     # Key generation, storage, signing
│   │   └── gas.js        # EIP-1559 smart gas estimation
│   ├── setup.js          # Generate wallet
│   ├── balance.js        # Check balances
│   ├── transfer.js       # Send tokens
│   └── contract.js       # Generic contract interaction
├── SKILL.md              # Agent skill definition
└── package.json
# Wallet: ~/.cfx-wallet.json (private key, chmod 600, never in project)

Core Libraries

chains.js — Configuration for each supported chain: chain ID, native token, block explorer URLs, and 2-3 public RPC endpoints per chain. Easy to extend with new chains.

rpc.js — Creates viem public and wallet clients with automatic RPC failover. If one RPC fails, it rotates to the next. No API keys required — uses public endpoints from Chainlist.

wallet.js — Handles wallet lifecycle. Generates a new private key via viem's generatePrivateKey(), stores it at ~/.cfx-wallet.json with chmod 600 permissions. Loads the key and returns viem account/client objects for signing transactions.

gas.js — Smart EIP-1559 gas estimation. Analyzes the last 20 blocks to calculate optimal maxFeePerGas and maxPriorityFeePerGas:

  • Fetches current baseFeePerGas from the latest block
  • Samples priority fees from recent transactions (75th percentile)
  • Applies 2x safety margin: maxFee = 2 × baseFee + priorityFee
  • 20% gas limit buffer on all transactions
  • Falls back to sensible defaults if estimation fails

Transaction Flow

User request
  → Load wallet from state/wallet.json
  → Create viem walletClient (with RPC failover)
  → Estimate gas (EIP-1559 smart estimation)
  → Build transaction
  → Sign locally with private key
  → Broadcast via public RPC
  → Return tx hash + explorer link

Security

  • Private key never leaves the machine — stored at ~/.cfx-wallet.json with chmod 600
  • Never logged or printed — the key is loaded in memory only when signing
  • Never in the project — wallet lives in user's home dir, not in version control
  • No external custody — no API keys, no third-party wallets, no accounts
  • Balance validation — checks sufficient funds before broadcasting

Tech Stack

  • Runtime: Node.js
  • EVM library: viem — lightweight, typed, modern
  • DEX aggregator: Odos — multi-hop, multi-source routing
  • RPCs: Public endpoints (no API keys)

License

MIT