1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! # veil-sdk
//!
//! Rust client for the Mugen Veil verifiable inference gateway.
//!
//! ## Quick start
//!
//! ```rust,no_run
//! use veil_sdk::VeilClient;
//!
//! #[tokio::main]
//! async fn main() -> veil_sdk::error::Result<()> {
//! let client = VeilClient::builder()
//! .base_url("http://localhost:8080")
//! .build()?;
//!
//! // High-level: submit + wait
//! let result = client
//! .verify_inference("tiny_mlp_v1", vec![vec![0.1, 0.2, 0.3, 0.4]])
//! .await?;
//!
//! println!("status: {}", result.status);
//! println!("tx_hash: {:?}", result.tx_hash);
//! println!("attestation: {:?}", result.attestation_hash);
//! println!("elapsed: {}ms", result.elapsed_ms);
//! Ok(())
//! }
//! ```
//!
//! ## Primitives
//!
//! For finer control, use the primitive methods directly:
//!
//! ```rust,no_run
//! use veil_sdk::VeilClient;
//!
//! #[tokio::main]
//! async fn main() -> veil_sdk::error::Result<()> {
//! let client = VeilClient::builder()
//! .base_url("http://localhost:8080")
//! .build()?;
//!
//! // Health check
//! let health = client.health_check().await?;
//! assert!(health.is_healthy());
//!
//! // Submit and poll manually
//! let job_id = client
//! .submit_job("tiny_mlp_v1", vec![vec![0.5, 0.3, 0.8, 0.1]])
//! .await?;
//!
//! loop {
//! let job = client.get_job(&job_id).await?;
//! if job.status.is_terminal() { break; }
//! tokio::time::sleep(std::time::Duration::from_secs(2)).await;
//! }
//!
//! // Fetch raw proof bytes
//! let proof = client.get_proof(&job_id).await?;
//! println!("proof size: {} bytes", proof.size_bytes);
//! Ok(())
//! }
//! ```
pub use ;
pub use ;
pub use ;