Expand description
§Sapling Protocol Components
The Sapling protocol is the second-generation shielded protocol in Zcash, introduced in the Sapling network upgrade (October 2018). It significantly improved upon the original Sprout protocol with better performance, security features, and usability.
This module contains types that represent various components of the Sapling protocol within the ZeWIF wallet interchange format, including:
§Key Components
- [
SaplingExpandedSpendingKey
]: Core cryptographic components of a Sapling spending key (ask, nsk, ovk) SaplingExtendedSpendingKey
: Hierarchical deterministic key structure for Sapling according to ZIP-32SaplingIncomingViewingKey
: Key for detecting and viewing incoming transactions only- [
SaplingSpendingKey
]: Spending authority for Sapling addresses
§Transaction Components
SaplingWitness
: Cryptographic witness proving a note commitment exists in the treeSaplingSentOutput
: Sender’s record of note data for outgoing transactions
§Protocol Characteristics
Sapling introduced significant improvements over the earlier Sprout protocol:
- Performance: Much faster proving times (~7 seconds vs ~40 seconds in Sprout)
- Key Separation: Full viewing keys that don’t reveal spending capability
- HD Wallet Support: ZIP-32 hierarchical deterministic key derivation
- Decoupled Spend/Output: Separated spend and output descriptions (unlike Sprout’s JoinSplits)
These types collectively enable the migration of Sapling shielded data between different Zcash wallet implementations while preserving all cryptographic capabilities.
Structs§
- Address
- A Zcash Sapling address and associated key data.
- Merkle
Hash Sapling - A node in the Sapling note commitment tree.
- Sapling
Extended Full Viewing Key - A Sapling Extended Full Viewing Key, encoded as specified in ZIP 32
- Sapling
Extended Spending Key - A Sapling Extended Spending Key, encoded as specified in ZIP 32
- Sapling
Incoming Viewing Key - A Sapling Incoming Viewing Key (IVK), which allows detection and decryption of incoming transactions to a Sapling shielded address.
- Sapling
Sent Output - Represents a sent output in a Sapling shielded transaction within a Zcash wallet.
- Sapling
Witness - A cryptographic witness proving that a Sapling note commitment exists in the note commitment tree.