General purpose high current, high gain SOT23 bipolar & MOSFET transistors are available at modest cost. These will work if the part is used as an on/off saturated switch and will probably work in other roles.
Required polarity can be determined by a single measurement.
SOT23 small signal transistor is usually -
b c e for bipolar
g d s for MOSFET
as per diagram below.
Measure voltage 2 to 3.
If 2 is +ve wrt 3 then = npn or n channel.
If reversed then pnp or p channel.
A high current high beta npn or pnp will work in most bipolar cases.
BC817-30 / BC807-40 are good.
-40 means AVERAG current gan of 400. ie 250-600 range.
50V, 800 mA rated for thisFairchild example sold by Digikey
Rbase of 1k to 10k should be OK.
MOSFET N Channel needs low Vgsth.
CES2310 utterly superb if you can get them.
36 cents /1 in stok at Digikey for this
2.6v Vgsth , 60V, 1.A continuous
But, Better! -->
INFINEON BSS205 N !!!
20v, 2.5A, < 100 mohm Rdson at 2.5V Vgs.
In stock Digikey 37 CENTS /1
No gate resistor needed. Use say 1K if desired.
For P Channel use Digikey selector guide to select out specs of chouce then sort by price ascending in quantity 1.
This is a truly marvellous part for amateur general use.
Be ware of 20V Vds max but otherwise marvellous.
eg 0.2V Vds at 1.5A at 2V Vgs.
500 mW disispation and 250 K/W mean due care needed thermally (as in all SOT23)
BUT very low Rdson will keep it OK in many cases.
eg 98% of these have < 80 milliohm Rdson at high temperature.
At say 1A dissipation <= 80 mW for 20 C case rise on modest copper.
If you MUST have 30V there is the very nice 41cents/1