Skip to content

Commit

Permalink
feat: Update response doc
Browse files Browse the repository at this point in the history
  • Loading branch information
petarvujovic98 committed May 10, 2024
1 parent 2c3521d commit b59e1bd
Showing 1 changed file with 8 additions and 28 deletions.
36 changes: 8 additions & 28 deletions host/src/server/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,35 +62,15 @@ mod proof;
pub struct Docs;

#[derive(Debug, Serialize, ToSchema)]
#[serde(untagged)]
/// The response body of a proof request.
pub enum ProofResponse {
/// The response body of a proof request for the native prover.
Native {
#[schema(value_type = GuestOutputDoc)]
/// The output of the prover.
output: GuestOutput,
},
/// The response body of a proof request for the sgx prover.
Sgx {
/// The proof.
proof: String,
/// The quote.
quote: String,
},
/// The response body of a proof request for the sp1 prover.
Sp1 {
/// The proof.
proof: String,
#[schema(value_type = GuestOutputDoc)]
/// The output of the prover.
output: GuestOutput,
},
/// The response body of a proof request for the risc0 prover.
Risc0 {
/// The proof.
proof: String,
},
pub struct ProofResponse {
#[schema(value_type = Option<GuestOutputDoc>)]
/// The output of the prover.
output: Option<GuestOutput>,
/// The proof.
proof: Option<String>,
/// The quote.
quote: Option<String>,
}

#[derive(Debug, Serialize, ToSchema)]
Expand Down

0 comments on commit b59e1bd

Please sign in to comment.