pub trait StorageVerifier {
// Required methods
fn verify(
&self,
asset_id: Uuid,
blob_hashes: &[Hash32],
) -> Result<StorageVerdict, VerifierError>;
fn receipt_verified(
&self,
asset_id: Uuid,
blob_hashes: &[Hash32],
) -> Result<bool, VerifierError>;
}Expand description
The client’s source of the server-side facts the gate needs: the key-free /storage/verify
verdict and whether a verified custody receipt is held for the write. The capsule-sdk
fills this over HTTP (POST /storage/verify + GET …/receipt verified under the pinned
attestation key); tests fill it with deterministic mocks. Sync by construction — the offline
data plane calls it; async callers resolve the futures before invoking the gate.
Required Methods§
Sourcefn verify(
&self,
asset_id: Uuid,
blob_hashes: &[Hash32],
) -> Result<StorageVerdict, VerifierError>
fn verify( &self, asset_id: Uuid, blob_hashes: &[Hash32], ) -> Result<StorageVerdict, VerifierError>
Fetch a fresh /storage/verify verdict for the asset’s declared blob hashes.
Sourcefn receipt_verified(
&self,
asset_id: Uuid,
blob_hashes: &[Hash32],
) -> Result<bool, VerifierError>
fn receipt_verified( &self, asset_id: Uuid, blob_hashes: &[Hash32], ) -> Result<bool, VerifierError>
Whether a custody receipt covering the write is held and verifies under the pinned
attestation key with fields matching what the client sent. false (not an error) means
missing-or-unverified, which the gate treats as refuse-to-release.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".