mirror of
https://github.com/tlsnotary/tlsn-js.git
synced 2026-01-09 20:47:55 -05:00
feat: enable deferred decryption
This commit is contained in:
@@ -251,6 +251,8 @@ pub async fn prover(
|
||||
.await
|
||||
.map_err(|e| JsValue::from_str(&format!("Could not connect prover: {:?}", e)))?;
|
||||
|
||||
let prover_ctrl = prover_fut.control();
|
||||
|
||||
log_phase(ProverPhases::SpawnProverThread);
|
||||
let (prover_sender, prover_receiver) = oneshot::channel();
|
||||
let handled_prover_fut = async {
|
||||
@@ -259,6 +261,11 @@ pub async fn prover(
|
||||
};
|
||||
spawn_local(handled_prover_fut);
|
||||
|
||||
prover_ctrl
|
||||
.defer_decryption()
|
||||
.await
|
||||
.map_err(|e| JsValue::from_str(&format!("failed to enable deferred decryption: {}", e)))?;
|
||||
|
||||
// Attach the hyper HTTP client to the TLS connection
|
||||
log_phase(ProverPhases::AttachHttpClient);
|
||||
let (mut request_sender, connection) =
|
||||
|
||||
Reference in New Issue
Block a user