bitcoinjs/bitcoinjs-lib — pull request #68 by xnova (2014-03-14 16:09:07+00:00)
Title: transaction signing appears to not work anymore

The newest changes over the last week seems to have broken transaction signing (for me, at least). I looked into it some and made the following change to script.js to get us closer (I also modified transaction.js to pass the network along to the Address constructor).

However, even with these changes, tx signing is still broken. With these changes, this is the stack trace I get:
```
Uncaught TypeError: Object [object Array] has no method 'split' bitcoinjs-min.js:3
exports.stringToBytes bitcoinjs-min.js:3
Message.makeMagicMessage bitcoinjs-min.js:5
Message.getHash bitcoinjs-min.js:5
Transaction.hashTransactionForSignature bitcoinjs-min.js:5
Transaction.sign bitcoinjs-min.js:5
```
(Without these changes, it didn't even get here...it errored out with that "expect Script to be initialized with Array" error.)

To trigger this, I am just doing something like:
```javascript
for (i=0; i < sendTx.ins.length; i++) {
sendTx.sign(i, key);
}
```

Where sendTx is an unsigned Transaction object and key is an ECKey object. Very basic usage.

Barring the chance that it's a stupid mistake on my end, I'd like to fix the rest of this, but unfortunately can't due to time constraints. :/

And as an aside, I think that bug would the script constructor would break even something like:
```
var foo = new Bitcoin.Script();
```
If that is the case, odd why the test suite didn't catch it.