Skip to main content
Yanga Wallet is a pnpm monorepo containing five packages, each with a distinct responsibility. Everything is written in TypeScript (except the optional Kora relay, which is Rust).

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)
Express Layer:
  • GET /.well-known/agent.json — machine-readable service manifest
  • GET /reputation — trust signals derived from audit log
  • GET /registry — on-chain registry of all registered agents
  • GET /api/fetch-price/:token — x402-gated live token pricing
  • GET /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:
  1. MerchantcreateX402Paywall(), buildRegistrationTx()
  2. BuyerAgentWallet, discoverRegistry(), X402Client
  3. Hybrid — full API surface

explorer — The Dashboard

A Next.js application that reads the on-chain Solana registry and renders a visual directory of all registered agents. Server-side fetched. Deployable to Vercel.

Data Flow: Autonomous Purchase

No human touched any step. The agent discovered, evaluated, paid, and received data completely autonomously.