@somnia-chain/markets-sdk / index / binaryResolutionMode
Function: binaryResolutionMode()
binaryResolutionMode(
strike):BinaryResolutionMode
Defined in: packages/sdk/src/markets.ts:780
Read a binary market's BinaryResolutionMode off its strike — the ONE
place that reading happens.
Strike 0 is reference mode DECLARING "no fixed strike": a sentinel, never a $0
threshold. _strikeLabel treats 0 as "no strike fragment" and reference
resolution compares two numeric answers instead of reading a strike at all, so
every market the current creator mints holds to it — but nothing in
_validateCreate cross-checks it against referenceQuestionId, so it is
convention rather than an enforced invariant. Centralized here so the day that
changes is a one-line change.
Takes either encoding: the indexer serves strike as a decimal string, the
contract event as a uint256.
Parameters
strike
string | bigint | null | undefined