Trait sapling_crypto::prover::OutputProver
source · 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§
Required Methods§
sourcefn prepare_circuit(
esk: Fr,
payment_address: PaymentAddress,
rcm: Fr,
value: NoteValue,
rcv: ValueCommitTrapdoor
) -> Output
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.
sourcefn create_proof<R: RngCore>(&self, circuit: Output, rng: &mut R) -> Self::Proof
fn create_proof<R: RngCore>(&self, circuit: Output, rng: &mut R) -> Self::Proof
Create the proof for a Sapling OutputDescription
.
sourcefn encode_proof(proof: Self::Proof) -> GrothProofBytes
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
impl OutputProver for OutputParameters
source§impl OutputProver for MockOutputProver
Available on crate feature test-dependencies
only.
impl OutputProver for MockOutputProver
Available on crate feature
test-dependencies
only.