Monorepo Layout
Package Dependency Graph
Package Breakdown
wallet-core — The Foundation
The cryptographic and protocol layer. Every other package depends on this.
mcp-server — The AI Interface
Exposes the wallet engine to AI agents via the Model Context Protocol, plus runs a concurrent Express API for merchant HTTP endpoints.
MCP Layer:
- 18 Tools — wallet management, transfers, tokens, x402 payments, registry discovery
- 9 Resources — read-only data streams (balances, audit logs, system status, policies)
- 5 Prompts — guided workflows (wallet setup, risk assessment, security audit, daily report, x402 payment)
GET /.well-known/agent.json— machine-readable service manifestGET /reputation— trust signals derived from audit logGET /registry— on-chain registry of all registered agentsGET /api/fetch-price/:token— x402-gated live token pricingGET /api/analyze-token/:address— x402-gated token security analysis
cli — Human Operator View
An Ink (React-for-the-terminal) TUI that gives operators real-time visibility into their agents:
- Live wallet balances and transaction feed
- Color-coded audit log (green = success, red = policy violation, blue = x402 payment)
- Interactive policy configuration (spending limits, whitelists)
- Secure wallet closure with SOL sweep
sdk — The npm Package
A single npm install agent-economy-wallet gives external developers access to the full API surface. Re-exports from wallet-core and mcp-server in a clean public interface.
Three developer personas:
- Merchant —
createX402Paywall(),buildRegistrationTx() - Buyer —
AgentWallet,discoverRegistry(),X402Client - Hybrid — full API surface