@eco-incorp/sauce/svm is the Solana side: the client (createSauceSvmClient), clusters, PDAs, account resolution against the compiler’s account manifest, Kitchen and engine instructions, transactions and sending, token accounts, and compute planning for @sauce/router’s Solana venues. @eco-incorp/sauce/svm/engine exports the engine’s wire format and instruction builders, @eco-incorp/sauce/svm/verify verifies settle programs and engine CPI data, and @eco-incorp/sauce/svm/engine-artifacts (Node only) returns file paths to the packaged engine and Kitchen binaries.
@eco-incorp/sauce.
classifyMintProgram
Function · @eco-incorp/sauce/svm
Classify a mint’s token program from its raw account data alone (pure, no
I/O). Returns TOKEN_PROGRAM_ID for a classic 82-byte mint, TOKEN_2022_PROGRAM_ID
for a >=166-byte extension mint with the Mint account-type byte. Throws on a
length/type that is not a mint layout. See the file header for the one
ambiguous case (extensionless T22 mint → classified legacy).
resolveTokenProgram
Function · @eco-incorp/sauce/svm
Resolve the token program serving mint by reading its account via the
AccountLoader and classifying the data shape. Throws a clear error if the
mint account is missing. Resolve PER MINT - a pool can mix a legacy mint on
one side and a Token-2022 mint on the other.
resolveTokenProgramOwned
Function · @eco-incorp/sauce/svm
Resolve by the mint’s OWNER, the only method that is correct for every mint.
Prefer this over resolveTokenProgram wherever an OwnedAccountLoader is available: it settles
the extensionless-Token-2022 case that the shape path cannot see, and needs no extra round trip
because the owner arrives with the data.
resolveTokenProgramByOwner
Function · @eco-incorp/sauce/svm
Escape hatch for the extensionless-T22 ambiguity: resolve strictly by the
mint’s OWNING program, via a lookup that can see the owner (unlike the
data-only AccountLoader). Throws if the mint is missing or is owned by
neither token program.
isToken2022Mint
Function · @eco-incorp/sauce/svm
True iff the mint data is a Token-2022 mint (>=166 bytes, Mint account-type byte).
createTokenProgramResolver
Function · @eco-incorp/sauce/svm
A caching per-mint resolver: repeated resolves of the same mint within one
pool/route read the account once. Returns a resolver function closing over a
Map<mintBase58, Address>.
TOKEN_PROGRAM_ID
Variable · @eco-incorp/sauce/svm
Legacy SPL Token program (classic Tokenkeg).
TOKEN_2022_PROGRAM_ID
Variable · @eco-incorp/sauce/svm
Token-2022 program (extensions).
SPL_MINT_SIZE
Variable · @eco-incorp/sauce/svm
A classic SPL mint account is exactly this many bytes.
T22_ACCOUNT_TYPE_OFFSET
Variable · @eco-incorp/sauce/svm
A Token-2022 mint with extensions pads its base region to this size, then
writes the account-type discriminator at this offset (the value itself).
T22_ACCOUNT_TYPE_MINT
Variable · @eco-incorp/sauce/svm
account_type == 1 means Mint (2 means token Account).
T22_TLV_START
Variable · @eco-incorp/sauce/svm
First byte of the TLV extension region (right after the account-type byte).
OwnerLoader
Type · @eco-incorp/sauce/svm
Async owner lookup for the escape-hatch resolver - returns the OWNING program id.
