Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SystemContract {
    /// system chain configuration contract
    /// used to add, delete and change the chain configuration
    ChainConfig = 0,
    /// system chain query contract
    /// used to query the configuration on the chain
    ChainQuery = 1,
    /// system certificate storage contract
    /// used to manage certificates
    CertManage = 2,
    /// governance contract
    Governance = 3,
    /// multi signature contract on chain
    MultiSign = 4,
    /// manage user contract
    ContractManage = 5,
    /// private compute contract
    PrivateCompute = 6,
    /// erc20 contract for DPoS
    DposErc20 = 7,
    /// stake contract for dpos
    DposStake = 8,
    /// subscribe block info,tx info and contract info.
    SubscribeManage = 9,
    /// archive/restore block
    ArchiveManage = 10,
    /// cross chain transaction system contract
    CrossTransaction = 11,
    /// pubkey manage system contract
    PubkeyManage = 12,
    /// account manager system contract
    AccountManager = 13,
    /// relay cross system contract
    RelayCross = 17,
    /// transaction manager system contract
    TransactionManager = 18,
    /// for test or debug contract code
    T = 99,
}
impl SystemContract {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            SystemContract::ChainConfig => "CHAIN_CONFIG",
            SystemContract::ChainQuery => "CHAIN_QUERY",
            SystemContract::CertManage => "CERT_MANAGE",
            SystemContract::Governance => "GOVERNANCE",
            SystemContract::MultiSign => "MULTI_SIGN",
            SystemContract::ContractManage => "CONTRACT_MANAGE",
            SystemContract::PrivateCompute => "PRIVATE_COMPUTE",
            SystemContract::DposErc20 => "DPOS_ERC20",
            SystemContract::DposStake => "DPOS_STAKE",
            SystemContract::SubscribeManage => "SUBSCRIBE_MANAGE",
            SystemContract::ArchiveManage => "ARCHIVE_MANAGE",
            SystemContract::CrossTransaction => "CROSS_TRANSACTION",
            SystemContract::PubkeyManage => "PUBKEY_MANAGE",
            SystemContract::AccountManager => "ACCOUNT_MANAGER",
            SystemContract::RelayCross => "RELAY_CROSS",
            SystemContract::TransactionManager => "TRANSACTION_MANAGER",
            SystemContract::T => "T",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CHAIN_CONFIG" => Some(Self::ChainConfig),
            "CHAIN_QUERY" => Some(Self::ChainQuery),
            "CERT_MANAGE" => Some(Self::CertManage),
            "GOVERNANCE" => Some(Self::Governance),
            "MULTI_SIGN" => Some(Self::MultiSign),
            "CONTRACT_MANAGE" => Some(Self::ContractManage),
            "PRIVATE_COMPUTE" => Some(Self::PrivateCompute),
            "DPOS_ERC20" => Some(Self::DposErc20),
            "DPOS_STAKE" => Some(Self::DposStake),
            "SUBSCRIBE_MANAGE" => Some(Self::SubscribeManage),
            "ARCHIVE_MANAGE" => Some(Self::ArchiveManage),
            "CROSS_TRANSACTION" => Some(Self::CrossTransaction),
            "PUBKEY_MANAGE" => Some(Self::PubkeyManage),
            "ACCOUNT_MANAGER" => Some(Self::AccountManager),
            "RELAY_CROSS" => Some(Self::RelayCross),
            "TRANSACTION_MANAGER" => Some(Self::TransactionManager),
            "T" => Some(Self::T),
            _ => None,
        }
    }
}
/// methods of chain query contract
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ChainQueryFunction {
    /// get block by transactionId
    GetBlockByTxId = 0,
    /// get transaction by transactionId
    GetTxByTxId = 1,
    /// get block by block height
    GetBlockByHeight = 2,
    /// get chain information, include current height and consensus node list
    GetChainInfo = 3,
    /// get the last configuration block
    GetLastConfigBlock = 4,
    /// get block by block hash
    GetBlockByHash = 5,
    /// get the list of chains the node knows
    GetNodeChainList = 6,
    /// get governance information
    GetGovernanceContract = 7,
    /// get read/write set information by eight
    GetBlockWithTxrwsetsByHeight = 8,
    /// get read/write set information by hash
    GetBlockWithTxrwsetsByHash = 9,
    /// get the last block
    GetLastBlock = 10,
    /// get full block by height
    GetFullBlockByHeight = 11,
    /// get block height by tx id
    GetBlockHeightByTxId = 12,
    /// get block height by hash
    GetBlockHeightByHash = 13,
    /// get block header by height
    GetBlockHeaderByHeight = 14,
    /// get archived block height
    GetArchivedBlockHeight = 15,
    /// get all contract info list
    GetAllContracts = 16,
    /// get merkle path by tx id
    GetMerklePathByTxId = 17,
    /// get archive status
    GetArchiveStatus = 18,
}
impl ChainQueryFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            ChainQueryFunction::GetBlockByTxId => "GET_BLOCK_BY_TX_ID",
            ChainQueryFunction::GetTxByTxId => "GET_TX_BY_TX_ID",
            ChainQueryFunction::GetBlockByHeight => "GET_BLOCK_BY_HEIGHT",
            ChainQueryFunction::GetChainInfo => "GET_CHAIN_INFO",
            ChainQueryFunction::GetLastConfigBlock => "GET_LAST_CONFIG_BLOCK",
            ChainQueryFunction::GetBlockByHash => "GET_BLOCK_BY_HASH",
            ChainQueryFunction::GetNodeChainList => "GET_NODE_CHAIN_LIST",
            ChainQueryFunction::GetGovernanceContract => "GET_GOVERNANCE_CONTRACT",
            ChainQueryFunction::GetBlockWithTxrwsetsByHeight => "GET_BLOCK_WITH_TXRWSETS_BY_HEIGHT",
            ChainQueryFunction::GetBlockWithTxrwsetsByHash => "GET_BLOCK_WITH_TXRWSETS_BY_HASH",
            ChainQueryFunction::GetLastBlock => "GET_LAST_BLOCK",
            ChainQueryFunction::GetFullBlockByHeight => "GET_FULL_BLOCK_BY_HEIGHT",
            ChainQueryFunction::GetBlockHeightByTxId => "GET_BLOCK_HEIGHT_BY_TX_ID",
            ChainQueryFunction::GetBlockHeightByHash => "GET_BLOCK_HEIGHT_BY_HASH",
            ChainQueryFunction::GetBlockHeaderByHeight => "GET_BLOCK_HEADER_BY_HEIGHT",
            ChainQueryFunction::GetArchivedBlockHeight => "GET_ARCHIVED_BLOCK_HEIGHT",
            ChainQueryFunction::GetAllContracts => "GET_ALL_CONTRACTS",
            ChainQueryFunction::GetMerklePathByTxId => "GET_MERKLE_PATH_BY_TX_ID",
            ChainQueryFunction::GetArchiveStatus => "GET_ARCHIVE_STATUS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "GET_BLOCK_BY_TX_ID" => Some(Self::GetBlockByTxId),
            "GET_TX_BY_TX_ID" => Some(Self::GetTxByTxId),
            "GET_BLOCK_BY_HEIGHT" => Some(Self::GetBlockByHeight),
            "GET_CHAIN_INFO" => Some(Self::GetChainInfo),
            "GET_LAST_CONFIG_BLOCK" => Some(Self::GetLastConfigBlock),
            "GET_BLOCK_BY_HASH" => Some(Self::GetBlockByHash),
            "GET_NODE_CHAIN_LIST" => Some(Self::GetNodeChainList),
            "GET_GOVERNANCE_CONTRACT" => Some(Self::GetGovernanceContract),
            "GET_BLOCK_WITH_TXRWSETS_BY_HEIGHT" => Some(Self::GetBlockWithTxrwsetsByHeight),
            "GET_BLOCK_WITH_TXRWSETS_BY_HASH" => Some(Self::GetBlockWithTxrwsetsByHash),
            "GET_LAST_BLOCK" => Some(Self::GetLastBlock),
            "GET_FULL_BLOCK_BY_HEIGHT" => Some(Self::GetFullBlockByHeight),
            "GET_BLOCK_HEIGHT_BY_TX_ID" => Some(Self::GetBlockHeightByTxId),
            "GET_BLOCK_HEIGHT_BY_HASH" => Some(Self::GetBlockHeightByHash),
            "GET_BLOCK_HEADER_BY_HEIGHT" => Some(Self::GetBlockHeaderByHeight),
            "GET_ARCHIVED_BLOCK_HEIGHT" => Some(Self::GetArchivedBlockHeight),
            "GET_ALL_CONTRACTS" => Some(Self::GetAllContracts),
            "GET_MERKLE_PATH_BY_TX_ID" => Some(Self::GetMerklePathByTxId),
            "GET_ARCHIVE_STATUS" => Some(Self::GetArchiveStatus),
            _ => None,
        }
    }
}
/// archive block payload parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveBlock {}
/// Nested message and enum types in `ArchiveBlock`.
pub mod archive_block {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        BlockHeight = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::BlockHeight => "BLOCK_HEIGHT",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "BLOCK_HEIGHT" => Some(Self::BlockHeight),
                _ => None,
            }
        }
    }
}
/// restore block payload parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreBlock {}
/// Nested message and enum types in `RestoreBlock`.
pub mod restore_block {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        FullBlock = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::FullBlock => "FULL_BLOCK",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "FULL_BLOCK" => Some(Self::FullBlock),
                _ => None,
            }
        }
    }
}
/// methods of archive block
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ArchiveFunction {
    ArchiveBlock = 0,
    RestoreBlock = 1,
}
impl ArchiveFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            ArchiveFunction::ArchiveBlock => "ARCHIVE_BLOCK",
            ArchiveFunction::RestoreBlock => "RESTORE_BLOCK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ARCHIVE_BLOCK" => Some(Self::ArchiveBlock),
            "RESTORE_BLOCK" => Some(Self::RestoreBlock),
            _ => None,
        }
    }
}
/// methods of chain query contract
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TestContractFunction {
    /// put data, parameters: k,v
    P = 0,
    /// get data parameter: k
    G = 1,
    /// nothing to do.
    N = 2,
    /// delete data by key, parameter: k
    D = 3,
}
impl TestContractFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            TestContractFunction::P => "P",
            TestContractFunction::G => "G",
            TestContractFunction::N => "N",
            TestContractFunction::D => "D",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "P" => Some(Self::P),
            "G" => Some(Self::G),
            "N" => Some(Self::N),
            "D" => Some(Self::D),
            _ => None,
        }
    }
}
/// methods of pubkey management
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PubkeyManageFunction {
    /// add one pubkey
    PubkeyAdd = 0,
    /// delete pubkeys
    PubkeyDelete = 1,
    /// query pubkeys
    PubkeyQuery = 2,
}
impl PubkeyManageFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            PubkeyManageFunction::PubkeyAdd => "PUBKEY_ADD",
            PubkeyManageFunction::PubkeyDelete => "PUBKEY_DELETE",
            PubkeyManageFunction::PubkeyQuery => "PUBKEY_QUERY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PUBKEY_ADD" => Some(Self::PubkeyAdd),
            "PUBKEY_DELETE" => Some(Self::PubkeyDelete),
            "PUBKEY_QUERY" => Some(Self::PubkeyQuery),
            _ => None,
        }
    }
}
/// subscribe block payload parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeBlock {}
/// Nested message and enum types in `SubscribeBlock`.
pub mod subscribe_block {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        StartBlock = 0,
        EndBlock = 1,
        WithRwset = 2,
        OnlyHeader = 3,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::StartBlock => "START_BLOCK",
                Parameter::EndBlock => "END_BLOCK",
                Parameter::WithRwset => "WITH_RWSET",
                Parameter::OnlyHeader => "ONLY_HEADER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "START_BLOCK" => Some(Self::StartBlock),
                "END_BLOCK" => Some(Self::EndBlock),
                "WITH_RWSET" => Some(Self::WithRwset),
                "ONLY_HEADER" => Some(Self::OnlyHeader),
                _ => None,
            }
        }
    }
}
/// subscribe transaction payload parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeTx {}
/// Nested message and enum types in `SubscribeTx`.
pub mod subscribe_tx {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        StartBlock = 0,
        EndBlock = 1,
        ContractName = 2,
        TxIds = 3,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::StartBlock => "START_BLOCK",
                Parameter::EndBlock => "END_BLOCK",
                Parameter::ContractName => "CONTRACT_NAME",
                Parameter::TxIds => "TX_IDS",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "START_BLOCK" => Some(Self::StartBlock),
                "END_BLOCK" => Some(Self::EndBlock),
                "CONTRACT_NAME" => Some(Self::ContractName),
                "TX_IDS" => Some(Self::TxIds),
                _ => None,
            }
        }
    }
}
/// subscribe contract event parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeContractEvent {}
/// Nested message and enum types in `SubscribeContractEvent`.
pub mod subscribe_contract_event {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        Topic = 0,
        ContractName = 1,
        StartBlock = 2,
        EndBlock = 3,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::Topic => "TOPIC",
                Parameter::ContractName => "CONTRACT_NAME",
                Parameter::StartBlock => "START_BLOCK",
                Parameter::EndBlock => "END_BLOCK",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TOPIC" => Some(Self::Topic),
                "CONTRACT_NAME" => Some(Self::ContractName),
                "START_BLOCK" => Some(Self::StartBlock),
                "END_BLOCK" => Some(Self::EndBlock),
                _ => None,
            }
        }
    }
}
/// methods of subscribe
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SubscribeFunction {
    SubscribeBlock = 0,
    SubscribeTx = 1,
    SubscribeContractEvent = 2,
}
impl SubscribeFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            SubscribeFunction::SubscribeBlock => "SUBSCRIBE_BLOCK",
            SubscribeFunction::SubscribeTx => "SUBSCRIBE_TX",
            SubscribeFunction::SubscribeContractEvent => "SUBSCRIBE_CONTRACT_EVENT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SUBSCRIBE_BLOCK" => Some(Self::SubscribeBlock),
            "SUBSCRIBE_TX" => Some(Self::SubscribeTx),
            "SUBSCRIBE_CONTRACT_EVENT" => Some(Self::SubscribeContractEvent),
            _ => None,
        }
    }
}
/// methods of Transaction Manager
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TransactionManagerFunction {
    /// add
    AddBlacklistTxIds = 0,
    /// delete
    DeleteBlacklistTxIds = 1,
    /// get
    GetBlacklistTxIds = 2,
}
impl TransactionManagerFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            TransactionManagerFunction::AddBlacklistTxIds => "ADD_BLACKLIST_TX_IDS",
            TransactionManagerFunction::DeleteBlacklistTxIds => "DELETE_BLACKLIST_TX_IDS",
            TransactionManagerFunction::GetBlacklistTxIds => "GET_BLACKLIST_TX_IDS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ADD_BLACKLIST_TX_IDS" => Some(Self::AddBlacklistTxIds),
            "DELETE_BLACKLIST_TX_IDS" => Some(Self::DeleteBlacklistTxIds),
            "GET_BLACKLIST_TX_IDS" => Some(Self::GetBlacklistTxIds),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoteAttestationRequest {
    #[prost(message, repeated, tag = "1")]
    pub sign_pair: ::prost::alloc::vec::Vec<SignInfo>,
    #[prost(message, optional, tag = "2")]
    pub payload: ::core::option::Option<RemoteAttestationPayload>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoteAttestationPayload {
    #[prost(string, tag = "1")]
    pub challenge: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "2")]
    pub org_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateDeployRequest {
    #[prost(message, repeated, tag = "1")]
    pub sign_pair: ::prost::alloc::vec::Vec<SignInfo>,
    #[prost(message, optional, tag = "2")]
    pub payload: ::core::option::Option<PrivateDeployPayload>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateDeployPayload {
    #[prost(string, tag = "1")]
    pub code_bytes: ::prost::alloc::string::String,
    /// deploy args which is packed by abi
    #[prost(string, tag = "2")]
    pub private_rlp_data: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub passwd: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub sig_algo: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub contract_name: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub contract_version: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub code_hash: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "8")]
    pub org_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "9")]
    pub time_stamp: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateComputeRequest {
    #[prost(message, repeated, tag = "1")]
    pub sign_pair: ::prost::alloc::vec::Vec<SignInfo>,
    #[prost(message, optional, tag = "2")]
    pub payload: ::core::option::Option<PrivateComputePayload>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateComputePayload {
    #[prost(string, tag = "1")]
    pub private_rlp_data: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub passwd: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub sig_algo: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub contract_name: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub code_hash: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "6")]
    pub org_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "7")]
    pub time_stamp: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignInfo {
    #[prost(string, tag = "1")]
    pub client_sign: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub cert: ::prost::alloc::string::String,
}
/// methods of private compute contract
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PrivateComputeFunction {
    /// get contract code
    GetContract = 0,
    /// get private data
    GetData = 1,
    /// save cert of tee
    SaveCaCert = 2,
    /// save private data dir
    SaveDir = 3,
    /// save data of private computation result
    SaveData = 4,
    /// save enclave report
    SaveEnclaveReport = 5,
    /// get enclave proof
    GetEnclaveProof = 6,
    /// get cert of tee
    GetCaCert = 7,
    /// get private data dir
    GetDir = 8,
    /// check caller cert auth
    CheckCallerCertAuth = 9,
    GetEnclaveEncryptPubKey = 10,
    GetEnclaveVerificationPubKey = 11,
    GetEnclaveReport = 12,
    GetEnclaveChallenge = 13,
    GetEnclaveSignature = 14,
    SaveRemoteAttestation = 15,
}
impl PrivateComputeFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            PrivateComputeFunction::GetContract => "GET_CONTRACT",
            PrivateComputeFunction::GetData => "GET_DATA",
            PrivateComputeFunction::SaveCaCert => "SAVE_CA_CERT",
            PrivateComputeFunction::SaveDir => "SAVE_DIR",
            PrivateComputeFunction::SaveData => "SAVE_DATA",
            PrivateComputeFunction::SaveEnclaveReport => "SAVE_ENCLAVE_REPORT",
            PrivateComputeFunction::GetEnclaveProof => "GET_ENCLAVE_PROOF",
            PrivateComputeFunction::GetCaCert => "GET_CA_CERT",
            PrivateComputeFunction::GetDir => "GET_DIR",
            PrivateComputeFunction::CheckCallerCertAuth => "CHECK_CALLER_CERT_AUTH",
            PrivateComputeFunction::GetEnclaveEncryptPubKey => "GET_ENCLAVE_ENCRYPT_PUB_KEY",
            PrivateComputeFunction::GetEnclaveVerificationPubKey => {
                "GET_ENCLAVE_VERIFICATION_PUB_KEY"
            }
            PrivateComputeFunction::GetEnclaveReport => "GET_ENCLAVE_REPORT",
            PrivateComputeFunction::GetEnclaveChallenge => "GET_ENCLAVE_CHALLENGE",
            PrivateComputeFunction::GetEnclaveSignature => "GET_ENCLAVE_SIGNATURE",
            PrivateComputeFunction::SaveRemoteAttestation => "SAVE_REMOTE_ATTESTATION",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "GET_CONTRACT" => Some(Self::GetContract),
            "GET_DATA" => Some(Self::GetData),
            "SAVE_CA_CERT" => Some(Self::SaveCaCert),
            "SAVE_DIR" => Some(Self::SaveDir),
            "SAVE_DATA" => Some(Self::SaveData),
            "SAVE_ENCLAVE_REPORT" => Some(Self::SaveEnclaveReport),
            "GET_ENCLAVE_PROOF" => Some(Self::GetEnclaveProof),
            "GET_CA_CERT" => Some(Self::GetCaCert),
            "GET_DIR" => Some(Self::GetDir),
            "CHECK_CALLER_CERT_AUTH" => Some(Self::CheckCallerCertAuth),
            "GET_ENCLAVE_ENCRYPT_PUB_KEY" => Some(Self::GetEnclaveEncryptPubKey),
            "GET_ENCLAVE_VERIFICATION_PUB_KEY" => Some(Self::GetEnclaveVerificationPubKey),
            "GET_ENCLAVE_REPORT" => Some(Self::GetEnclaveReport),
            "GET_ENCLAVE_CHALLENGE" => Some(Self::GetEnclaveChallenge),
            "GET_ENCLAVE_SIGNATURE" => Some(Self::GetEnclaveSignature),
            "SAVE_REMOTE_ATTESTATION" => Some(Self::SaveRemoteAttestation),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SaveGateway {}
/// Nested message and enum types in `SaveGateway`.
pub mod save_gateway {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// gateway information byte
        GatewayInfoByte = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::GatewayInfoByte => "GATEWAY_INFO_BYTE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "GATEWAY_INFO_BYTE" => Some(Self::GatewayInfoByte),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateGateway {}
/// Nested message and enum types in `UpdateGateway`.
pub mod update_gateway {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// gateway id
        GatewayId = 0,
        /// gateway information byte
        GatewayInfoByte = 1,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::GatewayId => "GATEWAY_ID",
                Parameter::GatewayInfoByte => "GATEWAY_INFO_BYTE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "GATEWAY_ID" => Some(Self::GatewayId),
                "GATEWAY_INFO_BYTE" => Some(Self::GatewayInfoByte),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGateway {}
/// Nested message and enum types in `GetGateway`.
pub mod get_gateway {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// gateway id
        GatewayId = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::GatewayId => "GATEWAY_ID",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "GATEWAY_ID" => Some(Self::GatewayId),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGatewayByRange {}
/// Nested message and enum types in `GetGatewayByRange`.
pub mod get_gateway_by_range {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// start gateway id
        StartGatewayId = 0,
        /// stop gateway id
        StopGatewayId = 1,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::StartGatewayId => "START_GATEWAY_ID",
                Parameter::StopGatewayId => "STOP_GATEWAY_ID",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "START_GATEWAY_ID" => Some(Self::StartGatewayId),
                "STOP_GATEWAY_ID" => Some(Self::StopGatewayId),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SaveCrossChainInfo {}
/// Nested message and enum types in `SaveCrossChainInfo`.
pub mod save_cross_chain_info {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// cross_chain_info_byte
        CrossChainInfoByte = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::CrossChainInfoByte => "CROSS_CHAIN_INFO_BYTE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CROSS_CHAIN_INFO_BYTE" => Some(Self::CrossChainInfoByte),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCrossChainTry {}
/// Nested message and enum types in `UpdateCrossChainTry`.
pub mod update_cross_chain_try {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// cross chain id
        CrossChainId = 0,
        /// cross chain transaction byte
        CrossChainTxByte = 1,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::CrossChainId => "CROSS_CHAIN_ID",
                Parameter::CrossChainTxByte => "CROSS_CHAIN_TX_BYTE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CROSS_CHAIN_ID" => Some(Self::CrossChainId),
                "CROSS_CHAIN_TX_BYTE" => Some(Self::CrossChainTxByte),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCrossChainResult {}
/// Nested message and enum types in `UpdateCrossChainResult`.
pub mod update_cross_chain_result {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// cross chain id
        CrossChainId = 0,
        /// cross chain result
        CrossChainResult = 1,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::CrossChainId => "CROSS_CHAIN_ID",
                Parameter::CrossChainResult => "CROSS_CHAIN_RESULT",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CROSS_CHAIN_ID" => Some(Self::CrossChainId),
                "CROSS_CHAIN_RESULT" => Some(Self::CrossChainResult),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteErrorCrossChainTxList {}
/// Nested message and enum types in `DeleteErrorCrossChainTxList`.
pub mod delete_error_cross_chain_tx_list {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// cross chain id
        CrossChainId = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::CrossChainId => "CROSS_CHAIN_ID",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CROSS_CHAIN_ID" => Some(Self::CrossChainId),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCrossChainConfirm {}
/// Nested message and enum types in `UpdateCrossChainConfirm`.
pub mod update_cross_chain_confirm {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// cross chain id
        CrossChainId = 0,
        /// cross chain confirm byte
        CrossChainConfirmByte = 1,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::CrossChainId => "CROSS_CHAIN_ID",
                Parameter::CrossChainConfirmByte => "CROSS_CHAIN_CONFIRM_BYTE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CROSS_CHAIN_ID" => Some(Self::CrossChainId),
                "CROSS_CHAIN_CONFIRM_BYTE" => Some(Self::CrossChainConfirmByte),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSrcGatewayConfirm {}
/// Nested message and enum types in `UpdateSrcGatewayConfirm`.
pub mod update_src_gateway_confirm {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// cross chain id
        CrossChainId = 0,
        /// confirm result
        ConfirmResult = 1,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::CrossChainId => "CROSS_CHAIN_ID",
                Parameter::ConfirmResult => "CONFIRM_RESULT",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CROSS_CHAIN_ID" => Some(Self::CrossChainId),
                "CONFIRM_RESULT" => Some(Self::ConfirmResult),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCrossChainInfo {}
/// Nested message and enum types in `GetCrossChainInfo`.
pub mod get_cross_chain_info {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// cross chain id
        CrossChainId = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::CrossChainId => "CROSS_CHAIN_ID",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CROSS_CHAIN_ID" => Some(Self::CrossChainId),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCrossChainInfoByRange {}
/// Nested message and enum types in `GetCrossChainInfoByRange`.
pub mod get_cross_chain_info_by_range {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// start cross chain id
        StartCrossChainId = 0,
        /// stop cross chain id
        StopCrossChainId = 1,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::StartCrossChainId => "START_CROSS_CHAIN_ID",
                Parameter::StopCrossChainId => "STOP_CROSS_CHAIN_ID",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "START_CROSS_CHAIN_ID" => Some(Self::StartCrossChainId),
                "STOP_CROSS_CHAIN_ID" => Some(Self::StopCrossChainId),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventDataType {}
/// Nested message and enum types in `EventDataType`.
pub mod event_data_type {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// string
        String = 0,
        /// map
        Map = 1,
        /// byte
        Byte = 2,
        /// BOOL
        Bool = 3,
        /// int
        Int = 4,
        /// float
        Float = 5,
        /// array
        Array = 6,
        /// hash, bcos
        Hash = 7,
        /// ADDRESS, bcos
        Address = 8,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::String => "STRING",
                Parameter::Map => "MAP",
                Parameter::Byte => "BYTE",
                Parameter::Bool => "BOOL",
                Parameter::Int => "INT",
                Parameter::Float => "FLOAT",
                Parameter::Array => "ARRAY",
                Parameter::Hash => "HASH",
                Parameter::Address => "ADDRESS",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STRING" => Some(Self::String),
                "MAP" => Some(Self::Map),
                "BYTE" => Some(Self::Byte),
                "BOOL" => Some(Self::Bool),
                "INT" => Some(Self::Int),
                "FLOAT" => Some(Self::Float),
                "ARRAY" => Some(Self::Array),
                "HASH" => Some(Self::Hash),
                "ADDRESS" => Some(Self::Address),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Code {}
/// Nested message and enum types in `Code`.
pub mod code {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// sucess
        GatewaySuccess = 0,
        /// timeout
        GatewayTimeout = 1,
        /// parameter invalid
        InvalidParameter = 2,
        /// tx prove error
        TxProveError = 3,
        /// contract fail
        ContractFail = 4,
        /// internal error
        InternalError = 5,
        /// relay chain error
        RelayChainError = 6,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::GatewaySuccess => "GATEWAY_SUCCESS",
                Parameter::GatewayTimeout => "GATEWAY_TIMEOUT",
                Parameter::InvalidParameter => "INVALID_PARAMETER",
                Parameter::TxProveError => "TX_PROVE_ERROR",
                Parameter::ContractFail => "CONTRACT_FAIL",
                Parameter::InternalError => "INTERNAL_ERROR",
                Parameter::RelayChainError => "RELAY_CHAIN_ERROR",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "GATEWAY_SUCCESS" => Some(Self::GatewaySuccess),
                "GATEWAY_TIMEOUT" => Some(Self::GatewayTimeout),
                "INVALID_PARAMETER" => Some(Self::InvalidParameter),
                "TX_PROVE_ERROR" => Some(Self::TxProveError),
                "CONTRACT_FAIL" => Some(Self::ContractFail),
                "INTERNAL_ERROR" => Some(Self::InternalError),
                "RELAY_CHAIN_ERROR" => Some(Self::RelayChainError),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossType {}
/// Nested message and enum types in `CrossType`.
pub mod cross_type {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// cross chain query
        Query = 0,
        /// cross chain invoke
        Invoke = 1,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::Query => "QUERY",
                Parameter::Invoke => "INVOKE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "QUERY" => Some(Self::Query),
                "INVOKE" => Some(Self::Invoke),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxResultValue {}
/// Nested message and enum types in `TxResultValue`.
pub mod tx_result_value {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// success
        TxSuccess = 0,
        /// timeout
        TxTimeout = 1,
        /// fail
        TxFail = 2,
        /// tx not exist
        TxNotExist = 3,
        /// no permissions
        TxNoPermissions = 4,
        /// no gateway
        GatewayNotFound = 5,
        /// gateway ping error
        GatewayPingpongError = 6,
        /// chain ping error
        ChainPingError = 7,
        /// src gateway get error
        SrcGatewayGetError = 8,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::TxSuccess => "TX_SUCCESS",
                Parameter::TxTimeout => "TX_TIMEOUT",
                Parameter::TxFail => "TX_FAIL",
                Parameter::TxNotExist => "TX_NOT_EXIST",
                Parameter::TxNoPermissions => "TX_NO_PERMISSIONS",
                Parameter::GatewayNotFound => "GATEWAY_NOT_FOUND",
                Parameter::GatewayPingpongError => "GATEWAY_PINGPONG_ERROR",
                Parameter::ChainPingError => "CHAIN_PING_ERROR",
                Parameter::SrcGatewayGetError => "SRC_GATEWAY_GET_ERROR",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TX_SUCCESS" => Some(Self::TxSuccess),
                "TX_TIMEOUT" => Some(Self::TxTimeout),
                "TX_FAIL" => Some(Self::TxFail),
                "TX_NOT_EXIST" => Some(Self::TxNotExist),
                "TX_NO_PERMISSIONS" => Some(Self::TxNoPermissions),
                "GATEWAY_NOT_FOUND" => Some(Self::GatewayNotFound),
                "GATEWAY_PINGPONG_ERROR" => Some(Self::GatewayPingpongError),
                "CHAIN_PING_ERROR" => Some(Self::ChainPingError),
                "SRC_GATEWAY_GET_ERROR" => Some(Self::SrcGatewayGetError),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxVerifyRsult {}
/// Nested message and enum types in `TxVerifyRsult`.
pub mod tx_verify_rsult {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// success
        VerifySuccess = 0,
        /// failed
        VerifyInvalid = 1,
        /// not need
        VerifyNotNeed = 2,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::VerifySuccess => "VERIFY_SUCCESS",
                Parameter::VerifyInvalid => "VERIFY_INVALID",
                Parameter::VerifyNotNeed => "VERIFY_NOT_NEED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "VERIFY_SUCCESS" => Some(Self::VerifySuccess),
                "VERIFY_INVALID" => Some(Self::VerifyInvalid),
                "VERIFY_NOT_NEED" => Some(Self::VerifyNotNeed),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainStateValue {}
/// Nested message and enum types in `CrossChainStateValue`.
pub mod cross_chain_state_value {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// new
        New = 0,
        /// wait execute
        WaitExecute = 1,
        /// wait confirm
        WaitConfirm = 2,
        /// confirm end
        ConfirmEnd = 3,
        /// cancel end
        CancelEnd = 4,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::New => "NEW",
                Parameter::WaitExecute => "WAIT_EXECUTE",
                Parameter::WaitConfirm => "WAIT_CONFIRM",
                Parameter::ConfirmEnd => "CONFIRM_END",
                Parameter::CancelEnd => "CANCEL_END",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "NEW" => Some(Self::New),
                "WAIT_EXECUTE" => Some(Self::WaitExecute),
                "WAIT_CONFIRM" => Some(Self::WaitConfirm),
                "CONFIRM_END" => Some(Self::ConfirmEnd),
                "CANCEL_END" => Some(Self::CancelEnd),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventName {}
/// Nested message and enum types in `EventName`.
pub mod event_name {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        /// new
        NewCrossChain = 0,
        /// try end
        CrossChainTryEnd = 1,
        /// update result end
        UpadateResultEnd = 2,
        /// confirm end
        GatewayConfirmEnd = 3,
        /// src gateway confirm end
        SrcGatewayConfirmEnd = 4,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::NewCrossChain => "NEW_CROSS_CHAIN",
                Parameter::CrossChainTryEnd => "CROSS_CHAIN_TRY_END",
                Parameter::UpadateResultEnd => "UPADATE_RESULT_END",
                Parameter::GatewayConfirmEnd => "GATEWAY_CONFIRM_END",
                Parameter::SrcGatewayConfirmEnd => "SRC_GATEWAY_CONFIRM_END",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "NEW_CROSS_CHAIN" => Some(Self::NewCrossChain),
                "CROSS_CHAIN_TRY_END" => Some(Self::CrossChainTryEnd),
                "UPADATE_RESULT_END" => Some(Self::UpadateResultEnd),
                "GATEWAY_CONFIRM_END" => Some(Self::GatewayConfirmEnd),
                "SRC_GATEWAY_CONFIRM_END" => Some(Self::SrcGatewayConfirmEnd),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainInfo {
    /// cross chain id
    #[prost(string, tag = "1")]
    pub cross_chain_id: ::prost::alloc::string::String,
    /// cross chain name
    #[prost(string, tag = "2")]
    pub cross_chain_name: ::prost::alloc::string::String,
    /// cross chain flag
    #[prost(string, tag = "3")]
    pub cross_chain_flag: ::prost::alloc::string::String,
    /// src gateway id
    #[prost(string, tag = "4")]
    pub from: ::prost::alloc::string::String,
    /// cross chain message
    #[prost(message, repeated, tag = "5")]
    pub cross_chain_msg: ::prost::alloc::vec::Vec<CrossChainMsg>,
    /// first tx
    #[prost(message, optional, tag = "6")]
    pub first_tx_content: ::core::option::Option<TxContentWithVerify>,
    /// tx content adn verify result
    #[prost(message, repeated, tag = "7")]
    pub cross_chain_tx_content: ::prost::alloc::vec::Vec<TxContentWithVerify>,
    /// cross chain result
    #[prost(bool, tag = "8")]
    pub cross_chain_result: bool,
    /// cross chain confirm result
    #[prost(message, repeated, tag = "9")]
    pub gateway_confirm_result: ::prost::alloc::vec::Vec<CrossChainConfirm>,
    /// cross chain state
    #[prost(enumeration = "cross_chain_state_value::Parameter", tag = "10")]
    pub state: i32,
    /// confirm information
    #[prost(message, optional, tag = "11")]
    pub confirm_info: ::core::option::Option<ConfirmInfo>,
    /// cancel information
    #[prost(message, optional, tag = "12")]
    pub cancel_info: ::core::option::Option<CancelInfo>,
    /// confirm result
    #[prost(message, optional, tag = "13")]
    pub confirm_result: ::core::option::Option<CrossChainConfirm>,
    /// timeout
    #[prost(int64, tag = "14")]
    pub timeout: i64,
    /// cross type
    #[prost(enumeration = "cross_type::Parameter", tag = "19")]
    pub cross_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainMsg {
    /// target gateway id
    #[prost(string, tag = "1")]
    pub gateway_id: ::prost::alloc::string::String,
    /// target chain resource id
    #[prost(string, tag = "2")]
    pub chain_rid: ::prost::alloc::string::String,
    /// target contract name
    #[prost(string, tag = "3")]
    pub contract_name: ::prost::alloc::string::String,
    /// target method
    #[prost(string, tag = "4")]
    pub method: ::prost::alloc::string::String,
    /// sign identity
    #[prost(string, repeated, tag = "5")]
    pub identity: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// target contract parameter
    #[prost(string, tag = "6")]
    pub parameter: ::prost::alloc::string::String,
    /// contract parameter data
    #[prost(int32, repeated, tag = "7")]
    pub param_data: ::prost::alloc::vec::Vec<i32>,
    /// bcos, parameter data type
    #[prost(enumeration = "event_data_type::Parameter", repeated, tag = "8")]
    pub param_data_type: ::prost::alloc::vec::Vec<i32>,
    /// extra data
    #[prost(string, tag = "9")]
    pub extra_data: ::prost::alloc::string::String,
    /// confirm information
    #[prost(message, optional, tag = "10")]
    pub confirm_info: ::core::option::Option<ConfirmInfo>,
    /// cancel information
    #[prost(message, optional, tag = "11")]
    pub cancel_info: ::core::option::Option<CancelInfo>,
    /// bcos abi
    #[prost(string, tag = "12")]
    pub abi: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxContentWithVerify {
    /// tx content
    #[prost(message, optional, tag = "1")]
    pub tx_content: ::core::option::Option<TxContent>,
    /// try result
    #[prost(string, repeated, tag = "2")]
    pub try_result: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// tx verify result
    #[prost(enumeration = "tx_verify_rsult::Parameter", tag = "3")]
    pub tx_verify_result: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfirmInfo {
    /// chain resource id
    #[prost(string, tag = "2")]
    pub chain_rid: ::prost::alloc::string::String,
    /// contract name
    #[prost(string, tag = "3")]
    pub contract_name: ::prost::alloc::string::String,
    /// method
    #[prost(string, tag = "4")]
    pub method: ::prost::alloc::string::String,
    /// parameter
    #[prost(string, tag = "5")]
    pub parameter: ::prost::alloc::string::String,
    /// parameter data
    #[prost(int32, repeated, tag = "6")]
    pub param_data: ::prost::alloc::vec::Vec<i32>,
    /// bcos, parameter data type
    #[prost(enumeration = "event_data_type::Parameter", repeated, tag = "7")]
    pub param_data_type: ::prost::alloc::vec::Vec<i32>,
    /// extra data
    #[prost(string, tag = "8")]
    pub extra_data: ::prost::alloc::string::String,
    /// bcos abi
    #[prost(string, tag = "9")]
    pub abi: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainConfirm {
    /// result code
    #[prost(enumeration = "code::Parameter", tag = "1")]
    pub code: i32,
    /// message
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxContent {
    /// tx id
    #[prost(string, tag = "1")]
    pub tx_id: ::prost::alloc::string::String,
    /// tx content
    #[prost(bytes = "vec", tag = "2")]
    pub tx: ::prost::alloc::vec::Vec<u8>,
    /// tx result
    #[prost(enumeration = "tx_result_value::Parameter", tag = "3")]
    pub tx_result: i32,
    /// gateway id
    #[prost(string, tag = "4")]
    pub gateway_id: ::prost::alloc::string::String,
    /// chain resource id
    #[prost(string, tag = "5")]
    pub chain_rid: ::prost::alloc::string::String,
    /// tx prove json string
    #[prost(string, tag = "6")]
    pub tx_prove: ::prost::alloc::string::String,
    /// block height
    #[prost(int64, tag = "7")]
    pub block_height: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelInfo {
    /// chain resource id
    #[prost(string, tag = "2")]
    pub chain_rid: ::prost::alloc::string::String,
    /// contract name
    #[prost(string, tag = "3")]
    pub contract_name: ::prost::alloc::string::String,
    /// method
    #[prost(string, tag = "4")]
    pub method: ::prost::alloc::string::String,
    /// parameter
    #[prost(string, tag = "5")]
    pub parameter: ::prost::alloc::string::String,
    /// param_data
    #[prost(int32, repeated, tag = "6")]
    pub param_data: ::prost::alloc::vec::Vec<i32>,
    /// bcos param data type
    #[prost(enumeration = "event_data_type::Parameter", repeated, tag = "7")]
    pub param_data_type: ::prost::alloc::vec::Vec<i32>,
    /// extra data
    #[prost(string, tag = "8")]
    pub extra_data: ::prost::alloc::string::String,
    /// bcos abi
    #[prost(string, tag = "9")]
    pub abi: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainTxUpChain {
    /// confirm index
    #[prost(int32, tag = "1")]
    pub index: i32,
    /// tx content and verify result
    #[prost(message, optional, tag = "2")]
    pub tx_content_with_verify: ::core::option::Option<TxContentWithVerify>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossChainConfirmUpChain {
    /// confirm index
    #[prost(int32, tag = "1")]
    pub index: i32,
    /// confirm result
    #[prost(message, optional, tag = "2")]
    pub cross_chain_confirm: ::core::option::Option<CrossChainConfirm>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RelayCrossFunction {
    /// save gateway
    SaveGateway = 0,
    /// update gateway
    UpdateGateway = 1,
    /// save cross chain info
    SaveCrossChainInfo = 2,
    /// get error cross chain transaction list
    GetErrorCrossChainTxList = 3,
    /// delete error cross chain transaction list
    DeleteErrorCrossChainTxList = 4,
    /// update cross chain try
    UpdateCrossChainTry = 5,
    /// update cross chain result
    UpdateCrossChainResult = 6,
    /// update cross chain confirm
    UpdateCrossChainConfirm = 7,
    /// update source gateway confirm
    UpdateSrcGatewayConfirm = 8,
    /// get gateway number
    GetGatewayNum = 9,
    /// get gateway
    GetGateway = 10,
    /// get gateway by range
    GetGatewayByRange = 11,
    /// get cross chain number
    GetCrossChainNum = 12,
    /// get cross chain information
    GetCrossChainInfo = 13,
    /// get cross chain information by range
    GetCrossChainInfoByRange = 14,
    /// get not end cross chian id list
    GetNotEndCrossChianIdList = 15,
}
impl RelayCrossFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            RelayCrossFunction::SaveGateway => "SAVE_GATEWAY",
            RelayCrossFunction::UpdateGateway => "UPDATE_GATEWAY",
            RelayCrossFunction::SaveCrossChainInfo => "SAVE_CROSS_CHAIN_INFO",
            RelayCrossFunction::GetErrorCrossChainTxList => "GET_ERROR_CROSS_CHAIN_TX_LIST",
            RelayCrossFunction::DeleteErrorCrossChainTxList => "DELETE_ERROR_CROSS_CHAIN_TX_LIST",
            RelayCrossFunction::UpdateCrossChainTry => "UPDATE_CROSS_CHAIN_TRY",
            RelayCrossFunction::UpdateCrossChainResult => "UPDATE_CROSS_CHAIN_RESULT",
            RelayCrossFunction::UpdateCrossChainConfirm => "UPDATE_CROSS_CHAIN_CONFIRM",
            RelayCrossFunction::UpdateSrcGatewayConfirm => "UPDATE_SRC_GATEWAY_CONFIRM",
            RelayCrossFunction::GetGatewayNum => "GET_GATEWAY_NUM",
            RelayCrossFunction::GetGateway => "GET_GATEWAY",
            RelayCrossFunction::GetGatewayByRange => "GET_GATEWAY_BY_RANGE",
            RelayCrossFunction::GetCrossChainNum => "GET_CROSS_CHAIN_NUM",
            RelayCrossFunction::GetCrossChainInfo => "GET_CROSS_CHAIN_INFO",
            RelayCrossFunction::GetCrossChainInfoByRange => "GET_CROSS_CHAIN_INFO_BY_RANGE",
            RelayCrossFunction::GetNotEndCrossChianIdList => "GET_NOT_END_CROSS_CHIAN_ID_LIST",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SAVE_GATEWAY" => Some(Self::SaveGateway),
            "UPDATE_GATEWAY" => Some(Self::UpdateGateway),
            "SAVE_CROSS_CHAIN_INFO" => Some(Self::SaveCrossChainInfo),
            "GET_ERROR_CROSS_CHAIN_TX_LIST" => Some(Self::GetErrorCrossChainTxList),
            "DELETE_ERROR_CROSS_CHAIN_TX_LIST" => Some(Self::DeleteErrorCrossChainTxList),
            "UPDATE_CROSS_CHAIN_TRY" => Some(Self::UpdateCrossChainTry),
            "UPDATE_CROSS_CHAIN_RESULT" => Some(Self::UpdateCrossChainResult),
            "UPDATE_CROSS_CHAIN_CONFIRM" => Some(Self::UpdateCrossChainConfirm),
            "UPDATE_SRC_GATEWAY_CONFIRM" => Some(Self::UpdateSrcGatewayConfirm),
            "GET_GATEWAY_NUM" => Some(Self::GetGatewayNum),
            "GET_GATEWAY" => Some(Self::GetGateway),
            "GET_GATEWAY_BY_RANGE" => Some(Self::GetGatewayByRange),
            "GET_CROSS_CHAIN_NUM" => Some(Self::GetCrossChainNum),
            "GET_CROSS_CHAIN_INFO" => Some(Self::GetCrossChainInfo),
            "GET_CROSS_CHAIN_INFO_BY_RANGE" => Some(Self::GetCrossChainInfoByRange),
            "GET_NOT_END_CROSS_CHIAN_ID_LIST" => Some(Self::GetNotEndCrossChianIdList),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiSignInfo {
    /// current tx payload
    #[prost(message, optional, tag = "1")]
    pub payload: ::core::option::Option<super::common::Payload>,
    /// call system contract name
    #[prost(string, tag = "2")]
    pub contract_name: ::prost::alloc::string::String,
    /// call system contract method
    #[prost(string, tag = "3")]
    pub method: ::prost::alloc::string::String,
    /// call system contract parameters
    /// repeated common.KeyValuePair parameters = 4;
    /// status
    #[prost(enumeration = "MultiSignStatus", tag = "4")]
    pub status: i32,
    /// vote list
    #[prost(message, repeated, tag = "5")]
    pub vote_infos: ::prost::alloc::vec::Vec<MultiSignVoteInfo>,
    /// call system contract message
    #[prost(string, tag = "6")]
    pub message: ::prost::alloc::string::String,
    /// call system contract result
    #[prost(bytes = "vec", tag = "7")]
    pub result: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiSignVoteInfo {
    #[prost(enumeration = "VoteStatus", tag = "1")]
    pub vote: i32,
    #[prost(message, optional, tag = "2")]
    pub endorsement: ::core::option::Option<super::common::EndorsementEntry>,
}
/// revoke contract parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiReq {}
/// Nested message and enum types in `MultiReq`.
pub mod multi_req {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        SysContractName = 0,
        SysMethod = 1,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::SysContractName => "SYS_CONTRACT_NAME",
                Parameter::SysMethod => "SYS_METHOD",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SYS_CONTRACT_NAME" => Some(Self::SysContractName),
                "SYS_METHOD" => Some(Self::SysMethod),
                _ => None,
            }
        }
    }
}
/// revoke contract parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiVote {}
/// Nested message and enum types in `MultiVote`.
pub mod multi_vote {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        VoteInfo = 0,
        TxId = 1,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::VoteInfo => "VOTE_INFO",
                Parameter::TxId => "TX_ID",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "VOTE_INFO" => Some(Self::VoteInfo),
                "TX_ID" => Some(Self::TxId),
                _ => None,
            }
        }
    }
}
/// revoke contract parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiQuery {}
/// Nested message and enum types in `MultiQuery`.
pub mod multi_query {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        TxId = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::TxId => "TX_ID",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TX_ID" => Some(Self::TxId),
                _ => None,
            }
        }
    }
}
/// methods of managing multi signature
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MultiSignFunction {
    /// multi signature request
    Req = 0,
    /// multi signature voting
    Vote = 1,
    /// multi signature query
    Query = 2,
    /// multi signature execute
    Trig = 3,
}
impl MultiSignFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            MultiSignFunction::Req => "REQ",
            MultiSignFunction::Vote => "VOTE",
            MultiSignFunction::Query => "QUERY",
            MultiSignFunction::Trig => "TRIG",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "REQ" => Some(Self::Req),
            "VOTE" => Some(Self::Vote),
            "QUERY" => Some(Self::Query),
            "TRIG" => Some(Self::Trig),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum VoteStatus {
    Agree = 0,
    Reject = 1,
}
impl VoteStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            VoteStatus::Agree => "AGREE",
            VoteStatus::Reject => "REJECT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AGREE" => Some(Self::Agree),
            "REJECT" => Some(Self::Reject),
            _ => None,
        }
    }
}
/// smart contract runtime, contains vm type and language type
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MultiSignStatus {
    Processing = 0,
    Adopted = 1,
    Refused = 2,
    Failed = 3,
    Passed = 4,
}
impl MultiSignStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            MultiSignStatus::Processing => "PROCESSING",
            MultiSignStatus::Adopted => "ADOPTED",
            MultiSignStatus::Refused => "REFUSED",
            MultiSignStatus::Failed => "FAILED",
            MultiSignStatus::Passed => "PASSED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PROCESSING" => Some(Self::Processing),
            "ADOPTED" => Some(Self::Adopted),
            "REFUSED" => Some(Self::Refused),
            "FAILED" => Some(Self::Failed),
            "PASSED" => Some(Self::Passed),
            _ => None,
        }
    }
}
/// current contract status
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContractStatus {
    /// normal, can be invoked
    Normal = 0,
    /// frozen, cannot be invoked temporarily
    Frozen = 1,
    /// revoked, cannot be invoked permanently
    Revoked = 2,
}
impl ContractStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            ContractStatus::Normal => "NORMAL",
            ContractStatus::Frozen => "FROZEN",
            ContractStatus::Revoked => "REVOKED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NORMAL" => Some(Self::Normal),
            "FROZEN" => Some(Self::Frozen),
            "REVOKED" => Some(Self::Revoked),
            _ => None,
        }
    }
}
/// init contract parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitContract {}
/// Nested message and enum types in `InitContract`.
pub mod init_contract {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        ContractName = 0,
        ContractRuntimeType = 1,
        ContractVersion = 2,
        ContractBytecode = 3,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::ContractName => "CONTRACT_NAME",
                Parameter::ContractRuntimeType => "CONTRACT_RUNTIME_TYPE",
                Parameter::ContractVersion => "CONTRACT_VERSION",
                Parameter::ContractBytecode => "CONTRACT_BYTECODE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CONTRACT_NAME" => Some(Self::ContractName),
                "CONTRACT_RUNTIME_TYPE" => Some(Self::ContractRuntimeType),
                "CONTRACT_VERSION" => Some(Self::ContractVersion),
                "CONTRACT_BYTECODE" => Some(Self::ContractBytecode),
                _ => None,
            }
        }
    }
}
/// upgrade contract parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradeContract {}
/// Nested message and enum types in `UpgradeContract`.
pub mod upgrade_contract {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        ContractName = 0,
        ContractRuntimeType = 1,
        ContractVersion = 2,
        ContractBytecode = 3,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::ContractName => "CONTRACT_NAME",
                Parameter::ContractRuntimeType => "CONTRACT_RUNTIME_TYPE",
                Parameter::ContractVersion => "CONTRACT_VERSION",
                Parameter::ContractBytecode => "CONTRACT_BYTECODE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CONTRACT_NAME" => Some(Self::ContractName),
                "CONTRACT_RUNTIME_TYPE" => Some(Self::ContractRuntimeType),
                "CONTRACT_VERSION" => Some(Self::ContractVersion),
                "CONTRACT_BYTECODE" => Some(Self::ContractBytecode),
                _ => None,
            }
        }
    }
}
/// freeze contract parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FreezeContract {}
/// Nested message and enum types in `FreezeContract`.
pub mod freeze_contract {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        ContractName = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::ContractName => "CONTRACT_NAME",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CONTRACT_NAME" => Some(Self::ContractName),
                _ => None,
            }
        }
    }
}
/// unfreeze contract parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnfreezeContract {}
/// Nested message and enum types in `UnfreezeContract`.
pub mod unfreeze_contract {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        ContractName = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::ContractName => "CONTRACT_NAME",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CONTRACT_NAME" => Some(Self::ContractName),
                _ => None,
            }
        }
    }
}
/// revoke contract parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokeContract {}
/// Nested message and enum types in `RevokeContract`.
pub mod revoke_contract {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        ContractName = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::ContractName => "CONTRACT_NAME",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CONTRACT_NAME" => Some(Self::ContractName),
                _ => None,
            }
        }
    }
}
/// query contract parameters
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetContractInfo {}
/// Nested message and enum types in `GetContractInfo`.
pub mod get_contract_info {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        ContractName = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::ContractName => "CONTRACT_NAME",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CONTRACT_NAME" => Some(Self::ContractName),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractAccess {}
/// Nested message and enum types in `ContractAccess`.
pub mod contract_access {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum Parameter {
        NativeContractName = 0,
    }
    impl Parameter {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Parameter::NativeContractName => "NATIVE_CONTRACT_NAME",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "NATIVE_CONTRACT_NAME" => Some(Self::NativeContractName),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractInfo {
    #[prost(message, repeated, tag = "1")]
    pub contract_transaction: ::prost::alloc::vec::Vec<ContractTransaction>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractTransaction {
    #[prost(message, optional, tag = "1")]
    pub contract: ::core::option::Option<super::common::Contract>,
    #[prost(string, tag = "2")]
    pub tx_id: ::prost::alloc::string::String,
}
/// methods of user management contract
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContractManageFunction {
    /// init contract
    InitContract = 0,
    /// upgrade contract version
    UpgradeContract = 1,
    /// freeze contract, cannot be invoked temporarily
    FreezeContract = 2,
    /// unfreeze contract to normal status
    UnfreezeContract = 3,
    /// revoke contract, cannot be invoked permanently
    RevokeContract = 4,
    /// grant access to a native contract
    GrantContractAccess = 5,
    /// revoke access to a native contract
    RevokeContractAccess = 6,
    /// verify if has access to a certain native contract
    VerifyContractAccess = 7,
    /// initial new chain maker version native contract list
    InitNewNativeContract = 8,
}
impl ContractManageFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            ContractManageFunction::InitContract => "INIT_CONTRACT",
            ContractManageFunction::UpgradeContract => "UPGRADE_CONTRACT",
            ContractManageFunction::FreezeContract => "FREEZE_CONTRACT",
            ContractManageFunction::UnfreezeContract => "UNFREEZE_CONTRACT",
            ContractManageFunction::RevokeContract => "REVOKE_CONTRACT",
            ContractManageFunction::GrantContractAccess => "GRANT_CONTRACT_ACCESS",
            ContractManageFunction::RevokeContractAccess => "REVOKE_CONTRACT_ACCESS",
            ContractManageFunction::VerifyContractAccess => "VERIFY_CONTRACT_ACCESS",
            ContractManageFunction::InitNewNativeContract => "INIT_NEW_NATIVE_CONTRACT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "INIT_CONTRACT" => Some(Self::InitContract),
            "UPGRADE_CONTRACT" => Some(Self::UpgradeContract),
            "FREEZE_CONTRACT" => Some(Self::FreezeContract),
            "UNFREEZE_CONTRACT" => Some(Self::UnfreezeContract),
            "REVOKE_CONTRACT" => Some(Self::RevokeContract),
            "GRANT_CONTRACT_ACCESS" => Some(Self::GrantContractAccess),
            "REVOKE_CONTRACT_ACCESS" => Some(Self::RevokeContractAccess),
            "VERIFY_CONTRACT_ACCESS" => Some(Self::VerifyContractAccess),
            "INIT_NEW_NATIVE_CONTRACT" => Some(Self::InitNewNativeContract),
            _ => None,
        }
    }
}
/// methods of contract query
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContractQueryFunction {
    /// get contract information
    GetContractInfo = 0,
    /// get contract bytecode
    GetContractBytecode = 1,
    /// get all installed contract
    GetContractList = 2,
    /// get native contract list has access to
    GetDisabledContractList = 3,
}
impl ContractQueryFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            ContractQueryFunction::GetContractInfo => "GET_CONTRACT_INFO",
            ContractQueryFunction::GetContractBytecode => "GET_CONTRACT_BYTECODE",
            ContractQueryFunction::GetContractList => "GET_CONTRACT_LIST",
            ContractQueryFunction::GetDisabledContractList => "GET_DISABLED_CONTRACT_LIST",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "GET_CONTRACT_INFO" => Some(Self::GetContractInfo),
            "GET_CONTRACT_BYTECODE" => Some(Self::GetContractBytecode),
            "GET_CONTRACT_LIST" => Some(Self::GetContractList),
            "GET_DISABLED_CONTRACT_LIST" => Some(Self::GetDisabledContractList),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountMultiSign {
    #[prost(bytes = "vec", tag = "1")]
    pub payloads: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "2")]
    pub client_sign: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "3")]
    pub public_key_info: ::prost::alloc::vec::Vec<u8>,
}
/// account multi sign req
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountMultiSignsReq {
    #[prost(message, repeated, tag = "1")]
    pub gas_multi_signs: ::prost::alloc::vec::Vec<AccountMultiSign>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RechargeGas {
    #[prost(string, tag = "1")]
    pub address: ::prost::alloc::string::String,
    #[prost(int64, tag = "2")]
    pub gas_amount: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RechargeGasReq {
    #[prost(message, repeated, tag = "1")]
    pub batch_recharge_gas: ::prost::alloc::vec::Vec<RechargeGas>,
}
/// methods of private compute contract
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum GasAccountFunction {
    /// set admin
    SetAdmin = 0,
    /// get admin
    GetAdmin = 1,
    /// recharge gas
    RechargeGas = 2,
    /// get balance
    GetBalance = 3,
    /// charge gas
    ChargeGas = 4,
    /// frozen account
    FrozenAccount = 5,
    /// unfrozen account
    UnfrozenAccount = 6,
    /// account status
    AccountStatus = 7,
    /// refund gas
    RefundGas = 8,
    /// refund gas for vm
    RefundGasVm = 9,
    /// charge gas for multi accounts
    ChargeGasForMultiAccount = 10,
}
impl GasAccountFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            GasAccountFunction::SetAdmin => "SET_ADMIN",
            GasAccountFunction::GetAdmin => "GET_ADMIN",
            GasAccountFunction::RechargeGas => "RECHARGE_GAS",
            GasAccountFunction::GetBalance => "GET_BALANCE",
            GasAccountFunction::ChargeGas => "CHARGE_GAS",
            GasAccountFunction::FrozenAccount => "FROZEN_ACCOUNT",
            GasAccountFunction::UnfrozenAccount => "UNFROZEN_ACCOUNT",
            GasAccountFunction::AccountStatus => "ACCOUNT_STATUS",
            GasAccountFunction::RefundGas => "REFUND_GAS",
            GasAccountFunction::RefundGasVm => "REFUND_GAS_VM",
            GasAccountFunction::ChargeGasForMultiAccount => "CHARGE_GAS_FOR_MULTI_ACCOUNT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SET_ADMIN" => Some(Self::SetAdmin),
            "GET_ADMIN" => Some(Self::GetAdmin),
            "RECHARGE_GAS" => Some(Self::RechargeGas),
            "GET_BALANCE" => Some(Self::GetBalance),
            "CHARGE_GAS" => Some(Self::ChargeGas),
            "FROZEN_ACCOUNT" => Some(Self::FrozenAccount),
            "UNFROZEN_ACCOUNT" => Some(Self::UnfrozenAccount),
            "ACCOUNT_STATUS" => Some(Self::AccountStatus),
            "REFUND_GAS" => Some(Self::RefundGas),
            "REFUND_GAS_VM" => Some(Self::RefundGasVm),
            "CHARGE_GAS_FOR_MULTI_ACCOUNT" => Some(Self::ChargeGasForMultiAccount),
            _ => None,
        }
    }
}
/// methods of DPoS ERC20 contract
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DPoSerc20Function {
    /// get owner of DPoS
    GetOwner = 0,
    /// get decimals of DPoS
    GetDecimals = 1,
    /// transfer token at DPoS
    Transfer = 2,
    /// transfer token from user at DPoS
    TransferFrom = 3,
    /// get balance of user at DPoS
    GetBalanceof = 4,
    /// approve token for user to other user at DPoS
    Approve = 5,
    /// get allowance at DPoS
    GetAllowance = 6,
    /// burn token at DPoS
    Burn = 7,
    /// mint token at DPoS
    Mint = 8,
    /// transfer owner ship at DPoS
    TransferOwnership = 9,
    /// get total supply of tokens
    GetTotalSupply = 10,
}
impl DPoSerc20Function {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            DPoSerc20Function::GetOwner => "GET_OWNER",
            DPoSerc20Function::GetDecimals => "GET_DECIMALS",
            DPoSerc20Function::Transfer => "TRANSFER",
            DPoSerc20Function::TransferFrom => "TRANSFER_FROM",
            DPoSerc20Function::GetBalanceof => "GET_BALANCEOF",
            DPoSerc20Function::Approve => "APPROVE",
            DPoSerc20Function::GetAllowance => "GET_ALLOWANCE",
            DPoSerc20Function::Burn => "BURN",
            DPoSerc20Function::Mint => "MINT",
            DPoSerc20Function::TransferOwnership => "TRANSFER_OWNERSHIP",
            DPoSerc20Function::GetTotalSupply => "GET_TOTAL_SUPPLY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "GET_OWNER" => Some(Self::GetOwner),
            "GET_DECIMALS" => Some(Self::GetDecimals),
            "TRANSFER" => Some(Self::Transfer),
            "TRANSFER_FROM" => Some(Self::TransferFrom),
            "GET_BALANCEOF" => Some(Self::GetBalanceof),
            "APPROVE" => Some(Self::Approve),
            "GET_ALLOWANCE" => Some(Self::GetAllowance),
            "BURN" => Some(Self::Burn),
            "MINT" => Some(Self::Mint),
            "TRANSFER_OWNERSHIP" => Some(Self::TransferOwnership),
            "GET_TOTAL_SUPPLY" => Some(Self::GetTotalSupply),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Epoch {
    /// ID with auto-increment
    #[prost(uint64, tag = "1")]
    pub epoch_id: u64,
    /// A collection of validators for the current generation
    #[prost(string, repeated, tag = "2")]
    pub proposer_vector: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Next epoch switch height
    #[prost(uint64, tag = "3")]
    pub next_epoch_create_height: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Validator {
    /// The address of the verifier: base58.Encode(sha256(pubkey))
    #[prost(string, tag = "1")]
    pub validator_address: ::prost::alloc::string::String,
    /// active punishment tags whether validator is jailed or not
    #[prost(bool, tag = "2")]
    pub jailed: bool,
    /// validator status: Bonded / Unbonding / Unbonded
    #[prost(enumeration = "BondStatus", tag = "3")]
    pub status: i32,
    /// delegate token amount
    #[prost(string, tag = "4")]
    pub tokens: ::prost::alloc::string::String,
    /// delegate share amount
    #[prost(string, tag = "5")]
    pub delegator_shares: ::prost::alloc::string::String,
    /// undelegate entry epoch id
    #[prost(uint64, tag = "6")]
    pub unbonding_epoch_id: u64,
    /// undelegate entry complete epoch id
    #[prost(uint64, tag = "7")]
    pub unbonding_completion_epoch_id: u64,
    /// validator self delegate token amount
    #[prost(string, tag = "8")]
    pub self_delegation: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Delegation {
    /// delegator cert hash
    #[prost(string, tag = "1")]
    pub delegator_address: ::prost::alloc::string::String,
    /// validator cert hash
    #[prost(string, tag = "2")]
    pub validator_address: ::prost::alloc::string::String,
    /// share amount
    #[prost(string, tag = "3")]
    pub shares: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnbondingDelegation {
    /// epoch id
    #[prost(string, tag = "1")]
    pub epoch_id: ::prost::alloc::string::String,
    /// delegator cert hash
    #[prost(string, tag = "2")]
    pub delegator_address: ::prost::alloc::string::String,
    /// validator cert hash
    #[prost(string, tag = "3")]
    pub validator_address: ::prost::alloc::string::String,
    /// unbond entry records
    #[prost(message, repeated, tag = "4")]
    pub entries: ::prost::alloc::vec::Vec<UnbondingDelegationEntry>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnbondingDelegationEntry {
    /// create epoch id
    #[prost(uint64, tag = "1")]
    pub creation_epoch_id: u64,
    /// complete epoch id
    #[prost(uint64, tag = "2")]
    pub completion_epoch_id: u64,
    /// undelegate amount
    #[prost(string, tag = "3")]
    pub amount: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorVector {
    /// validator cert hash vector
    #[prost(string, repeated, tag = "1")]
    pub vector: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelegationInfo {
    /// delegate slice
    #[prost(message, repeated, tag = "1")]
    pub infos: ::prost::alloc::vec::Vec<Delegation>,
}
/// methods of DPoS stake contract
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DPoSStakeFunction {
    /// get all validator candidates
    GetAllCandidates = 0,
    /// get validator by address
    GetValidatorByAddress = 1,
    /// delegate
    Delegate = 2,
    /// get delegate by address
    GetDelegationsByAddress = 3,
    /// get user delegation by validator
    GetUserDelegationByValidator = 4,
    /// undelegate
    Undelegate = 5,
    /// read epoch by id
    ReadEpochById = 6,
    /// read latest epoch
    ReadLatestEpoch = 7,
    /// set node id before join network
    SetNodeId = 8,
    /// get node id after join network
    GetNodeId = 9,
    /// update min self delegation
    UpdateMinSelfDelegation = 10,
    /// read min self delegation
    ReadMinSelfDelegation = 11,
    /// update epoch validator number
    UpdateEpochValidatorNumber = 12,
    /// read epoch validator number
    ReadEpochValidatorNumber = 13,
    /// update epoch block number
    UpdateEpochBlockNumber = 14,
    /// read epoch block number
    ReadEpochBlockNumber = 15,
    /// read complete unbounding epoch number
    ReadCompleteUnboundingEpochNumber = 16,
    /// read system contract address
    ReadSystemContractAddr = 18,
}
impl DPoSStakeFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            DPoSStakeFunction::GetAllCandidates => "GET_ALL_CANDIDATES",
            DPoSStakeFunction::GetValidatorByAddress => "GET_VALIDATOR_BY_ADDRESS",
            DPoSStakeFunction::Delegate => "DELEGATE",
            DPoSStakeFunction::GetDelegationsByAddress => "GET_DELEGATIONS_BY_ADDRESS",
            DPoSStakeFunction::GetUserDelegationByValidator => "GET_USER_DELEGATION_BY_VALIDATOR",
            DPoSStakeFunction::Undelegate => "UNDELEGATE",
            DPoSStakeFunction::ReadEpochById => "READ_EPOCH_BY_ID",
            DPoSStakeFunction::ReadLatestEpoch => "READ_LATEST_EPOCH",
            DPoSStakeFunction::SetNodeId => "SET_NODE_ID",
            DPoSStakeFunction::GetNodeId => "GET_NODE_ID",
            DPoSStakeFunction::UpdateMinSelfDelegation => "UPDATE_MIN_SELF_DELEGATION",
            DPoSStakeFunction::ReadMinSelfDelegation => "READ_MIN_SELF_DELEGATION",
            DPoSStakeFunction::UpdateEpochValidatorNumber => "UPDATE_EPOCH_VALIDATOR_NUMBER",
            DPoSStakeFunction::ReadEpochValidatorNumber => "READ_EPOCH_VALIDATOR_NUMBER",
            DPoSStakeFunction::UpdateEpochBlockNumber => "UPDATE_EPOCH_BLOCK_NUMBER",
            DPoSStakeFunction::ReadEpochBlockNumber => "READ_EPOCH_BLOCK_NUMBER",
            DPoSStakeFunction::ReadCompleteUnboundingEpochNumber => {
                "READ_COMPLETE_UNBOUNDING_EPOCH_NUMBER"
            }
            DPoSStakeFunction::ReadSystemContractAddr => "READ_SYSTEM_CONTRACT_ADDR",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "GET_ALL_CANDIDATES" => Some(Self::GetAllCandidates),
            "GET_VALIDATOR_BY_ADDRESS" => Some(Self::GetValidatorByAddress),
            "DELEGATE" => Some(Self::Delegate),
            "GET_DELEGATIONS_BY_ADDRESS" => Some(Self::GetDelegationsByAddress),
            "GET_USER_DELEGATION_BY_VALIDATOR" => Some(Self::GetUserDelegationByValidator),
            "UNDELEGATE" => Some(Self::Undelegate),
            "READ_EPOCH_BY_ID" => Some(Self::ReadEpochById),
            "READ_LATEST_EPOCH" => Some(Self::ReadLatestEpoch),
            "SET_NODE_ID" => Some(Self::SetNodeId),
            "GET_NODE_ID" => Some(Self::GetNodeId),
            "UPDATE_MIN_SELF_DELEGATION" => Some(Self::UpdateMinSelfDelegation),
            "READ_MIN_SELF_DELEGATION" => Some(Self::ReadMinSelfDelegation),
            "UPDATE_EPOCH_VALIDATOR_NUMBER" => Some(Self::UpdateEpochValidatorNumber),
            "READ_EPOCH_VALIDATOR_NUMBER" => Some(Self::ReadEpochValidatorNumber),
            "UPDATE_EPOCH_BLOCK_NUMBER" => Some(Self::UpdateEpochBlockNumber),
            "READ_EPOCH_BLOCK_NUMBER" => Some(Self::ReadEpochBlockNumber),
            "READ_COMPLETE_UNBOUNDING_EPOCH_NUMBER" => {
                Some(Self::ReadCompleteUnboundingEpochNumber)
            }
            "READ_SYSTEM_CONTRACT_ADDR" => Some(Self::ReadSystemContractAddr),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BondStatus {
    Bonded = 0,
    Unbonding = 1,
    Unbonded = 2,
}
impl BondStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            BondStatus::Bonded => "BONDED",
            BondStatus::Unbonding => "UNBONDING",
            BondStatus::Unbonded => "UNBONDED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "BONDED" => Some(Self::Bonded),
            "UNBONDING" => Some(Self::Unbonding),
            "UNBONDED" => Some(Self::Unbonded),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossState {
    #[prost(enumeration = "CrossTxState", tag = "1")]
    pub state: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CrossTransactionFunction {
    /// transaction execute
    Execute = 0,
    /// transaction commit
    Commit = 1,
    /// transaction rollback
    Rollback = 2,
    /// read cross id state
    ReadState = 3,
    /// save cross other transaction proof
    SaveProof = 4,
    /// read cross other transaction proof
    ReadProof = 5,
    /// arbitrate the cross transaction
    Arbitrate = 6,
}
impl CrossTransactionFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            CrossTransactionFunction::Execute => "EXECUTE",
            CrossTransactionFunction::Commit => "COMMIT",
            CrossTransactionFunction::Rollback => "ROLLBACK",
            CrossTransactionFunction::ReadState => "READ_STATE",
            CrossTransactionFunction::SaveProof => "SAVE_PROOF",
            CrossTransactionFunction::ReadProof => "READ_PROOF",
            CrossTransactionFunction::Arbitrate => "ARBITRATE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EXECUTE" => Some(Self::Execute),
            "COMMIT" => Some(Self::Commit),
            "ROLLBACK" => Some(Self::Rollback),
            "READ_STATE" => Some(Self::ReadState),
            "SAVE_PROOF" => Some(Self::SaveProof),
            "READ_PROOF" => Some(Self::ReadProof),
            "ARBITRATE" => Some(Self::Arbitrate),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CrossTxState {
    /// NON_EXIST cross id is not exist
    NonExist = 0,
    /// INIT just mark this cross is has been processed
    Init = 1,
    /// EXECUTE_OK cross tx execute successfully
    ExecuteOk = 2,
    /// EXECUTE_FAIL cross tx execute fail
    ExecuteFail = 3,
    /// COMMIT_OK cross tx commit successfully
    CommitOk = 4,
    /// COMMIT_FAIL cross tx commit fail
    CommitFail = 5,
    /// ROLLBACK_OK cross tx rollback successfully
    RollbackOk = 6,
    /// ROLLBACK_FAIL cross tx rollback fail
    RollbackFail = 7,
}
impl CrossTxState {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            CrossTxState::NonExist => "NON_EXIST",
            CrossTxState::Init => "INIT",
            CrossTxState::ExecuteOk => "EXECUTE_OK",
            CrossTxState::ExecuteFail => "EXECUTE_FAIL",
            CrossTxState::CommitOk => "COMMIT_OK",
            CrossTxState::CommitFail => "COMMIT_FAIL",
            CrossTxState::RollbackOk => "ROLLBACK_OK",
            CrossTxState::RollbackFail => "ROLLBACK_FAIL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NON_EXIST" => Some(Self::NonExist),
            "INIT" => Some(Self::Init),
            "EXECUTE_OK" => Some(Self::ExecuteOk),
            "EXECUTE_FAIL" => Some(Self::ExecuteFail),
            "COMMIT_OK" => Some(Self::CommitOk),
            "COMMIT_FAIL" => Some(Self::CommitFail),
            "ROLLBACK_OK" => Some(Self::RollbackOk),
            "ROLLBACK_FAIL" => Some(Self::RollbackFail),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CrossArbitrateCmd {
    /// AUTO_CMD automatic processing according to the process
    AutoCmd = 0,
    /// EXECUTE_CMD execute the execution flow
    ExecuteCmd = 1,
    /// COMMIT_CMD execute the commit flow
    CommitCmd = 2,
    /// COMMIT_CMD execute the rollback flow
    RollbackCmd = 3,
}
impl CrossArbitrateCmd {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            CrossArbitrateCmd::AutoCmd => "AUTO_CMD",
            CrossArbitrateCmd::ExecuteCmd => "EXECUTE_CMD",
            CrossArbitrateCmd::CommitCmd => "COMMIT_CMD",
            CrossArbitrateCmd::RollbackCmd => "ROLLBACK_CMD",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AUTO_CMD" => Some(Self::AutoCmd),
            "EXECUTE_CMD" => Some(Self::ExecuteCmd),
            "COMMIT_CMD" => Some(Self::CommitCmd),
            "ROLLBACK_CMD" => Some(Self::RollbackCmd),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CallType {
    Direct = 0,
    Cross = 1,
}
impl CallType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            CallType::Direct => "DIRECT",
            CallType::Cross => "CROSS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "DIRECT" => Some(Self::Direct),
            "CROSS" => Some(Self::Cross),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CrossParams {
    Creator = 0,
    Sender = 1,
    CallType = 2,
}
impl CrossParams {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            CrossParams::Creator => "CREATOR",
            CrossParams::Sender => "SENDER",
            CrossParams::CallType => "CALL_TYPE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CREATOR" => Some(Self::Creator),
            "SENDER" => Some(Self::Sender),
            "CALL_TYPE" => Some(Self::CallType),
            _ => None,
        }
    }
}
/// methods of chain config contract
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ChainConfigFunction {
    /// get chain configuration
    GetChainConfig = 0,
    /// get the latest configuration block
    /// the incoming block height must exist in the database
    GetChainConfigAt = 1,
    /// update core
    CoreUpdate = 2,
    /// update block
    BlockUpdate = 3,
    /// add trusted certificate (org_id and root)
    TrustRootAdd = 4,
    /// \[self\] modify an individual's own trusted root certificate [org_id must exist in the original trust_roots,
    /// and the new root certificate must be different from other certificates]
    TrustRootUpdate = 5,
    /// delete trusted root certificate [org_ ID should be in trust_ The nodes in nodes need to be deleted]
    TrustRootDelete = 6,
    /// organization add node address
    /// org_id must already exist in nodes,you can add addresses in batches
    /// the parameter is addresses. Single addresses are separated by ","
    /// ip+port and peerid cannot be repeated
    /// Deprecated , replace by NODE_ID_ADD
    NodeAddrAdd = 7,
    /// \[self\]the organization updates an address
    /// [org_id and address must already exist in nodes, new_address is the new address. ip+port and peerId cannot be duplicated]
    /// Deprecated , replace by NODE_ID_UPDATE
    NodeAddrUpdate = 8,
    /// organization delete node address [org_id and address must already exist in nodes]
    /// Deprecated , replace by NODE_ID_DELETE
    NodeAddrDelete = 9,
    /// organization add node address in batches \[org_id在nodes不存在,批量添加地址,参数为node_ids,单地址用逗号","隔开。nodeId不能重复\]
    NodeOrgAdd = 10,
    /// organization update
    /// org_id must already exist in nodes,the parameter is addresses,Single addresses are separated by ","
    /// ip+port and peerid cannot be repeated
    NodeOrgUpdate = 11,
    /// organization delete, org_id must already exist in nodes
    NodeOrgDelete = 12,
    /// add consensus parameters, key is not exit in ext_config
    ConsensusExtAdd = 13,
    /// update onsensus parameters, key exit in ext_config
    ConsensusExtUpdate = 14,
    /// delete onsensus parameters, key exit in ext_config
    ConsensusExtDelete = 15,
    /// add permission
    PermissionAdd = 16,
    /// update permission
    PermissionUpdate = 17,
    /// delete permission
    PermissionDelete = 18,
    /// organization add node_id
    /// org_id must already exist in nodes,you can add node_id in batches
    /// the parameter is node_ids. Single node_ids are separated by ","
    /// node_id cannot be repeated
    NodeIdAdd = 19,
    /// \[self\]the organization updates a node_ids
    /// [org_id and node_ids must already exist in nodes, new_node_id is the new node_id. node_id cannot be duplicated]
    NodeIdUpdate = 20,
    /// organization delete node_id [org_id and node_id must already exist in nodes]
    NodeIdDelete = 21,
    /// add trusted member (org_id signcert role  node_id)
    TrustMemberAdd = 22,
    /// \[self\] modify an individual's own trusted member [node_id must exist in the original trust_members,
    /// and the new trust member must be different from other trust members]
    TrustMemberUpdate = 23,
    /// delete trusted member certificate [node_ ID should be in trust_ The nodes in nodes need to be deleted]
    TrustMemberDelete = 24,
    /// alter address type
    AlterAddrType = 25,
    /// able or enable gas calc
    EnableOrDisableGas = 26,
    /// set invoke base gas
    SetInvokeBaseGas = 27,
    /// set account manager admin
    SetAccountManagerAdmin = 28,
    /// list permissions
    PermissionList = 29,
    /// update version
    UpdateVersion = 30,
    /// update `enable_manual_run` flag of multi sign
    MultiSignEnableManualRun = 31,
    /// enable only_creator_can_upgrade
    EnableOnlyCreatorUpgrade = 32,
    /// disable only_creator_can_upgrade
    DisableOnlyCreatorUpgrade = 33,
    /// set invoke gas price, continued with NO. `27`
    SetInvokeGasPrice = 34,
    /// set install base price
    SetInstallBaseGas = 35,
    /// set install gas price
    SetInstallGasPrice = 36,
}
impl ChainConfigFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            ChainConfigFunction::GetChainConfig => "GET_CHAIN_CONFIG",
            ChainConfigFunction::GetChainConfigAt => "GET_CHAIN_CONFIG_AT",
            ChainConfigFunction::CoreUpdate => "CORE_UPDATE",
            ChainConfigFunction::BlockUpdate => "BLOCK_UPDATE",
            ChainConfigFunction::TrustRootAdd => "TRUST_ROOT_ADD",
            ChainConfigFunction::TrustRootUpdate => "TRUST_ROOT_UPDATE",
            ChainConfigFunction::TrustRootDelete => "TRUST_ROOT_DELETE",
            ChainConfigFunction::NodeAddrAdd => "NODE_ADDR_ADD",
            ChainConfigFunction::NodeAddrUpdate => "NODE_ADDR_UPDATE",
            ChainConfigFunction::NodeAddrDelete => "NODE_ADDR_DELETE",
            ChainConfigFunction::NodeOrgAdd => "NODE_ORG_ADD",
            ChainConfigFunction::NodeOrgUpdate => "NODE_ORG_UPDATE",
            ChainConfigFunction::NodeOrgDelete => "NODE_ORG_DELETE",
            ChainConfigFunction::ConsensusExtAdd => "CONSENSUS_EXT_ADD",
            ChainConfigFunction::ConsensusExtUpdate => "CONSENSUS_EXT_UPDATE",
            ChainConfigFunction::ConsensusExtDelete => "CONSENSUS_EXT_DELETE",
            ChainConfigFunction::PermissionAdd => "PERMISSION_ADD",
            ChainConfigFunction::PermissionUpdate => "PERMISSION_UPDATE",
            ChainConfigFunction::PermissionDelete => "PERMISSION_DELETE",
            ChainConfigFunction::NodeIdAdd => "NODE_ID_ADD",
            ChainConfigFunction::NodeIdUpdate => "NODE_ID_UPDATE",
            ChainConfigFunction::NodeIdDelete => "NODE_ID_DELETE",
            ChainConfigFunction::TrustMemberAdd => "TRUST_MEMBER_ADD",
            ChainConfigFunction::TrustMemberUpdate => "TRUST_MEMBER_UPDATE",
            ChainConfigFunction::TrustMemberDelete => "TRUST_MEMBER_DELETE",
            ChainConfigFunction::AlterAddrType => "ALTER_ADDR_TYPE",
            ChainConfigFunction::EnableOrDisableGas => "ENABLE_OR_DISABLE_GAS",
            ChainConfigFunction::SetInvokeBaseGas => "SET_INVOKE_BASE_GAS",
            ChainConfigFunction::SetAccountManagerAdmin => "SET_ACCOUNT_MANAGER_ADMIN",
            ChainConfigFunction::PermissionList => "PERMISSION_LIST",
            ChainConfigFunction::UpdateVersion => "UPDATE_VERSION",
            ChainConfigFunction::MultiSignEnableManualRun => "MULTI_SIGN_ENABLE_MANUAL_RUN",
            ChainConfigFunction::EnableOnlyCreatorUpgrade => "ENABLE_ONLY_CREATOR_UPGRADE",
            ChainConfigFunction::DisableOnlyCreatorUpgrade => "DISABLE_ONLY_CREATOR_UPGRADE",
            ChainConfigFunction::SetInvokeGasPrice => "SET_INVOKE_GAS_PRICE",
            ChainConfigFunction::SetInstallBaseGas => "SET_INSTALL_BASE_GAS",
            ChainConfigFunction::SetInstallGasPrice => "SET_INSTALL_GAS_PRICE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "GET_CHAIN_CONFIG" => Some(Self::GetChainConfig),
            "GET_CHAIN_CONFIG_AT" => Some(Self::GetChainConfigAt),
            "CORE_UPDATE" => Some(Self::CoreUpdate),
            "BLOCK_UPDATE" => Some(Self::BlockUpdate),
            "TRUST_ROOT_ADD" => Some(Self::TrustRootAdd),
            "TRUST_ROOT_UPDATE" => Some(Self::TrustRootUpdate),
            "TRUST_ROOT_DELETE" => Some(Self::TrustRootDelete),
            "NODE_ADDR_ADD" => Some(Self::NodeAddrAdd),
            "NODE_ADDR_UPDATE" => Some(Self::NodeAddrUpdate),
            "NODE_ADDR_DELETE" => Some(Self::NodeAddrDelete),
            "NODE_ORG_ADD" => Some(Self::NodeOrgAdd),
            "NODE_ORG_UPDATE" => Some(Self::NodeOrgUpdate),
            "NODE_ORG_DELETE" => Some(Self::NodeOrgDelete),
            "CONSENSUS_EXT_ADD" => Some(Self::ConsensusExtAdd),
            "CONSENSUS_EXT_UPDATE" => Some(Self::ConsensusExtUpdate),
            "CONSENSUS_EXT_DELETE" => Some(Self::ConsensusExtDelete),
            "PERMISSION_ADD" => Some(Self::PermissionAdd),
            "PERMISSION_UPDATE" => Some(Self::PermissionUpdate),
            "PERMISSION_DELETE" => Some(Self::PermissionDelete),
            "NODE_ID_ADD" => Some(Self::NodeIdAdd),
            "NODE_ID_UPDATE" => Some(Self::NodeIdUpdate),
            "NODE_ID_DELETE" => Some(Self::NodeIdDelete),
            "TRUST_MEMBER_ADD" => Some(Self::TrustMemberAdd),
            "TRUST_MEMBER_UPDATE" => Some(Self::TrustMemberUpdate),
            "TRUST_MEMBER_DELETE" => Some(Self::TrustMemberDelete),
            "ALTER_ADDR_TYPE" => Some(Self::AlterAddrType),
            "ENABLE_OR_DISABLE_GAS" => Some(Self::EnableOrDisableGas),
            "SET_INVOKE_BASE_GAS" => Some(Self::SetInvokeBaseGas),
            "SET_ACCOUNT_MANAGER_ADMIN" => Some(Self::SetAccountManagerAdmin),
            "PERMISSION_LIST" => Some(Self::PermissionList),
            "UPDATE_VERSION" => Some(Self::UpdateVersion),
            "MULTI_SIGN_ENABLE_MANUAL_RUN" => Some(Self::MultiSignEnableManualRun),
            "ENABLE_ONLY_CREATOR_UPGRADE" => Some(Self::EnableOnlyCreatorUpgrade),
            "DISABLE_ONLY_CREATOR_UPGRADE" => Some(Self::DisableOnlyCreatorUpgrade),
            "SET_INVOKE_GAS_PRICE" => Some(Self::SetInvokeGasPrice),
            "SET_INSTALL_BASE_GAS" => Some(Self::SetInstallBaseGas),
            "SET_INSTALL_GAS_PRICE" => Some(Self::SetInstallGasPrice),
            _ => None,
        }
    }
}
/// methods of certificate management
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CertManageFunction {
    /// add one certificate
    CertAdd = 0,
    /// delete certificates
    CertsDelete = 1,
    /// query certificates
    CertsQuery = 2,
    /// freeze certificates
    CertsFreeze = 3,
    /// unfreeze certificates
    CertsUnfreeze = 4,
    /// revoke certificates
    CertsRevoke = 5,
    /// add one certificate alias, any
    CertAliasAdd = 6,
    /// update one certificate alias, self
    CertAliasUpdate = 7,
    /// delete certificate alias, admin
    CertsAliasDelete = 8,
    /// query certificate alias, admin
    CertsAliasQuery = 9,
}
impl CertManageFunction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            CertManageFunction::CertAdd => "CERT_ADD",
            CertManageFunction::CertsDelete => "CERTS_DELETE",
            CertManageFunction::CertsQuery => "CERTS_QUERY",
            CertManageFunction::CertsFreeze => "CERTS_FREEZE",
            CertManageFunction::CertsUnfreeze => "CERTS_UNFREEZE",
            CertManageFunction::CertsRevoke => "CERTS_REVOKE",
            CertManageFunction::CertAliasAdd => "CERT_ALIAS_ADD",
            CertManageFunction::CertAliasUpdate => "CERT_ALIAS_UPDATE",
            CertManageFunction::CertsAliasDelete => "CERTS_ALIAS_DELETE",
            CertManageFunction::CertsAliasQuery => "CERTS_ALIAS_QUERY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CERT_ADD" => Some(Self::CertAdd),
            "CERTS_DELETE" => Some(Self::CertsDelete),
            "CERTS_QUERY" => Some(Self::CertsQuery),
            "CERTS_FREEZE" => Some(Self::CertsFreeze),
            "CERTS_UNFREEZE" => Some(Self::CertsUnfreeze),
            "CERTS_REVOKE" => Some(Self::CertsRevoke),
            "CERT_ALIAS_ADD" => Some(Self::CertAliasAdd),
            "CERT_ALIAS_UPDATE" => Some(Self::CertAliasUpdate),
            "CERTS_ALIAS_DELETE" => Some(Self::CertsAliasDelete),
            "CERTS_ALIAS_QUERY" => Some(Self::CertsAliasQuery),
            _ => None,
        }
    }
}