[][src]Trait snarkvm_models::dpc::program::Program

pub trait Program: Clone {
    type LocalData;
    type PublicInput;
    type PrivateWitness;
    type ProvingParameters;
    type VerificationParameters;
    pub fn execute<R: Rng>(
        &self,
        proving_key: &Self::ProvingParameters,
        verification_key: &Self::VerificationParameters,
        local_data: &Self::LocalData,
        position: u8,
        rng: &mut R
    ) -> Result<Self::PrivateWitness, DPCError>;
pub fn evaluate(
        &self,
        primary: &Self::PublicInput,
        witness: &Self::PrivateWitness
    ) -> bool;
pub fn into_compact_repr(&self) -> Vec<u8>; }

Associated Types

Loading content...

Required methods

pub fn execute<R: Rng>(
    &self,
    proving_key: &Self::ProvingParameters,
    verification_key: &Self::VerificationParameters,
    local_data: &Self::LocalData,
    position: u8,
    rng: &mut R
) -> Result<Self::PrivateWitness, DPCError>
[src]

Executes and returns the program proof

pub fn evaluate(
    &self,
    primary: &Self::PublicInput,
    witness: &Self::PrivateWitness
) -> bool
[src]

Returns the evaluation of the program on given input and witness.

pub fn into_compact_repr(&self) -> Vec<u8>[src]

Returns the program identity

Loading content...

Implementors

Loading content...