Skip to main content
@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.
Generated from the type declarations of @eco-incorp/sauce.

resolveAccounts

Function · @eco-incorp/sauce/svm Resolves an AccountManifest into ordered account metas: metas[i] is user-account index i of the execute instruction (inline: instruction account i; staged: i + 1, after the buffer). The base role comes from the slot’s requires; the resolution entry’s signer flag then replaces it (see AccountResolution), and a TransactionSigner or the reserved PAYER_REF sets it. An attached TransactionSigner rides on the meta so the transaction builder signs with it. Duplicate addresses across refs are fine: Solana dedupes at message compile. A remaining entry is a position, not an account: it marks where the caller’s own variable-length tail begins, so resolution stops there and the caller appends its tail itself. It must be the last entry, and one that is not throws: stopping early would drop the slots after it from metas and shift the index of every account the caller then appends. The first signer in the list supplies the caller context (ctx.msgSender()). A list with no signer fails, with a missing-signature failure, only when the program actually reads the sender, so no signer is appended automatically: a program that reads the sender, whose manifest declares no signer slot, passes appendPayerSigner: true.

AccountResolution

Interface · @eco-incorp/sauce/svm Maps each declared slot of the compiler’s AccountManifest to a concrete address. signer REPLACES the manifest’s requirement rather than only raising it: omit it to keep the manifest’s own value, true to make a non-signer slot sign, and false to attach a slot the program treats as a signer WITHOUT a transaction signature - which is what a PDA the program signs for via invoke_signed needs. Pass the TransactionSigner itself to also sign with it (required for any signer ref other than the reserved fee-payer ref - the send layer has no other way to obtain that signature). The two sides describe different things: the manifest states what the PROGRAM requires of the slot, this states what the TRANSACTION provides.

PAYER_REF

Variable · @eco-incorp/sauce/svm Reserved ref: resolves to the fee payer with signer:true (use it when bytecode reads MSG_SENDER). A resolution entry under this key is a conflict and throws - rename the plan ref if it must resolve to another address.

ResolveAccountsOptions

Interface · @eco-incorp/sauce/svm

ResolvedAccountMeta

Interface · @eco-incorp/sauce/svm