← all projects

Coin Ledger

@COR1999·Cian·8 followers·added 2026-10-24
0
stars
5.5k
lines
80
files
0
forks
8
followers
languages
TypeScript 99%JavaScript 1%

Coin Ledger is an on-chain financial operator for a small business: an agent proposes, a policy engine decides, a human approves, and one server path executes on Arc. The Gemini tool-calling agent in lib/agent/agent.ts gets read-only tools (getBalance, getObligations, getForecast, checkPolicy) plus a single proposePayment tool in lib/agent/tools.ts, every argument validated with zod, so it can only create pending proposals. The pure evaluatePolicy engine in lib/policy/engine.ts returns allowed, needs_approval or rejected and ships standalone as packages/agent-policy-gate, a dependency-free TypeScript package. lib/payments/execute.ts re-loads the proposal, re-runs the policy, verifies role-based approval authority, blocks duplicates and submits with a deterministicIdempotencyKey so retries dedupe with Circle; computeDecisionHash in decision-receipt.ts makes each decision auditable on a public transparency page. lib/payments/arc.ts moves EURC through Circle developer-controlled wallets behind a swappable PaymentProvider. 33 test files with 286 cases and CI cover the engines, agent tools and execution path.

events
tags
circle components
team · solo

1 (Solo) — Cian O'Rourke

last pushed 2026-10-12