Package org.bitcoinj.params
Class Networks
java.lang.Object
org.bitcoinj.params.Networks
Utility class that holds all the registered
NetworkParameters
types used for address auto discovery.
By default only MainNetParams
and TestNet3Params
are used. If you want to use RegTestParams
or UnitTestParams
use register
and then unregister
the TestNet3Params
as they don't
have their own Base58 version/type code (although for SegwitAddress
the human-readable
parts for RegTest and TestNet are different.)-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<NetworkParameters>
Find aNetworkParameters
for aNetwork
static Set<NetworkParameters>
get()
static void
register
(Collection<NetworkParameters> networks) Register a collection of additional network types by adding them to theSet
.static void
register
(NetworkParameters network) Register a single network type by adding it to theSet
.static void
unregister
(NetworkParameters network) Unregister a network type.
-
Constructor Details
-
Networks
public Networks()
-
-
Method Details
-
get
-
find
Find aNetworkParameters
for aNetwork
- Parameters:
network
- The network to find (convert)- Returns:
- Matching params if one was registered
-
register
Register a single network type by adding it to theSet
.- Parameters:
network
- Network to register/add.
-
register
Register a collection of additional network types by adding them to theSet
.- Parameters:
networks
- Networks to register/add.
-
unregister
Unregister a network type.- Parameters:
network
- Network type to unregister/remove.
-