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
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
|
library;
// Are we memory safe?
// There is a simple way to check that:
// 1) Rewrite everything in rust
// Or, assuming we are sane
// 1) grep -E 'toNative|^String ' lib/wownero.dart | grep -v '^//' | grep -v '^String libPath = ' | wc -l
// This will print number of all things that produce pointers
// 2) grep .free lib/wownero.dart | grep -v '^//' | wc -l
// This will print number of all free calls, these numbers should match
// Wrapper around generated_bindings.g.dart - to provide easy access to the
// underlying functions, feel free to not use it at all.
// _____________ PendingTransaction is just a typedef for Pointer<Void> (which is void* on C side)
// / _____________ Wallet class, we didn't specify the MONERO prefix because we import the monero.dart code with monero prefix
// | / _____________ createTransaction function, from the upstream in the class Wallet
// | | /
// PendingTransaction Wallet_createTransaction(wallet ptr, <------------- wallet is a typedef for Pointer<Void>
// {required String dst_addr,--------------------------------\ All of the parameters that are used in this function
// required String payment_id, _____________/ String - will get casted into const char*
// required int amount, /
// required int mixin_count, / int - goes as it is
// required int pendingTransactionPriority, /
// required int subaddr_account, /
// List<String> preferredInputs = const []}) { List<String> - gets joined and passed as 2 separate parameters to be split in the C side____
// debugStart?.call('WOWNERO_Wallet_createTransaction'); <------------- debugStart functions just marks the function as currently being executed, used |
// lib ??= WowneroC(DynamicLibrary.open(libPath)); \_for performance debugging |
// \_____________ Load the library in case it is not loaded |
// final dst_addr_ = dst_addr.toNativeUtf8().cast<Char>(); -----------------| Cast the strings into Chars so it can be used as a parameter in a function |
// final payment_id_ = payment_id.toNativeUtf8().cast<Char>(); -------------| generated via ffigen |
// final preferredInputs_ = preferredInputs.join(defaultSeparatorStr).toNativeUtf8().cast<Char>(); <---------------------------------------------------------/
// final s = lib!.WOWNERO_Wallet_createTransaction(-------------|
// ptr, |
// dst_addr_, |
// payment_id_, |
// amount, |
// mixin_count, | Call the native function using generated code
// pendingTransactionPriority, |
// subaddr_account, |
// preferredInputs_, |
// defaultSeparator, |
// );___________________________________________________________/
// calloc.free(dst_addr_);---------------| Free the memory once we don't need it
// calloc.free(payment_id_);-------------|
// debugEnd?.call('WOWNERO_Wallet_createTransaction'); <------------- Mark the function as executed
// return s; <------------- return the value
// }
//
// Extra case is happening when we have a function call that returns const char* as we have to be memory safe
// String PendingTransaction_txid(PendingTransaction ptr, String separator) {
// debugStart?.call('WOWNERO_PendingTransaction_txid');
// lib ??= WowneroC(DynamicLibrary.open(libPath));
// final separator_ = separator.toNativeUtf8().cast<Char>();
// final txid = lib!.WOWNERO_PendingTransaction_txid(ptr, separator_);
// calloc.free(separator_);
// debugEnd?.call('WOWNERO_PendingTransaction_txid');
// try { <------------- We need to try-catch these calls because they may fail in an unlikely case when we get an invalid UTF-8 string,
// final strPtr = txid.cast<Utf8>(); it is better to throw than to crash main isolate imo.
// final str = strPtr.toDartString(); <------------- convert the pointer to const char* to dart String
// WOWNERO_free(strPtr.cast()); <------------- free the memory
// debugEnd?.call('WOWNERO_PendingTransaction_txid');
// return str; <------------- return the value
// } catch (e) {
// errorHandler?.call('WOWNERO_PendingTransaction_txid', e);
// debugEnd?.call('WOWNERO_PendingTransaction_txid');
// return ""; <------------- return an empty string in case of an error.
// }
// }
//
// ignore_for_file: non_constant_identifier_names, camel_case_types
import 'dart:ffi';
import 'dart:io';
import 'package:ffi/ffi.dart';
import 'package:monero/src/generated_bindings_wownero.g.dart';
export 'src/checksum_wownero.dart';
typedef PendingTransaction = Pointer<Void>;
WowneroC? lib;
String libPath = (() {
if (Platform.isWindows) return 'wownero_libwallet2_api_c.dll';
if (Platform.isMacOS) return 'wownero_libwallet2_api_c.dylib';
if (Platform.isIOS) return 'WowneroWallet.framework/WowneroWallet';
if (Platform.isAndroid) return 'libwownero_libwallet2_api_c.so';
return 'wownero_libwallet2_api_c.so';
})();
Map<String, List<int>> debugCallLength = {};
final defaultSeparatorStr = ";";
final defaultSeparator = defaultSeparatorStr.toNativeUtf8().cast<Char>();
/* we don't call .free here, this comment serves one purpose - so the numbers match :) */
final Stopwatch sw = Stopwatch()..start();
bool printStarts = false;
void Function(String call)? debugStart = (call) {
if (printStarts) print("MONERO: $call");
debugCallLength[call] ??= <int>[];
debugCallLength[call]!.add(sw.elapsedMicroseconds);
};
void Function(String call)? debugEnd = (call) {
final id = debugCallLength[call]!.length - 1;
debugCallLength[call]![id] =
sw.elapsedMicroseconds - debugCallLength[call]![id];
};
void Function(String call, dynamic error)? errorHandler = (call, error) {
print("$call: $error");
};
int PendingTransaction_status(PendingTransaction ptr) {
debugStart?.call('WOWNERO_PendingTransaction_status');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_PendingTransaction_status(ptr);
debugEnd?.call('WOWNERO_PendingTransaction_status');
return status;
}
String PendingTransaction_errorString(PendingTransaction ptr) {
lib ??= WowneroC(DynamicLibrary.open(libPath));
debugStart?.call('WOWNERO_PendingTransaction_errorString');
try {
final rPtr = lib!.WOWNERO_PendingTransaction_errorString(ptr).cast<Utf8>();
final str = rPtr.toDartString();
WOWNERO_free(rPtr.cast());
debugEnd?.call('WOWNERO_PendingTransaction_errorString');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_PendingTransaction_errorString', e);
debugEnd?.call('WOWNERO_PendingTransaction_errorString');
return "";
}
}
bool PendingTransaction_commit(PendingTransaction ptr,
{required String filename, required bool overwrite}) {
debugStart?.call('WOWNERO_PendingTransaction_commit');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final filename_ = filename.toNativeUtf8().cast<Char>();
final result =
lib!.WOWNERO_PendingTransaction_commit(ptr, filename_, overwrite);
calloc.free(filename_);
debugEnd?.call('WOWNERO_PendingTransaction_commit');
return result;
}
int PendingTransaction_amount(PendingTransaction ptr) {
debugStart?.call('WOWNERO_PendingTransaction_amount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final amount = lib!.WOWNERO_PendingTransaction_amount(ptr);
debugStart?.call('WOWNERO_PendingTransaction_amount');
return amount;
}
int PendingTransaction_dust(PendingTransaction ptr) {
debugStart?.call('WOWNERO_PendingTransaction_dust');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final dust = lib!.WOWNERO_PendingTransaction_dust(ptr);
debugStart?.call('WOWNERO_PendingTransaction_dust');
return dust;
}
int PendingTransaction_fee(PendingTransaction ptr) {
debugStart?.call('WOWNERO_PendingTransaction_fee');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final fee = lib!.WOWNERO_PendingTransaction_fee(ptr);
debugEnd?.call('WOWNERO_PendingTransaction_fee');
return fee;
}
String PendingTransaction_txid(PendingTransaction ptr, String separator) {
debugStart?.call('WOWNERO_PendingTransaction_txid');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final separator_ = separator.toNativeUtf8().cast<Char>();
final txid = lib!.WOWNERO_PendingTransaction_txid(ptr, separator_);
calloc.free(separator_);
debugEnd?.call('WOWNERO_PendingTransaction_txid');
try {
final strPtr = txid.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_PendingTransaction_txid');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_PendingTransaction_txid', e);
debugEnd?.call('WOWNERO_PendingTransaction_txid');
return "";
}
}
int PendingTransaction_txCount(PendingTransaction ptr) {
debugStart?.call('WOWNERO_PendingTransaction_txCount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final txCount = lib!.WOWNERO_PendingTransaction_txCount(ptr);
debugEnd?.call('WOWNERO_PendingTransaction_txCount');
return txCount;
}
String PendingTransaction_subaddrAccount(
PendingTransaction ptr, String separator) {
debugStart?.call('WOWNERO_PendingTransaction_subaddrAccount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final separator_ = separator.toNativeUtf8().cast<Char>();
final txid = lib!.WOWNERO_PendingTransaction_subaddrAccount(ptr, separator_);
calloc.free(separator_);
debugEnd?.call('WOWNERO_PendingTransaction_subaddrAccount');
try {
final strPtr = txid.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_PendingTransaction_subaddrAccount');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_PendingTransaction_subaddrAccount', e);
debugEnd?.call('WOWNERO_PendingTransaction_subaddrAccount');
return "";
}
}
String PendingTransaction_subaddrIndices(
PendingTransaction ptr, String separator) {
debugStart?.call('WOWNERO_PendingTransaction_subaddrIndices');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final separator_ = separator.toNativeUtf8().cast<Char>();
final txid = lib!.WOWNERO_PendingTransaction_subaddrIndices(ptr, separator_);
calloc.free(separator_);
debugEnd?.call('WOWNERO_PendingTransaction_subaddrIndices');
try {
final strPtr = txid.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_PendingTransaction_subaddrIndices');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_PendingTransaction_subaddrIndices', e);
debugEnd?.call('WOWNERO_PendingTransaction_subaddrIndices');
return "";
}
}
String PendingTransaction_multisigSignData(PendingTransaction ptr) {
debugStart?.call('WOWNERO_PendingTransaction_multisigSignData');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final txid = lib!.WOWNERO_PendingTransaction_multisigSignData(ptr);
debugEnd?.call('WOWNERO_PendingTransaction_multisigSignData');
try {
final strPtr = txid.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_PendingTransaction_multisigSignData');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_PendingTransaction_multisigSignData', e);
debugEnd?.call('WOWNERO_PendingTransaction_multisigSignData');
return "";
}
}
void PendingTransaction_signMultisigTx(PendingTransaction ptr) {
debugStart?.call('WOWNERO_PendingTransaction_signMultisigTx');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final ret = lib!.WOWNERO_PendingTransaction_signMultisigTx(ptr);
debugEnd?.call('WOWNERO_PendingTransaction_signMultisigTx');
return ret;
}
String PendingTransaction_signersKeys(
PendingTransaction ptr, String separator) {
debugStart?.call('WOWNERO_PendingTransaction_signersKeys');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final separator_ = separator.toNativeUtf8().cast<Char>();
final txid = lib!.WOWNERO_PendingTransaction_signersKeys(ptr, separator_);
calloc.free(separator_);
debugEnd?.call('WOWNERO_PendingTransaction_signersKeys');
try {
final strPtr = txid.cast<Utf8>();
final str = strPtr.toDartString();
debugEnd?.call('WOWNERO_PendingTransaction_signersKeys');
WOWNERO_free(strPtr.cast());
return str;
} catch (e) {
errorHandler?.call('WOWNERO_PendingTransaction_signersKeys', e);
debugEnd?.call('WOWNERO_PendingTransaction_signersKeys');
return "";
}
}
String PendingTransaction_hex(PendingTransaction ptr, String separator) {
debugStart?.call('WOWNERO_PendingTransaction_hex');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final separator_ = separator.toNativeUtf8().cast<Char>();
final txid = lib!.WOWNERO_PendingTransaction_hex(ptr, separator_);
calloc.free(separator_);
debugEnd?.call('WOWNERO_PendingTransaction_hex');
try {
final strPtr = txid.cast<Utf8>();
final str = strPtr.toDartString();
debugEnd?.call('WOWNERO_PendingTransaction_hex');
WOWNERO_free(strPtr.cast());
return str;
} catch (e) {
errorHandler?.call('WOWNERO_PendingTransaction_hex', e);
debugEnd?.call('WOWNERO_PendingTransaction_hex');
return "";
}
}
// UnsignedTransaction
typedef UnsignedTransaction = Pointer<Void>;
int UnsignedTransaction_status(UnsignedTransaction ptr) {
debugStart?.call('WOWNERO_UnsignedTransaction_status');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final dust = lib!.WOWNERO_UnsignedTransaction_status(ptr);
debugStart?.call('WOWNERO_UnsignedTransaction_status');
return dust;
}
String UnsignedTransaction_errorString(UnsignedTransaction ptr) {
debugStart?.call('WOWNERO_UnsignedTransaction_errorString');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final errorString = lib!.WOWNERO_UnsignedTransaction_errorString(ptr);
try {
final strPtr = errorString.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_UnsignedTransaction_errorString');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_UnsignedTransaction_errorString', e);
debugEnd?.call('WOWNERO_UnsignedTransaction_errorString');
return "";
}
}
String UnsignedTransaction_amount(UnsignedTransaction ptr) {
debugStart?.call('WOWNERO_UnsignedTransaction_amount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final errorString =
lib!.WOWNERO_UnsignedTransaction_amount(ptr, defaultSeparator);
try {
final strPtr = errorString.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_UnsignedTransaction_amount');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_UnsignedTransaction_amount', e);
debugEnd?.call('WOWNERO_UnsignedTransaction_amount');
return "";
}
}
String UnsignedTransaction_fee(UnsignedTransaction ptr) {
debugStart?.call('WOWNERO_UnsignedTransaction_fee');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final errorString =
lib!.WOWNERO_UnsignedTransaction_fee(ptr, defaultSeparator);
try {
final strPtr = errorString.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_UnsignedTransaction_fee');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_UnsignedTransaction_fee', e);
debugEnd?.call('WOWNERO_UnsignedTransaction_fee');
return "";
}
}
String UnsignedTransaction_mixin(UnsignedTransaction ptr) {
debugStart?.call('WOWNERO_UnsignedTransaction_mixin');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final errorString =
lib!.WOWNERO_UnsignedTransaction_mixin(ptr, defaultSeparator);
try {
final strPtr = errorString.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_UnsignedTransaction_mixin');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_UnsignedTransaction_mixin', e);
debugEnd?.call('WOWNERO_UnsignedTransaction_mixin');
return "";
}
}
String UnsignedTransaction_confirmationMessage(UnsignedTransaction ptr) {
debugStart?.call('WOWNERO_UnsignedTransaction_confirmationMessage');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final errorString = lib!.WOWNERO_UnsignedTransaction_confirmationMessage(ptr);
try {
final strPtr = errorString.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_UnsignedTransaction_confirmationMessage');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_UnsignedTransaction_confirmationMessage', e);
debugEnd?.call('WOWNERO_UnsignedTransaction_confirmationMessage');
return "";
}
}
String UnsignedTransaction_paymentId(UnsignedTransaction ptr) {
debugStart?.call('WOWNERO_UnsignedTransaction_paymentId');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final errorString =
lib!.WOWNERO_UnsignedTransaction_paymentId(ptr, defaultSeparator);
try {
final strPtr = errorString.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_UnsignedTransaction_paymentId');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_UnsignedTransaction_paymentId', e);
debugEnd?.call('WOWNERO_UnsignedTransaction_paymentId');
return "";
}
}
String UnsignedTransaction_recipientAddress(UnsignedTransaction ptr) {
debugStart?.call('WOWNERO_UnsignedTransaction_recipientAddress');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final errorString =
lib!.WOWNERO_UnsignedTransaction_recipientAddress(ptr, defaultSeparator);
try {
final strPtr = errorString.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_UnsignedTransaction_recipientAddress');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_UnsignedTransaction_recipientAddress', e);
debugEnd?.call('WOWNERO_UnsignedTransaction_recipientAddress');
return "";
}
}
int UnsignedTransaction_minMixinCount(UnsignedTransaction ptr) {
debugStart?.call('WOWNERO_UnsignedTransaction_minMixinCount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_UnsignedTransaction_minMixinCount(ptr);
debugStart?.call('WOWNERO_UnsignedTransaction_minMixinCount');
return v;
}
int UnsignedTransaction_txCount(UnsignedTransaction ptr) {
debugStart?.call('WOWNERO_UnsignedTransaction_txCount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_UnsignedTransaction_txCount(ptr);
debugStart?.call('WOWNERO_UnsignedTransaction_txCount');
return v;
}
bool UnsignedTransaction_sign(UnsignedTransaction ptr, String signedFileName) {
debugStart?.call('WOWNERO_UnsignedTransaction_sign');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final signedFileName_ = signedFileName.toNativeUtf8().cast<Char>();
final v = lib!.WOWNERO_UnsignedTransaction_sign(ptr, signedFileName_);
calloc.free(signedFileName_);
debugStart?.call('WOWNERO_UnsignedTransaction_sign');
return v;
}
// TransactionInfo
typedef TransactionInfo = Pointer<Void>;
enum TransactionInfo_Direction { In, Out }
TransactionInfo_Direction TransactionInfo_direction(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_direction');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final tiDir = TransactionInfo_Direction
.values[lib!.WOWNERO_TransactionInfo_direction(ptr)];
debugEnd?.call('WOWNERO_TransactionInfo_direction');
return tiDir;
}
bool TransactionInfo_isPending(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_isPending');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final isPending = lib!.WOWNERO_TransactionInfo_isPending(ptr);
debugEnd?.call('WOWNERO_TransactionInfo_isPending');
return isPending;
}
bool TransactionInfo_isFailed(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_isFailed');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final isFailed = lib!.WOWNERO_TransactionInfo_isFailed(ptr);
debugEnd?.call('WOWNERO_TransactionInfo_isFailed');
return isFailed;
}
bool TransactionInfo_isCoinbase(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_isCoinbase');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final isCoinbase = lib!.WOWNERO_TransactionInfo_isCoinbase(ptr);
debugEnd?.call('WOWNERO_TransactionInfo_isCoinbase');
return isCoinbase;
}
int TransactionInfo_amount(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_amount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final amount = lib!.WOWNERO_TransactionInfo_amount(ptr);
debugEnd?.call('WOWNERO_TransactionInfo_amount');
return amount;
}
int TransactionInfo_fee(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_fee');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final fee = lib!.WOWNERO_TransactionInfo_fee(ptr);
debugEnd?.call('WOWNERO_TransactionInfo_fee');
return fee;
}
int TransactionInfo_blockHeight(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_blockHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final blockHeight = lib!.WOWNERO_TransactionInfo_blockHeight(ptr);
debugEnd?.call('WOWNERO_TransactionInfo_blockHeight');
return blockHeight;
}
String TransactionInfo_description(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_description');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_TransactionInfo_description(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_TransactionInfo_description');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_TransactionInfo_description', e);
return "";
}
}
String TransactionInfo_subaddrIndex(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_subaddrIndex');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_TransactionInfo_subaddrIndex(ptr, defaultSeparator)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_TransactionInfo_subaddrIndex');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_TransactionInfo_subaddrIndex', e);
return "";
}
}
int TransactionInfo_subaddrAccount(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_subaddrAccount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final subaddrAccount = lib!.WOWNERO_TransactionInfo_subaddrAccount(ptr);
debugEnd?.call('WOWNERO_TransactionInfo_subaddrAccount');
return subaddrAccount;
}
String TransactionInfo_label(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_label');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_TransactionInfo_label(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_TransactionInfo_label');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_TransactionInfo_label', e);
debugEnd?.call('WOWNERO_TransactionInfo_label');
return "";
}
}
int TransactionInfo_confirmations(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_confirmations');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final confirmations = lib!.WOWNERO_TransactionInfo_confirmations(ptr);
debugEnd?.call('WOWNERO_TransactionInfo_confirmations');
return confirmations;
}
int TransactionInfo_unlockTime(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_unlockTime');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final unlockTime = lib!.WOWNERO_TransactionInfo_unlockTime(ptr);
debugEnd?.call('WOWNERO_TransactionInfo_unlockTime');
return unlockTime;
}
String TransactionInfo_hash(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_hash');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_TransactionInfo_hash(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_TransactionInfo_hash');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_TransactionInfo_hash', e);
debugEnd?.call('WOWNERO_TransactionInfo_hash');
return "";
}
}
int TransactionInfo_timestamp(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_timestamp');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final timestamp = lib!.WOWNERO_TransactionInfo_timestamp(ptr);
debugEnd?.call('WOWNERO_TransactionInfo_timestamp');
return timestamp;
}
String TransactionInfo_paymentId(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_paymentId');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_TransactionInfo_paymentId(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_TransactionInfo_paymentId');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_TransactionInfo_paymentId', e);
debugEnd?.call('WOWNERO_TransactionInfo_paymentId');
return "";
}
}
int TransactionInfo_transfers_count(TransactionInfo ptr) {
debugStart?.call('WOWNERO_TransactionInfo_transfers_count');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_TransactionInfo_transfers_count(ptr);
debugEnd?.call('WOWNERO_TransactionInfo_transfers_count');
return v;
}
int TransactionInfo_transfers_amount(TransactionInfo ptr, int index) {
debugStart?.call('WOWNERO_TransactionInfo_transfers_amount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_TransactionInfo_transfers_amount(ptr, index);
debugEnd?.call('WOWNERO_TransactionInfo_transfers_amount');
return v;
}
String TransactionInfo_transfers_address(TransactionInfo ptr, int index) {
debugStart?.call('WOWNERO_TransactionInfo_transfers_address');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr =
lib!.WOWNERO_TransactionInfo_transfers_address(ptr, index).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_TransactionInfo_transfers_address');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_TransactionInfo_transfers_address', e);
debugEnd?.call('WOWNERO_TransactionInfo_transfers_address');
return "";
}
}
// TransactionHistory
typedef TransactionHistory = Pointer<Void>;
int TransactionHistory_count(TransactionHistory txHistory_ptr) {
debugStart?.call('WOWNERO_TransactionHistory_count');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final count = lib!.WOWNERO_TransactionHistory_count(txHistory_ptr);
debugEnd?.call('WOWNERO_TransactionHistory_count');
return count;
}
TransactionInfo TransactionHistory_transaction(TransactionHistory txHistory_ptr,
{required int index}) {
debugStart?.call('WOWNERO_TransactionHistory_transaction');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final transaction =
lib!.WOWNERO_TransactionHistory_transaction(txHistory_ptr, index);
debugEnd?.call('WOWNERO_TransactionHistory_transaction');
return transaction;
}
TransactionInfo TransactionHistory_transactionById(
TransactionHistory txHistory_ptr,
{required String txid}) {
debugStart?.call('WOWNERO_TransactionHistory_transactionById');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final txid_ = txid.toNativeUtf8().cast<Char>();
final transaction =
lib!.WOWNERO_TransactionHistory_transactionById(txHistory_ptr, txid_);
calloc.free(txid_);
debugEnd?.call('WOWNERO_TransactionHistory_transactionById');
return transaction;
}
void TransactionHistory_refresh(TransactionHistory txHistory_ptr) {
lib ??= WowneroC(DynamicLibrary.open(libPath));
return lib!.WOWNERO_TransactionHistory_refresh(txHistory_ptr);
}
void TransactionHistory_setTxNote(TransactionHistory txHistory_ptr,
{required String txid, required String note}) {
debugStart?.call('WOWNERO_TransactionHistory_setTxNote');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final txid_ = txid.toNativeUtf8().cast<Char>();
final note_ = note.toNativeUtf8().cast<Char>();
final s =
lib!.WOWNERO_TransactionHistory_setTxNote(txHistory_ptr, txid_, note_);
calloc.free(txid_);
calloc.free(note_);
debugEnd?.call('WOWNERO_TransactionHistory_setTxNote');
return s;
}
// AddresBookRow
typedef AddressBookRow = Pointer<Void>;
String AddressBookRow_extra(AddressBookRow addressBookRow_ptr) {
debugStart?.call('WOWNERO_AddressBookRow_extra');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr =
lib!.WOWNERO_AddressBookRow_extra(addressBookRow_ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_AddressBookRow_extra');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_AddressBookRow_extra', e);
debugEnd?.call('WOWNERO_AddressBookRow_extra');
return "";
}
}
String AddressBookRow_getAddress(AddressBookRow addressBookRow_ptr) {
debugStart?.call('WOWNERO_AddressBookRow_getAddress');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr =
lib!.WOWNERO_AddressBookRow_getAddress(addressBookRow_ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_AddressBookRow_getAddress');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_AddressBookRow_getAddress', e);
debugEnd?.call('WOWNERO_AddressBookRow_getAddress');
return "";
}
}
String AddressBookRow_getDescription(AddressBookRow addressBookRow_ptr) {
debugStart?.call('WOWNERO_AddressBookRow_getDescription');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_AddressBookRow_getDescription(addressBookRow_ptr)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_AddressBookRow_getDescription');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_AddressBookRow_getDescription', e);
debugEnd?.call('WOWNERO_AddressBookRow_getDescription');
return "";
}
}
String AddressBookRow_getPaymentId(AddressBookRow addressBookRow_ptr) {
debugStart?.call('WOWNERO_AddressBookRow_getPaymentId');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_AddressBookRow_getPaymentId(addressBookRow_ptr)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_AddressBookRow_getPaymentId');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_AddressBookRow_getPaymentId', e);
debugEnd?.call('WOWNERO_AddressBookRow_getPaymentId');
return "";
}
}
int AddressBookRow_getRowId(AddressBookRow addressBookRow_ptr) {
debugStart?.call('WOWNERO_AddressBookRow_getRowId');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_AddressBookRow_getRowId(addressBookRow_ptr);
debugEnd?.call('WOWNERO_AddressBookRow_getRowId');
return v;
}
// AddressBook
typedef AddressBook = Pointer<Void>;
int AddressBook_getAll_size(AddressBook addressBook_ptr) {
debugStart?.call('WOWNERO_AddressBook_getAll_size');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_AddressBook_getAll_size(addressBook_ptr);
debugEnd?.call('WOWNERO_AddressBook_getAll_size');
return v;
}
AddressBookRow AddressBook_getAll_byIndex(AddressBook addressBook_ptr,
{required int index}) {
debugStart?.call('WOWNERO_AddressBook_getAll_byIndex');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_AddressBook_getAll_byIndex(addressBook_ptr, index);
debugEnd?.call('WOWNERO_AddressBook_getAll_byIndex');
return v;
}
bool AddressBook_addRow(
AddressBook addressBook_ptr, {
required String dstAddr,
required String paymentId,
required String description,
}) {
debugStart?.call('WOWNERO_AddressBook_addRow');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final dst_addr_ = dstAddr.toNativeUtf8().cast<Char>();
final payment_id_ = paymentId.toNativeUtf8().cast<Char>();
final description_ = description.toNativeUtf8().cast<Char>();
final v = lib!.WOWNERO_AddressBook_addRow(
addressBook_ptr, dst_addr_, payment_id_, description_);
calloc.free(dst_addr_);
calloc.free(payment_id_);
calloc.free(description_);
debugEnd?.call('WOWNERO_AddressBook_addRow');
return v;
}
bool AddressBook_deleteRow(AddressBook addressBook_ptr, {required int rowId}) {
debugStart?.call('WOWNERO_AddressBook_deleteRow');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_AddressBook_deleteRow(addressBook_ptr, rowId);
debugEnd?.call('WOWNERO_AddressBook_deleteRow');
return v;
}
bool AddressBook_setDescription(
AddressBook addressBook_ptr, {
required int rowId,
required String description,
}) {
debugStart?.call('WOWNERO_AddressBook_setDescription');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final description_ = description.toNativeUtf8().cast<Char>();
final v = lib!
.WOWNERO_AddressBook_setDescription(addressBook_ptr, rowId, description_);
calloc.free(description_);
debugEnd?.call('WOWNERO_AddressBook_setDescription');
return v;
}
void AddressBook_refresh(AddressBook addressBook_ptr) {
debugStart?.call('WOWNERO_AddressBook_refresh');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_AddressBook_refresh(addressBook_ptr);
debugEnd?.call('WOWNERO_AddressBook_refresh');
return v;
}
int AddressBook_errorCode(AddressBook addressBook_ptr) {
debugStart?.call('WOWNERO_AddressBook_errorCode');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_AddressBook_errorCode(addressBook_ptr);
debugEnd?.call('WOWNERO_AddressBook_errorCode');
return v;
}
int AddressBook_lookupPaymentID(AddressBook addressBook_ptr,
{required String paymentId}) {
debugStart?.call('WOWNERO_AddressBook_lookupPaymentID');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final paymentId_ = paymentId.toNativeUtf8().cast<Char>();
final v =
lib!.WOWNERO_AddressBook_lookupPaymentID(addressBook_ptr, paymentId_);
calloc.free(paymentId_);
debugEnd?.call('WOWNERO_AddressBook_lookupPaymentID');
return v;
}
// CoinsInfo
typedef CoinsInfo = Pointer<Void>;
int CoinsInfo_blockHeight(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_blockHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_blockHeight(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_blockHeight');
return v;
}
String CoinsInfo_hash(CoinsInfo addressBookRow_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_hash');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_CoinsInfo_hash(addressBookRow_ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_CoinsInfo_hash');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_CoinsInfo_hash', e);
debugEnd?.call('WOWNERO_CoinsInfo_hash');
return "";
}
}
int CoinsInfo_internalOutputIndex(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_internalOutputIndex');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_internalOutputIndex(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_internalOutputIndex');
return v;
}
int CoinsInfo_globalOutputIndex(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_globalOutputIndex');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_globalOutputIndex(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_globalOutputIndex');
return v;
}
bool CoinsInfo_spent(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_spent');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_spent(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_spent');
return v;
}
bool CoinsInfo_frozen(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_frozen');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_frozen(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_frozen');
return v;
}
int CoinsInfo_spentHeight(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_spentHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_spentHeight(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_spentHeight');
return v;
}
int CoinsInfo_amount(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_amount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_amount(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_amount');
return v;
}
bool CoinsInfo_rct(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_rct');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_rct(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_rct');
return v;
}
bool CoinsInfo_keyImageKnown(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_keyImageKnown');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_keyImageKnown(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_keyImageKnown');
return v;
}
int CoinsInfo_pkIndex(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_pkIndex');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_pkIndex(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_pkIndex');
return v;
}
int CoinsInfo_subaddrIndex(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_subaddrIndex');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_subaddrIndex(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_subaddrIndex');
return v;
}
int CoinsInfo_subaddrAccount(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_subaddrAccount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_subaddrAccount(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_subaddrAccount');
return v;
}
String CoinsInfo_address(CoinsInfo addressBookRow_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_address');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr =
lib!.WOWNERO_CoinsInfo_address(addressBookRow_ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_CoinsInfo_address');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_CoinsInfo_address', e);
debugEnd?.call('WOWNERO_CoinsInfo_address');
return "";
}
}
String CoinsInfo_addressLabel(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_addressLabel');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr =
lib!.WOWNERO_CoinsInfo_addressLabel(coinsInfo_ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_CoinsInfo_addressLabel');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_CoinsInfo_addressLabel', e);
debugEnd?.call('WOWNERO_CoinsInfo_addressLabel');
return "";
}
}
String CoinsInfo_keyImage(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_keyImage');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_CoinsInfo_keyImage(coinsInfo_ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_CoinsInfo_keyImage');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_CoinsInfo_keyImage', e);
debugEnd?.call('WOWNERO_CoinsInfo_keyImage');
return "";
}
}
int CoinsInfo_unlockTime(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_unlockTime');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_unlockTime(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_unlockTime');
return v;
}
bool CoinsInfo_unlocked(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_unlocked');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_unlocked(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_unlocked');
return v;
}
String CoinsInfo_pubKey(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_pubKey');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_CoinsInfo_pubKey(coinsInfo_ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_CoinsInfo_pubKey');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_CoinsInfo_pubKey', e);
debugEnd?.call('WOWNERO_CoinsInfo_pubKey');
return "";
}
}
bool CoinsInfo_coinbase(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_coinbase');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_CoinsInfo_coinbase(coinsInfo_ptr);
debugEnd?.call('WOWNERO_CoinsInfo_coinbase');
return v;
}
String CoinsInfo_description(CoinsInfo coinsInfo_ptr) {
debugStart?.call('WOWNERO_CoinsInfo_description');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr =
lib!.WOWNERO_CoinsInfo_description(coinsInfo_ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_CoinsInfo_description');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_CoinsInfo_description', e);
debugEnd?.call('WOWNERO_CoinsInfo_description');
return "";
}
}
typedef Coins = Pointer<Void>;
int Coins_count(Coins coins_ptr) {
debugStart?.call('WOWNERO_Coins_count');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Coins_count(coins_ptr);
debugEnd?.call('WOWNERO_Coins_count');
return v;
}
CoinsInfo Coins_coin(Coins coins_ptr, int index) {
debugStart?.call('WOWNERO_Coins_coin');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Coins_coin(coins_ptr, index);
debugEnd?.call('WOWNERO_Coins_coin');
return v;
}
int Coins_getAll_size(Coins coins_ptr) {
debugStart?.call('WOWNERO_Coins_getAll_size');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Coins_getAll_size(coins_ptr);
debugEnd?.call('WOWNERO_Coins_getAll_size');
return v;
}
CoinsInfo Coins_getAll_byIndex(Coins coins_ptr, int index) {
debugStart?.call('WOWNERO_Coins_getAll_byIndex');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Coins_getAll_byIndex(coins_ptr, index);
debugEnd?.call('WOWNERO_Coins_getAll_byIndex');
return v;
}
void Coins_refresh(Coins coins_ptr) {
debugStart?.call('WOWNERO_Coins_refresh');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Coins_refresh(coins_ptr);
debugEnd?.call('WOWNERO_Coins_refresh');
return v;
}
void Coins_setFrozenByPublicKey(Coins coins_ptr, {required String publicKey}) {
debugStart?.call('WOWNERO_Coins_setFrozenByPublicKey');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final publicKey_ = publicKey.toNativeUtf8().cast<Char>();
final v = lib!.WOWNERO_Coins_setFrozenByPublicKey(coins_ptr, publicKey_);
calloc.free(publicKey_);
debugEnd?.call('WOWNERO_Coins_setFrozenByPublicKey');
return v;
}
void Coins_setFrozen(Coins coins_ptr, {required int index}) {
debugStart?.call('WOWNERO_Coins_setFrozen');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Coins_setFrozen(coins_ptr, index);
debugEnd?.call('WOWNERO_Coins_setFrozen');
return v;
}
void Coins_thaw(Coins coins_ptr, {required int index}) {
debugStart?.call('WOWNERO_Coins_thaw');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Coins_thaw(coins_ptr, index);
debugEnd?.call('WOWNERO_Coins_thaw');
return v;
}
void Coins_thawByPublicKey(Coins coins_ptr, {required String publicKey}) {
debugStart?.call('WOWNERO_Coins_thawByPublicKey');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final publicKey_ = publicKey.toNativeUtf8().cast<Char>();
final v = lib!.WOWNERO_Coins_thawByPublicKey(coins_ptr, publicKey_);
calloc.free(publicKey_);
debugEnd?.call('WOWNERO_Coins_thawByPublicKey');
return v;
}
bool Coins_isTransferUnlocked(
Coins coins_ptr, {
required int unlockTime,
required int blockHeight,
}) {
debugStart?.call('WOWNERO_Coins_isTransferUnlocked');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v =
lib!.WOWNERO_Coins_isTransferUnlocked(coins_ptr, unlockTime, blockHeight);
debugEnd?.call('WOWNERO_Coins_isTransferUnlocked');
return v;
}
// SubaddressRow
typedef SubaddressRow = Pointer<Void>;
String SubaddressRow_extra(SubaddressRow subaddressBookRow_ptr) {
debugStart?.call('WOWNERO_SubaddressRow_extra');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr =
lib!.WOWNERO_SubaddressRow_extra(subaddressBookRow_ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_SubaddressRow_extra');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_SubaddressRow_extra', e);
debugEnd?.call('WOWNERO_SubaddressRow_extra');
return "";
}
}
String SubaddressRow_getAddress(SubaddressRow subaddressBookRow_ptr) {
debugStart?.call('WOWNERO_SubaddressRow_getAddress');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_SubaddressRow_getAddress(subaddressBookRow_ptr)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_SubaddressRow_getAddress');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_SubaddressRow_getAddress', e);
debugEnd?.call('WOWNERO_SubaddressRow_getAddress');
return "";
}
}
String SubaddressRow_getLabel(SubaddressRow subaddressBookRow_ptr) {
debugStart?.call('WOWNERO_SubaddressRow_getLabel');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr =
lib!.WOWNERO_SubaddressRow_getLabel(subaddressBookRow_ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_SubaddressRow_getLabel');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_SubaddressRow_getLabel', e);
debugEnd?.call('WOWNERO_SubaddressRow_getLabel');
return "";
}
}
int SubaddressRow_getRowId(SubaddressRow subaddressBookRow_ptr) {
debugStart?.call('WOWNERO_SubaddressRow_getRowId');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_SubaddressRow_getRowId(subaddressBookRow_ptr);
debugEnd?.call('WOWNERO_SubaddressRow_getRowId');
return status;
}
// Subaddress
typedef Subaddress = Pointer<Void>;
int Subaddress_getAll_size(SubaddressRow subaddressBookRow_ptr) {
debugStart?.call('WOWNERO_Subaddress_getAll_size');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_Subaddress_getAll_size(subaddressBookRow_ptr);
debugEnd?.call('WOWNERO_Subaddress_getAll_size');
return status;
}
SubaddressRow Subaddress_getAll_byIndex(Subaddress subaddressRow_ptr,
{required int index}) {
debugStart?.call('WOWNERO_Subaddress_getAll_byIndex');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status =
lib!.WOWNERO_Subaddress_getAll_byIndex(subaddressRow_ptr, index);
debugEnd?.call('WOWNERO_Subaddress_getAll_byIndex');
return status;
}
void Subaddress_addRow(Subaddress ptr,
{required int accountIndex, required String label}) {
debugStart?.call('WOWNERO_Subaddress_addRow');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final label_ = label.toNativeUtf8().cast<Char>();
final status = lib!.WOWNERO_Subaddress_addRow(ptr, accountIndex, label_);
calloc.free(label_);
debugEnd?.call('WOWNERO_Subaddress_addRow');
return status;
}
void Subaddress_setLabel(Subaddress ptr,
{required int accountIndex,
required int addressIndex,
required String label}) {
debugStart?.call('WOWNERO_Subaddress_setLabel');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final label_ = label.toNativeUtf8().cast<Char>();
final status =
lib!.WOWNERO_Subaddress_setLabel(ptr, accountIndex, addressIndex, label_);
calloc.free(label_);
debugEnd?.call('WOWNERO_Subaddress_setLabel');
return status;
}
void Subaddress_refresh(Subaddress ptr,
{required int accountIndex, required String label}) {
debugStart?.call('WOWNERO_Subaddress_refresh');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final label_ = label.toNativeUtf8().cast<Char>();
final status = lib!.WOWNERO_Subaddress_refresh(ptr, accountIndex);
calloc.free(label_);
debugEnd?.call('WOWNERO_Subaddress_refresh');
return status;
}
typedef SubaddressAccountRow = Pointer<Void>;
String SubaddressAccountRow_extra(SubaddressAccountRow addressBookRow_ptr) {
debugStart?.call('WOWNERO_SubaddressAccountRow_extra');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_SubaddressAccountRow_extra(addressBookRow_ptr)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_SubaddressAccountRow_extra');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_SubaddressAccountRow_extra', e);
debugEnd?.call('WOWNERO_SubaddressAccountRow_extra');
return "";
}
}
String SubaddressAccountRow_getAddress(
SubaddressAccountRow addressBookRow_ptr) {
debugStart?.call('WOWNERO_SubaddressAccountRow_getAddress');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_SubaddressAccountRow_getAddress(addressBookRow_ptr)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_SubaddressAccountRow_getAddress');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_SubaddressAccountRow_getAddress', e);
debugEnd?.call('WOWNERO_SubaddressAccountRow_getAddress');
return "";
}
}
String SubaddressAccountRow_getLabel(SubaddressAccountRow addressBookRow_ptr) {
debugStart?.call('WOWNERO_SubaddressAccountRow_getLabel');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_SubaddressAccountRow_getLabel(addressBookRow_ptr)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_SubaddressAccountRow_getLabel');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_SubaddressAccountRow_getLabel', e);
debugEnd?.call('WOWNERO_SubaddressAccountRow_getLabel');
return "";
}
}
String SubaddressAccountRow_getBalance(
SubaddressAccountRow addressBookRow_ptr) {
debugStart?.call('WOWNERO_SubaddressAccountRow_getBalance');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_SubaddressAccountRow_getBalance(addressBookRow_ptr)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_SubaddressAccountRow_getBalance');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_SubaddressAccountRow_getBalance', e);
debugEnd?.call('WOWNERO_SubaddressAccountRow_getBalance');
return "";
}
}
String SubaddressAccountRow_getUnlockedBalance(
SubaddressAccountRow addressBookRow_ptr) {
debugStart?.call('WOWNERO_SubaddressAccountRow_getUnlockedBalance');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_SubaddressAccountRow_getUnlockedBalance(addressBookRow_ptr)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_SubaddressAccountRow_getUnlockedBalance');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_SubaddressAccountRow_getUnlockedBalance', e);
debugEnd?.call('WOWNERO_SubaddressAccountRow_getUnlockedBalance');
return "";
}
}
int SubaddressAccountRow_getRowId(SubaddressAccountRow ptr) {
debugStart?.call('WOWNERO_SubaddressAccountRow_getRowId');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_SubaddressAccountRow_getRowId(ptr);
debugEnd?.call('WOWNERO_SubaddressAccountRow_getRowId');
return status;
}
typedef SubaddressAccount = Pointer<Void>;
int SubaddressAccount_getAll_size(SubaddressAccount ptr) {
debugStart?.call('WOWNERO_SubaddressAccount_getAll_size');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_SubaddressAccount_getAll_size(ptr);
debugEnd?.call('WOWNERO_SubaddressAccount_getAll_size');
return status;
}
SubaddressAccountRow SubaddressAccount_getAll_byIndex(SubaddressAccount ptr,
{required int index}) {
debugStart?.call('WOWNERO_SubaddressAccount_getAll_byIndex');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_SubaddressAccount_getAll_byIndex(ptr, index);
debugEnd?.call('WOWNERO_SubaddressAccount_getAll_byIndex');
return status;
}
void SubaddressAccount_addRow(SubaddressAccount ptr, {required String label}) {
debugStart?.call('WOWNERO_SubaddressAccount_addRow');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final label_ = label.toNativeUtf8().cast<Char>();
final status = lib!.WOWNERO_SubaddressAccount_addRow(ptr, label_);
calloc.free(label_);
debugEnd?.call('WOWNERO_SubaddressAccount_addRow');
return status;
}
void SubaddressAccount_setLabel(SubaddressAccount ptr,
{required int accountIndex, required String label}) {
debugStart?.call('WOWNERO_SubaddressAccount_setLabel');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final label_ = label.toNativeUtf8().cast<Char>();
final status =
lib!.WOWNERO_SubaddressAccount_setLabel(ptr, accountIndex, label_);
calloc.free(label_);
debugEnd?.call('WOWNERO_SubaddressAccount_setLabel');
return status;
}
void SubaddressAccount_refresh(SubaddressAccount ptr) {
debugStart?.call('WOWNERO_SubaddressAccount_refresh');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_SubaddressAccount_refresh(ptr);
debugEnd?.call('WOWNERO_SubaddressAccount_refresh');
return status;
}
// MultisigState
typedef MultisigState = Pointer<Void>;
bool MultisigState_isMultisig(MultisigState ptr) {
debugStart?.call('WOWNERO_MultisigState_isMultisig');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_MultisigState_isMultisig(ptr);
debugEnd?.call('WOWNERO_MultisigState_isMultisig');
return status;
}
bool MultisigState_isReady(MultisigState ptr) {
debugStart?.call('WOWNERO_MultisigState_isReady');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_MultisigState_isReady(ptr);
debugEnd?.call('WOWNERO_MultisigState_isReady');
return status;
}
int MultisigState_threshold(MultisigState ptr) {
debugStart?.call('WOWNERO_MultisigState_threshold');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_MultisigState_threshold(ptr);
debugEnd?.call('WOWNERO_MultisigState_threshold');
return status;
}
int MultisigState_total(MultisigState ptr) {
debugStart?.call('WOWNERO_MultisigState_total');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_MultisigState_total(ptr);
debugEnd?.call('WOWNERO_MultisigState_total');
return status;
}
// DeviceProgress
typedef DeviceProgress = Pointer<Void>;
bool DeviceProgress_progress(DeviceProgress ptr) {
debugStart?.call('WOWNERO_DeviceProgress_progress');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_DeviceProgress_progress(ptr);
debugEnd?.call('WOWNERO_DeviceProgress_progress');
return status;
}
bool DeviceProgress_indeterminate(DeviceProgress ptr) {
debugStart?.call('WOWNERO_DeviceProgress_indeterminate');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_DeviceProgress_indeterminate(ptr);
debugEnd?.call('WOWNERO_DeviceProgress_indeterminate');
return status;
}
// Wallet
typedef wallet = Pointer<Void>;
String Wallet_seed(wallet ptr, {required String seedOffset}) {
debugStart?.call('WOWNERO_Wallet_seed');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final seedOffset_ = seedOffset.toNativeUtf8().cast<Char>();
final strPtr = lib!.WOWNERO_Wallet_seed(ptr, seedOffset_).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
calloc.free(seedOffset_);
debugEnd?.call('WOWNERO_Wallet_seed');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_seed', e);
debugEnd?.call('WOWNERO_Wallet_seed');
return "";
}
}
String Wallet_getSeedLanguage(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_getSeedLanguage');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_getSeedLanguage(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_getSeedLanguage');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_getSeedLanguage', e);
debugEnd?.call('WOWNERO_Wallet_getSeedLanguage');
return "";
}
}
void Wallet_setSeedLanguage(wallet ptr, {required String language}) {
debugStart?.call('WOWNERO_Wallet_setSeedLanguage');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final language_ = language.toNativeUtf8().cast<Char>();
final status = lib!.WOWNERO_Wallet_setSeedLanguage(ptr, language_);
calloc.free(language_);
debugEnd?.call('WOWNERO_Wallet_setSeedLanguage');
return status;
}
int Wallet_status(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_status');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_Wallet_status(ptr);
debugEnd?.call('WOWNERO_Wallet_status');
return status;
}
String Wallet_errorString(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_errorString');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_errorString(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_errorString');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_errorString', e);
debugEnd?.call('WOWNERO_Wallet_errorString');
return "";
}
}
bool Wallet_setPassword(wallet ptr, {required String password}) {
debugStart?.call('WOWNERO_Wallet_setPassword');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final password_ = password.toNativeUtf8().cast<Char>();
final status = lib!.WOWNERO_Wallet_setPassword(ptr, password_);
calloc.free(password_);
debugEnd?.call('WOWNERO_Wallet_setPassword');
return status;
}
String Wallet_getPassword(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_getPassword');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_getPassword(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_getPassword');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_getPassword', e);
debugEnd?.call('WOWNERO_Wallet_getPassword');
return "";
}
}
bool Wallet_setDevicePin(wallet ptr, {required String passphrase}) {
debugStart?.call('WOWNERO_Wallet_setDevicePin');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final passphrase_ = passphrase.toNativeUtf8().cast<Char>();
final status = lib!.WOWNERO_Wallet_setDevicePin(ptr, passphrase_);
calloc.free(passphrase_);
debugEnd?.call('WOWNERO_Wallet_setDevicePin');
return status;
}
String Wallet_address(wallet ptr,
{int accountIndex = 0, int addressIndex = 0}) {
debugStart?.call('WOWNERO_Wallet_address');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_Wallet_address(ptr, accountIndex, addressIndex)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_address');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_address', e);
debugEnd?.call('WOWNERO_Wallet_address');
return "";
}
}
String Wallet_path(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_path');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_path(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_path');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_path', e);
debugEnd?.call('WOWNERO_Wallet_path');
return "";
}
}
int Wallet_nettype(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_nettype');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_Wallet_nettype(ptr);
debugEnd?.call('WOWNERO_Wallet_nettype');
return status;
}
int Wallet_useForkRules(
wallet ptr, {
required int version,
required int earlyBlocks,
}) {
debugStart?.call('WOWNERO_Wallet_useForkRules');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_Wallet_useForkRules(ptr, version, earlyBlocks);
debugEnd?.call('WOWNERO_Wallet_useForkRules');
return status;
}
String Wallet_integratedAddress(wallet ptr, {required String paymentId}) {
debugStart?.call('WOWNERO_Wallet_integratedAddress');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final paymentId_ = paymentId.toNativeUtf8().cast<Char>();
final strPtr =
lib!.WOWNERO_Wallet_integratedAddress(ptr, paymentId_).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_integratedAddress');
calloc.free(paymentId_);
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_integratedAddress', e);
debugEnd?.call('WOWNERO_Wallet_integratedAddress');
return "";
}
}
String Wallet_secretViewKey(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_secretViewKey');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_secretViewKey(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_secretViewKey');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_secretViewKey', e);
debugEnd?.call('WOWNERO_Wallet_secretViewKey');
return "";
}
}
String Wallet_publicViewKey(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_publicViewKey');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_publicViewKey(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_publicViewKey');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_publicViewKey', e);
debugEnd?.call('WOWNERO_Wallet_publicViewKey');
return "";
}
}
String Wallet_secretSpendKey(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_secretSpendKey');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_secretSpendKey(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_secretSpendKey');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_secretSpendKey', e);
debugEnd?.call('WOWNERO_Wallet_secretSpendKey');
return "";
}
}
String Wallet_publicSpendKey(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_publicSpendKey');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_publicSpendKey(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_publicSpendKey');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_publicSpendKey', e);
debugEnd?.call('WOWNERO_Wallet_publicSpendKey');
return "";
}
}
String Wallet_publicMultisigSignerKey(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_publicMultisigSignerKey');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr =
lib!.WOWNERO_Wallet_publicMultisigSignerKey(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_publicMultisigSignerKey');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_publicMultisigSignerKey', e);
debugEnd?.call('WOWNERO_Wallet_publicMultisigSignerKey');
return "";
}
}
void Wallet_stop(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_stop');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final stop = lib!.WOWNERO_Wallet_stop(ptr);
debugEnd?.call('WOWNERO_Wallet_stop');
return stop;
}
bool Wallet_store(wallet ptr, {String path = ""}) {
debugStart?.call('WOWNERO_Wallet_store');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final path_ = path.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_store(ptr, path_);
calloc.free(path_);
debugEnd?.call('WOWNERO_Wallet_store');
return s;
}
String Wallet_filename(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_filename');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_filename(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_filename');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_filename', e);
debugEnd?.call('WOWNERO_Wallet_filename');
return "";
}
}
String Wallet_keysFilename(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_keysFilename');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_keysFilename(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_keysFilename');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_keysFilename', e);
debugEnd?.call('WOWNERO_Wallet_keysFilename');
return "";
}
}
bool Wallet_init(
wallet ptr, {
required String daemonAddress,
int upperTransacationSizeLimit = 0,
String daemonUsername = "",
String daemonPassword = "",
bool useSsl = false,
bool lightWallet = false,
String proxyAddress = "",
}) {
debugStart?.call('WOWNERO_Wallet_init');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final daemonAddress_ = daemonAddress.toNativeUtf8().cast<Char>();
final daemonUsername_ = daemonUsername.toNativeUtf8().cast<Char>();
final daemonPassword_ = daemonPassword.toNativeUtf8().cast<Char>();
final proxyAddress_ = proxyAddress.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_init(
ptr,
daemonAddress_,
upperTransacationSizeLimit,
daemonUsername_,
daemonPassword_,
useSsl,
lightWallet,
proxyAddress_);
calloc.free(daemonAddress_);
calloc.free(daemonUsername_);
calloc.free(daemonPassword_);
calloc.free(proxyAddress_);
debugEnd?.call('WOWNERO_Wallet_init');
return s;
}
bool Wallet_createWatchOnly(
wallet ptr, {
required String path,
required String password,
required String language,
}) {
debugStart?.call('WOWNERO_Wallet_createWatchOnly');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final path_ = path.toNativeUtf8().cast<Char>();
final password_ = password.toNativeUtf8().cast<Char>();
final language_ = language.toNativeUtf8().cast<Char>();
final getRefreshFromBlockHeight =
lib!.WOWNERO_Wallet_createWatchOnly(ptr, path_, password_, language_);
calloc.free(path_);
calloc.free(password_);
calloc.free(language_);
debugEnd?.call('WOWNERO_Wallet_createWatchOnly');
return getRefreshFromBlockHeight;
}
void Wallet_setRefreshFromBlockHeight(wallet ptr,
{required int refresh_from_block_height}) {
debugStart?.call('WOWNERO_Wallet_setRefreshFromBlockHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!
.WOWNERO_Wallet_setRefreshFromBlockHeight(ptr, refresh_from_block_height);
debugEnd?.call('WOWNERO_Wallet_setRefreshFromBlockHeight');
return status;
}
int Wallet_getRefreshFromBlockHeight(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_getRefreshFromBlockHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final getRefreshFromBlockHeight =
lib!.WOWNERO_Wallet_getRefreshFromBlockHeight(ptr);
debugEnd?.call('WOWNERO_Wallet_getRefreshFromBlockHeight');
return getRefreshFromBlockHeight;
}
void Wallet_setRecoveringFromSeed(wallet ptr,
{required bool recoveringFromSeed}) {
debugStart?.call('WOWNERO_Wallet_setRecoveringFromSeed');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status =
lib!.WOWNERO_Wallet_setRecoveringFromSeed(ptr, recoveringFromSeed);
debugEnd?.call('WOWNERO_Wallet_setRecoveringFromSeed');
return status;
}
void Wallet_setRecoveringFromDevice(wallet ptr,
{required bool recoveringFromDevice}) {
debugStart?.call('WOWNERO_Wallet_setRecoveringFromDevice');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status =
lib!.WOWNERO_Wallet_setRecoveringFromDevice(ptr, recoveringFromDevice);
debugEnd?.call('WOWNERO_Wallet_setRecoveringFromDevice');
return status;
}
void Wallet_setSubaddressLookahead(wallet ptr,
{required int major, required int minor}) {
debugStart?.call('WOWNERO_Wallet_setSubaddressLookahead');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_Wallet_setSubaddressLookahead(ptr, major, minor);
debugEnd?.call('WOWNERO_Wallet_setSubaddressLookahead');
return status;
}
bool Wallet_connectToDaemon(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_connectToDaemon');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final connectToDaemon = lib!.WOWNERO_Wallet_connectToDaemon(ptr);
debugEnd?.call('WOWNERO_Wallet_connectToDaemon');
return connectToDaemon;
}
int Wallet_connected(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_connected');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final connected = lib!.WOWNERO_Wallet_connected(ptr);
debugEnd?.call('WOWNERO_Wallet_connected');
return connected;
}
void Wallet_setTrustedDaemon(wallet ptr, {required bool arg}) {
debugStart?.call('WOWNERO_Wallet_setTrustedDaemon');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_Wallet_setTrustedDaemon(ptr, arg);
debugEnd?.call('WOWNERO_Wallet_setTrustedDaemon');
return status;
}
bool Wallet_trustedDaemon(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_trustedDaemon');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final status = lib!.WOWNERO_Wallet_trustedDaemon(ptr);
debugEnd?.call('WOWNERO_Wallet_trustedDaemon');
return status;
}
bool Wallet_setProxy(wallet ptr, {required String address}) {
debugStart?.call('WOWNERO_Wallet_setProxy');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final address_ = address.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_setProxy(ptr, address_);
calloc.free(address_);
debugEnd?.call('WOWNERO_Wallet_setProxy');
return s;
}
int Wallet_balance(wallet ptr, {required int accountIndex}) {
debugStart?.call('WOWNERO_Wallet_balance');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final balance = lib!.WOWNERO_Wallet_balance(ptr, accountIndex);
debugEnd?.call('WOWNERO_Wallet_balance');
return balance;
}
int Wallet_unlockedBalance(wallet ptr, {required int accountIndex}) {
debugStart?.call('WOWNERO_Wallet_unlockedBalance');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final unlockedBalance =
lib!.WOWNERO_Wallet_unlockedBalance(ptr, accountIndex);
debugEnd?.call('WOWNERO_Wallet_unlockedBalance');
return unlockedBalance;
}
int Wallet_viewOnlyBalance(wallet ptr, {required int accountIndex}) {
debugStart?.call('WOWNERO_Wallet_viewOnlyBalance');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final unlockedBalance =
lib!.WOWNERO_Wallet_viewOnlyBalance(ptr, accountIndex);
debugEnd?.call('WOWNERO_Wallet_viewOnlyBalance');
return unlockedBalance;
}
bool Wallet_watchOnly(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_watchOnly');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final watchOnly = lib!.WOWNERO_Wallet_watchOnly(ptr);
debugEnd?.call('WOWNERO_Wallet_watchOnly');
return watchOnly;
}
int Wallet_blockChainHeight(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_blockChainHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final blockChainHeight = lib!.WOWNERO_Wallet_blockChainHeight(ptr);
debugEnd?.call('WOWNERO_Wallet_blockChainHeight');
return blockChainHeight;
}
int Wallet_approximateBlockChainHeight(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_approximateBlockChainHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final approximateBlockChainHeight =
lib!.WOWNERO_Wallet_approximateBlockChainHeight(ptr);
debugEnd?.call('WOWNERO_Wallet_approximateBlockChainHeight');
return approximateBlockChainHeight;
}
int Wallet_estimateBlockChainHeight(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_estimateBlockChainHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final estimateBlockChainHeight =
lib!.WOWNERO_Wallet_estimateBlockChainHeight(ptr);
debugEnd?.call('WOWNERO_Wallet_estimateBlockChainHeight');
return estimateBlockChainHeight;
}
int Wallet_daemonBlockChainHeight(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_daemonBlockChainHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final daemonBlockChainHeight =
lib!.WOWNERO_Wallet_daemonBlockChainHeight(ptr);
debugEnd?.call('WOWNERO_Wallet_daemonBlockChainHeight');
return daemonBlockChainHeight;
}
int Wallet_daemonBlockChainHeight_cached(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_daemonBlockChainHeight_cached');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final daemonBlockChainHeight =
lib!.WOWNERO_Wallet_daemonBlockChainHeight_cached(ptr);
debugEnd?.call('WOWNERO_Wallet_daemonBlockChainHeight_cached');
return daemonBlockChainHeight;
}
void Wallet_daemonBlockChainHeight_runThread(wallet ptr, int seconds) {
debugStart?.call('WOWNERO_Wallet_daemonBlockChainHeight_enableRefresh');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final ret =
lib!.WOWNERO_Wallet_daemonBlockChainHeight_runThread(ptr, seconds);
debugEnd?.call('WOWNERO_Wallet_daemonBlockChainHeight_enableRefresh');
return ret;
}
bool Wallet_synchronized(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_synchronized');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final synchronized = lib!.WOWNERO_Wallet_synchronized(ptr);
debugEnd?.call('WOWNERO_Wallet_synchronized');
return synchronized;
}
String Wallet_displayAmount(int amount) {
debugStart?.call('WOWNERO_Wallet_displayAmount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_displayAmount(amount).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_displayAmount');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_displayAmount', e);
debugEnd?.call('WOWNERO_Wallet_displayAmount');
return "";
}
}
int Wallet_amountFromString(String amount) {
debugStart?.call('WOWNERO_Wallet_amountFromString');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final amount_ = amount.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_amountFromString(amount_);
calloc.free(amount_);
debugEnd?.call('WOWNERO_Wallet_amountFromString');
return s;
}
int Wallet_amountFromDouble(double amount) {
debugStart?.call('WOWNERO_Wallet_amountFromDouble');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_Wallet_amountFromDouble(amount);
debugEnd?.call('WOWNERO_Wallet_amountFromDouble');
return s;
}
String Wallet_genPaymentId() {
debugStart?.call('WOWNERO_Wallet_genPaymentId');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_genPaymentId().cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_genPaymentId');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_genPaymentId', e);
debugEnd?.call('WOWNERO_Wallet_genPaymentId');
return "";
}
}
bool Wallet_paymentIdValid(String paymentId) {
debugStart?.call('WOWNERO_Wallet_paymentIdValid');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final paymentId_ = paymentId.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_paymentIdValid(paymentId_);
calloc.free(paymentId_);
debugEnd?.call('WOWNERO_Wallet_paymentIdValid');
return s;
}
bool Wallet_addressValid(String address, int networkType) {
debugStart?.call('WOWNERO_Wallet_addressValid');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final address_ = address.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_addressValid(address_, networkType);
calloc.free(address_);
debugEnd?.call('WOWNERO_Wallet_addressValid');
return s;
}
bool Wallet_keyValid(
{required String secret_key_string,
required String address_string,
required bool isViewKey,
required int nettype}) {
debugStart?.call('WOWNERO_Wallet_keyValid');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final secret_key_string_ = secret_key_string.toNativeUtf8().cast<Char>();
final address_string_ = address_string.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_keyValid(
secret_key_string_, address_string_, isViewKey, nettype);
calloc.free(secret_key_string_);
calloc.free(address_string_);
debugEnd?.call('WOWNERO_Wallet_keyValid');
return s;
}
String Wallet_keyValid_error(
{required String secret_key_string,
required String address_string,
required bool isViewKey,
required int nettype}) {
debugStart?.call('WOWNERO_Wallet_keyValid_error');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final secret_key_string_ = secret_key_string.toNativeUtf8().cast<Char>();
final address_string_ = address_string.toNativeUtf8().cast<Char>();
final strPtr = lib!
.WOWNERO_Wallet_keyValid_error(
secret_key_string_, address_string_, isViewKey, nettype)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
calloc.free(secret_key_string_);
calloc.free(address_string_);
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_keyValid_error', e);
debugEnd?.call('WOWNERO_Wallet_keyValid_error');
return "";
}
}
String Wallet_paymentIdFromAddress(
{required String strarg, required int nettype}) {
debugStart?.call('WOWNERO_Wallet_paymentIdFromAddress');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strarg_ = strarg.toNativeUtf8().cast<Char>();
final strPtr =
lib!.WOWNERO_Wallet_paymentIdFromAddress(strarg_, nettype).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
calloc.free(strarg_);
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_paymentIdFromAddress', e);
debugEnd?.call('WOWNERO_Wallet_paymentIdFromAddress');
return "";
}
}
int Wallet_maximumAllowedAmount() {
debugStart?.call('WOWNERO_Wallet_maximumAllowedAmount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_Wallet_maximumAllowedAmount();
debugEnd?.call('WOWNERO_Wallet_maximumAllowedAmount');
return s;
}
void Wallet_init3(
wallet ptr, {
required String argv0,
required String defaultLogBaseName,
required String logPath,
required bool console,
}) {
debugStart?.call('WOWNERO_Wallet_init3');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final argv0_ = argv0.toNativeUtf8().cast<Char>();
final defaultLogBaseName_ = defaultLogBaseName.toNativeUtf8().cast<Char>();
final logPath_ = logPath.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_init3(
ptr, argv0_, defaultLogBaseName_, logPath_, console);
calloc.free(argv0_);
calloc.free(defaultLogBaseName_);
calloc.free(logPath_);
debugEnd?.call('WOWNERO_Wallet_init3');
return s;
}
String Wallet_getPolyseed(wallet ptr, {required String passphrase}) {
debugStart?.call('WOWNERO_Wallet_getPolyseed');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final passphrase_ = passphrase.toNativeUtf8().cast<Char>();
final strPtr =
lib!.WOWNERO_Wallet_getPolyseed(ptr, passphrase_).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
calloc.free(passphrase_);
debugEnd?.call('WOWNERO_Wallet_getPolyseed');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_getPolyseed', e);
debugEnd?.call('WOWNERO_Wallet_getPolyseed');
return "";
}
}
String Wallet_createPolyseed({
String language = "English",
}) {
debugStart?.call('WOWNERO_Wallet_createPolyseed');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final language_ = language.toNativeUtf8();
final strPtr =
lib!.WOWNERO_Wallet_createPolyseed(language_.cast()).cast<Utf8>();
calloc.free(language_);
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_createPolyseed');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_createPolyseed', e);
debugEnd?.call('WOWNERO_Wallet_createPolyseed');
return "";
}
}
void Wallet_startRefresh(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_startRefresh');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final startRefresh = lib!.WOWNERO_Wallet_startRefresh(ptr);
debugEnd?.call('WOWNERO_Wallet_startRefresh');
return startRefresh;
}
void Wallet_pauseRefresh(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_pauseRefresh');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final pauseRefresh = lib!.WOWNERO_Wallet_pauseRefresh(ptr);
debugEnd?.call('WOWNERO_Wallet_pauseRefresh');
return pauseRefresh;
}
bool Wallet_refresh(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_refresh');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final refresh = lib!.WOWNERO_Wallet_refresh(ptr);
debugEnd?.call('WOWNERO_Wallet_refresh');
return refresh;
}
void Wallet_refreshAsync(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_refreshAsync');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final refreshAsync = lib!.WOWNERO_Wallet_refreshAsync(ptr);
debugEnd?.call('WOWNERO_Wallet_refreshAsync');
return refreshAsync;
}
bool Wallet_rescanBlockchain(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_rescanBlockchain');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final rescanBlockchain = lib!.WOWNERO_Wallet_rescanBlockchain(ptr);
debugEnd?.call('WOWNERO_Wallet_rescanBlockchain');
return rescanBlockchain;
}
void Wallet_rescanBlockchainAsync(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_rescanBlockchainAsync');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final rescanBlockchainAsync = lib!.WOWNERO_Wallet_rescanBlockchainAsync(ptr);
debugEnd?.call('WOWNERO_Wallet_rescanBlockchainAsync');
return rescanBlockchainAsync;
}
void Wallet_setAutoRefreshInterval(wallet ptr, {required int millis}) {
debugStart?.call('WOWNERO_Wallet_setAutoRefreshInterval');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final setAutoRefreshInterval =
lib!.WOWNERO_Wallet_setAutoRefreshInterval(ptr, millis);
debugEnd?.call('WOWNERO_Wallet_setAutoRefreshInterval');
return setAutoRefreshInterval;
}
int Wallet_autoRefreshInterval(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_autoRefreshInterval');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final autoRefreshInterval = lib!.WOWNERO_Wallet_autoRefreshInterval(ptr);
debugEnd?.call('WOWNERO_Wallet_autoRefreshInterval');
return autoRefreshInterval;
}
void Wallet_addSubaddress(wallet ptr,
{required int accountIndex, String label = ""}) {
debugStart?.call('WOWNERO_Wallet_addSubaddress');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final label_ = label.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_addSubaddress(ptr, accountIndex, label_);
calloc.free(label_);
debugEnd?.call('WOWNERO_Wallet_addSubaddress');
return s;
}
void Wallet_addSubaddressAccount(wallet ptr, {String label = ""}) {
debugStart?.call('WOWNERO_Wallet_addSubaddressAccount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final label_ = label.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_addSubaddressAccount(ptr, label_);
calloc.free(label_);
debugEnd?.call('WOWNERO_Wallet_addSubaddressAccount');
return s;
}
int Wallet_numSubaddressAccounts(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_numSubaddressAccounts');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final numSubaddressAccounts = lib!.WOWNERO_Wallet_numSubaddressAccounts(ptr);
debugEnd?.call('WOWNERO_Wallet_numSubaddressAccounts');
return numSubaddressAccounts;
}
int Wallet_numSubaddresses(wallet ptr, {required int accountIndex}) {
debugStart?.call('WOWNERO_Wallet_numSubaddresses');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final numSubaddresses =
lib!.WOWNERO_Wallet_numSubaddresses(ptr, accountIndex);
debugEnd?.call('WOWNERO_Wallet_numSubaddresses');
return numSubaddresses;
}
String Wallet_getSubaddressLabel(wallet ptr,
{required int accountIndex, required int addressIndex}) {
debugStart?.call('WOWNERO_Wallet_getSubaddressLabel');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_Wallet_getSubaddressLabel(ptr, accountIndex, addressIndex)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_getSubaddressLabel');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_getSubaddressLabel', e);
debugEnd?.call('WOWNERO_Wallet_getSubaddressLabel');
return "";
}
}
void Wallet_setSubaddressLabel(wallet ptr,
{required int accountIndex,
required int addressIndex,
required String label}) {
debugStart?.call('WOWNERO_Wallet_setSubaddressLabel');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final label_ = label.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_setSubaddressLabel(
ptr, accountIndex, addressIndex, label_);
calloc.free(label_);
debugEnd?.call('WOWNERO_Wallet_setSubaddressLabel');
return s;
}
String Wallet_getMultisigInfo(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_getMultisigInfo');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_Wallet_getMultisigInfo(ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_getMultisigInfo');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_getMultisigInfo', e);
debugEnd?.call('WOWNERO_Wallet_getMultisigInfo');
return "";
}
}
PendingTransaction Wallet_createTransactionMultDest(
wallet wptr, {
required List<String> dstAddr,
String paymentId = "",
required bool isSweepAll,
required List<int> amounts,
required int mixinCount,
required int pendingTransactionPriority,
required int subaddr_account,
List<String> preferredInputs = const [],
}) {
debugStart?.call('WOWNERO_Wallet_createTransactionMultDest');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final dst_addr_list = dstAddr.join(defaultSeparatorStr).toNativeUtf8();
final payment_id = paymentId.toNativeUtf8();
final amount_list =
amounts.map((e) => e.toString()).join(defaultSeparatorStr).toNativeUtf8();
final preferredInputs_ =
preferredInputs.join(defaultSeparatorStr).toNativeUtf8();
final ret = lib!.WOWNERO_Wallet_createTransactionMultDest(
wptr,
dst_addr_list.cast(),
defaultSeparator,
payment_id.cast(),
isSweepAll,
amount_list.cast(),
defaultSeparator,
mixinCount,
pendingTransactionPriority,
subaddr_account,
preferredInputs_.cast(),
defaultSeparator,
);
calloc.free(dst_addr_list);
calloc.free(payment_id);
calloc.free(amount_list);
calloc.free(preferredInputs_);
debugEnd?.call('WOWNERO_Wallet_createTransactionMultDest');
return ret;
}
PendingTransaction Wallet_createTransaction(wallet ptr,
{required String dst_addr,
required String payment_id,
required int amount,
required int mixin_count,
required int pendingTransactionPriority,
required int subaddr_account,
List<String> preferredInputs = const []}) {
debugStart?.call('WOWNERO_Wallet_createTransaction');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final dst_addr_ = dst_addr.toNativeUtf8().cast<Char>();
final payment_id_ = payment_id.toNativeUtf8().cast<Char>();
final preferredInputs_ =
preferredInputs.join(defaultSeparatorStr).toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_createTransaction(
ptr,
dst_addr_,
payment_id_,
amount,
mixin_count,
pendingTransactionPriority,
subaddr_account,
preferredInputs_,
defaultSeparator,
);
calloc.free(dst_addr_);
calloc.free(payment_id_);
calloc.free(preferredInputs_);
debugEnd?.call('WOWNERO_Wallet_createTransaction');
return s;
}
UnsignedTransaction Wallet_loadUnsignedTx(wallet ptr,
{required String unsigned_filename}) {
debugStart?.call('WOWNERO_Wallet_loadUnsignedTx');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final unsigned_filename_ = unsigned_filename.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_loadUnsignedTx(ptr, unsigned_filename_);
calloc.free(unsigned_filename_);
debugEnd?.call('WOWNERO_Wallet_loadUnsignedTx');
return s;
}
bool Wallet_submitTransaction(wallet ptr, String filename) {
debugStart?.call('WOWNERO_Wallet_submitTransaction');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final filename_ = filename.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_submitTransaction(ptr, filename_);
calloc.free(filename_);
debugEnd?.call('WOWNERO_Wallet_submitTransaction');
return s;
}
bool Wallet_hasUnknownKeyImages(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_hasUnknownKeyImages');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_Wallet_hasUnknownKeyImages(ptr);
debugEnd?.call('WOWNERO_Wallet_hasUnknownKeyImages');
return s;
}
bool Wallet_exportKeyImages(wallet ptr, String filename, {required bool all}) {
debugStart?.call('WOWNERO_Wallet_exportKeyImages');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final filename_ = filename.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_exportKeyImages(ptr, filename_, all);
calloc.free(filename_);
debugEnd?.call('WOWNERO_Wallet_exportKeyImages');
return s;
}
bool Wallet_importKeyImages(wallet ptr, String filename) {
debugStart?.call('WOWNERO_Wallet_importKeyImages');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final filename_ = filename.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_importKeyImages(ptr, filename_);
calloc.free(filename_);
debugEnd?.call('WOWNERO_Wallet_importKeyImages');
return s;
}
bool Wallet_exportOutputs(wallet ptr, String filename, {required bool all}) {
debugStart?.call('WOWNERO_Wallet_exportOutputs');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final filename_ = filename.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_exportOutputs(ptr, filename_, all);
calloc.free(filename_);
debugEnd?.call('WOWNERO_Wallet_exportOutputs');
return s;
}
bool Wallet_importOutputs(wallet ptr, String filename) {
debugStart?.call('WOWNERO_Wallet_importOutputs');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final filename_ = filename.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_importOutputs(ptr, filename_);
calloc.free(filename_);
debugEnd?.call('WOWNERO_Wallet_importOutputs');
return s;
}
bool Wallet_setupBackgroundSync(
wallet ptr, {
required int backgroundSyncType,
required String walletPassword,
required String backgroundCachePassword,
}) {
debugStart?.call('WOWNERO_Wallet_setupBackgroundSync');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final walletPassword_ = walletPassword.toNativeUtf8().cast<Char>();
final backgroundCachePassword_ =
backgroundCachePassword.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_Wallet_setupBackgroundSync(
ptr, backgroundSyncType, walletPassword_, backgroundCachePassword_);
calloc.free(walletPassword_);
calloc.free(backgroundCachePassword_);
debugEnd?.call('WOWNERO_Wallet_setupBackgroundSync');
return s;
}
int Wallet_getBackgroundSyncType(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_getBackgroundSyncType');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_getBackgroundSyncType(ptr);
debugEnd?.call('WOWNERO_Wallet_getBackgroundSyncType');
return v;
}
bool Wallet_startBackgroundSync(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_startBackgroundSync');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_startBackgroundSync(ptr);
debugEnd?.call('WOWNERO_Wallet_startBackgroundSync');
return v;
}
bool Wallet_stopBackgroundSync(wallet ptr, String walletPassword) {
debugStart?.call('WOWNERO_Wallet_stopBackgroundSync');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final walletPassword_ = walletPassword.toNativeUtf8().cast<Char>();
final v = lib!.WOWNERO_Wallet_stopBackgroundSync(ptr, walletPassword_);
calloc.free(walletPassword_);
debugEnd?.call('WOWNERO_Wallet_stopBackgroundSync');
return v;
}
bool Wallet_isBackgroundSyncing(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_isBackgroundSyncing');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_isBackgroundSyncing(ptr);
debugEnd?.call('WOWNERO_Wallet_isBackgroundSyncing');
return v;
}
bool Wallet_isBackgroundWallet(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_isBackgroundWallet');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_isBackgroundWallet(ptr);
debugEnd?.call('WOWNERO_Wallet_isBackgroundWallet');
return v;
}
TransactionHistory Wallet_history(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_history');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final history = lib!.WOWNERO_Wallet_history(ptr);
debugEnd?.call('WOWNERO_Wallet_history');
return history;
}
AddressBook Wallet_addressBook(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_addressBook');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final history = lib!.WOWNERO_Wallet_addressBook(ptr);
debugEnd?.call('WOWNERO_Wallet_addressBook');
return history;
}
AddressBook Wallet_coins(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_coins');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final history = lib!.WOWNERO_Wallet_coins(ptr);
debugEnd?.call('WOWNERO_Wallet_coins');
return history;
}
AddressBook Wallet_subaddress(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_subaddress');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final history = lib!.WOWNERO_Wallet_subaddress(ptr);
debugEnd?.call('WOWNERO_Wallet_subaddress');
return history;
}
AddressBook Wallet_subaddressAccount(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_subaddressAccount');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final history = lib!.WOWNERO_Wallet_subaddressAccount(ptr);
debugEnd?.call('WOWNERO_Wallet_subaddressAccount');
return history;
}
int Wallet_defaultMixin(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_defaultMixin');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_defaultMixin(ptr);
debugEnd?.call('WOWNERO_Wallet_defaultMixin');
return v;
}
void Wallet_setDefaultMixin(wallet ptr, int arg) {
debugStart?.call('WOWNERO_Wallet_setDefaultMixin');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_setDefaultMixin(ptr, arg);
debugEnd?.call('WOWNERO_Wallet_setDefaultMixin');
return v;
}
bool Wallet_setCacheAttribute(wallet ptr,
{required String key, required String value}) {
debugStart?.call('WOWNERO_Wallet_setCacheAttribute');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final key_ = key.toNativeUtf8().cast<Char>();
final value_ = value.toNativeUtf8().cast<Char>();
final v = lib!.WOWNERO_Wallet_setCacheAttribute(ptr, key_, value_);
calloc.free(key_);
calloc.free(value_);
debugEnd?.call('WOWNERO_Wallet_setCacheAttribute');
return v;
}
String Wallet_getCacheAttribute(wallet ptr, {required String key}) {
debugStart?.call('WOWNERO_Wallet_getCacheAttribute');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final key_ = key.toNativeUtf8().cast<Char>();
final strPtr =
lib!.WOWNERO_Wallet_getCacheAttribute(ptr, key_).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
calloc.free(key_);
debugEnd?.call('WOWNERO_Wallet_getCacheAttribute');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_getCacheAttribute', e);
debugEnd?.call('WOWNERO_Wallet_getCacheAttribute');
return "";
}
}
bool Wallet_setUserNote(wallet ptr,
{required String txid, required String note}) {
debugStart?.call('WOWNERO_Wallet_setUserNote');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final txid_ = txid.toNativeUtf8().cast<Char>();
final note_ = note.toNativeUtf8().cast<Char>();
final v = lib!.WOWNERO_Wallet_setUserNote(ptr, txid_, note_);
calloc.free(txid_);
calloc.free(note_);
debugEnd?.call('WOWNERO_Wallet_setUserNote');
return v;
}
String Wallet_getUserNote(wallet ptr, {required String txid}) {
debugStart?.call('WOWNERO_Wallet_getUserNote');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final txid_ = txid.toNativeUtf8().cast<Char>();
final strPtr = lib!.WOWNERO_Wallet_getUserNote(ptr, txid_).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
calloc.free(txid_);
debugEnd?.call('WOWNERO_Wallet_getUserNote');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_getUserNote', e);
debugEnd?.call('WOWNERO_Wallet_getUserNote');
return "";
}
}
String Wallet_getTxKey(wallet ptr, {required String txid}) {
debugStart?.call('WOWNERO_Wallet_getTxKey');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final txid_ = txid.toNativeUtf8().cast<Char>();
final strPtr = lib!.WOWNERO_Wallet_getTxKey(ptr, txid_).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
calloc.free(txid_);
debugEnd?.call('WOWNERO_Wallet_getTxKey');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_getTxKey', e);
debugEnd?.call('WOWNERO_Wallet_getTxKey');
return "";
}
}
String Wallet_signMessage(
wallet ptr, {
required String message,
required String address,
}) {
debugStart?.call('WOWNERO_Wallet_signMessage');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final message_ = message.toNativeUtf8().cast<Char>();
final address_ = address.toNativeUtf8().cast<Char>();
final strPtr =
lib!.WOWNERO_Wallet_signMessage(ptr, message_, address_).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
calloc.free(message_);
calloc.free(address_);
debugEnd?.call('WOWNERO_Wallet_signMessage');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_signMessage', e);
debugEnd?.call('WOWNERO_Wallet_signMessage');
return "";
}
}
bool Wallet_verifySignedMessage(
wallet ptr, {
required String message,
required String address,
required String signature,
}) {
debugStart?.call('WOWNERO_Wallet_verifySignedMessage');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final message_ = message.toNativeUtf8().cast<Char>();
final address_ = address.toNativeUtf8().cast<Char>();
final signature_ = signature.toNativeUtf8().cast<Char>();
final v = lib!
.WOWNERO_Wallet_verifySignedMessage(ptr, message_, address_, signature_);
calloc.free(message_);
calloc.free(address_);
calloc.free(signature_);
debugEnd?.call('WOWNERO_Wallet_verifySignedMessage');
return v;
}
bool Wallet_rescanSpent(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_rescanSpent');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_rescanSpent(ptr);
debugEnd?.call('WOWNERO_Wallet_rescanSpent');
return v;
}
void Wallet_setOffline(wallet ptr, {required bool offline}) {
debugStart?.call('WOWNERO_Wallet_setOffline');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final setOffline = lib!.WOWNERO_Wallet_setOffline(ptr, offline);
debugEnd?.call('WOWNERO_Wallet_setOffline');
return setOffline;
}
bool Wallet_isOffline(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_isOffline');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final isOffline = lib!.WOWNERO_Wallet_isOffline(ptr);
debugEnd?.call('WOWNERO_Wallet_isOffline');
return isOffline;
}
void Wallet_segregatePreForkOutputs(wallet ptr, {required bool segregate}) {
debugStart?.call('WOWNERO_Wallet_segregatePreForkOutputs');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_segregatePreForkOutputs(ptr, segregate);
debugEnd?.call('WOWNERO_Wallet_segregatePreForkOutputs');
return v;
}
void Wallet_segregationHeight(wallet ptr, {required int height}) {
debugStart?.call('WOWNERO_Wallet_segregationHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_segregationHeight(ptr, height);
debugEnd?.call('WOWNERO_Wallet_segregationHeight');
return v;
}
void Wallet_keyReuseMitigation2(wallet ptr, {required bool mitigation}) {
debugStart?.call('WOWNERO_Wallet_keyReuseMitigation2');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_keyReuseMitigation2(ptr, mitigation);
debugEnd?.call('WOWNERO_Wallet_keyReuseMitigation2');
return v;
}
bool Wallet_lockKeysFile(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_lockKeysFile');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_lockKeysFile(ptr);
debugEnd?.call('WOWNERO_Wallet_lockKeysFile');
return v;
}
bool Wallet_unlockKeysFile(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_unlockKeysFile');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_unlockKeysFile(ptr);
debugEnd?.call('WOWNERO_Wallet_unlockKeysFile');
return v;
}
bool Wallet_isKeysFileLocked(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_isKeysFileLocked');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_isKeysFileLocked(ptr);
debugEnd?.call('WOWNERO_Wallet_isKeysFileLocked');
return v;
}
int Wallet_getDeviceType(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_getDeviceType');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_getDeviceType(ptr);
debugEnd?.call('WOWNERO_Wallet_getDeviceType');
return v;
}
int Wallet_coldKeyImageSync(wallet ptr,
{required int spent, required int unspent}) {
debugStart?.call('WOWNERO_Wallet_coldKeyImageSync');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final v = lib!.WOWNERO_Wallet_coldKeyImageSync(ptr, spent, unspent);
debugEnd?.call('WOWNERO_Wallet_coldKeyImageSync');
return v;
}
String Wallet_deviceShowAddress(wallet ptr,
{required int accountIndex, required int addressIndex}) {
debugStart?.call('WOWNERO_Wallet_deviceShowAddress');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!
.WOWNERO_Wallet_deviceShowAddress(ptr, accountIndex, addressIndex)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_Wallet_deviceShowAddress');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_Wallet_deviceShowAddress', e);
debugEnd?.call('WOWNERO_Wallet_deviceShowAddress');
return "";
}
}
bool Wallet_reconnectDevice(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_reconnectDevice');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final ret = lib!.WOWNERO_Wallet_reconnectDevice(ptr);
return ret;
}
int Wallet_getBytesReceived(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_getBytesReceived');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final getBytesReceived = lib!.WOWNERO_Wallet_getBytesReceived(ptr);
debugEnd?.call('WOWNERO_Wallet_getBytesReceived');
return getBytesReceived;
}
int Wallet_getBytesSent(wallet ptr) {
debugStart?.call('WOWNERO_Wallet_getBytesReceived');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final getBytesSent = lib!.WOWNERO_Wallet_getBytesSent(ptr);
debugEnd?.call('WOWNERO_Wallet_getBytesReceived');
return getBytesSent;
}
// WalletManager
typedef WalletManager = Pointer<Void>;
wallet WalletManager_createWallet(
WalletManager wm_ptr, {
required String path,
required String password,
String language = "English",
int networkType = 0,
}) {
debugStart?.call('WOWNERO_WalletManager_createWallet');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final path_ = path.toNativeUtf8().cast<Char>();
final password_ = password.toNativeUtf8().cast<Char>();
final language_ = language.toNativeUtf8().cast<Char>();
final w = lib!.WOWNERO_WalletManager_createWallet(
wm_ptr, path_, password_, language_, networkType);
calloc.free(path_);
calloc.free(password_);
calloc.free(language_);
debugEnd?.call('WOWNERO_WalletManager_createWallet');
return w;
}
wallet WalletManager_openWallet(
WalletManager wm_ptr, {
required String path,
required String password,
int networkType = 0,
}) {
debugStart?.call('WOWNERO_WalletManager_openWallet');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final path_ = path.toNativeUtf8().cast<Char>();
final password_ = password.toNativeUtf8().cast<Char>();
final w = lib!
.WOWNERO_WalletManager_openWallet(wm_ptr, path_, password_, networkType);
calloc.free(path_);
calloc.free(password_);
debugEnd?.call('WOWNERO_WalletManager_openWallet');
return w;
}
wallet WalletManager_recoveryWallet(
WalletManager wm_ptr, {
required String path,
required String password,
required String mnemonic,
int networkType = 0,
required int restoreHeight,
int kdfRounds = 0,
required String seedOffset,
}) {
debugStart?.call('WOWNERO_WalletManager_recoveryWallet');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final path_ = path.toNativeUtf8().cast<Char>();
final password_ = password.toNativeUtf8().cast<Char>();
final mnemonic_ = mnemonic.toNativeUtf8().cast<Char>();
final seedOffset_ = seedOffset.toNativeUtf8().cast<Char>();
final w = lib!.WOWNERO_WalletManager_recoveryWallet(wm_ptr, path_, password_,
mnemonic_, networkType, restoreHeight, kdfRounds, seedOffset_);
calloc.free(path_);
calloc.free(password_);
calloc.free(mnemonic_);
calloc.free(seedOffset_);
debugEnd?.call('WOWNERO_WalletManager_recoveryWallet');
return w;
}
wallet WalletManager_createWalletFromKeys(
WalletManager wm_ptr, {
required String path,
required String password,
String language = "English",
int nettype = 1,
required int restoreHeight,
required String addressString,
required String viewKeyString,
required String spendKeyString,
int kdf_rounds = 1,
}) {
lib ??= WowneroC(DynamicLibrary.open(libPath));
debugStart?.call('WOWNERO_WalletManager_createWalletFromKeys');
final path_ = path.toNativeUtf8().cast<Char>();
final password_ = password.toNativeUtf8().cast<Char>();
final language_ = language.toNativeUtf8().cast<Char>();
final addressString_ = addressString.toNativeUtf8().cast<Char>();
final viewKeyString_ = viewKeyString.toNativeUtf8().cast<Char>();
final spendKeyString_ = spendKeyString.toNativeUtf8().cast<Char>();
final w = lib!.WOWNERO_WalletManager_createWalletFromKeys(
wm_ptr,
path_,
password_,
language_,
nettype,
restoreHeight,
addressString_,
viewKeyString_,
spendKeyString_,
kdf_rounds,
);
calloc.free(path_);
calloc.free(password_);
calloc.free(language_);
calloc.free(addressString_);
calloc.free(viewKeyString_);
calloc.free(spendKeyString_);
debugEnd?.call('WOWNERO_WalletManager_createWalletFromKeys');
return w;
}
wallet WalletManager_createDeterministicWalletFromSpendKey(
WalletManager wm_ptr, {
required String path,
required String password,
int networkType = 0,
required String language,
required String spendKeyString,
required bool newWallet,
required int restoreHeight,
int kdfRounds = 1,
}) {
debugStart
?.call('WOWNERO_WalletManager_createDeterministicWalletFromSpendKey');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final path_ = path.toNativeUtf8().cast<Char>();
final password_ = password.toNativeUtf8().cast<Char>();
final language_ = language.toNativeUtf8().cast<Char>();
final spendKeyString_ = spendKeyString.toNativeUtf8().cast<Char>();
final w = lib!.WOWNERO_WalletManager_createDeterministicWalletFromSpendKey(
wm_ptr,
path_,
password_,
language_,
networkType,
restoreHeight,
spendKeyString_,
kdfRounds);
calloc.free(path_);
calloc.free(password_);
calloc.free(language_);
calloc.free(spendKeyString_);
debugEnd?.call('WOWNERO_WalletManager_createDeterministicWalletFromSpendKey');
return w;
}
wallet WalletManager_createWalletFromPolyseed(
WalletManager wm_ptr, {
required String path,
required String password,
int networkType = 0,
required String mnemonic,
required String seedOffset,
required bool newWallet,
required int restoreHeight,
required int kdfRounds,
}) {
debugStart?.call('WOWNERO_WalletManager_createWalletFromPolyseed');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final path_ = path.toNativeUtf8().cast<Char>();
final password_ = password.toNativeUtf8().cast<Char>();
final mnemonic_ = mnemonic.toNativeUtf8().cast<Char>();
final seedOffset_ = seedOffset.toNativeUtf8().cast<Char>();
final w = lib!.WOWNERO_WalletManager_createWalletFromPolyseed(
wm_ptr,
path_,
password_,
networkType,
mnemonic_,
seedOffset_,
newWallet,
restoreHeight,
kdfRounds);
calloc.free(path_);
calloc.free(password_);
calloc.free(mnemonic_);
calloc.free(seedOffset_);
debugEnd?.call('WOWNERO_WalletManager_createWalletFromPolyseed');
return w;
}
bool WalletManager_closeWallet(WalletManager wm_ptr, wallet ptr, bool store) {
debugStart?.call('WOWNERO_WalletManager_closeWallet');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final closeWallet =
lib!.WOWNERO_WalletManager_closeWallet(wm_ptr, ptr, store);
debugEnd?.call('WOWNERO_WalletManager_closeWallet');
return closeWallet;
}
bool WalletManager_walletExists(WalletManager wm_ptr, String path) {
debugStart?.call('WOWNERO_WalletManager_walletExists');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final path_ = path.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_WalletManager_walletExists(wm_ptr, path_);
calloc.free(path_);
debugEnd?.call('WOWNERO_WalletManager_walletExists');
return s;
}
bool WalletManager_verifyWalletPassword(
WalletManager wm_ptr, {
required String keysFileName,
required String password,
required bool noSpendKey,
required int kdfRounds,
}) {
debugStart?.call('WOWNERO_WalletManager_verifyWalletPassword');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final keysFileName_ = keysFileName.toNativeUtf8().cast<Char>();
final password_ = password.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_WalletManager_verifyWalletPassword(
wm_ptr, keysFileName_, password_, noSpendKey, kdfRounds);
calloc.free(keysFileName_);
calloc.free(password_);
debugEnd?.call('WOWNERO_WalletManager_verifyWalletPassword');
return s;
}
String WalletManager_findWallets(WalletManager wm_ptr, {required String path}) {
debugStart?.call('WOWNERO_WalletManager_findWallets');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final path_ = path.toNativeUtf8().cast<Char>();
final strPtr = lib!
.WOWNERO_WalletManager_findWallets(wm_ptr, path_, defaultSeparator)
.cast<Utf8>();
final str = strPtr.toDartString();
calloc.free(path_);
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_WalletManager_findWallets');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_WalletManager_findWallets', e);
debugEnd?.call('WOWNERO_WalletManager_findWallets');
return "";
}
}
String WalletManager_errorString(WalletManager wm_ptr) {
debugStart?.call('WOWNERO_WalletManager_errorString');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final strPtr = lib!.WOWNERO_WalletManager_errorString(wm_ptr).cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_WalletManager_errorString');
return str;
} catch (e) {
errorHandler?.call('WOWNERO_WalletManager_errorString', e);
debugEnd?.call('WOWNERO_WalletManager_errorString');
return "";
}
}
void WalletManager_setDaemonAddress(WalletManager wm_ptr, String address) {
debugStart?.call('WOWNERO_WalletManager_setDaemonAddress');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final address_ = address.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_WalletManager_setDaemonAddress(wm_ptr, address_);
calloc.free(address_);
debugEnd?.call('WOWNERO_WalletManager_setDaemonAddress');
return s;
}
int WalletManager_blockchainHeight(WalletManager wm_ptr) {
debugStart?.call('WOWNERO_WalletManager_blockchainHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_WalletManager_blockchainHeight(wm_ptr);
debugEnd?.call('WOWNERO_WalletManager_blockchainHeight');
return s;
}
int WalletManager_blockchainTargetHeight(WalletManager wm_ptr) {
debugStart?.call('WOWNERO_WalletManager_blockchainTargetHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_WalletManager_blockchainTargetHeight(wm_ptr);
debugEnd?.call('WOWNERO_WalletManager_blockchainTargetHeight');
return s;
}
int WalletManager_networkDifficulty(WalletManager wm_ptr) {
debugStart?.call('WOWNERO_WalletManager_networkDifficulty');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_WalletManager_networkDifficulty(wm_ptr);
debugEnd?.call('WOWNERO_WalletManager_networkDifficulty');
return s;
}
double WalletManager_miningHashRate(WalletManager wm_ptr) {
debugStart?.call('WOWNERO_WalletManager_miningHashRate');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_WalletManager_miningHashRate(wm_ptr);
debugEnd?.call('WOWNERO_WalletManager_miningHashRate');
return s;
}
int WalletManager_blockTarget(WalletManager wm_ptr) {
debugStart?.call('WOWNERO_WalletManager_blockTarget');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_WalletManager_blockTarget(wm_ptr);
debugEnd?.call('WOWNERO_WalletManager_blockTarget');
return s;
}
bool WalletManager_isMining(WalletManager wm_ptr) {
debugStart?.call('WOWNERO_WalletManager_isMining');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_WalletManager_isMining(wm_ptr);
debugEnd?.call('WOWNERO_WalletManager_isMining');
return s;
}
bool WalletManager_startMining(
WalletManager wm_ptr, {
required String address,
required int threads,
required bool backgroundMining,
required bool ignoreBattery,
}) {
debugStart?.call('WOWNERO_WalletManager_startMining');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final address_ = address.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_WalletManager_startMining(
wm_ptr, address_, threads, backgroundMining, ignoreBattery);
calloc.free(address_);
debugEnd?.call('WOWNERO_WalletManager_startMining');
return s;
}
bool WalletManager_stopMining(WalletManager wm_ptr, String address) {
debugStart?.call('WOWNERO_WalletManager_stopMining');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final address_ = address.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_WalletManager_stopMining(wm_ptr, address_);
calloc.free(address_);
debugEnd?.call('WOWNERO_WalletManager_stopMining');
return s;
}
String WalletManager_resolveOpenAlias(
WalletManager wm_ptr, {
required String address,
required bool dnssecValid,
}) {
debugStart?.call('WOWNERO_WalletManager_resolveOpenAlias');
lib ??= WowneroC(DynamicLibrary.open(libPath));
try {
final address_ = address.toNativeUtf8().cast<Char>();
final strPtr = lib!
.WOWNERO_WalletManager_resolveOpenAlias(wm_ptr, address_, dnssecValid)
.cast<Utf8>();
final str = strPtr.toDartString();
WOWNERO_free(strPtr.cast());
debugEnd?.call('WOWNERO_WalletManager_resolveOpenAlias');
calloc.free(address_);
return str;
} catch (e) {
errorHandler?.call('WOWNERO_WalletManager_resolveOpenAlias', e);
debugEnd?.call('WOWNERO_WalletManager_resolveOpenAlias');
return "";
}
}
bool WalletManager_setProxy(WalletManager wm_ptr, String address) {
debugStart?.call('WOWNERO_WalletManager_setProxy');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final address_ = address.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_WalletManager_setProxy(wm_ptr, address_);
calloc.free(address_);
debugEnd?.call('WOWNERO_WalletManager_setProxy');
return s;
}
void WalletManagerFactory_setLogLevel(int level) {
debugStart?.call('WOWNERO_WalletManagerFactory_setLogLevel');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_WalletManagerFactory_setLogLevel(level);
debugEnd?.call('WOWNERO_WalletManagerFactory_setLogLevel');
return s;
}
void WalletManagerFactory_setLogCategories(String categories) {
debugStart?.call('WOWNERO_WalletManagerFactory_setLogCategories');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final categories_ = categories.toNativeUtf8().cast<Char>();
final s = lib!.WOWNERO_WalletManagerFactory_setLogCategories(categories_);
calloc.free(categories_);
debugEnd?.call('WOWNERO_WalletManagerFactory_setLogCategories');
return s;
}
WalletManager WalletManagerFactory_getWalletManager() {
debugStart?.call('WOWNERO_WalletManagerFactory_getWalletManager');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_WalletManagerFactory_getWalletManager();
debugEnd?.call('WOWNERO_WalletManagerFactory_getWalletManager');
return s;
}
// class LogLevel {
// int get LogLevel_Silent => lib!.LogLevel_Silent;
// int get LogLevel_0 => lib!.LogLevel_0;
// int get LogLevel_1 => lib!.LogLevel_1;
// int get LogLevel_2 => lib!.LogLevel_2;
// int get LogLevel_3 => lib!.LogLevel_3;
// int get LogLevel_4 => lib!.LogLevel_4;
// int get LogLevel_Min => LogLevel_Silent;
// int get LogLevel_Max => lib!.LogLevel_4;
// }
// class ConnectionStatus {
// int get Disconnected => lib!.WalletConnectionStatus_Disconnected;
// int get Connected => lib!.WalletConnectionStatus_Connected;
// int get WrongVersion => lib!.WalletConnectionStatus_WrongVersion;
// }
// DEBUG
class libOk {
libOk(
this.test1,
this.test2,
this.test3,
this.test4,
this.test5,
this.test5_std,
);
final bool test1;
final int test2;
final int test3;
final Pointer<Void> test4;
final Pointer<Char> test5;
String get test5_str {
try {
return test5.cast<Utf8>().toDartString();
} catch (e) {
return "$e";
}
}
String get test5_str16 {
try {
return test5.cast<Utf16>().toDartString();
} catch (e) {
return "$e";
}
}
final Pointer<Char> test5_std;
String get test5_std_str {
try {
return test5_std.cast<Utf8>().toDartString();
} catch (e) {
return "$e";
}
}
String get test5_std_str16 {
try {
return test5_std.cast<Utf16>().toDartString();
} catch (e) {
return "$e";
}
}
Map<String, dynamic> toJson() {
return {
"test1": test1,
"test2": test2,
"test3": test3,
"test4": test4.toString(),
"test5": test5.toString(),
"test5_str": test5_str,
"test5_std": test5_std.toString(),
"test5_std_str": test5_std_str,
};
}
}
libOk isLibOk() {
lib ??= WowneroC(DynamicLibrary.open(libPath));
lib!.WOWNERO_DEBUG_test0();
final test1 = lib!.WOWNERO_DEBUG_test1(true);
final test2 = lib!.WOWNERO_DEBUG_test2(-1);
final test3 = lib!.WOWNERO_DEBUG_test3(1);
final test4 = lib!.WOWNERO_DEBUG_test4(1);
final test5 = lib!.WOWNERO_DEBUG_test5();
final test5_std = lib!.WOWNERO_DEBUG_test5_std();
return libOk(test1, test2, test3, test4, test5, test5_std);
}
// cake world
typedef WalletListener = Pointer<Void>;
WalletListener WOWNERO_cw_getWalletListener(wallet wptr) {
debugStart?.call('WOWNERO_cw_getWalletListener');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_cw_getWalletListener(wptr);
debugEnd?.call('WOWNERO_cw_getWalletListener');
return s;
}
void WOWNERO_cw_WalletListener_resetNeedToRefresh(WalletListener wlptr) {
debugStart?.call('WOWNERO_cw_WalletListener_resetNeedToRefresh');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_cw_WalletListener_resetNeedToRefresh(wlptr);
debugEnd?.call('WOWNERO_cw_WalletListener_resetNeedToRefresh');
return s;
}
bool WOWNERO_cw_WalletListener_isNeedToRefresh(WalletListener wlptr) {
debugStart?.call('WOWNERO_cw_WalletListener_isNeedToRefresh');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_cw_WalletListener_isNeedToRefresh(wlptr);
debugEnd?.call('WOWNERO_cw_WalletListener_isNeedToRefresh');
return s;
}
bool WOWNERO_cw_WalletListener_isNewTransactionExist(WalletListener wlptr) {
debugStart?.call('WOWNERO_cw_WalletListener_isNewTransactionExist');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_cw_WalletListener_isNewTransactionExist(wlptr);
debugEnd?.call('WOWNERO_cw_WalletListener_isNewTransactionExist');
return s;
}
void WOWNERO_cw_WalletListener_resetIsNewTransactionExist(
WalletListener wlptr) {
debugStart?.call('WOWNERO_cw_WalletListener_resetIsNewTransactionExist');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_cw_WalletListener_resetIsNewTransactionExist(wlptr);
debugEnd?.call('WOWNERO_cw_WalletListener_resetIsNewTransactionExist');
return s;
}
int WOWNERO_cw_WalletListener_height(WalletListener wlptr) {
debugStart?.call('WOWNERO_cw_WalletListener_height');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_cw_WalletListener_height(wlptr);
debugEnd?.call('WOWNERO_cw_WalletListener_height');
return s;
}
wallet WOWNERO_deprecated_restore14WordSeed({
required String path,
required String password,
required String language,
required int networkType,
}) {
debugStart?.call('WOWNERO_deprecated_restore14WordSeed');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final path_ = path.toNativeUtf8();
final password_ = password.toNativeUtf8();
final language_ = language.toNativeUtf8();
final s = lib!.WOWNERO_deprecated_restore14WordSeed(
path_.cast(), password_.cast(), language_.cast(), networkType);
calloc.free(path_);
calloc.free(password_);
calloc.free(language_);
debugEnd?.call('WOWNERO_deprecated_restore14WordSeed');
return s;
}
wallet WOWNERO_deprecated_create14WordSeed({
required String path,
required String password,
required String language,
required int networkType,
}) {
debugStart?.call('WOWNERO_deprecated_create14WordSeed');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final path_ = path.toNativeUtf8();
final password_ = path.toNativeUtf8();
final language_ = path.toNativeUtf8();
final s = lib!.WOWNERO_deprecated_create14WordSeed(
path_.cast(), password_.cast(), language_.cast(), networkType);
calloc.free(path_);
calloc.free(password_);
calloc.free(language_);
debugEnd?.call('WOWNERO_deprecated_create14WordSeed');
return s;
}
int WOWNERO_deprecated_14WordSeedHeight({
required String seed,
}) {
debugStart?.call('WOWNERO_deprecated_14WordSeedHeight');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final seed_ = seed.toNativeUtf8();
final s = lib!.WOWNERO_deprecated_14WordSeedHeight(seed_.cast());
calloc.free(seed_);
debugEnd?.call('WOWNERO_deprecated_14WordSeedHeight');
return s;
}
String WOWNERO_checksum_wallet2_api_c_h() {
debugStart?.call('WOWNERO_checksum_wallet2_api_c_h');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_checksum_wallet2_api_c_h();
debugEnd?.call('WOWNERO_checksum_wallet2_api_c_h');
return s.cast<Utf8>().toDartString();
}
String WOWNERO_checksum_wallet2_api_c_cpp() {
debugStart?.call('WOWNERO_checksum_wallet2_api_c_cpp');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_checksum_wallet2_api_c_cpp();
debugEnd?.call('WOWNERO_checksum_wallet2_api_c_cpp');
return s.cast<Utf8>().toDartString();
}
String WOWNERO_checksum_wallet2_api_c_exp() {
debugStart?.call('WOWNERO_checksum_wallet2_api_c_exp');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_checksum_wallet2_api_c_exp();
debugEnd?.call('WOWNERO_checksum_wallet2_api_c_exp');
return s.cast<Utf8>().toDartString();
}
int WOWNERO_checksum_wallet2_api_c_version() {
debugStart?.call('WOWNERO_checksum_wallet2_api_c_version');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_checksum_wallet2_api_c_version();
debugEnd?.call('WOWNERO_checksum_wallet2_api_c_version');
return s;
}
String WOWNERO_checksum_wallet2_api_c_date() {
debugStart?.call('WOWNERO_checksum_wallet2_api_c_date');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_checksum_wallet2_api_c_date();
debugEnd?.call('WOWNERO_checksum_wallet2_api_c_date');
return s.cast<Utf8>().toDartString();
}
void WOWNERO_free(Pointer<Void> wlptr) {
debugStart?.call('WOWNERO_free');
lib ??= WowneroC(DynamicLibrary.open(libPath));
final s = lib!.WOWNERO_free(wlptr);
debugEnd?.call('WOWNERO_free');
return s;
}
|