Have you bought this car and the engine has gone again???
Basically, if the car is a version 5 or 6. For a straight drop in, plug and play engine, a V5 OR V6 is needed. and as above v5 will start LATE 1998.. note the LATE bit... and v6 was the last Classic Impreza, 2000, or odd 2001 reg.. very rare do..
Irish and jap engine, definitly on Sti have slight different wiring on engine loom, i presume Wrx will be the same.
Best thing you do is post a picture of your engine, that way one of the sexsperts on here will tell you what you actually have.. as 1998 had both V4 and V5 engines so dont buy the v4 one