Demonstrates the full EEP gate subscriber flow from Python: discovering gate configs, handling 402 (Access Restricted) responses, submitting proofs, and accessing gated resources.
A running EEP gate publisher (e.g., node-gate-publisher):
cd ../node-gate-publisher
npm install && npx tsx server.tspip install -r requirements.txt# Default: connects to http://localhost:3002
python client.py
# Custom publisher URL
EEP_PUBLISHER_URL=https://publisher.example python client.py- Gate Discovery —
GET /eep/gates/:didto learn tier structure and requirements - 402 Handling — Attempt gated resource, parse the 402 response (unmet requirements, available tiers)
- Proof Submission — Build proofs based on the 402 requirements and retry with
X-EEP-Proofsheader - Service Catalog —
GET /eep/services/:didto browse entity's service listings
┌──────────────┐ GET /eep/gates/:did ┌──────────────┐
│ Subscriber │ ──────────────────────────── │ Publisher │
│ (Python) │ ◀──── 200 + gate config ──── │ (any lang) │
│ │ │ │
│ │ GET /eep/content/:did/path │ │
│ │ ──────────────────────────── │ │
│ │ ◀──── 402 + requirements ─── │ │
│ │ │ │
│ build │ GET + X-EEP-Proofs header │ │
│ proofs ──▶ │ ──────────────────────────── │ │
│ │ ◀──── 200 + content ──────── │ │
└──────────────┘ └──────────────┘
Apache-2.0