@@ -213,7 +213,7 @@ impl SindriClient {
213
213
///
214
214
/// # Examples
215
215
///
216
- /// ```
216
+ /// ```ignore
217
217
/// use sindri_rs::client::SindriClient;
218
218
///
219
219
/// let client = SindriClient::new(None, None);
@@ -298,6 +298,20 @@ impl SindriClient {
298
298
Ok ( circuit_info)
299
299
}
300
300
301
+ /// Blocking version of `create_circuit`.
302
+ ///
303
+ /// This method provides the same functionality as `create_circuit` but can be used
304
+ /// in synchronous contexts. It internally creates a runtime to execute the async operation.
305
+ pub fn create_circuit_blocking (
306
+ & self ,
307
+ project : String ,
308
+ tags : Option < Vec < String > > ,
309
+ meta : Option < HashMap < String , String > > ,
310
+ ) -> Result < CircuitInfoResponse , Box < dyn std:: error:: Error > > {
311
+ let runtime = tokio:: runtime:: Runtime :: new ( ) ?;
312
+ runtime. block_on ( self . create_circuit ( project, tags, meta) )
313
+ }
314
+
301
315
/// Deletes a circuit by ID.
302
316
///
303
317
/// # Arguments
@@ -333,7 +347,7 @@ impl SindriClient {
333
347
///
334
348
/// # Examples
335
349
///
336
- /// ```
350
+ /// ```ignore
337
351
/// use sindri_rs::client::SindriClient;
338
352
///
339
353
/// let client = SindriClient::new(None, None);
@@ -395,7 +409,7 @@ impl SindriClient {
395
409
///
396
410
/// # Examples
397
411
///
398
- /// ```
412
+ /// ```ignore
399
413
/// use sindri_rs::client::SindriClient;
400
414
///
401
415
/// let client = SindriClient::new(None, None);
@@ -437,7 +451,7 @@ impl SindriClient {
437
451
///
438
452
/// # Examples
439
453
///
440
- /// ```
454
+ /// ```ignore
441
455
/// use sindri_rs::client::SindriClient;
442
456
///
443
457
/// let client = SindriClient::new(None, None);
@@ -496,6 +510,28 @@ impl SindriClient {
496
510
Ok ( proof_info)
497
511
}
498
512
513
+ /// Blocking version of `prove_circuit`.
514
+ ///
515
+ /// This method provides the same functionality as `prove_circuit` but can be used
516
+ /// in synchronous contexts. It internally creates a runtime to execute the async operation.
517
+ pub fn prove_circuit_blocking (
518
+ & self ,
519
+ circuit_id : & str ,
520
+ proof_input : impl Into < ProofInput > ,
521
+ meta : Option < HashMap < String , String > > ,
522
+ verify : Option < bool > ,
523
+ prover_implementation : Option < String > ,
524
+ ) -> Result < ProofInfoResponse , Box < dyn std:: error:: Error > > {
525
+ let runtime = tokio:: runtime:: Runtime :: new ( ) ?;
526
+ runtime. block_on ( self . prove_circuit (
527
+ circuit_id,
528
+ proof_input,
529
+ meta,
530
+ verify,
531
+ prover_implementation,
532
+ ) )
533
+ }
534
+
499
535
/// Deletes a proof by ID.
500
536
///
501
537
/// # Arguments
@@ -533,7 +569,7 @@ impl SindriClient {
533
569
///
534
570
/// # Examples
535
571
///
536
- /// ```
572
+ /// ```ignore
537
573
/// use sindri_rs::client::SindriClient;
538
574
///
539
575
/// let client = SindriClient::new(None, None);
0 commit comments