7
7
transfer:: TransferProofContext , transfer_with_fee:: TransferWithFeeProofContext ,
8
8
} ,
9
9
spl_token_confidential_transfer_proof_generation:: {
10
- transfer:: transfer_split_proof_data, transfer_with_fee:: transfer_with_fee_split_proof_data,
10
+ transfer:: { transfer_split_proof_data, TransferProofData } ,
11
+ transfer_with_fee:: { transfer_with_fee_split_proof_data, TransferWithFeeProofData } ,
11
12
} ,
12
13
} ;
13
14
@@ -35,7 +36,11 @@ fn test_transfer_proof_validity(spendable_balance: u64, transfer_amount: u64) {
35
36
let spendable_ciphertext = source_keypair. pubkey ( ) . encrypt ( spendable_balance) ;
36
37
let decryptable_balance = aes_key. encrypt ( spendable_balance) ;
37
38
38
- let ( equality_proof_data, validity_proof_data, range_proof_data) = transfer_split_proof_data (
39
+ let TransferProofData {
40
+ equality_proof_data,
41
+ ciphertext_validity_proof_data,
42
+ range_proof_data,
43
+ } = transfer_split_proof_data (
39
44
& spendable_ciphertext,
40
45
& decryptable_balance,
41
46
transfer_amount,
@@ -47,12 +52,12 @@ fn test_transfer_proof_validity(spendable_balance: u64, transfer_amount: u64) {
47
52
. unwrap ( ) ;
48
53
49
54
equality_proof_data. verify_proof ( ) . unwrap ( ) ;
50
- validity_proof_data . verify_proof ( ) . unwrap ( ) ;
55
+ ciphertext_validity_proof_data . verify_proof ( ) . unwrap ( ) ;
51
56
range_proof_data. verify_proof ( ) . unwrap ( ) ;
52
57
53
58
TransferProofContext :: verify_and_extract (
54
59
equality_proof_data. context_data ( ) ,
55
- validity_proof_data . context_data ( ) ,
60
+ ciphertext_validity_proof_data . context_data ( ) ,
56
61
range_proof_data. context_data ( ) ,
57
62
)
58
63
. unwrap ( ) ;
@@ -101,13 +106,13 @@ fn test_transfer_with_fee_proof_validity(
101
106
let spendable_ciphertext = source_keypair. pubkey ( ) . encrypt ( spendable_balance) ;
102
107
let decryptable_balance = aes_key. encrypt ( spendable_balance) ;
103
108
104
- let (
109
+ let TransferWithFeeProofData {
105
110
equality_proof_data,
106
111
transfer_amount_ciphertext_validity_proof_data,
107
112
percentage_with_cap_proof_data,
108
113
fee_ciphertext_validity_proof_data,
109
114
range_proof_data,
110
- ) = transfer_with_fee_split_proof_data (
115
+ } = transfer_with_fee_split_proof_data (
111
116
& spendable_ciphertext,
112
117
& decryptable_balance,
113
118
transfer_amount,
0 commit comments