Class AddressFormatException.WrongNetwork

  • All Implemented Interfaces:
    Enclosing class:

    public static class AddressFormatException.WrongNetwork
    extends AddressFormatException.InvalidPrefix
    This exception is thrown by the EncodedPrivateKey hierarchy of classes when you try and decode an address with a prefix (version header or human-readable part) that used by another network (usually: mainnet vs testnet). You shouldn't allow the user to proceed in this case as they are trying to send money across different chains, an operation that is guaranteed to destroy the money.
    See Also:
    Serialized Form
    • Constructor Detail

      • WrongNetwork

        public WrongNetwork​(int versionHeader)
      • WrongNetwork

        public WrongNetwork​(java.lang.String hrp)