Skip to content

mizcausevic-dev/aeo-sdk-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aeo-sdk-rust

Crates.io docs.rs License: MIT

Rust SDK for the AEO Protocol v0.1 — parse, build, validate, and fetch AEO declaration documents.

Install

[dependencies]
aeo-protocol = "0.1"

Quickstart

use aeo_protocol::{Document, fetch_well_known};

fn main() -> Result<(), aeo_protocol::AeoError> {
    // Fetch and parse from a live well-known URL
    let doc = fetch_well_known("https://mizcausevic-dev.github.io")?;
    println!("{}", doc.entity.name);                    // "Miz Causevic"
    println!("{:?}", doc.claim_ids());                  // ["current-role", ...]
    println!("{:?}", doc.find_claim("years-experience").map(|c| &c.value));

    // Parse from a string
    let raw = std::fs::read_to_string("aeo.json")?;
    let parsed = Document::from_json(&raw)?;
    println!("{}", parsed.to_json()?);
    Ok(())
}

What it does

  • ParseDocument::from_json(&str) returns a strongly-typed Document
  • BuildDocument, Entity, Authority, Claim, Verification, CitationPreferences, AnswerConstraints, Audit are all public struct types with serde::Serialize + serde::Deserialize
  • Serializedoc.to_json() returns canonical pretty-printed JSON
  • Fetchfetch_well_known(origin) performs HTTP discovery against /.well-known/aeo.json with Accept: application/aeo+json, application/json (feature client, on by default)
  • Querydoc.claim_ids() and doc.find_claim(id) helpers

Features

  • client (default) — HTTP discovery via ureq. Disable with default-features = false for a pure-serde build (no networking).

Conformance

Supports the AEO Protocol at conformance Level 1 (Declare). Signature verification (L2) and audit-endpoint posting (L3) deferred to v0.2.

Dependencies

Development

cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-features

Specification

Full spec at github.com/mizcausevic-dev/aeo-protocol-spec.

License

MIT-licensed. Free for commercial and non-commercial use with attribution. The AEO Protocol specification this SDK implements is also MIT (see aeo-protocol-spec).

Kinetic Gain Protocol Suite

Spec Implementation
AEO Protocol aeo-sdk-python · aeo-sdk-typescript · aeo-sdk-rust (this) · aeo-sdk-go · aeo-cli · aeo-crawler
Prompt Provenance
Agent Cards
AI Evidence Format
MCP Tool Cards

Connect: LinkedIn · Kinetic Gain · Medium · Skills

About

Rust SDK for the AEO Protocol v0.1. Parse, build, validate, and fetch AEO declaration documents. serde + serde_json, optional ureq client. Clippy and rustfmt clean. Loads canonical examples from aeo-protocol-spec.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages