ORRANGE / Architecture

System Architecture

The app is a Next.js consumer layer over the existing STRK20 infrastructure. It composes — it does not re-implement — the privacy protocol.

Browser (Next.js / React)

├─ /wallet · /send · /receive · /treasury · /activity

├─ WalletContext ── balance, tx state, permissions

├─ Lane A: privacy wallet → Wallet API (wallet_strk20*)
├─ Lane B: Privy embedded wallet → vendored STRK20 SDK

├─ /api/ai/analyze ── Hamster proposal + policy verdict

└─ services/ ── treasury gate, prices, swap, wallet API


STRK20 pool · prover · discovery · Starknet RPC

App organization

DirectoryResponsibility
src/app/App Router pages: wallet, send, receive, treasury, activity, launch, docs.
src/ai/Hamster: provider, schema, proposal validation, portfolio, policy engine, health, prices.
src/privacy/STRK20 privacy integration: Privy adapter, Ready account derivation, signing, viewing-key store.
src/services/Wallet API service, STRK20 crypto, treasury execution gate, prices, swap, viewing-key service.
src/context/Wallet / network / Privy-wallet React context and state.
src/config/Networks, tokens, launchpad configuration.
src/components/Wallet UI, app shell, landing, docs shell.

Two STRK20 lanes

ORRANGE reaches the STRK20 pool through two lanes, selected by how you connect:

  • Lane A — Wallet API. A privacy wallet (Ready) owns viewing keys, notes, discovery, proofs, and submission via wallet_strk20InvokeTransaction and wallet_strk20Balances. See STRK20 Integration.
  • Lane B — Privy embedded wallet + SDK. ORRANGE provisions an embedded Privy wallet, derives the Ready account, and uses the vendored STRK20 SDK for discovery, proving, and submission. See Private Identity.

The AI treasury path

/treasury reads balances through the active lane, then talks to /api/ai/analyze. The endpoint fetches fresh prices, builds a privacy-minimized portfolio, asks the AI for a structured proposal, and returns a deterministic policy verdict. Execution happens client-side through the existing private-transfer path, gated byexecuteProposal. See AI + Policy Architecture.

What the app does not implement

ORRANGE is not a new wallet, privacy pool, proof system, or cryptographic protocol. It does not run a prover or an indexer, and it does not integrate the SDK’sshadow_account_anonymizer. Those live in the STRK20 infrastructure and the connected wallet.

Deeper technical documents