← all projects

Arc Settlement Bridge

@Tum-404·Tum·7 followers·added 2026-10-24
0
stars
9.7k
lines
118
files
0
forks
7
followers
languages
PHP 76%Vue 22%TypeScript 2%Shell 1%

Arc Settlement Bridge pays an invoice exactly once. app/Infrastructure/SolidInvoice/SolidInvoiceGateway.php polls SolidInvoice for unpaid invoices, app/Domain/Settlement/Services/IdempotencyKeyGenerator.php derives a deterministic key backed by a uniqueness constraint, and SettlementStateMachine.php drives the CREATED, SUBMITTED, SUBMISSION_UNKNOWN, CONFIRMED and FAILED transitions. app/Infrastructure/Arc/CircleClient.php encrypts the entity secret with RSA-OAEP and submits POST /v1/w3s/developer/transactions/transfer from a Circle developer-controlled wallet, CircleWebhookVerifier.php checks Circle's ECDSA webhook signatures, and reconciliation marks the invoice paid only after confirmation passes recipient, amount and currency checks with a transaction hash. RecoverUnknownSettlements resolves ambiguous submissions by the original provider key, and InvoiceGateway/SettlementProvider contracts keep the ERP adapter separate from settlement. A Vue dashboard, Docker stack and 16 Pest feature tests (IdempotencyTest, WebhookTest) complete it.

events
tags
circle components
team · solo

1 (Solo) — Tum Teeradach

last pushed 2026-10-17