diff --git a/Cargo.lock b/Cargo.lock index 40a913a..38a46ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "ahash" version = "0.7.8" @@ -58,15 +64,6 @@ version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" -[[package]] -name = "arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" -dependencies = [ - "derive_arbitrary", -] - [[package]] name = "arrayref" version = "0.3.7" @@ -95,7 +92,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.3", "object", "rustc-demangle", ] @@ -266,9 +263,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.99" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" [[package]] name = "cfg-if" @@ -506,7 +503,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.61", ] [[package]] @@ -553,7 +550,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.61", ] [[package]] @@ -575,7 +572,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core 0.20.9", "quote", - "syn 2.0.66", + "syn 2.0.61", ] [[package]] @@ -641,17 +638,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "derive_builder" version = "0.12.0" @@ -693,7 +679,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.66", + "syn 2.0.61", ] [[package]] @@ -754,9 +740,9 @@ dependencies = [ [[package]] name = "either" -version = "1.12.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "enum-iterator" @@ -796,7 +782,7 @@ dependencies = [ "darling 0.20.9", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.61", ] [[package]] @@ -847,12 +833,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" +checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -932,7 +918,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.61", ] [[package]] @@ -1050,8 +1036,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hc_deepkey_sdk" version = "0.7.0-dev.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a528dbefe39063279bdb91bfb4ec284aefc3a59989b66fc4d0ebe58d44bf036" dependencies = [ - "arbitrary", "hc_deepkey_types", "hdk", "serde", @@ -1061,8 +1048,9 @@ dependencies = [ [[package]] name = "hc_deepkey_types" version = "0.8.0-dev.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c73f59f631053df0bac6c2f1413933340d4d0857cb16d66a8e25badbab55b3eb" dependencies = [ - "arbitrary", "hdi", "holo_hash", "holochain_integrity_types", @@ -1148,7 +1136,6 @@ version = "0.4.0-dev.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51425a83caa336a4bd8e6bf4f9b0374ee315fcf4b4c7a103aa2e0c54bb872cad" dependencies = [ - "arbitrary", "base64", "blake2b_simd", "derive_more", @@ -1158,8 +1145,6 @@ dependencies = [ "holochain_wasmer_common", "kitsune_p2p_dht_arc", "must_future", - "proptest", - "proptest-derive", "serde", "serde_bytes", "thiserror", @@ -1167,10 +1152,7 @@ dependencies = [ [[package]] name = "holochain_deepkey_dna" -version = "0.0.7-dev.1" -dependencies = [ - "hc_deepkey_sdk", -] +version = "0.0.8-dev.1" [[package]] name = "holochain_integrity_types" @@ -1178,14 +1160,11 @@ version = "0.4.0-dev.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12e2d557cc479814090f4724264880ee7ee5e31e5009c98fe23fcc07857ff724" dependencies = [ - "arbitrary", "holo_hash", "holochain_secure_primitive", "holochain_serialized_bytes", "holochain_util", "kitsune_p2p_timestamp", - "proptest", - "proptest-derive", "serde", "serde_bytes", "subtle", @@ -1194,9 +1173,9 @@ dependencies = [ [[package]] name = "holochain_nonce" -version = "0.4.0-dev.4" +version = "0.4.0-dev.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d338a69a1d074d7ecc58e028bd3962c98741f5448830b0dcf7a853bbb6515f0" +checksum = "09817d1689e55cd13afe8773fd85a4694fd94f372e70c29a332cb028f82134bb" dependencies = [ "getrandom", "holochain_secure_primitive", @@ -1220,10 +1199,7 @@ version = "0.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719fa847cf9f772f7e8e1a6f11d801e1383cc5af043292042665da9a6ce5c742" dependencies = [ - "arbitrary", "holochain_serialized_bytes_derive", - "proptest", - "proptest-derive", "rmp-serde", "serde", "serde-transcode", @@ -1286,9 +1262,9 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.4.0-dev.11" +version = "0.4.0-dev.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f62ed18d860b34574edcc76a467e456775142d3e5ca86fb31907f25680cee965" +checksum = "71794e55ee4a1d0315e0963c6b5f78a6f97b9ce28de211fed50d37efd284beb2" dependencies = [ "derive_more", "holo_hash", @@ -1446,9 +1422,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_dht_arc" -version = "0.4.0-dev.7" +version = "0.4.0-dev.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241ded259c121ee17b34f95c81f6b0a11e3d28f379486c47b089102698a83556" +checksum = "7553b37a46c56bfef3915b0ba802bff375bd2a59a70928ced2ecaa04d199c3d0" dependencies = [ "derive_more", "gcollections", @@ -1460,16 +1436,11 @@ dependencies = [ [[package]] name = "kitsune_p2p_timestamp" -version = "0.4.0-dev.2" +version = "0.4.0-dev.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f75c6b5bdc4e3a9514c949975ab2a68f977e612bb638bd961ccab948d134af7a" +checksum = "0730aa658b1b807f4bd431e6a7ed697c898433aec73f4221c60563627226e3d8" dependencies = [ - "arbitrary", "chrono", - "once_cell", - "proptest", - "proptest-derive", - "rand", "serde", ] @@ -1487,15 +1458,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "linux-raw-sys" @@ -1585,6 +1550,15 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "more-asserts" version = "0.2.2" @@ -1617,7 +1591,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -1637,9 +1610,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" dependencies = [ "lock_api", "parking_lot_core", @@ -1705,15 +1678,18 @@ dependencies = [ [[package]] name = "platforms" -version = "3.4.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" +checksum = "0e4c7666f2019727f9e8e14bf14456e99c707d780922869f1ba473eee101fa49" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro-error" @@ -1741,44 +1717,13 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" dependencies = [ "unicode-ident", ] -[[package]] -name = "proptest" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" -dependencies = [ - "bit-set", - "bit-vec", - "bitflags 2.5.0", - "lazy_static", - "num-traits", - "rand", - "rand_chacha", - "rand_xorshift", - "regex-syntax", - "rusty-fork", - "tempfile", - "unarray", -] - -[[package]] -name = "proptest-derive" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf16337405ca084e9c78985114633b6827711d22b9e6ef6c6c0d665eb3f0b6e" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ptr_meta" version = "0.1.4" @@ -1799,12 +1744,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - [[package]] name = "quote" version = "1.0.36" @@ -1850,15 +1789,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core", -] - [[package]] name = "rayon" version = "1.10.0" @@ -2053,21 +1983,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" - -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error", - "tempfile", - "wait-timeout", -] +checksum = "092474d1a01ea8278f69e6a358998405fae5b8b963ddaeb2b0b04a128bf1dfb0" [[package]] name = "ryu" @@ -2106,7 +2024,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.66", + "syn 2.0.61", ] [[package]] @@ -2210,7 +2128,7 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.61", ] [[package]] @@ -2221,14 +2139,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.61", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "indexmap 2.2.6", "itoa", @@ -2403,9 +2321,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" dependencies = [ "proc-macro2", "quote", @@ -2437,12 +2355,13 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "b8fcd239983515c23a32fb82099f97d0b11b8c72f654ed659363a95c3dad7a53" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", "windows-sys 0.52.0", ] @@ -2506,22 +2425,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.61", ] [[package]] @@ -2605,7 +2524,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.61", ] [[package]] @@ -2636,12 +2555,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - [[package]] name = "unicode-bidi" version = "0.3.15" @@ -2665,9 +2578,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" [[package]] name = "unsafe-libyaml" @@ -2716,15 +2629,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] - [[package]] name = "walkdir" version = "2.5.0" @@ -2762,7 +2666,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.61", "wasm-bindgen-shared", ] @@ -2784,7 +2688,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.61", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3304,6 +3208,27 @@ version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + [[package]] name = "zeroize" version = "1.8.1" diff --git a/Cargo.toml b/Cargo.toml index b2b232a..04b4f79 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,19 +6,14 @@ opt-level = "z" [workspace] resolver = "2" -members = [ - "crates/holochain_deepkey_dna", - "dnas/deepkey/sdk", - "dnas/deepkey/types", - "zomes/*", -] +members = ["crates/holochain_deepkey_dna", "zomes/*"] [workspace.dependencies] serde = "1" rmp-serde = "1" serde_bytes = "0.11" -hc_deepkey_types = { version = "0.8.0-dev.2", path = "dnas/deepkey/types" } -hc_deepkey_sdk = { version = "0.7.0-dev.2", path = "dnas/deepkey/sdk" } +hc_deepkey_types = { version = "0.8.0-dev.2" } +hc_deepkey_sdk = { version = "0.7.0-dev.2" } holo_hash = { version = "=0.4.0-dev.9", features = ["hashing", "encoding"] } holochain_integrity_types = { version = "=0.4.0-dev.10" } hdi = { version = "=0.5.0-dev.10" } @@ -33,4 +28,3 @@ path = "zomes/deepkey" [workspace.dependencies.deepkey_csr] path = "zomes/deepkey_csr" - diff --git a/crates/holochain_deepkey_dna/Cargo.toml b/crates/holochain_deepkey_dna/Cargo.toml index f414405..d013eb1 100644 --- a/crates/holochain_deepkey_dna/Cargo.toml +++ b/crates/holochain_deepkey_dna/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "holochain_deepkey_dna" -version = "0.0.7-dev.1" +version = "0.0.8-dev.1" edition = "2021" authors = ["Michael dougherty "] license = "CAL-1.0" @@ -14,7 +14,5 @@ name = "holochain_deepkey_dna" path = "src/lib.rs" [dependencies] -hc_deepkey_sdk = { version = "0.7.0-dev.2", path = "../../dnas/deepkey/sdk" } [features] -fuzzing = ["hc_deepkey_sdk/fuzzing"] diff --git a/crates/holochain_deepkey_dna/src/lib.rs b/crates/holochain_deepkey_dna/src/lib.rs index dd49855..3bdfdf5 100644 --- a/crates/holochain_deepkey_dna/src/lib.rs +++ b/crates/holochain_deepkey_dna/src/lib.rs @@ -3,9 +3,3 @@ /// Get the hard-coded Deepkey DNA provided by this crate. /// This can be decoded with `holochain_types::DnaBundle::decode()` pub const DEEPKEY_DNA_BUNDLE_BYTES: &[u8] = include_bytes!("deepkey.dna"); - -pub mod types { - pub use deepkey_sdk::*; -} - -pub use deepkey_sdk::hdk; diff --git a/dnas/deepkey/sdk/README.md b/dnas/deepkey/sdk/README.md deleted file mode 100644 index 3403ab1..0000000 --- a/dnas/deepkey/sdk/README.md +++ /dev/null @@ -1,11 +0,0 @@ -[![](https://img.shields.io/crates/v/hc_deepkey_sdk?style=flat-square)](https://crates.io/crates/hc_deepkey_sdk) - -See source code [github.com/holochain/deepkey](https://github.com/holochain/deepkey) - -# Deepkey SDK -A package containing macros and other helpers for integration with the Deepkey DNA Zomes. - - -## Crate Documentation - -See [docs.rs/hc_deepkey_sdk](https://docs.rs/hc_deepkey_sdk/) diff --git a/dnas/deepkey/sdk/src/lib.rs b/dnas/deepkey/sdk/src/lib.rs deleted file mode 100644 index 2de53b9..0000000 --- a/dnas/deepkey/sdk/src/lib.rs +++ /dev/null @@ -1,127 +0,0 @@ -pub use deepkey_types; -pub use deepkey_types::*; - -pub use hdk; - -use hdk::prelude::{holo_hash::DnaHash, *}; -use serde_bytes::ByteArray; - -#[hdk_entry_helper] -#[derive(Clone)] -pub enum KeyState { - NotFound, - Invalid(Option), - Valid(SignedActionHashed), -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct KeyRevocationInput { - pub prior_key_registration: ActionHash, - pub revocation_authorization: Vec<(u8, ByteArray<64>)>, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct DerivationDetails { - pub app_index: u32, - pub key_index: u32, -} - -impl DerivationDetails { - pub fn to_derivation_path(&self) -> Vec { - vec![self.app_index, self.key_index] - } -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct AppBindingInput { - pub app_name: String, - pub installed_app_id: String, - pub dna_hashes: Vec, - #[serde(default)] - pub metadata: deepkey_types::MetaData, -} - -#[cfg(feature = "fuzzing")] -impl<'a> arbitrary::Arbitrary<'a> for AppBindingInput { - fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result { - Ok(Self { - app_name: arbitrary::Arbitrary::arbitrary(u)?, - installed_app_id: arbitrary::Arbitrary::arbitrary(u)?, - dna_hashes: arbitrary::Arbitrary::arbitrary(u)?, - metadata: deepkey_types::MetaData::new(), - }) - } -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[cfg_attr(feature = "fuzzing", derive(arbitrary::Arbitrary))] -pub struct DerivationDetailsInput { - pub app_index: u32, - pub key_index: u32, - #[serde(with = "serde_bytes")] - pub derivation_seed: Vec, - #[serde(with = "serde_bytes")] - pub derivation_bytes: Vec, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[cfg_attr(feature = "fuzzing", derive(arbitrary::Arbitrary))] -pub struct CreateKeyInput { - pub key_generation: KeyGeneration, - pub app_binding: AppBindingInput, - pub derivation_details: Option, - #[serde(default)] - pub create_only: bool, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct UpdateKeyInput { - pub key_revocation: KeyRevocation, - pub key_generation: KeyGeneration, - pub derivation_details: Option, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct RevokeKeyInput { - pub key_revocation: KeyRevocation, -} - -impl TryFrom for KeyRevocation { - type Error = WasmError; - - fn try_from(input: KeyRevocationInput) -> ExternResult { - Ok(Self { - prior_key_registration: input.prior_key_registration, - revocation_authorization: input - .revocation_authorization - .into_iter() - .map(|(index, signature)| (index, Signature::from(signature.into_array()))) - .collect(), - }) - } -} - -#[derive(Serialize, Deserialize, Clone, Debug)] -pub struct AuthoritySpecInput { - pub sigs_required: u8, - pub authorized_signers: Vec>, -} - -impl From for AuthoritySpec { - fn from(input: AuthoritySpecInput) -> Self { - Self { - sigs_required: input.sigs_required, - authorized_signers: input - .authorized_signers - .iter() - .map(|key| key.into_array()) - .collect(), - } - } -} - -#[derive(Serialize, Deserialize, Clone, Debug)] -pub struct UpdateChangeRuleInput { - pub authority_spec: AuthoritySpecInput, - pub authorizations: Option>, -} diff --git a/dnas/deepkey/types/README.md b/dnas/deepkey/types/README.md deleted file mode 100644 index 589774f..0000000 --- a/dnas/deepkey/types/README.md +++ /dev/null @@ -1,11 +0,0 @@ -[![](https://img.shields.io/crates/v/hc_deepkey_types?style=flat-square)](https://crates.io/crates/hc_deepkey_types) - -See source code [github.com/holochain/deepkey](https://github.com/holochain/deepkey) - -# Deepkey Types -Definitions used by the Deepkey DNA Zomes. - - -## Crate Documentation - -See [docs.rs/hc_deepkey_types](https://docs.rs/hc_deepkey_types/) diff --git a/dnas/deepkey/types/src/authority_spec.rs b/dnas/deepkey/types/src/authority_spec.rs deleted file mode 100644 index 3e3da4f..0000000 --- a/dnas/deepkey/types/src/authority_spec.rs +++ /dev/null @@ -1,28 +0,0 @@ -use crate::KeyBytes; -use hdi::prelude::*; - - -// Represents an M:N multisignature spec. -// The trivial case 1:1 represents a single agent to sign. -// We need an entry to define the rules of authority -// (for authorizing or revoking) keys in the space under a KeysetRoot. -// This is only committed by the first Deepkey agent. -#[hdk_entry_helper] -#[derive(Clone)] -pub struct AuthoritySpec { - // set to 1 for a single signer scenario - pub sigs_required: u8, - // These signers may not exist on the DHT. - // E.g. a revocation key used to create the first change rule. - pub authorized_signers: Vec, -} - - -impl AuthoritySpec { - pub fn new(sigs_required: u8, authorized_signers: Vec) -> Self { - Self { - sigs_required, - authorized_signers, - } - } -} diff --git a/dnas/deepkey/types/src/authorized_spec_change.rs b/dnas/deepkey/types/src/authorized_spec_change.rs deleted file mode 100644 index cde64af..0000000 --- a/dnas/deepkey/types/src/authorized_spec_change.rs +++ /dev/null @@ -1,32 +0,0 @@ -use crate::AuthoritySpec; -use hdi::prelude::*; - - -pub type Authorization = (u8, Signature); - - -#[hdk_entry_helper] -#[derive(Clone)] -pub struct AuthorizedSpecChange { - pub new_spec: AuthoritySpec, - // Signature of the content of the authority_spec field, - // signed by throwaway RootKey on Create, - // or according to previous AuthSpec upon Update. - pub authorization_of_new_spec: Vec, -} - - -impl AuthorizedSpecChange { - pub fn new(new_spec: AuthoritySpec, authorization_of_new_spec: Vec) -> Self { - Self { - new_spec, - authorization_of_new_spec, - } - } - pub fn as_new_spec_ref(&self) -> &AuthoritySpec { - &self.new_spec - } - pub fn as_authorization_of_new_spec_ref(&self) -> &Vec { - &self.authorization_of_new_spec - } -} diff --git a/dnas/deepkey/types/src/keyset_root.rs b/dnas/deepkey/types/src/keyset_root.rs deleted file mode 100644 index bb9f1c9..0000000 --- a/dnas/deepkey/types/src/keyset_root.rs +++ /dev/null @@ -1,32 +0,0 @@ -use crate::KeyBytes; -use hdi::prelude::*; - -pub const KEYSET_ROOT_INDEX: u32 = POST_GENESIS_SEQ_THRESHOLD + 1; - - -#[hdk_entry_helper] -#[derive(Clone)] -pub struct KeysetRoot { - pub first_deepkey_agent: AgentPubKey, - /// The private key is thrown away. - pub root_pub_key: KeyBytes, - pub signed_fda: Signature, -} - -impl KeysetRoot { - pub fn new( - first_deepkey_agent: AgentPubKey, - root_pub_key: KeyBytes, - signed_fda: Signature, - ) -> Self { - Self { - first_deepkey_agent, - root_pub_key, - signed_fda, - } - } - - pub fn root_pub_key_as_agent(&self) -> AgentPubKey { - holo_hash::AgentPubKey::from_raw_32( self.root_pub_key.to_vec() ) - } -} diff --git a/dnas/deepkey/types/src/lib.rs b/dnas/deepkey/types/src/lib.rs deleted file mode 100644 index 68bcc07..0000000 --- a/dnas/deepkey/types/src/lib.rs +++ /dev/null @@ -1,24 +0,0 @@ -pub mod authority_spec; -pub mod authorized_spec_change; -pub mod change_rule; -pub mod app_binding; -pub mod key_anchor; -pub mod key_meta; -pub mod key_registration; -pub mod keyset_root; - -pub use authorized_spec_change::*; -pub use authority_spec::*; -pub use change_rule::*; -pub use app_binding::*; -pub use keyset_root::*; -pub use key_anchor::*; -pub use key_meta::*; -pub use key_registration::*; - -use std::collections::BTreeMap; - - -pub type MetaData = BTreeMap; - -pub use hdi; \ No newline at end of file diff --git a/zomes/deepkey/Cargo.toml b/zomes/deepkey/Cargo.toml index 9e2eb80..ab69e45 100644 --- a/zomes/deepkey/Cargo.toml +++ b/zomes/deepkey/Cargo.toml @@ -14,5 +14,5 @@ holo_hash = { workspace = true } rmp-serde = { workspace = true } serde = { workspace = true } serde_bytes = { workspace = true } -thiserror = "1.0.38" +thiserror = "1.0" whi_hdi_extensions = { workspace = true }