use script infrastructure to extrac pubkey hash.