Archived documentation for
@eco-incorp/sauce@0.99.16. Install this release with npm install --save-exact @eco-incorp/sauce@0.99.16. Links to guides outside this tab open current documentation.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
failure here never throws past the caller that awaits it losing anything
beyond “no new markets discovered this run” - the static table still
serves every market known at integration time.
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
