-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add submit_with_prover to web client
fix: test docs: update changelog
- Loading branch information
1 parent
4da9b05
commit 8947948
Showing
10 changed files
with
70 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use alloc::sync::Arc; | ||
use miden_remote_provers::RemoteTransactionProver; | ||
use miden_tx::{LocalTransactionProver, TransactionProver}; | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen] | ||
pub struct ProverWrapper { | ||
prover: Arc<dyn TransactionProver>, | ||
} | ||
|
||
#[wasm_bindgen] | ||
impl ProverWrapper { | ||
pub fn new_local_prover() -> ProverWrapper { | ||
let local_prover = LocalTransactionProver::new(Default::default()); | ||
ProverWrapper { | ||
prover: Arc::new(local_prover), | ||
} | ||
} | ||
|
||
pub fn new_remote_prover(endpoint: &str) -> ProverWrapper { | ||
let remote_prover = RemoteTransactionProver::new(endpoint); | ||
ProverWrapper { | ||
prover: Arc::new(remote_prover), | ||
} | ||
} | ||
} | ||
|
||
impl ProverWrapper { | ||
pub fn get_prover(&self) -> Arc<dyn TransactionProver> { | ||
self.prover.clone() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters