Enum Class NameCoinNetwork
- All Implemented Interfaces:
Serializable
,Comparable<NameCoinNetwork>
,Constable
,org.bitcoinj.base.Network
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Scheme part for Bitcoin URIs.static final String
The ID string for the main, production network where people trade things.static final String
The ID string for regtest mode.static final String
The ID string for the signet.static final String
The ID string for the testnet.static final String
The ID string for the Unit test network -- there is no correspondingenum
.static final org.bitcoinj.base.Coin
The maximum money to be generated -
Method Summary
Modifier and TypeMethodDescriptionboolean
exceedsMaxMoney
(org.bitcoinj.base.Monetary amount) static Optional
<NameCoinNetwork> fromIdString
(String idString) Find theBitcoinNetwork
from an ID Stringstatic Optional
<NameCoinNetwork> fromString
(String nameString) Find theBitcoinNetwork
from a name string, e.g.boolean
id()
Return the network ID string (specified by aNetwork
)int
Header byte of base58 encoded legacy P2PKH addresses for this network.int
Header byte of base58 encoded legacy P2SH addresses for this network.org.bitcoinj.base.Coin
maxMoney()
Return the standard Bech32SegwitAddress.SegwitHrp
(as aString
) for this network.toString()
Return the canonical, lowercase, user-facingString
for anenum
The URI scheme for Bitcoin.static NameCoinNetwork
Returns the enum constant of this class with the specified name.static NameCoinNetwork[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MAINNET
-
TESTNET
-
SIGNET
-
REGTEST
-
-
Field Details
-
BITCOIN_SCHEME
Scheme part for Bitcoin URIs.- See Also:
-
MAX_MONEY
The maximum money to be generated -
ID_MAINNET
The ID string for the main, production network where people trade things. -
ID_TESTNET
The ID string for the testnet. -
ID_SIGNET
The ID string for the signet. -
ID_REGTEST
The ID string for regtest mode. -
ID_UNITTESTNET
The ID string for the Unit test network -- there is no correspondingenum
.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
Return the canonical, lowercase, user-facingString
for anenum
- Overrides:
toString
in classEnum<NameCoinNetwork>
- Returns:
- canonical lowercase value
-
id
Return the network ID string (specified by aNetwork
)- Specified by:
id
in interfaceorg.bitcoinj.base.Network
- Returns:
- The network ID string
-
legacyAddressHeader
Header byte of base58 encoded legacy P2PKH addresses for this network.- Specified by:
legacyAddressHeader
in interfaceorg.bitcoinj.base.Network
- Returns:
- header byte as an
int
. - See Also:
-
legacyP2SHHeader
Header byte of base58 encoded legacy P2SH addresses for this network.- Specified by:
legacyP2SHHeader
in interfaceorg.bitcoinj.base.Network
- Returns:
- header byte as an
int
. - See Also:
-
segwitAddressHrp
Return the standard Bech32SegwitAddress.SegwitHrp
(as aString
) for this network.- Specified by:
segwitAddressHrp
in interfaceorg.bitcoinj.base.Network
- Returns:
- The HRP as a (lowercase) string.
-
uriScheme
The URI scheme for Bitcoin.- Specified by:
uriScheme
in interfaceorg.bitcoinj.base.Network
- Returns:
- string containing the URI scheme
- See Also:
-
hasMaxMoney
- Specified by:
hasMaxMoney
in interfaceorg.bitcoinj.base.Network
-
maxMoney
- Specified by:
maxMoney
in interfaceorg.bitcoinj.base.Network
-
exceedsMaxMoney
- Specified by:
exceedsMaxMoney
in interfaceorg.bitcoinj.base.Network
-
fromString
Find theBitcoinNetwork
from a name string, e.g. "mainnet", "testnet" or "signet". A number of common alternate names are allowed too, e.g. "main" or "prod".- Parameters:
nameString
- A name string- Returns:
- An
Optional
containing the matching enum or empty
-
fromIdString
Find theBitcoinNetwork
from an ID StringNote:
ID_UNITTESTNET
is not supported as an enum- Parameters:
idString
- specifies the network- Returns:
- An
Optional
containing the matching enum or empty
-