CoreBitcoin
CoreBitcoin copied to clipboard
Refactor with BTCNetwork object
We need to update API so that instead of ad-hoc mainnet/testnet flags or method variants we pass in BTCNetwork instance. That would allow for more streamlined API and flexibility in adjusting network settings for testing (one could clone testnet or mainnet and tune a few parameters).
These classes need to be updated:
- BTCAddress
- BTCKey
- BTCKeychain
BTCNetwork should have setDefault and default class methods to set the default network. Default default is mainnet.
BTCKeychain already supports BTCNetwork.