Module sapling

Source
Expand description

Sapling-related functionality.

These data structures enforce the structural validity of Sapling-related consensus-critical objects.

Consensus rule:

These data structures ensure that ZIP-216, canonical Jubjub point encodings, are enforced everywhere where Jubjub points occur, and non-canonical point encodings are rejected. This is enforced by the jubjub crate, which is also used by the redjubjub crate.

Re-exportsยง

pub use keys::Diversifier;
pub use output::Output;
pub use output::OutputInTransactionV4;
pub use output::OutputPrefixInTransactionV5;
pub use shielded_data::AnchorVariant;
pub use shielded_data::FieldNotPresent;
pub use shielded_data::PerSpendAnchor;
pub use shielded_data::SharedAnchor;
pub use shielded_data::ShieldedData;
pub use shielded_data::TransferData;
pub use spend::Spend;
pub use spend::SpendPrefixInTransactionV5;

Modulesยง

arbitrary ๐Ÿ”’
Randomised data generation for sapling types.
commitment ๐Ÿ”’
Note and value commitments.
keys
Sapling key types.
note ๐Ÿ”’
Sapling notes
output
Sapling Output descriptions, as described in protocol specification ยง7.4.
shielded_data
Sapling shielded data for V4 and V5 Transactions.
spend
Sapling spends for V4 and V5 Transactions.
tree
Note Commitment Trees.

Structsยง

CommitmentRandomness
The randomness used in the Pedersen Hash for note commitment.
EncryptedNote
A ciphertext component for encrypted output notes.
NotSmallOrderValueCommitment
A Homomorphic Pedersen commitment to the value of a note, used in Spend and Output descriptions.
Note
A Note represents that a value is spendable by the recipient who holds the spending key corresponding to a given shielded payment address.
NoteCommitment
Note commitments for the output notes.
Nullifier
A Nullifier for Sapling transactions
ValueCommitment
A Homomorphic Pedersen commitment to the value of a note.
WrappedNoteKey
A ciphertext component for encrypted output notes.