Trait zcash_primitives::sapling::prover::TxProver[][src]

pub trait TxProver {
    type SaplingProvingContext;
    fn new_sapling_proving_context(&self) -> Self::SaplingProvingContext;
fn spend_proof(
        &self,
        ctx: &mut Self::SaplingProvingContext,
        proof_generation_key: ProofGenerationKey,
        diversifier: Diversifier,
        rseed: Rseed,
        ar: Fr,
        value: u64,
        anchor: Scalar,
        merkle_path: MerklePath<Node>
    ) -> Result<([u8; 192], ExtendedPoint, PublicKey), ()>;
fn output_proof(
        &self,
        ctx: &mut Self::SaplingProvingContext,
        esk: Fr,
        payment_address: PaymentAddress,
        rcm: Fr,
        value: u64
    ) -> ([u8; 192], ExtendedPoint);
fn binding_sig(
        &self,
        ctx: &mut Self::SaplingProvingContext,
        value_balance: Amount,
        sighash: &[u8; 32]
    ) -> Result<Signature, ()>; }
Expand description

Interface for creating zero-knowledge proofs for shielded transactions.

Associated Types

Type for persisting any necessary context across multiple Sapling proofs.

Required methods

Instantiate a new Sapling proving context.

Create the value commitment, re-randomized key, and proof for a Sapling SpendDescription, while accumulating its value commitment randomness inside the context for later use.

Create the value commitment and proof for a Sapling OutputDescription, while accumulating its value commitment randomness inside the context for later use.

Create the bindingSig for a Sapling transaction. All calls to TxProver::spend_proof and TxProver::output_proof must be completed before calling this function.

Implementors