@quillai-network/x402-wach
v2.0.0
Published
CLI SDK for WACH.AI token risk analysis via x402 payments
Readme
x402-wach
A CLI and SDK for WACH.AI token risk analysis, powered by x402 and secured with Coinbase AWAL.
Payments are made in USDC on Base. Private keys are not stored in this project.
x402-wach verify-risk 0xA0b8...3E8 ethSecurity Model
x402-wachno longer storeswallet.jsonor raw private keys.- Signing and wallet custody are handled by AWAL and keys are secured with coinbase infrastructure
- The CLI can enforce per-request maximum payment (
--max-amount-atomic).
Quick Start
Install
# Clone & install
git clone <repo-url> && cd x402-
npm install
npm run build
# Link CLI globally
npm linkSet up AWAL wallet
# Check readiness
x402-wach wallet setup
# Start OTP login
x402-wach wallet login [email protected]
# Complete OTP verification
x402-wach wallet verify <flowId> <otp>
# Check wallet address and balance
x402-wach wallet address
x402-wach wallet balanceAnalyze a token
x402-wach verify-risk <TOKEN_ADDRESS> <CHAIN_NAME>Example:
x402-wach verify-risk 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 ethSupported Chains
| Short Name | Chain | Chain ID |
| ---------- | ------------------- | -------- |
| eth | Ethereum | 1 |
| pol | Polygon | 137 |
| base | Base | 8453 |
| bsc | Binance Smart Chain | 56 |
| sol | Solana | solana |
The token being analyzed can be on any supported chain. Payment is always USDC on Base.
CLI Commands
| Command | Description |
| ----------------------------------------------------------------- | ---------------------------------------------- |
| x402-wach verify-risk <tokenAddress> <chainName> | Analyze token risk (x402 payment via AWAL) |
| x402-wach verify-risk ... --max-amount-atomic 10000 | Enforce max $0.01 x402 spend for that request |
| x402-wach wallet setup | Check AWAL install, auth, and funding readiness|
| x402-wach wallet doctor [--min-usdc-atomic 10000] | Run AWAL diagnostics with remediation hints |
| x402-wach wallet login <email> | Start AWAL OTP login |
| x402-wach wallet verify <flowId> <otp> | Complete AWAL OTP verification |
| x402-wach wallet status | Show raw AWAL status |
| x402-wach wallet address | Show AWAL wallet address |
| x402-wach wallet balance [--chain base|base-sepolia] | Show AWAL wallet balance |
| x402-wach chains | List supported token analysis chains |
| x402-wach guide | Show setup and usage guide |
Programmatic Usage
import { verifyTokenRisk, getAwalReadiness } from "@quillai-network/x402-wach";
const readiness = await getAwalReadiness(10_000);
if (!readiness.ready) {
throw new Error(readiness.reasons.join("; "));
}
const report = await verifyTokenRisk(
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"eth",
{ maxAmountAtomic: 10_000 }
);
console.log(report);See usage.md for a complete SDK reference.
License
MIT
