-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Braun
committed
Nov 16, 2023
1 parent
c361cab
commit 6db3007
Showing
8 changed files
with
463 additions
and
58 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
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,37 @@ | ||
use crate::client_ext::job_types::{JobCircuitProperties, JobProperties}; | ||
use async_trait::async_trait; | ||
use gadget_core::gadget::substrate::Client; | ||
use sp_runtime::traits::Block; | ||
|
||
#[async_trait] | ||
pub trait ClientWithApi<B: Block>: Client<B> + Clone { | ||
async fn get_job_circuit_properties( | ||
&self, | ||
job_id: u64, | ||
) -> Result<JobCircuitProperties, webb_gadget::Error>; | ||
async fn get_job_properties(&self, job_id: u64) -> Result<JobProperties, webb_gadget::Error>; | ||
} | ||
|
||
pub mod job_types { | ||
pub struct ZkJob { | ||
pub circuit: JobCircuitProperties, | ||
pub properties: JobProperties, | ||
} | ||
|
||
pub struct JobCircuitProperties { | ||
pub job_id: u64, | ||
pub pk: Vec<u8>, | ||
pub wasm_uri: String, | ||
pub r1cs_uri: String, | ||
} | ||
|
||
pub struct JobProperties { | ||
pub job_id: u64, | ||
pub circuit_id: u64, | ||
pub public_inputs: Vec<u8>, | ||
pub pss: u64, | ||
pub a_shares: Vec<u8>, | ||
pub ax_shares: Vec<u8>, | ||
pub qap_shares: Vec<u8>, | ||
} | ||
} |
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
Oops, something went wrong.