assertMathRevision
Throw if a snapshot's curve revision is not implemented by this SDK.
Every quote* function calls this first. Unknown kind / schemaVersion / engineRevision / curveSourceHash throw UnsupportedCurveRevisionError instead of silently applying v1 formulas.
You can call it yourself after getQuoteState if you want to fail the UI before the user types.
Import
import { assertMathRevision } from "@repo/contract-client/math";
Usage
import { assertMathRevision } from "@repo/contract-client/math";
assertMathRevision(snapshot);
Supported revisions live in SUPPORTED_MATH (re-exported from @repo/contract-client/math).
Return Value
void
Parameters
snapshot
- Type:
MarketSnapshot
Uses snapshot.math.
assertMathRevision(snapshot);
Error
UnsupportedCurveRevisionError when the tuple is not in SUPPORTED_MATH.