Enum ZephyrNetworkType

java.lang.Object
java.lang.Enum<ZephyrNetworkType>
zephyr.daemon.model.ZephyrNetworkType
All Implemented Interfaces:
Serializable, Comparable<ZephyrNetworkType>, java.lang.constant.Constable

public enum ZephyrNetworkType extends Enum<ZephyrNetworkType>
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.
  • Enum Constant Details

    • MAINNET

      public static final ZephyrNetworkType MAINNET
      Zephyr mainnet: primary addresses start with "ZEPHYR".
    • TESTNET

      public static final ZephyrNetworkType TESTNET
      Zephyr testnet (its hard-fork table in the pinned core stops before the V2 assets).
    • STAGENET

      public static final ZephyrNetworkType STAGENET
      Zephyr stagenet (its hard-fork table in the pinned core stops before the V2 assets).
  • Method Details

    • values

      public static ZephyrNetworkType[] 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

      public static ZephyrNetworkType valueOf(String name)
      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 name
      NullPointerException - 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

      public static ZephyrNetworkType parse(String networkTypeStr)
      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