mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-19 09:50:32 +01:00
51f1d69e87
This change migrates from using `NetworkParameters` to `Network` for specifying the network and also decouples from static methods in `Address` with an interface/implementation approach. Note that there are 3 use cases for address parsing: 1. Any network is allowed - AddressParser.parseAddressAnyNetwork(String) 2. Parse for a specified network - AddressParser.parseAddress(String, Network) 3. Parse for a previously-specified (context dependent) network - AddressParser.Strict.parseAddress(String) In most use cases, an AddressParser instance can be accessed through the Wallet, which already knows the Network type and in this context validation for network makes sense. This is why `Wallet` is implementing `AddressParser.Strict` BitcoinURI allocates its own DefaultAddressParser for now, as do some other tests and examples that don't have access to a Wallet In the future DefaultAddressParser may be replaced by something loaded via the ServiceLoader mechanism or other dynamically configured mechanism. |
||
---|---|---|
.. | ||
src/main | ||
build.gradle |