diff --git a/Cargo.lock b/Cargo.lock index 9b540043..a10ae32f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,7 +78,7 @@ name = "alias" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "wit-bindgen", @@ -1012,7 +1012,7 @@ dependencies = [ "alloy-sol-types", "anyhow", "bincode", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "process_macros", "rand 0.8.5", "serde", @@ -1383,7 +1383,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bincode", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "url", @@ -1592,7 +1592,7 @@ name = "cat" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "wit-bindgen", @@ -1656,7 +1656,7 @@ dependencies = [ "alloy-sol-types", "anyhow", "bincode", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "process_macros", "rand 0.8.5", "serde", @@ -1675,7 +1675,7 @@ version = "0.2.1" dependencies = [ "anyhow", "bincode", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "pleco", "serde", "serde_json", @@ -1863,6 +1863,17 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "contacts" +version = "0.1.0" +dependencies = [ + "kinode_process_lib 0.9.4 (git+https://github.com/kinode-dao/process_lib?rev=088a549)", + "process_macros", + "serde", + "serde_json", + "wit-bindgen", +] + [[package]] name = "convert_case" version = "0.4.0" @@ -2433,7 +2444,7 @@ name = "download" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "process_macros", "serde", "serde_json", @@ -2445,7 +2456,7 @@ name = "downloads" version = "0.5.0" dependencies = [ "anyhow", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "process_macros", "rand 0.8.5", "serde", @@ -2482,7 +2493,7 @@ dependencies = [ name = "echo" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "wit-bindgen", ] @@ -2721,7 +2732,7 @@ version = "0.2.0" dependencies = [ "anyhow", "bincode", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "process_macros", "rand 0.8.5", "serde", @@ -2875,7 +2886,7 @@ dependencies = [ name = "get_block" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "wit-bindgen", @@ -2940,7 +2951,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" name = "globe" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "url", @@ -3067,7 +3078,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" name = "help" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "wit-bindgen", ] @@ -3096,7 +3107,7 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" name = "hi" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "wit-bindgen", @@ -3129,7 +3140,7 @@ version = "0.1.1" dependencies = [ "anyhow", "bincode", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "wit-bindgen", @@ -3444,7 +3455,7 @@ name = "install" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "process_macros", "serde", "serde_json", @@ -3621,7 +3632,7 @@ name = "kfetch" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "rmp-serde", "serde", "serde_json", @@ -3633,7 +3644,7 @@ name = "kill" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "wit-bindgen", @@ -3706,9 +3717,8 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c5b69ac1fc0cb457c7714ceb8c0a5bdbee4ee00b837f9f16ea711e902bdfe8" +version = "0.9.2" +source = "git+https://github.com/kinode-dao/process_lib.git?rev=9ac9e51#9ac9e513c0228f2dcfe8999ed4ca2c38246ee3db" dependencies = [ "alloy 0.1.4", "alloy-primitives", @@ -3729,8 +3739,31 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.2" -source = "git+https://github.com/kinode-dao/process_lib.git?rev=9ac9e51#9ac9e513c0228f2dcfe8999ed4ca2c38246ee3db" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c257733fdc158b8223e43d92baeac02fe3d6a06b62953dbaea36e989f861b138" +dependencies = [ + "alloy 0.1.4", + "alloy-primitives", + "alloy-sol-macro", + "alloy-sol-types", + "anyhow", + "bincode", + "http 1.1.0", + "mime_guess", + "rand 0.8.5", + "rmp-serde", + "serde", + "serde_json", + "thiserror", + "url", + "wit-bindgen", +] + +[[package]] +name = "kinode_process_lib" +version = "0.9.4" +source = "git+https://github.com/kinode-dao/process_lib?rev=088a549#088a5497257eada697e0869d6a8d7e9ef5e620f6" dependencies = [ "alloy 0.1.4", "alloy-primitives", @@ -3794,7 +3827,7 @@ dependencies = [ "alloy-sol-types", "anyhow", "hex", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "rmp-serde", "serde", "serde_json", @@ -4023,7 +4056,7 @@ version = "0.1.0" dependencies = [ "anyhow", "clap", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex", "serde", "serde_json", @@ -4193,7 +4226,7 @@ dependencies = [ name = "net_diagnostics" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "rmp-serde", "serde", "wit-bindgen", @@ -4519,7 +4552,7 @@ dependencies = [ name = "peer" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "rmp-serde", "serde", "wit-bindgen", @@ -4529,7 +4562,7 @@ dependencies = [ name = "peers" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "rmp-serde", "serde", "wit-bindgen", @@ -5570,7 +5603,7 @@ dependencies = [ "anyhow", "base64 0.22.1", "bincode", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "rmp-serde", "serde", "serde_json", @@ -5788,7 +5821,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" name = "state" version = "0.1.0" dependencies = [ - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "wit-bindgen", @@ -5965,7 +5998,7 @@ version = "0.1.1" dependencies = [ "anyhow", "bincode", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.8.5", "regex", "serde", @@ -5979,7 +6012,7 @@ version = "0.1.1" dependencies = [ "anyhow", "bincode", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "process_macros", "serde", "serde_json", @@ -6236,7 +6269,7 @@ version = "0.2.0" dependencies = [ "anyhow", "clap", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "wit-bindgen", @@ -6567,7 +6600,7 @@ name = "uninstall" version = "0.1.0" dependencies = [ "anyhow", - "kinode_process_lib 0.9.1", + "kinode_process_lib 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "process_macros", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index f6660743..ec72600a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ members = [ "kinode/packages/app_store/app_store", "kinode/packages/app_store/ft_worker", "kinode/packages/app_store/download", "kinode/packages/app_store/install", "kinode/packages/app_store/uninstall", "kinode/packages/app_store/downloads", "kinode/packages/app_store/chain", "kinode/packages/chess/chess", + "kinode/packages/contacts/contacts", "kinode/packages/homepage/homepage", "kinode/packages/kino_updates/blog", "kinode/packages/kino_updates/globe", "kinode/packages/kns_indexer/kns_indexer", "kinode/packages/kns_indexer/get_block", "kinode/packages/kns_indexer/state", diff --git a/README.md b/README.md index c86f767b..d4b1fc2b 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ The distro userspace packages are: - `app_store:sys` - `chess:sys` +- `contacts:sys` - `homepage:sys` - `kino_updates:sys` - `kns_indexer:sys` diff --git a/kinode/packages/app_store/Cargo.lock b/kinode/packages/app_store/Cargo.lock index 1d1104c2..3d930d14 100644 --- a/kinode/packages/app_store/Cargo.lock +++ b/kinode/packages/app_store/Cargo.lock @@ -1617,9 +1617,9 @@ dependencies = [ [[package]] name = "kinode_process_lib" -version = "0.9.1" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c5b69ac1fc0cb457c7714ceb8c0a5bdbee4ee00b837f9f16ea711e902bdfe8" +checksum = "c257733fdc158b8223e43d92baeac02fe3d6a06b62953dbaea36e989f861b138" dependencies = [ "alloy", "alloy-primitives", diff --git a/kinode/packages/app_store/app_store/Cargo.toml b/kinode/packages/app_store/app_store/Cargo.toml index 68618698..717aa4aa 100644 --- a/kinode/packages/app_store/app_store/Cargo.toml +++ b/kinode/packages/app_store/app_store/Cargo.toml @@ -11,7 +11,7 @@ alloy-primitives = "0.7.6" alloy-sol-types = "0.7.6" anyhow = "1.0" bincode = "1.3.3" -kinode_process_lib = "0.9.1" +kinode_process_lib = "0.9.4" process_macros = { git = "https://github.com/kinode-dao/process_macros", rev = "626e501" } rand = "0.8" serde = { version = "1.0", features = ["derive"] } diff --git a/kinode/packages/app_store/app_store/src/http_api.rs b/kinode/packages/app_store/app_store/src/http_api.rs index 3788d737..804d7175 100644 --- a/kinode/packages/app_store/app_store/src/http_api.rs +++ b/kinode/packages/app_store/app_store/src/http_api.rs @@ -9,7 +9,6 @@ use crate::{ }, state::{MirrorCheck, PackageState, State}, }; - use kinode_process_lib::{ http::{self, server, Method, StatusCode}, println, Address, LazyLoadBlob, PackageId, Request, SendError, SendErrorKind, @@ -22,7 +21,7 @@ const ICON: &str = include_str!("icon"); /// Bind static and dynamic HTTP paths for the app store, /// bind to our WS updates path, and add icon and widget to homepage. pub fn init_frontend(our: &Address, http_server: &mut server::HttpServer) { - let config = server::HttpBindingConfig::default(); + let config = server::HttpBindingConfig::default().secure_subdomain(true); for path in [ "/apps", // all on-chain apps @@ -44,12 +43,19 @@ pub fn init_frontend(our: &Address, http_server: &mut server::HttpServer) { .bind_http_path(path, config.clone()) .expect("failed to bind http path"); } + + // bind /apps path at base domain, in addition to secure subdomain, + // so that widget can access it + http_server + .bind_http_path("/apps-public", config.clone().secure_subdomain(false)) + .expect("failed to bind http path"); + http_server .serve_ui(&our, "ui", vec!["/"], config.clone()) .expect("failed to serve static UI"); http_server - .bind_ws_path("/", server::WsBindingConfig::default()) + .secure_bind_ws_path("/") .expect("failed to bind ws path"); // add ourselves to the homepage @@ -136,7 +142,7 @@ fn make_widget() -> String { + + + + +
+ + +