Archived documentation for
@eco-incorp/sauce@1.0.0. Install this release with npm install --save-exact @eco-incorp/sauce@1.0.0. Links to guides outside this tab open current documentation.@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.
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
