#pragma once #include "tonlib_api.h" #include "TonlibCallback.h" namespace tonlib { class Client final { public: Client(); struct Request { std::uint64_t id; tonlib_api::object_ptr function; }; void send(Request&& request); struct Response { std::uint64_t id; tonlib_api::object_ptr object; }; Response receive(double timeout); static Response execute(Request&& request); ~Client(); Client(Client&& other); Client& operator=(Client&& other); private: class Impl; std::unique_ptr impl_; }; } // namespace tonlib