Skip to content

aethelred-foundation/aethelred-sdk-py

Repository files navigation

aethelred-sdk-py

Official Python SDK for the Aethelred blockchain

Security Docs Hygiene PyPI License

Python PQC Docs


Install

pip install aethelred

Quick Start

from aethelred import AethelredClient, Wallet

# Connect to testnet
client = AethelredClient("https://rpc.testnet.aethelred.io")

# Load wallet
wallet = Wallet.from_mnemonic("your twelve word mnemonic...")

# Submit an AI compute job
job = client.pouw.submit_job(
    model_hash="abc123...",
    input_data=b'{"prompt": "Hello AI"}',
    verification_type="hybrid",   # "tee" | "zkml" | "hybrid"
    priority="standard",
    signer=wallet,
)
print(f"Job ID: {job.job_id}")

# Wait for seal
import time
seal = None
for _ in range(30):
    seal = client.seal.get_seal_by_job(job.job_id)
    if seal:
        break
    time.sleep(2)

print(f"Output hash: {seal.output_hash.hex()}")
print(f"Agreement: {seal.agreement_power}/{seal.total_power}")

API Reference

from aethelred import AethelredClient

client = AethelredClient(rpc_url)

# PoUW module
client.pouw.submit_job(model_hash, input_data, verification_type, priority, signer)
client.pouw.get_job(job_id)
client.pouw.list_jobs(submitter=None, status=None)

# Seal module
client.seal.get_seal(seal_id)
client.seal.get_seal_by_job(job_id)
client.seal.verify_seal(seal_id, output_hash)

# Bank module
client.bank.send(from_wallet, to_address, amount_uaethel)
client.bank.balance(address)

Full API docs: docs.aethelred.io/sdk/python


Development

pip install -e ".[dev]"
pytest
ruff check .
mypy aethelred/

About

Official Python SDK for the Aethelred network.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages