API index
Map of sv3Client namespaces to the pages that document them.
Short names on the client. Verbose selectors on chain. The SDK wraps the ABI; it does not invent writes.
Do not pass a market ID, CREATE2 salt, or client nonce into create-market. The factory assigns identity.
Get started
- Getting started — install, initialize, first quote
- createSv3Client — parameters and wallet binding
- parseUsdc — 6dp / 18dp brands
Reads
- getQuoteState — frozen
MarketSnapshot - getTradeContext — snapshot + balances
- getAccountContext — plus position
Actions
- prepareBuyForReserveBudget — spend at most this USDC
- prepareBuyExactReserveIn — spend exactly this USDC
- getRequirements — permit or approve, never hidden
- executePrepared — simulate as wallet, then send
- wait — receipt + decoded events
- Errors
Floor policy
- quoteNextRaise — eligibility, plan, witness
- raiseIfEligible — permissionless raise, including batched sends
- Floor keeper — operator client, not a protocol role
Namespaces
| Namespace | Use |
|---|---|
sv3.market | Snapshot and context bundles |
sv3.quote | Same math as /math, but loads chain state if you pass an address |
sv3.trade | prepare* for buys, sells, redeem, budget/target helpers |
sv3.position | Position reads, getMaxActions |
sv3.authorization | getRequirements |
sv3.transactions | execute, simulatePrepared, sendPrepared, wait |
sv3.floor | quote, prepare, simulate, raise, batched Multicall3 raise |
sv3.network | native balance, nonce, block |
sv3.errors | parse / toError |
sv3.factory / sv3.directory | Launch sequence, pause, caps |
sv3.math / @repo/contract-client/math | Math |
sv3.units | parseUsdc |
Entrypoints
| Import | For |
|---|---|
@repo/contract-client | Safe app surface |
@repo/contract-client/math | Pure quotes |
@repo/contract-client/types | asUsdcRaw, asAvmAtoms, asWad |
@repo/contract-client/artifacts | Interface ABIs |
@repo/contract-client/admin | Pause helpers — not for the browser app |
@repo/contract-client/testing | Local Anvil harness |
@sv3-protocol/sdk is the future public name. It is not on npm yet.