TanStack Start is a full-stack React framework with classic SSR + hydration (no React Server Components). Aurum’s AurumProvider is 'use client'-marked and SSR-safe — getServerSnapshot returns the initializing state on the server, then the real connection state hydrates on the client. No special boundaries are needed.
The Aurum constructor is SSR-safe — it guards window and localStorage access internally — so this module imports cleanly on both server and client.
new Aurum() is a singleton; calling it again returns the existing instance. Keep this file as the only place you construct it, and import aurum from here everywhere else.
isInitializing is true during SSR and during the brief client-side connection-restore. Always render a placeholder so the server-rendered HTML and the first client paint match.
Route loaders and server functions cannot read wallet state. Loaders run on the server, where there is no wallet connection. Read the wallet client-side and pass any signed/derived data to server functions (e.g. via SIWE).
beforeLoad cannot gate routes by connection. Use a client-side guard component or read useAccount() inside the route component instead.
Don’t construct multiple Aurum instances per route. Keep one src/lib/aurum.ts import everywhere.
Server functions can verify a signed message to prove ownership of an address — sign it client-side with viem/ethers, then pass { address, signature, message } to the server function for verification.