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

    Function createApproveInterfaceInstructions

    • Build instruction batches for approving a delegate on an ATA.

      Supports light-token, SPL, and Token-2022 mints. Returns TransactionInstruction[][]. Send [0..n-2] in parallel, then [n-1].

      Parameters

      • rpc: Rpc

        RPC connection

      • payer: PublicKey

        Fee payer public key

      • mint: PublicKey

        Mint address

      • tokenAccount: PublicKey

        ATA address

      • delegate: PublicKey

        Delegate to approve

      • amount: number | bigint | BN

        Amount to delegate

      • owner: PublicKey

        Owner public key

      • decimals: number

        Token decimals

      • programId: PublicKey = LIGHT_TOKEN_PROGRAM_ID

        Token program ID (default: LIGHT_TOKEN_PROGRAM_ID)

      • Optionaloptions: InterfaceOptions

        Optional interface options (wrap is nested here)

      Returns Promise<TransactionInstruction[][]>

      Instruction batches

      For light-token mints, all cold (compressed) balances are loaded into the hot ATA before the approve instruction. The amount parameter only controls the delegate's spending limit, not the number of accounts loaded. Users with many cold accounts may see additional load transactions.