refetchStates
Re-fetches all on-chain accounts (config, oracle, curve metadata, prefabs) in parallel and updates the instance in-place. Best to run first to get the latest pool data.getMidprice
Current midprice decoded from the on-chain Q32 oracle value.number
getSpreadFactor
Current base-spread factor decoded from the on-chain Q32 oracle value. A factor of 0.9995 means 5 bps of spread.number
getActiveCurveSlots
Returns the slot index for each active curve.{ priceBid: number, priceAsk: number, riskBid: number, riskAsk: number }
getActiveCurves
Decodes and returns all four active curves from the appropriate prefab data.{ priceBid: CurveSide, priceAsk: CurveSide, riskBid: CurveSide, riskAsk: CurveSide }
EachCurveSidecontains:
getCurveSlot
Decode a specific curve slot by type and index.CurveSide