import {
TrancheSide,
createWrapperWithdrawInstruction,
} from "@exponent-labs/exponent-sdk/client/tranching";
const ix = createWrapperWithdrawInstruction(
{
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
minBaseOut: 0n, // raw base-token units
redeemSyAccountsUntil: 0,
}
);