Crate sapling_crypto

Source
Expand description

§sapling

§Nomenclature

All types in the sapling-crypto crate, unless otherwise specified, are Sapling-specific types. For example, PaymentAddress is documented as being a shielded payment address; we implicitly mean it is an Sapling payment address (as opposed to e.g. an Orchard payment address, which is also shielded).

§Feature flags

  • circuit (enabled by default) — Enables creation of Sapling proofs
  • multicore (enabled by default) — Enables multithreading support for creating proofs.
  • test-dependencies — Exposes APIs that are useful for testing, such as proptest strategies.

Re-exports§

pub use bundle::Bundle;
pub use keys::Diversifier;
pub use keys::NullifierDerivingKey;
pub use keys::ProofGenerationKey;
pub use keys::SaplingIvk;
pub use keys::ViewingKey;
pub use note::Note;
pub use note::Rseed;

Modules§

builder
Types and functions for building Sapling transaction components.
bundle
circuit
The Sapling circuits.
constants
Various constants used by the Sapling protocol.
group_hash
Implementation of group hashing into Jubjub.
keys
Sapling key components.
note
note_encryption
Implementation of in-band secret distribution for Zcash transactions.
pczt
PCZT support for Sapling.
pedersen_hash
Implementation of the Pedersen hash function used in Sapling.
prover
Abstractions over the proving system and parameters.
testingtest-dependencies
util
value
Monetary values within the Sapling shielded pool.
zip32
Sapling key derivation according to ZIP 32 and ZIP 316

Structs§

Anchor
The root of a Sapling commitment tree.
BatchValidator
Batch validation context for Sapling.
Node
A node within the Sapling commitment tree.
Nullifier
Typesafe wrapper for nullifier values.
PaymentAddress
A Sapling payment address.
SaplingVerificationContext
A context object for verifying the Sapling components of a single Zcash transaction.

Constants§

NOTE_COMMITMENT_TREE_DEPTH

Functions§

merkle_hash
Compute a parent node in the Sapling commitment tree given its two children.

Type Aliases§

CommitmentTree
IncrementalWitness
MerklePath