spesmilo/electrum — pull request #212 by devrandom (2013-05-06 01:01:27+00:00)
Title: Sync addresses offline for history-less offline wallets

This pull request adds the ability to check whether an output is change without having a transaction history. It also provides two scripts "osigner" and "osender" to streamline signing offline and broadcasting the resulting transactions online.

Checking whether an output is change is critical to ensure that a malicious transaction doesn't send coins to an attacker while pretending to send change to self.

A further improvement can be made: print the net coins sent and non-change destinations in signrawtransaction, if the user is not using the "osigner" script.