glacis 0.1.3__tar.gz → 0.1.4__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.
- {glacis-0.1.3 → glacis-0.1.4}/PKG-INFO +1 -1
- {glacis-0.1.3 → glacis-0.1.4}/glacis/models.py +68 -8
- {glacis-0.1.3 → glacis-0.1.4}/pyproject.toml +1 -1
- {glacis-0.1.3 → glacis-0.1.4}/.gitignore +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/LICENSE +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/README.md +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/glacis/__init__.py +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/glacis/__main__.py +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/glacis/client.py +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/glacis/crypto.py +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/glacis/integrations/__init__.py +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/glacis/integrations/anthropic.py +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/glacis/integrations/openai.py +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/glacis/storage.py +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/glacis/streaming.py +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/glacis/wasm/s3p_core_wasi.wasm +0 -0
- {glacis-0.1.3 → glacis-0.1.4}/glacis/wasm_runtime.py +0 -0
|
@@ -69,22 +69,82 @@ class AttestInput(BaseModel):
|
|
|
69
69
|
populate_by_name = True
|
|
70
70
|
|
|
71
71
|
|
|
72
|
+
class InclusionProof(BaseModel):
|
|
73
|
+
"""Merkle inclusion proof from transparency log."""
|
|
74
|
+
|
|
75
|
+
leaf_index: int = Field(alias="leaf_index", description="Leaf index in tree")
|
|
76
|
+
tree_size: int = Field(alias="tree_size", description="Tree size when proof generated")
|
|
77
|
+
hashes: list[str] = Field(description="Sibling hashes")
|
|
78
|
+
root_hash: str = Field(alias="root_hash", description="Root hash")
|
|
79
|
+
|
|
80
|
+
class Config:
|
|
81
|
+
populate_by_name = True
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class STH(BaseModel):
|
|
85
|
+
"""Signed Tree Head."""
|
|
86
|
+
|
|
87
|
+
tree_size: int = Field(alias="tree_size")
|
|
88
|
+
timestamp: str
|
|
89
|
+
root_hash: str = Field(alias="root_hash")
|
|
90
|
+
signature: str
|
|
91
|
+
|
|
92
|
+
class Config:
|
|
93
|
+
populate_by_name = True
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class TransparencyProofs(BaseModel):
|
|
97
|
+
"""Transparency proofs from receipt-service."""
|
|
98
|
+
|
|
99
|
+
inclusion_proof: InclusionProof
|
|
100
|
+
sth_curr: STH
|
|
101
|
+
sth_prev: STH
|
|
102
|
+
consistency_path: list[str] = Field(default_factory=list)
|
|
103
|
+
|
|
104
|
+
class Config:
|
|
105
|
+
populate_by_name = True
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class FullReceipt(BaseModel):
|
|
109
|
+
"""Full receipt from receipt-service."""
|
|
110
|
+
|
|
111
|
+
schema_version: str = Field(default="1.0")
|
|
112
|
+
attestation_hash: str
|
|
113
|
+
heartbeat_epoch: int
|
|
114
|
+
binary_hash: str
|
|
115
|
+
network_state_hash: str
|
|
116
|
+
mono_counter: int
|
|
117
|
+
wall_time_ns: str
|
|
118
|
+
witness_signature: str
|
|
119
|
+
transparency_proofs: TransparencyProofs
|
|
120
|
+
|
|
121
|
+
class Config:
|
|
122
|
+
populate_by_name = True
|
|
123
|
+
|
|
124
|
+
|
|
72
125
|
class AttestReceipt(BaseModel):
|
|
73
126
|
"""Receipt returned from attestation."""
|
|
74
127
|
|
|
75
128
|
attestation_id: str = Field(alias="attestationId", description="Unique attestation ID")
|
|
129
|
+
attestation_hash: str = Field(alias="attestation_hash", description="Content hash")
|
|
76
130
|
timestamp: str = Field(description="ISO 8601 timestamp")
|
|
77
131
|
leaf_index: int = Field(alias="leafIndex", description="Merkle tree leaf index")
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
)
|
|
82
|
-
signed_tree_head: SignedTreeHead = Field(
|
|
83
|
-
alias="signedTreeHead", description="Tree head at attestation time"
|
|
84
|
-
)
|
|
85
|
-
badge_url: str = Field(alias="badgeUrl", description="Verification badge URL")
|
|
132
|
+
tree_size: int = Field(alias="treeSize", description="Tree size")
|
|
133
|
+
epoch_id: Optional[str] = Field(alias="epochId", default=None)
|
|
134
|
+
receipt: Optional[FullReceipt] = Field(default=None, description="Full receipt with proofs")
|
|
86
135
|
verify_url: str = Field(alias="verifyUrl", description="Verification endpoint URL")
|
|
87
136
|
|
|
137
|
+
# Computed properties for convenience
|
|
138
|
+
@property
|
|
139
|
+
def witness_status(self) -> str:
|
|
140
|
+
"""Return witness status based on receipt presence."""
|
|
141
|
+
return "WITNESSED" if self.receipt else "PENDING"
|
|
142
|
+
|
|
143
|
+
@property
|
|
144
|
+
def badge_url(self) -> str:
|
|
145
|
+
"""Return badge/verify URL."""
|
|
146
|
+
return self.verify_url
|
|
147
|
+
|
|
88
148
|
class Config:
|
|
89
149
|
populate_by_name = True
|
|
90
150
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|