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