Skip to content

Commit a397248

Browse files
committed
Created Auron sdk, now the devs can be able to use Auron for payment initiation and intent parsing
1 parent 721028a commit a397248

19 files changed

Lines changed: 2692 additions & 85 deletions

File tree

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Auron
22

3-
**Programmable financial operating infrastructure for the stablecoin internet.**
3+
**Crypto solved sending dollars. It never finished the payment.**
44

5-
Auron is the coordination layer between payment intent and settlement execution — the infrastructure primitive that lets users, merchants, businesses, and AI systems move value globally using stablecoins, without touching traditional banking rails.
5+
A freelancer paid in USDC still can't pay rent with it. Auron finishes the payment: USDC in a Phantom wallet → 7-point on-chain verification → rupees delivered over UPI through licensed offramp partners, in seconds, with cryptographic proof at every step.
66

7-
The blockchain is an implementation detail. The product is the infrastructure.
7+
Not a wallet. Not an escrow. A settlement layer — the primitive is **verified settlement**: no rupee moves until the on-chain leg is proven, and no failure can strand funds.
88

9-
**[Live Demo](https://auron-mocha.vercel.app) · [Pay Link](https://auron-mocha.vercel.app/pay/demo?amount=500&note=Lunch) · [Solana Blink](https://auron-mocha.vercel.app/api/actions/pay?to=demo&amount=500&currency=INR)**
9+
**[Live Demo](https://auron-mocha.vercel.app) · [Live Stats](https://auron-mocha.vercel.app/stats) · [Pay Link](https://auron-mocha.vercel.app/pay/demo?amount=500&note=Lunch) · [Solana Blink](https://auron-mocha.vercel.app/api/actions/pay?to=demo&amount=500&currency=INR)**
10+
11+
> **Current status — stated plainly:** the full pipeline is live on devnet USDC — verification, ledger, state machine, routing, auto-refund, receipts. One step is simulated: the final INR payout, pending OnMeta production KYB. Simulated payouts are explicitly labeled on the public stats page. Nothing is disguised.
1012
1113
---
1214

@@ -55,6 +57,20 @@ Every component below is in production code, not roadmap:
5557

5658
---
5759

60+
## Traction (live ledger)
61+
62+
- 29 payments processed through the full pipeline; ₹9,000+ equivalent settled
63+
- Average settlement: **5 seconds** from on-chain verification to payout confirmation
64+
- 136 append-only ledger entries — full audit trail public at [/stats](https://auron-mocha.vercel.app/stats)
65+
- 0.82 USDC protocol revenue accrued from the 0.85% spread — the business model runs from transaction one
66+
- Failure handling proven in production: 12 induced failure-path tests, 100% auto-resolved (refund or recovery), zero manual intervention
67+
68+
## Compliance Posture
69+
70+
Auron never custodies INR. Fiat payout executes exclusively through licensed partners — OnMeta (FIU-registered) and Razorpay X (RBI-licensed payments platform). Auron's role is verification, routing, state, and proof. On-chain funds are user-custodied (Phantom) until the moment of transfer, and any terminal failure returns USDC on-chain automatically.
71+
72+
---
73+
5874
## The Infrastructure Gap
5975

6076
India's UPI network processes ₹20 trillion per month across 350 million users. It is the most active real-time payment system on earth.

apps/web/android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
android:roundIcon="@mipmap/ic_launcher_round"
99
android:supportsRtl="true"
1010
android:theme="@style/AppTheme"
11+
xmlns:tools="http://schemas.android.com/tools"
1112
android:usesCleartextTraffic="false"
13+
tools:replace="android:usesCleartextTraffic"
1214
android:networkSecurityConfig="@xml/network_security_config">
13-
15+
1416
<activity
1517
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation|density"
1618
android:name=".MainActivity"

apps/web/app/api/razorpay/route.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ function validate(body: unknown):
6767
export async function POST(req: NextRequest): Promise<NextResponse> {
6868
const start = Date.now();
6969

70-
// Verify Razorpay is configured
70+
// Verify Razorpay is configured verifying is razorpay credentials are avaiable or not
7171
if (!process.env.RAZORPAY_KEY_ID || !process.env.RAZORPAY_KEY_SECRET) {
72-
console.error("[/api/razorpay] Missing RAZORPAY_KEY_ID or RAZORPAY_KEY_SECRET");
72+
console.error("[/api/razorpay] Missing RAZORPAY_KEY_ID or RAZORPAY_KEY_SECRET"); // just a check for id and api key
7373
return NextResponse.json(
7474
{ error: "Razorpay not configured on server", retryable: false },
7575
{ status: 503 }
@@ -78,7 +78,7 @@ export async function POST(req: NextRequest): Promise<NextResponse> {
7878

7979
let body: unknown;
8080
try { body = await req.json(); }
81-
catch { return NextResponse.json({ error: "Invalid JSON body" }, { status: 400 }); }
81+
catch { return NextResponse.json({ error: "Invalid JSON body" }, { status: 400 }); }
8282

8383
const validation = validate(body);
8484
if (!validation.ok) {

apps/web/app/api/v1/pay/route.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,13 @@ async function dispatchSettlement(
9191
}
9292
}
9393

94-
// ── Config ────────────────────────────────────────────────────────────────────
95-
9694
const MAX_INR_PER_TX = 200_000; // ₹2 lakh per transaction
9795
const MAX_USDC_PER_TX = 2_500;
9896

9997
const TREASURY_ADDRESS: string =
10098
process.env.NEXT_PUBLIC_FEE_WALLET ??
10199
(() => { throw new Error("NEXT_PUBLIC_FEE_WALLET is not set. Treasury address is required."); })();
102100

103-
// ── Request schema ────────────────────────────────────────────────────────────
104101

105102
interface PayRequest {
106103
paymentId: string;

apps/web/app/providers.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,28 @@ export default function Providers({ children }: { readonly children: ReactNode }
3131

3232
useEffect(() => {
3333
initNotifications().catch(console.error);
34+
// If MetaMask was previously stored as the selected wallet (via Wallet
35+
// Standard auto-discovery), clear it so autoConnect targets Phantom only.
36+
const stored = localStorage.getItem("walletName");
37+
if (stored && stored !== "Phantom") localStorage.removeItem("walletName");
3438
}, []);
3539

3640
return (
3741
<ConnectionProvider
3842
endpoint={RPC_ENDPOINT}
3943
config={{ commitment: "confirmed" }}
4044
>
41-
<WalletProvider wallets={wallets} autoConnect>
45+
<WalletProvider
46+
wallets={wallets}
47+
autoConnect
48+
onError={(err) => {
49+
// MetaMask v11+ registers itself via the Wallet Standard Solana
50+
// interface and throws when our Phantom-only app tries to connect.
51+
// Suppress it — the user never selected MetaMask intentionally.
52+
if (err.message?.includes("MetaMask")) return;
53+
console.error("[wallet]", err);
54+
}}
55+
>
4256
<WalletModalProvider>
4357
<QueryClientProvider client={queryClient}>
4458
{children}

apps/web/app/stats/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ export default function StatsPage() {
637637
icon={Shield}
638638
label="Success Rate"
639639
value={`${s.success_rate}%`}
640-
sub={s.failed > 0 ? `${s.failed} failed` : "No failures"}
640+
sub={s.failed > 0 ? `${s.failed} failed · incl. deliberate failure-path tests, all auto-refunded` : "No failures"}
641641
valueColor={C.lime}
642642
delay={0.1}
643643
/>
@@ -791,10 +791,12 @@ export default function StatsPage() {
791791
{/* Badges row */}
792792
<div style={{ display: "flex", alignItems: "center", gap: 6, marginTop: 6, flexWrap: "wrap" }}>
793793
{row.utr && (
794-
!row.utr.startsWith("DEMO_") ? (
794+
!row.is_demo ? (
795795
<span className="utr-real">UTR {row.utr}</span>
796796
) : (
797-
<span className="utr-demo">DEMO settlement</span>
797+
<span className="utr-demo" title="On-chain leg is real; INR payout is simulated until offramp KYB clears">
798+
simulated payout · KYB pending
799+
</span>
798800
)
799801
)}
800802
{row.recovered && (

apps/web/capacitor.config.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,25 @@ import type { CapacitorConfig } from '@capacitor/cli';
1111
*
1212
* Update `server.url` after Vercel deployment.
1313
*/
14+
const serverUrl = process.env.CAPACITOR_SERVER_URL || 'https://auron.vercel.app';
15+
const isLocalDev = serverUrl.startsWith('http://');
16+
1417
const config: CapacitorConfig = {
1518
appId: 'xyz.auron.app',
1619
appName: 'Auron',
1720
webDir: 'out', // Fallback — not used when server.url is set
1821

1922
server: {
20-
url: process.env.CAPACITOR_SERVER_URL || 'https://auron.vercel.app', // set CAPACITOR_SERVER_URL for local dev
21-
cleartext: false,
23+
url: serverUrl, // set CAPACITOR_SERVER_URL=http://10.0.2.2:3000 for emulator dev
24+
cleartext: isLocalDev, // needed for http:// local dev server
2225
androidScheme: 'https',
2326
},
2427

2528
android: {
2629
backgroundColor: '#030712',
27-
allowMixedContent: false,
30+
allowMixedContent: isLocalDev,
2831
captureInput: true,
29-
webContentsDebuggingEnabled: process.env.NODE_ENV !== 'production',
32+
webContentsDebuggingEnabled: isLocalDev,
3033
},
3134

3235
plugins: {

0 commit comments

Comments
 (0)