@voiz/markets-sdk. Prefer instance methods and client.market|pool|user with a viem WalletClient or injected sendCalls. Call encoding and submission stay internal.
Construction
VoizMarketsClient
useVoiz().client over constructing by hand.
ClientConfig
withAddresses
Returns a new client with address overrides merged into the current map.Factories
VoizMarket, VoizPool, and VoizUser are not root-exported — obtain them here.
market
VoizMarket at address.
pool
VoizPool for an outcome token (optional collateral override).
user
VoizUser at address (trades / share positions / LP).
Catalog
listMarketAddresses
On-chain factory market list (zeros filtered out).isMarket
Whetheraddress is in the live factory market list.
listMarkets
Homepage catalog: indexer-first market summaries, with RPC factory + load fallback.ListMarketsResult
getErc20Balance
ERC-20balanceOf for any token.
getCollateralBalance
Collateral (addresses.collateral) balance for owner.
Writes
createMarket
Creates a market and resolvesmarketAddress from receipts / hashes when possible.
result, extracted hashes, and marketAddress when it can be parsed from receipts / waited hashes.
redeem
Redeems outcome tokens for collateral after resolution (or as allowed by the market).burn
Burns an LP NFT position via the PositionManager (same send path as redeem / swap). PassoutcomeToken (and optional collateralToken); the SDK builds the Uniswap v4 PoolKey internally.