This change removes all occurances of btcwire.BitcoinNet from exported
APIs, replacing each with *btcnet.Params. This simplifies the logic
for verifying string encodings of addresses and WIF private keys which
use leading identifier numbers to differentiate between address types
and the network they are intended for. It also allows the use of this
package for non-standard networks (not mainnet, regtest, or testnet3)
and future proofs it for the possible addition of future testnet
networks.
To update across this change, replace each btcwire.BitcoinNet
parameter with the associated *btcnet.Params. For the standard
networks, these changes are:
btcwire.MainNet -> &btcnet.MainNetParams
btcwire.TestNet -> &btcnet.RegressionNetParams
btcwire.TestNet3 -> &btcnet.TestNet3Params
ok @davecgh
The old functions DecodePrivateKey and EncodePrivateKey have been
removed in favor of the DecodeWIF function and the String method of
the new WIF type.
ok @davecgh