@lightprotocol/compressed-token - v0.23.3
    Preparing search index...

    Function createLightTokenApproveInstruction

    • Create an instruction to approve a delegate for a light-token account.

      Account order per program: 0. token_account (mutable) - the light-token account

      1. delegate (readonly) - the delegate to approve
      2. owner (signer) - owner of the token account
      3. system_program (readonly) - for rent top-ups via CPI
      4. fee_payer (mutable, signer) - pays for rent top-ups

      Parameters

      • tokenAccount: PublicKey

        The light-token account to set delegation on

      • delegate: PublicKey

        The delegate to approve

      • owner: PublicKey

        Owner of the token account (signer)

      • amount: number | bigint

        Amount of tokens to delegate

      • OptionalfeePayer: PublicKey

        Optional fee payer for rent top-ups (defaults to owner)

      Returns TransactionInstruction

      TransactionInstruction