import {
TrancheSide,
createWithdrawInstruction,
} from "@exponent-labs/exponent-sdk/client/tranching";
const ix = createWithdrawInstruction(
{
user: wallet.publicKey,
market: marketAddress,
returnModelStorage,
addressLookupTable,
syProgram,
syMint,
tokenLpSrc: userLpTokenAccount,
tokenSyEscrow,
tokenDst: userSyTokenAccount,
mintLp: mintLpSenior,
tokenProgram,
eventAuthority,
program: tranchingProgram,
},
{
trancheSide: TrancheSide.Senior,
lpAmountIn: 500_000_000n, // raw Senior LP units to burn
minAmountOut: 0n, // raw SY units
}
);