A local-first private AI assistant for everyday use. Runs on-device models with encrypted P2P sync, and supports sharing chats publicly on ATProto.
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: Added create_identity fn in tilekit

This is allow the clients to create an identity and save in
the OS secure store.

madclaws e32cc9a3 138f1dfb

+887 -6
+845 -6
Cargo.lock
··· 118 118 checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" 119 119 120 120 [[package]] 121 + name = "arbitrary" 122 + version = "1.4.2" 123 + source = "registry+https://github.com/rust-lang/crates.io-index" 124 + checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" 125 + 126 + [[package]] 121 127 name = "arc-swap" 122 128 version = "1.8.0" 123 129 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 353 359 ] 354 360 355 361 [[package]] 362 + name = "async-signature" 363 + version = "0.5.1" 364 + source = "registry+https://github.com/rust-lang/crates.io-index" 365 + checksum = "646dcc11163091f40c1618702bcde3d2e152c52b05fc4527fc67cfe077e47c22" 366 + dependencies = [ 367 + "signature", 368 + ] 369 + 370 + [[package]] 356 371 name = "async-stream" 357 372 version = "0.3.6" 358 373 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 413 428 checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 414 429 415 430 [[package]] 431 + name = "base-x" 432 + version = "0.2.11" 433 + source = "registry+https://github.com/rust-lang/crates.io-index" 434 + checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" 435 + 436 + [[package]] 437 + name = "base16ct" 438 + version = "0.2.0" 439 + source = "registry+https://github.com/rust-lang/crates.io-index" 440 + checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" 441 + 442 + [[package]] 443 + name = "base256emoji" 444 + version = "1.0.2" 445 + source = "registry+https://github.com/rust-lang/crates.io-index" 446 + checksum = "b5e9430d9a245a77c92176e649af6e275f20839a48389859d1661e9a128d077c" 447 + dependencies = [ 448 + "const-str", 449 + "match-lookup", 450 + ] 451 + 452 + [[package]] 453 + name = "base58" 454 + version = "0.2.0" 455 + source = "registry+https://github.com/rust-lang/crates.io-index" 456 + checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" 457 + 458 + [[package]] 416 459 name = "base64" 417 460 version = "0.22.1" 418 461 source = "registry+https://github.com/rust-lang/crates.io-index" 419 462 checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 463 + 464 + [[package]] 465 + name = "base64ct" 466 + version = "1.8.3" 467 + source = "registry+https://github.com/rust-lang/crates.io-index" 468 + checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" 420 469 421 470 [[package]] 422 471 name = "bincode" ··· 434 483 checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" 435 484 436 485 [[package]] 486 + name = "block-buffer" 487 + version = "0.10.4" 488 + source = "registry+https://github.com/rust-lang/crates.io-index" 489 + checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 490 + dependencies = [ 491 + "generic-array", 492 + ] 493 + 494 + [[package]] 437 495 name = "bon" 438 496 version = "3.8.2" 439 497 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 498 556 checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" 499 557 500 558 [[package]] 559 + name = "cbor4ii" 560 + version = "0.2.14" 561 + source = "registry+https://github.com/rust-lang/crates.io-index" 562 + checksum = "b544cf8c89359205f4f990d0e6f3828db42df85b5dac95d09157a250eb0749c4" 563 + dependencies = [ 564 + "serde", 565 + ] 566 + 567 + [[package]] 501 568 name = "cc" 502 569 version = "1.2.51" 503 570 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 533 600 ] 534 601 535 602 [[package]] 603 + name = "cid" 604 + version = "0.11.1" 605 + source = "registry+https://github.com/rust-lang/crates.io-index" 606 + checksum = "3147d8272e8fa0ccd29ce51194dd98f79ddfb8191ba9e3409884e751798acf3a" 607 + dependencies = [ 608 + "arbitrary", 609 + "core2", 610 + "multibase", 611 + "multihash", 612 + "quickcheck", 613 + "rand 0.8.5", 614 + "serde", 615 + "serde_bytes", 616 + "unsigned-varint", 617 + ] 618 + 619 + [[package]] 536 620 name = "clap" 537 621 version = "4.5.54" 538 622 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 616 700 ] 617 701 618 702 [[package]] 703 + name = "const-oid" 704 + version = "0.9.6" 705 + source = "registry+https://github.com/rust-lang/crates.io-index" 706 + checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" 707 + 708 + [[package]] 619 709 name = "const-random" 620 710 version = "0.1.18" 621 711 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 634 724 "once_cell", 635 725 "tiny-keccak", 636 726 ] 727 + 728 + [[package]] 729 + name = "const-str" 730 + version = "0.4.3" 731 + source = "registry+https://github.com/rust-lang/crates.io-index" 732 + checksum = "2f421161cb492475f1661ddc9815a745a1c894592070661180fdec3d4872e9c3" 637 733 638 734 [[package]] 639 735 name = "core-foundation" ··· 646 742 ] 647 743 648 744 [[package]] 745 + name = "core-foundation" 746 + version = "0.10.1" 747 + source = "registry+https://github.com/rust-lang/crates.io-index" 748 + checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" 749 + dependencies = [ 750 + "core-foundation-sys", 751 + "libc", 752 + ] 753 + 754 + [[package]] 649 755 name = "core-foundation-sys" 650 756 version = "0.8.7" 651 757 source = "registry+https://github.com/rust-lang/crates.io-index" 652 758 checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 653 759 654 760 [[package]] 761 + name = "core2" 762 + version = "0.4.0" 763 + source = "registry+https://github.com/rust-lang/crates.io-index" 764 + checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" 765 + dependencies = [ 766 + "memchr", 767 + ] 768 + 769 + [[package]] 655 770 name = "core_affinity" 656 771 version = "0.8.3" 657 772 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 660 775 "libc", 661 776 "num_cpus", 662 777 "winapi", 778 + ] 779 + 780 + [[package]] 781 + name = "cpufeatures" 782 + version = "0.2.17" 783 + source = "registry+https://github.com/rust-lang/crates.io-index" 784 + checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" 785 + dependencies = [ 786 + "libc", 663 787 ] 664 788 665 789 [[package]] ··· 703 827 checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" 704 828 705 829 [[package]] 830 + name = "crypto-bigint" 831 + version = "0.5.5" 832 + source = "registry+https://github.com/rust-lang/crates.io-index" 833 + checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" 834 + dependencies = [ 835 + "generic-array", 836 + "rand_core 0.6.4", 837 + "subtle", 838 + "zeroize", 839 + ] 840 + 841 + [[package]] 842 + name = "crypto-common" 843 + version = "0.1.6" 844 + source = "registry+https://github.com/rust-lang/crates.io-index" 845 + checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 846 + dependencies = [ 847 + "generic-array", 848 + "typenum", 849 + ] 850 + 851 + [[package]] 706 852 name = "csv" 707 853 version = "1.4.0" 708 854 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 724 870 ] 725 871 726 872 [[package]] 873 + name = "curve25519-dalek" 874 + version = "4.1.3" 875 + source = "registry+https://github.com/rust-lang/crates.io-index" 876 + checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" 877 + dependencies = [ 878 + "cfg-if", 879 + "cpufeatures", 880 + "curve25519-dalek-derive", 881 + "digest", 882 + "fiat-crypto", 883 + "rustc_version", 884 + "subtle", 885 + "zeroize", 886 + ] 887 + 888 + [[package]] 889 + name = "curve25519-dalek-derive" 890 + version = "0.1.1" 891 + source = "registry+https://github.com/rust-lang/crates.io-index" 892 + checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" 893 + dependencies = [ 894 + "proc-macro2", 895 + "quote", 896 + "syn 2.0.113", 897 + ] 898 + 899 + [[package]] 727 900 name = "darling" 728 901 version = "0.14.4" 729 902 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 793 966 ] 794 967 795 968 [[package]] 969 + name = "data-encoding" 970 + version = "2.10.0" 971 + source = "registry+https://github.com/rust-lang/crates.io-index" 972 + checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" 973 + 974 + [[package]] 975 + name = "data-encoding-macro" 976 + version = "0.1.19" 977 + source = "registry+https://github.com/rust-lang/crates.io-index" 978 + checksum = "8142a83c17aa9461d637e649271eae18bf2edd00e91f2e105df36c3c16355bdb" 979 + dependencies = [ 980 + "data-encoding", 981 + "data-encoding-macro-internal", 982 + ] 983 + 984 + [[package]] 985 + name = "data-encoding-macro-internal" 986 + version = "0.1.17" 987 + source = "registry+https://github.com/rust-lang/crates.io-index" 988 + checksum = "7ab67060fc6b8ef687992d439ca0fa36e7ed17e9a0b16b25b601e8757df720de" 989 + dependencies = [ 990 + "data-encoding", 991 + "syn 2.0.113", 992 + ] 993 + 994 + [[package]] 995 + name = "der" 996 + version = "0.7.10" 997 + source = "registry+https://github.com/rust-lang/crates.io-index" 998 + checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" 999 + dependencies = [ 1000 + "const-oid", 1001 + "pem-rfc7468", 1002 + "zeroize", 1003 + ] 1004 + 1005 + [[package]] 1006 + name = "digest" 1007 + version = "0.10.7" 1008 + source = "registry+https://github.com/rust-lang/crates.io-index" 1009 + checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 1010 + dependencies = [ 1011 + "block-buffer", 1012 + "const-oid", 1013 + "crypto-common", 1014 + "subtle", 1015 + ] 1016 + 1017 + [[package]] 796 1018 name = "dirs" 797 1019 version = "6.0.0" 798 1020 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 885 1107 checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" 886 1108 887 1109 [[package]] 1110 + name = "ecdsa" 1111 + version = "0.16.9" 1112 + source = "registry+https://github.com/rust-lang/crates.io-index" 1113 + checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" 1114 + dependencies = [ 1115 + "der", 1116 + "digest", 1117 + "elliptic-curve", 1118 + "rfc6979", 1119 + "signature", 1120 + "spki", 1121 + ] 1122 + 1123 + [[package]] 1124 + name = "ed25519" 1125 + version = "2.2.3" 1126 + source = "registry+https://github.com/rust-lang/crates.io-index" 1127 + checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" 1128 + dependencies = [ 1129 + "pkcs8", 1130 + "serde", 1131 + "signature", 1132 + ] 1133 + 1134 + [[package]] 1135 + name = "ed25519-dalek" 1136 + version = "2.2.0" 1137 + source = "registry+https://github.com/rust-lang/crates.io-index" 1138 + checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" 1139 + dependencies = [ 1140 + "curve25519-dalek", 1141 + "ed25519", 1142 + "rand_core 0.6.4", 1143 + "serde", 1144 + "sha2", 1145 + "subtle", 1146 + "zeroize", 1147 + ] 1148 + 1149 + [[package]] 888 1150 name = "either" 889 1151 version = "1.15.0" 890 1152 source = "registry+https://github.com/rust-lang/crates.io-index" 891 1153 checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 892 1154 893 1155 [[package]] 1156 + name = "elliptic-curve" 1157 + version = "0.13.8" 1158 + source = "registry+https://github.com/rust-lang/crates.io-index" 1159 + checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" 1160 + dependencies = [ 1161 + "base16ct", 1162 + "crypto-bigint", 1163 + "digest", 1164 + "ff", 1165 + "generic-array", 1166 + "group", 1167 + "pem-rfc7468", 1168 + "pkcs8", 1169 + "rand_core 0.6.4", 1170 + "sec1", 1171 + "subtle", 1172 + "zeroize", 1173 + ] 1174 + 1175 + [[package]] 894 1176 name = "encode_unicode" 895 1177 version = "1.0.0" 896 1178 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 921 1203 "proc-macro2", 922 1204 "quote", 923 1205 "syn 2.0.113", 1206 + ] 1207 + 1208 + [[package]] 1209 + name = "env_filter" 1210 + version = "1.0.0" 1211 + source = "registry+https://github.com/rust-lang/crates.io-index" 1212 + checksum = "7a1c3cc8e57274ec99de65301228b537f1e4eedc1b8e0f9411c6caac8ae7308f" 1213 + dependencies = [ 1214 + "log", 1215 + "regex", 1216 + ] 1217 + 1218 + [[package]] 1219 + name = "env_logger" 1220 + version = "0.11.9" 1221 + source = "registry+https://github.com/rust-lang/crates.io-index" 1222 + checksum = "b2daee4ea451f429a58296525ddf28b45a3b64f1acf6587e2067437bb11e218d" 1223 + dependencies = [ 1224 + "env_filter", 1225 + "log", 924 1226 ] 925 1227 926 1228 [[package]] ··· 1003 1305 "rustix", 1004 1306 "windows-sys 0.59.0", 1005 1307 ] 1308 + 1309 + [[package]] 1310 + name = "ff" 1311 + version = "0.13.1" 1312 + source = "registry+https://github.com/rust-lang/crates.io-index" 1313 + checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" 1314 + dependencies = [ 1315 + "rand_core 0.6.4", 1316 + "subtle", 1317 + ] 1318 + 1319 + [[package]] 1320 + name = "fiat-crypto" 1321 + version = "0.2.9" 1322 + source = "registry+https://github.com/rust-lang/crates.io-index" 1323 + checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" 1006 1324 1007 1325 [[package]] 1008 1326 name = "find-msvc-tools" ··· 1292 1610 ] 1293 1611 1294 1612 [[package]] 1613 + name = "generic-array" 1614 + version = "0.14.9" 1615 + source = "registry+https://github.com/rust-lang/crates.io-index" 1616 + checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" 1617 + dependencies = [ 1618 + "typenum", 1619 + "version_check", 1620 + "zeroize", 1621 + ] 1622 + 1623 + [[package]] 1295 1624 name = "getrandom" 1296 1625 version = "0.2.16" 1297 1626 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1317 1646 ] 1318 1647 1319 1648 [[package]] 1649 + name = "getrandom" 1650 + version = "0.4.1" 1651 + source = "registry+https://github.com/rust-lang/crates.io-index" 1652 + checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" 1653 + dependencies = [ 1654 + "cfg-if", 1655 + "libc", 1656 + "r-efi", 1657 + "rand_core 0.10.0", 1658 + "wasip2", 1659 + "wasip3", 1660 + ] 1661 + 1662 + [[package]] 1320 1663 name = "glob" 1321 1664 version = "0.3.3" 1322 1665 source = "registry+https://github.com/rust-lang/crates.io-index" 1323 1666 checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" 1667 + 1668 + [[package]] 1669 + name = "group" 1670 + version = "0.13.0" 1671 + source = "registry+https://github.com/rust-lang/crates.io-index" 1672 + checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" 1673 + dependencies = [ 1674 + "ff", 1675 + "rand_core 0.6.4", 1676 + "subtle", 1677 + ] 1324 1678 1325 1679 [[package]] 1326 1680 name = "h2" ··· 1404 1758 "tokio", 1405 1759 "ureq", 1406 1760 "windows-sys 0.60.2", 1761 + ] 1762 + 1763 + [[package]] 1764 + name = "hmac" 1765 + version = "0.12.1" 1766 + source = "registry+https://github.com/rust-lang/crates.io-index" 1767 + checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 1768 + dependencies = [ 1769 + "digest", 1407 1770 ] 1408 1771 1409 1772 [[package]] ··· 1640 2003 ] 1641 2004 1642 2005 [[package]] 2006 + name = "id-arena" 2007 + version = "2.3.0" 2008 + source = "registry+https://github.com/rust-lang/crates.io-index" 2009 + checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" 2010 + 2011 + [[package]] 1643 2012 name = "ident_case" 1644 2013 version = "1.0.1" 1645 2014 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1674 2043 dependencies = [ 1675 2044 "equivalent", 1676 2045 "hashbrown 0.16.1", 2046 + "serde", 2047 + "serde_core", 1677 2048 ] 1678 2049 1679 2050 [[package]] ··· 1707 2078 ] 1708 2079 1709 2080 [[package]] 2081 + name = "ipld-core" 2082 + version = "0.4.3" 2083 + source = "registry+https://github.com/rust-lang/crates.io-index" 2084 + checksum = "090f624976d72f0b0bb71b86d58dc16c15e069193067cb3a3a09d655246cbbda" 2085 + dependencies = [ 2086 + "cid", 2087 + "quickcheck", 2088 + "serde", 2089 + "serde_bytes", 2090 + ] 2091 + 2092 + [[package]] 1710 2093 name = "ipnet" 1711 2094 version = "2.11.0" 1712 2095 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1761 2144 dependencies = [ 1762 2145 "once_cell", 1763 2146 "wasm-bindgen", 2147 + ] 2148 + 2149 + [[package]] 2150 + name = "k256" 2151 + version = "0.13.4" 2152 + source = "registry+https://github.com/rust-lang/crates.io-index" 2153 + checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" 2154 + dependencies = [ 2155 + "cfg-if", 2156 + "ecdsa", 2157 + "elliptic-curve", 2158 + "once_cell", 2159 + "sha2", 2160 + "signature", 1764 2161 ] 1765 2162 1766 2163 [[package]] ··· 1774 2171 ] 1775 2172 1776 2173 [[package]] 2174 + name = "keyring" 2175 + version = "3.6.3" 2176 + source = "registry+https://github.com/rust-lang/crates.io-index" 2177 + checksum = "eebcc3aff044e5944a8fbaf69eb277d11986064cba30c468730e8b9909fb551c" 2178 + dependencies = [ 2179 + "log", 2180 + "security-framework 2.11.1", 2181 + "security-framework 3.6.0", 2182 + "zeroize", 2183 + ] 2184 + 2185 + [[package]] 1777 2186 name = "lazy_static" 1778 2187 version = "1.5.0" 1779 2188 source = "registry+https://github.com/rust-lang/crates.io-index" 1780 2189 checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 2190 + 2191 + [[package]] 2192 + name = "leb128" 2193 + version = "0.2.5" 2194 + source = "registry+https://github.com/rust-lang/crates.io-index" 2195 + checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" 2196 + 2197 + [[package]] 2198 + name = "leb128fmt" 2199 + version = "0.1.0" 2200 + source = "registry+https://github.com/rust-lang/crates.io-index" 2201 + checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" 1781 2202 1782 2203 [[package]] 1783 2204 name = "lexical-core" ··· 1978 2399 ] 1979 2400 1980 2401 [[package]] 2402 + name = "match-lookup" 2403 + version = "0.1.2" 2404 + source = "registry+https://github.com/rust-lang/crates.io-index" 2405 + checksum = "757aee279b8bdbb9f9e676796fd459e4207a1f986e87886700abf589f5abf771" 2406 + dependencies = [ 2407 + "proc-macro2", 2408 + "quote", 2409 + "syn 2.0.113", 2410 + ] 2411 + 2412 + [[package]] 1981 2413 name = "memchr" 1982 2414 version = "2.7.6" 1983 2415 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2046 2478 ] 2047 2479 2048 2480 [[package]] 2481 + name = "multibase" 2482 + version = "0.9.2" 2483 + source = "registry+https://github.com/rust-lang/crates.io-index" 2484 + checksum = "8694bb4835f452b0e3bb06dbebb1d6fc5385b6ca1caf2e55fd165c042390ec77" 2485 + dependencies = [ 2486 + "base-x", 2487 + "base256emoji", 2488 + "data-encoding", 2489 + "data-encoding-macro", 2490 + ] 2491 + 2492 + [[package]] 2493 + name = "multihash" 2494 + version = "0.19.3" 2495 + source = "registry+https://github.com/rust-lang/crates.io-index" 2496 + checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" 2497 + dependencies = [ 2498 + "arbitrary", 2499 + "core2", 2500 + "quickcheck", 2501 + "rand 0.8.5", 2502 + "serde", 2503 + "unsigned-varint", 2504 + ] 2505 + 2506 + [[package]] 2049 2507 name = "naive-timer" 2050 2508 version = "0.2.0" 2051 2509 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2072 2530 "openssl-probe", 2073 2531 "openssl-sys", 2074 2532 "schannel", 2075 - "security-framework", 2533 + "security-framework 2.11.1", 2076 2534 "security-framework-sys", 2077 2535 "tempfile", 2078 2536 ] ··· 2115 2573 checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" 2116 2574 dependencies = [ 2117 2575 "memchr", 2576 + ] 2577 + 2578 + [[package]] 2579 + name = "nom-unicode" 2580 + version = "0.4.0" 2581 + source = "registry+https://github.com/rust-lang/crates.io-index" 2582 + checksum = "00dea06b6b61609274f105c468f1ea996d2f7226bfa528b4de79c05eabf5f759" 2583 + dependencies = [ 2584 + "nom 8.0.0", 2585 + ] 2586 + 2587 + [[package]] 2588 + name = "nonempty" 2589 + version = "0.10.0" 2590 + source = "registry+https://github.com/rust-lang/crates.io-index" 2591 + checksum = "303e8749c804ccd6ca3b428de7fe0d86cb86bc7606bc15291f100fd487960bb8" 2592 + dependencies = [ 2593 + "serde", 2118 2594 ] 2119 2595 2120 2596 [[package]] ··· 2303 2779 checksum = "9c6901729fa79e91a0913333229e9ca5dc725089d1c363b2f4b4760709dc4a52" 2304 2780 2305 2781 [[package]] 2782 + name = "p256" 2783 + version = "0.13.2" 2784 + source = "registry+https://github.com/rust-lang/crates.io-index" 2785 + checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" 2786 + dependencies = [ 2787 + "ecdsa", 2788 + "elliptic-curve", 2789 + "primeorder", 2790 + "sha2", 2791 + ] 2792 + 2793 + [[package]] 2306 2794 name = "panic-message" 2307 2795 version = "0.3.0" 2308 2796 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2377 2865 checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 2378 2866 2379 2867 [[package]] 2868 + name = "pem-rfc7468" 2869 + version = "0.7.0" 2870 + source = "registry+https://github.com/rust-lang/crates.io-index" 2871 + checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" 2872 + dependencies = [ 2873 + "base64ct", 2874 + ] 2875 + 2876 + [[package]] 2380 2877 name = "percent-encoding" 2381 2878 version = "2.3.2" 2382 2879 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2415 2912 checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 2416 2913 2417 2914 [[package]] 2915 + name = "pkcs8" 2916 + version = "0.10.2" 2917 + source = "registry+https://github.com/rust-lang/crates.io-index" 2918 + checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" 2919 + dependencies = [ 2920 + "der", 2921 + "spki", 2922 + ] 2923 + 2924 + [[package]] 2418 2925 name = "pkg-config" 2419 2926 version = "0.3.32" 2420 2927 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2455 2962 ] 2456 2963 2457 2964 [[package]] 2965 + name = "primeorder" 2966 + version = "0.13.6" 2967 + source = "registry+https://github.com/rust-lang/crates.io-index" 2968 + checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" 2969 + dependencies = [ 2970 + "elliptic-curve", 2971 + ] 2972 + 2973 + [[package]] 2458 2974 name = "proc-macro-crate" 2459 2975 version = "3.4.0" 2460 2976 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2473 2989 ] 2474 2990 2475 2991 [[package]] 2992 + name = "quickcheck" 2993 + version = "1.1.0" 2994 + source = "registry+https://github.com/rust-lang/crates.io-index" 2995 + checksum = "95c589f335db0f6aaa168a7cd27b1fc6920f5e1470c804f814d9cd6e62a0f70b" 2996 + dependencies = [ 2997 + "env_logger", 2998 + "log", 2999 + "rand 0.10.0", 3000 + ] 3001 + 3002 + [[package]] 2476 3003 name = "quote" 2477 3004 version = "1.0.42" 2478 3005 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2519 3046 ] 2520 3047 2521 3048 [[package]] 3049 + name = "rand" 3050 + version = "0.10.0" 3051 + source = "registry+https://github.com/rust-lang/crates.io-index" 3052 + checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8" 3053 + dependencies = [ 3054 + "getrandom 0.4.1", 3055 + "rand_core 0.10.0", 3056 + ] 3057 + 3058 + [[package]] 2522 3059 name = "rand_chacha" 2523 3060 version = "0.3.1" 2524 3061 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2555 3092 dependencies = [ 2556 3093 "getrandom 0.3.4", 2557 3094 ] 3095 + 3096 + [[package]] 3097 + name = "rand_core" 3098 + version = "0.10.0" 3099 + source = "registry+https://github.com/rust-lang/crates.io-index" 3100 + checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba" 2558 3101 2559 3102 [[package]] 2560 3103 name = "rand_xoshiro" ··· 2722 3265 ] 2723 3266 2724 3267 [[package]] 3268 + name = "rfc6979" 3269 + version = "0.4.0" 3270 + source = "registry+https://github.com/rust-lang/crates.io-index" 3271 + checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" 3272 + dependencies = [ 3273 + "hmac", 3274 + "subtle", 3275 + ] 3276 + 3277 + [[package]] 2725 3278 name = "rig-core" 2726 3279 version = "0.22.0" 2727 3280 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2924 3477 checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 2925 3478 2926 3479 [[package]] 3480 + name = "sec1" 3481 + version = "0.7.3" 3482 + source = "registry+https://github.com/rust-lang/crates.io-index" 3483 + checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" 3484 + dependencies = [ 3485 + "base16ct", 3486 + "der", 3487 + "generic-array", 3488 + "pkcs8", 3489 + "subtle", 3490 + "zeroize", 3491 + ] 3492 + 3493 + [[package]] 2927 3494 name = "security-framework" 2928 3495 version = "2.11.1" 2929 3496 source = "registry+https://github.com/rust-lang/crates.io-index" 2930 3497 checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 2931 3498 dependencies = [ 2932 3499 "bitflags", 2933 - "core-foundation", 3500 + "core-foundation 0.9.4", 3501 + "core-foundation-sys", 3502 + "libc", 3503 + "security-framework-sys", 3504 + ] 3505 + 3506 + [[package]] 3507 + name = "security-framework" 3508 + version = "3.6.0" 3509 + source = "registry+https://github.com/rust-lang/crates.io-index" 3510 + checksum = "d17b898a6d6948c3a8ee4372c17cb384f90d2e6e912ef00895b14fd7ab54ec38" 3511 + dependencies = [ 3512 + "bitflags", 3513 + "core-foundation 0.10.1", 2934 3514 "core-foundation-sys", 2935 3515 "libc", 2936 3516 "security-framework-sys", ··· 2938 3518 2939 3519 [[package]] 2940 3520 name = "security-framework-sys" 2941 - version = "2.15.0" 3521 + version = "2.16.0" 2942 3522 source = "registry+https://github.com/rust-lang/crates.io-index" 2943 - checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" 3523 + checksum = "321c8673b092a9a42605034a9879d73cb79101ed5fd117bc9a597b89b4e9e61a" 2944 3524 dependencies = [ 2945 3525 "core-foundation-sys", 2946 3526 "libc", ··· 2969 3549 ] 2970 3550 2971 3551 [[package]] 3552 + name = "serde-value" 3553 + version = "0.7.0" 3554 + source = "registry+https://github.com/rust-lang/crates.io-index" 3555 + checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" 3556 + dependencies = [ 3557 + "ordered-float 2.10.1", 3558 + "serde", 3559 + ] 3560 + 3561 + [[package]] 3562 + name = "serde_bytes" 3563 + version = "0.11.19" 3564 + source = "registry+https://github.com/rust-lang/crates.io-index" 3565 + checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" 3566 + dependencies = [ 3567 + "serde", 3568 + "serde_core", 3569 + ] 3570 + 3571 + [[package]] 2972 3572 name = "serde_core" 2973 3573 version = "1.0.228" 2974 3574 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3000 3600 ] 3001 3601 3002 3602 [[package]] 3603 + name = "serde_ipld_dagcbor" 3604 + version = "0.6.4" 3605 + source = "registry+https://github.com/rust-lang/crates.io-index" 3606 + checksum = "46182f4f08349a02b45c998ba3215d3f9de826246ba02bb9dddfe9a2a2100778" 3607 + dependencies = [ 3608 + "cbor4ii", 3609 + "ipld-core", 3610 + "scopeguard", 3611 + "serde", 3612 + ] 3613 + 3614 + [[package]] 3003 3615 name = "serde_json" 3004 3616 version = "1.0.148" 3005 3617 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3035 3647 ] 3036 3648 3037 3649 [[package]] 3650 + name = "sha2" 3651 + version = "0.10.9" 3652 + source = "registry+https://github.com/rust-lang/crates.io-index" 3653 + checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" 3654 + dependencies = [ 3655 + "cfg-if", 3656 + "cpufeatures", 3657 + "digest", 3658 + ] 3659 + 3660 + [[package]] 3038 3661 name = "sharded-slab" 3039 3662 version = "0.1.7" 3040 3663 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3060 3683 ] 3061 3684 3062 3685 [[package]] 3686 + name = "signature" 3687 + version = "2.2.0" 3688 + source = "registry+https://github.com/rust-lang/crates.io-index" 3689 + checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 3690 + dependencies = [ 3691 + "digest", 3692 + "rand_core 0.6.4", 3693 + ] 3694 + 3695 + [[package]] 3063 3696 name = "simd-adler32" 3064 3697 version = "0.3.8" 3065 3698 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3126 3759 ] 3127 3760 3128 3761 [[package]] 3762 + name = "spki" 3763 + version = "0.7.3" 3764 + source = "registry+https://github.com/rust-lang/crates.io-index" 3765 + checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" 3766 + dependencies = [ 3767 + "base64ct", 3768 + "der", 3769 + ] 3770 + 3771 + [[package]] 3129 3772 name = "stable_deref_trait" 3130 3773 version = "1.2.1" 3131 3774 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3198 3841 checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" 3199 3842 dependencies = [ 3200 3843 "bitflags", 3201 - "core-foundation", 3844 + "core-foundation 0.9.4", 3202 3845 "system-configuration-sys", 3203 3846 ] 3204 3847 ··· 3302 3945 "anyhow", 3303 3946 "bon", 3304 3947 "dspy-rs", 3948 + "ed25519-dalek", 3305 3949 "indexmap", 3950 + "keyring", 3306 3951 "nom 8.0.0", 3307 3952 "serde", 3308 3953 "serde_json", 3309 3954 "tokio", 3955 + "ucan", 3310 3956 ] 3311 3957 3312 3958 [[package]] ··· 3588 4234 ] 3589 4235 3590 4236 [[package]] 4237 + name = "typenum" 4238 + version = "1.19.0" 4239 + source = "registry+https://github.com/rust-lang/crates.io-index" 4240 + checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" 4241 + 4242 + [[package]] 4243 + name = "ucan" 4244 + version = "0.5.0" 4245 + source = "git+https://github.com/ucan-wg/rs-ucan.git?branch=main#c4d1cb7558582cbe0fe1f21b22026fe8303a0cab" 4246 + dependencies = [ 4247 + "base58", 4248 + "ed25519-dalek", 4249 + "futures", 4250 + "getrandom 0.2.16", 4251 + "ipld-core", 4252 + "leb128", 4253 + "nom 8.0.0", 4254 + "nom-unicode", 4255 + "nonempty", 4256 + "serde", 4257 + "serde-value", 4258 + "serde_bytes", 4259 + "serde_ipld_dagcbor", 4260 + "sha2", 4261 + "signature", 4262 + "thiserror 1.0.69", 4263 + "tracing", 4264 + "varsig", 4265 + ] 4266 + 4267 + [[package]] 3591 4268 name = "unicase" 3592 4269 version = "2.9.0" 3593 4270 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3612 4289 checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" 3613 4290 3614 4291 [[package]] 4292 + name = "unicode-xid" 4293 + version = "0.2.6" 4294 + source = "registry+https://github.com/rust-lang/crates.io-index" 4295 + checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 4296 + 4297 + [[package]] 4298 + name = "unsigned-varint" 4299 + version = "0.8.0" 4300 + source = "registry+https://github.com/rust-lang/crates.io-index" 4301 + checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" 4302 + 4303 + [[package]] 3615 4304 name = "untrusted" 3616 4305 version = "0.9.0" 3617 4306 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3668 4357 checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 3669 4358 3670 4359 [[package]] 4360 + name = "varsig" 4361 + version = "0.1.0" 4362 + source = "git+https://github.com/ucan-wg/rs-ucan.git?branch=main#c4d1cb7558582cbe0fe1f21b22026fe8303a0cab" 4363 + dependencies = [ 4364 + "async-signature", 4365 + "ed25519-dalek", 4366 + "ipld-core", 4367 + "k256", 4368 + "leb128", 4369 + "p256", 4370 + "serde", 4371 + "serde_bytes", 4372 + "serde_ipld_dagcbor", 4373 + "signature", 4374 + "thiserror 1.0.69", 4375 + "tracing", 4376 + ] 4377 + 4378 + [[package]] 3671 4379 name = "vcpkg" 3672 4380 version = "0.2.15" 3673 4381 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3700 4408 source = "registry+https://github.com/rust-lang/crates.io-index" 3701 4409 checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" 3702 4410 dependencies = [ 3703 - "wit-bindgen", 4411 + "wit-bindgen 0.46.0", 4412 + ] 4413 + 4414 + [[package]] 4415 + name = "wasip3" 4416 + version = "0.4.0+wasi-0.3.0-rc-2026-01-06" 4417 + source = "registry+https://github.com/rust-lang/crates.io-index" 4418 + checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" 4419 + dependencies = [ 4420 + "wit-bindgen 0.51.0", 3704 4421 ] 3705 4422 3706 4423 [[package]] ··· 3762 4479 ] 3763 4480 3764 4481 [[package]] 4482 + name = "wasm-encoder" 4483 + version = "0.244.0" 4484 + source = "registry+https://github.com/rust-lang/crates.io-index" 4485 + checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" 4486 + dependencies = [ 4487 + "leb128fmt", 4488 + "wasmparser", 4489 + ] 4490 + 4491 + [[package]] 4492 + name = "wasm-metadata" 4493 + version = "0.244.0" 4494 + source = "registry+https://github.com/rust-lang/crates.io-index" 4495 + checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" 4496 + dependencies = [ 4497 + "anyhow", 4498 + "indexmap", 4499 + "wasm-encoder", 4500 + "wasmparser", 4501 + ] 4502 + 4503 + [[package]] 3765 4504 name = "wasm-streams" 3766 4505 version = "0.4.2" 3767 4506 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3772 4511 "wasm-bindgen", 3773 4512 "wasm-bindgen-futures", 3774 4513 "web-sys", 4514 + ] 4515 + 4516 + [[package]] 4517 + name = "wasmparser" 4518 + version = "0.244.0" 4519 + source = "registry+https://github.com/rust-lang/crates.io-index" 4520 + checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" 4521 + dependencies = [ 4522 + "bitflags", 4523 + "hashbrown 0.15.5", 4524 + "indexmap", 4525 + "semver", 3775 4526 ] 3776 4527 3777 4528 [[package]] ··· 4083 4834 version = "0.46.0" 4084 4835 source = "registry+https://github.com/rust-lang/crates.io-index" 4085 4836 checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" 4837 + 4838 + [[package]] 4839 + name = "wit-bindgen" 4840 + version = "0.51.0" 4841 + source = "registry+https://github.com/rust-lang/crates.io-index" 4842 + checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" 4843 + dependencies = [ 4844 + "wit-bindgen-rust-macro", 4845 + ] 4846 + 4847 + [[package]] 4848 + name = "wit-bindgen-core" 4849 + version = "0.51.0" 4850 + source = "registry+https://github.com/rust-lang/crates.io-index" 4851 + checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" 4852 + dependencies = [ 4853 + "anyhow", 4854 + "heck", 4855 + "wit-parser", 4856 + ] 4857 + 4858 + [[package]] 4859 + name = "wit-bindgen-rust" 4860 + version = "0.51.0" 4861 + source = "registry+https://github.com/rust-lang/crates.io-index" 4862 + checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" 4863 + dependencies = [ 4864 + "anyhow", 4865 + "heck", 4866 + "indexmap", 4867 + "prettyplease", 4868 + "syn 2.0.113", 4869 + "wasm-metadata", 4870 + "wit-bindgen-core", 4871 + "wit-component", 4872 + ] 4873 + 4874 + [[package]] 4875 + name = "wit-bindgen-rust-macro" 4876 + version = "0.51.0" 4877 + source = "registry+https://github.com/rust-lang/crates.io-index" 4878 + checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" 4879 + dependencies = [ 4880 + "anyhow", 4881 + "prettyplease", 4882 + "proc-macro2", 4883 + "quote", 4884 + "syn 2.0.113", 4885 + "wit-bindgen-core", 4886 + "wit-bindgen-rust", 4887 + ] 4888 + 4889 + [[package]] 4890 + name = "wit-component" 4891 + version = "0.244.0" 4892 + source = "registry+https://github.com/rust-lang/crates.io-index" 4893 + checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" 4894 + dependencies = [ 4895 + "anyhow", 4896 + "bitflags", 4897 + "indexmap", 4898 + "log", 4899 + "serde", 4900 + "serde_derive", 4901 + "serde_json", 4902 + "wasm-encoder", 4903 + "wasm-metadata", 4904 + "wasmparser", 4905 + "wit-parser", 4906 + ] 4907 + 4908 + [[package]] 4909 + name = "wit-parser" 4910 + version = "0.244.0" 4911 + source = "registry+https://github.com/rust-lang/crates.io-index" 4912 + checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" 4913 + dependencies = [ 4914 + "anyhow", 4915 + "id-arena", 4916 + "indexmap", 4917 + "log", 4918 + "semver", 4919 + "serde", 4920 + "serde_derive", 4921 + "serde_json", 4922 + "unicode-xid", 4923 + "wasmparser", 4924 + ] 4086 4925 4087 4926 [[package]] 4088 4927 name = "writeable"
+3
tilekit/Cargo.toml
··· 12 12 dspy-rs = "0.7.3" 13 13 bon = "3.7.0" 14 14 indexmap = "2.2.0" 15 + ucan = { git = "https://github.com/ucan-wg/rs-ucan.git", branch = "main", package = "ucan" } 16 + ed25519-dalek = { version = "2.2", features = ["rand_core"] } 17 + keyring = { version = "3", features = ["apple-native"] }
+38
tilekit/src/accounts.rs
··· 1 + // Handles stuff related to accounts, identity etc.. 2 + use anyhow::Result; 3 + use ed25519_dalek::{SigningKey, ed25519::signature::rand_core::OsRng}; 4 + use keyring::Entry; 5 + use ucan::did::Ed25519Did; 6 + 7 + type DID = String; 8 + type Identity = DID; 9 + 10 + /// Creates an `Identity` 11 + /// # Parameters 12 + /// - `app`: The service for which Identity is made (for ex: tiles) 13 + /// The keypair generated will be stored in OS secure storage 14 + /// Returns an `Identity` 15 + pub fn create_identity(app: &str) -> Result<Identity> { 16 + let mut csprng = OsRng; 17 + let signing_key = SigningKey::generate(&mut csprng); 18 + let ed_did = Ed25519Did::from(signing_key.clone()); 19 + let did = ed_did.to_string(); 20 + let entry = Entry::new(app, &did)?; 21 + entry.set_secret(&signing_key.to_keypair_bytes())?; 22 + Ok(did) 23 + } 24 + 25 + #[cfg(test)] 26 + mod tests { 27 + use keyring::{mock, set_default_credential_builder}; 28 + 29 + use super::*; 30 + 31 + #[test] 32 + fn test_create_success() -> Result<()> { 33 + set_default_credential_builder(mock::default_credential_builder()); 34 + let did = create_identity("tiles")?; 35 + assert!(did.starts_with("did:key")); 36 + Ok(()) 37 + } 38 + }
+1
tilekit/src/lib.rs
··· 1 + pub mod accounts; 1 2 pub mod modelfile; 2 3 pub mod optimize;