@somnia-chain/markets-sdk / index / SeedOptions
Interface: SeedOptions
Defined in: packages/sdk/src/liveTail.ts:87
Options for a chain-seeded watch.
Properties
seed
seed:
"chain"
Defined in: packages/sdk/src/liveTail.ts:102
Seed source; "chain" selects the indexer-free path.
ONE POOL PER CALL. N pools means N watchMarket calls, because a
(pool, marketId) binding is 1:1 at any instant and this option carries
one id. The N calls share one tail and one subscription set, so they
hydrate independently and each pool keeps its own seed status — read it
with getSeedStatus(pool), not getLiveStatus(), which reports the most
recent seed only.
Read cost per pool, worst case: 2 × maxPages contract reads, one drain
per side, plus the module read for the market row. At the defaults that is
80 reads per pool, and it stops early on a side that runs out of orders.
marketId
marketId:
string
Defined in: packages/sdk/src/liveTail.ts:110
Market id the pool currently serves — book reads filter on it.
Read it from chain with getPoolMarketBinding(pool) when the indexer is
unreachable; the seed rejects an id whose on-chain record names a
different pool.
maxCount?
optionalmaxCount?:number
Defined in: packages/sdk/src/liveTail.ts:112
Orders per drained page. Defaults to 500.
maxPages?
optionalmaxPages?:number
Defined in: packages/sdk/src/liveTail.ts:120
Page budget per side. Defaults to 40, so the default drain covers 20,000
resting orders per side. Reaching the budget is reported as
getSeedStatus(pool).seedTruncated, not thrown. Prefer that per-pool read
over getLiveStatus().seedTruncated, which another pool's later seed
overwrites.