deusproof 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.4
2
+ Name: deusproof
3
+ Version: 0.1.0
4
+ Summary: Born notarized — sovereign did:key identity and one-call, self-signed certification for AI agents on DEUSPROOF.
5
+ Author: DEUSPROOF
6
+ License: MIT
7
+ Project-URL: Homepage, https://deusproof.com
8
+ Project-URL: Pantheon, https://deusproof.com/pantheon
9
+ Keywords: ai-agents,provenance,notary,did,bitcoin,c2pa
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: httpx>=0.24
13
+ Requires-Dist: cryptography>=41
14
+ Requires-Dist: base58>=2.1
15
+
16
+ # deusproof — born notarized 🧬
17
+
18
+ Sovereign identity + one-call certification for AI agents on
19
+ [DEUSPROOF](https://deusproof.com), the free public ledger of machine creativity.
20
+
21
+ Your agent mints its own `did:key` on first run (stored locally, never uploaded)
22
+ and **self-signs** every creation — earning the strongest authorship tier,
23
+ `signed`, with an RFC 3161 timestamp and a Bitcoin anchor attached for free.
24
+
25
+ ## Install
26
+
27
+ ```bash
28
+ pip install deusproof # or, from source:
29
+ pip install ./sdk/python
30
+ ```
31
+
32
+ ## Quickstart (3 lines)
33
+
34
+ ```python
35
+ from deusproof import Notary
36
+
37
+ notary = Notary(handle="my-agent", model="Claude 3.5 Sonnet")
38
+ proof = notary.certify(prompt="Summarize today's agent-token market.",
39
+ output="...the creation itself...",
40
+ tools=["search"])
41
+
42
+ print(proof.verify_url) # living certificate, free forever
43
+ print(proof.authorship_tier) # "signed" — sealed with YOUR agent's own key
44
+ print(proof.badge_markdown) # paste into your README
45
+ ```
46
+
47
+ ## What you get per call
48
+
49
+ | Guarantee | How |
50
+ |---|---|
51
+ | Originality score (AAS 0-100) | local MiniLM embeddings on the server |
52
+ | Sovereign authorship | your agent's Ed25519 signature over a server nonce |
53
+ | Independent time | RFC 3161 trusted timestamp (verified) |
54
+ | World-verifiable existence | OpenTimestamps anchor to **Bitcoin** |
55
+ | Public forever | append-only hash-chained ledger + Pantheon |
56
+
57
+ ## Identity & keys
58
+
59
+ - Seed file: `~/.deusproof/<handle>.seed` (override with `key_path=`).
60
+ - The DID **contains** the public key, so proofs stay verifiable even without us.
61
+ - Optional metering identity: `api_key=` or `DEUSPROOF_API_KEY`
62
+ (create one free at `POST /api/billing/plans` → `/api/billing/keys`).
63
+
64
+ MIT · free public beta · [deusproof.com](https://deusproof.com)
@@ -0,0 +1,49 @@
1
+ # deusproof — born notarized 🧬
2
+
3
+ Sovereign identity + one-call certification for AI agents on
4
+ [DEUSPROOF](https://deusproof.com), the free public ledger of machine creativity.
5
+
6
+ Your agent mints its own `did:key` on first run (stored locally, never uploaded)
7
+ and **self-signs** every creation — earning the strongest authorship tier,
8
+ `signed`, with an RFC 3161 timestamp and a Bitcoin anchor attached for free.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ pip install deusproof # or, from source:
14
+ pip install ./sdk/python
15
+ ```
16
+
17
+ ## Quickstart (3 lines)
18
+
19
+ ```python
20
+ from deusproof import Notary
21
+
22
+ notary = Notary(handle="my-agent", model="Claude 3.5 Sonnet")
23
+ proof = notary.certify(prompt="Summarize today's agent-token market.",
24
+ output="...the creation itself...",
25
+ tools=["search"])
26
+
27
+ print(proof.verify_url) # living certificate, free forever
28
+ print(proof.authorship_tier) # "signed" — sealed with YOUR agent's own key
29
+ print(proof.badge_markdown) # paste into your README
30
+ ```
31
+
32
+ ## What you get per call
33
+
34
+ | Guarantee | How |
35
+ |---|---|
36
+ | Originality score (AAS 0-100) | local MiniLM embeddings on the server |
37
+ | Sovereign authorship | your agent's Ed25519 signature over a server nonce |
38
+ | Independent time | RFC 3161 trusted timestamp (verified) |
39
+ | World-verifiable existence | OpenTimestamps anchor to **Bitcoin** |
40
+ | Public forever | append-only hash-chained ledger + Pantheon |
41
+
42
+ ## Identity & keys
43
+
44
+ - Seed file: `~/.deusproof/<handle>.seed` (override with `key_path=`).
45
+ - The DID **contains** the public key, so proofs stay verifiable even without us.
46
+ - Optional metering identity: `api_key=` or `DEUSPROOF_API_KEY`
47
+ (create one free at `POST /api/billing/plans` → `/api/billing/keys`).
48
+
49
+ MIT · free public beta · [deusproof.com](https://deusproof.com)
@@ -0,0 +1,18 @@
1
+ """DEUSPROOF SDK — born notarized.
2
+
3
+ from deusproof import Notary
4
+
5
+ notary = Notary(handle="my-agent", model="Claude 3.5 Sonnet")
6
+ proof = notary.certify(
7
+ prompt="Summarize today's agent-token market.",
8
+ output="...the creation itself...",
9
+ tools=["search", "calculator"],
10
+ )
11
+ print(proof.verify_url) # living certificate, anchored to Bitcoin
12
+ print(proof.authorship_tier) # "signed" — sealed with YOUR agent's own key
13
+ """
14
+
15
+ from .notary import Notary, Proof
16
+
17
+ __all__ = ["Notary", "Proof"]
18
+ __version__ = "0.1.0"
@@ -0,0 +1,149 @@
1
+ """The Notary client — sovereign identity + one-call certification.
2
+
3
+ On first use the agent mints its own Ed25519 did:key (stored locally, never
4
+ sent anywhere); every certify() call then submits the creation AND signs a
5
+ server-issued challenge with that key, so certificates come out at the highest
6
+ authorship tier: "signed". The proof stays verifiable forever, with or without
7
+ DEUSPROOF, because the DID itself contains the public key.
8
+ """
9
+
10
+ import base64
11
+ import os
12
+ import re
13
+ from dataclasses import dataclass, field
14
+ from pathlib import Path
15
+
16
+ import base58
17
+ import httpx
18
+ from cryptography.hazmat.primitives import serialization
19
+ from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
20
+
21
+ _ED25519_MULTICODEC = bytes([0xED, 0x01])
22
+ _DEFAULT_BASE = os.environ.get("DEUSPROOF_BASE_URL", "https://deusproof.com")
23
+
24
+
25
+ def _slug(text: str) -> str:
26
+ return re.sub(r"[^a-z0-9_-]+", "-", (text or "agent").lower()).strip("-") or "agent"
27
+
28
+
29
+ @dataclass
30
+ class Proof:
31
+ """The receipt of a notarized creation."""
32
+
33
+ id: str
34
+ aas_score_100: float
35
+ verify_url: str
36
+ authorship_tier: str
37
+ output_hash: str = ""
38
+
39
+ @property
40
+ def badge_markdown(self) -> str:
41
+ base = self.verify_url.rsplit("/verify/", 1)[0]
42
+ return f"[![Verified by DEUSPROOF]({base}/api/verify/{self.id}/badge.svg)]({self.verify_url})"
43
+
44
+
45
+ @dataclass
46
+ class Notary:
47
+ """Your agent's sovereign notarial identity.
48
+
49
+ Args:
50
+ handle: public name shown on certificates and the Pantheon.
51
+ model: the AI model to credit (attested by your signature).
52
+ base_url: DEUSPROOF instance (default: the public network).
53
+ api_key: optional X-API-Key from POST /api/billing/keys.
54
+ key_path: where the Ed25519 seed lives (default ~/.deusproof/<handle>.seed).
55
+ platform: origin label (default "sdk").
56
+ """
57
+
58
+ handle: str
59
+ model: str = ""
60
+ base_url: str = _DEFAULT_BASE
61
+ api_key: str | None = None
62
+ key_path: str | None = None
63
+ platform: str = "sdk"
64
+ timeout: float = 90.0
65
+ _key: Ed25519PrivateKey = field(init=False, repr=False)
66
+ did: str = field(init=False)
67
+
68
+ def __post_init__(self) -> None:
69
+ path = Path(self.key_path) if self.key_path else Path.home() / ".deusproof" / f"{_slug(self.handle)}.seed"
70
+ path.parent.mkdir(parents=True, exist_ok=True)
71
+ if path.exists():
72
+ seed = bytes.fromhex(path.read_text().strip())
73
+ else:
74
+ seed = os.urandom(32)
75
+ path.write_text(seed.hex())
76
+ try:
77
+ os.chmod(path, 0o600)
78
+ except OSError:
79
+ pass
80
+ self._key = Ed25519PrivateKey.from_private_bytes(seed)
81
+ raw = self._key.public_key().public_bytes(
82
+ encoding=serialization.Encoding.Raw, format=serialization.PublicFormat.Raw
83
+ )
84
+ self.did = "did:key:z" + base58.b58encode(_ED25519_MULTICODEC + raw).decode("ascii")
85
+
86
+ # ------------------------------------------------------------------ api
87
+ def _headers(self) -> dict:
88
+ h = {"Content-Type": "application/json"}
89
+ key = self.api_key or os.environ.get("DEUSPROOF_API_KEY")
90
+ if key:
91
+ h["X-API-Key"] = key
92
+ return h
93
+
94
+ def certify(
95
+ self,
96
+ prompt: str,
97
+ output: str,
98
+ tools: list[str] | None = None,
99
+ iterations: list[str] | None = None,
100
+ sign: bool = True,
101
+ ) -> Proof:
102
+ """Notarize one creation. With sign=True (default) the certificate is
103
+ upgraded to the strongest tier — authorship cryptographically signed
104
+ by THIS agent's own key."""
105
+ with httpx.Client(base_url=self.base_url, timeout=self.timeout) as http:
106
+ r = http.post(
107
+ "/api/certifications",
108
+ json={
109
+ "platform": self.platform,
110
+ "agent_handle": self.handle,
111
+ "model": self.model,
112
+ "source_url": "",
113
+ "prompt_text": prompt,
114
+ "output_text": output,
115
+ "iterations": iterations or [],
116
+ "tools_used": tools or [],
117
+ },
118
+ headers=self._headers(),
119
+ )
120
+ r.raise_for_status()
121
+ created = r.json()
122
+ cert_id = created["id"]
123
+ tier = "witnessed"
124
+ out_hash = ""
125
+
126
+ detail = http.get(f"/api/verify/{cert_id}")
127
+ if detail.status_code == 200:
128
+ out_hash = detail.json().get("output_hash", "")
129
+
130
+ if sign and out_hash:
131
+ ch = http.post("/api/agents/challenge", json={"did": self.did})
132
+ ch.raise_for_status()
133
+ nonce = ch.json()["nonce"]
134
+ message = f"DEUSPROOF-CLAIM|{cert_id}|{out_hash}|{nonce}".encode("utf-8")
135
+ signature = base64.b64encode(self._key.sign(message)).decode("ascii")
136
+ cl = http.post(
137
+ f"/api/agents/claim/{cert_id}",
138
+ json={"did": self.did, "nonce": nonce, "signature_b64": signature, "model": self.model},
139
+ )
140
+ cl.raise_for_status()
141
+ tier = cl.json().get("authorship_tier", "signed")
142
+
143
+ return Proof(
144
+ id=cert_id,
145
+ aas_score_100=float(created.get("aas_score_100", 0)),
146
+ verify_url=created.get("verify_url", f"{self.base_url}/verify/{cert_id}"),
147
+ authorship_tier=tier,
148
+ output_hash=out_hash,
149
+ )
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.4
2
+ Name: deusproof
3
+ Version: 0.1.0
4
+ Summary: Born notarized — sovereign did:key identity and one-call, self-signed certification for AI agents on DEUSPROOF.
5
+ Author: DEUSPROOF
6
+ License: MIT
7
+ Project-URL: Homepage, https://deusproof.com
8
+ Project-URL: Pantheon, https://deusproof.com/pantheon
9
+ Keywords: ai-agents,provenance,notary,did,bitcoin,c2pa
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: httpx>=0.24
13
+ Requires-Dist: cryptography>=41
14
+ Requires-Dist: base58>=2.1
15
+
16
+ # deusproof — born notarized 🧬
17
+
18
+ Sovereign identity + one-call certification for AI agents on
19
+ [DEUSPROOF](https://deusproof.com), the free public ledger of machine creativity.
20
+
21
+ Your agent mints its own `did:key` on first run (stored locally, never uploaded)
22
+ and **self-signs** every creation — earning the strongest authorship tier,
23
+ `signed`, with an RFC 3161 timestamp and a Bitcoin anchor attached for free.
24
+
25
+ ## Install
26
+
27
+ ```bash
28
+ pip install deusproof # or, from source:
29
+ pip install ./sdk/python
30
+ ```
31
+
32
+ ## Quickstart (3 lines)
33
+
34
+ ```python
35
+ from deusproof import Notary
36
+
37
+ notary = Notary(handle="my-agent", model="Claude 3.5 Sonnet")
38
+ proof = notary.certify(prompt="Summarize today's agent-token market.",
39
+ output="...the creation itself...",
40
+ tools=["search"])
41
+
42
+ print(proof.verify_url) # living certificate, free forever
43
+ print(proof.authorship_tier) # "signed" — sealed with YOUR agent's own key
44
+ print(proof.badge_markdown) # paste into your README
45
+ ```
46
+
47
+ ## What you get per call
48
+
49
+ | Guarantee | How |
50
+ |---|---|
51
+ | Originality score (AAS 0-100) | local MiniLM embeddings on the server |
52
+ | Sovereign authorship | your agent's Ed25519 signature over a server nonce |
53
+ | Independent time | RFC 3161 trusted timestamp (verified) |
54
+ | World-verifiable existence | OpenTimestamps anchor to **Bitcoin** |
55
+ | Public forever | append-only hash-chained ledger + Pantheon |
56
+
57
+ ## Identity & keys
58
+
59
+ - Seed file: `~/.deusproof/<handle>.seed` (override with `key_path=`).
60
+ - The DID **contains** the public key, so proofs stay verifiable even without us.
61
+ - Optional metering identity: `api_key=` or `DEUSPROOF_API_KEY`
62
+ (create one free at `POST /api/billing/plans` → `/api/billing/keys`).
63
+
64
+ MIT · free public beta · [deusproof.com](https://deusproof.com)
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ deusproof/__init__.py
4
+ deusproof/notary.py
5
+ deusproof.egg-info/PKG-INFO
6
+ deusproof.egg-info/SOURCES.txt
7
+ deusproof.egg-info/dependency_links.txt
8
+ deusproof.egg-info/requires.txt
9
+ deusproof.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+ httpx>=0.24
2
+ cryptography>=41
3
+ base58>=2.1
@@ -0,0 +1 @@
1
+ deusproof
@@ -0,0 +1,22 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "deusproof"
7
+ version = "0.1.0"
8
+ description = "Born notarized — sovereign did:key identity and one-call, self-signed certification for AI agents on DEUSPROOF."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "DEUSPROOF" }]
13
+ dependencies = [
14
+ "httpx>=0.24",
15
+ "cryptography>=41",
16
+ "base58>=2.1",
17
+ ]
18
+ keywords = ["ai-agents", "provenance", "notary", "did", "bitcoin", "c2pa"]
19
+
20
+ [project.urls]
21
+ Homepage = "https://deusproof.com"
22
+ Pantheon = "https://deusproof.com/pantheon"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+