Skip to main content

MolTrust SDK - Trust Layer for the Agent Economy

Project description

MolTrust SDK

Trust Layer for the Agent Economy.

MolTrust provides identity verification, reputation scoring, and W3C Verifiable Credentials for AI agents.

Install

pip install moltrust

Quickstart

from moltrust import MolTrust

mt = MolTrust(api_key="mt_your_key")

# Register an agent
agent = mt.register("MyAgent")
print(agent.did)  # did:moltrust:a1b2c3d4...

# Issue a Verifiable Credential
vc = mt.issue_credential(agent.did)
print(vc.is_signed)  # True

# Verify the credential
result = mt.verify_credential(vc)
print(result.valid)  # True

Features

  • Identity — Register, verify, and resolve agent DIDs
  • Reputation — Rate agents and query trust scores
  • Verifiable Credentials — Issue and verify W3C VCs with Ed25519 signatures
  • Async Support — Full async client via AsyncMolTrust

Integration Examples

LangChain Tool

from langchain.tools import tool
from moltrust import MolTrust

mt = MolTrust(api_key="mt_...")

@tool
def verify_agent(did: str) -> str:
    """Verify if an AI agent is trusted via MolTrust."""
    if mt.verify(did):
        rep = mt.get_reputation(did)
        return f"Verified. Trust score: {rep.score}/5 ({rep.total_ratings} ratings)"
    return "Agent not found."

Pre-Transaction Check

mt = MolTrust(api_key="mt_...")

def safe_transact(counterparty_did: str):
    rep = mt.get_reputation(counterparty_did)
    if not rep.is_trusted:
        raise Exception(f"Not trusted (score: {rep.score})")
    vc = mt.issue_credential(counterparty_did, "TransactionCredential")
    return vc

Standards

  • W3C DID:web — Decentralized Identifiers
  • W3C Verifiable Credentials — Tamper-proof credentials
  • Ed25519 — Elliptic curve signatures
  • Lightning Network — Bitcoin L2 payments

Links

License

MIT — CryptoKRI GmbH, Zurich, Switzerland

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moltrust-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moltrust-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file moltrust-0.1.0.tar.gz.

File metadata

  • Download URL: moltrust-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for moltrust-0.1.0.tar.gz
Algorithm Hash digest
SHA256 196f2e597d777c532d22728e6c0375abf6c937fbf2bcb27062e875e86fc8765e
MD5 2dab5a2b2cc79086b7910e0982f5926e
BLAKE2b-256 0ae30ca2235ef0a5004e0cbf2f3964fc166611368c43b278abe1116057059d8d

See more details on using hashes here.

File details

Details for the file moltrust-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: moltrust-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for moltrust-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a8430c7c98764269db6c1159a94c702fba7656cdaf5a446f653a70712e2f1ac
MD5 d5ee9dac9f9802c88ad326277fb58c25
BLAKE2b-256 c0ee634e1076d2d7c856e15873b02148f54f467faa38aac72218e6ec90a8979f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page