#pragma once

#include <string>
#include <nlohmann/json.hpp>
#include <mutex>
#include <condition_variable>

class ormNode {
protected:
    struct params {
        std::string orm_peer;
        std::string orm_version;
        std::string orm_opc_client_peer;

        std::string init_status;
        std::string location_status;
        std::string chain_status;
    };
public:
    ormNode();
    void setParams(const nlohmann::json &msg, const std::string &url);
    params _params;

    std::mutex status_mutex;
    std::condition_variable status_cv;
    bool status_ready = false;
};

std::string getEndpointFromUrl(std::string url);