- Asset-in (deposit / mint variants) — vault sends the underlying token, receives jlTokens.
- Asset-out (withdraw / redeem variants) — vault sends jlTokens, receives the underlying token.
createJupiterEarn*Instruction(...) per op and matching jupiterEarnAction.<method>(...) wrappers that register the op as a vault step.
Transaction structure
Every Jupiter Earn action goes throughcreateVaultSyncTransaction.
Asset-in accounts
All four asset-in operations (deposit, depositWithMinAmountOut, mint, mintWithMaxAssets) share the same JupiterEarnAssetInAccounts shape. Build it once and pass it into each instruction builder.
Deposit
createJupiterEarnDepositInstruction(accounts, assets) deposits an exact amount of underlying tokens and receives jlTokens at the current rate.
createJupiterEarnDepositWithMinAmountOutInstruction(accounts, assets, minAmountOut) is the same operation with a slippage floor on the jlTokens received.
Parameters
Mint
createJupiterEarnMintInstruction(accounts, shares) mints an exact amount of jlTokens, paying the current required underlying.
createJupiterEarnMintWithMaxAssetsInstruction(accounts, shares, maxAssets) adds a cap on the underlying spent.
Parameters
Asset-out accounts
The four asset-out operations (withdraw, withdrawWithMaxSharesBurn, redeem, redeemWithMinAmountOut) share JupiterEarnAssetOutAccounts. The shape mirrors asset-in, with the source/recipient roles flipped.
Withdraw
createJupiterEarnWithdrawInstruction(accounts, amount) withdraws an exact amount of underlying by burning the implied jlTokens at the current rate.
createJupiterEarnWithdrawWithMaxSharesBurnInstruction(accounts, amount, maxSharesBurn) adds a cap on the jlTokens burned.
Parameters
Redeem
createJupiterEarnRedeemInstruction(accounts, shares) redeems an exact amount of jlTokens for underlying at the current rate.
createJupiterEarnRedeemWithMinAmountOutInstruction(accounts, shares, minAmountOut) adds a slippage floor on the underlying received.
Parameters
Action wrappers
Every Earn op has a matchingjupiterEarnAction.<method> that registers the raw instruction as a vault step. All wrappers take a single { instruction } object.
Constants
For policy authoring or custom data-constraint work, the SDK also exports
JUPITER_EARN_DISCRIMINATORS (per-action discriminators) and JUPITER_EARN_ACCOUNT_INDICES (account-index maps for asset-in and asset-out paths).
A matching policy must exist before executing. See Jupiter Lend Earn Policy.