Skip to content

halyndev/aap-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aap.hpp — AAP C++ SDK

Agent Accountability Protocol · Single-header C++17 · OpenSSL Ed25519

license tests

# One file. OpenSSL is already on your system.
curl -O https://raw.githubusercontent.com/halyndev/aap-cpp/main/aap.hpp
#include "aap.hpp"

auto supervisor = aap::KeyPair::generate();
auto agent      = aap::KeyPair::generate();

auto identity = aap::Identity::create(
    "aap://factory/robot/arm@1.0.0",
    {"move:axis", "grip:actuator"},
    agent, supervisor, "did:key:z6Mk"
);

// Physical World Rule — Level 4 on physical node → PhysicalWorldViolation
try {
    aap::Authorization::create(
        identity.id, aap::Level::Autonomous,
        {"move:axis"}, true, supervisor, "did:key:z6Mk"
    );
} catch (const aap::PhysicalWorldViolation&) {
    // AAP-003: Level 4 forbidden for physical nodes.
}
# Compile
g++ -std=c++17 main.cpp -lssl -lcrypto -o main

# Test
g++ -std=c++17 tests/test_aap.cpp -I. -lssl -lcrypto -o test && ./test
# 19/19 passed

Works on Linux, macOS, Windows (MSVC), ROS2. Zero dependencies beyond OpenSSL.

AAP Spec · NRP · Halyn

License: MIT

About

AAP C++ SDK — Agent Accountability Protocol, single-header C++17, OpenSSL Ed25519. MIT.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors