@@ -6,6 +6,7 @@ use colored::*;
6
6
use std;
7
7
use wedpr_l_crypto_zkp_utils:: point_to_bytes;
8
8
use wedpr_s_verifiable_confidential_ledger:: vcl;
9
+ use protobuf:: Message ;
9
10
10
11
fn main ( ) {
11
12
print_highlight2 (
@@ -110,13 +111,13 @@ fn flow_cn() {
110
111
111
112
print_wide ( " ▶ 是否存在加和关系?尝试证明c1_value + c2_value =? c3_value" ) ;
112
113
let sum_proof = vcl:: prove_sum_balance ( & c1_secret, & c2_secret, & c3_secret) ;
113
- println ! ( "加和关系的证明数据:\n {:?}" , sum_proof) ;
114
+ println ! ( "加和关系的证明数据:\n {:?}" , sum_proof. write_to_bytes ( ) ) ;
114
115
pause_cn ( ) ;
115
116
116
117
print_wide ( " ▶ 是否存在乘积关系?尝试证明c1_value * c2_value =? c3_value" ) ;
117
118
let product_proof =
118
119
vcl:: prove_product_balance ( & c1_secret, & c2_secret, & c3_secret) ;
119
- println ! ( "乘积关系的证明数据:\n {:?}" , product_proof) ;
120
+ println ! ( "乘积关系的证明数据:\n {:?}" , product_proof. write_to_bytes ( ) ) ;
120
121
pause_cn ( ) ;
121
122
122
123
print_wide ( " ▶ 是否是非负数?尝试证明c1_value >=? 0" ) ;
@@ -301,7 +302,7 @@ fn flow_en() {
301
302
c3_value",
302
303
) ;
303
304
let sum_proof = vcl:: prove_sum_balance ( & c1_secret, & c2_secret, & c3_secret) ;
304
- println ! ( "Proof data for the sum relationship:\n {:?}" , sum_proof) ;
305
+ println ! ( "Proof data for the sum relationship:\n {:?}" , sum_proof. write_to_bytes ( ) ) ;
305
306
pause_en ( ) ;
306
307
307
308
print_wide (
@@ -312,7 +313,7 @@ fn flow_en() {
312
313
vcl:: prove_product_balance ( & c1_secret, & c2_secret, & c3_secret) ;
313
314
println ! (
314
315
"Proof data for the product relationship:\n {:?}" ,
315
- product_proof
316
+ product_proof. write_to_bytes ( )
316
317
) ;
317
318
pause_en ( ) ;
318
319
0 commit comments