Skip to main content

Crate sapling_crypto

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

  • pinned-vk-only: embeds the canonical Sapling verifying keys without proving parameters, and enables circuit. It adds no Wagyu dependency; separately enabled proving dependencies are unaffected.

§ZIP 32 addresses

The default-enabled zip32-addresses feature provides indexed address generation and diversifier-index recovery using FF1. Consumers that disable default features must enable it explicitly to use these wallet APIs. Direct address construction from diversifiers, key derivation, and note decryption remain available without it.

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;
pub use note::nullifier::Nullifier;

Modules§

builder
Types and functions for building Sapling transaction components.
bundle
circuitcircuit
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.
provercircuit
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.
BatchValidatorcircuit
Batch validation context for Sapling.
Node
A node within the Sapling commitment tree.
Nullifier
Typesafe wrapper for nullifier values.
PaymentAddress
A Sapling payment address.
PreparedBatchVerifyingKeyscircuit
Borrowed Sapling verifying keys for repeated BatchValidators.
SaplingVerificationContextcircuit
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