Scriptable transaction broadcast

Allow to specify a custom executable to be used for broadcasting transactions to the network, instead of using bitcoind's sendtawtransaction. This can be preferable for privacy reasons.

Electrum Personal Server has this implemented as the broadcast_method config option.

  • Add --tx-broadcast-cmd <cmd> option to allow specifying a custom command for broadcasting txs (c9d76e8)
  • Add --tx-broadcast-p2p <proxy-addr> option to broadcast directly to the P2P network using a socks proxy (or alternatively, using a public block explorer api, which is simpler)
  • Add --tx-broadcast-tor option as a shortcut for setting --tx-broadcast-p2p with tor
  • Enable --tx-broadcast-tor by default if tor is found on the machine?