Skip to main content

Cryptographically sign and verify AI interactions — SSL for AI

Project description

@sonate/trust-receipts-python

Python SDK for SONATE Trust Receipts - identical behavior to JavaScript SDK.

Install

pip install sonate-trust-receipts

Quick Start

import asyncio
from sonate.trust_receipts import TrustReceipts, WrapOptions
import anthropic

async def main():
    receipts = TrustReceipts(private_key="your-private-key-hex")
    
    client = anthropic.Anthropic()
    messages = [{"role": "user", "content": "Explain quantum computing."}]
    
    response, receipt = await receipts.wrap(
        lambda: client.messages.create(
            model="claude-3-sonnet-20240229",
            max_tokens=1024,
            messages=messages
        ),
        WrapOptions(session_id="user-123", input=messages)
    )
    
    print(f"Receipt Hash: {receipt.receipt_hash}")

asyncio.run(main())

Features

  • Ed25519 Signing
  • SHA-256 Hashing
  • RFC 8785 Canonicalization
  • Hash Chaining
  • Privacy Mode (hash-only receipts)
  • Zero-Backend Verification
  • Cross-Language Compatibility with JavaScript SDK

See README.md in JavaScript package for full documentation.

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

sonate_trust_receipts-1.0.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

sonate_trust_receipts-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file sonate_trust_receipts-1.0.0.tar.gz.

File metadata

  • Download URL: sonate_trust_receipts-1.0.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sonate_trust_receipts-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b6b817e2e6ca927d195501242194d7735b5a3e7eea1a131b90ff713edb3ba43d
MD5 fdbbfb76aa7d9664efe7185b30b44e72
BLAKE2b-256 b811b60f1f75c7d4c7026a92ab01f24cfe044ed6b4054cf6724a95fe89f1928a

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonate_trust_receipts-1.0.0.tar.gz:

Publisher: python-sdk.yml on s8ken/yseeku-platform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sonate_trust_receipts-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sonate_trust_receipts-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8b4811d96f657b754f22bbc870ef7a957192a0d72e7945ff5d074bddf6948f8
MD5 7977c049755b269da1364fd7e71d446a
BLAKE2b-256 6f6614b3aa2211116c9fe2bc3badae5bde45370c4071777d78b5c66f34e021ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonate_trust_receipts-1.0.0-py3-none-any.whl:

Publisher: python-sdk.yml on s8ken/yseeku-platform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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