Move note_encryption into the sapling module.

This commit is contained in:
Kris Nuttycombe 2021-03-04 14:45:41 -07:00
parent 1b4aab0b76
commit 5baccdf052
8 changed files with 21 additions and 14 deletions

View File

@ -3,8 +3,10 @@ use std::collections::HashMap;
use zcash_primitives::{
consensus::{self, BlockHeight},
memo::MemoBytes,
note_encryption::{try_sapling_note_decryption, try_sapling_output_recovery},
sapling::{Note, PaymentAddress},
sapling::{
note_encryption::{try_sapling_note_decryption, try_sapling_output_recovery},
Note, PaymentAddress,
},
transaction::Transaction,
zip32::ExtendedFullViewingKey,
};

View File

@ -6,8 +6,10 @@ use subtle::{ConditionallySelectable, ConstantTimeEq, CtOption};
use zcash_primitives::{
consensus::{self, BlockHeight},
merkle_tree::{CommitmentTree, IncrementalWitness},
note_encryption::try_sapling_compact_note_decryption,
sapling::{Node, Note, Nullifier, PaymentAddress, SaplingIvk},
sapling::{
note_encryption::try_sapling_compact_note_decryption, Node, Note, Nullifier,
PaymentAddress, SaplingIvk,
},
transaction::TxId,
zip32::ExtendedFullViewingKey,
};
@ -305,8 +307,10 @@ mod tests {
constants::SPENDING_KEY_GENERATOR,
memo::MemoBytes,
merkle_tree::CommitmentTree,
note_encryption::SaplingNoteEncryption,
sapling::{util::generate_random_rseed, Note, Nullifier, SaplingIvk},
sapling::{
note_encryption::SaplingNoteEncryption, util::generate_random_rseed, Note, Nullifier,
SaplingIvk,
},
transaction::components::Amount,
zip32::{ExtendedFullViewingKey, ExtendedSpendingKey},
};

View File

@ -563,8 +563,10 @@ mod tests {
block::BlockHash,
consensus::{BlockHeight, Network, NetworkUpgrade, Parameters},
memo::MemoBytes,
note_encryption::SaplingNoteEncryption,
sapling::{util::generate_random_rseed, Note, Nullifier, PaymentAddress},
sapling::{
note_encryption::SaplingNoteEncryption, util::generate_random_rseed, Note, Nullifier,
PaymentAddress,
},
transaction::components::Amount,
zip32::ExtendedFullViewingKey,
};

View File

@ -155,8 +155,7 @@ mod tests {
block::BlockHash,
consensus::BlockHeight,
legacy::TransparentAddress,
note_encryption::try_sapling_output_recovery,
sapling::prover::TxProver,
sapling::{note_encryption::try_sapling_output_recovery, prover::TxProver},
transaction::{components::Amount, Transaction},
zip32::{ExtendedFullViewingKey, ExtendedSpendingKey},
};

View File

@ -15,7 +15,6 @@ pub mod constants;
pub mod legacy;
pub mod memo;
pub mod merkle_tree;
pub mod note_encryption;
pub mod sapling;
pub mod serialize;
pub mod transaction;

View File

@ -2,6 +2,7 @@
pub mod group_hash;
pub mod keys;
pub mod note_encryption;
pub mod pedersen_hash;
pub mod prover;
pub mod redjubjub;

View File

@ -15,10 +15,10 @@ use crate::{
legacy::TransparentAddress,
memo::MemoBytes,
merkle_tree::MerklePath,
note_encryption::SaplingNoteEncryption,
sapling::{
keys::OutgoingViewingKey, prover::TxProver, redjubjub::PrivateKey, spend_sig_internal,
util::generate_random_rseed_internal, Diversifier, Node, Note, PaymentAddress,
keys::OutgoingViewingKey, note_encryption::SaplingNoteEncryption, prover::TxProver,
redjubjub::PrivateKey, spend_sig_internal, util::generate_random_rseed_internal,
Diversifier, Node, Note, PaymentAddress,
},
transaction::{
components::{