bitcoinjs/bitcoinjs-lib — pull request #152 by dcousens (2014-04-23 22:28:59+00:00)
Title: Preliminary test for P2shsign

Fixes #143.
Adheres to #139, and another small nudge towards #106.

This pull request removes `Transaction.prototype.applyMultisigs` as it was a misleading function with a very singular purpose; and adds tests for `Transaction.prototype.p2shsign` using a pay-to-scriptHash multisig transaction.

`Transaction.prototype.setScriptSig` was added to replace `applyMultisigs` in a more general fashion, with the `createP2SHMultisigScriptSig` step moved outside of the TX implementation into user land..
This adds a smaller burden on the user space code, but with provides better flexibility and API coherency.
Especially given that the user already has to generate the `redeemScript` and signatures in a very specific order; why hide the final step behind some convoluted API.

It is probably not ideal by any means; but its a step in a better direction.