mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The projection these were generated from was a month old and predated the compute migration, so every one of them described /v1/visor — which the API serves at zero paths now. That is why a hand-written console client and a generated one had drifted the same way at the same time. No /v1/visor path survives here. The word still appears as a source-plane value and inside gvisor and supervisor, which are not this rename.
183 lines
5.9 KiB
C++
183 lines
5.9 KiB
C++
/**
|
|
* Hanzo Cloud API
|
|
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
*
|
|
* The version of the OpenAPI document: v1
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI-Generator 7.14.0.
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
/*
|
|
* Market.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_Market_H_
|
|
#define HANZO_MODEL_Market_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include "hanzo/model/Reach.h"
|
|
#include "hanzo/model/Day.h"
|
|
#include "hanzo/model/Figures.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <map>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
class Day;
|
|
class Figures;
|
|
class Reach;
|
|
|
|
|
|
class Market
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
Market();
|
|
virtual ~Market();
|
|
|
|
/////////////////////////////////////////////
|
|
/// ModelBase overrides
|
|
|
|
void validate() override;
|
|
|
|
web::json::value toJson() const override;
|
|
bool fromJson(const web::json::value& json) override;
|
|
|
|
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
|
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// Market members
|
|
|
|
|
|
/// <summary>
|
|
/// Amm reports whether an automated market maker is deployed on this chain, which is the registry's factory addresses being present and not the indexer having rows. The two disagree in exactly the interesting case: a chain with a factory and nothing traded yet is a live venue with no history, and a chain with neither has no venue at all.
|
|
/// </summary>
|
|
bool isAmm() const;
|
|
bool ammIsSet() const;
|
|
void unsetAmm();
|
|
void setAmm(bool value);
|
|
|
|
utility::string_t getCoin() const;
|
|
bool coinIsSet() const;
|
|
void unsetCoin();
|
|
void setCoin(const utility::string_t& value);
|
|
|
|
std::shared_ptr<Day> getDay() const;
|
|
bool dayIsSet() const;
|
|
void unsetDay();
|
|
void setDay(const std::shared_ptr<Day>& value);
|
|
|
|
/// <summary>
|
|
/// Factory is the AMM's factory contracts, by generation, omitted where none is deployed. Addresses come from the registry because that is what the indexer itself ingested from; anything else is a second copy free to drift.
|
|
/// </summary>
|
|
std::map<utility::string_t, utility::string_t> getFactory() const;
|
|
bool factoryIsSet() const;
|
|
void unsetFactory();
|
|
void setFactory(const std::map<utility::string_t, utility::string_t>& value);
|
|
|
|
/// <summary>
|
|
/// Figures is the chain's whole market maker, and Day its most recent active one. Both are absent unless Reach says Read, so a caller cannot mistake a zero this process never received for one the indexer computed. Day is also absent on a chain that has never traded — which reach reports as Read, so the two absences are told apart by the state beside them and never by the gap itself.
|
|
/// </summary>
|
|
std::shared_ptr<Figures> getFigures() const;
|
|
bool figuresIsSet() const;
|
|
void unsetFigures();
|
|
void setFigures(const std::shared_ptr<Figures>& value);
|
|
|
|
/// <summary>
|
|
/// Graph is where this chain's indexer answers, empty where it has none.
|
|
/// </summary>
|
|
utility::string_t getGraph() const;
|
|
bool graphIsSet() const;
|
|
void unsetGraph();
|
|
void setGraph(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ID is the EVM chain id, which is what a wallet must agree with.
|
|
/// </summary>
|
|
int64_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(int64_t value);
|
|
|
|
utility::string_t getName() const;
|
|
bool nameIsSet() const;
|
|
void unsetName();
|
|
void setName(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Reach is how far the read of this chain's FIGURES got — its own, so one indexer being down describes one row and leaves the others to answer.
|
|
/// </summary>
|
|
std::shared_ptr<Reach> getReach() const;
|
|
bool reachIsSet() const;
|
|
void unsetReach();
|
|
void setReach(const std::shared_ptr<Reach>& value);
|
|
|
|
/// <summary>
|
|
/// RPC is the chain's PUBLIC JSON-RPC, empty where the registry names only a route this process happens to have. The registry's own `rpc` field is the INDEXER's route to the node and is sometimes inside its cluster — plain HTTP on a `.svc.cluster.local` name — which is reachable from the indexer, from nothing else, and from no browser. Publishing that as the chain's endpoint hands every caller an address that cannot answer them. See [endpoint].
|
|
/// </summary>
|
|
utility::string_t getRpc() const;
|
|
bool rpcIsSet() const;
|
|
void unsetRpc();
|
|
void setRpc(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Slug is the chain's word in every indexer path — `cchain`, `zoo`. It is the value a caller passes back as `chain`, and it is NOT the chain id: `96369`, `C` and `c-chain` all answer 404 in that position.
|
|
/// </summary>
|
|
utility::string_t getSlug() const;
|
|
bool slugIsSet() const;
|
|
void unsetSlug();
|
|
void setSlug(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
bool m_Amm;
|
|
bool m_AmmIsSet;
|
|
|
|
utility::string_t m_Coin;
|
|
bool m_CoinIsSet;
|
|
|
|
std::shared_ptr<Day> m_Day;
|
|
bool m_DayIsSet;
|
|
|
|
std::map<utility::string_t, utility::string_t> m_Factory;
|
|
bool m_FactoryIsSet;
|
|
|
|
std::shared_ptr<Figures> m_Figures;
|
|
bool m_FiguresIsSet;
|
|
|
|
utility::string_t m_Graph;
|
|
bool m_GraphIsSet;
|
|
|
|
int64_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Name;
|
|
bool m_NameIsSet;
|
|
|
|
std::shared_ptr<Reach> m_Reach;
|
|
bool m_ReachIsSet;
|
|
|
|
utility::string_t m_Rpc;
|
|
bool m_RpcIsSet;
|
|
|
|
utility::string_t m_Slug;
|
|
bool m_SlugIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_Market_H_ */
|