Architecture
The whole system on one page: the rail, the site's three API routes, the browser, and the order states.
Anew is one website on one rail. The website asks for quotes, reports statuses and keeps fresh keys in your browser, and NEAR Intents moves the value. Anew runs no contract, no server wallet and no database anywhere on the road.
The road
Zcash NEAR Intents (1Click) Solana (Solana)
+---------------+ +----------------------+ +----------------------+
| your shielded | | one-time deposit | | your receiving |
| balance |---->| address (t1...) |------>| address |
+---------------+ +----------------------+ +----------------------+
a deshield of a solver fills native SOL, paid
X ZEC the intent by the solver
^
| live quote: recipient = your address
| refundTo = your t1 or t3 address
+---------+----------+
| Anew API routes | quote, status, deposit, rails
| (store nothing) |
+---------+----------+
^
|
+---------+----------+
| your browser | fresh keys, orders; reads chain
| | Solana from the public RPC
+--------------------+
The rail
NEAR Intents is a network where solvers fill swap requests. 1Click is its API: you ask for a quote, you receive a deposit address, and once the deposit arrives a solver pays the output on the destination chain.
- Anew asks for ZEC (
nep141:zec.omft.near) in and native SOL on Solana (nep141:sol.omft.near) out, exact input, withrecipientset to your address andrefundToset to your transparent Zcash address. - A dry quote prices the trip and creates nothing. A live quote returns a one-time transparent deposit address and a deadline.
- 1Click watches Zcash for the deposit, runs the fill and reports the status by deposit address.
- Observed on 2026-09-23: a time estimate of 454 to 456 seconds, and 0.1 ZEC to about 0.0597 SOL. The rate moves with the market; the calculator on the home page prints the live one.
The order flow uses this direct rail alone. A hop through a second chain would need someone to hold the SOL between the two legs and to sign the second transaction, and Anew leaves that party out. Rails covers the statuses, the timing and the fees.
The site
The site is a Next.js 16 application on the App Router. It runs on Vercel, deployed 2026-09-23 from web/, and the same build runs on a local machine for development.
| Page | Purpose |
|---|---|
/ |
The road, a live calculator built on dry quotes, the state of the rails. |
/start |
The Start page: address, amount, refund address, deposit screen, order status. |
/hold |
The Hold page: balances of fresh addresses and a connected wallet, transfers signed in the browser. |
/stats |
The Stats page: rail prices, Solana's slot and epoch, numbers from your own browser. |
/docs, /whitepaper, /terms |
Reading. |
The site loads no analytics scripts, and Anew sets no cookies. Its Content Security Policy lets the page connect to itself, to the Solana RPC and to the hosts that Privy and WalletConnect need, and to nothing else.
The API routes
| Route | Upstream | Returns | Keeps |
|---|---|---|---|
POST /api/quote |
1Click POST /v0/quote |
a dry price, or a deposit address with its deadline, amounts and fees | nothing |
GET /api/status?d= |
1Click GET /v0/status |
the status, amounts, refund data, transaction hashes, and the recipient NEAR Intents recorded | nothing |
POST /api/deposit |
1Click POST /v0/deposit/submit |
an acknowledgement that NEAR Intents has the Zcash transaction id | nothing |
GET /api/rails |
one 1Click dry quote and the 1Click token list | the price for 0.1 ZEC, whether the rail is quoting at all, ZEC and SOL prices, the fee setting | a sixty-second cache |
The routes exist so that the optional 1Click partner key (ONECLICK_JWT) and the fee recipient stay on the server. A limiter in each server instance caps quotes at thirty a minute per connection; it counts in memory and writes nothing to disk. The API page has the request and response shapes.
The browser
The browser carries every part that touches your keys and your records.
- It asks
/api/statusabout the order every ten seconds until the order reaches a final state, and compares the recipient and asset that NEAR Intents recorded with the ones you chose. - It reads Solana from the public RPC
https://solana-rpc.publicnode.com, withhttps://api.mainnet-beta.solana.combehind it and no Anew server in between: balances, signatures, slot and epoch. - It makes fresh ed25519 keys with @noble/curves and keeps them in localStorage under
anew.keys, next to the orders underanew.orders. The secret is stored as 64 bytes in base58, the format Phantom and Solflare import. - It checks the refund address as base58check with the Zcash mainnet prefixes (
t1=0x1CB8,t3=0x1CBD) and the double SHA-256 checksum, and refuses shielded and TEX addresses with an explanation. - It holds the Start page to amounts between 0.01 and 2 ZEC per trip.
- It draws the deposit QR code and signs the Hold page's transfers with the fresh key.
- It links transactions and addresses to the explorer at
https://solscan.io.
Privy, optional
Privy connects a wallet when you choose My wallet or the sign-in button in the header. Anew uses the Privy React SDK with the App ID alone: no App Secret exists anywhere in Anew, and Anew calls no Privy server API. The SDK's default and only chain is Solana, Solana.
The SDK loads on the Start and Hold pages, when you hover over, focus or click the sign-in button in the header, and on any page once this browser holds a Privy session from an earlier sign-in. Anew uses it to fill in the receiving address, to show the connected wallet's SOL on Solana, and to ask the wallet to switch to Solana or add it.
Order states
PENDING_DEPOSIT -> KNOWN_DEPOSIT_TX -> PROCESSING -> SUCCESS
Other statuses from 1Click: INCOMPLETE_DEPOSIT, REFUNDED, FAILED
The page's own label: EXPIRED (the deadline passed with no deposit)
SUCCESS, REFUNDED, FAILED and EXPIRED are final, and the page stops asking once it sees one. Each status reaches the page through /api/status, and the page saves the latest one with the order in localStorage.
What runs where
| Component | Runtime | State |
|---|---|---|
| Pages and API routes | Next.js 16 on Vercel | no records of trips; a sixty-second rails cache and per-connection quote counts in memory; the host's standard request logs |
| Your browser | your machine | anew.orders, anew.keys, and the backup file you downloaded |
| NEAR Intents 1Click | NEAR Intents | the quote, the deposit address, the swap |
| Solana | Solana | your address and its SOL |
| $ANEW | Solana, planned | nothing yet |