Why does Navajo's Anon Code have an API attached to it? (api.navajocoin.org:443)
More specifically,
https://github.com/sherlockcoin/navajocoin/commit/b288c987314233005a9893d7cf11859dd8e2dd3a#diff-c33d3ce1a2a004536aaf1b90f6458900If it does use a centralized service, which it [CLEARLY DOES!, AGAIN, IDK] - would be kinda risky
The doubt code:
+ void SendCoinsDialog::on_sendButton_clicked()
+{
+ //test
+
+ if(ui->anonCheckBox->checkState() == 0){
+ QString node = QString("");
+ this->sendCoins(node);
+ }else{
+
+ QMessageBox::warning(this, tr("Anonymous Transaction"),
+ tr("Anonymous transactions are disabled until hardfork stabilization is achieved."),
+ QMessageBox::Ok, QMessageBox::Ok);
+
+ /*
+ QSslSocket *socket = new QSslSocket(this);
+ socket->setPeerVerifyMode(socket->VerifyNone);
+ //connect(socket, SIGNAL(encrypted()), this, SLOT(sslRequest()));
+
+ socket->connectToHostEncrypted("api.navajocoin.org", 443);
+
+ if(!socket->waitForEncrypted()){
+ qDebug() << socket->errorString();
+ }else{
+
+ socket->write("GET /api/select-incoming-node HTTP/1.1\r\n" \
+ "Host: api.navajocoin.org\r\n" \
+ "Connection: Close\r\n\r\n");
+
+ while (socket->waitForReadyRead()){
+
+ while(socket->canReadLine()){
+ //read all the lines
+ QString line = socket->readLine();
+ }
+
+ QString rawReply = socket->readAll();
+ QJsonDocument jsonDoc = QJsonDocument::fromJson(rawReply.toUtf8());
+ QJsonObject jsonObject = jsonDoc.object();
+ QString type = jsonObject["type"].toString();
+
+ if(type == "SUCCESS"){
+
+ QString address = jsonObject["address"].toString();
+ QString publicKey = jsonObject["public_key"].toString();
+ minAmount = jsonObject["min_amount"].toDouble();
+ maxAmount = jsonObject["max_amount"].toDouble();
+ double txFee = jsonObject["transaction_fee"].toDouble();
+
+ model->setAnonDetails(minAmount, maxAmount, publicKey);
+
+
+ QString messageString = QString("Are you sure you want to send these coins throug the Navajo Anonymous Network? There will be a %1% transaction fee.").arg(txFee);
+
+ QMessageBox::StandardButton reply;
+ reply = QMessageBox::question(this, "Anonymous Transaction", messageString, QMessageBox::Yes|QMessageBox::No);
+
+ if(reply == QMessageBox::Yes){
+ this->sendCoins(address);
+ }
+
+
+ }else{
+ QMessageBox::warning(this, tr("Anonymous Transaction"),
+ tr("We were unable to locate an active Anonymous node, please try again later."),
+ QMessageBox::Ok, QMessageBox::Ok);
+ }//not success
+
+
+ }//wait for ready read
+
+ }//no socket error
+ */
+
+ }//else
+
+
+}//sendButton
If anyone can explain this, I will be really happy