Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Deposit existing SY into a Senior or Junior tranche
ixDeposit
import { Transaction, sendAndConfirmTransaction } from "@solana/web3.js"; import { TrancheSide } from "@exponent-labs/exponent-sdk/client/tranching"; const ix = market.ixDeposit({ user: wallet.publicKey, trancheSide: TrancheSide.Junior, amountIn: 1_000_000_000n, // raw SY units minLpOut: 0n, // raw Junior LP units; set above 0 for output protection tokenSrc: userSyTokenAccount, tokenLpDst: userJuniorLpTokenAccount, }); const tx = new Transaction().add(ix); const signature = await sendAndConfirmTransaction(connection, tx, [wallet]);
user
PublicKey
trancheSide
TrancheSide
TrancheSide.Senior
TrancheSide.Junior
amountIn
bigint
minLpOut
0n
tokenSrc
tokenLpDst
tokenProgram
ixWrapperDeposit