Implementing P2SH multisignature transactions