pub trait OutputProver {
type Proof;
// Required methods
fn prepare_circuit(
esk: &EphemeralSecretKey,
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;
}Available on crate feature
circuit only.Expand description
Interface for creating Sapling Output proofs.
Required Associated Types§
Required Methods§
Sourcefn prepare_circuit(
esk: &EphemeralSecretKey,
payment_address: PaymentAddress,
rcm: Fr,
value: NoteValue,
rcv: ValueCommitTrapdoor,
) -> Output
fn prepare_circuit( esk: &EphemeralSecretKey, 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so 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.