Skip to content

Commit

Permalink
[token-2022] Add transfer with fee logic with split proof context acc…
Browse files Browse the repository at this point in the history
…ounts (#5258)

* add constructor for transfer with fee and split contexts

* update processor for transfer with fee and split context minus proof verification and generation

* add main logic for proof verification

* add main logic for proof generation in client

* update token client for transfer with fee using split contexts

* update tests for transfer with fee using split contexts

* clippy

* Apply suggestions from code review

Co-authored-by: Jon Cinque <[email protected]>

* remove unnecessary print

* remove unnecessary generic parameter

* rename transfer info constructor functions and add clarifying comments

* rename `verify_and_generate` to `verify_and_extract`

---------

Co-authored-by: Jon Cinque <[email protected]>
  • Loading branch information
samkim-crypto and joncinque authored Sep 18, 2023
1 parent 533a2e9 commit 5fafd5f
Show file tree
Hide file tree
Showing 11 changed files with 2,219 additions and 181 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions token/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ version = "0.6.0"

[dependencies]
async-trait = "0.1"
curve25519-dalek = "3.2.1"
futures = "0.3.28"
futures-util = "0.3"
solana-banks-interface = "1.16.3"
Expand Down
6 changes: 6 additions & 0 deletions token/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ pub mod client;
pub mod output;
pub mod token;

/// Helper functions to generate split zero-knowledge proofs for confidential transfers.
///
/// The logic in this submodule should belong to the `solana-zk-token-sdk` and will be removed with
/// an upgrade to the Solana program in the future.
pub mod proof_generation;

pub use spl_token_2022;
Loading

0 comments on commit 5fafd5f

Please sign in to comment.