Depends on your jurisdiction. Only your local electrical inspector/building department can answer.Can I legally wire the HPWC myself?
I live in NH, where homeowners can do their own work (if you live in the house). You need to pull a permit and get it inspected. I used to live in MA, which has a similar law, but a lot of MA towns refuse to grant permits to homeowners, essentially banning homeowner electrical work (so a lot gets done without permits or inspections).