← all projects

Countersign

@rajkaria·Raj Karia·10 followers·added 2026-10-24
0
stars
22k
lines
184
files
0
forks
10
followers
languages
TypeScript 92%Solidity 6%JavaScript 2%

Countersign checks what a business owes before money moves. The Next.js and PostgreSQL workspace reconciles contractor invoices against versioned agreements, customer acceptance and prior payments, and routes exceptions into a source-linked review with ASK, HOLD and PAY outcomes; the domain layer in src/lib/domain (ledger.ts, permit.ts, receipt.ts, planner.ts) handles amended terms, renamed duplicates and partial payments. proposeDecisionWithModel in src/lib/integrations/agent.ts sends tenant-authorized evidence to DeepSeek or OpenAI and only proposes, while authorizePreparedPayment in src/lib/server/authorization.ts keeps approval and release deterministic and gated. On-chain, contracts/src/CountersignModule.sol is a Safe module that executes a signed PaymentPermit inside per-engagement and rolling spend caps with pause and revoke, ReservedProtection.sol allocates reserved capacity and settles claims, and RestrictedCctpAdapter.sol limits CCTP burns to enabled routes. A worker container relays execution through the Circle CLI (src/lib/integrations/relay.ts) on Arc testnet, and portable receipts trace obligation, agreement, authority and settlement.

events
tags
circle components
builder bio

Building Stuff

team · solo

1 (Solo) — Raj Karia

on xx/rajkaria_
repo description

Agreement-aware payment operations with constrained Safe authority

last pushed 2026-10-16