• Creates an instruction to retrieve the account balance for a legacy Neon account.

    Parameters

    Returns Promise<TransactionInstruction | null>

    A promise resolving to a TransactionInstruction for retrieving the account balance, or null if the account does not exist.

    const instruction = await createAccountBalanceForLegacyAccountInstruction({
    connection,
    account,
    solanaWallet,
    neonEvmProgram,
    chainId: 245022926
    });
    if (instruction) {
    transaction.add(instruction);
    }