> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voiz.digital/llms.txt
> Use this file to discover all available pages before exploring further.

# Helpers & utilities

> getAddresses, quoteSeed, display helpers, and erc20Abi

Root values and utilities from `@voiz/markets-sdk` (not class methods). Product types live beside the methods that return them (`client` / `market` / `pool` / `user`). `VoizMarket` / `VoizPool` / `VoizUser` come from `client.market|pool|user`, not the package root.

## Chains

### getAddresses

Resolves the known-chain address map, with optional overrides.

```ts theme={null}
const addresses = getAddresses(chainId)
// or getAddresses(chainId, { hook: CUSTOM_HOOK })
```

```ts theme={null}
// returns
{
  chainId: number
  marketFactory: Address
  adminOracle: Address
  multisigOracle: Address
  router: Address
  collateral: Address
  conditionalTokens: Address
  poolManager: Address
  positionManager: Address
  stateView: Address
  quoter: Address
  permit2: Address
  hook: Address
  seerV4Swap: Address
  fee: number
  tickSpacing: number
  hookFeeBips: number
}
```

## Seed quote

### normalizeOddsBps

Normalizes raw odds to `bigint` basis points that sum to `10_000` (each outcome 1%–99%).

```ts theme={null}
const oddsBps = normalizeOddsBps([40, 60])
```

```ts theme={null}
// returns
bigint[]
```

### quoteSeed

Seed collateral totals without needing outcome tokens (safe before create). Naming aligns with `pool.quoteTrade`.

```ts theme={null}
const { splitAmount, poolCollateral, totalCollateral } = quoteSeed({
  seedWei,
  oddsBps,
})
```

```ts theme={null}
// returns
{
  splitAmount: bigint
  poolCollateral: bigint
  totalCollateral: bigint
}
```

Share half (`splitAmount`), pool-side collateral, and total credits to lock.

## Display helpers

### resolvedDisplayRows

Fixed 0 / 1 display price rows for a resolved market (winner = 100%).

```ts theme={null}
const rows = resolvedDisplayRows({
  outcomes,
  wrappedTokens,
  numOutcomes,
  winningOutcome,
})
```

```ts theme={null}
// returns
Array<{
  index: number
  label: string
  token: T
  priceCt: number
  impliedPct: number
}>
```

### marketImagePath

Deterministic blob pathname for a market or outcome image.

```ts theme={null}
const main = marketImagePath(marketAddress)
const outcome0 = marketImagePath(marketAddress, 0)
// e.g. market-images/0x…/main.webp
//      market-images/0x…/outcome-0.webp
```

```ts theme={null}
// returns
string
```

### aggregateOutcomeCollateral

Sums liquidity or volume across outcome stats. Returns `null` if any row is missing.

```ts theme={null}
const liq = aggregateOutcomeCollateral(summary.outcomeStats, "liquidityCollateral")
```

```ts theme={null}
// returns
bigint | null
```

## ABI

### erc20Abi

ERC-20 fragment for front-end wallet paths (`balanceOf` / `allowance` / `approve` / `decimals` / `symbol`).

```ts theme={null}
const erc20Abi: readonly AbiFunction[]
```
