Package zephyr.daemon.model
Enum ZephyrNetworkType
- All Implemented Interfaces:
Serializable,Comparable<ZephyrNetworkType>,java.lang.constant.Constable
Enumerates daemon networks.
Each network carries the address tags of its primary addresses, integrated addresses and
subaddresses: the CRYPTONOTE_PUBLIC_*_BASE58_PREFIX values of zephyr's
src/cryptonote_config.h. The tags are varints (little-endian base-128) at the start of the
decoded address, not Monero's one-byte codes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the varint tag that starts a decoded integrated address on this network.longReturns the varint tag that starts a decoded primary (standard) address on this network.longReturns the varint tag that starts a decoded subaddress on this network.static ZephyrNetworkTypeParses a network type from its name, ignoring case.static ZephyrNetworkTypeReturns the enum constant of this type with the specified name.static ZephyrNetworkType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MAINNET
Zephyr mainnet: primary addresses start with "ZEPHYR". -
TESTNET
Zephyr testnet (its hard-fork table in the pinned core stops before the V2 assets). -
STAGENET
Zephyr stagenet (its hard-fork table in the pinned core stops before the V2 assets).
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getPrimaryAddressTag
public long getPrimaryAddressTag()Returns the varint tag that starts a decoded primary (standard) address on this network.- Returns:
- the CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX of this network
-
getIntegratedAddressTag
public long getIntegratedAddressTag()Returns the varint tag that starts a decoded integrated address on this network.- Returns:
- the CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX of this network
-
getSubaddressTag
public long getSubaddressTag()Returns the varint tag that starts a decoded subaddress on this network.- Returns:
- the CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX of this network
-
parse
Parses a network type from its name, ignoring case.- Parameters:
networkTypeStr- is "mainnet", "testnet" or "stagenet"- Returns:
- the network type
- Throws:
ZephyrError- if the name is null or not one of the three
-