The ixMergeToBase method on the Vault class creates transaction instructions that merge PT and YT back into SY and then unwrap the SY into the base asset in a single atomic operation.
Usage
This method returns both setupIxs (token account creation) and ixs (the merge + unwrap instructions, including any pre/post instructions from the flavor). Make sure to include both in your transaction.
Required Parameters
Optional Parameters
Returns
Returns a Promise<{ ixs: TransactionInstruction[]; setupIxs: TransactionInstruction[] }>:
ixs — The merge and unwrap instructions, including any flavor-specific pre/post instructions
setupIxs — Setup instructions that create associated token accounts for SY, PT, and YT