Skip to content

hjs-spec/jep-api

Repository files navigation

JEP v0.6 API Seed

A small FastAPI implementation seed for the Judgment Event Protocol v0.6.

This repository upgrades the earlier JEP-04 API demo into a JEP v0.6-style API seed aligned with:

  • draft-wang-jep-judgment-event-protocol-06
  • draft-wang-jep-profiles-00
  • draft-wang-jep-conformance-00

Status

This is an implementation seed, not a production security service.

It demonstrates:

  • J/D/T/V event creation
  • JEP wire version "1"
  • JEP-Core-0.6 profile labels
  • JCS-compatible seed canonicalization
  • algorithm-tagged event hashes
  • detached JWS Compact Serialization shape
  • Ed25519 signing and verification
  • ext / ext_crit extension framework
  • TTL and digest-only privacy extensions
  • JEP-style validation result object
  • separated event storage and nonce consumption

Endpoints

Endpoint Purpose
GET / API metadata and demo public key
GET /health Health check
POST /events/create Create and sign a JEP-style event
POST /events/verify Verify a JEP-style event

Run locally

pip install -r requirements.txt
uvicorn main:app --reload

Open:

http://127.0.0.1:8000/docs

Example create request

{
  "verb": "J",
  "who": "did:example:agent-789",
  "what": {
    "claim": "approve",
    "subject": "demo"
  },
  "aud": "https://api.example.org",
  "ttl_minutes": 30,
  "digest_only_who": false
}

Validation result shape

{
  "valid": true,
  "level": 1,
  "mode": "archival",
  "profile": "jep-core-0.6",
  "scopes": ["syntax", "cryptographic"],
  "event_hash": "sha256:...",
  "warnings": [],
  "errors": []
}

Boundary

This API does not determine:

  • external truth;
  • legal liability;
  • regulatory compliance;
  • authorization validity;
  • complete-log availability;
  • model correctness.

A valid signature proves protocol-level integrity under the API seed's demo trust context.

Public drafts

Related resources

About

JEP API v0.6 seed: FastAPI service for creating and verifying JEP-Core events with Ed25519, detached JWS shape, ext/ext_crit, event hashes, and validation results.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors