Package foundation.omni.net
Enum Class OmniNetwork
- All Implemented Interfaces:
Serializable,Comparable<OmniNetwork>,java.lang.constant.Constable,org.bitcoinj.base.Network
Definitions for Omni "safe" addresses. This should only be used for constructing addresses with bitcoinj,
for other functions the
BitcoinNetwork instances should be used.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.bitcoinj.base.AddressParser.AddressParserProviderstatic final StringScheme part for Bitcoin URIs.static final StringThe ID string for the main, production network where people trade things.static final StringThe ID string for regtest mode.static final StringThe ID string for the signet.static final StringThe ID string for the testnet.static final StringThe ID string for the Unit test network -- there is no correspondingenum.static final org.bitcoinj.base.CoinThe maximum money to be generated -
Method Summary
Modifier and TypeMethodDescriptionorg.bitcoinj.base.BitcoinNetworkbooleanexceedsMaxMoney(org.bitcoinj.base.Monetary amount) org.bitcoinj.base.Addressstatic Optional<OmniNetwork> fromIdString(String idString) Find theBitcoinNetworkfrom an ID Stringstatic Optional<OmniNetwork> fromString(String nameString) Find theBitcoinNetworkfrom a name string, e.g.booleanid()Return the network ID string (previously specified inNetworkParameters)intHeader byte of base58 encoded legacy P2PKH addresses for this network.intHeader byte of base58 encoded legacy P2SH addresses for this network.org.bitcoinj.base.CoinmaxMoney()org.bitcoinj.base.Addressstatic OmniNetworkof(org.bitcoinj.base.Network bitcoinNetwork) Return the standard Bech32SegwitAddress.SegwitHrp(as aString) for this network.toString()Return the canonical, lowercase, user-facingStringfor anenumThe URI scheme for Bitcoin.static OmniNetworkReturns the enum constant of this class with the specified name.static OmniNetwork[]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:
-
addressParser
public static final org.bitcoinj.base.AddressParser.AddressParserProvider addressParser -
MAX_MONEY
public static final org.bitcoinj.base.Coin MAX_MONEYThe 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-facingStringfor anenum- Overrides:
toStringin classEnum<OmniNetwork>- Returns:
- canonical lowercase value
-
id
Return the network ID string (previously specified inNetworkParameters)- Specified by:
idin interfaceorg.bitcoinj.base.Network- Returns:
- The network ID string
-
legacyAddressHeader
public int legacyAddressHeader()Header byte of base58 encoded legacy P2PKH addresses for this network.- Specified by:
legacyAddressHeaderin interfaceorg.bitcoinj.base.Network- Returns:
- header byte as an
int. - See Also:
-
legacyP2SHHeader
public int legacyP2SHHeader()Header byte of base58 encoded legacy P2SH addresses for this network.- Specified by:
legacyP2SHHeaderin 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:
segwitAddressHrpin interfaceorg.bitcoinj.base.Network- Returns:
- The HRP as a (lowercase) string.
-
exodusAddress
public org.bitcoinj.base.Address exodusAddress() -
moneyManAddress
public org.bitcoinj.base.Address moneyManAddress() -
bitcoinNetwork
public org.bitcoinj.base.BitcoinNetwork bitcoinNetwork() -
of
-
uriScheme
The URI scheme for Bitcoin.- Specified by:
uriSchemein interfaceorg.bitcoinj.base.Network- Returns:
- string containing the URI scheme
- See Also:
-
hasMaxMoney
public boolean hasMaxMoney()- Specified by:
hasMaxMoneyin interfaceorg.bitcoinj.base.Network
-
maxMoney
public org.bitcoinj.base.Coin maxMoney()- Specified by:
maxMoneyin interfaceorg.bitcoinj.base.Network
-
exceedsMaxMoney
public boolean exceedsMaxMoney(org.bitcoinj.base.Monetary amount) - Specified by:
exceedsMaxMoneyin interfaceorg.bitcoinj.base.Network
-
fromString
Find theBitcoinNetworkfrom 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
Optionalcontaining the matching enum or empty
-
fromIdString
Find theBitcoinNetworkfrom an ID StringNote:
ID_UNITTESTNETis not supported as an enum- Parameters:
idString- specifies the network- Returns:
- An
Optionalcontaining the matching enum or empty
-