alphaq, exported from @eco-incorp/sauce/svm.
Generated from the type declarations of @eco-incorp/sauce.
ALPHAQ_PROGRAM_ID
Variable ยท @eco-incorp/sauce/svm
primeAlphaqStatsAccounts
Function ยท @eco-incorp/sauce/svm
One-time (idempotent, memoized) live join for markets not yet in
ALPHAQ_STATS_ACCOUNTS. Safe to call repeatedly/concurrently - every
call after the first returns the SAME in-flight/completed promise. A failed
prime is not memoized: the next call tries again. A failure here never
costs the caller anything beyond โno new markets discovered this runโ - the
static table still serves every market known at integration time.
The RPC is the callerโs, so its answer is held to a stats accountโs shape:
base64 of exactly STATS_ACCOUNT_SIZE bytes, of which only the
16-byte symbol prefix is decoded; a symbol of the MARKET_SYMBOL
form; never a symbol the static table names (which stays authoritative);
and at most MAX_RUNTIME_STATS_ACCOUNTS entries. Anything else is
skipped.
A
caller with its own boot sequence (the api, a CLI, a future cron) should
invoke this once with a live getProgramAccounts transport to pick up any
AlphaQ market added after this file was captured.
__setAlphaqStatsAccountsForTest
Function ยท @eco-incorp/sauce/svm
Test-only: seed the runtime overlay without a real RPC (LiteSVM/jest fixtures).
__resetAlphaqStatsAccountsForTest
Function ยท @eco-incorp/sauce/svm
Test-only: undo __setAlphaqStatsAccountsForTest / a completed prime.
fetchAlphaqPoolConfig
Function ยท @eco-incorp/sauce/svm
Decode a market (672-byte) account. Throws (caller self-drops, per
resolveSvmPoolSpecโs existing try/catch) on: a size mismatch; a blank
symbol; either mint outside the curated STABLE_MINTS set (the โSCOPE
GATEโ - this ladderโs quote model is only safe for a genuine stablecoin
pair); mismatched decimals (the raw-unit depth comparisonโs precondition);
or a stats account this integration has neither the static table nor a
live prime for. A genuinely unknown/out-of-scope/future market is
dropped, never crashed on.
__alphaqCpQuoteForTest
Function ยท @eco-incorp/sauce/svm
The symmetric constant-product model - see the module docโs โTHE ACTUAL
MODELโ. D = min(rawA, rawB) (raw units; safe because
fetchAlphaqPoolConfig gates decimalsA === decimalsB) is the conservative
shared depth, pinning the spot price at parity (minus the haircut) rather
than at the marketโs possibly-skewed raw reserve RATIO - the fix for the
favourable-mispricing bug this fileโs own test caught (see the module
docโs โREJECTED FIRST ATTEMPTโ).
__alphaqDecodeSymbolForTest
Function ยท @eco-incorp/sauce/svm
AlphaqStatsRpc
Interface ยท @eco-incorp/sauce/svm
Minimal getProgramAccounts transport for the stats-account join (data included, unlike the
pubkey-only GetProgramAccountsRpc discovery.ts uses for candidate scans).
AlphaqPoolConfig
Interface ยท @eco-incorp/sauce/svm
