Transaction Builder

The aforementioned, and still in need of plenty of test fixtures, `TransactionBuilder`.

Anyone is welcome to throw fixtures at it, but, presuming you abide by the API (should be obvious), it should automagically sign them correctly with the private keys provided.
See tests for the intended behaviour.

All standard transaction types are supported including P2SH variants thereof. 

It also needs a `fromTransaction` method for initializing it from an incomplete `Transaction` so you can pass a incomplete `Transaction` around between signers.
I see what you are trying to do here. My point was that the assert is making the API brittle. With the assert if a script is provided by mistake (or specified as `null` instead of `undefined`), an error will be thrown. Without the assert, in the above mentioned cases, I don't see serious consequences.

Also you left out `addInput(Buffer, index)` for the else case.