/**
  * get the plain public key for the current BIP32 key
  *
  * @return string
  */
 public function publicKey()
 {
     // if this is a BIP32 Private key then we first build the public key
     //  that way it will be cached nicely
     if (!$this->path->isPublicPath()) {
         return $this->buildKey($this->path->publicPath())->publicKey();
     } else {
         if (is_null($this->publicKey)) {
             $this->publicKey = BIP32::extract_public_key($this->tuple());
         }
         return $this->publicKey;
     }
 }