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

    Function createLoadAtaInstructionsFromInterface

    • Create instructions to load an associated token account from its AccountInterface.

      Behavior depends on wrap parameter:

      • wrap=false (standard): Decompress compressed light-tokens to the target associated token account type (SPL associated token account via interface PDA, T22 associated token account via interface PDA, or light-token associated token account direct)
      • wrap=true (unified): Wrap SPL/T22 + decompress all to light-token associated token account

      Parameters

      • rpc: Rpc

        RPC connection

      • payer: PublicKey

        Fee payer

      • ata: AccountInterface

        AccountInterface from getAtaInterface (must have _isAta, _owner, _mint)

      • Optionaloptions: InterfaceOptions

        Optional load options

      • wrap: boolean = false

        Unified mode: wrap SPL/T22 to light-token (default: false)

      • OptionaltargetAta: PublicKey

        Target associated token account address (used for type detection in standard mode)

      Returns Promise<TransactionInstruction[]>

      Array of instructions (empty if nothing to load)