function PublicKey(data, extra) {

  if (!(this instanceof PublicKey)) {
    return new PublicKey(data, extra);
  }

  $.checkArgument(data, 'First argument is required, please include public key data.');

  if (data instanceof PublicKey) {
    // Return copy, but as it's an immutable object, return same argument
    return data;
  }
  extra = extra || {};

  var info = this._classifyArgs(data, extra);

  // validation
  info.point.validate();

  JSUtil.defineImmutable(this, {
    point: info.point,
    compressed: info.compressed,
    network: info.network || Network.defaultNetwork
  });

  return this;
}
Instantiate a PublicKey from a {@link PrivateKey}, {@link Point}, `string`, or `Buffer`.

There are two internal properties, `network` and `compressed`, that deal with importing
a PublicKey from a PrivateKey in WIF format. More details described on {@link PrivateKey}

@example
```javascript
// instantiate from a private key
var key = PublicKey(privateKey, true);

// export to as a DER hex encoded string
var exported = key.toString();

// import the public key
var imported = PublicKey.fromString(exported);
```

@param {string} data - The encoded data in various formats
@param {Object} extra - additional options
@param {Network=} extra.network - Which network should the address for this public key be for
@param {String=} extra.compressed - If the public key is compressed
@returns {PublicKey} A new valid instance of an PublicKey
@constructor