-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #954 from fluidvanadium/add_latest_proposal_3
Add latest proposal 3
- Loading branch information
Showing
6 changed files
with
78 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//! TODO: Add Mod Description Here! | ||
//! This is a mod for data structs that will be used across all sections of zingolib. | ||
#[cfg(feature = "zip317")] | ||
pub mod proposal; | ||
pub mod witness_trees; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//! The types of transaction Proposal that Zingo! uses. | ||
use std::convert::Infallible; | ||
|
||
use zcash_client_backend::proposal::Proposal; | ||
use zcash_primitives::transaction::fees::zip317::FeeRule; | ||
|
||
use crate::wallet::notes::NoteRecordIdentifier; | ||
|
||
/// A proposed send to addresses. | ||
/// Identifies the notes to spend by txid, pool, and output_index. | ||
pub(crate) type TransferProposal = Proposal<FeeRule, NoteRecordIdentifier>; | ||
/// A proposed shielding. | ||
/// The zcash_client_backend Proposal type exposes a "NoteRef" generic | ||
/// parameter to track Shielded inputs to the proposal these are | ||
/// disallowed in Zingo ShieldedProposals | ||
pub(crate) type ShieldProposal = Proposal<FeeRule, Infallible>; | ||
|
||
/// The LightClient holds one proposal at a time while the user decides whether to accept the fee. | ||
#[derive(Clone)] | ||
pub(crate) enum ZingoProposal { | ||
/// Destination somewhere else. | ||
/// Can propose any valid recipient. | ||
#[allow(dead_code)] // TOdo use it | ||
Transfer(TransferProposal), | ||
/// For now this is constrained by lrz zcash_client_backend transaction construction | ||
/// to send to the proposing capability's receiver for its fanciest shielded pool | ||
#[allow(dead_code)] // TOdo construct it | ||
Shield(ShieldProposal), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters