aimarket-provenance
Cryptographic provenance receipts for every AI output — Ed25519 + W3C Verifiable Credentials.
Infrastructure-layer plugin for AIMarket Hub. Auto-attaches a tamper-evident receipt to every successful /invoke, and exposes public verify endpoints for auditors and end users.
Try it: verify any receipt at verify.modelmarket.dev — paste a receipt JSON or open its
verify_url. Client-side Ed25519 check, no backend.
Source-of-truth note. Unlike the other
aimarket-*plugins, which were compressed into thin shims that re-export fromaimarket_hub.*(see commit 2f958a23), this plugin is the full, standalone implementation — receipt, storage, verifier, and API live here underaimarket_provenance/. There is intentionally no parallel copy underplugins/aimarket-provenance/. Keep that asymmetric on purpose: the hub ships provenance in-process by default; the package is the only edit surface.
Documentation
| Document | Description |
|---|---|
| User guide | Install, configure signing key, verify receipts |
| User cases | Compliance, consumer apps, multi-step chains |
| SDK integration | HTTP API, Python, invoke hook behavior |
Why this exists
Regulated and high-trust AI workflows need proof of what model ran, on what input hash, at what time, signed by whom — without storing full prompts on a public ledger. Provenance is the infrastructure abstract layer between raw invoke results and external audit systems.
Features
- Auto-receipt on invoke —
provenance_receiptfield on every invoke response - W3C Verifiable Credential format with Ed25519 hub signature
- Provenance chains —
parent_receiptslink multi-step pipelines - TEE + ZK metadata — optional attestation fields embedded in receipt
- Public verify — anyone can verify without API token
- Protected attest — optional Bearer token for manual receipt creation
Installation
cd aimarket-hub
pip install -e plugins/aimarket-provenance
aimarket serve
Verify:
curl http://localhost:9083/ai-market/v2/plugins | jq '.plugins[] | select(.name=="provenance")'
curl http://localhost:9083/.well-known/ai-market.json | jq '.plugin_extensions.provenance'
API Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
POST |
/ai-market/v2/p/provenance/attest |
Bearer (optional) | Create receipt manually |
GET |
/ai-market/v2/p/provenance/receipt/{id} |
Public | Fetch stored receipt |
GET |
/ai-market/v2/p/provenance/verify/{id} |
Public | Full cryptographic verification |
Auto-receipt on invoke
curl -X POST http://localhost:9083/ai-market/v2/invoke \
-H "Content-Type: application/json" \
-d '{
"product_id": "prod-demo",
"capability_id": "translate@v1",
"source_hub": "local",
"input": {"text": "Hello"}
}' | jq '.provenance_receipt'
{
"receipt_id": "urn:aimarket:receipt:abc123...",
"verify_url": "https://verify.modelmarket.dev/r/abc123"
}
Manual attest
curl -X POST http://localhost:9083/ai-market/v2/p/provenance/attest \
-H "Authorization: Bearer $AIMARKET_PROVENANCE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model_id": "legal.review@v1@prod-legal",
"provider_hub": "https://provider.example.com",
"input": {"documents": {"hash": "sha256:..."}},
"output": {"risk": "low", "issues": 0},
"parent_receipts": ["urn:aimarket:receipt:parent-id"],
"latency_ms": 4200,
"price_usd": 0.15
}'
Configuration
| Env Variable | Default | Description |
|---|---|---|
AIMARKET_PROVENANCE_KEY_PATH |
data/provenance_signing_key |
Ed25519 signing key (created on first run) |
AIMARKET_PROVENANCE_API_TOKEN |
(empty) | Bearer token for /attest; empty = open |
AIMARKET_VERIFY_DOMAIN |
https://verify.modelmarket.dev |
Base URL in verify_url links |
DATABASE_URL |
SQLite | Optional PostgreSQL for receipt storage |
Back up provenance_signing_key — losing it invalidates verification of historical receipts.
Storage
Receipts persist in provenance.db (SQLite) or PostgreSQL when DATABASE_URL is set. Migration 005_provenance_receipts in hub schema.
Combine with
| Plugin | Pattern |
|---|---|
aimarket-tee |
Embed TEE attestation in receipt |
aimarket-zk |
Attach ZK proof references without revealing payloads |
aimarket-reputation |
Include reputation_score field on attest |
aimarket-channels |
Receipt lists price_usd debited from channel |
License
Apache-2.0 · Part of AIMarket Hub
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aimarket_provenance-1.1.0.tar.gz.
File metadata
- Download URL: aimarket_provenance-1.1.0.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a6334098dd149471fe73bf0818e13c828fe15e66f33ca5f280e15a110bcdd28
|
|
| MD5 |
309d1bf601c36d65fee922bb075ec97c
|
|
| BLAKE2b-256 |
165081e719669458bb099bf60bb79e95381e12dc94aa6ac3fb9f50b4ec96267f
|
File details
Details for the file aimarket_provenance-1.1.0-py3-none-any.whl.
File metadata
- Download URL: aimarket_provenance-1.1.0-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6e3883f8d69a5ac919c0a1180dbd6f85159530fbf982d7eec9c305f6e3c57be
|
|
| MD5 |
b140f690ea973fc9eda6896cff24ed24
|
|
| BLAKE2b-256 |
415fd9287235f9e30b9a8bed7fcc13b5d98e01b59c64291c979771bb2bb3bbea
|