@eco-incorp/sauce/svm is the Solana side: staging a program through the kitchen, resolving accounts against the compiler’s account manifest, building and sending transactions, and verifying settle programs. Solana execution goes through the Kitchen client here; the SDK’s SVM route helpers emit a legacy instruction that the released engine does not accept.
sdk/dist/svm/kitchen.d.ts.
Generated from the type declarations shipped in
@eco-incorp/sauce 0.99.4. Each entry shows the package authors’ JSDoc and declaration for this SDK version. For runtime compatibility and deployed addresses, see architecture and deployments.derivePotPda
Function · sdk/dist/svm/kitchen.d.ts
A Pot: ["pot", owner, salt]. The salt is what lets one owner hold many - it is raw bytes, not a
counter, so a caller with a natural 32-byte id (an intent hash, say) passes it directly.
deriveExecutionFeeConfigPda
Function · sdk/dist/svm/kitchen.d.ts
The execution-fee config: ["execution_fee"], one per kitchen.
It is both the fee’s source of truth and the treasury the fees accumulate in, so every cook takes
it writable even when the configured fee is zero.
deriveProgramDataPda
Function · sdk/dist/svm/kitchen.d.ts
A program’s ProgramData under the upgradeable loader: [program].
The fee instructions authorize against the authority recorded there rather than a stored admin
key, so whoever can upgrade the kitchen is whoever can price it.
deriveCodeBufferPda
Function · sdk/dist/svm/kitchen.d.ts
A code buffer’s metadata account: ["buffer", owner, nonce_le].
deriveCodePda
Function · sdk/dist/svm/kitchen.d.ts
The bytes account for a buffer: ["code", code_buffer].
Seeded on the METADATA account’s address, so the pair is bound by derivation and neither needs to
store a pointer to the other for the kitchen to validate.
buildCreatePotInstruction
Function · sdk/dist/svm/kitchen.d.ts
buildClosePotInstruction
Function · sdk/dist/svm/kitchen.d.ts
buildCookInstruction
Function · sdk/dist/svm/kitchen.d.ts
cook - stage-free execution: the bytecode travels in the instruction data.
The transaction MUST carry a RequestHeapFrame(HEAP_FRAME_BYTES). The kitchen CPIs into the
engine, whose interpreter memory lives in the transaction’s heap frame and not in accounts, so
without it the ENGINE access-violates before any opcode runs - surfacing from the kitchen as an
opaque ProgramFailedToComplete. Use buildHeapFramePrepend() (./prepends.js). Pot and
code-buffer lifecycle instructions need no such thing; only the two cooks execute.
Note there is no pot account here. The kitchen derives it from pot_salt and owner and signs
for it, so a Pot the program touches belongs in tail unsigned.
buildCookFromAccountInstruction
Function · sdk/dist/svm/kitchen.d.ts
cook_from_account - the staged transport: the bytecode is read from a finalized code account.
Needs the same RequestHeapFrame as cook - see there.
buildCreateCodeBufferInstruction
Function · sdk/dist/svm/kitchen.d.ts
Creates the codeBuffer metadata account and its code data account, sized for capacity.
capacity must be 1..=MAX_CODE_LEN; the kitchen rejects anything else with
CapacityOutOfRange, and this throws first so the bound is visible without a simulation.
A create allocates at most ONE GROWTH_STEP. The runtime caps how much an account can grow
per instruction, so a capacity above that is only partly allocated here and needs
Math.ceil(capacity / GROWTH_STEP) - 1 further buildGrowCodeBufferInstruction calls before the
code account is the full size. The cap resets per instruction, so those repeats can share one
transaction. Writing before the account is fully grown fails with WriteOutOfBounds.
buildGrowCodeBufferInstruction
Function · sdk/dist/svm/kitchen.d.ts
One growth step. A CPI-created account cannot be allocated more than GROWTH_STEP at once, so a
larger buffer repeats this - the runtime’s limit resets per instruction, so the repeats fit in one
transaction.
buildWriteCodeBufferInstruction
Function · sdk/dist/svm/kitchen.d.ts
buildFinalizeCodeBufferInstruction
Function · sdk/dist/svm/kitchen.d.ts
Seals the buffer at len and pins its digest.
The kitchen shrinks the code account to exactly len here, which is the security property: the
engine executes the account’s whole data slice and bounds jumps only by that slice’s length, so
any byte past len would be jump-reachable but outside the hash.
buildCloseCodeBufferInstruction
Function · sdk/dist/svm/kitchen.d.ts
Closes both accounts and refunds their rent. expectedSha256 gates the close on the staged bytes.
buildInitializeExecutionFeeInstruction
Function · sdk/dist/svm/kitchen.d.ts
initialize_execution_fee - creates the config PDA. The initial fee must be greater than zero;
a kitchen is unusable until it is priced, and a later set may take it back to zero.
buildSetExecutionFeeInstruction
Function · sdk/dist/svm/kitchen.d.ts
set_execution_fee - repricing, including back to zero.
buildWithdrawExecutionFeesInstruction
Function · sdk/dist/svm/kitchen.d.ts
withdraw_execution_fees - collect what the config PDA holds. amount omitted sweeps everything
ABOVE the account’s rent-exempt minimum, which the withdrawal never spends: that same account is
the config every cook reads, and a zero balance would have the runtime reap it. The recipient
must already be rent-exempt, or the runtime refuses the transaction for leaving it rent-paying.
TailAccount
Type · sdk/dist/svm/kitchen.d.ts
One entry of a program’s own account tail, in the shape a kit Instruction carries.
CODE_BUFFER_SEED
Variable · sdk/dist/svm/kitchen.d.ts
The kitchen’s own #[constant]s, from the same IDL.
CODE_SEED
Variable · sdk/dist/svm/kitchen.d.ts
POT_SEED
Variable · sdk/dist/svm/kitchen.d.ts
EXECUTION_FEE_SEED
Variable · sdk/dist/svm/kitchen.d.ts
GROWTH_STEP
Variable · sdk/dist/svm/kitchen.d.ts
One grow_code_buffer step: MAX_PERMITTED_DATA_INCREASE, the most a CPI-created account can
grow in a single instruction. IDL-guarded by engine-wire-drift.test.ts.
MAX_CODE_LEN
Variable · sdk/dist/svm/kitchen.d.ts
MAX_POT_LEN
Variable · sdk/dist/svm/kitchen.d.ts
SALT_BYTES
Variable · sdk/dist/svm/kitchen.d.ts
A Pot’s salt and a code buffer’s expected_sha256 are both exactly 32 bytes.
BPF_LOADER_UPGRADEABLE
Variable · sdk/dist/svm/kitchen.d.ts
The loader that owns every upgradeable program’s ProgramData, which is where the fee
instructions read the kitchen’s live upgrade authority from.
KitchenPda
Interface · sdk/dist/svm/kitchen.d.ts
CreatePotInput
Interface · sdk/dist/svm/kitchen.d.ts
ClosePotInput
Interface · sdk/dist/svm/kitchen.d.ts
CookInput
Interface · sdk/dist/svm/kitchen.d.ts
CookFromAccountInput
Interface · sdk/dist/svm/kitchen.d.ts
CodeBufferAccounts
Interface · sdk/dist/svm/kitchen.d.ts
ExecutionFeeAdminInput
Interface · sdk/dist/svm/kitchen.d.ts
The three fee instructions authorize against the kitchen’s LIVE upgrade authority, read from its
ProgramData - so the party that can replace the code is the party that can price it, and an
immutable kitchen has a frozen fee and an uncollectable balance. Each therefore takes the kitchen
program and its ProgramData as accounts; the constraint links the two, so a foreign program’s
ProgramData cannot be substituted.
