Merge multiple compressed token accounts for a given mint into fewer accounts. Each call merges up to 4 accounts at a time.
Supports automatic V1 -> V2 migration: when running in V2 mode, merging V1 token accounts will produce a V2 output.
IMPORTANT: Only accounts from the same tree type can be merged in one transaction. If you have mixed V1+V2 accounts, merge them separately.
RPC connection to use
Fee payer
SPL Mint address
Owner of the token accounts to be merged
Optional
Options for confirming the transaction
confirmed transaction signature
Merge multiple compressed token accounts for a given mint into fewer accounts. Each call merges up to 4 accounts at a time.
Supports automatic V1 -> V2 migration: when running in V2 mode, merging V1 token accounts will produce a V2 output.
IMPORTANT: Only accounts from the same tree type can be merged in one transaction. If you have mixed V1+V2 accounts, merge them separately.