CA…

Choose a wallet

Sotto Wallet is preferred when it is installed. Any EIP-6963 wallet works for the admin panel.

Connecting shares your public address with this site. Read the privacy policy.
Docs

Sotto Connect

How the Sotto site talks to your wallet — EIP-6963 discovery, methods, permissions, private-balance sharing and trading sessions.

Sotto Connect is the interface between a web page and the Sotto wallet (the extension or the in-site wallet). The page is only a user interface and public market data; the private balance, the keys, the proofs and every signature stay in the wallet. The page never sees a recovery phrase, a note or a key.

Discovery and transport

  • The wallet is found through EIP-6963 (info.rdns === "xyz.sottoprivacy.wallet") and spoken to through the standard EIP-1193 request({ method, params }). params is a single object.
  • Events arrive through provider.on(name, handler).
  • Sotto methods are available only to the official origin (https://sottoprivacy.xyz). Any other origin gets error 4100 for every sotto_* method; it can still use the standard EVM methods for your public account, with the usual approval.

Permissions

  • Connect (sotto_connect) opens an approval window once per origin. It grants the selected public address (also for eth_accounts).
  • Private balance sharing is opt-in. The page sees your private balances and perps state only if you tick "Show my private balance on this site" when connecting (off by default). You can revoke it at any time in the wallet's Sites settings.
  • Every trade either opens an approval window in the wallet or runs inside a trading session you approved.

Trading sessions

A trading session lets the site trade without a window per trade:

  • you set a spend cap in USD (up to $100,000), a duration (1 minute to 8 hours) and the kinds allowed: swaps, tickets (quick trades), perps;
  • the wallet enforces the origin, the kinds, the cap (valued at quote time; sells and closes do not count), the expiry, the perps per-account cap, the fee caps and the route checks — the site's parameters are never trusted for prices, routes or recipients;
  • a session ends on lock (manual, auto-lock or the OS screen lock), after 15 minutes of inactivity, on browser or extension restart (sessions live in memory only), at expiry, or when you end it in the wallet. The page gets sotto_sessionChanged(null).

Methods

Amounts are decimal strings in base units unless named …Usd.

Method Purpose Approval
sotto_connect { wantBalances? } connect; returns version, public address, capabilities, whether balances are shared window once per origin
sotto_disconnect remove the grant and any session none
sotto_getState locked / connected / balances shared / current session (and, for a connected site, the version and capabilities) none
sotto_getBalances private balances (non-zero tokens, with USD where known) needs balance sharing
sotto_quote { tokenIn, tokenOut, amountIn, slippageBps? } a private-swap quote: rounded input, output, minimum, fees, route; valid 30 s, single use none
sotto_swap { quoteId } execute a private swap window, or a session with swaps
sotto_ticket { side, token, … } quick buy or sell (ticket or prepared swap) a session with tickets
sotto_prepareTickets { token, sizes } warm ticket stock and prices for a token page a session with tickets
sotto_exitPreview { token, amount, kind? } how a public exit will be rounded, and privacy warnings needs balance sharing
sotto_prepareDeposit { token, amount, from? } prepare notes for a deposit sent by another wallet none (nothing is spent)
sotto_startSession / sotto_endSession start or end a trading session window / none
sotto_perpsState one-time account value, positions, orders, fills, funding jobs needs balance sharing
sotto_perpsFund { amountUsd } fund a one-time account (100 / 500 / 1,000 / 5,000) window, or a session with perps
sotto_perpsOrder / sotto_perpsCancel / sotto_perpsClose trade on Hyperliquid (a spot coin such as @107 is a spot order: leverage 1, optional sizeCoin in tokens) window, or a session with perps
sotto_perpsWithdraw { amountUsd | all, timing? } return funds to the pool (default: at a random time 5–60 min later) window, always
sotto_hyperEvmQuote { amount, to, asset? } a private send of USDC to an address on HyperEVM (asset: 'HYPE': the recipient gets native HYPE for it; receive / minReceive are then in HYPE wei): rounded amount, fees, what arrives, and whether the relayer fee would be paid in USDC (feeVisible); minimum 5 USDC; valid about a minute, single use needs balance sharing
sotto_hyperEvmSend { quoteId, allowVisibleFee? } send it. A relayer fee in USDC is refused unless allowVisibleFee: true (the user said yes) window, always (never a session)
sotto_hyperEvmJobs your HyperEVM sends: sent, forwarded or refunded needs balance sharing

Capabilities: swap, tickets, perps, perpsFunding, balances, and from extension 1.0.10 hlSpot (spot orders) and hyperevm (HyperEVM sends), hyperevmHype (HYPE payouts on HyperEVM). A wallet without them answers 4200 to the new methods; the site then asks you to update the extension.

Events

sotto_balancesChanged and sotto_perpsChanged (to origins with balance sharing), sotto_sessionChanged, sotto_locked, plus the standard accountsChanged and chainChanged.

Errors

Code Meaning
4001 user rejected
4100 unauthorized origin, not connected, no session, or balances not shared
4200 unsupported method
4900 wallet locked
-32602 bad parameters
-32002 a connect window is already open
5001 limit exceeded (session cap, kind not allowed, perps cap)
5002 quote expired or price moved
5003 service unavailable or no route