@voiz/markets-sdk with plain viem — scripts, backends, or non-React frontends.
Install
Create a client
walletClient (sequential txs) or sendCalls (Privy / account abstraction batch). High-level methods use whichever you inject — call market.seed, pool.swap, and similar; do not submit batches from app code yourself.
getAddresses(chainId) resolves the known address map. Pass addresses overrides when you redeploy.
List markets
markets is MarketSummary[] — the shape for catalog and detail (Ponder first, RPC fallback via source / usedFallback).
Seed a market
The only public seed write ismarket.seed. Preview collateral with quoteSeed first:
Quote and swap
user must be the address that holds collateral (or outcome tokens on sell) and has approved the swap helper. For AA that is the smart-wallet msg.sender, not a separate embedded EOA.
Market, pool, and user
Next
- Key concepts
- React quickstart if you later wrap a UI
- Guides: trade, seed, create market