single extract() function for both input and output scripts.
tx input BIP16 addr are now indexed.