public function publicKeyHex() {
        // 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()->getHex();
        } else {
            if (is_null($this->publicKeyHex)) {
                $this->publicKeyHex = $this->key->getPublicKey()->getHex();
            }

            return $this->publicKeyHex;
        }
    }