Documentation Index
Fetch the complete documentation index at: https://v2-docs.exponent.finance/llms.txt
Use this file to discover all available pages before exploring further.
createWrapperMergeInstruction
Builds a raw instruction that merges PT + YT back into SY and unwraps to the base asset in a single atomic operation. This combines the merging and SY redemption steps.Usage
Accounts
| Name | Type | Signer | Writable | Description |
|---|---|---|---|---|
merger | PublicKey | Yes | Yes | The user performing the merge |
tokenSyMerger | PublicKey | No | Yes | User’s SY token account (intermediate) |
vault | PublicKey | No | Yes | Vault account |
escrowSy | PublicKey | No | Yes | Vault SY escrow account |
tokenYtMerger | PublicKey | No | Yes | User’s source YT token account |
tokenPtMerger | PublicKey | No | Yes | User’s source PT token account |
mintYt | PublicKey | No | Yes | YT mint address |
mintPt | PublicKey | No | Yes | PT mint address |
authority | PublicKey | No | Yes | Vault authority PDA |
vaultAddressLookupTable | PublicKey | No | No | Vault address lookup table |
tokenProgram | PublicKey | No | No | SPL Token program |
vaultRobotYieldPosition | PublicKey | No | Yes | Vault robot yield position |
syProgram | PublicKey | No | No | SY program |
systemProgram | PublicKey | No | No | System program |
eventAuthority | PublicKey | No | No | Event authority PDA |
program | PublicKey | No | No | Exponent Core program |
Args
| Name | Type | Description |
|---|---|---|
amountPy | bigint | Amount of PT + YT to merge (in base units) |
redeemSyAccountsUntil | number | Index into remaining accounts for SY redemption CPI accounts |
Returns
TransactionInstruction — a transaction instruction ready to be added to a transaction.