class LocalIdentity {

  public static LocalIdentity fromString(String str) {
    Matcher result = regexpPattern.matcher(str);
    if (!result.matches()) {
      return null;
    }
    return new LocalIdentity(
        result.group(1),
        result.group(2),
        Identity.fromPublicKey(Signature.PublicKey.fromBytes(Bytes.fromBase64String(result.group(3)))));

  }

  public  LocalIdentity(String ip, String port, Identity id);
  public  LocalIdentity(String ip, int port, Identity id);
  public  LocalIdentity(InetSocketAddress addr, Identity id);

}