Trait plonk_pallet::Plonk [−][src]
pub trait Plonk<AccountId> {
type CustomCircuit: Circuit;
fn trusted_setup(
who: &AccountId,
val: u32,
rng: FullcodecRng
) -> DispatchResultWithPostInfo;
fn verify(
who: &AccountId,
vd: VerifierData,
proof: Proof,
public_inputs: Vec<PublicInputValue>,
transcript_init: Transcript
) -> DispatchResultWithPostInfo;
}
Expand description
Abstraction over a plonk zk-SNARKs system
Associated Types
type CustomCircuit: Circuit
type CustomCircuit: Circuit
The plonk circuit customized by developer
Required methods
fn trusted_setup(
who: &AccountId,
val: u32,
rng: FullcodecRng
) -> DispatchResultWithPostInfo
fn trusted_setup(
who: &AccountId,
val: u32,
rng: FullcodecRng
) -> DispatchResultWithPostInfo
The public parameters generation function This is the dispatchable function and assumed to be called by other pallet as API
fn verify(
who: &AccountId,
vd: VerifierData,
proof: Proof,
public_inputs: Vec<PublicInputValue>,
transcript_init: Transcript
) -> DispatchResultWithPostInfo
fn verify(
who: &AccountId,
vd: VerifierData,
proof: Proof,
public_inputs: Vec<PublicInputValue>,
transcript_init: Transcript
) -> DispatchResultWithPostInfo
The proof verify function This is the dispatchable function and assumed to be called by other pallet as API