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

    Function getOrCreateAtaInterface

    • Retrieve the associated token account, or create it if it doesn't exist.

      Parameters

      • rpc: Rpc

        Connection to use

      • payer: Signer

        Payer of the transaction and initialization fees.

      • mint: PublicKey

        Mint associated with the account to set or verify.

      • owner: PublicKey | Signer

        Owner of the account. Pass Signer to auto-load compressed light-tokens (cold balance), or PublicKey for read-only.

      • allowOwnerOffCurve: boolean = false

        Allow the owner account to be a PDA (Program Derived Address).

      • Optionalcommitment: Commitment

        Desired level of commitment for querying the state.

      • OptionalconfirmOptions: ConfirmOptions

        Options for confirming the transaction

      • programId: PublicKey = LIGHT_TOKEN_PROGRAM_ID

        Token program ID (defaults to LIGHT_TOKEN_PROGRAM_ID)

      • associatedTokenProgramId: PublicKey = ...

        Associated token program ID (auto-derived if not provided)

      Returns Promise<AccountInterface>

      AccountInterface with aggregated balance and source breakdown