trustbeat 0.1.0__py3-none-any.whl
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.
- trustbeat/__init__.py +73 -0
- trustbeat/_client.py +713 -0
- trustbeat/_exceptions.py +41 -0
- trustbeat/_models.py +434 -0
- trustbeat/_verify.py +62 -0
- trustbeat-0.1.0.dist-info/METADATA +74 -0
- trustbeat-0.1.0.dist-info/RECORD +9 -0
- trustbeat-0.1.0.dist-info/WHEEL +4 -0
- trustbeat-0.1.0.dist-info/licenses/LICENSE +21 -0
trustbeat/__init__.py
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""
|
|
2
|
+
TrustBeat Python SDK
|
|
3
|
+
====================
|
|
4
|
+
|
|
5
|
+
Merkle anchoring for any content, backed by eIDAS-qualified timestamping.
|
|
6
|
+
|
|
7
|
+
Quick start::
|
|
8
|
+
|
|
9
|
+
from trustbeat import TrustBeat
|
|
10
|
+
|
|
11
|
+
tb = TrustBeat(api_key="tb_live_...")
|
|
12
|
+
|
|
13
|
+
# Submit a hash for batch anchoring (~10 min)
|
|
14
|
+
job = tb.anchor("e3b0c44298fc1c149afb4c8996fb92427ae41e4649b934ca495991b7852b855")
|
|
15
|
+
print(job.id) # tracking ID
|
|
16
|
+
|
|
17
|
+
# Wait for proof (blocks up to 11 minutes)
|
|
18
|
+
proof = tb.anchor_wait(job.id)
|
|
19
|
+
print(proof.merkle_root) # hex
|
|
20
|
+
print(proof.anchored_at) # ISO 8601
|
|
21
|
+
|
|
22
|
+
# Verify locally — no network call
|
|
23
|
+
assert tb.verify(proof)
|
|
24
|
+
|
|
25
|
+
# Save the RFC 3161 token
|
|
26
|
+
with open("proof.tsr", "wb") as f:
|
|
27
|
+
f.write(proof.token)
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
from ._client import TrustBeat
|
|
31
|
+
from ._models import (
|
|
32
|
+
AnchorJob, AnchorProof, ProofStep,
|
|
33
|
+
AiTimeEnvelope, AiDecisionMetadata, AiDecisionJob, AiDecisionProof,
|
|
34
|
+
SignatureDetail, VerificationReport, VerificationJob, CertificateValidationResult,
|
|
35
|
+
AuditProofStep, AuditEvent, AuditEventProof, AuditExportJob,
|
|
36
|
+
)
|
|
37
|
+
from ._exceptions import (
|
|
38
|
+
TrustBeatError,
|
|
39
|
+
AuthError,
|
|
40
|
+
NotFoundError,
|
|
41
|
+
QuotaError,
|
|
42
|
+
RateLimitError,
|
|
43
|
+
VerificationError,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
__all__ = [
|
|
47
|
+
"TrustBeat",
|
|
48
|
+
# Models
|
|
49
|
+
"AnchorJob",
|
|
50
|
+
"AnchorProof",
|
|
51
|
+
"ProofStep",
|
|
52
|
+
"AiTimeEnvelope",
|
|
53
|
+
"AiDecisionMetadata",
|
|
54
|
+
"AiDecisionJob",
|
|
55
|
+
"AiDecisionProof",
|
|
56
|
+
"SignatureDetail",
|
|
57
|
+
"VerificationReport",
|
|
58
|
+
"VerificationJob",
|
|
59
|
+
"CertificateValidationResult",
|
|
60
|
+
"AuditProofStep",
|
|
61
|
+
"AuditEvent",
|
|
62
|
+
"AuditEventProof",
|
|
63
|
+
"AuditExportJob",
|
|
64
|
+
# Exceptions
|
|
65
|
+
"TrustBeatError",
|
|
66
|
+
"AuthError",
|
|
67
|
+
"NotFoundError",
|
|
68
|
+
"QuotaError",
|
|
69
|
+
"RateLimitError",
|
|
70
|
+
"VerificationError",
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
__version__ = "0.1.0"
|