diff --git a/Cargo.lock b/Cargo.lock index 67b8196..a84b089 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1035,9 +1035,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hc_deepkey_sdk" -version = "0.7.0-dev.2" +version = "0.7.0-dev.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a528dbefe39063279bdb91bfb4ec284aefc3a59989b66fc4d0ebe58d44bf036" +checksum = "7975ba6ea6fe556ca5fd8cdac601c13b64533c0b115af8473e220f90b1788bbd" dependencies = [ "hc_deepkey_types", "hdk", @@ -1047,9 +1047,9 @@ dependencies = [ [[package]] name = "hc_deepkey_types" -version = "0.8.0-dev.2" +version = "0.8.0-dev.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73f59f631053df0bac6c2f1413933340d4d0857cb16d66a8e25badbab55b3eb" +checksum = "719149000797d7a3d1ec9457719cf1ed412b8a6197bbdf01d1d3284fa68981f2" dependencies = [ "hdi", "holo_hash", @@ -1060,9 +1060,9 @@ dependencies = [ [[package]] name = "hdi" -version = "0.5.0-dev.10" +version = "0.5.0-dev.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd62de0d29f215642cb2481ec5cdde81233c3fabe97157c8a35118b69dd821d" +checksum = "33d5d70abaf440c54d65c28cf2a9d1263bf6c5a78baa76f53ff4773350a4b220" dependencies = [ "getrandom", "hdk_derive", @@ -1078,9 +1078,9 @@ dependencies = [ [[package]] name = "hdk" -version = "0.4.0-dev.12" +version = "0.4.0-dev.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d000c0be9deb5fa8bc111b42fd7085fccf7cc12bf67ae4c8ccf797dca1e866c" +checksum = "ae6e77c7d571f068070cabb5ebe12321da48918d81076708568a1ef3c4294154" dependencies = [ "getrandom", "hdi", @@ -1098,9 +1098,9 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.4.0-dev.10" +version = "0.4.0-dev.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbfd717793514df9e0c44d698e820e68692792fa38c2d721c97c201e5376476e" +checksum = "85905fbb6eb33b6da346f5d7b6b1b16b85c15d57b3fd2d0ed3e94dd78777c1b3" dependencies = [ "darling 0.14.4", "heck 0.5.0", @@ -1132,9 +1132,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "holo_hash" -version = "0.4.0-dev.9" +version = "0.4.0-dev.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51425a83caa336a4bd8e6bf4f9b0374ee315fcf4b4c7a103aa2e0c54bb872cad" +checksum = "8f168530890ae501c964763d6bfdd92c3d4c633b643a909704f99929c9112205" dependencies = [ "base64", "blake2b_simd", @@ -1156,9 +1156,9 @@ version = "0.0.8-dev.1" [[package]] name = "holochain_integrity_types" -version = "0.4.0-dev.10" +version = "0.4.0-dev.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12e2d557cc479814090f4724264880ee7ee5e31e5009c98fe23fcc07857ff724" +checksum = "d15fab21e6eab0af97cd1bb30494fe423b3740c438caf7bbda12e47979c926ea" dependencies = [ "holo_hash", "holochain_secure_primitive", @@ -1173,9 +1173,9 @@ dependencies = [ [[package]] name = "holochain_nonce" -version = "0.4.0-dev.5" +version = "0.4.0-dev.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09817d1689e55cd13afe8773fd85a4694fd94f372e70c29a332cb028f82134bb" +checksum = "8fca689af4b640f52849faa1d79387810eb97cfe0e96175febccecaf82bd3261" dependencies = [ "getrandom", "holochain_secure_primitive", @@ -1220,9 +1220,9 @@ dependencies = [ [[package]] name = "holochain_util" -version = "0.4.0-dev.2" +version = "0.4.0-dev.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b89c3542e1fe783d9505d14a83497abadcf84d5d87e73fe1dbff3ac21cfce8" +checksum = "ac1c491b6ba90c68041b393264b1e67c2990b68094caa7fdfe1ea5a959c82107" dependencies = [ "cfg-if", "colored", @@ -1262,9 +1262,9 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.4.0-dev.12" +version = "0.4.0-dev.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71794e55ee4a1d0315e0963c6b5f78a6f97b9ce28de211fed50d37efd284beb2" +checksum = "7afab9dfd51b9feae14626b286284f4bc9f9d1139abc8d7d37fb1cfbf3ed74af" dependencies = [ "derive_more", "holo_hash", @@ -1396,9 +1396,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_bin_data" -version = "0.4.0-dev.9" +version = "0.4.0-dev.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a36538316e8289894aef8b60b857ea3d05fc8cb447c3bac45f0b22aa9901ce" +checksum = "d5bc477873f3c25e263946caa431f236dec465d4c7c75a715bdf41cc87f45013" dependencies = [ "base64", "derive_more", @@ -1411,9 +1411,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_block" -version = "0.4.0-dev.9" +version = "0.4.0-dev.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9caf6d341d99e05c0d1261632d8667f27bad5243889a9675865c6ebce8be975a" +checksum = "cb37277cef33bacf6113448c8c224296c3ceb25ce1c72eca7911984f0bff0d65" dependencies = [ "kitsune_p2p_bin_data", "kitsune_p2p_timestamp", @@ -1422,9 +1422,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_dht_arc" -version = "0.4.0-dev.8" +version = "0.4.0-dev.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7553b37a46c56bfef3915b0ba802bff375bd2a59a70928ced2ecaa04d199c3d0" +checksum = "49cefd7f1867eb14ade8fce5b6a9975c399780f4735aad7701ed1b2036b72ae9" dependencies = [ "derive_more", "gcollections", @@ -1436,9 +1436,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_timestamp" -version = "0.4.0-dev.3" +version = "0.4.0-dev.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0730aa658b1b807f4bd431e6a7ed697c898433aec73f4221c60563627226e3d8" +checksum = "27e44de630f9a0c27edb0c123d12cafe09d3b719845f966c742e9b2043efea07" dependencies = [ "chrono", "serde", @@ -2930,9 +2930,9 @@ dependencies = [ [[package]] name = "whi_hdi_extensions" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7991998f2a5d39a4f51c4d639390a41ff2d32e5f816cdef7895a061b557c5487" +checksum = "c76779b1311c12f3cc5285cad12583716d33467ab9fd8e08329aaeb96ecef51c" dependencies = [ "hdi", "holo_hash", @@ -2941,9 +2941,9 @@ dependencies = [ [[package]] name = "whi_hdk_extensions" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b3a413ac580c67648c2c8ac80d35b7a65d4bc7cbad8c32025865181bcc9ebce" +checksum = "83418ecd92105c161f84d5177835e7d174ca2ea910dd3a665fe90bad1134ba7b" dependencies = [ "hdk", "serde", diff --git a/Cargo.toml b/Cargo.toml index b1fcd24..2da9942 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,16 +12,14 @@ members = ["crates/holochain_deepkey_dna", "zomes/*"] serde = "1" rmp-serde = "1" serde_bytes = "0.11" -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" } -hdk = { version = "=0.4.0-dev.12" } -whi_hdi_extensions = { version = "0.11" } -# whi_hdi_extensions = { path = "../whi_hdi_extensions" } -whi_hdk_extensions = { version = "0.11" } -# whi_hdk_extensions = { path = "../whi_hdk_extensions" } +hc_deepkey_types = { version = "0.8.0-dev.3" } +hc_deepkey_sdk = { version = "0.7.0-dev.3" } +holo_hash = { version = "=0.4.0-dev.11", features = ["hashing", "encoding"] } +holochain_integrity_types = { version = "=0.4.0-dev.12" } +hdi = { version = "=0.5.0-dev.12" } +hdk = { version = "=0.4.0-dev.14" } +whi_hdi_extensions = { version = "0.12" } +whi_hdk_extensions = { version = "0.12" } [workspace.dependencies.deepkey] path = "zomes/deepkey" diff --git a/flake.nix b/flake.nix index 6afbcd9..84ad262 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ devShell = pkgs.mkShell { buildInputs = with pkgs; [ holochain_0-4 - lair-keystore_0-4-5 + lair-keystore_0-5 hc_0-4 rustup diff --git a/package-lock.json b/package-lock.json index 206b730..9606c05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@noble/hashes": "^1.4.0", "@spartan-hc/app-interface-client": "^0.7.2", "@spartan-hc/holo-hash": "^0.7.0", - "@spartan-hc/holochain-backdrop": "^4.4.1", + "@spartan-hc/holochain-backdrop": "^4.5.0", "@whi/json": "^0.1.8", "@whi/weblogger": "^0.4.0", "chai": "^4.3.4", @@ -68,6 +68,33 @@ "webpack-cli": "^5.1.4" } }, + "../node-backdrop": { + "name": "@spartan-hc/holochain-backdrop", + "version": "4.5.0", + "extraneous": true, + "license": "ISC", + "dependencies": { + "@spartan-hc/holo-hash": "^0.6.1", + "@spartan-hc/holochain-admin-client": "^1.4.2", + "@whi/promise-timeout": "^0.2.2", + "@whi/subprocess": "^0.2.1", + "@whi/weblogger": "^0.2.1", + "commander": "^8.0.0", + "get-port": "^5.1.1", + "yaml": "^1.10.2" + }, + "bin": { + "holochain-backdrop": "bin/hc-backdrop-cli.js" + }, + "devDependencies": { + "@types/node": "^20.11.17", + "@whi/json": "^0.1.7", + "chai": "^4.3.4", + "mocha": "^10.1.0", + "typescript": "^5.3.3", + "why-is-node-running": "^2.2.0" + } + }, "dnas/deepkey/zomelets": { "name": "@holochain/deepkey-zomelets", "version": "0.1.1", @@ -2091,14 +2118,14 @@ } }, "node_modules/@spartan-hc/holochain-backdrop": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@spartan-hc/holochain-backdrop/-/holochain-backdrop-4.4.1.tgz", - "integrity": "sha512-S4k6neBHXL3oxydhBSGCCeDSka5kgcuBpkhS8sYuCLNpK5pZs2WhfVZP6eFWrxRkCEnruLtU9fDBH33cJChu6Q==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@spartan-hc/holochain-backdrop/-/holochain-backdrop-4.5.0.tgz", + "integrity": "sha512-SEiE0vf5RaCqztkur8gDuRWygm3L13Iy7FPbJY2eSl4CU2rrDAmg3MwF2L9AW1QwERtNf5BZLjSY4e4hJCa01w==", "dev": true, "license": "ISC", "dependencies": { "@spartan-hc/holo-hash": "^0.6.1", - "@spartan-hc/holochain-admin-client": "^1.3.1", + "@spartan-hc/holochain-admin-client": "^1.4.2", "@whi/promise-timeout": "^0.2.2", "@whi/subprocess": "^0.2.1", "@whi/weblogger": "^0.2.1", @@ -2682,9 +2709,9 @@ } }, "node_modules/async": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", "dev": true, "license": "MIT" }, @@ -4636,9 +4663,9 @@ "license": "MIT" }, "node_modules/safe-stable-stringify": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", - "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", "dev": true, "license": "MIT", "engines": { @@ -5471,9 +5498,9 @@ "dev": true }, "node_modules/winston": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.13.1.tgz", - "integrity": "sha512-SvZit7VFNvXRzbqGHsv5KSmgbEYR5EiQfDAL9gxYkRqa934Hnk++zze0wANKtMHcy/gI4W/3xmSDwlhf865WGw==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.14.2.tgz", + "integrity": "sha512-CO8cdpBB2yqzEf8v895L+GNKYJiEq8eKlHU38af3snQBQ+sdAIUepjMSguOIJC7ICbzm0ZI+Af2If4vIJrtmOg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 9ab7244..50f8b63 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@noble/hashes": "^1.4.0", "@spartan-hc/app-interface-client": "^0.7.2", "@spartan-hc/holo-hash": "^0.7.0", - "@spartan-hc/holochain-backdrop": "^4.4.1", + "@spartan-hc/holochain-backdrop": "^4.5.0", "@whi/json": "^0.1.8", "@whi/weblogger": "^0.4.0", "chai": "^4.3.4", diff --git a/pkgs.nix b/pkgs.nix index 0608590..358773d 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -3,8 +3,8 @@ import (pkgs.fetchFromGitHub { owner = "spartan-holochain-counsel"; repo = "nix-overlay"; - rev = "09a503d2a04909df03433b9cf0ec53a8c23699af"; - sha256 = "sdX6kksfoHRXvvkwktll36nwNI91QERDt4h6X6gZxIM="; + rev = "4bf90e85448392512d8bf4dac91fdeb56bc7d610"; + sha256 = "lxGLA0KMecdt6xRy9SqApDfh9UiQd9OYnwj9xeMLJcQ="; }) { inherit pkgs; inherit system; diff --git a/zomes/deepkey/src/lib.rs b/zomes/deepkey/src/lib.rs index da3908b..a86baf9 100644 --- a/zomes/deepkey/src/lib.rs +++ b/zomes/deepkey/src/lib.rs @@ -6,9 +6,9 @@ pub mod joining_proof; pub mod source_of_authority; // Re-exports -pub use deepkey_types; +pub use hc_deepkey_types as deepkey_types; -pub use deepkey_types::*; +pub use hc_deepkey_types::*; pub use error::*; pub use joining_proof::*; pub use source_of_authority::*; diff --git a/zomes/deepkey_csr/src/change_rule.rs b/zomes/deepkey_csr/src/change_rule.rs index 6f5c164..647903d 100644 --- a/zomes/deepkey_csr/src/change_rule.rs +++ b/zomes/deepkey_csr/src/change_rule.rs @@ -1,4 +1,7 @@ -use crate::utils; +use crate::{ + utils, + deepkey_sdk, +}; use deepkey::*; use hdk::prelude::*; use hdk_extensions::{ @@ -81,7 +84,7 @@ pub fn construct_authority_spec(input: AuthoritySpecInput) -> ExternResult<(Auth /// #### Example usage (first update) /// ```rust, no_run /// use hdk::prelude::*; -/// use deepkey_sdk::*; +/// use hc_deepkey_sdk::*; /// /// use rand::rngs::OsRng; /// use ed25519_dalek::SigningKey; @@ -122,7 +125,7 @@ pub fn construct_authority_spec(input: AuthoritySpecInput) -> ExternResult<(Auth /// #### Example usage (second update) /// ```rust, no_run /// # use hdk::prelude::*; -/// # use deepkey_sdk::*; +/// # use hc_deepkey_sdk::*; /// # use rand::rngs::OsRng; /// # use ed25519_dalek::SigningKey; /// use ed25519_dalek::Signer; diff --git a/zomes/deepkey_csr/src/key_anchor.rs b/zomes/deepkey_csr/src/key_anchor.rs index a0c2a13..8b6ddaa 100644 --- a/zomes/deepkey_csr/src/key_anchor.rs +++ b/zomes/deepkey_csr/src/key_anchor.rs @@ -1,4 +1,7 @@ -use crate::utils; +use crate::{ + utils, + deepkey_sdk, +}; use deepkey::*; use deepkey_sdk::{ KeyState, diff --git a/zomes/deepkey_csr/src/key_registration.rs b/zomes/deepkey_csr/src/key_registration.rs index 0656226..69391cc 100644 --- a/zomes/deepkey_csr/src/key_registration.rs +++ b/zomes/deepkey_csr/src/key_registration.rs @@ -1,5 +1,6 @@ use crate::{ utils, + deepkey_sdk, }; use serde_bytes::ByteArray; use deepkey::*; @@ -22,6 +23,7 @@ pub use deepkey_sdk::{ }; +// TODO: conductor will keep track of app_index instead of this; therefore, remove option #[hdk_extern] pub fn next_derivation_details( input: Option> @@ -73,7 +75,7 @@ pub fn get_key_derivation_details( /// ```rust, no_run /// # use hdk::prelude::*; /// # use deepkey::*; -/// # use deepkey_sdk::*; +/// # use hc_deepkey_sdk::*; /// # fn main() -> ExternResult<()> { /// // Generates a new key in Lair /// let new_key = AgentPubKey::from_raw_32( create_x25519_keypair()?.as_ref().to_vec() ); @@ -126,6 +128,7 @@ pub fn create_key(input: CreateKeyInput) -> ExternResult<(ActionHash, KeyRegistr let given_app_index = derivation_details.app_index; let given_key_index = derivation_details.key_index; + // TODO: change this check so that it only checks if the index was already use if given_app_index != next_app_index { Err(guest_error!(format!( "The derivation app index does not match the chain state: [given] {} != {} [next]", @@ -194,7 +197,7 @@ pub fn create_key(input: CreateKeyInput) -> ExternResult<(ActionHash, KeyRegistr /// ```rust, no_run /// # use hdk::prelude::*; /// # use deepkey::*; -/// # use deepkey_sdk::*; +/// # use hc_deepkey_sdk::*; /// # fn main() -> ExternResult<()> { /// let prior_key_registration = ActionHash::try_from("uhCkkzhwfnkYh7CWji2KpS2wO6YaKOKPQ4-kr4XGRBRRx9hitvOw9").unwrap(); /// @@ -320,7 +323,7 @@ pub fn update_key(input: UpdateKeyInput) -> ExternResult<(ActionHash, KeyRegistr /// ```rust, no_run /// # use hdk::prelude::*; /// # use deepkey::*; -/// # use deepkey_sdk::*; +/// # use hc_deepkey_sdk::*; /// # fn main() -> ExternResult<()> { /// let prior_key_registration = ActionHash::try_from("uhCkkzhwfnkYh7CWji2KpS2wO6YaKOKPQ4-kr4XGRBRRx9hitvOw9").unwrap(); /// diff --git a/zomes/deepkey_csr/src/lib.rs b/zomes/deepkey_csr/src/lib.rs index 6e6484c..bd80a33 100644 --- a/zomes/deepkey_csr/src/lib.rs +++ b/zomes/deepkey_csr/src/lib.rs @@ -44,6 +44,7 @@ pub use hdk_extensions; pub use hdk_extensions::hdi_extensions; pub use deepkey; pub use deepkey::deepkey_types; +pub use hc_deepkey_sdk as deepkey_sdk; use deepkey::*; use hdi_extensions::{