TrustAgent API
The primary interface for creating and managing trust identities.
Constructor
TrustAgent.create(
org: str,
entity_type: str = "agent",
security_level: int = 3,
capabilities: list[str] = [],
hybrid_mode: bool = False,
framework: str | None = None,
resolver: DIDResolver | None = None,
audit_path: Path | None = None,
) -> TrustAgent
Properties
| Property | Type | Description |
|---|
| did | str | DID string (did:trusthub:org:fingerprint) |
| did_document | TrustHubDIDDocument | Full DID document |
| public_key | bytes | ML-DSA public key |
| security_level | int | NIST security level (2, 3, or 5) |
Methods
| Method | Returns | Description |
|---|
| sign_message(data: bytes) | SignedMessage | Sign with ML-DSA |
| verify_message(signed, peer_did) | bool | Verify a peer's signature |
| record_trust_proof(peer_did, ...) | LedgerEntry | Record a trust proof |
| issue_credential(subject_did, ...) | VerifiableCredential | Issue a credential |
| get_trust_score(subject_did) | float | Compute trust score |