pub trait OutputProver {
    type Proof;

    // Required methods
    fn prepare_circuit(
        esk: Fr,
        payment_address: PaymentAddress,
        rcm: Fr,
        value: NoteValue,
        rcv: ValueCommitTrapdoor
    ) -> Output;
    fn create_proof<R: RngCore>(
        &self,
        circuit: Output,
        rng: &mut R
    ) -> Self::Proof;
    fn encode_proof(proof: Self::Proof) -> GrothProofBytes;
}
Expand description

Interface for creating Sapling Output proofs.

Required Associated Types§

source

type Proof

The proof type created by this prover.

Required Methods§

source

fn prepare_circuit( esk: Fr, payment_address: PaymentAddress, rcm: Fr, value: NoteValue, rcv: ValueCommitTrapdoor ) -> Output

Prepares an instance of the Sapling Output circuit for the given inputs.

Returns None if diversifier is not a valid Sapling diversifier.

source

fn create_proof<R: RngCore>(&self, circuit: Output, rng: &mut R) -> Self::Proof

Create the proof for a Sapling OutputDescription.

source

fn encode_proof(proof: Self::Proof) -> GrothProofBytes

Encodes the given Sapling OutputDescription proof, erasing its type.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl OutputProver for OutputParameters

source§

impl OutputProver for MockOutputProver

Available on crate feature test-dependencies only.
§

type Proof = [u8; 192]