First stab at Bitcoin.Transaction.

The idea is, whenever we need to sign our
inp/outs (convert method) and then call for each of our inputs:

Bitcoin.Transaction.hashTransactionForSignature
Bitcoin.Transaction.txout[].simpleOutPubKeyHash
wallet.signWithKey

hashTransactionForSignature(PUBKEY_ALL) signs everything blanked,
so the only important thing
is to always sign only complete data.

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
ExchangeTransaction API change: fetchOutputColors (async color discovery)
Implement sign-as-we-go, sending change back, distribute out sigscripts to wire exchange.

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
Fix broken indentation

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
Properly convert counterparty signatures

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
Indentation typos, txSend

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
colored UTXO collector of txhash:idx

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
collectMyUTXOs belongs to wallet, not transaction

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
Pass colormn to wallet, too. Get rid of random ids.

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
fixed syntatic errors
Fix - When exitnode is unspecified and running on non-80 port (ie without proxy), 3125 gets appended twice.

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
Shape p2pglue into testable state

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
Merge branch 'p2pglue' of github.com:katuma/bitcoinjs-gui into p2pglue

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>

Conflicts:
	scripts/p2ptrade/wallet.js
ColorMan.getColor
change p2ptrade current color
two p2ptrade agents for easy testing
p2ptrade createPayment refactoring
Uglify previous refactoring for a bit.

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
MockExchangeTransaction.tx shall contain only context-free references
for wire serialization to work properly.

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>
Fix realTx to reflect refactoring

Signed-off-by: Karel Tuma <karel.tuma@gmail.com>