net: AddName, app_store & kns_indexer: update process_lib, integrations

This commit is contained in:
bitful-pannul 2024-06-18 20:06:39 -07:00
parent 1da68b415b
commit 535a0caf41
8 changed files with 360 additions and 50 deletions

361
Cargo.lock generated
View File

@ -101,20 +101,39 @@ dependencies = [
"alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-network", "alloy-network 0.1.0",
"alloy-provider", "alloy-provider 0.1.0",
"alloy-pubsub", "alloy-pubsub",
"alloy-rpc-client", "alloy-rpc-client 0.1.0",
"alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-signer", "alloy-signer 0.1.0",
"alloy-signer-wallet", "alloy-signer-wallet",
"alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-transport-http", "alloy-transport-http 0.1.0",
"alloy-transport-ws", "alloy-transport-ws",
"reqwest 0.12.4", "reqwest 0.12.4",
] ]
[[package]]
name = "alloy"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bcb4400a1939e5633939a58500c67123ef5f2e8920e5009d6949552f191be7f"
dependencies = [
"alloy-consensus 0.1.1",
"alloy-core",
"alloy-eips 0.1.1",
"alloy-genesis 0.1.1",
"alloy-json-rpc 0.1.1",
"alloy-provider 0.1.1",
"alloy-rpc-client 0.1.1",
"alloy-rpc-types 0.1.1",
"alloy-serde 0.1.1",
"alloy-transport-http 0.1.1",
"reqwest 0.12.4",
]
[[package]] [[package]]
name = "alloy-chains" name = "alloy-chains"
version = "0.1.18" version = "0.1.18"
@ -152,6 +171,20 @@ dependencies = [
"sha2", "sha2",
] ]
[[package]]
name = "alloy-consensus"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cc7579e4fb5558af44810f542c90d1145dba8b92c08211c215196160c48d2ea"
dependencies = [
"alloy-eips 0.1.1",
"alloy-primitives",
"alloy-rlp",
"alloy-serde 0.1.1",
"c-kzg",
"serde",
]
[[package]] [[package]]
name = "alloy-contract" name = "alloy-contract"
version = "0.1.0" version = "0.1.0"
@ -159,9 +192,9 @@ source = "git+https://github.com/alloy-rs/alloy?rev=05f8162#05f81621e2edd9781e5f
dependencies = [ dependencies = [
"alloy-dyn-abi", "alloy-dyn-abi",
"alloy-json-abi", "alloy-json-abi",
"alloy-network", "alloy-network 0.1.0",
"alloy-primitives", "alloy-primitives",
"alloy-provider", "alloy-provider 0.1.0",
"alloy-pubsub", "alloy-pubsub",
"alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-sol-types", "alloy-sol-types",
@ -173,9 +206,9 @@ dependencies = [
[[package]] [[package]]
name = "alloy-core" name = "alloy-core"
version = "0.7.5" version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31b8b8d8c4e84449ce8f310ed48e09ce38b8290b163e3d0df68ea445a9ccce3a" checksum = "5af3faff14c12c8b11037e0a093dd157c3702becb8435577a2408534d0758315"
dependencies = [ dependencies = [
"alloy-dyn-abi", "alloy-dyn-abi",
"alloy-json-abi", "alloy-json-abi",
@ -185,9 +218,9 @@ dependencies = [
[[package]] [[package]]
name = "alloy-dyn-abi" name = "alloy-dyn-abi"
version = "0.7.5" version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efd2404399cb1b50572758e66e9b4bf088e5a3df9007be7126456c7e50af935f" checksum = "cb6e6436a9530f25010d13653e206fab4c9feddacf21a54de8d7311b275bc56b"
dependencies = [ dependencies = [
"alloy-json-abi", "alloy-json-abi",
"alloy-primitives", "alloy-primitives",
@ -227,6 +260,21 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "alloy-eips"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3bdbc8d98cc36ebe17bb5b42d0873137bc76628a4ee0f7e7acad5b8fc59d3597"
dependencies = [
"alloy-primitives",
"alloy-rlp",
"alloy-serde 0.1.1",
"c-kzg",
"once_cell",
"serde",
"sha2",
]
[[package]] [[package]]
name = "alloy-genesis" name = "alloy-genesis"
version = "0.1.0" version = "0.1.0"
@ -249,10 +297,22 @@ dependencies = [
] ]
[[package]] [[package]]
name = "alloy-json-abi" name = "alloy-genesis"
version = "0.7.5" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c3abf6446a292e19853aaca43590eeb48bf435dfd2c74200259e8f4872f6ce3" checksum = "5e10a047066076b32d52b3228e95a4f7793db7a204f648aa1a1ea675085bffd8"
dependencies = [
"alloy-primitives",
"alloy-serde 0.1.1",
"serde",
"serde_json",
]
[[package]]
name = "alloy-json-abi"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aaeaccd50238126e3a0ff9387c7c568837726ad4f4e399b528ca88104d6c25ef"
dependencies = [ dependencies = [
"alloy-primitives", "alloy-primitives",
"alloy-sol-type-parser", "alloy-sol-type-parser",
@ -284,6 +344,19 @@ dependencies = [
"tracing", "tracing",
] ]
[[package]]
name = "alloy-json-rpc"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d06d33b79246313c4103ef9596c721674a926f1ddc8b605aa2bac4d8ba94ee34"
dependencies = [
"alloy-primitives",
"serde",
"serde_json",
"thiserror",
"tracing",
]
[[package]] [[package]]
name = "alloy-network" name = "alloy-network"
version = "0.1.0" version = "0.1.0"
@ -294,7 +367,27 @@ dependencies = [
"alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-primitives", "alloy-primitives",
"alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-signer", "alloy-signer 0.1.0",
"alloy-sol-types",
"async-trait",
"auto_impl",
"futures-utils-wasm",
"thiserror",
]
[[package]]
name = "alloy-network"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef742b478a2db5c27063cde82128dfbecffcd38237d7f682a91d3ecf6aa1836c"
dependencies = [
"alloy-consensus 0.1.1",
"alloy-eips 0.1.1",
"alloy-json-rpc 0.1.1",
"alloy-primitives",
"alloy-rpc-types-eth",
"alloy-serde 0.1.1",
"alloy-signer 0.1.1",
"alloy-sol-types", "alloy-sol-types",
"async-trait", "async-trait",
"auto_impl", "auto_impl",
@ -304,9 +397,9 @@ dependencies = [
[[package]] [[package]]
name = "alloy-primitives" name = "alloy-primitives"
version = "0.7.5" version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5277af0cbcc483ee6ad2c1e818090b5928d27f04fd6580680f31c1cf8068bcc2" checksum = "f783611babedbbe90db3478c120fb5f5daacceffc210b39adc0af4fe0da70bad"
dependencies = [ dependencies = [
"alloy-rlp", "alloy-rlp",
"bytes", "bytes",
@ -333,14 +426,14 @@ dependencies = [
"alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-json-rpc 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-network", "alloy-network 0.1.0",
"alloy-primitives", "alloy-primitives",
"alloy-pubsub", "alloy-pubsub",
"alloy-rpc-client", "alloy-rpc-client 0.1.0",
"alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-rpc-types-trace", "alloy-rpc-types-trace",
"alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-transport-http", "alloy-transport-http 0.1.0",
"alloy-transport-ws", "alloy-transport-ws",
"async-stream", "async-stream",
"async-trait", "async-trait",
@ -358,6 +451,38 @@ dependencies = [
"url", "url",
] ]
[[package]]
name = "alloy-provider"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "200b786259a17acf318b9c423afe9669bec24ce9cdf59de153ff9a4009914bb6"
dependencies = [
"alloy-chains",
"alloy-consensus 0.1.1",
"alloy-eips 0.1.1",
"alloy-json-rpc 0.1.1",
"alloy-network 0.1.1",
"alloy-primitives",
"alloy-rpc-client 0.1.1",
"alloy-rpc-types-eth",
"alloy-transport 0.1.1",
"alloy-transport-http 0.1.1",
"async-stream",
"async-trait",
"auto_impl",
"dashmap",
"futures",
"futures-utils-wasm",
"lru",
"pin-project",
"reqwest 0.12.4",
"serde",
"serde_json",
"tokio",
"tracing",
"url",
]
[[package]] [[package]]
name = "alloy-pubsub" name = "alloy-pubsub"
version = "0.1.0" version = "0.1.0"
@ -407,7 +532,7 @@ dependencies = [
"alloy-primitives", "alloy-primitives",
"alloy-pubsub", "alloy-pubsub",
"alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-transport 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-transport-http", "alloy-transport-http 0.1.0",
"alloy-transport-ws", "alloy-transport-ws",
"futures", "futures",
"pin-project", "pin-project",
@ -421,6 +546,27 @@ dependencies = [
"url", "url",
] ]
[[package]]
name = "alloy-rpc-client"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "328a6a14aba6152ddf6d01bac5e17a70dbe9d6f343bf402b995c30bac63a1fbf"
dependencies = [
"alloy-json-rpc 0.1.1",
"alloy-transport 0.1.1",
"alloy-transport-http 0.1.1",
"futures",
"pin-project",
"reqwest 0.12.4",
"serde",
"serde_json",
"tokio",
"tokio-stream",
"tower",
"tracing",
"url",
]
[[package]] [[package]]
name = "alloy-rpc-types" name = "alloy-rpc-types"
version = "0.1.0" version = "0.1.0"
@ -457,6 +603,34 @@ dependencies = [
"thiserror", "thiserror",
] ]
[[package]]
name = "alloy-rpc-types"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3164e7d8a718a22ede70b2c1d2bb554a8b4bd8e56c07ab630b75c74c06c53752"
dependencies = [
"alloy-rpc-types-eth",
"alloy-serde 0.1.1",
]
[[package]]
name = "alloy-rpc-types-eth"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bce0676f144be1eae71122d1d417885a3b063add0353b35e46cdf1440d6b33b1"
dependencies = [
"alloy-consensus 0.1.1",
"alloy-eips 0.1.1",
"alloy-primitives",
"alloy-rlp",
"alloy-serde 0.1.1",
"alloy-sol-types",
"itertools 0.13.0",
"serde",
"serde_json",
"thiserror",
]
[[package]] [[package]]
name = "alloy-rpc-types-trace" name = "alloy-rpc-types-trace"
version = "0.1.0" version = "0.1.0"
@ -489,6 +663,17 @@ dependencies = [
"serde_json", "serde_json",
] ]
[[package]]
name = "alloy-serde"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c224916316519558d8c2b6a60dc7626688c08f1b8951774702562dbcb8666ee"
dependencies = [
"alloy-primitives",
"serde",
"serde_json",
]
[[package]] [[package]]
name = "alloy-signer" name = "alloy-signer"
version = "0.1.0" version = "0.1.0"
@ -502,15 +687,29 @@ dependencies = [
"thiserror", "thiserror",
] ]
[[package]]
name = "alloy-signer"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "227c5fd0ed6e06e1ccc30593f8ff6d9fb907ac5f03a709a6d687f0943494a229"
dependencies = [
"alloy-primitives",
"async-trait",
"auto_impl",
"elliptic-curve",
"k256",
"thiserror",
]
[[package]] [[package]]
name = "alloy-signer-wallet" name = "alloy-signer-wallet"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/alloy-rs/alloy?rev=05f8162#05f81621e2edd9781e5f95b2fe2489ed979dd0be" source = "git+https://github.com/alloy-rs/alloy?rev=05f8162#05f81621e2edd9781e5f95b2fe2489ed979dd0be"
dependencies = [ dependencies = [
"alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)", "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=05f8162)",
"alloy-network", "alloy-network 0.1.0",
"alloy-primitives", "alloy-primitives",
"alloy-signer", "alloy-signer 0.1.0",
"async-trait", "async-trait",
"k256", "k256",
"rand 0.8.5", "rand 0.8.5",
@ -519,9 +718,9 @@ dependencies = [
[[package]] [[package]]
name = "alloy-sol-macro" name = "alloy-sol-macro"
version = "0.7.5" version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30708a79919b082f2692423c8cc72fc250477e4a2ecb0d4a7244cd3cdb299965" checksum = "4bad41a7c19498e3f6079f7744656328699f8ea3e783bdd10d85788cd439f572"
dependencies = [ dependencies = [
"alloy-sol-macro-expander", "alloy-sol-macro-expander",
"alloy-sol-macro-input", "alloy-sol-macro-input",
@ -533,9 +732,9 @@ dependencies = [
[[package]] [[package]]
name = "alloy-sol-macro-expander" name = "alloy-sol-macro-expander"
version = "0.7.5" version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c7a679ac01774ab7e00a567a918d4231ae692c5c8cedaf4e16956c3116d7896" checksum = "fd9899da7d011b4fe4c406a524ed3e3f963797dbc93b45479d60341d3a27b252"
dependencies = [ dependencies = [
"alloy-json-abi", "alloy-json-abi",
"alloy-sol-macro-input", "alloy-sol-macro-input",
@ -552,9 +751,9 @@ dependencies = [
[[package]] [[package]]
name = "alloy-sol-macro-input" name = "alloy-sol-macro-input"
version = "0.7.5" version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "356da0c2228aa6675a5faaa08a3e4061b967f924753983d72b9a18d9a3fad44e" checksum = "d32d595768fdc61331a132b6f65db41afae41b9b97d36c21eb1b955c422a7e60"
dependencies = [ dependencies = [
"alloy-json-abi", "alloy-json-abi",
"const-hex", "const-hex",
@ -569,18 +768,18 @@ dependencies = [
[[package]] [[package]]
name = "alloy-sol-type-parser" name = "alloy-sol-type-parser"
version = "0.7.5" version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81fd4783b0a5840479013e9ce960d2eb7b3be381f722e0fe3d1f7c3bb6bd4ebd" checksum = "baa2fbd22d353d8685bd9fee11ba2d8b5c3b1d11e56adb3265fcf1f32bfdf404"
dependencies = [ dependencies = [
"winnow 0.6.6", "winnow 0.6.6",
] ]
[[package]] [[package]]
name = "alloy-sol-types" name = "alloy-sol-types"
version = "0.7.5" version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6eb5e6234c0b62514992589fe1578f64d418dbc8ef5cd1ab2d7f2f568f599698" checksum = "a49042c6d3b66a9fe6b2b5a8bf0d39fc2ae1ee0310a2a26ffedd79fb097878dd"
dependencies = [ dependencies = [
"alloy-json-abi", "alloy-json-abi",
"alloy-primitives", "alloy-primitives",
@ -625,6 +824,24 @@ dependencies = [
"wasm-bindgen-futures", "wasm-bindgen-futures",
] ]
[[package]]
name = "alloy-transport"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3628d81530263fe837a09cd527022f5728202a669973f04270942f4d390b5f5"
dependencies = [
"alloy-json-rpc 0.1.1",
"base64 0.22.0",
"futures-util",
"futures-utils-wasm",
"serde",
"serde_json",
"thiserror",
"tokio",
"tower",
"url",
]
[[package]] [[package]]
name = "alloy-transport-http" name = "alloy-transport-http"
version = "0.1.0" version = "0.1.0"
@ -639,6 +856,21 @@ dependencies = [
"url", "url",
] ]
[[package]]
name = "alloy-transport-http"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f35d34e7a51503c9ff267404a5850bd58f991b7ab524b892f364901e3576376"
dependencies = [
"alloy-json-rpc 0.1.1",
"alloy-transport 0.1.1",
"reqwest 0.12.4",
"serde_json",
"tower",
"tracing",
"url",
]
[[package]] [[package]]
name = "alloy-transport-ws" name = "alloy-transport-ws"
version = "0.1.0" version = "0.1.0"
@ -738,7 +970,7 @@ dependencies = [
"alloy-sol-types", "alloy-sol-types",
"anyhow", "anyhow",
"bincode", "bincode",
"kinode_process_lib 0.8.0 (git+https://github.com/kinode-dao/process_lib?tag=v0.8.0)", "kinode_process_lib 0.8.3 (git+https://github.com/kinode-dao/process_lib?rev=40a7a60)",
"rand 0.8.5", "rand 0.8.5",
"serde", "serde",
"serde_json", "serde_json",
@ -3063,6 +3295,15 @@ dependencies = [
"either", "either",
] ]
[[package]]
name = "itertools"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
dependencies = [
"either",
]
[[package]] [[package]]
name = "itoa" name = "itoa"
version = "1.0.11" version = "1.0.11"
@ -3186,7 +3427,7 @@ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
"hex", "hex",
"kinode_process_lib 0.8.0 (git+https://github.com/kinode-dao/process_lib?tag=v0.8.0)", "kinode_process_lib 0.8.3 (git+https://github.com/kinode-dao/process_lib?rev=c8442ef)",
"rmp-serde", "rmp-serde",
"serde", "serde",
"serde_json", "serde_json",
@ -3198,7 +3439,7 @@ name = "kinode"
version = "0.8.0" version = "0.8.0"
dependencies = [ dependencies = [
"aes-gcm", "aes-gcm",
"alloy", "alloy 0.1.0",
"alloy-primitives", "alloy-primitives",
"alloy-sol-macro", "alloy-sol-macro",
"alloy-sol-types", "alloy-sol-types",
@ -3314,6 +3555,50 @@ dependencies = [
"wit-bindgen", "wit-bindgen",
] ]
[[package]]
name = "kinode_process_lib"
version = "0.8.3"
source = "git+https://github.com/kinode-dao/process_lib?rev=40a7a60#40a7a60528df14585aab717c6c0f78aff5f74dd2"
dependencies = [
"alloy 0.1.1",
"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.8.3"
source = "git+https://github.com/kinode-dao/process_lib?rev=c8442ef#c8442ef6e0f6aefc1d8caa30b32a991303da8dd9"
dependencies = [
"alloy 0.1.1",
"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]] [[package]]
name = "kit" name = "kit"
version = "0.4.2" version = "0.4.2"
@ -5371,9 +5656,9 @@ dependencies = [
[[package]] [[package]]
name = "syn-solidity" name = "syn-solidity"
version = "0.7.5" version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6fe08d08d84f2c0a77f1e7c46518789d745c2e87a2721791ed7c3c9bc78df28" checksum = "8d71e19bca02c807c9faa67b5a47673ff231b6e7449b251695188522f1dc44b2"
dependencies = [ dependencies = [
"paste", "paste",
"proc-macro2", "proc-macro2",

View File

@ -7,11 +7,11 @@ edition = "2021"
simulation-mode = [] simulation-mode = []
[dependencies] [dependencies]
alloy-primitives = "0.7.0" alloy-primitives = "0.7.6"
alloy-sol-types = "0.7.0" alloy-sol-types = "0.7.6"
anyhow = "1.0" anyhow = "1.0"
bincode = "1.3.3" bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "40a7a60" }
rand = "0.8" rand = "0.8"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"

View File

@ -3,7 +3,9 @@ use crate::{utils, DownloadRequest, LocalRequest};
use alloy_sol_types::{sol, SolEvent}; use alloy_sol_types::{sol, SolEvent};
use kinode_process_lib::kernel_types::Erc721Metadata; use kinode_process_lib::kernel_types::Erc721Metadata;
use kinode_process_lib::{ use kinode_process_lib::{
eth, kernel_types as kt, net, println, vfs, Address, Message, NodeId, PackageId, Request, eth, kernel_types as kt,
net::{self, get_name},
println, vfs, Address, Message, NodeId, PackageId, Request,
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap, HashSet};
@ -231,7 +233,7 @@ impl State {
} }
self.downloaded_packages self.downloaded_packages
.insert(package_id.to_owned(), package_state); .insert(package_id.to_owned(), package_state);
kinode_process_lib::set_state(&serde_json::to_vec(self)?); // kinode_process_lib::set_state(&serde_json::to_vec(self)?);
Ok(()) Ok(())
} }
@ -249,7 +251,7 @@ impl State {
true true
}) })
.unwrap_or(false); .unwrap_or(false);
kinode_process_lib::set_state(&serde_json::to_vec(self).unwrap()); // kinode_process_lib::set_state(&serde_json::to_vec(self).unwrap());
res res
} }
@ -353,7 +355,7 @@ impl State {
pub fn uninstall(&mut self, package_id: &PackageId) -> anyhow::Result<()> { pub fn uninstall(&mut self, package_id: &PackageId) -> anyhow::Result<()> {
utils::uninstall(package_id)?; utils::uninstall(package_id)?;
self.downloaded_packages.remove(package_id); self.downloaded_packages.remove(package_id);
kinode_process_lib::set_state(&serde_json::to_vec(self)?); // kinode_process_lib::set_state(&serde_json::to_vec(self)?);
println!("uninstalled {package_id}"); println!("uninstalled {package_id}");
Ok(()) Ok(())
} }
@ -379,9 +381,15 @@ impl State {
.map_err(|_| AppStoreLogError::DecodeLogError)?; .map_err(|_| AppStoreLogError::DecodeLogError)?;
// get package_name from the api (add to process_lib)! // get package_name from the api (add to process_lib)!
// let node_name = get_name(note.nodehash)?; let name = get_name(&note.nodehash.to_string(), None).map_err(|e| {
println!("Error decoding name: {:?}", e);
AppStoreLogError::DecodeLogError
})?;
let note_str = String::from_utf8_lossy(&note.note).to_string(); let note_str = String::from_utf8_lossy(&note.note).to_string();
println!("got note {note_str} for {name}");
match note_str.as_str() { match note_str.as_str() {
"metadata-uri" => { "metadata-uri" => {
let _metadata_url = String::from_utf8_lossy(&note.data).to_string(); let _metadata_url = String::from_utf8_lossy(&note.data).to_string();
@ -553,7 +561,7 @@ impl State {
} }
self.last_saved_block = block_number; self.last_saved_block = block_number;
if update_listings { if update_listings {
kinode_process_lib::set_state(&serde_json::to_vec(self).unwrap()); // kinode_process_lib::set_state(&serde_json::to_vec(self).unwrap());
} }
Ok(()) Ok(())
} }
@ -575,7 +583,7 @@ impl State {
} }
} }
} }
kinode_process_lib::set_state(&serde_json::to_vec(self).unwrap()); // kinode_process_lib::set_state(&serde_json::to_vec(self).unwrap());
} }
} }

View File

@ -33,6 +33,7 @@
], ],
"grant_capabilities": [ "grant_capabilities": [
"eth:distro:sys", "eth:distro:sys",
"net:distro:sys",
"http_client:distro:sys", "http_client:distro:sys",
"http_server:distro:sys", "http_server:distro:sys",
"kns_indexer:kns_indexer:sys", "kns_indexer:kns_indexer:sys",
@ -41,4 +42,4 @@
], ],
"public": false "public": false
} }
] ]

View File

@ -12,7 +12,7 @@ alloy-primitives = "0.7.0"
alloy-sol-types = "0.7.0" alloy-sol-types = "0.7.0"
bincode = "1.3.3" bincode = "1.3.3"
hex = "0.4.3" hex = "0.4.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.8.0" } kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", rev = "c8442ef" }
rmp-serde = "1.1.2" rmp-serde = "1.1.2"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"

View File

@ -330,6 +330,13 @@ fn handle_log(
routers: Vec::new(), routers: Vec::new(),
}); });
Request::new()
.target((&our.node, "net", "distro", "sys"))
.body(rmp_serde::to_vec(&net::NetAction::AddName(
child_hash,
name.clone(),
))?)
.send()?;
node = Some(name); node = Some(name);
} }
Note::SIGNATURE_HASH => { Note::SIGNATURE_HASH => {

View File

@ -172,6 +172,9 @@ async fn handle_local_request(
utils::ingest_log(log, &data.pki, &data.names); utils::ingest_log(log, &data.pki, &data.names);
} }
} }
Ok(NetAction::AddName(hash, name)) => {
data.names.insert(hash, name);
}
Ok(gets) => { Ok(gets) => {
let (response_body, response_blob) = match gets { let (response_body, response_blob) = match gets {
NetAction::GetPeers => ( NetAction::GetPeers => (

View File

@ -1817,6 +1817,10 @@ pub enum TimerAction {
// networking protocol types // networking protocol types
// //
// TODO: granular caps.
// "root": ConnectionRequest, KnsUpdate, KnsBatchUpdate, AddName, Sign?
// note: AddName is for no KnsEntry but still want to add a namehash
/// Must be parsed from message pack vector. /// Must be parsed from message pack vector.
/// all Get actions must be sent from local process. used for debugging /// all Get actions must be sent from local process. used for debugging
#[derive(Clone, Debug, Serialize, Deserialize)] #[derive(Clone, Debug, Serialize, Deserialize)]
@ -1829,6 +1833,8 @@ pub enum NetAction {
/// in the future could get from remote provider /// in the future could get from remote provider
KnsUpdate(KnsUpdate), KnsUpdate(KnsUpdate),
KnsBatchUpdate(Vec<KnsUpdate>), KnsBatchUpdate(Vec<KnsUpdate>),
/// add a (namehash -> name) to our representation of the PKI
AddName(String, String),
/// get a list of peers we are connected to /// get a list of peers we are connected to
GetPeers, GetPeers,
/// get the [`Identity`] struct for a single peer /// get the [`Identity`] struct for a single peer