Instead of exposing the privateKey to the rest of the application, I can only expose a “signTransaction” function. This is not only safer but allows for developers to write software while not having to take on the responsibilities of running wallet software and managing private keys.
Bitcoin services and protocols do not need to take on the responsibility of managing keys.
Individual wallets should expose common interfaces for signing transactions and messages.
The wallets can then prompt the user for “would you like to sign this transaction?” or have settings to automatically trust and sign from certain hosts and transaction types.
If you look at the types of interfaces that we’re exposing with services like bitstore, blockcast, and openpublish, you’ll see just how composable these modules are.
Getting unspent outputs, propagating transactions, and signing transactions are all interactions that are very stateful. Keeping these stateful operations outside of the module makes them more apt for interoperability.