C++

The C++ SDK is the C++ client for the antd daemon.

Install

include(FetchContent)
FetchContent_Declare(
    antd-cpp
    GIT_REPOSITORY https://github.com/WithAutonomi/ant-sdk.git
    SOURCE_SUBDIR  antd-cpp
)
FetchContent_MakeAvailable(antd-cpp)

target_link_libraries(your_target PRIVATE antd)

Connect to the daemon

#include "antd/antd.hpp"

int main() {
    antd::Client client("http://localhost:8082");
    auto health = client.health();
    return health.ok ? 0 : 1;
}

Store and retrieve data

Type mappings

Autonomi type
C++ type

HealthStatus

struct with ok and network

PutResult

struct with cost and address

Raw data

std::vector<uint8_t>

Error handling

Full API reference

For all available daemon endpoints, see the REST API.

Last updated