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
/* automatically generated by rust-bindgen */ pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; pub const __USE_ISOC11 : u32 = 1 ; pub const __USE_ISOC99 : u32 = 1 ; pub const __USE_ISOC95 : u32 = 1 ; pub const __USE_POSIX_IMPLICITLY : u32 = 1 ; pub const _POSIX_SOURCE : u32 = 1 ; pub const _POSIX_C_SOURCE : u32 = 200809 ; pub const __USE_POSIX : u32 = 1 ; pub const __USE_POSIX2 : u32 = 1 ; pub const __USE_POSIX199309 : u32 = 1 ; pub const __USE_POSIX199506 : u32 = 1 ; pub const __USE_XOPEN2K : u32 = 1 ; pub const __USE_XOPEN2K8 : u32 = 1 ; pub const _ATFILE_SOURCE : u32 = 1 ; pub const __USE_MISC : u32 = 1 ; pub const __USE_ATFILE : u32 = 1 ; pub const __USE_FORTIFY_LEVEL : u32 = 0 ; pub const _STDC_PREDEF_H : u32 = 1 ; pub const __STDC_IEC_559__ : u32 = 1 ; pub const __STDC_IEC_559_COMPLEX__ : u32 = 1 ; pub const __STDC_ISO_10646__ : u32 = 201605 ; pub const __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 24 ; pub const _SYS_CDEFS_H : u32 = 1 ; pub const __WORDSIZE : u32 = 64 ; pub const __WORDSIZE_TIME64_COMPAT32 : u32 = 1 ; pub const __SYSCALL_WORDSIZE : u32 = 64 ; pub const _BITS_WCHAR_H : u32 = 1 ; pub const INT8_MIN : i32 = -128 ; pub const INT16_MIN : i32 = -32768 ; pub const INT32_MIN : i32 = -2147483648 ; pub const INT8_MAX : u32 = 127 ; pub const INT16_MAX : u32 = 32767 ; pub const INT32_MAX : u32 = 2147483647 ; pub const UINT8_MAX : u32 = 255 ; pub const UINT16_MAX : u32 = 65535 ; pub const UINT32_MAX : u32 = 4294967295 ; pub const INT_LEAST8_MIN : i32 = -128 ; pub const INT_LEAST16_MIN : i32 = -32768 ; pub const INT_LEAST32_MIN : i32 = -2147483648 ; pub const INT_LEAST8_MAX : u32 = 127 ; pub const INT_LEAST16_MAX : u32 = 32767 ; pub const INT_LEAST32_MAX : u32 = 2147483647 ; pub const UINT_LEAST8_MAX : u32 = 255 ; pub const UINT_LEAST16_MAX : u32 = 65535 ; pub const UINT_LEAST32_MAX : u32 = 4294967295 ; pub const INT_FAST8_MIN : i32 = -128 ; pub const INT_FAST16_MIN : i64 = -9223372036854775808 ; pub const INT_FAST32_MIN : i64 = -9223372036854775808 ; pub const INT_FAST8_MAX : u32 = 127 ; pub const INT_FAST16_MAX : u64 = 9223372036854775807 ; pub const INT_FAST32_MAX : u64 = 9223372036854775807 ; pub const UINT_FAST8_MAX : u32 = 255 ; pub const UINT_FAST16_MAX : i32 = -1 ; pub const UINT_FAST32_MAX : i32 = -1 ; pub const INTPTR_MIN : i64 = -9223372036854775808 ; pub const INTPTR_MAX : u64 = 9223372036854775807 ; pub const UINTPTR_MAX : i32 = -1 ; pub const PTRDIFF_MIN : i64 = -9223372036854775808 ; pub const PTRDIFF_MAX : u64 = 9223372036854775807 ; pub const SIG_ATOMIC_MIN : i32 = -2147483648 ; pub const SIG_ATOMIC_MAX : u32 = 2147483647 ; pub const SIZE_MAX : i32 = -1 ; pub const WINT_MIN : u32 = 0 ; pub const WINT_MAX : u32 = 4294967295 ; pub const indy_error_t_Neg : indy_error_t = -1 ; pub const indy_error_t_Success : indy_error_t = 0 ; pub const indy_error_t_CommonInvalidParam1 : indy_error_t = 100 ; pub const indy_error_t_CommonInvalidParam2 : indy_error_t = 101 ; pub const indy_error_t_CommonInvalidParam3 : indy_error_t = 102 ; pub const indy_error_t_CommonInvalidParam4 : indy_error_t = 103 ; pub const indy_error_t_CommonInvalidParam5 : indy_error_t = 104 ; pub const indy_error_t_CommonInvalidParam6 : indy_error_t = 105 ; pub const indy_error_t_CommonInvalidParam7 : indy_error_t = 106 ; pub const indy_error_t_CommonInvalidParam8 : indy_error_t = 107 ; pub const indy_error_t_CommonInvalidParam9 : indy_error_t = 108 ; pub const indy_error_t_CommonInvalidParam10 : indy_error_t = 109 ; pub const indy_error_t_CommonInvalidParam11 : indy_error_t = 110 ; pub const indy_error_t_CommonInvalidParam12 : indy_error_t = 111 ; pub const indy_error_t_CommonInvalidState : indy_error_t = 112 ; pub const indy_error_t_CommonInvalidStructure : indy_error_t = 113 ; pub const indy_error_t_CommonIOError : indy_error_t = 114 ; pub const indy_error_t_CommonInvalidParam13 : indy_error_t = 115 ; pub const indy_error_t_CommonInvalidParam14 : indy_error_t = 116 ; pub const indy_error_t_CommonInvalidParam15 : indy_error_t = 117 ; pub const indy_error_t_CommonInvalidParam16 : indy_error_t = 118 ; pub const indy_error_t_CommonInvalidParam17 : indy_error_t = 119 ; pub const indy_error_t_CommonInvalidParam18 : indy_error_t = 120 ; pub const indy_error_t_CommonInvalidParam19 : indy_error_t = 121 ; pub const indy_error_t_CommonInvalidParam20 : indy_error_t = 122 ; pub const indy_error_t_CommonInvalidParam21 : indy_error_t = 123 ; pub const indy_error_t_CommonInvalidParam22 : indy_error_t = 124 ; pub const indy_error_t_CommonInvalidParam23 : indy_error_t = 125 ; pub const indy_error_t_CommonInvalidParam24 : indy_error_t = 126 ; pub const indy_error_t_CommonInvalidParam25 : indy_error_t = 127 ; pub const indy_error_t_CommonInvalidParam26 : indy_error_t = 128 ; pub const indy_error_t_CommonInvalidParam27 : indy_error_t = 129 ; pub const indy_error_t_WalletInvalidHandle : indy_error_t = 200 ; pub const indy_error_t_WalletUnknownTypeError : indy_error_t = 201 ; pub const indy_error_t_WalletTypeAlreadyRegisteredError : indy_error_t = 202 ; pub const indy_error_t_WalletAlreadyExistsError : indy_error_t = 203 ; pub const indy_error_t_WalletNotFoundError : indy_error_t = 204 ; pub const indy_error_t_WalletIncompatiblePoolError : indy_error_t = 205 ; pub const indy_error_t_WalletAlreadyOpenedError : indy_error_t = 206 ; pub const indy_error_t_WalletAccessFailed : indy_error_t = 207 ; pub const indy_error_t_WalletInputError : indy_error_t = 208 ; pub const indy_error_t_WalletDecodingError : indy_error_t = 209 ; pub const indy_error_t_WalletStorageError : indy_error_t = 210 ; pub const indy_error_t_WalletEncryptionError : indy_error_t = 211 ; pub const indy_error_t_WalletItemNotFound : indy_error_t = 212 ; pub const indy_error_t_WalletItemAlreadyExists : indy_error_t = 213 ; pub const indy_error_t_WalletQueryError : indy_error_t = 214 ; pub const indy_error_t_PoolLedgerNotCreatedError : indy_error_t = 300 ; pub const indy_error_t_PoolLedgerInvalidPoolHandle : indy_error_t = 301 ; pub const indy_error_t_PoolLedgerTerminated : indy_error_t = 302 ; pub const indy_error_t_LedgerNoConsensusError : indy_error_t = 303 ; pub const indy_error_t_LedgerInvalidTransaction : indy_error_t = 304 ; pub const indy_error_t_LedgerSecurityError : indy_error_t = 305 ; pub const indy_error_t_PoolLedgerConfigAlreadyExistsError : indy_error_t = 306 ; pub const indy_error_t_PoolLedgerTimeout : indy_error_t = 307 ; pub const indy_error_t_PoolIncompatibleProtocolVersion : indy_error_t = 308 ; pub const indy_error_t_AnoncredsRevocationRegistryFullError : indy_error_t = 400 ; pub const indy_error_t_AnoncredsInvalidUserRevocId : indy_error_t = 401 ; pub const indy_error_t_AnoncredsMasterSecretDuplicateNameError : indy_error_t = 404 ; pub const indy_error_t_AnoncredsProofRejected : indy_error_t = 405 ; pub const indy_error_t_AnoncredsCredentialRevoked : indy_error_t = 406 ; pub const indy_error_t_AnoncredsCredDefAlreadyExistsError : indy_error_t = 407 ; pub const indy_error_t_UnknownCryptoTypeError : indy_error_t = 500 ; pub const indy_error_t_DidAlreadyExistsError : indy_error_t = 600 ; pub const indy_error_t_PaymentUnknownMethodError : indy_error_t = 700 ; pub const indy_error_t_PaymentIncompatibleMethodsError : indy_error_t = 701 ; pub const indy_error_t_PaymentInsufficientFundsError : indy_error_t = 702 ; pub const indy_error_t_PaymentSourceDoesNotExistError : indy_error_t = 703 ; pub const indy_error_t_PaymentOperationNotSupportedError : indy_error_t = 704 ; pub const indy_error_t_PaymentExtraFundsError : indy_error_t = 705 ; pub type indy_error_t = i32 ; pub type int_least8_t = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; pub type int_fast8_t = :: std :: os :: raw :: c_schar ; pub type int_fast16_t = :: std :: os :: raw :: c_long ; pub type int_fast32_t = :: std :: os :: raw :: c_long ; pub type int_fast64_t = :: std :: os :: raw :: c_long ; pub type uint_fast8_t = :: std :: os :: raw :: c_uchar ; pub type uint_fast16_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast32_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast64_t = :: std :: os :: raw :: c_ulong ; pub type intmax_t = :: std :: os :: raw :: c_long ; pub type uintmax_t = :: std :: os :: raw :: c_ulong ; pub type indy_u8_t = u8 ; pub type indy_u32_t = u32 ; pub type indy_i32_t = i32 ; pub type indy_handle_t = i32 ; pub type indy_bool_t = :: std :: os :: raw :: c_uint ; pub type indy_i64_t = :: std :: os :: raw :: c_longlong ; pub type indy_u64_t = :: std :: os :: raw :: c_ulonglong ; pub type indy_empty_cb = :: std :: option :: Option < unsafe extern "C" fn ( xcommand_handle : indy_handle_t , err : indy_error_t ) > ; pub type indy_handle_cb = :: std :: option :: Option < unsafe extern "C" fn ( xcommand_handle : indy_handle_t , err : indy_error_t , handle : indy_handle_t ) > ; pub type indy_handle_u32_cb = :: std :: option :: Option < unsafe extern "C" fn ( xcommand_handle : indy_handle_t , err : indy_error_t , handle : indy_handle_t , num : indy_u32_t ) > ; pub type indy_str_cb = :: std :: option :: Option < unsafe extern "C" fn ( xcommand_handle : indy_handle_t , err : indy_error_t , str1 : * const :: std :: os :: raw :: c_char ) > ; pub type indy_str_str_cb = :: std :: option :: Option < unsafe extern "C" fn ( xcommand_handle : indy_handle_t , err : indy_error_t , str1 : * const :: std :: os :: raw :: c_char , str2 : * const :: std :: os :: raw :: c_char ) > ; pub type indy_str_str_str_cb = :: std :: option :: Option < unsafe extern "C" fn ( xcommand_handle : indy_handle_t , err : indy_error_t , str1 : * const :: std :: os :: raw :: c_char , str2 : * const :: std :: os :: raw :: c_char , str3 : * const :: std :: os :: raw :: c_char ) > ; pub type indy_bool_cb = :: std :: option :: Option < unsafe extern "C" fn ( xcommand_handle : indy_handle_t , err : indy_error_t , flag : indy_bool_t ) > ; pub type indy_slice_cb = :: std :: option :: Option < unsafe extern "C" fn ( xcommand_handle : indy_handle_t , err : indy_error_t , slice : * const indy_u8_t , slice_len : indy_u32_t ) > ; pub type indy_str_slice_cb = :: std :: option :: Option < unsafe extern "C" fn ( xcommand_handle : indy_handle_t , err : indy_error_t , str1 : * const :: std :: os :: raw :: c_char , slice : * const indy_u8_t , slice_len : indy_u32_t ) > ; pub type indy_str_str_long_cb = :: std :: option :: Option < unsafe extern "C" fn ( xcommand_handle : indy_handle_t , err : indy_error_t , str1 : * const :: std :: os :: raw :: c_char , str2 : * const :: std :: os :: raw :: c_char , num : :: std :: os :: raw :: c_ulonglong ) > ; pub type indy_err_str_cb = :: std :: option :: Option < unsafe extern "C" fn ( xcommand_handle : indy_handle_t , err : indy_error_t , str1 : * const :: std :: os :: raw :: c_char ) -> indy_error_t > ; extern "C" { /// Create credential schema entity that describes credential attributes list and allows credentials /// interoperability. /// /// Schema is public and intended to be shared with all anoncreds workflow actors usually by publishing SCHEMA transaction /// to Indy distributed ledger. /// /// It is IMPORTANT for current version POST Schema in Ledger and after that GET it from Ledger /// with correct seq_no to save compatibility with Ledger. /// After that can call indy_issuer_create_and_store_credential_def to build corresponding Credential Definition. /// /// #Params /// command_handle: command handle to map callback to user context /// issuer_did: DID of schema issuer /// name: a name the schema /// version: a version of the schema /// attrs: a list of schema attributes descriptions /// cb: Callback that takes command result as parameter /// /// #Returns /// schema_id: identifier of created schema /// schema_json: schema as json /// /// #Errors /// Common* /// Anoncreds* pub fn indy_issuer_create_schema ( command_handle : indy_handle_t , issuer_did : * const :: std :: os :: raw :: c_char , name : * const :: std :: os :: raw :: c_char , version : * const :: std :: os :: raw :: c_char , attr_names : * const :: std :: os :: raw :: c_char , cb : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Create credential definition entity that encapsulates credentials issuer DID, credential schema, secrets used for signing credentials /// and secrets used for credentials revocation. /// /// Credential definition entity contains private and public parts. Private part will be stored in the wallet. Public part /// will be returned as json intended to be shared with all anoncreds workflow actors usually by publishing CRED_DEF transaction /// to Indy distributed ledger. /// /// It is IMPORTANT for current version GET Schema from Ledger with correct seq_no to save compatibility with Ledger. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// issuer_did: a DID of the issuer signing cred_def transaction to the Ledger /// schema_json: credential schema as a json /// tag: allows to distinct between credential definitions for the same issuer and schema /// signature_type: credential definition type (optional, 'CL' by default) that defines credentials signature and revocation math. Supported types are: /// - 'CL': Camenisch-Lysyanskaya credential signature type /// config_json: (optional) type-specific configuration of credential definition as json: /// - 'CL': /// - support_revocation: whether to request non-revocation credential (optional, default false) /// cb: Callback that takes command result as parameter. /// /// #Returns /// cred_def_id: identifier of created credential definition /// cred_def_json: public part of created credential definition /// /// #Errors /// Common* /// Wallet* /// Anoncreds* pub fn indy_issuer_create_and_store_credential_def ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , issuer_did : * const :: std :: os :: raw :: c_char , schema_json : * const :: std :: os :: raw :: c_char , tag : * const :: std :: os :: raw :: c_char , signature_type : * const :: std :: os :: raw :: c_char , config_json : * const :: std :: os :: raw :: c_char , cb : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Create a new revocation registry for the given credential definition as tuple of entities /// - Revocation registry definition that encapsulates credentials definition reference, revocation type specific configuration and /// secrets used for credentials revocation /// - Revocation registry state that stores the information about revoked entities in a non-disclosing way. The state can be /// represented as ordered list of revocation registry entries were each entry represents the list of revocation or issuance operations. /// /// Revocation registry definition entity contains private and public parts. Private part will be stored in the wallet. Public part /// will be returned as json intended to be shared with all anoncreds workflow actors usually by publishing REVOC_REG_DEF transaction /// to Indy distributed ledger. /// /// Revocation registry state is stored on the wallet and also intended to be shared as the ordered list of REVOC_REG_ENTRY transactions. /// This call initializes the state in the wallet and returns the initial entry. /// /// Some revocation registry types (for example, 'CL_ACCUM') can require generation of binary blob called tails used to hide information about revoked credentials in public /// revocation registry and intended to be distributed out of leger (REVOC_REG_DEF transaction will still contain uri and hash of tails). /// This call requires access to pre-configured blob storage writer instance handle that will allow to write generated tails. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// issuer_did: a DID of the issuer signing transaction to the Ledger /// revoc_def_type: revocation registry type (optional, default value depends on credential definition type). Supported types are: /// - 'CL_ACCUM': Type-3 pairing based accumulator. Default for 'CL' credential definition type /// tag: allows to distinct between revocation registries for the same issuer and credential definition /// cred_def_id: id of stored in ledger credential definition /// config_json: type-specific configuration of revocation registry as json: /// - 'CL_ACCUM': { /// "issuance_type": (optional) type of issuance. Currently supported: /// 1) ISSUANCE_BY_DEFAULT: all indices are assumed to be issued and initial accumulator is calculated over all indices; /// Revocation Registry is updated only during revocation. /// 2) ISSUANCE_ON_DEMAND: nothing is issued initially accumulator is 1 (used by default); /// "max_cred_num": maximum number of credentials the new registry can process (optional, default 100000) /// } /// tails_writer_handle: handle of blob storage to store tails /// cb: Callback that takes command result as parameter. /// /// #Returns /// revoc_reg_id: identifier of created revocation registry definition /// revoc_reg_def_json: public part of revocation registry definition /// revoc_reg_entry_json: revocation registry entry that defines initial state of revocation registry /// /// #Errors /// Common* /// Wallet* /// Anoncreds* pub fn indy_issuer_create_and_store_revoc_reg ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , issuer_did : * const :: std :: os :: raw :: c_char , revoc_def_type : * const :: std :: os :: raw :: c_char , tag : * const :: std :: os :: raw :: c_char , cred_def_id : * const :: std :: os :: raw :: c_char , config_json : * const :: std :: os :: raw :: c_char , tails_writer_handle : indy_handle_t , cb : indy_str_str_str_cb ) -> indy_error_t ; } extern "C" { /// Create credential offer that will be used by Prover for /// credential request creation. Offer includes nonce and key correctness proof /// for authentication between protocol steps and integrity checking. /// /// #Params /// command_handle: command handle to map callback to user context /// wallet_handle: wallet handler (created by open_wallet) /// cred_def_id: id of credential definition stored in the wallet /// cb: Callback that takes command result as parameter /// /// #Returns /// credential offer json: /// { /// "schema_id": string, /// "cred_def_id": string, /// // Fields below can depend on Cred Def type /// "nonce": string, /// "key_correctness_proof" : <key_correctness_proof> /// } /// /// #Errors /// Common* /// Wallet* /// Anoncreds* pub fn indy_issuer_create_credential_offer ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , cred_def_id : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Check Cred Request for the given Cred Offer and issue Credential for the given Cred Request. /// /// Cred Request must match Cred Offer. The credential definition and revocation registry definition /// referenced in Cred Offer and Cred Request must be already created and stored into the wallet. /// /// Information for this credential revocation will be store in the wallet as part of revocation registry under /// generated cred_revoc_id local for this wallet. /// /// This call returns revoc registry delta as json file intended to be shared as REVOC_REG_ENTRY transaction. /// Note that it is possible to accumulate deltas to reduce ledger load. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// cred_offer_json: a cred offer created by indy_issuer_create_credential_offer /// cred_req_json: a credential request created by indy_prover_create_credential_req /// cred_values_json: a credential containing attribute values for each of requested attribute names. /// Example: /// { /// "attr1" : {"raw": "value1", "encoded": "value1_as_int" }, /// "attr2" : {"raw": "value1", "encoded": "value1_as_int" } /// } /// rev_reg_id: id of revocation registry stored in the wallet /// blob_storage_reader_handle: configuration of blob storage reader handle that will allow to read revocation tails /// cb: Callback that takes command result as parameter. /// /// #Returns /// cred_json: Credential json containing signed credential values /// { /// "schema_id": string, /// "cred_def_id": string, /// "rev_reg_def_id", Optional<string>, /// "values": <see cred_values_json above>, /// // Fields below can depend on Cred Def type /// "signature": <signature>, /// "signature_correctness_proof": <signature_correctness_proof> /// } /// cred_revoc_id: local id for revocation info (Can be used for revocation of this credential) /// revoc_reg_delta_json: Revocation registry delta json with a newly issued credential /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_issuer_create_credential ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , cred_offer_json : * const :: std :: os :: raw :: c_char , cred_req_json : * const :: std :: os :: raw :: c_char , cred_values_json : * const :: std :: os :: raw :: c_char , rev_reg_id : * const :: std :: os :: raw :: c_char , blob_storage_reader_handle : indy_i32_t , cb : indy_str_str_str_cb ) -> indy_error_t ; } extern "C" { /// Revoke a credential identified by a cred_revoc_id (returned by indy_issuer_create_credential). /// /// The corresponding credential definition and revocation registry must be already /// created an stored into the wallet. /// /// This call returns revoc registry delta as json file intended to be shared as REVOC_REG_ENTRY transaction. /// Note that it is possible to accumulate deltas to reduce ledger load. /// /// #Params /// command_handle: command handle to map callback to user context. /// wallet_handle: wallet handler (created by open_wallet). /// blob_storage_reader_cfg_handle: configuration of blob storage reader handle that will allow to read revocation tails /// rev_reg_id: id of revocation registry stored in wallet /// cred_revoc_id: local id for revocation info /// cb: Callback that takes command result as parameter. /// /// #Returns /// revoc_reg_delta_json: Revocation registry delta json with a revoked credential /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_issuer_revoke_credential ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , blob_storage_reader_handle : indy_i32_t , rev_reg_id : * const :: std :: os :: raw :: c_char , cred_revoc_id : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Merge two revocation registry deltas (returned by indy_issuer_create_credential or indy_issuer_revoke_credential) to accumulate common delta. /// Send common delta to ledger to reduce the load. /// /// #Params /// command_handle: command handle to map callback to user context. /// rev_reg_delta_json: revocation registry delta. /// other_rev_reg_delta_json: revocation registry delta for which PrevAccum value is equal to current accum value of rev_reg_delta_json. /// cb: Callback that takes command result as parameter. /// /// #Returns /// merged_rev_reg_delta: Merged revocation registry delta /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_issuer_merge_revocation_registry_deltas ( command_handle : indy_handle_t , rev_reg_delta_json : * const :: std :: os :: raw :: c_char , other_rev_reg_delta_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Creates a master secret with a given id and stores it in the wallet. /// The id must be unique. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// master_secret_id: (optional, if not present random one will be generated) new master id /// /// #Returns /// out_master_secret_id: Id of generated master secret /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_create_master_secret ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , master_secret_id : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Creates a credential request for the given credential offer. /// /// The method creates a blinded master secret for a master secret identified by a provided name. /// The master secret identified by the name must be already stored in the secure wallet (see prover_create_master_secret) /// The blinded master secret is a part of the credential request. /// /// #Params /// command_handle: command handle to map callback to user context /// wallet_handle: wallet handler (created by open_wallet) /// prover_did: a DID of the prover /// cred_offer_json: credential offer as a json containing information about the issuer and a credential /// cred_def_json: credential definition json related to <cred_def_id> in <cred_offer_json> /// master_secret_id: the id of the master secret stored in the wallet /// cb: Callback that takes command result as parameter. /// /// #Returns /// cred_req_json: Credential request json for creation of credential by Issuer /// { /// "prover_did" : string, /// "cred_def_id" : string, /// // Fields below can depend on Cred Def type /// "blinded_ms" : <blinded_master_secret>, /// "blinded_ms_correctness_proof" : <blinded_ms_correctness_proof>, /// "nonce": string /// } /// cred_req_metadata_json: Credential request metadata json for further processing of received form Issuer credential. /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_create_credential_req ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , prover_did : * const :: std :: os :: raw :: c_char , cred_offer_json : * const :: std :: os :: raw :: c_char , cred_def_json : * const :: std :: os :: raw :: c_char , master_secret_id : * const :: std :: os :: raw :: c_char , cb : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Check credential provided by Issuer for the given credential request, /// updates the credential by a master secret and stores in a secure wallet. /// /// To support efficient and flexible search the following tags will be created for stored credential: /// { /// "schema_id": <credential schema id>, /// "schema_issuer_did": <credential schema issuer did>, /// "schema_name": <credential schema name>, /// "schema_version": <credential schema version>, /// "issuer_did": <credential issuer did>, /// "cred_def_id": <credential definition id>, /// "rev_reg_id": <credential revocation registry id>, // "None" as string if not present /// // for every attribute in <credential values> /// "attr::<attribute name>::marker": "1", /// "attr::<attribute name>::value": <attribute raw value>, /// } /// /// #Params /// command_handle: command handle to map callback to user context. /// wallet_handle: wallet handler (created by open_wallet). /// cred_id: (optional, default is a random one) identifier by which credential will be stored in the wallet /// cred_req_metadata_json: a credential request metadata created by indy_prover_create_credential_req /// cred_json: credential json received from issuer /// cred_def_json: credential definition json related to <cred_def_id> in <cred_json> /// rev_reg_def_json: revocation registry definition json related to <rev_reg_def_id> in <cred_json> /// cb: Callback that takes command result as parameter. /// /// #Returns /// out_cred_id: identifier by which credential is stored in the wallet /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_store_credential ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , cred_id : * const :: std :: os :: raw :: c_char , cred_req_metadata_json : * const :: std :: os :: raw :: c_char , cred_json : * const :: std :: os :: raw :: c_char , cred_def_json : * const :: std :: os :: raw :: c_char , rev_reg_def_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Gets human readable credential by the given id. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// cred_id: Identifier by which requested credential is stored in the wallet /// cb: Callback that takes command result as parameter. /// /// #Returns /// credential json: /// { /// "referent": string, // cred_id in the wallet /// "attrs": {"key1":"raw_value1", "key2":"raw_value2"}, /// "schema_id": string, /// "cred_def_id": string, /// "rev_reg_id": Optional<string>, /// "cred_rev_id": Optional<string> /// } /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_get_credentials ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , filter_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Gets human readable credentials according to the filter. /// If filter is NULL, then all credentials are returned. /// Credentials can be filtered by Issuer, credential_def and/or Schema. /// /// NOTE: This method is deprecated because immediately returns all fetched credentials. /// Use <indy_prover_search_credentials> to fetch records by small batches. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// filter_json: filter for credentials /// { /// "schema_id": string, (Optional) /// "schema_issuer_did": string, (Optional) /// "schema_name": string, (Optional) /// "schema_version": string, (Optional) /// "issuer_did": string, (Optional) /// "cred_def_id": string, (Optional) /// } /// cb: Callback that takes command result as parameter. /// /// #Returns /// credentials json /// [{ /// "referent": string, // cred_id in the wallet /// "attrs": {"key1":"raw_value1", "key2":"raw_value2"}, /// "schema_id": string, /// "cred_def_id": string, /// "rev_reg_id": Optional<string>, /// "cred_rev_id": Optional<string> /// }] /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_get_credential ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , cred_id : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Search for credentials stored in wallet. /// Credentials can be filtered by tags created during saving of credential. /// /// Instead of immediately returning of fetched credentials /// this call returns search_handle that can be used later /// to fetch records by small batches (with indy_prover_fetch_credentials). /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// query_json: Wql query filter for credentials searching based on tags. /// where query: indy-sdk/doc/design/011-wallet-query-language/README.md /// cb: Callback that takes command result as parameter. /// /// #Returns /// search_handle: Search handle that can be used later to fetch records by small batches (with indy_prover_fetch_credentials) /// total_count: Total count of records /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_search_credentials ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , query_json : * const :: std :: os :: raw :: c_char , cb : indy_handle_u32_cb ) -> indy_error_t ; } extern "C" { /// Fetch next credentials for search. /// /// #Params /// search_handle: Search handle (created by indy_prover_search_credentials) /// count: Count of credentials to fetch /// cb: Callback that takes command result as parameter. /// /// #Returns /// credentials_json: List of human readable credentials: /// [{ /// "referent": string, // cred_id in the wallet /// "attrs": {"key1":"raw_value1", "key2":"raw_value2"}, /// "schema_id": string, /// "cred_def_id": string, /// "rev_reg_id": Optional<string>, /// "cred_rev_id": Optional<string> /// }] /// NOTE: The list of length less than the requested count means credentials search iterator is completed. /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_fetch_credentials ( command_handle : indy_handle_t , search_handle : indy_handle_t , count : indy_u32_t , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Close credentials search (make search handle invalid) /// /// #Params /// search_handle: Search handle (created by indy_prover_search_credentials) /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_close_credentials_search ( command_handle : indy_handle_t , search_handle : indy_handle_t , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Gets human readable credentials matching the given proof request. /// /// NOTE: This method is deprecated because immediately returns all fetched credentials. /// Use <indy_prover_search_credentials_for_proof_req> to fetch records by small batches. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// proof_request_json: proof request json /// { /// "name": string, /// "version": string, /// "nonce": string, /// "requested_attributes": { // set of requested attributes /// "<attr_referent>": <attr_info>, // see below /// ..., /// }, /// "requested_predicates": { // set of requested predicates /// "<predicate_referent>": <predicate_info>, // see below /// ..., /// }, /// "non_revoked": Optional<<non_revoc_interval>>, // see below, /// // If specified prover must proof non-revocation /// // for date in this interval for each attribute /// // (can be overridden on attribute level) /// } /// cb: Callback that takes command result as parameter. /// /// where /// attr_referent: Proof-request local identifier of requested attribute /// attr_info: Describes requested attribute /// { /// "name": string, // attribute name, (case insensitive and ignore spaces) /// "restrictions": Optional<filter_json>, // see above /// "non_revoked": Optional<<non_revoc_interval>>, // see below, /// // If specified prover must proof non-revocation /// // for date in this interval this attribute /// // (overrides proof level interval) /// } /// predicate_referent: Proof-request local identifier of requested attribute predicate /// predicate_info: Describes requested attribute predicate /// { /// "name": attribute name, (case insensitive and ignore spaces) /// "p_type": predicate type (Currently ">=" only) /// "p_value": int predicate value /// "restrictions": Optional<filter_json>, // see above /// "non_revoked": Optional<<non_revoc_interval>>, // see below, /// // If specified prover must proof non-revocation /// // for date in this interval this attribute /// // (overrides proof level interval) /// } /// non_revoc_interval: Defines non-revocation interval /// { /// "from": Optional<int>, // timestamp of interval beginning /// "to": Optional<int>, // timestamp of interval ending /// } /// /// #Returns /// credentials_json: json with credentials for the given proof request. /// { /// "requested_attrs": { /// "<attr_referent>": [{ cred_info: <credential_info>, interval: Optional<non_revoc_interval> }], /// ..., /// }, /// "requested_predicates": { /// "requested_predicates": [{ cred_info: <credential_info>, timestamp: Optional<integer> }, { cred_info: <credential_2_info>, timestamp: Optional<integer> }], /// "requested_predicate_2_referent": [{ cred_info: <credential_2_info>, timestamp: Optional<integer> }] /// } /// }, where credential is /// { /// "referent": <string>, /// "attrs": {"attr_name" : "attr_raw_value"}, /// "schema_id": string, /// "cred_def_id": string, /// "rev_reg_id": Optional<int>, /// "cred_rev_id": Optional<int>, /// } /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_get_credentials_for_proof_req ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , proof_request_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Search for credentials matching the given proof request. /// /// Instead of immediately returning of fetched credentials /// this call returns search_handle that can be used later /// to fetch records by small batches (with indy_prover_fetch_credentials_for_proof_req). /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// proof_request_json: proof request json /// { /// "name": string, /// "version": string, /// "nonce": string, /// "requested_attributes": { // set of requested attributes /// "<attr_referent>": <attr_info>, // see below /// ..., /// }, /// "requested_predicates": { // set of requested predicates /// "<predicate_referent>": <predicate_info>, // see below /// ..., /// }, /// "non_revoked": Optional<<non_revoc_interval>>, // see below, /// // If specified prover must proof non-revocation /// // for date in this interval for each attribute /// // (can be overridden on attribute level) /// } /// extra_query_json:(Optional) List of extra queries that will be applied to correspondent attribute/predicate: /// { /// "<attr_referent>": <wql query>, /// "<predicate_referent>": <wql query>, /// } /// where wql query: indy-sdk/doc/design/011-wallet-query-language/README.md /// cb: Callback that takes command result as parameter. /// /// #Returns /// search_handle: Search handle that can be used later to fetch records by small batches (with indy_prover_fetch_credentials_for_proof_req) /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_search_credentials_for_proof_req ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , proof_request_json : * const :: std :: os :: raw :: c_char , extra_query_json : * const :: std :: os :: raw :: c_char , cb : indy_handle_cb ) -> indy_error_t ; } extern "C" { /// Fetch next credentials for the requested item using proof request search /// handle (created by indy_prover_search_credentials_for_proof_req). /// /// #Params /// search_handle: Search handle (created by indy_prover_search_credentials_for_proof_req) /// item_referent: Referent of attribute/predicate in the proof request /// count: Count of credentials to fetch /// cb: Callback that takes command result as parameter. /// /// #Returns /// credentials_json: List of credentials for the given proof request. /// [{ /// cred_info: <credential_info>, /// interval: Optional<non_revoc_interval> /// }] /// where /// credential_info: /// { /// "referent": <string>, /// "attrs": {"attr_name" : "attr_raw_value"}, /// "schema_id": string, /// "cred_def_id": string, /// "rev_reg_id": Optional<int>, /// "cred_rev_id": Optional<int>, /// } /// non_revoc_interval: /// { /// "from": Optional<int>, // timestamp of interval beginning /// "to": Optional<int>, // timestamp of interval ending /// } /// NOTE: The list of length less than the requested count means that search iterator /// correspondent to the requested <item_referent> is completed. /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_fetch_credentials_for_proof_req ( command_handle : indy_handle_t , search_handle : indy_handle_t , item_referent : * const :: std :: os :: raw :: c_char , count : indy_u32_t , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Close credentials search for proof request (make search handle invalid) /// /// #Params /// search_handle: Search handle (created by indy_prover_search_credentials_for_proof_req) /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_close_credentials_search_for_proof_req ( command_handle : indy_handle_t , search_handle : indy_handle_t , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Creates a proof according to the given proof request /// Either a corresponding credential with optionally revealed attributes or self-attested attribute must be provided /// for each requested attribute (see indy_prover_get_credentials_for_pool_req). /// A proof request may request multiple credentials from different schemas and different issuers. /// All required schemas, public keys and revocation registries must be provided. /// The proof request also contains nonce. /// The proof contains either proof or self-attested attribute value for each requested attribute. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// proof_request_json: proof request json /// { /// "name": string, /// "version": string, /// "nonce": string, /// "requested_attributes": { // set of requested attributes /// "<attr_referent>": <attr_info>, // see below /// ..., /// }, /// "requested_predicates": { // set of requested predicates /// "<predicate_referent>": <predicate_info>, // see below /// ..., /// }, /// "non_revoked": Optional<<non_revoc_interval>>, // see below, /// // If specified prover must proof non-revocation /// // for date in this interval for each attribute /// // (can be overridden on attribute level) /// } /// requested_credentials_json: either a credential or self-attested attribute for each requested attribute /// { /// "self_attested_attributes": { /// "self_attested_attribute_referent": string /// }, /// "requested_attributes": { /// "requested_attribute_referent_1": {"cred_id": string, "timestamp": Optional<number>, revealed: <bool> }}, /// "requested_attribute_referent_2": {"cred_id": string, "timestamp": Optional<number>, revealed: <bool> }} /// }, /// "requested_predicates": { /// "requested_predicates_referent_1": {"cred_id": string, "timestamp": Optional<number> }}, /// } /// } /// master_secret_id: the id of the master secret stored in the wallet /// schemas_json: all schemas json participating in the proof request /// { /// <schema1_id>: <schema1_json>, /// <schema2_id>: <schema2_json>, /// <schema3_id>: <schema3_json>, /// } /// credential_defs_json: all credential definitions json participating in the proof request /// { /// "cred_def1_id": <credential_def1_json>, /// "cred_def2_id": <credential_def2_json>, /// "cred_def3_id": <credential_def3_json>, /// } /// rev_states_json: all revocation states json participating in the proof request /// { /// "rev_reg_def1_id": { /// "timestamp1": <rev_state1>, /// "timestamp2": <rev_state2>, /// }, /// "rev_reg_def2_id": { /// "timestamp3": <rev_state3> /// }, /// "rev_reg_def3_id": { /// "timestamp4": <rev_state4> /// }, /// } /// cb: Callback that takes command result as parameter. /// /// where /// where wql query: indy-sdk/doc/design/011-wallet-query-language/README.md /// attr_referent: Proof-request local identifier of requested attribute /// attr_info: Describes requested attribute /// { /// "name": string, // attribute name, (case insensitive and ignore spaces) /// "restrictions": Optional<wql query>, /// "non_revoked": Optional<<non_revoc_interval>>, // see below, /// // If specified prover must proof non-revocation /// // for date in this interval this attribute /// // (overrides proof level interval) /// } /// predicate_referent: Proof-request local identifier of requested attribute predicate /// predicate_info: Describes requested attribute predicate /// { /// "name": attribute name, (case insensitive and ignore spaces) /// "p_type": predicate type (Currently >= only) /// "p_value": predicate value /// "restrictions": Optional<wql query>, /// "non_revoked": Optional<<non_revoc_interval>>, // see below, /// // If specified prover must proof non-revocation /// // for date in this interval this attribute /// // (overrides proof level interval) /// } /// non_revoc_interval: Defines non-revocation interval /// { /// "from": Optional<int>, // timestamp of interval beginning /// "to": Optional<int>, // timestamp of interval ending /// } /// /// #Returns /// Proof json /// For each requested attribute either a proof (with optionally revealed attribute value) or /// self-attested attribute value is provided. /// Each proof is associated with a credential and corresponding schema_id, cred_def_id, rev_reg_id and timestamp. /// There is also aggregated proof part common for all credential proofs. /// { /// "requested": { /// "revealed_attrs": { /// "requested_attr1_id": {sub_proof_index: number, raw: string, encoded: string}, /// "requested_attr4_id": {sub_proof_index: number: string, encoded: string}, /// }, /// "unrevealed_attrs": { /// "requested_attr3_id": {sub_proof_index: number} /// }, /// "self_attested_attrs": { /// "requested_attr2_id": self_attested_value, /// }, /// "requested_predicates": { /// "requested_predicate_1_referent": {sub_proof_index: int}, /// "requested_predicate_2_referent": {sub_proof_index: int}, /// } /// } /// "proof": { /// "proofs": [ <credential_proof>, <credential_proof>, <credential_proof> ], /// "aggregated_proof": <aggregated_proof> /// } /// "identifiers": [{schema_id, cred_def_id, Optional<rev_reg_id>, Optional<timestamp>}] /// } /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_prover_create_proof ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , proof_req_json : * const :: std :: os :: raw :: c_char , requested_credentials_json : * const :: std :: os :: raw :: c_char , master_secret_name : * const :: std :: os :: raw :: c_char , schemas_json : * const :: std :: os :: raw :: c_char , credential_defs_json : * const :: std :: os :: raw :: c_char , rev_states_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Verifies a proof (of multiple credential). /// All required schemas, public keys and revocation registries must be provided. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// proof_request_json: proof request json /// { /// "name": string, /// "version": string, /// "nonce": string, /// "requested_attributes": { // set of requested attributes /// "<attr_referent>": <attr_info>, // see below /// ..., /// }, /// "requested_predicates": { // set of requested predicates /// "<predicate_referent>": <predicate_info>, // see below /// ..., /// }, /// "non_revoked": Optional<<non_revoc_interval>>, // see below, /// // If specified prover must proof non-revocation /// // for date in this interval for each attribute /// // (can be overridden on attribute level) /// } /// proof_json: created for request proof json /// { /// "requested": { /// "revealed_attrs": { /// "requested_attr1_id": {sub_proof_index: number, raw: string, encoded: string}, /// "requested_attr4_id": {sub_proof_index: number: string, encoded: string}, /// }, /// "unrevealed_attrs": { /// "requested_attr3_id": {sub_proof_index: number} /// }, /// "self_attested_attrs": { /// "requested_attr2_id": self_attested_value, /// }, /// "requested_predicates": { /// "requested_predicate_1_referent": {sub_proof_index: int}, /// "requested_predicate_2_referent": {sub_proof_index: int}, /// } /// } /// "proof": { /// "proofs": [ <credential_proof>, <credential_proof>, <credential_proof> ], /// "aggregated_proof": <aggregated_proof> /// } /// "identifiers": [{schema_id, cred_def_id, Optional<rev_reg_id>, Optional<timestamp>}] /// } /// schemas_json: all schema jsons participating in the proof /// { /// <schema1_id>: <schema1_json>, /// <schema2_id>: <schema2_json>, /// <schema3_id>: <schema3_json>, /// } /// credential_defs_json: all credential definitions json participating in the proof /// { /// "cred_def1_id": <credential_def1_json>, /// "cred_def2_id": <credential_def2_json>, /// "cred_def3_id": <credential_def3_json>, /// } /// rev_reg_defs_json: all revocation registry definitions json participating in the proof /// { /// "rev_reg_def1_id": <rev_reg_def1_json>, /// "rev_reg_def2_id": <rev_reg_def2_json>, /// "rev_reg_def3_id": <rev_reg_def3_json>, /// } /// rev_regs_json: all revocation registries json participating in the proof /// { /// "rev_reg_def1_id": { /// "timestamp1": <rev_reg1>, /// "timestamp2": <rev_reg2>, /// }, /// "rev_reg_def2_id": { /// "timestamp3": <rev_reg3> /// }, /// "rev_reg_def3_id": { /// "timestamp4": <rev_reg4> /// }, /// } /// cb: Callback that takes command result as parameter. /// /// #Returns /// valid: true - if signature is valid, false - otherwise /// /// #Errors /// Annoncreds* /// Common* /// Wallet* pub fn indy_verifier_verify_proof ( command_handle : indy_handle_t , proof_request_json : * const :: std :: os :: raw :: c_char , proof_json : * const :: std :: os :: raw :: c_char , schemas_json : * const :: std :: os :: raw :: c_char , credential_defs_jsons : * const :: std :: os :: raw :: c_char , rev_reg_defs_json : * const :: std :: os :: raw :: c_char , rev_regs_json : * const :: std :: os :: raw :: c_char , cb : indy_bool_cb ) -> indy_error_t ; } extern "C" { /// Create revocation state for a credential in the particular time moment. /// /// #Params /// command_handle: command handle to map callback to user context /// blob_storage_reader_handle: configuration of blob storage reader handle that will allow to read revocation tails /// rev_reg_def_json: revocation registry definition json /// rev_reg_delta_json: revocation registry definition delta json /// timestamp: time represented as a total number of seconds from Unix Epoch /// cred_rev_id: user credential revocation id in revocation registry /// cb: Callback that takes command result as parameter /// /// #Returns /// revocation state json: /// { /// "rev_reg": <revocation registry>, /// "witness": <witness>, /// "timestamp" : integer /// } /// /// #Errors /// Common* /// Wallet* /// Anoncreds* pub fn indy_create_revocation_state ( command_handle : indy_handle_t , blob_storage_reader_handle : indy_i32_t , rev_reg_def_json : * const :: std :: os :: raw :: c_char , rev_reg_delta_json : * const :: std :: os :: raw :: c_char , timestamp : indy_u64_t , cred_rev_id : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Create new revocation state for a credential based on existed state /// at the particular time moment (to reduce calculation time). /// /// #Params /// command_handle: command handle to map callback to user context /// blob_storage_reader_handle: configuration of blob storage reader handle that will allow to read revocation tails /// rev_state_json: revocation registry state json /// rev_reg_def_json: revocation registry definition json /// rev_reg_delta_json: revocation registry definition delta json /// timestamp: time represented as a total number of seconds from Unix Epoch /// cred_rev_id: user credential revocation id in revocation registry /// cb: Callback that takes command result as parameter /// /// #Returns /// revocation state json: /// { /// "rev_reg": <revocation registry>, /// "witness": <witness>, /// "timestamp" : integer /// } /// /// #Errors /// Common* /// Wallet* /// Anoncreds* pub fn indy_update_revocation_state ( command_handle : indy_handle_t , blob_storage_reader_handle : indy_i32_t , rev_state_json : * const :: std :: os :: raw :: c_char , rev_reg_def_json : * const :: std :: os :: raw :: c_char , rev_reg_delta_json : * const :: std :: os :: raw :: c_char , timestamp : indy_u64_t , cred_rev_id : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Creates keys pair and stores in the wallet. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: Wallet handle (created by open_wallet). /// key_json: Key information as json. Example: /// { /// "seed": string, // Optional (if not set random one will be used); Seed information that allows deterministic key creation. /// "crypto_type": string, // Optional (if not set then ed25519 curve is used); Currently only 'ed25519' value is supported for this field. /// } /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: command handle to map callback to caller context. /// - err: Error code. /// - verkey: Ver key of generated key pair, also used as key identifier /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_create_key ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , key_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Saves/replaces the meta information for the giving key in the wallet. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: Wallet handle (created by open_wallet). /// verkey - the key (verkey, key id) to store metadata. /// metadata - the meta information that will be store with the key. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: command handle to map callback to caller context. /// - err: Error code. /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_set_key_metadata ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , verkey : * const :: std :: os :: raw :: c_char , metadata : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Retrieves the meta information for the giving key in the wallet. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: Wallet handle (created by open_wallet). /// verkey - The key (verkey, key id) to retrieve metadata. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// - metadata - The meta information stored with the key; Can be null if no metadata was saved for this key. /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_get_key_metadata ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , verkey : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Signs a message with a key. /// /// Note to use DID keys with this function you can call indy_key_for_did to get key id (verkey) /// for specific DID. /// /// #Params /// command_handle: command handle to map callback to user context. /// wallet_handle: wallet handler (created by open_wallet). /// signer_vk: id (verkey) of my key. The key must be created by calling indy_create_key or indy_create_and_store_my_did /// message_raw: a pointer to first byte of message to be signed /// message_len: a message length /// cb: Callback that takes command result as parameter. /// /// #Returns /// a signature string /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_crypto_sign ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , signer_vk : * const :: std :: os :: raw :: c_char , message_raw : * const indy_u8_t , message_len : indy_u32_t , cb : indy_slice_cb ) -> indy_error_t ; } extern "C" { /// Verify a signature with a verkey. /// /// Note to use DID keys with this function you can call indy_key_for_did to get key id (verkey) /// for specific DID. /// /// #Params /// command_handle: command handle to map callback to user context. /// signer_vk: verkey of signer of the message /// message_raw: a pointer to first byte of message that has been signed /// message_len: a message length /// signature_raw: a pointer to first byte of signature to be verified /// signature_len: a signature length /// cb: Callback that takes command result as parameter. /// /// #Returns /// valid: true - if signature is valid, false - otherwise /// /// #Errors /// Common* /// Wallet* /// Ledger* /// Crypto* pub fn indy_crypto_verify ( command_handle : indy_handle_t , signer_vk : * const :: std :: os :: raw :: c_char , message_raw : * const indy_u8_t , message_len : indy_u32_t , signature_raw : * const indy_u8_t , signature_len : indy_u32_t , cb : indy_bool_cb ) -> indy_error_t ; } extern "C" { /// Encrypt a message by authenticated-encryption scheme. /// /// Sender can encrypt a confidential message specifically for Recipient, using Sender's public key. /// Using Recipient's public key, Sender can compute a shared secret key. /// Using Sender's public key and his secret key, Recipient can compute the exact same shared secret key. /// That shared secret key can be used to verify that the encrypted message was not tampered with, /// before eventually decrypting it. /// /// Note to use DID keys with this function you can call indy_key_for_did to get key id (verkey) /// for specific DID. /// /// #Params /// command_handle: command handle to map callback to user context. /// wallet_handle: wallet handle (created by open_wallet). /// sender_vk: id (verkey) of my key. The key must be created by calling indy_create_key or indy_create_and_store_my_did /// recipient_vk: id (verkey) of their key /// message_raw: a pointer to first byte of message that to be encrypted /// message_len: a message length /// cb: Callback that takes command result as parameter. /// /// #Returns /// an encrypted message as a pointer to array of bytes. /// /// #Errors /// Common* /// Wallet* /// Ledger* /// Crypto* pub fn indy_crypto_auth_crypt ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , sender_vk : * const :: std :: os :: raw :: c_char , recipient_vk : * const :: std :: os :: raw :: c_char , message_raw : * const indy_u8_t , message_len : indy_u32_t , cb : indy_slice_cb ) -> indy_error_t ; } extern "C" { /// Decrypt a message by authenticated-encryption scheme. /// /// Sender can encrypt a confidential message specifically for Recipient, using Sender's public key. /// Using Recipient's public key, Sender can compute a shared secret key. /// Using Sender's public key and his secret key, Recipient can compute the exact same shared secret key. /// That shared secret key can be used to verify that the encrypted message was not tampered with, /// before eventually decrypting it. /// /// Note to use DID keys with this function you can call indy_key_for_did to get key id (verkey) /// for specific DID. /// /// #Params /// command_handle: command handle to map callback to user context. /// wallet_handle: wallet handler (created by open_wallet). /// recipient_vk: id (verkey) of my key. The key must be created by calling indy_create_key or indy_create_and_store_my_did /// encrypted_msg_raw: a pointer to first byte of message that to be decrypted /// encrypted_msg_len: a message length /// cb: Callback that takes command result as parameter. /// /// #Returns /// sender verkey and decrypted message as a pointer to array of bytes /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_crypto_auth_decrypt ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , recipient_vk : * const :: std :: os :: raw :: c_char , encrypted_msg_raw : * const indy_u8_t , encrypted_msg_len : indy_u32_t , cb : indy_str_slice_cb ) -> indy_error_t ; } extern "C" { /// Encrypts a message by anonymous-encryption scheme. /// /// Sealed boxes are designed to anonymously send messages to a Recipient given its public key. /// Only the Recipient can decrypt these messages, using its private key. /// While the Recipient can verify the integrity of the message, it cannot verify the identity of the Sender. /// /// Note to use DID keys with this function you can call indy_key_for_did to get key id (verkey) /// for specific DID. /// /// #Params /// command_handle: command handle to map callback to user context. /// recipient_vk: verkey of message recipient /// message_raw: a pointer to first byte of message that to be encrypted /// message_len: a message length /// cb: Callback that takes command result as parameter. /// /// #Returns /// an encrypted message as a pointer to array of vytes /// /// #Errors /// Common* /// Wallet* /// Ledger* /// Crypto* pub fn indy_crypto_anon_crypt ( command_handle : indy_handle_t , recipient_vk : * const :: std :: os :: raw :: c_char , message_raw : * const indy_u8_t , message_len : indy_u32_t , cb : indy_slice_cb ) -> indy_error_t ; } extern "C" { /// Decrypts a message by anonymous-encryption scheme. /// /// Sealed boxes are designed to anonymously send messages to a Recipient given its public key. /// Only the Recipient can decrypt these messages, using its private key. /// While the Recipient can verify the integrity of the message, it cannot verify the identity of the Sender. /// /// Note to use DID keys with this function you can call indy_key_for_did to get key id (verkey) /// for specific DID. /// /// #Params /// command_handle: command handle to map callback to user context. /// wallet_handle: wallet handler (created by open_wallet). /// recipient_vk: id (verkey) of my key. The key must be created by calling indy_create_key or indy_create_and_store_my_did /// encrypted_msg_raw: a pointer to first byte of message that to be decrypted /// encrypted_msg_len: a message length /// cb: Callback that takes command result as parameter. /// /// #Returns /// decrypted message as a pointer to an array of bytes /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_crypto_anon_decrypt ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , recipient_vk : * const :: std :: os :: raw :: c_char , encrypted_msg : * const indy_u8_t , encrypted_len : indy_u32_t , cb : indy_slice_cb ) -> indy_error_t ; } pub type indyLedgerCustomTransactionParserCb = :: std :: option :: Option < unsafe extern "C" fn ( reply_from_node : * const :: std :: os :: raw :: c_char , parsed_sp : * const :: std :: os :: raw :: c_char ) -> indy_error_t > ; pub type indyLedgerCustomFreeCb = :: std :: option :: Option < unsafe extern "C" fn ( reply_from_node : * const :: std :: os :: raw :: c_char ) -> indy_error_t > ; extern "C" { /// Signs and submits request message to validator pool. /// /// Adds submitter information to passed request json, signs it with submitter /// sign key (see wallet_sign), and sends signed request message /// to validator pool (see write_request). /// /// #Params /// command_handle: command handle to map callback to caller context. /// pool_handle: pool handle (created by open_pool_ledger). /// wallet_handle: wallet handle (created by open_wallet). /// submitter_did: Id of Identity stored in secured Wallet. /// request_json: Request data json. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* /// Wallet* /// Ledger* /// Crypto* pub fn indy_sign_and_submit_request ( command_handle : indy_handle_t , pool_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , request_json : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Publishes request message to validator pool (no signing, unlike sign_and_submit_request). /// /// The request is sent to the validator pool as is. It's assumed that it's already prepared. /// /// #Params /// command_handle: command handle to map callback to caller context. /// pool_handle: pool handle (created by open_pool_ledger). /// request_json: Request data json. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* /// Ledger* pub fn indy_submit_request ( command_handle : indy_handle_t , pool_handle : indy_handle_t , request_json : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Send action to particular nodes of validator pool. /// /// The list of requests can be send: /// POOL_RESTART /// GET_VALIDATOR_INFO /// /// The request is sent to the nodes as is. It's assumed that it's already prepared. /// /// #Params /// command_handle: command handle to map callback to caller context. /// pool_handle: pool handle (created by open_pool_ledger). /// request_json: Request data json. /// nodes: (Optional) List of node names to send the request. /// ["Node1", "Node2",...."NodeN"] /// timeout: (Optional) Time to wait respond from nodes (override the default timeout) (in sec). /// Pass -1 to use default timeout /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* /// Ledger* pub fn indy_submit_action ( command_handle : indy_handle_t , pool_handle : indy_handle_t , request_json : * const :: std :: os :: raw :: c_char , nodes : * const :: std :: os :: raw :: c_char , timeout : indy_i32_t , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Signs request message. /// /// Adds submitter information to passed request json, signs it with submitter /// sign key (see wallet_sign). /// /// #Params /// command_handle: command handle to map callback to caller context. /// wallet_handle: wallet handle (created by open_wallet). /// submitter_did: Id of Identity stored in secured Wallet. /// request_json: Request data json. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Signed request json. /// /// #Errors /// Common* /// Wallet* /// Ledger* /// Crypto* pub fn indy_sign_request ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , request_json : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Multi signs request message. /// /// Adds submitter information to passed request json, signs it with submitter /// sign key (see wallet_sign). /// /// #Params /// command_handle: command handle to map callback to caller context. /// wallet_handle: wallet handle (created by open_wallet). /// submitter_did: Id of Identity stored in secured Wallet. /// request_json: Request data json. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Signed request json. /// /// #Errors /// Common* /// Wallet* /// Ledger* /// Crypto* pub fn indy_multi_sign_request ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , request_json : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a request to get a DDO. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). /// target_did: Id of Identity stored in secured Wallet. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_get_ddo_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , target_did : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a NYM request. Request to create a new NYM record for a specific user. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: DID of the submitter stored in secured Wallet. /// target_did: Target DID as base58-encoded string for 16 or 32 bit DID value. /// verkey: Target identity verification key as base58-encoded string. /// alias: NYM's alias. /// role: Role of a user NYM record: /// null (common USER) /// TRUSTEE /// STEWARD /// TRUST_ANCHOR /// empty string to reset role /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_nym_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , target_did : * const :: std :: os :: raw :: c_char , verkey : * const :: std :: os :: raw :: c_char , alias : * const :: std :: os :: raw :: c_char , role : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds an ATTRIB request. Request to add attribute to a NYM record. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). /// target_did: Target DID as base58-encoded string for 16 or 32 bit DID value. /// hash: (Optional) Hash of attribute data. /// raw: (Optional) Json, where key is attribute name and value is attribute value. /// enc: (Optional) Encrypted value attribute data. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_attrib_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , target_did : * const :: std :: os :: raw :: c_char , hash : * const :: std :: os :: raw :: c_char , raw : * const :: std :: os :: raw :: c_char , enc : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a GET_ATTRIB request. Request to get information about an Attribute for the specified DID. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). /// target_did: Target DID as base58-encoded string for 16 or 32 bit DID value. /// raw: (Optional) Requested attribute name. /// hash: (Optional) Requested attribute hash. /// enc: (Optional) Requested attribute encrypted value. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_get_attrib_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , target_did : * const :: std :: os :: raw :: c_char , hash : * const :: std :: os :: raw :: c_char , raw : * const :: std :: os :: raw :: c_char , enc : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a GET_NYM request. Request to get information about a DID (NYM). /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did:(Optional) DID of the read request sender (if not provided then default Libindy DID will be used). /// target_did: Target DID as base58-encoded string for 16 or 32 bit DID value. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_get_nym_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , target_did : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a SCHEMA request. Request to add Credential's schema. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: DID of the submitter stored in secured Wallet. /// data: Credential schema. /// { /// id: identifier of schema /// attrNames: array of attribute name strings /// name: Schema's name string /// version: Schema's version string, /// ver: Version of the Schema json /// } /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_schema_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , data : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a GET_SCHEMA request. Request to get Credential's Schema. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). /// id: Schema ID in ledger /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_get_schema_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Parse a GET_SCHEMA response to get Schema in the format compatible with Anoncreds API. /// /// #Params /// command_handle: command handle to map callback to caller context. /// get_schema_response: response of GET_SCHEMA request. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Schema Id and Schema json. /// { /// id: identifier of schema /// attrNames: array of attribute name strings /// name: Schema's name string /// version: Schema's version string /// ver: Version of the Schema json /// } /// /// #Errors /// Common* pub fn indy_parse_get_schema_response ( command_handle : indy_handle_t , get_schema_response : * const :: std :: os :: raw :: c_char , str : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Builds an CRED_DEF request. Request to add a Credential Definition (in particular, public key), /// that Issuer creates for a particular Credential Schema. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: DID of the submitter stored in secured Wallet. /// data: credential definition json /// { /// id: string - identifier of credential definition /// schemaId: string - identifier of stored in ledger schema /// type: string - type of the credential definition. CL is the only supported type now. /// tag: string - allows to distinct between credential definitions for the same issuer and schema /// value: Dictionary with Credential Definition's data: { /// primary: primary credential public key, /// Optional<revocation>: revocation credential public key /// }, /// ver: Version of the CredDef json /// } /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_cred_def_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , data : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a GET_CRED_DEF request. Request to get a Credential Definition (in particular, public key), /// that Issuer creates for a particular Credential Schema. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). /// id: Credential Definition ID in ledger. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_get_cred_def_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Parse a GET_CRED_DEF response to get Credential Definition in the format compatible with Anoncreds API. /// /// #Params /// command_handle: command handle to map callback to caller context. /// get_cred_def_response: response of GET_CRED_DEF request. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Credential Definition Id and Credential Definition json. /// { /// id: string - identifier of credential definition /// schemaId: string - identifier of stored in ledger schema /// type: string - type of the credential definition. CL is the only supported type now. /// tag: string - allows to distinct between credential definitions for the same issuer and schema /// value: Dictionary with Credential Definition's data: { /// primary: primary credential public key, /// Optional<revocation>: revocation credential public key /// }, /// ver: Version of the Credential Definition json /// } /// /// #Errors /// Common* pub fn indy_parse_get_cred_def_response ( command_handle : indy_handle_t , get_cred_def_response : * const :: std :: os :: raw :: c_char , str : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a NODE request. Request to add a new node to the pool, or updates existing in the pool. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: DID of the submitter stored in secured Wallet. /// target_did: Target Node's DID. It differs from submitter_did field. /// data: Data associated with the Node: { /// alias: string - Node's alias /// blskey: string - (Optional) BLS multi-signature key as base58-encoded string. /// blskey_pop: string - (Optional) BLS key proof of possession as base58-encoded string. /// client_ip: string - (Optional) Node's client listener IP address. /// client_port: string - (Optional) Node's client listener port. /// node_ip: string - (Optional) The IP address other Nodes use to communicate with this Node. /// node_port: string - (Optional) The port other Nodes use to communicate with this Node. /// services: array<string> - (Optional) The service of the Node. VALIDATOR is the only supported one now. /// } /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_node_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , target_did : * const :: std :: os :: raw :: c_char , data : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a GET_VALIDATOR_INFO request. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: Id of Identity stored in secured Wallet. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_get_validator_info_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a GET_TXN request. Request to get any transaction by its seq_no. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). /// ledger_type: (Optional) type of the ledger the requested transaction belongs to: /// DOMAIN - used default, /// POOL, /// CONFIG /// any number /// seq_no: seq_no of transaction in ledger. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_get_txn_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , ledger_type : * const :: std :: os :: raw :: c_char , data : indy_i32_t , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a POOL_CONFIG request. Request to change Pool's configuration. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: DID of the submitter stored in secured Wallet. /// writes: Whether any write requests can be processed by the pool /// (if false, then pool goes to read-only state). True by default. /// force: Whether we should apply transaction (for example, move pool to read-only state) /// without waiting for consensus of this transaction. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_pool_config_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , writes : indy_bool_t , force : indy_bool_t , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a POOL_RESTART request. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: Id of Identity stored in secured Wallet. /// action: Either start or cancel /// datetime: /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_pool_restart_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , action : * const :: std :: os :: raw :: c_char , datetime : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a POOL_UPGRADE request. Request to upgrade the Pool (sent by Trustee). /// It upgrades the specified Nodes (either all nodes in the Pool, or some specific ones). /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: DID of the submitter stored in secured Wallet. /// name: Human-readable name for the upgrade. /// version: The version of indy-node package we perform upgrade to. /// Must be greater than existing one (or equal if reinstall flag is True). /// action: Either start or cancel. /// sha256: sha256 hash of the package. /// timeout: (Optional) Limits upgrade time on each Node. /// schedule: (Optional) Schedule of when to perform upgrade on each node. Map Node DIDs to upgrade time. /// justification: (Optional) justification string for this particular Upgrade. /// reinstall: Whether it's allowed to re-install the same version. False by default. /// force: Whether we should apply transaction (schedule Upgrade) without waiting /// for consensus of this transaction. /// package: (Optional) Package to be upgraded. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_pool_upgrade_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , name : * const :: std :: os :: raw :: c_char , version : * const :: std :: os :: raw :: c_char , action : * const :: std :: os :: raw :: c_char , sha256 : * const :: std :: os :: raw :: c_char , timeout : indy_i32_t , schedule : * const :: std :: os :: raw :: c_char , justification : * const :: std :: os :: raw :: c_char , reinstall : indy_bool_t , force : indy_bool_t , package_ : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a REVOC_REG_DEF request. Request to add the definition of revocation registry /// to an exists credential definition. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: DID of the submitter stored in secured Wallet. /// data: Revocation Registry data: /// { /// "id": string - ID of the Revocation Registry, /// "revocDefType": string - Revocation Registry type (only CL_ACCUM is supported for now), /// "tag": string - Unique descriptive ID of the Registry, /// "credDefId": string - ID of the corresponding CredentialDefinition, /// "value": Registry-specific data { /// "issuanceType": string - Type of Issuance(ISSUANCE_BY_DEFAULT or ISSUANCE_ON_DEMAND), /// "maxCredNum": number - Maximum number of credentials the Registry can serve. /// "tailsHash": string - Hash of tails. /// "tailsLocation": string - Location of tails file. /// "publicKeys": <public_keys> - Registry's public key. /// }, /// "ver": string - version of revocation registry definition json. /// } /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_revoc_reg_def_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , data : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a GET_REVOC_REG_DEF request. Request to get a revocation registry definition, /// that Issuer creates for a particular Credential Definition. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). /// id: ID of Revocation Registry Definition in ledger. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_get_revoc_reg_def_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Parse a GET_REVOC_REG_DEF response to get Revocation Registry Definition in the format /// compatible with Anoncreds API. /// /// #Params /// command_handle: command handle to map callback to caller context. /// get_revoc_reg_def_response: response of GET_REVOC_REG_DEF request. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Revocation Registry Definition Id and Revocation Registry Definition json. /// { /// "id": string - ID of the Revocation Registry, /// "revocDefType": string - Revocation Registry type (only CL_ACCUM is supported for now), /// "tag": string - Unique descriptive ID of the Registry, /// "credDefId": string - ID of the corresponding CredentialDefinition, /// "value": Registry-specific data { /// "issuanceType": string - Type of Issuance(ISSUANCE_BY_DEFAULT or ISSUANCE_ON_DEMAND), /// "maxCredNum": number - Maximum number of credentials the Registry can serve. /// "tailsHash": string - Hash of tails. /// "tailsLocation": string - Location of tails file. /// "publicKeys": <public_keys> - Registry's public key. /// }, /// "ver": string - version of revocation registry definition json. /// } /// /// #Errors /// Common* pub fn indy_parse_get_revoc_reg_def_response ( command_handle : indy_handle_t , get_revoc_ref_def_response : * const :: std :: os :: raw :: c_char , str : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a REVOC_REG_ENTRY request. Request to add the RevocReg entry containing /// the new accumulator value and issued/revoked indices. /// This is just a delta of indices, not the whole list. /// So, it can be sent each time a new credential is issued/revoked. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: DID of the submitter stored in secured Wallet. /// revoc_reg_def_id: ID of the corresponding RevocRegDef. /// rev_def_type: Revocation Registry type (only CL_ACCUM is supported for now). /// value: Registry-specific data: { /// value: { /// prevAccum: string - previous accumulator value. /// accum: string - current accumulator value. /// issued: array<number> - an array of issued indices. /// revoked: array<number> an array of revoked indices. /// }, /// ver: string - version revocation registry entry json /// /// } /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_revoc_reg_entry_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , revoc_reg_def_id : * const :: std :: os :: raw :: c_char , rev_def_type : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds a GET_REVOC_REG request. Request to get the accumulated state of the Revocation Registry /// by ID. The state is defined by the given timestamp. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). /// revoc_reg_def_id: ID of the corresponding Revocation Registry Definition in ledger. /// timestamp: Requested time represented as a total number of seconds from Unix Epoch /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_get_revoc_reg_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , revoc_reg_def_id : * const :: std :: os :: raw :: c_char , timestamp : :: std :: os :: raw :: c_longlong , str : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Parse a GET_REVOC_REG response to get Revocation Registry in the format compatible with Anoncreds API. /// /// #Params /// command_handle: command handle to map callback to caller context. /// get_revoc_reg_response: response of GET_REVOC_REG request. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Revocation Registry Definition Id, Revocation Registry json and Timestamp. /// { /// "value": Registry-specific data { /// "accum": string - current accumulator value /// }, /// "ver": string - version revocation registry json /// } /// /// #Errors /// Common* pub fn indy_parse_get_revoc_reg_response ( command_handle : indy_handle_t , get_revoc_reg_response : * const :: std :: os :: raw :: c_char , cb : indy_str_str_long_cb ) -> indy_error_t ; } extern "C" { /// Builds a GET_REVOC_REG_DELTA request. Request to get the delta of the accumulated state of the Revocation Registry. /// The Delta is defined by from and to timestamp fields. /// If from is not specified, then the whole state till to will be returned. /// /// #Params /// command_handle: command handle to map callback to caller context. /// submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). /// revoc_reg_def_id: ID of the corresponding Revocation Registry Definition in ledger. /// from: Requested time represented as a total number of seconds from Unix Epoch /// to: Requested time represented as a total number of seconds from Unix Epoch /// cb: Callback that takes command result as parameter. /// /// #Returns /// Request result as json. /// /// #Errors /// Common* pub fn indy_build_get_revoc_reg_delta_request ( command_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , revoc_reg_def_id : * const :: std :: os :: raw :: c_char , from : :: std :: os :: raw :: c_longlong , to : :: std :: os :: raw :: c_longlong , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Parse a GET_REVOC_REG_DELTA response to get Revocation Registry Delta in the format compatible with Anoncreds API. /// /// #Params /// command_handle: command handle to map callback to caller context. /// get_revoc_reg_response: response of GET_REVOC_REG_DELTA request. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Revocation Registry Definition Id, Revocation Registry Delta json and Timestamp. /// { /// "value": Registry-specific data { /// prevAccum: string - previous accumulator value. /// accum: string - current accumulator value. /// issued: array<number> - an array of issued indices. /// revoked: array<number> an array of revoked indices. /// }, /// "ver": string - version revocation registry delta json /// } /// /// #Errors /// Common* pub fn indy_parse_get_revoc_reg_delta_response ( command_handle : indy_handle_t , get_revoc_reg_delta_response : * const :: std :: os :: raw :: c_char , cb : indy_str_str_long_cb ) -> indy_error_t ; } extern "C" { /// Register callbacks (see type description for `CustomTransactionParser` and `CustomFree` /// /// # params /// command_handle: command handle to map callback to caller context. /// txn_type: type of transaction to apply `parse` callback. /// parse: required callback to parse reply for state proof. /// free: required callback to deallocate memory. /// cb: Callback that takes command result as parameter. /// /// # returns /// Status of callbacks registration. /// /// # errors /// Common* pub fn indy_register_transaction_parser_for_sp ( command_handle : indy_handle_t , txn_type : * const :: std :: os :: raw :: c_char , parse_fn : indyLedgerCustomTransactionParserCb , free_rn : indyLedgerCustomFreeCb , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Check if pairwise is exists. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// their_did: encrypted DID /// cb: Callback that takes command result as parameter. /// /// #Returns /// exists: true - if pairwise is exists, false - otherwise /// /// #Errors /// Common* /// Wallet* pub fn indy_is_pairwise_exists ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , their_did : * const :: std :: os :: raw :: c_char , cb : indy_bool_cb ) -> indy_error_t ; } extern "C" { /// Creates pairwise. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// their_did: encrypting DID /// my_did: encrypted DID /// metadata Optional: extra information for pairwise /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error code /// /// #Errors /// Common* /// Wallet* pub fn indy_create_pairwise ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , their_did : * const :: std :: os :: raw :: c_char , my_did : * const :: std :: os :: raw :: c_char , metadata : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Get list of saved pairwise. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// cb: Callback that takes command result as parameter. /// /// #Returns /// list_pairwise: list of saved pairwise /// /// #Errors /// Common* /// Wallet* pub fn indy_list_pairwise ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Gets pairwise information for specific their_did. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// their_did: encoded Did /// cb: Callback that takes command result as parameter. /// /// #Returns /// pairwise_info_json: did info associated with their did /// /// #Errors /// Common* /// Wallet* pub fn indy_get_pairwise ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , their_did : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Save some data in the Wallet for pairwise associated with Did. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// their_did: encoded Did /// metadata: some extra information for pairwise /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error code /// /// #Errors /// Common* /// Wallet* pub fn indy_set_pairwise_metadata ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , their_did : * const :: std :: os :: raw :: c_char , metadata : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } /// Create the payment address for this payment method. /// /// This method generates private part of payment address /// and stores it in a secure place. Ideally it should be /// secret in libindy wallet (see crypto module). /// /// Note that payment method should be able to resolve this /// secret by fully resolvable payment address format. /// /// #Params /// command_handle: command handle to map callback to context /// wallet_handle: wallet handle where keys for signature are stored /// config: payment address config as json: /// { /// seed: <str>, // allows deterministic creation of payment address /// } /// /// #Returns /// payment_address - public identifier of payment address in fully resolvable payment address format pub type indyCreatePaymentAddressCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , config : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Modifies Indy request by adding information how to pay fees for this transaction /// according to this payment method. /// /// This method consumes set of inputs and outputs. The difference between inputs balance /// and outputs balance is the fee for this transaction. /// /// Not that this method also produces correct fee signatures. /// /// Format of inputs is specific for payment method. Usually it should reference payment transaction /// with at least one output that corresponds to payment address that user owns. /// /// #Params /// command_handle: command handle to map callback to context /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// req_json: initial transaction request as json /// inputs_json: The list of payment sources as json array: /// ["source1", ...] /// Note that each source should reference payment address /// outputs_json: The list of outputs as json array: /// [{ /// recipient: <str>, // payment address of recipient /// amount: <int>, // amount /// }] /// extra: // optional information for payment operation /// /// #Returns /// req_with_fees_json - modified Indy request with added fees info pub type indyAddRequestFeesCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , req_json : * const :: std :: os :: raw :: c_char , inputs_json : * const :: std :: os :: raw :: c_char , outputs_json : * const :: std :: os :: raw :: c_char , extra : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Parses response for Indy request with fees. /// /// #Params /// command_handle: command handle to map callback to context /// resp_json: response for Indy request with fees /// /// #Returns /// receipts_json - parsed (payment method and node version agnostic) receipts info as json: /// [{ /// receipt: <str>, // receipt that can be used for payment referencing and verification /// recipient: <str>, //payment address for this recipient /// amount: <int>, // amount /// extra: <str>, // optional data from payment transaction /// }] pub type indyParseResponseWithFeesCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , resp_json : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Builds Indy request for getting sources list for payment address /// according to this payment method. /// /// #Params /// command_handle: command handle to map callback to context /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// payment_address: target payment address /// /// #Returns /// get_sources_txn_json - Indy request for getting sources list for payment address pub type indyBuildGetPaymentSourcesRequestCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , payment_address : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Parses response for Indy request for getting sources list. /// /// #Params /// command_handle: command handle to map callback to context /// resp_json: response for Indy request for getting sources list /// /// #Returns /// sources_json - parsed (payment method and node version agnostic) sources info as json: /// [{ /// source: <str>, // source input /// paymentAddress: <str>, //payment address for this source /// amount: <int>, // amount /// extra: <str>, // optional data from payment transaction /// }] pub type indyParseGetPaymentSourcesResponseCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , resp_json : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Builds Indy request for doing payment /// according to this payment method. /// /// This method consumes set of inputs and outputs. /// /// Format of inputs is specific for payment method. Usually it should reference payment transaction /// with at least one output that corresponds to payment address that user owns. /// /// #Params /// command_handle: command handle to map callback to context /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// inputs_json: The list of payment sources as json array: /// ["source1", ...] /// Note that each source should reference payment address /// outputs_json: The list of outputs as json array: /// [{ /// recipient: <str>, // payment address of recipient /// amount: <int>, // amount /// }] /// extra: // optional information for payment operation /// /// #Returns /// payment_req_json - Indy request for doing payment pub type indyBuildPaymentReqCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , inputs_json : * const :: std :: os :: raw :: c_char , outputs_json : * const :: std :: os :: raw :: c_char , extra : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Parses response for Indy request for payment txn. /// /// #Params /// command_handle: command handle to map callback to context /// resp_json: response for Indy request for payment txn /// /// #Returns /// receipts_json - parsed (payment method and node version agnostic) receipts info as json: /// [{ /// receipt: <str>, // receipt that can be used for payment referencing and verification /// recipient: <str>, //payment address for this receipt /// amount: <int>, // amount /// extra: <str>, // optional data from payment transaction /// }] pub type indyParsePaymentResponseCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , resp_json : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Builds Indy request for doing minting /// according to this payment method. /// /// #Params /// command_handle: command handle to map callback to context /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// outputs_json: The list of outputs as json array: /// [{ /// recipient: <str>, // payment address of recipient /// amount: <int>, // amount /// }] /// extra: // optional information for payment operation /// /// #Returns /// mint_req_json - Indy request for doing minting pub type indyBuildMintReqCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , outputs_json : * const :: std :: os :: raw :: c_char , extra : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Builds Indy request for setting fees for transactions in the ledger /// /// # Params /// command_handle: command handle to map callback to context /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// fees_json { /// txnType1: amount1, /// txnType2: amount2, /// ................. /// txnTypeN: amountN, /// } /// /// # Return /// set_txn_fees_json - Indy request for setting fees for transactions in the ledger pub type indyBuildSetTxnFeesReqCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , fees_json : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Builds Indy get request for getting fees for transactions in the ledger /// /// # Params /// command_handle: command handle to map callback to context /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// /// # Return /// get_txn_fees_json - Indy request for getting fees for transactions in the ledger pub type indyBuildGetTxnFeesReqCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Parses response for Indy request for getting fees /// /// # Params /// command_handle: command handle to map callback to context /// resp_json: response for Indy request for getting fees /// /// # Return /// fees_json { /// txnType1: amount1, /// txnType2: amount2, /// ................. /// txnTypeN: amountN, /// } pub type indyParseGetTxnFeesResponseCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , resp_json : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Builds Indy request for getting information to verify the payment receipt /// /// # Params /// command_handle: command handle to map callback to context /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// receipt: payment receipt to verify /// /// # Return /// verify_txn_json -- request to be sent to ledger pub type indyBuildVerifyPaymentReqCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , receipt : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; /// Parses Indy response with information to verify receipt /// /// # Params /// command_handle: command handle to map callback to context /// resp_json: response for Indy request for information to verify the payment receipt /// /// # Return /// txn_json: { /// sources: [<str>, ] /// receipts: [ { /// recipient: <str>, // payment address of recipient /// receipt: <str>, // receipt that can be used for payment referencing and verification /// amount: <int>, // amount /// }, ] /// extra: <str>, //optional data /// } pub type indyParseVerifyPaymentResponseCB = :: std :: option :: Option < unsafe extern "C" fn ( command_handle : indy_handle_t , resp_json : * const :: std :: os :: raw :: c_char , cb : indy_err_str_cb ) -> indy_error_t > ; extern "C" { /// Registers custom wallet storage implementation. /// /// It allows library user to provide custom wallet implementation. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// type_: Wallet type name. /// create: WalletType create operation handler /// open: WalletType open operation handler /// close: Wallet close operation handler /// delete: WalletType delete operation handler /// add_record: WalletType add record operation handler /// update_record_value: WalletType update record value operation handler /// update_record_tags: WalletType update record tags operation handler /// add_record_tags: WalletType add record tags operation handler /// delete_record_tags: WalletType delete record tags operation handler /// delete_record: WalletType delete record operation handler /// get_record: WalletType get record operation handler /// get_record_id: WalletType get record id operation handler /// get_record_type: WalletType get record type operation handler /// get_record_value: WalletType get record value operation handler /// get_record_tags: WalletType get record tags operation handler /// free_record: WalletType free record operation handler /// search_records: WalletType search records operation handler /// search_all_records: WalletType search all records operation handler /// get_search_total_count: WalletType get search total count operation handler /// fetch_search_next_record: WalletType fetch search next record operation handler /// free_search: WalletType free search operation handler /// free: Handler that allows to de-allocate strings allocated in caller code /// /// #Returns /// Error code pub fn indy_register_payment_method ( command_handle : indy_handle_t , payment_method : * const :: std :: os :: raw :: c_char , create_payment_address_cb : indyCreatePaymentAddressCB , add_request_fees_cb : indyAddRequestFeesCB , parse_response_with_fees_cb : indyParseResponseWithFeesCB , build_get_payment_sources_request_cb : indyBuildGetPaymentSourcesRequestCB , parse_get_payment_sources_response_cb : indyParseGetPaymentSourcesResponseCB , build_payment_req_cb : indyBuildPaymentReqCB , parse_payment_response_cb : indyParsePaymentResponseCB , build_mint_req_cb : indyBuildMintReqCB , build_set_txn_fees_req_cb : indyBuildSetTxnFeesReqCB , build_get_txn_fees_req_cb : indyBuildGetTxnFeesReqCB , parse_get_txn_fees_response_cb : indyParseGetTxnFeesResponseCB , build_verify_payment_req_cb : indyBuildVerifyPaymentReqCB , parse_verify_payment_response_cb : indyParseVerifyPaymentResponseCB , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Create the payment address for specified payment method /// /// /// This method generates private part of payment address /// and stores it in a secure place. Ideally it should be /// secret in libindy wallet (see crypto module). /// /// Note that payment method should be able to resolve this /// secret by fully resolvable payment address format. /// /// #Params /// command_handle: command handle to map callback to context /// wallet_handle: wallet handle where to save new address /// payment_method: payment method to use (for example, 'sov') /// config: payment address config as json: /// { /// seed: <str>, // allows deterministic creation of payment address /// } /// /// #Returns /// payment_address - public identifier of payment address in fully resolvable payment address format pub fn indy_create_payment_address ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , payment_method : * const :: std :: os :: raw :: c_char , config : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Lists all payment addresses that are stored in the wallet /// /// #Params /// command_handle: command handle to map callback to context /// wallet_handle: wallet to search for payment_addresses in /// /// #Returns /// payment_addresses_json - json array of string with json addresses pub fn indy_list_payment_addresses ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Modifies Indy request by adding information how to pay fees for this transaction /// according to this payment method. /// /// This method consumes set of inputs and outputs. The difference between inputs balance /// and outputs balance is the fee for this transaction. /// /// Not that this method also produces correct fee signatures. /// /// Format of inputs is specific for payment method. Usually it should reference payment transaction /// with at least one output that corresponds to payment address that user owns. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// req_json: initial transaction request as json /// inputs_json: The list of payment sources as json array: /// ["source1", ...] /// - each input should reference paymentAddress /// - this param will be used to determine payment_method /// outputs_json: The list of outputs as json array: /// [{ /// recipient: <str>, // payment address of recipient /// amount: <int>, // amount /// }] /// extra: // optional information for payment operation /// /// #Returns /// req_with_fees_json - modified Indy request with added fees info /// payment_method - used payment method pub fn indy_add_request_fees ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , req_json : * const :: std :: os :: raw :: c_char , inputs_json : * const :: std :: os :: raw :: c_char , outputs_json : * const :: std :: os :: raw :: c_char , extra : * const :: std :: os :: raw :: c_char , cb : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Parses response for Indy request with fees. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// payment_method: payment method to use /// resp_json: response for Indy request with fees /// Note: this param will be used to determine payment_method /// /// #Returns /// receipts_json - parsed (payment method and node version agnostic) receipts info as json: /// [{ /// receipt: <str>, // receipt that can be used for payment referencing and verification /// recipient: <str>, //payment address of recipient /// amount: <int>, // amount /// extra: <str>, // optional data from payment transaction /// }] pub fn indy_parse_response_with_fees ( command_handle : indy_handle_t , payment_method : * const :: std :: os :: raw :: c_char , resp_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds Indy request for getting sources list for payment address /// according to this payment method. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// payment_address: target payment address /// /// #Returns /// get_sources_txn_json - Indy request for getting sources list for payment address /// payment_method - used payment method pub fn indy_build_get_payment_sources_request ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , payment_address : * const :: std :: os :: raw :: c_char , cb : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Parses response for Indy request for getting sources list. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// payment_method: payment method to use. /// resp_json: response for Indy request for getting sources list /// Note: this param will be used to determine payment_method /// /// #Returns /// sources_json - parsed (payment method and node version agnostic) sources info as json: /// [{ /// source: <str>, // source input /// paymentAddress: <str>, //payment address for this source /// amount: <int>, // amount /// extra: <str>, // optional data from payment transaction /// }] pub fn indy_parse_get_payment_sources_response ( command_handle : indy_handle_t , payment_method : * const :: std :: os :: raw :: c_char , resp_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds Indy request for doing payment /// according to this payment method. /// /// This method consumes set of inputs and outputs. /// /// Format of inputs is specific for payment method. Usually it should reference payment transaction /// with at least one output that corresponds to payment address that user owns. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// inputs_json: The list of payment sources as json array: /// ["source1", ...] /// Note that each source should reference payment address /// outputs_json: The list of outputs as json array: /// [{ /// recipient: <str>, // payment address of recipient /// amount: <int>, // amount /// }] /// extra: // optional information for payment operation /// /// #Returns /// payment_req_json - Indy request for doing payment /// payment_method - used payment method pub fn indy_build_payment_req ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , inputs_json : * const :: std :: os :: raw :: c_char , outputs_json : * const :: std :: os :: raw :: c_char , extra : * const :: std :: os :: raw :: c_char , cb : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Parses response for Indy request for payment txn. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// payment_method: payment method to use /// resp_json: response for Indy request for payment txn /// Note: this param will be used to determine payment_method /// /// #Returns /// receipts_json - parsed (payment method and node version agnostic) receipts info as json: /// [{ /// receipt: <str>, // receipt that can be used for payment referencing and verification /// recipient: <str>, // payment address of recipient /// amount: <int>, // amount /// extra: <str>, // optional data from payment transaction /// }] pub fn indy_parse_payment_response ( command_handle : indy_handle_t , payment_method : * const :: std :: os :: raw :: c_char , resp_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds Indy request for doing minting /// according to this payment method. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// outputs_json: The list of outputs as json array: /// [{ /// recipient: <str>, // payment address of recipient /// amount: <int>, // amount /// }] /// extra: // optional information for payment operation /// /// #Returns /// mint_req_json - Indy request for doing minting /// payment_method - used payment method pub fn indy_build_mint_req ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , outputs_json : * const :: std :: os :: raw :: c_char , extra : * const :: std :: os :: raw :: c_char , cb : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Builds Indy request for setting fees for transactions in the ledger /// /// # Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// payment_method: payment method to use /// fees_json { /// txnType1: amount1, /// txnType2: amount2, /// ................. /// txnTypeN: amountN, /// } /// # Return /// set_txn_fees_json - Indy request for setting fees for transactions in the ledger pub fn indy_build_set_txn_fees_req ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , payment_method : * const :: std :: os :: raw :: c_char , fees_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds Indy get request for getting fees for transactions in the ledger /// /// # Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// payment_method: payment method to use /// /// # Return /// get_txn_fees_json - Indy request for getting fees for transactions in the ledger pub fn indy_build_get_txn_fees_req ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , payment_method : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Parses response for Indy request for getting fees /// /// # Params /// command_handle: Command handle to map callback to caller context. /// payment_method: payment method to use /// resp_json: response for Indy request for getting fees /// /// # Return /// fees_json { /// txnType1: amount1, /// txnType2: amount2, /// ................. /// txnTypeN: amountN, /// } pub fn indy_parse_get_txn_fees_response ( command_handle : indy_handle_t , payment_method : * const :: std :: os :: raw :: c_char , resp_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Builds Indy request for information to verify the payment receipt /// /// # Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: wallet handle /// submitter_did: (Optional) DID of request sender /// receipt: payment receipt to verify /// /// # Return /// verify_txn_json: Indy request for verification receipt /// payment_method: used payment method pub fn indy_build_verify_payment_req ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , submitter_did : * const :: std :: os :: raw :: c_char , receipt : * const :: std :: os :: raw :: c_char , cb : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Parses Indy response with information to verify receipt /// /// # Params /// command_handle: Command handle to map callback to caller context. /// payment_method: payment method to use /// resp_json: response of the ledger for verify txn /// /// # Return /// txn_json: { /// sources: [<str>, ] /// receipts: [ { /// recipient: <str>, // payment address of recipient /// receipt: <str>, // receipt that can be used for payment referencing and verification /// amount: <int>, // amount /// } ], /// extra: <str>, //optional data /// } pub fn indy_parse_verify_payment_response ( command_handle : indy_handle_t , payment_method : * const :: std :: os :: raw :: c_char , resp_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Creates a new local pool ledger configuration that can be used later to connect pool nodes. /// /// #Params /// config_name: Name of the pool ledger configuration. /// config (optional): Pool configuration json. if NULL, then default config will be used. Example: /// { /// "genesis_txn": string (optional), A path to genesis transaction file. If NULL, then a default one will be used. /// If file doesn't exists default one will be created. /// } /// /// #Returns /// Error code /// /// #Errors /// Common* /// Ledger* pub fn indy_create_pool_ledger_config ( command_handle : indy_handle_t , config_name : * const :: std :: os :: raw :: c_char , config : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Opens pool ledger and performs connecting to pool nodes. /// /// Pool ledger configuration with corresponded name must be previously created /// with indy_create_pool_ledger_config method. /// It is impossible to open pool with the same name more than once. /// /// config_name: Name of the pool ledger configuration. /// config (optional): Runtime pool configuration json. /// if NULL, then default config will be used. Example: /// { /// "timeout": int (optional), timeout for network request (in sec). /// "extended_timeout": int (optional), extended timeout for network request (in sec). /// "preordered_nodes": array<string> - (optional), names of nodes which will have a priority during request sending: /// ["name_of_1st_prior_node", "name_of_2nd_prior_node", .... ] /// Note: Not specified nodes will be placed in a random way. /// } /// /// #Returns /// Handle to opened pool to use in methods that require pool connection. /// /// #Errors /// Common* /// Ledger* pub fn indy_open_pool_ledger ( command_handle : indy_handle_t , config_name : * const :: std :: os :: raw :: c_char , config : * const :: std :: os :: raw :: c_char , cb : indy_handle_cb ) -> indy_error_t ; } extern "C" { /// Refreshes a local copy of a pool ledger and updates pool nodes connections. /// /// #Params /// handle: pool handle returned by indy_open_pool_ledger /// /// #Returns /// Error code /// /// #Errors /// Common* /// Ledger* pub fn indy_refresh_pool_ledger ( command_handle : indy_handle_t , handle : indy_handle_t , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Lists names of created pool ledgers /// /// #Params /// /// #Returns /// Error code /// /// #Errors pub fn indy_list_pools ( command_handle : indy_handle_t , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Closes opened pool ledger, opened nodes connections and frees allocated resources. /// /// #Params /// handle: pool handle returned by indy_open_pool_ledger. /// /// #Returns /// Error code /// /// #Errors /// Common* /// Ledger* pub fn indy_close_pool_ledger ( command_handle : indy_handle_t , handle : indy_handle_t , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Deletes created pool ledger configuration. /// /// #Params /// config_name: Name of the pool ledger configuration to delete. /// /// #Returns /// Error code /// /// #Errors /// Common* /// Ledger* pub fn indy_delete_pool_ledger_config ( command_handle : indy_handle_t , config_name : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Set PROTOCOL_VERSION to specific version. /// /// There is a global property PROTOCOL_VERSION that used in every request to the pool and /// specified version of Indy Node which Libindy works. /// /// By default PROTOCOL_VERSION=1. /// /// #Params /// protocol_version: Protocol version will be used: /// 1 - for Indy Node 1.3 /// 2 - for Indy Node 1.4 and greater /// /// #Returns /// Error code /// /// #Errors /// Common* pub fn indy_set_protocol_version ( command_handle : indy_handle_t , protocol_version : indy_u64_t , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Creates keys (signing and encryption keys) for a new /// DID (owned by the caller of the library). /// Identity's DID must be either explicitly provided, or taken as the first 16 bit of verkey. /// Saves the Identity DID with keys in a secured Wallet, so that it can be used to sign /// and encrypt transactions. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// did_json: Identity information as json. Example: /// { /// "did": string, (optional; /// if not provided and cid param is false then the first 16 bit of the verkey will be used as a new DID; /// if not provided and cid is true then the full verkey will be used as a new DID; /// if provided, then keys will be replaced - key rotation use case) /// "seed": string, (optional; if not provide then a random one will be created) /// "crypto_type": string, (optional; if not set then ed25519 curve is used; /// currently only 'ed25519' value is supported for this field) /// "cid": bool, (optional; if not set then false is used;) /// } /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// did: DID generated and stored in the wallet /// verkey: The DIDs verification key /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_create_and_store_my_did ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , did_json : * const :: std :: os :: raw :: c_char , cb : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Generated temporary keys (signing and encryption keys) for an existing /// DID (owned by the caller of the library). /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// identity_json: Identity information as json. Example: /// { /// "seed": string, (optional; if not provide then a random one will be created) /// "crypto_type": string, (optional; if not set then ed25519 curve is used; /// currently only 'ed25519' value is supported for this field) /// } /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// verkey: The DIDs verification key /// /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_replace_keys_start ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , did : * const :: std :: os :: raw :: c_char , identity_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Apply temporary keys as main for an existing DID (owned by the caller of the library). /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// did: DID stored in the wallet /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_replace_keys_apply ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , did : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Saves their DID for a pairwise connection in a secured Wallet, /// so that it can be used to verify transaction. /// /// #Params /// wallet_handle: wallet handler (created by open_wallet). /// command_handle: command handle to map callback to user context. /// identity_json: Identity information as json. Example: /// { /// "did": string, (required) /// "verkey": string (optional, can be avoided if did is cryptonym: did == verkey), /// } /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_store_their_did ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , identity_json : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Returns ver key (key id) for the given DID. /// /// "indy_key_for_did" call follow the idea that we resolve information about their DID from /// the ledger with cache in the local wallet. The "indy_open_wallet" call has freshness parameter /// that is used for checking the freshness of cached pool value. /// /// Note if you don't want to resolve their DID info from the ledger you can use /// "indy_key_for_local_did" call instead that will look only to the local wallet and skip /// freshness checking. /// /// Note that "indy_create_and_store_my_did" makes similar wallet record as "indy_create_key". /// As result we can use returned ver key in all generic crypto and messaging functions. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: Wallet handle (created by open_wallet). /// did - The DID to resolve key. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// - key - The DIDs ver key (key id). /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_key_for_did ( command_handle : indy_handle_t , pool_handle : indy_handle_t , wallet_handle : indy_handle_t , did : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Returns ver key (key id) for the given DID. /// /// "indy_key_for_local_did" call looks data stored in the local wallet only and skips freshness /// checking. /// /// Note if you want to get fresh data from the ledger you can use "indy_key_for_did" call /// instead. /// /// Note that "indy_create_and_store_my_did" makes similar wallet record as "indy_create_key". /// As result we can use returned ver key in all generic crypto and messaging functions. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: Wallet handle (created by open_wallet). /// did - The DID to resolve key. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// - key - The DIDs ver key (key id). /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_key_for_local_did ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , did : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Set/replaces endpoint information for the given DID. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: Wallet handle (created by open_wallet). /// did - The DID to resolve endpoint. /// address - The DIDs endpoint address. /// transport_key - The DIDs transport key (ver key, key id). /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_set_endpoint_for_did ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , did : * const :: std :: os :: raw :: c_char , address : * const :: std :: os :: raw :: c_char , transport_key : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Returns endpoint information for the given DID. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: Wallet handle (created by open_wallet). /// did - The DID to resolve endpoint. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// - endpoint - The DIDs endpoint. /// - transport_vk - The DIDs transport key (ver key, key id). /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_get_endpoint_for_did ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , pool_handle : indy_handle_t , did : * const :: std :: os :: raw :: c_char , cb : indy_str_str_cb ) -> indy_error_t ; } extern "C" { /// Saves/replaces the meta information for the giving DID in the wallet. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: Wallet handle (created by open_wallet). /// did - the DID to store metadata. /// metadata - the meta information that will be store with the DID. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: command handle to map callback to caller context. /// - err: Error code. /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_set_did_metadata ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , did : * const :: std :: os :: raw :: c_char , metadata : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Retrieves the meta information for the giving DID in the wallet. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: Wallet handle (created by open_wallet). /// did - The DID to retrieve metadata. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// - metadata - The meta information stored with the DID; Can be null if no metadata was saved for this DID. /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_get_did_metadata ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , did : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Retrieves the information about the giving DID in the wallet. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: Wallet handle (created by open_wallet). /// did - The DID to retrieve information. /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// did_with_meta: { /// "did": string - DID stored in the wallet, /// "verkey": string - The DIDs transport key (ver key, key id), /// "metadata": string - The meta information stored with the DID /// } /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_get_my_did_with_meta ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , my_did : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Retrieves the information about all DIDs stored in the wallet. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// wallet_handle: Wallet handle (created by open_wallet). /// cb: Callback that takes command result as parameter. /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// dids: [{ /// "did": string - DID stored in the wallet, /// "verkey": string - The DIDs transport key (ver key, key id)., /// "metadata": string - The meta information stored with the DID /// }] /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_list_my_dids_with_meta ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Retrieves abbreviated verkey if it is possible otherwise return full verkey. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// did: DID. /// full_verkey: The DIDs verification key, /// /// #Returns /// Error Code /// cb: /// - xcommand_handle: Command handle to map callback to caller context. /// - err: Error code. /// verkey: The DIDs verification key in either abbreviated or full form /// /// #Errors /// Common* /// Wallet* /// Crypto* pub fn indy_abbreviate_verkey ( command_handle : indy_handle_t , did : * const :: std :: os :: raw :: c_char , full_verkey : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } /// Create the wallet storage (For example, database creation) /// /// #Params /// name: wallet storage name (the same as wallet name) /// config: wallet storage config (For example, database config) /// credentials_json: wallet storage credentials (For example, database credentials) /// metadata: wallet metadata (For example encrypted keys). pub type indyCreateWalletCb = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , config : * const :: std :: os :: raw :: c_char , credentials_json : * const :: std :: os :: raw :: c_char , metadata : * const :: std :: os :: raw :: c_char ) -> indy_error_t > ; /// Open the wallet storage (For example, opening database connection) /// /// #Params /// name: wallet storage name (the same as wallet name) /// config: wallet storage config (For example, database config) /// credentials_json: wallet storage credentials (For example, database credentials) /// storage_handle_p: pointer to store opened storage handle pub type indyOpenWalletCb = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , config : * const :: std :: os :: raw :: c_char , credentials : * const :: std :: os :: raw :: c_char , handle : * mut indy_handle_t ) -> indy_error_t > ; /// Close the opened walled storage (For example, closing database connection) /// /// #Params /// storage_handle: opened storage handle (See open handler) pub type indyCloseWalletCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t ) -> indy_error_t > ; /// Delete the wallet storage (For example, database deletion) /// /// #Params /// name: wallet storage name (the same as wallet name) /// config: wallet storage config (For example, database config) /// credentials_json: wallet storage credentials (For example, database credentials) pub type indyDeleteWalletCb = :: std :: option :: Option < unsafe extern "C" fn ( name : * const :: std :: os :: raw :: c_char , config : * const :: std :: os :: raw :: c_char , credentials : * const :: std :: os :: raw :: c_char ) -> indy_error_t > ; /// Create a new record in the wallet storage /// /// #Params /// storage_handle: opened storage handle (See open handler) /// type_: allows to separate different record types collections /// id: the id of record /// value: the value of record (pointer to buffer) /// value_len: the value of record (buffer size) /// tags_json: the record tags used for search and storing meta information as json: /// { /// "tagName1": "tag value 1", // string value /// "tagName2": 123, // numeric value /// } /// Note that null means no tags pub type indyWalletAddRecordCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , value : * const indy_u8_t , value_len : indy_u32_t , tags_json : * const :: std :: os :: raw :: c_char ) -> indy_error_t > ; /// Update a record value /// /// #Params /// storage_handle: opened storage handle (See open handler) /// type_: allows to separate different record types collections /// id: the id of record /// value: the value of record (pointer to buffer) /// value_len: the value of record (buffer size) pub type indyWalletUpdateRecordValueCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , value : * const indy_u8_t , value_len : indy_u32_t ) -> indy_error_t > ; /// Update a record tags /// /// #Params /// storage_handle: opened storage handle (See open handler) /// type_: allows to separate different record types collections /// id: the id of record /// tags_json: the new record tags used for search and storing meta information as json: /// { /// "tagName1": "tag value 1", // string value /// "tagName2": 123, // numeric value /// } /// Note that null means no tags pub type indyWalletUpdateRecordTagsCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , tags_json : * const :: std :: os :: raw :: c_char ) -> indy_error_t > ; /// Add new tags to the record /// /// #Params /// storage_handle: opened storage handle (See open handler) /// type_: allows to separate different record types collections /// id: the id of record /// tags_json: the additional record tags as json: /// { /// "tagName1": "tag value 1", // string value /// "tagName2": 123, // numeric value, /// ... /// } /// Note that null means no tags /// Note if some from provided tags already assigned to the record than /// corresponding tags values will be replaced pub type indyWalletAddRecordTagsCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , tags_json : * const :: std :: os :: raw :: c_char ) -> indy_error_t > ; /// Delete tags from the record /// /// #Params /// storage_handle: opened storage handle (See open handler) /// type_: allows to separate different record types collections /// id: the id of record /// tag_names_json: the list of tag names to remove from the record as json array: /// ["tagName1", "tagName2", ...] /// Note that null means no tag names pub type indyWalletDeleteRecordTagsCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , tags_names : * const :: std :: os :: raw :: c_char ) -> indy_error_t > ; /// Delete an existing record in the wallet storage /// /// #Params /// storage_handle: opened storage handle (See open handler) /// type_: record type /// id: the id of record pub type indyWalletDeleteRecordCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char ) -> indy_error_t > ; /// Get an wallet storage record by id /// /// #Params /// storage_handle: opened storage handle (See open handler) /// type_: allows to separate different record types collections /// id: the id of record /// options_json: //TODO: FIXME: Think about replacing by bitmask /// { /// retrieveType: (optional, false by default) Retrieve record type, /// retrieveValue: (optional, true by default) Retrieve record value, /// retrieveTags: (optional, true by default) Retrieve record tags /// } /// record_handle_p: pointer to store retrieved record handle pub type indyWalletGetRecordCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , options_json : * const :: std :: os :: raw :: c_char , record_handle : * mut i32 ) -> indy_error_t > ; /// Get an id for retrieved wallet storage record /// /// #Params /// storage_handle: opened storage handle (See open handler) /// record_handle: retrieved record handle (See get_record handler) /// /// returns: record id /// Note that pointer lifetime the same as retrieved record lifetime /// (until record_free called) pub type indyWalletGetRecordIdCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , record_handle : indy_handle_t , id : * mut :: std :: os :: raw :: c_char ) -> indy_error_t > ; /// Get an type for retrieved wallet storage record /// /// #Params /// storage_handle: opened storage handle (See open handler) /// record_handle: retrieved record handle (See get_record handler) /// /// returns: record type /// Note that pointer lifetime the same as retrieved record lifetime /// (until record_free called) pub type indyWalletGetRecordTypeCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , record_handle : indy_handle_t , type_ : * mut :: std :: os :: raw :: c_char ) -> indy_error_t > ; /// Get an value for retrieved wallet storage record /// /// #Params /// storage_handle: opened storage handle (See open handler) /// record_handle: retrieved record handle (See get_record handler) /// /// returns: record value /// Note that pointer lifetime the same as retrieved record lifetime /// (until record_free called) /// Note that null be returned if no value retrieved pub type indyWalletGetRecordValueCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , record_handle : indy_handle_t , value : * mut indy_u8_t , value_len : indy_u32_t ) -> indy_error_t > ; /// Get an tags for retrieved wallet record /// /// #Params /// storage_handle: opened storage handle (See open handler) /// record_handle: retrieved record handle (See get_record handler) /// /// returns: record tags as json /// Note that pointer lifetime the same as retrieved record lifetime /// (until record_free called) /// Note that null be returned if no tags retrieved pub type indyWalletGetRecordTagsCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , record_handle : indy_handle_t , tags_json : * mut :: std :: os :: raw :: c_char ) -> indy_error_t > ; /// Free retrieved wallet record (make retrieved record handle invalid) /// /// #Params /// storage_handle: opened storage handle (See open_wallet_storage) /// record_handle: retrieved record handle (See wallet_storage_get_wallet_record) pub type indyWalletFreeRecordCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , record_handle : indy_handle_t ) -> indy_error_t > ; /// Get storage metadata /// /// #Params /// storage_handle: opened storage handle (See open handler) /// /// returns: metadata as base64 value /// Note that pointer lifetime is static pub type indyWalletGetStorageMetadataCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , metadata : * mut :: std :: os :: raw :: c_char , metadata_handle : indy_handle_t ) -> indy_error_t > ; /// Set storage metadata /// /// #Params /// storage_handle: opened storage handle (See open handler) /// metadata_p: base64 value of metadata /// /// Note if storage already have metadata record it will be overwritten. pub type indyWalletSetStorageMetadataCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , metadata : * const :: std :: os :: raw :: c_char ) -> indy_error_t > ; /// Free retrieved storage metadata record (make retrieved storage metadata handle invalid) /// /// #Params /// storage_handle: opened storage handle (See open_wallet_storage) /// metadata_handle: retrieved record handle (See wallet_storage_get_storage_metadata) pub type indyWalletFreeStorageMetadataCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , metadata_handle : indy_handle_t ) -> indy_error_t > ; /// Search for wallet storage records /// /// #Params /// storage_handle: opened storage handle (See open handler) /// type_: allows to separate different record types collections /// query_json: MongoDB style query to wallet record tags: /// { /// "tagName": "tagValue", /// $or: { /// "tagName2": { $regex: 'pattern' }, /// "tagName3": { $gte: 123 }, /// }, /// } /// options_json: //TODO: FIXME: Think about replacing by bitmask /// { /// retrieveRecords: (optional, true by default) If false only "counts" will be calculated, /// retrieveTotalCount: (optional, false by default) Calculate total count, /// retrieveType: (optional, false by default) Retrieve record type, /// retrieveValue: (optional, true by default) Retrieve record value, /// retrieveTags: (optional, true by default) Retrieve record tags, /// } /// search_handle_p: pointer to store wallet search handle pub type indyWalletOpenSearchCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , query : * const :: std :: os :: raw :: c_char , options : * const :: std :: os :: raw :: c_char , search_handle : * mut i32 ) -> indy_error_t > ; /// Search for all wallet storage records /// /// #Params /// storage_handle: opened storage handle (See open handler) /// search_handle_p: pointer to store wallet search handle pub type indyWalletOpenSearchAllCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , search_handle : indy_handle_t ) -> indy_error_t > ; /// Get total count of records that corresponds to wallet storage search query /// /// #Params /// storage_handle: opened storage handle (See open handler) /// search_handle: wallet search handle (See search_records handler) /// /// returns: total count of records that corresponds to wallet storage search query /// Note -1 will be returned if retrieveTotalCount set to false for search_records pub type indyWalletGetSearchTotalCountCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , search_handle : indy_handle_t , total_count : * mut indy_u32_t ) -> indy_error_t > ; /// Get the next wallet storage record handle retrieved by this wallet search. /// /// #Params /// storage_handle: opened storage handle (See open handler) /// search_handle: wallet search handle (See search_records handler) /// /// returns: record handle (the same as for get_record handler) /// Note if no more records WalletNoRecords error will be returned pub type indyWalletFetchSearchNextRecordsCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , search_handle : indy_handle_t , record_handle : indy_handle_t ) -> indy_error_t > ; /// Free wallet search (make search handle invalid) /// /// #Params /// storage_handle: opened storage handle (See open handler) /// search_handle: wallet search handle (See search_records handler) pub type indyWalletFreeSearchCb = :: std :: option :: Option < unsafe extern "C" fn ( handle : indy_handle_t , search_handle : indy_handle_t ) -> indy_error_t > ; extern "C" { /// Registers custom wallet storage implementation. /// /// It allows library user to provide custom wallet implementation. /// /// #Params /// command_handle: Command handle to map callback to caller context. /// type_: Wallet type name. /// create: WalletType create operation handler /// open: WalletType open operation handler /// close: Wallet close operation handler /// delete: WalletType delete operation handler /// add_record: WalletType add record operation handler /// update_record_value: WalletType update record value operation handler /// update_record_tags: WalletType update record tags operation handler /// add_record_tags: WalletType add record tags operation handler /// delete_record_tags: WalletType delete record tags operation handler /// delete_record: WalletType delete record operation handler /// get_record: WalletType get record operation handler /// get_record_id: WalletType get record id operation handler /// get_record_type: WalletType get record type operation handler /// get_record_value: WalletType get record value operation handler /// get_record_tags: WalletType get record tags operation handler /// free_record: WalletType free record operation handler /// search_records: WalletType search records operation handler /// search_all_records: WalletType search all records operation handler /// get_search_total_count: WalletType get search total count operation handler /// fetch_search_next_record: WalletType fetch search next record operation handler /// free_search: WalletType free search operation handler /// free: Handler that allows to de-allocate strings allocated in caller code /// /// #Returns /// Error code pub fn indy_register_wallet_storage ( command_handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , create_wallet_cb : indyCreateWalletCb , open_wallet_cb : indyOpenWalletCb , close_wallet_cb : indyCloseWalletCb , delete_wallet_cb : indyDeleteWalletCb , add_record_cb : indyWalletAddRecordCb , update_record_value : indyWalletUpdateRecordValueCb , update_record_tags_cb : indyWalletUpdateRecordTagsCb , add_record_tags_cb : indyWalletAddRecordTagsCb , delete_record_tags_cb : indyWalletDeleteRecordTagsCb , delete_record_cb : indyWalletDeleteRecordCb , get_record_cb : indyWalletGetRecordCb , get_record_id_cb : indyWalletGetRecordIdCb , get_record_type_cb : indyWalletGetRecordTypeCb , get_record_value_cb : indyWalletGetRecordValueCb , get_records_tags_cb : indyWalletGetRecordTagsCb , free_record_cb : indyWalletFreeRecordCb , get_storage_metadata_cb : indyWalletGetStorageMetadataCb , set_storage_metadata_cb : indyWalletSetStorageMetadataCb , free_storage_metadata_cb : indyWalletFreeStorageMetadataCb , open_search_cb : indyWalletOpenSearchCb , open_search_all_cb : indyWalletOpenSearchAllCb , get_search_total_count_cb : indyWalletGetSearchTotalCountCb , fetch_search_next_record_cb : indyWalletFetchSearchNextRecordsCb , free_search_cb : indyWalletFreeSearchCb , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Create a new secure wallet. /// /// #Params /// config: Wallet configuration json. /// { /// "id": string, Identifier of the wallet. /// Configured storage uses this identifier to lookup exact wallet data placement. /// "storage_type": optional<string>, Type of the wallet storage. Defaults to 'default'. /// 'Default' storage type allows to store wallet data in the local file. /// Custom storage types can be registered with indy_register_wallet_storage call. /// "storage_config": optional<object>, Storage configuration json. Storage type defines set of supported keys. /// Can be optional if storage supports default configuration. /// For 'default' storage type configuration is: /// { /// "path": optional<string>, Path to the directory with wallet files. /// Defaults to $HOME/.indy_client/wallets. /// Wallet will be stored in the file {path}/{id}/sqlite.db /// } /// } /// credentials: Wallet credentials json /// { /// "key": string, Key or passphrase used for wallet key derivation. /// Look to key_derivation_method param for information about supported key derivation methods. /// "storage_credentials": optional<object> Credentials for wallet storage. Storage type defines set of supported keys. /// Can be optional if storage supports default configuration. /// For 'default' storage type should be empty. /// "key_derivation_method": optional<string> Algorithm to use for wallet key derivation: /// ARGON2I_MOD - derive secured wallet master key (used by default) /// ARGON2I_INT - derive secured wallet master key (less secured but faster) /// RAW - raw wallet key master provided (skip derivation). /// RAW keys can be generated with indy_generate_wallet_key call /// } /// /// #Returns /// err: Error code /// /// #Errors /// Common* /// Wallet* pub fn indy_create_wallet ( command_handle : indy_handle_t , config : * const :: std :: os :: raw :: c_char , credentials : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Open the wallet. /// /// Wallet must be previously created with indy_create_wallet method. /// /// #Params /// config: Wallet configuration json. /// { /// "id": string, Identifier of the wallet. /// Configured storage uses this identifier to lookup exact wallet data placement. /// "storage_type": optional<string>, Type of the wallet storage. Defaults to 'default'. /// 'Default' storage type allows to store wallet data in the local file. /// Custom storage types can be registered with indy_register_wallet_storage call. /// "storage_config": optional<object>, Storage configuration json. Storage type defines set of supported keys. /// Can be optional if storage supports default configuration. /// For 'default' storage type configuration is: /// { /// "path": optional<string>, Path to the directory with wallet files. /// Defaults to $HOME/.indy_client/wallets. /// Wallet will be stored in the file {path}/{id}/sqlite.db /// } /// /// } /// credentials: Wallet credentials json /// { /// "key": string, Key or passphrase used for wallet key derivation. /// Look to key_derivation_method param for information about supported key derivation methods. /// "rekey": optional<string>, If present than wallet master key will be rotated to a new one. /// "storage_credentials": optional<object> Credentials for wallet storage. Storage type defines set of supported keys. /// Can be optional if storage supports default configuration. /// For 'default' storage type should be empty. /// "key_derivation_method": optional<string> Algorithm to use for wallet key derivation: /// ARGON2I_MOD - derive secured wallet master key (used by default) /// ARGON2I_INT - derive secured wallet master key (less secured but faster) /// RAW - raw wallet key master provided (skip derivation). /// RAW keys can be generated with indy_generate_wallet_key call /// "rekey_derivation_method": optional<string> Algorithm to use for wallet rekey derivation: /// ARGON2I_MOD - derive secured wallet master rekey (used by default) /// ARGON2I_INT - derive secured wallet master rekey (less secured but faster) /// RAW - raw wallet key master provided (skip derivation). /// RAW keys can be generated with indy_generate_wallet_key call /// } /// /// #Returns /// err: Error code /// handle: Handle to opened wallet to use in methods that require wallet access. /// /// #Errors /// Common* /// Wallet* pub fn indy_open_wallet ( command_handle : indy_handle_t , config : * const :: std :: os :: raw :: c_char , credentials : * const :: std :: os :: raw :: c_char , cb : indy_handle_cb ) -> indy_error_t ; } extern "C" { /// Exports opened wallet /// /// #Params: /// wallet_handle: wallet handle returned by indy_open_wallet /// export_config: JSON containing settings for input operation. /// { /// "path": <string>, Path of the file that contains exported wallet content /// "key": <string>, Key or passphrase used for wallet export key derivation. /// Look to key_derivation_method param for information about supported key derivation methods. /// "key_derivation_method": optional<string> Algorithm to use for export key derivation: /// ARGON2I_MOD - derive secured export key (used by default) /// ARGON2I_INT - derive secured export key (less secured but faster) /// RAW - raw export key provided (skip derivation). /// RAW keys can be generated with indy_generate_wallet_key call /// } /// /// #Returns /// Error code /// /// #Errors /// Common* /// Wallet* pub fn indy_export_wallet ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , export_config_json : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Creates a new secure wallet and then imports its content /// according to fields provided in import_config /// This can be seen as an indy_create_wallet call with additional content import /// /// #Params /// config: Wallet configuration json. /// { /// "id": string, Identifier of the wallet. /// Configured storage uses this identifier to lookup exact wallet data placement. /// "storage_type": optional<string>, Type of the wallet storage. Defaults to 'default'. /// 'Default' storage type allows to store wallet data in the local file. /// Custom storage types can be registered with indy_register_wallet_storage call. /// "storage_config": optional<object>, Storage configuration json. Storage type defines set of supported keys. /// Can be optional if storage supports default configuration. /// For 'default' storage type configuration is: /// { /// "path": optional<string>, Path to the directory with wallet files. /// Defaults to $HOME/.indy_client/wallets. /// Wallet will be stored in the file {path}/{id}/sqlite.db /// } /// } /// credentials: Wallet credentials json /// { /// "key": string, Key or passphrase used for wallet key derivation. /// Look to key_derivation_method param for information about supported key derivation methods. /// "storage_credentials": optional<object> Credentials for wallet storage. Storage type defines set of supported keys. /// Can be optional if storage supports default configuration. /// For 'default' storage type should be empty. /// "key_derivation_method": optional<string> Algorithm to use for wallet key derivation: /// ARGON2I_MOD - derive secured wallet master key (used by default) /// ARGON2I_INT - derive secured wallet master key (less secured but faster) /// RAW - raw wallet key master provided (skip derivation). /// RAW keys can be generated with indy_generate_wallet_key call /// } /// import_config: Import settings json. /// { /// "path": <string>, path of the file that contains exported wallet content /// "key": <string>, key used for export of the wallet /// } /// /// #Returns /// Error code /// /// #Errors /// Common* /// Wallet* pub fn indy_import_wallet ( command_handle : indy_handle_t , config : * const :: std :: os :: raw :: c_char , credentials : * const :: std :: os :: raw :: c_char , import_config_json : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Closes opened wallet and frees allocated resources. /// /// #Params /// wallet_handle: wallet handle returned by indy_open_wallet. /// /// #Returns /// Error code /// /// #Errors /// Common* /// Wallet* pub fn indy_close_wallet ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Deletes created wallet. /// /// #Params /// config: Wallet configuration json. /// { /// "id": string, Identifier of the wallet. /// Configured storage uses this identifier to lookup exact wallet data placement. /// "storage_type": optional<string>, Type of the wallet storage. Defaults to 'default'. /// 'Default' storage type allows to store wallet data in the local file. /// Custom storage types can be registered with indy_register_wallet_storage call. /// "storage_config": optional<object>, Storage configuration json. Storage type defines set of supported keys. /// Can be optional if storage supports default configuration. /// For 'default' storage type configuration is: /// { /// "path": optional<string>, Path to the directory with wallet files. /// Defaults to $HOME/.indy_client/wallets. /// Wallet will be stored in the file {path}/{id}/sqlite.db /// } /// } /// credentials: Wallet credentials json /// { /// "key": string, Key or passphrase used for wallet key derivation. /// Look to key_derivation_method param for information about supported key derivation methods. /// "storage_credentials": optional<object> Credentials for wallet storage. Storage type defines set of supported keys. /// Can be optional if storage supports default configuration. /// For 'default' storage type should be empty. /// "key_derivation_method": optional<string> Algorithm to use for wallet key derivation: /// ARGON2I_MOD - derive secured wallet master key (used by default) /// ARGON2I_INT - derive secured wallet master key (less secured but faster) /// RAW - raw wallet key master provided (skip derivation). /// RAW keys can be generated with indy_generate_wallet_key call /// } /// /// #Returns /// Error code /// /// #Errors /// Common* /// Wallet* pub fn indy_delete_wallet ( command_handle : indy_handle_t , config : * const :: std :: os :: raw :: c_char , credentials : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Generate wallet master key. /// Returned key is compatible with "RAW" key derivation method. /// It allows to avoid expensive key derivation for use cases when wallet keys can be stored in a secure enclave. /// /// #Params /// config: (optional) key configuration json. /// { /// "seed": optional<string> Seed that allows deterministic key creation (if not set random one will be used). /// } /// /// #Returns /// err: Error code /// /// #Errors /// Common* /// Wallet* pub fn indy_generate_wallet_key ( command_handle : indy_handle_t , config : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { pub fn indy_open_blob_storage_reader ( command_handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , config_json : * const :: std :: os :: raw :: c_char , cb : indy_handle_cb ) -> indy_error_t ; } extern "C" { pub fn indy_open_blob_storage_writer ( command_handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , config_json : * const :: std :: os :: raw :: c_char , cb : indy_handle_cb ) -> indy_error_t ; } extern "C" { /// Create a new non-secret record in the wallet /// /// #Params /// command_handle: command handle to map callback to caller context /// wallet_handle: wallet handle (created by open_wallet) /// type_: allows to separate different record types collections /// id: the id of record /// value: the value of record /// tags_json: the record tags used for search and storing meta information as json: /// { /// "tagName1": <str>, // string tag (will be stored encrypted) /// "tagName2": <str>, // string tag (will be stored encrypted) /// "~tagName3": <str>, // string tag (will be stored un-encrypted) /// "~tagName4": <str>, // string tag (will be stored un-encrypted) /// } /// Note that null means no tags /// If tag name starts with "~" the tag will be stored un-encrypted that will allow /// usage of this tag in complex search queries (comparison, predicates) /// Encrypted tags can be searched only for exact matching pub fn indy_add_wallet_record ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char , tags_json : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Update a non-secret wallet record value /// /// #Params /// command_handle: command handle to map callback to caller context /// wallet_handle: wallet handle (created by open_wallet) /// type_: allows to separate different record types collections /// id: the id of record /// value: the new value of record pub fn indy_update_wallet_record_value ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Update a non-secret wallet record tags /// /// #Params /// command_handle: command handle to map callback to caller context /// wallet_handle: wallet handle (created by open_wallet) /// type_: allows to separate different record types collections /// id: the id of record /// tags_json: the record tags used for search and storing meta information as json: /// { /// "tagName1": <str>, // string tag (will be stored encrypted) /// "tagName2": <str>, // string tag (will be stored encrypted) /// "~tagName3": <str>, // string tag (will be stored un-encrypted) /// "~tagName4": <str>, // string tag (will be stored un-encrypted) /// } /// If tag name starts with "~" the tag will be stored un-encrypted that will allow /// usage of this tag in complex search queries (comparison, predicates) /// Encrypted tags can be searched only for exact matching pub fn indy_update_wallet_record_tags ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , tags_json : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Add new tags to the wallet record /// /// #Params /// command_handle: command handle to map callback to caller context /// wallet_handle: wallet handle (created by open_wallet) /// type_: allows to separate different record types collections /// id: the id of record /// tags_json: the record tags used for search and storing meta information as json: /// { /// "tagName1": <str>, // string tag (will be stored encrypted) /// "tagName2": <str>, // string tag (will be stored encrypted) /// "~tagName3": <str>, // string tag (will be stored un-encrypted) /// "~tagName4": <str>, // string tag (will be stored un-encrypted) /// } /// If tag name starts with "~" the tag will be stored un-encrypted that will allow /// usage of this tag in complex search queries (comparison, predicates) /// Encrypted tags can be searched only for exact matching /// Note if some from provided tags already assigned to the record than /// corresponding tags values will be replaced pub fn indy_add_wallet_record_tags ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , tags_json : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Delete tags from the wallet record /// /// #Params /// command_handle: command handle to map callback to caller context /// wallet_handle: wallet handle (created by open_wallet) /// type_: allows to separate different record types collections /// id: the id of record /// tag_names_json: the list of tag names to remove from the record as json array: /// ["tagName1", "tagName2", ...] pub fn indy_delete_wallet_record_tags ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , tag_names_json : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Delete an existing wallet record in the wallet /// /// #Params /// command_handle: command handle to map callback to caller context /// wallet_handle: wallet handle (created by open_wallet) /// type_: record type /// id: the id of record pub fn indy_delete_wallet_record ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , cb : indy_empty_cb ) -> indy_error_t ; } extern "C" { /// Get an wallet record by id /// /// #Params /// command_handle: command handle to map callback to caller context /// wallet_handle: wallet handle (created by open_wallet) /// type_: allows to separate different record types collections /// id: the id of record /// options_json: //TODO: FIXME: Think about replacing by bitmask /// { /// retrieveType: (optional, false by default) Retrieve record type, /// retrieveValue: (optional, true by default) Retrieve record value, /// retrieveTags: (optional, true by default) Retrieve record tags /// } /// #Returns /// wallet record json: /// { /// id: "Some id", /// type: "Some type", // present only if retrieveType set to true /// value: "Some value", // present only if retrieveValue set to true /// tags: <tags json>, // present only if retrieveTags set to true /// } pub fn indy_get_wallet_record ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , id : * const :: std :: os :: raw :: c_char , options_json : * const :: std :: os :: raw :: c_char , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Search for wallet records. /// /// Note instead of immediately returning of fetched records /// this call returns wallet_search_handle that can be used later /// to fetch records by small batches (with indy_fetch_wallet_search_next_records). /// /// #Params /// wallet_handle: wallet handle (created by open_wallet) /// type_: allows to separate different record types collections /// query_json: MongoDB style query to wallet record tags: /// { /// "tagName": "tagValue", /// $or: { /// "tagName2": { $regex: 'pattern' }, /// "tagName3": { $gte: '123' }, /// }, /// } /// options_json: //TODO: FIXME: Think about replacing by bitmask /// { /// retrieveRecords: (optional, true by default) If false only "counts" will be calculated, /// retrieveTotalCount: (optional, false by default) Calculate total count, /// retrieveType: (optional, false by default) Retrieve record type, /// retrieveValue: (optional, true by default) Retrieve record value, /// retrieveTags: (optional, true by default) Retrieve record tags, /// } /// #Returns /// search_handle: Wallet search handle that can be used later /// to fetch records by small batches (with indy_fetch_wallet_search_next_records) pub fn indy_open_wallet_search ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , type_ : * const :: std :: os :: raw :: c_char , query_json : * const :: std :: os :: raw :: c_char , options_json : * const :: std :: os :: raw :: c_char , cb : indy_handle_cb ) -> indy_error_t ; } extern "C" { /// Get an wallet record by id /// /// #Params /// command_handle: command handle to map callback to caller context /// wallet_handle: wallet handle (created by open_wallet) /// type_: allows to separate different record types collections /// id: the id of record /// options_json: //TODO: FIXME: Think about replacing by bitmask /// { /// retrieveType: (optional, false by default) Retrieve record type, /// retrieveValue: (optional, true by default) Retrieve record value, /// retrieveTags: (optional, true by default) Retrieve record tags /// } /// #Returns /// wallet record json: /// { /// id: "Some id", /// type: "Some type", // present only if retrieveType set to true /// value: "Some value", // present only if retrieveValue set to true /// tags: <tags json>, // present only if retrieveTags set to true /// } pub fn indy_fetch_wallet_search_next_records ( command_handle : indy_handle_t , wallet_handle : indy_handle_t , wallet_search_handle : indy_handle_t , count : indy_u32_t , cb : indy_str_cb ) -> indy_error_t ; } extern "C" { /// Close wallet search (make search handle invalid) /// /// #Params /// wallet_search_handle: wallet search handle pub fn indy_close_wallet_search ( command_handle : indy_handle_t , wallet_search_handle : indy_handle_t , cb : indy_empty_cb ) -> indy_error_t ; } pub type indyLoggerEnabledCb = :: std :: option :: Option < unsafe extern "C" fn ( context : * const :: std :: os :: raw :: c_void , level : indy_u32_t , target : * const :: std :: os :: raw :: c_char ) -> indy_bool_t > ; pub type indyLoggerLogCb = :: std :: option :: Option < unsafe extern "C" fn ( context : * const :: std :: os :: raw :: c_void , level : indy_u32_t , target : * const :: std :: os :: raw :: c_char , message : * const :: std :: os :: raw :: c_char , module_path : * const :: std :: os :: raw :: c_char , file : * const :: std :: os :: raw :: c_char , line : indy_u32_t ) > ; pub type indyLoggerFlushCb = :: std :: option :: Option < unsafe extern "C" fn ( context : * const :: std :: os :: raw :: c_void ) > ; pub type indyGetLoggerEnabledCb = * mut :: std :: option :: Option < unsafe extern "C" fn ( context : * const :: std :: os :: raw :: c_void , level : indy_u32_t , target : * const :: std :: os :: raw :: c_char ) -> indy_bool_t > ; pub type indyGetLoggerLogCb = * mut :: std :: option :: Option < unsafe extern "C" fn ( context : * const :: std :: os :: raw :: c_void , level : indy_u32_t , target : * const :: std :: os :: raw :: c_char , message : * const :: std :: os :: raw :: c_char , module_path : * const :: std :: os :: raw :: c_char , file : * const :: std :: os :: raw :: c_char , line : indy_u32_t ) > ; pub type indyGetLoggerFlushCb = * mut :: std :: option :: Option < unsafe extern "C" fn ( context : * const :: std :: os :: raw :: c_void ) > ; extern "C" { /// Set custom logger implementation. /// /// Allows library user to provide custom logger implementation as set of handlers. /// /// #Params /// context: pointer to some logger context that will be available in logger handlers. /// enabled: (optional) "enabled" operation handler - calls to determines if a log record would be logged. (false positive if not specified) /// log: "log" operation handler - calls to logs a record. /// flush: (optional) "flush" operation handler - calls to flushes buffered records (in case of crash or signal). /// /// #Returns /// Error code pub fn indy_set_logger ( context : * const :: std :: os :: raw :: c_void , enabled_cb : indyLoggerEnabledCb , log_cb : indyLoggerLogCb , flush_cb : indyLoggerFlushCb ) -> indy_error_t ; } extern "C" { /// Set default logger implementation. /// /// Allows library user use `env_logger` logger as default implementation. /// More details about `env_logger` and its customization can be found here: https://crates.io/crates/env_logger /// /// #Params /// pattern: (optional) pattern that corresponds with the log messages to show. /// /// NOTE: You should specify either `pattern` parameter or `RUST_LOG` environment variable to init logger. /// /// #Returns /// Error code pub fn indy_set_default_logger ( pattern : * const :: std :: os :: raw :: c_char ) -> indy_error_t ; } extern "C" { /// Get the currently used logger. /// /// NOTE: if logger is not set dummy implementation would be returned. /// /// #Params /// `context_p` - Reference that will contain logger context. /// `enabled_cb_p` - Reference that will contain pointer to enable operation handler. /// `log_cb_p` - Reference that will contain pointer to log operation handler. /// `flush_cb_p` - Reference that will contain pointer to flush operation handler. /// /// #Returns /// Error code pub fn indy_get_logger ( indy_get_logger : * const :: std :: os :: raw :: c_void , enabled_cb : indyLoggerEnabledCb , log_cb : indyLoggerLogCb , flush_cb : indyLoggerFlushCb ) -> indy_error_t ; }