@lightprotocol/compressed-token - v0.23.0-beta.8
    Preparing search index...

    Function mergeTokenAccounts

    • 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.

      Parameters

      • rpc: Rpc

        RPC connection to use

      • payer: Signer

        Fee payer

      • mint: PublicKey

        SPL Mint address

      • owner: Signer

        Owner of the token accounts to be merged

      • OptionalconfirmOptions: ConfirmOptions

        Options for confirming the transaction

      Returns Promise<string>

      confirmed transaction signature