STRK20 Integration
ORRANGE reaches STRK20 through two supported lanes. Both end at the same pool; only who holds the secrets differs.
This page documents the actual integration. ORRANGE does not implement its own privacy pool, prover, or cryptography — it composes the existing STRK20 infrastructure.
The pipeline
private identity (STRK20 user)
│
▼
STRK20 privateTransfer
│
▼
prover (validity proof)
│
▼
discovery (indexer / wallet scan)
│
▼
wallet signature
│
▼
Starknet (STRK20 pool)Lane A — privacy wallet + Wallet API
The dapp connects a privacy-enabled Starknet wallet (e.g. Ready) and asks it to perform STRK20 actions. The wallet owns viewing keys, channels, encrypted notes, proof generation, and submission. The dapp never inspects or stores any of those.
wallet_strk20InvokeTransaction— submit a STRK20 action (deposit/withdraw/transfer).wallet_strk20Balances— read private balances (the wallet’s discovery output).
There is no standalone registration RPC: the wallet adds the viewing-key registration + channel setup actions to your first real STRK20 action (autoRegister /autoSetup).
Lane B — Privy embedded wallet + vendored SDK
ORRANGE can provision an embedded Privy wallet instead. It derives the counterfactual Ready account on-chain address from the public key (computeReadyAccountAddress), deploys it if needed, and uses the vendored @starkware-libs/starknet-privacy-sdk for note discovery, proving, and submission through a starknet.js Account. Signing is delegated to Privy’s server-side rawSign via /api/privy/sign — the browser never holds the private key.
Who owns what
| Concern | ORRANGE | Privacy wallet |
|---|---|---|
| Viewing key | Never sees it | Owns + stores it |
| Encrypted notes | Never sees them | Discovers + decrypts |
| Proofs | Never generates them | Generates (or SDK/prover) |
| Signing | Never signs | Signs (or Privy rawSign) |
| Balances | Reads from wallet, authoritative | Source of truth |
References
- docs/PRIVY_STRK20_ARCHITECTURE.md — signing, proving, note lifecycle, recovery for the Privy lane.
- docs/PRIVATE_RECEIVING_ARCHITECTURE.md — the receive/registration architecture.
- docs/PRIVY_STRK20_COMPATIBILITY_AUDIT.md — on-chain compatibility verification.
