DIAP Python SDK - Decentralized Intelligent Agent Protocol
Project description
DIAP Python SDK
Decentralized Intelligent Agent Protocol (DIAP) SDK for Python.
A Python implementation of the DIAP protocol for decentralized identity management and agent authentication using zero-knowledge proofs.
Features
- Decentralized Identity: W3C DID:key implementation
- Zero-Knowledge Proofs: ZKP-based authentication using snarkjs
- IPFS Integration: Decentralized storage with IPNS support
- P2P Networking: Hyperswarm and Iroh communication
- Agent Authentication: Secure agent identity and verification
- Encryption: Ed25519 keys with AES-256-GCM encryption
Installation
pip install diap-sdk
Or install from source:
git clone https://github.com/logos-42/DIAP_Python_SDK.git
cd DIAP_Python_SDK
pip install -e .
Quick Start
from diap import KeyManager, DIDBuilder
# Generate a key pair
km = KeyManager()
key_pair = km.generate()
# Create DID document
builder = DIDBuilder()
doc = builder.create_did_document(key_pair)
print(f"DID: {doc.id}")
Development
Install development dependencies:
pip install -e ".[dev]"
Run tests:
pytest tests/
Project Structure
diap/
├── __init__.py # Main package exports
├── key_manager.py # Ed25519 key generation and management
├── did_builder.py # W3C DID Document creation
├── did_cache.py # DID document caching
├── identity_manager.py # Identity registration and ZKP verification
├── noir_zkp.py # ZKP circuit integration
├── ipfs_client.py # IPFS HTTP API client
├── ipfs_node_manager.py # Local Kubo node management
├── ipns_manager.py # IPNS publishing/resolution
├── kubo_installer.py # Auto-install Kubo IPFS daemon
├── agent_auth.py # Agent authentication
├── agent_verification.py # Agent verification
├── real_name_auth.py # Real-name authentication
├── pubsub_authenticator.py # PubSub authentication
├── nonce_manager.py # Nonce management
├── encrypted_peer_id.py # PeerID encryption
├── iroh_communicator.py # Iroh P2P communication
├── p2p/
│ └── hyperswarm_communicator.py # Hyperswarm P2P
├── types/ # Type definitions
├── utils/ # Utilities
└── zkp/ # ZKP backends
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file diap_sdk-0.1.1.tar.gz.
File metadata
- Download URL: diap_sdk-0.1.1.tar.gz
- Upload date:
- Size: 42.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4757e383298ae7318afcccd2236602db3b53a7c05c743e30c356b3afdce00472
|
|
| MD5 |
91f92d1e623deea3d701f9cf8fa298c7
|
|
| BLAKE2b-256 |
cdc54a39e345f886190b9ba716193f4d09c45b6d36d6d4f436098a0b5ec4691b
|
File details
Details for the file diap_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: diap_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 52.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d17092716bc40e3487d3d90385a466bf22bb426b9a939152c683f4af12caa545
|
|
| MD5 |
463170294e3a733ffc2384f122991ecc
|
|
| BLAKE2b-256 |
54eef81a5207e026fa31ee710b0e1986bffea57e46b1c529fb3d4eadb9aa0741
|