Skip to main content

Cryptographically verifiable, append-only event records for human-agent and agent-agent workflows

Project description

MailioReceipt v1

Cryptographically verifiable, append-only event records for human-agent and agent-agent workflows.

Installation

pip install mailio-receipt

Quick Start

from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.hazmat.backends import default_backend

from mailio_receipt import (
    create_receipt,
    create_event,
    Actors,
    Intent,
    IntentKind,
)

# Generate a signing key (P-256 or Ed25519)
private_key = ec.generate_private_key(ec.SECP256R1(), default_backend())

# Create an event
event = create_event(
    flow_id="660f9400-f39c-51e5-b827-557766551111",
    actors=Actors(
        issuer="did:web:agent.example.com",
        subject="did:web:user.example.com",
    ),
    intent=Intent(
        kind=IntentKind.ACTION_PLANNED,
        action="invoice.send",
        category="financial",
        scope={"invoiceId": "INV-2026-001"},
    ),
)

# Sign and create receipt
receipt = create_receipt(
    event=event,
    private_key=private_key,
    signer_did="did:web:agent.example.com",
)

print(f"Receipt created: {receipt.digest[:16]}...")

License

MIT

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

mailio_receipt-0.0.2.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

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

mailio_receipt-0.0.2-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file mailio_receipt-0.0.2.tar.gz.

File metadata

  • Download URL: mailio_receipt-0.0.2.tar.gz
  • Upload date:
  • Size: 48.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for mailio_receipt-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c7e8114eea6d068d043c9a1ac508705dd7b516f92dbffb1a4eb4ad13d833f0ff
MD5 6e3ee2e83ca74a39639372dcdeec4a70
BLAKE2b-256 5bb735f4ca53ea6dde4bb271b9d84dbb0d7c7e55a3530d39f54f56cb67698867

See more details on using hashes here.

File details

Details for the file mailio_receipt-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mailio_receipt-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for mailio_receipt-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8124ed9d39f0f977dde061fbf03313fce66430ebc8f1654e5fa1f685b8435df8
MD5 29c0a7f342a99c59a189636debe4d099
BLAKE2b-256 9adca7ec73a6234f319ef80346aa9b93479bc38e76b8311ee94f4c0aebb35480

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