Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed May 30, 2024
1 parent 712f765 commit b954a47
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pub struct ProverClient {
pub prover: Box<dyn Prover>,
}

/// The type of prover used by the [ProverClient].
#[derive(Debug, PartialEq, EnumString)]
pub enum ProverType {
Local,
Expand Down Expand Up @@ -161,6 +162,17 @@ impl ProverClient {
}
}

/// Returns the type of prover used by the [ProverClient].
///
/// ### Examples
///
/// ```no_run
/// use sp1_sdk::ProverClient;
///
/// let client = ProverClient::local();
/// let prover_type = client.prover_type();
/// assert_eq!(prover_type, ProverType::Local);
/// ```
pub fn prover_type(&self) -> ProverType {
let prover_type_id = (*self.prover).type_id();
if prover_type_id == TypeId::of::<LocalProver>() {
Expand Down

0 comments on commit b954a47

Please sign in to comment.