Skip to main content

Components

ComponentRole
client/Next.js 14 frontend — onboarding, dashboard, send/receive, WalletConnect, invoices
server/Express API — inline risk analysis, queue management, Zerion portfolio
agent/OpenClaw skill pack — Telegram commands, deep analysis, 2nd signature, pattern recording

Client

  • Next.js 14 App Router, React 18, TypeScript, Tailwind CSS, Framer Motion
  • Privy for Google OAuth + embedded wallet creation
  • Deploys a Safe 2-of-2 smart account per user (owner = user’s embedded wallet, co-signer = agent address)
  • Signs 1-of-2, then POSTs to /queue
  • WalletConnect v2 — acts as a wallet for DApps; requests flow through the same pipeline
  • Portfolio via Zerion API (live balances, prices, 24h change)

Server

  • Express with TypeScript (tsx for dev, PM2 for production)
  • Runs analyzeRisk() inline on every /queue request — no async roundtrip
  • File-based JSON storage shared with the agent

Agent

  • OpenClaw skill pack — holds the 2nd signing key
  • Responds to Telegram commands from the owner
  • Runs deep analysis (GoPlus + Honeypot.is) on REVIEW-tier transactions
  • Records patterns after every confirmed transaction

Data Flow

State Files

FilePurpose
pending-queue.jsonQueued transactions awaiting processing
invoice-queue.jsonPending invoice requests
state.jsonScreening mode and agent decisions
patterns.jsonLearned behavioral patterns

Tech Stack

LayerTechnology
ChainBNB Chain (BSC), Chain ID 56
Smart AccountSafe 1.4.1 + ERC-4337 (EntryPoint v0.7)
Bundler/PaymasterPimlico (gasless)
FrontendNext.js 14, React 18, TypeScript, Tailwind CSS, Framer Motion
AuthPrivy (embedded wallets + Google OAuth)
Blockchain libsviem, permissionless.js
BackendExpress, tsx (dev), PM2 (production)
AI AgentOpenClaw with Qwen3-235B / Claude Sonnet 4.5 via OpenRouter