← all projects

BizFlow Pilot V2

@Solking-crpto·Tochukwu SN·added 2026-10-23
0
stars
30k
lines
196
files
0
forks
0
followers
languages
TypeScript 94%JavaScript 5%Solidity 1%

BizFlow Pilot V2 puts business controls in front of every USDC payment on Arc. Suppliers, purchase orders, goods receipts and invoices live in a Prisma schema, and each invoice is run through lib/matching/threeWayMatch.ts (quantity against receipt, unit price against PO within a basis-point tolerance) and lib/matching/duplicateDetector.ts before money moves. A deterministic engine in lib/policy/engine.ts applies ten rules, from vendor status and wallet cooldowns to per-vendor and daily caps and a kill switch, and emits a canonical decisionHash. Payments are non-custodial: app/api/payments/intent/route.ts issues a signed intent, the user's wallet signs the ERC-20 transfer to 0x3600000000000000000000000000000000000000, and lib/payment/receipt-verifier.ts checks the receipt against both the USDC contract log and Arc's 18-decimal system-emitter log. Every step is hash-chained in lib/audit/ledger.ts, and contracts/AuditAnchor.sol records per-organization invoice and ledger-root commitments on chain. Sign-in uses SIWE with EIP-6963 wallet discovery, and 205 vitest cases cover the engines and guards.

tags
circle components
last pushed 2026-10-22