diff --git a/Cargo.lock b/Cargo.lock index 0c74af0551208f0a6ad45e6849767b36d0a94300..fa0b05bf0b36ac0125371a616ed95fe87759762b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,11 +14,20 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.20.0" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +dependencies = [ + "gimli 0.26.2", +] + +[[package]] +name = "addr2line" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli", + "gimli 0.28.0", ] [[package]] @@ -27,22 +36,70 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aead" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher 0.3.0", + "cpufeatures", + "opaque-debug 0.3.0", +] + +[[package]] +name = "aes-gcm" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +dependencies = [ + "aead", + "aes", + "cipher 0.3.0", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "ahash" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +dependencies = [ + "getrandom 0.2.10", + "once_cell", + "version_check", +] + [[package]] name = "ahash" -version = "0.7.6" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ + "cfg-if", "getrandom 0.2.10", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -73,30 +130,29 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -112,9 +168,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -122,9 +178,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "array-bytes" @@ -138,6 +194,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -156,26 +221,167 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-executor" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" +dependencies = [ + "async-lock", + "async-task", + "concurrent-queue", + "fastrand 2.0.1", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock", + "autocfg", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + +[[package]] +name = "async-io" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10da8f3146014722c89e7859e1d7bb97873125d7346d10ca642ffab794355828" +dependencies = [ + "async-lock", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling 3.3.0", + "rustix 0.38.21", + "slab", + "tracing", + "waker-fn", + "windows-sys 0.48.0", +] + [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + +[[package]] +name = "async-net" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" dependencies = [ - "event-listener", + "async-io 1.13.0", + "blocking", + "futures-lite", ] +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.0.1", + "futures-lite", + "rustix 0.38.21", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.1.0", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.21", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-task" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" + [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", ] +[[package]] +name = "atomic" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.1.0" @@ -184,16 +390,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line", + "addr2line 0.21.0", "cc", "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.32.1", "rustc-demangle", ] @@ -211,9 +417,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "beef" @@ -224,6 +430,30 @@ dependencies = [ "serde", ] +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + [[package]] name = "bitflags" version = "1.3.2" @@ -232,9 +462,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitvec" @@ -257,6 +487,27 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq 0.1.5", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "constant_time_eq 0.3.0", +] + [[package]] name = "block-buffer" version = "0.7.3" @@ -296,11 +547,54 @@ dependencies = [ "byte-tools", ] +[[package]] +name = "blocking" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "fastrand 2.0.1", + "futures-io", + "futures-lite", + "piper", + "tracing", +] + +[[package]] +name = "bounded-collections" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -316,21 +610,24 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -338,34 +635,77 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chacha20" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" +dependencies = [ + "cfg-if", + "cipher 0.3.0", + "cpufeatures", + "zeroize", +] + +[[package]] +name = "chacha20poly1305" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" +dependencies = [ + "aead", + "chacha20", + "cipher 0.3.0", + "poly1305", + "zeroize", +] + [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "winapi", + "windows-targets 0.48.5", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", ] [[package]] name = "clap" -version = "4.3.10" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384e169cc618c613d5e3ca6404dda77a8685a63e08660dcc64abaf7da7cb0c7a" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.10" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef137bbe35aab78bdb468ccfba75a5f4d8321ae011d34063770780545176af2d" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", @@ -375,21 +715,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "colorchoice" @@ -410,6 +750,15 @@ dependencies = [ "unreachable", ] +[[package]] +name = "concurrent-queue" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "confy" version = "0.5.1" @@ -422,6 +771,24 @@ dependencies = [ "toml", ] +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + [[package]] name = "core-foundation" version = "0.9.3" @@ -438,15 +805,61 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +[[package]] +name = "cpp_demangle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" +dependencies = [ + "cfg-if", +] + [[package]] name = "cpufeatures" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] +[[package]] +name = "cranelift-entity" +version = "0.93.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" +dependencies = [ + "serde", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + [[package]] name = "crunchy" version = "0.2.2" @@ -483,6 +896,15 @@ dependencies = [ "subtle", ] +[[package]] +name = "ctr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher 0.3.0", +] + [[package]] name = "curve25519-dalek" version = "2.1.3" @@ -509,14 +931,64 @@ dependencies = [ "zeroize", ] +[[package]] +name = "curve25519-dalek" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", +] + [[package]] name = "darling" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core 0.20.3", + "darling_macro 0.20.3", ] [[package]] @@ -533,17 +1005,42 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.38", +] + [[package]] name = "darling_macro" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "darling_core", + "darling_core 0.14.4", "quote", "syn 1.0.109", ] +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core 0.20.3", + "quote", + "syn 2.0.38", +] + [[package]] name = "derivative" version = "2.2.0" @@ -561,8 +1058,10 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ + "convert_case", "proc-macro2", "quote", + "rustc_version", "syn 1.0.109", ] @@ -644,9 +1143,30 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek 3.2.0", + "ed25519", + "sha2 0.9.9", + "zeroize", +] [[package]] name = "ed25519-zebra" @@ -664,15 +1184,15 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] @@ -698,36 +1218,36 @@ checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "equivalent" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys 0.48.0", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "event-listener" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "2.5.3" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "01cec0252c2afff729ee6f00e903d479fba81784c8e2bd77447673471fdfaea1" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] [[package]] name = "fake-simd" @@ -735,6 +1255,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + [[package]] name = "fastrand" version = "1.9.0" @@ -744,6 +1270,18 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "fiat-crypto" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" + [[package]] name = "fixed-hash" version = "0.8.0" @@ -791,6 +1329,17 @@ name = "frame-metadata" version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "frame-metadata" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ "cfg-if", "parity-scale-codec", @@ -806,9 +1355,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -821,9 +1370,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -831,15 +1380,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -849,32 +1398,47 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" + +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-timer" @@ -884,9 +1448,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -905,6 +1469,7 @@ name = "gcli" version = "0.1.0" dependencies = [ "anyhow", + "bs58 0.5.0", "clap", "confy", "env_logger", @@ -912,12 +1477,15 @@ dependencies = [ "graphql_client", "hex", "log", + "nacl", "parity-scale-codec", "reqwest", "rpassword", + "scrypt", "serde", "serde_json", "sp-core", + "sp-runtime", "subxt", "tokio", ] @@ -948,10 +1516,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -961,17 +1527,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", +] + +[[package]] +name = "ghash" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +dependencies = [ + "opaque-debug 0.3.0", + "polyval", +] + +[[package]] +name = "gimli" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", ] [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "graphql-introspection-query" @@ -1034,9 +1618,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1053,9 +1637,9 @@ dependencies = [ [[package]] name = "hash-db" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" [[package]] name = "hash256-std-hasher" @@ -1072,14 +1656,26 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.7", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.6", ] [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +dependencies = [ + "serde", +] [[package]] name = "heck" @@ -1089,9 +1685,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1119,6 +1715,15 @@ dependencies = [ "digest 0.9.0", ] +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "hmac-drbg" version = "0.3.0" @@ -1160,9 +1765,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1187,7 +1792,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -1196,10 +1801,11 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.2" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ + "futures-util", "http", "hyper", "log", @@ -1207,7 +1813,6 @@ dependencies = [ "rustls-native-certs", "tokio", "tokio-rustls", - "webpki-roots", ] [[package]] @@ -1225,16 +1830,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -1299,16 +1904,32 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", + "serde", ] [[package]] name = "indexmap" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.2", +] + +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array 0.14.7", ] [[package]] @@ -1329,6 +1950,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "intx" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75" + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -1342,41 +1969,50 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.1", + "rustix 0.38.21", "windows-sys 0.48.0", ] +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.16.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" +checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -1386,14 +2022,13 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.16.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" +checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" dependencies = [ "futures-util", "http", "jsonrpsee-core", - "jsonrpsee-types", "pin-project", "rustls-native-certs", "soketto", @@ -1402,20 +2037,19 @@ dependencies = [ "tokio-rustls", "tokio-util", "tracing", - "webpki-roots", + "url", ] [[package]] name = "jsonrpsee-core" -version = "0.16.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" +checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" dependencies = [ "anyhow", "async-lock", "async-trait", "beef", - "futures-channel", "futures-timer", "futures-util", "hyper", @@ -1430,28 +2064,29 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.16.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" +checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" dependencies = [ "async-trait", "hyper", "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", - "rustc-hash", "serde", "serde_json", "thiserror", "tokio", + "tower", "tracing", + "url", ] [[package]] name = "jsonrpsee-types" -version = "0.16.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" +checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" dependencies = [ "anyhow", "beef", @@ -1478,15 +2113,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libsecp256k1" @@ -1536,6 +2171,12 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -1544,15 +2185,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1560,43 +2201,65 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" -version = "0.7.8" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" + +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" dependencies = [ - "hashbrown 0.12.3", + "libc", ] [[package]] -name = "matchers" -version = "0.0.1" +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "memfd" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "regex-automata", + "rustix 0.38.21", ] [[package]] -name = "memchr" -version = "2.5.0" +name = "memoffset" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] [[package]] name = "memory-db" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac11bb793c28fa095b7554466f53b3a60a2cd002afdac01bcf135cbd73a269" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ "hash-db", - "hashbrown 0.12.3", - "parity-util-mem", ] [[package]] @@ -1617,12 +2280,30 @@ dependencies = [ "zeroize", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -1634,15 +2315,21 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.48.0", ] +[[package]] +name = "nacl" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30aefc44d813c51b5e7952950e87c17f2e0e1a3274d63c8281a701e05323d548" + [[package]] name = "native-tls" version = "0.2.11" @@ -1661,17 +2348,39 @@ dependencies = [ "tempfile", ] +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nohash-hasher" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -1712,9 +2421,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] @@ -1731,9 +2440,21 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +dependencies = [ + "crc32fast", + "hashbrown 0.12.3", + "indexmap 1.9.3", + "memchr", +] + +[[package]] +name = "object" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -1758,11 +2479,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.55" +version = "0.10.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" +checksum = "a9dfc0783362704e97ef3bd24261995a699468440099ef95d869b4d9732f829a" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "cfg-if", "foreign-types", "libc", @@ -1779,7 +2500,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", ] [[package]] @@ -1790,9 +2511,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "2f55da20b29f956fb01f0add8683eb26ee13ebe3ebd935e49898717c6b4b2830" dependencies = [ "cc", "libc", @@ -1802,9 +2523,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.2" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7467bc45fea3d77e829a4df331b9e969e2ec6a4dcd4e126e660f8509b40a475" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -1817,9 +2538,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.2" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9de611934c78014c455793552d0bf7d65a58211179c49996fde925aa667c38" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1827,38 +2548,18 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parity-util-mem" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" -dependencies = [ - "cfg-if", - "hashbrown 0.12.3", - "impl-trait-for-tuples", - "parity-util-mem-derive", - "parking_lot", - "primitive-types", - "winapi", -] - -[[package]] -name = "parity-util-mem-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -dependencies = [ - "proc-macro2", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "parity-wasm" version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + [[package]] name = "parking_lot" version = "0.12.1" @@ -1871,39 +2572,49 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "smallvec", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" -version = "0.4.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.8.0", + "crypto-mac 0.11.1", ] [[package]] name = "pbkdf2" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "crypto-mac 0.11.1", + "digest 0.10.7", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", ] [[package]] @@ -1914,29 +2625,29 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project" -version = "1.1.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e138fdd8263907a2b0e1b4e80b7e58c721126479b6e6eedfb1b402acea7b9bd" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1fef411b303e3e12d534fb6e7852de82da56edd937d895125821fb7c09436c7" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1944,12 +2655,82 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "pkg-config" version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "platforms" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + +[[package]] +name = "polling" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.21", + "tracing", + "windows-sys 0.48.0", +] + +[[package]] +name = "poly1305" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" +dependencies = [ + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash", +] + +[[package]] +name = "polyval" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1958,9 +2739,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -2005,18 +2786,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2038,7 +2828,6 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc", - "rand_pcg", ] [[package]] @@ -2099,15 +2888,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "redox_syscall" version = "0.2.16" @@ -2119,9 +2899,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] @@ -2139,33 +2919,34 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.16" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" +checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.16" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" +checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", ] [[package]] name = "regex" -version = "1.8.4" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -2177,6 +2958,17 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + [[package]] name = "regex-syntax" version = "0.6.29" @@ -2185,17 +2977,17 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.2", + "base64 0.21.5", "bytes", "encoding_rs", "futures-core", @@ -2216,6 +3008,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tokio-native-tls", "tower-service", @@ -2228,17 +3021,16 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.20" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" dependencies = [ "cc", + "getrandom 0.2.10", "libc", - "once_cell", "spin", "untrusted", - "web-sys", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2280,11 +3072,34 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.36.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", +] + [[package]] name = "rustix" -version = "0.37.21" +version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25693a73057a1b4cb56179dd3c7ea21a7c6c5ee7d85781f5749b46f34b79c" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", "errno", @@ -2296,27 +3111,27 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.1" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc6396159432b5c8490d4e301d8c705f61860b8b6c863bf79942ce5401968f3" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.3", + "linux-raw-sys 0.4.10", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.21.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", "ring", + "rustls-webpki", "sct", - "webpki", ] [[package]] @@ -2337,43 +3152,123 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.2", + "base64 0.21.5", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ruzstd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" +dependencies = [ + "byteorder", + "thiserror-core", + "twox-hash", ] [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher 0.4.4", +] + +[[package]] +name = "scale-bits" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "036575c29af9b6e4866ffb7fa055dbf623fe7a9cc159b33786de6013a6969d89" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "scale-decode" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7789f5728e4e954aaa20cadcc370b99096fb8645fca3c9333ace44bb18f30095" +dependencies = [ + "derive_more", + "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-decode-derive", + "scale-info", + "smallvec", +] + +[[package]] +name = "scale-decode-derive" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "27873eb6005868f8cc72dcfe109fae664cf51223d35387bc2f28be4c28d94c47" +dependencies = [ + "darling 0.14.4", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] -name = "scale-bits" -version = "0.3.0" +name = "scale-encode" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd7aca73785181cc41f0bbe017263e682b585ca660540ba569133901d013ecf" +checksum = "6d70cb4b29360105483fac1ed567ff95d65224a14dd275b6303ed0a654c78de5" dependencies = [ + "derive_more", "parity-scale-codec", + "primitive-types", + "scale-bits", + "scale-encode-derive", "scale-info", - "serde", + "smallvec", ] [[package]] -name = "scale-decode" -version = "0.4.0" +name = "scale-encode-derive" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d823d4be477fc33321f93d08fb6c2698273d044f01362dc27573a750deb7c233" +checksum = "995491f110efdc6bea96d6a746140e32bfceb4ea47510750a5467295a4707a25" dependencies = [ - "parity-scale-codec", - "scale-bits", - "scale-info", - "thiserror", + "darling 0.14.4", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "scale-info" -version = "2.8.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad560913365790f17cbf12479491169f01b9d46d29cfc7422bf8c64bdc61b731" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" dependencies = [ "bitvec", "cfg-if", @@ -2385,9 +3280,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.8.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19df9bd9ace6cc2fe19387c96ce677e823e07d017ceed253e7bb3d1d1bd9c73b" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2397,28 +3292,42 @@ dependencies = [ [[package]] name = "scale-value" -version = "0.6.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a5e7810815bd295da73e4216d1dfbced3c7c7c7054d70fa5f6e4c58123fff4" +checksum = "6538d1cc1af9c0baf401c57da8a6d4730ef582db0d330d2efa56ec946b5b0283" dependencies = [ + "base58", + "blake2", + "derive_more", "either", - "frame-metadata", + "frame-metadata 15.1.0", "parity-scale-codec", "scale-bits", "scale-decode", + "scale-encode", "scale-info", "serde", - "thiserror", "yap", ] [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "schnellru" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" +dependencies = [ + "ahash 0.8.6", + "cfg-if", + "hashbrown 0.13.2", ] [[package]] @@ -2431,7 +3340,7 @@ dependencies = [ "arrayvec 0.5.2", "curve25519-dalek 2.1.3", "getrandom 0.1.16", - "merlin", + "merlin 2.0.1", "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", @@ -2439,17 +3348,44 @@ dependencies = [ "zeroize", ] +[[package]] +name = "schnorrkel" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek-ng", + "merlin 3.0.0", + "rand_core 0.6.4", + "sha2 0.9.9", + "subtle-ng", + "zeroize", +] + [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" +dependencies = [ + "pbkdf2 0.12.2", + "salsa20", + "sha2 0.10.8", +] [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ "ring", "untrusted", @@ -2484,9 +3420,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -2497,39 +3433,45 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", ] +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" + [[package]] name = "serde" -version = "1.0.164" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", ] [[package]] name = "serde_json" -version = "1.0.99" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -2588,9 +3530,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2609,38 +3551,183 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" + +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" +dependencies = [ + "async-channel", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock", + "async-net", + "async-process", + "blocking", + "futures-lite", +] + +[[package]] +name = "smoldot" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cce5e2881b30bad7ef89f383a816ad0b22c45915911f28499026de4a76d20ee" +dependencies = [ + "arrayvec 0.7.4", + "async-lock", + "atomic", + "base64 0.21.5", + "bip39", + "blake2-rfc", + "bs58 0.5.0", + "crossbeam-queue", + "derive_more", + "ed25519-zebra", + "either", + "event-listener 2.5.3", + "fnv", + "futures-channel", + "futures-util", + "hashbrown 0.14.2", + "hex", + "hmac 0.12.1", + "itertools", + "libsecp256k1", + "merlin 3.0.0", + "no-std-net", + "nom", + "num-bigint", + "num-rational", + "num-traits", + "pbkdf2 0.12.2", + "pin-project", + "rand 0.8.5", + "rand_chacha 0.3.1", + "ruzstd", + "schnorrkel 0.10.2", + "serde", + "serde_json", + "sha2 0.10.8", + "siphasher", + "slab", + "smallvec", + "smol", + "snow", + "soketto", + "tiny-keccak", + "twox-hash", + "wasmi 0.30.0", +] + +[[package]] +name = "smoldot-light" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2f7b4687b83ff244ef6137735ed5716ad37dcdf3ee16c4eb1a32fb9808fa47" +dependencies = [ + "async-lock", + "blake2-rfc", + "derive_more", + "either", + "event-listener 2.5.3", + "fnv", + "futures-channel", + "futures-util", + "hashbrown 0.14.2", + "hex", + "itertools", + "log", + "lru", + "parking_lot", + "rand 0.8.5", + "serde", + "serde_json", + "siphasher", + "slab", + "smol", + "smoldot", +] + +[[package]] +name = "snow" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" +dependencies = [ + "aes-gcm", + "blake2", + "chacha20poly1305", + "curve25519-dalek 4.1.1", + "rand_core 0.6.4", + "rustc_version", + "sha2 0.10.8", + "subtle", +] [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", ] +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "soketto" version = "0.7.1" @@ -2658,42 +3745,41 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "7.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 5.0.0", ] [[package]] name = "sp-arithmetic" -version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "6.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-debug-derive", - "sp-std", + "sp-std 5.0.0", "static_assertions", ] [[package]] name = "sp-core" -version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "7.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "array-bytes", - "base58", "bitflags 1.3.2", "blake2", - "byteorder", + "bounded-collections", + "bs58 0.4.0", "dyn-clonable", "ed25519-zebra", "futures", @@ -2703,105 +3789,115 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "merlin", - "num-traits", + "merlin 2.0.1", "parity-scale-codec", - "parity-util-mem", "parking_lot", + "paste", "primitive-types", - "rand 0.7.3", + "rand 0.8.5", "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1", "secrecy", "serde", - "sp-core-hashing", + "sp-core-hashing 5.0.0", "sp-debug-derive", "sp-externalities", "sp-runtime-interface", - "sp-std", + "sp-std 5.0.0", "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", - "wasmi", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "4.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "5.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ - "blake2", + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.8", + "sha3", + "sp-std 5.0.0", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee599a8399448e65197f9a6cee338ad192e9023e35e31f22382964c3c174c68" +dependencies = [ + "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", - "sp-std", + "sp-std 8.0.0", "twox-hash", ] [[package]] name = "sp-debug-derive" -version = "4.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "5.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] name = "sp-externalities" -version = "0.12.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "0.13.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", + "sp-std 5.0.0", "sp-storage", ] [[package]] name = "sp-io" -version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "7.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "bytes", + "ed25519", + "ed25519-dalek", "futures", - "hash-db", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot", + "rustversion", "secp256k1", "sp-core", "sp-externalities", "sp-keystore", "sp-runtime-interface", "sp-state-machine", - "sp-std", + "sp-std 5.0.0", "sp-tracing", "sp-trie", - "sp-wasm-interface", "tracing", "tracing-core", ] [[package]] name = "sp-keystore" -version = "0.12.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "0.13.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ - "async-trait", "futures", - "merlin", "parity-scale-codec", "parking_lot", - "schnorrkel", "sp-core", "sp-externalities", "thiserror", @@ -2809,8 +3905,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "4.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "5.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "backtrace", "lazy_static", @@ -2819,31 +3915,30 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "7.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", "parity-scale-codec", - "parity-util-mem", "paste", - "rand 0.7.3", + "rand 0.8.5", "scale-info", "serde", "sp-application-crypto", "sp-arithmetic", "sp-core", "sp-io", - "sp-std", + "sp-std 5.0.0", "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "7.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -2851,7 +3946,7 @@ dependencies = [ "primitive-types", "sp-externalities", "sp-runtime-interface-proc-macro", - "sp-std", + "sp-std 5.0.0", "sp-storage", "sp-tracing", "sp-wasm-interface", @@ -2860,63 +3955,67 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "6.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] name = "sp-state-machine" -version = "0.12.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "0.13.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "hash-db", "log", - "num-traits", "parity-scale-codec", "parking_lot", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "sp-core", "sp-externalities", "sp-panic-handler", - "sp-std", + "sp-std 5.0.0", "sp-trie", "thiserror", "tracing", - "trie-root", ] [[package]] name = "sp-std" -version = "4.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "5.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" + +[[package]] +name = "sp-std" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53458e3c57df53698b3401ec0934bea8e8cfce034816873c0b0abbd83d7bac0d" [[package]] name = "sp-storage" -version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "7.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", "sp-debug-derive", - "sp-std", + "sp-std 5.0.0", ] [[package]] name = "sp-tracing" -version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "6.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 5.0.0", "tracing", "tracing-core", "tracing-subscriber", @@ -2924,21 +4023,21 @@ dependencies = [ [[package]] name = "sp-trie" -version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "7.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ - "ahash", + "ahash 0.8.6", "hash-db", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "lazy_static", - "lru", "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot", "scale-info", + "schnellru", "sp-core", - "sp-std", + "sp-std 5.0.0", "thiserror", "tracing", "trie-db", @@ -2947,22 +4046,23 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +version = "7.0.0" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ + "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", - "wasmi", + "sp-std 5.0.0", + "wasmi 0.13.2", + "wasmtime", ] [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +source = "git+https://github.com/duniter/substrate.git?branch=duniter-substrate-v0.9.42#38b19717f847d3eda654b6465802c244ea6372a6" dependencies = [ - "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", @@ -2970,20 +4070,20 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-debug-derive", - "sp-std", + "sp-std 5.0.0", ] [[package]] name = "spin" -version = "0.5.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "ss58-registry" -version = "1.40.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47a8ad42e5fc72d5b1eb104a5546937eaf39843499948bb666d6e93c62423b" +checksum = "5e6915280e2d0db8911e5032a5c275571af6bdded2916abd691a659be25d3439" dependencies = [ "Inflector", "num-format", @@ -2994,6 +4094,12 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -3008,13 +4114,13 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] @@ -3025,27 +4131,40 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + [[package]] name = "subxt" -version = "0.24.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.32#c1266b43252514d42febde8d6f66cc3b14be94ef" +version = "0.32.1" +source = "git+https://github.com/duniter/subxt.git?branch=subxt-v0.32.1-duniter-substrate-v0.9.42#2dab931bdb6ff9d362dd4a3da0df7292ad16f51a" dependencies = [ - "bitvec", + "async-trait", + "base58", + "blake2", "derivative", - "frame-metadata", + "either", + "frame-metadata 16.0.0", "futures", - "getrandom 0.2.10", "hex", + "impl-serde", "jsonrpsee", "parity-scale-codec", - "parking_lot", + "primitive-types", + "scale-bits", "scale-decode", + "scale-encode", "scale-info", "scale-value", "serde", "serde_json", "sp-core", + "sp-core-hashing 9.0.0", "sp-runtime", + "subxt-lightclient", "subxt-macro", "subxt-metadata", "thiserror", @@ -3054,44 +4173,60 @@ dependencies = [ [[package]] name = "subxt-codegen" -version = "0.24.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.32#c1266b43252514d42febde8d6f66cc3b14be94ef" +version = "0.32.1" +source = "git+https://github.com/duniter/subxt.git?branch=subxt-v0.32.1-duniter-substrate-v0.9.42#2dab931bdb6ff9d362dd4a3da0df7292ad16f51a" dependencies = [ - "darling", - "frame-metadata", + "frame-metadata 16.0.0", "heck", "hex", "jsonrpsee", "parity-scale-codec", - "proc-macro-error", "proc-macro2", "quote", "scale-info", "subxt-metadata", - "syn 1.0.109", + "syn 2.0.38", + "thiserror", + "tokio", +] + +[[package]] +name = "subxt-lightclient" +version = "0.32.1" +source = "git+https://github.com/duniter/subxt.git?branch=subxt-v0.32.1-duniter-substrate-v0.9.42#2dab931bdb6ff9d362dd4a3da0df7292ad16f51a" +dependencies = [ + "futures", + "futures-util", + "serde", + "serde_json", + "smoldot-light", + "thiserror", "tokio", + "tokio-stream", + "tracing", ] [[package]] name = "subxt-macro" -version = "0.24.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.32#c1266b43252514d42febde8d6f66cc3b14be94ef" +version = "0.32.1" +source = "git+https://github.com/duniter/subxt.git?branch=subxt-v0.32.1-duniter-substrate-v0.9.42#2dab931bdb6ff9d362dd4a3da0df7292ad16f51a" dependencies = [ - "darling", + "darling 0.20.3", "proc-macro-error", "subxt-codegen", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] name = "subxt-metadata" -version = "0.24.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.32#c1266b43252514d42febde8d6f66cc3b14be94ef" +version = "0.32.1" +source = "git+https://github.com/duniter/subxt.git?branch=subxt-v0.32.1-duniter-substrate-v0.9.42#2dab931bdb6ff9d362dd4a3da0df7292ad16f51a" dependencies = [ - "frame-metadata", + "frame-metadata 16.0.0", "parity-scale-codec", "scale-info", - "sp-core", + "sp-core-hashing 9.0.0", + "thiserror", ] [[package]] @@ -3107,9 +4242,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.22" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -3117,15 +4252,24 @@ dependencies = [ ] [[package]] -name = "synstructure" -version = "0.12.6" +name = "system-configuration" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", ] [[package]] @@ -3134,47 +4278,72 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "target-lexicon" +version = "0.12.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" + [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ - "autocfg", "cfg-if", - "fastrand", - "redox_syscall 0.3.5", - "rustix 0.37.21", + "fastrand 2.0.1", + "redox_syscall 0.4.1", + "rustix 0.38.21", "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] +[[package]] +name = "thiserror-core" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d97345f6437bb2004cd58819d8a9ef8e36cdd7661c2abc4bbde0a7c40d9f497" +dependencies = [ + "thiserror-core-impl", +] + +[[package]] +name = "thiserror-core-impl" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ac1c5050e43014d16b2f94d0d2ce79e65ffdd8b38d8048f9c8f6a8a6da62ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", ] [[package]] @@ -3189,23 +4358,32 @@ dependencies = [ [[package]] name = "tiny-bip39" -version = "0.8.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" dependencies = [ "anyhow", - "hmac 0.8.1", + "hmac 0.12.1", "once_cell", - "pbkdf2 0.4.0", - "rand 0.7.3", + "pbkdf2 0.11.0", + "rand 0.8.5", "rustc-hash", - "sha2 0.9.9", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", "zeroize", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -3223,18 +4401,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", "mio", "num_cpus", "pin-project-lite", - "socket2", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] @@ -3247,7 +4424,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", ] [[package]] @@ -3262,20 +4439,30 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.23.4" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls", "tokio", - "webpki", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -3297,21 +4484,42 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" [[package]] name = "toml_edit" -version = "0.19.11" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.1.0", "toml_datetime", "winnow", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -3320,11 +4528,11 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3332,20 +4540,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -3353,12 +4561,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -3396,12 +4604,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.24.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" +checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" dependencies = [ "hash-db", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "log", "rustc-hex", "smallvec", @@ -3409,9 +4617,9 @@ dependencies = [ [[package]] name = "trie-root" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ "hash-db", ] @@ -3436,9 +4644,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uint" @@ -3460,9 +4668,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -3479,6 +4687,16 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "universal-hash" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + [[package]] name = "unreachable" version = "1.0.0" @@ -3490,15 +4708,15 @@ dependencies = [ [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -3535,6 +4753,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "waker-fn" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" + [[package]] name = "want" version = "0.3.1" @@ -3558,9 +4782,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3568,24 +4792,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if", "js-sys", @@ -3595,9 +4819,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3605,22 +4829,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasmi" @@ -3630,7 +4854,21 @@ checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" dependencies = [ "parity-wasm", "wasmi-validation", - "wasmi_core", + "wasmi_core 0.2.1", +] + +[[package]] +name = "wasmi" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51fb5c61993e71158abf5bb863df2674ca3ec39ed6471c64f07aeaf751d67b4" +dependencies = [ + "intx", + "smallvec", + "spin", + "wasmi_arena", + "wasmi_core 0.12.0", + "wasmparser-nostd", ] [[package]] @@ -3642,6 +4880,12 @@ dependencies = [ "parity-wasm", ] +[[package]] +name = "wasmi_arena" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" + [[package]] name = "wasmi_core" version = "0.2.1" @@ -3656,32 +4900,176 @@ dependencies = [ ] [[package]] -name = "web-sys" -version = "0.3.64" +name = "wasmi_core" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "624e6333e861ef49095d2d678b76ebf30b06bf37effca845be7e5b87c90071b7" dependencies = [ - "js-sys", - "wasm-bindgen", + "downcast-rs", + "libm", + "num-traits", + "paste", ] [[package]] -name = "webpki" -version = "0.22.0" +name = "wasmparser" +version = "0.100.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" dependencies = [ - "ring", - "untrusted", + "indexmap 1.9.3", + "url", +] + +[[package]] +name = "wasmparser-nostd" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" +dependencies = [ + "indexmap-nostd", ] [[package]] -name = "webpki-roots" -version = "0.22.6" +name = "wasmtime" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" dependencies = [ - "webpki", + "anyhow", + "bincode", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "object 0.29.0", + "once_cell", + "paste", + "psm", + "serde", + "target-lexicon", + "wasmparser", + "wasmtime-environ", + "wasmtime-jit", + "wasmtime-runtime", + "windows-sys 0.42.0", +] + +[[package]] +name = "wasmtime-asm-macros" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "wasmtime-environ" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" +dependencies = [ + "anyhow", + "cranelift-entity", + "gimli 0.26.2", + "indexmap 1.9.3", + "log", + "object 0.29.0", + "serde", + "target-lexicon", + "thiserror", + "wasmparser", + "wasmtime-types", +] + +[[package]] +name = "wasmtime-jit" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" +dependencies = [ + "addr2line 0.17.0", + "anyhow", + "bincode", + "cfg-if", + "cpp_demangle", + "gimli 0.26.2", + "log", + "object 0.29.0", + "rustc-demangle", + "serde", + "target-lexicon", + "wasmtime-environ", + "wasmtime-jit-icache-coherence", + "wasmtime-runtime", + "windows-sys 0.42.0", +] + +[[package]] +name = "wasmtime-jit-debug" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" +dependencies = [ + "once_cell", +] + +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.42.0", +] + +[[package]] +name = "wasmtime-runtime" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "mach", + "memfd", + "memoffset", + "paste", + "rand 0.8.5", + "rustix 0.36.17", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-jit-debug", + "windows-sys 0.42.0", +] + +[[package]] +name = "wasmtime-types" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" +dependencies = [ + "cranelift-entity", + "serde", + "thiserror", + "wasmparser", +] + +[[package]] +name = "web-sys" +version = "0.3.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +dependencies = [ + "js-sys", + "wasm-bindgen", ] [[package]] @@ -3702,9 +5090,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -3716,12 +5104,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -3739,28 +5127,52 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -3771,9 +5183,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -3783,9 +5195,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -3795,9 +5207,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -3807,9 +5219,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -3819,9 +5231,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -3831,9 +5243,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -3843,26 +5255,27 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.7" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" +checksum = "176b6138793677221d420fd2f0aeeced263f197688b36484660da767bca2fa32" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -3876,9 +5289,29 @@ dependencies = [ [[package]] name = "yap" -version = "0.7.2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4524214bc4629eba08d78ceb1d6507070cc0bcbbed23af74e19e6e924a24cf" + +[[package]] +name = "zerocopy" +version = "0.7.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e50cbb27c30666a6108abd6bc7577556265b44f243e2be89a8bc4e07a528c107" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc77f52dc9e9b10d55d3f4462c3b7fc393c4f17975d641542833ab2d3bc26ef" +checksum = "a25f293fe55f0a48e7010d65552bb63704f6ceb55a1a385da10d41d8f78e4a3d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] [[package]] name = "zeroize" @@ -3897,5 +5330,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.38", ] diff --git a/Cargo.toml b/Cargo.toml index a3e9876819e2421f43ac7845ff141885999bba31..1dffdb50c58a564de27211f8c9c851959af2f010 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,11 +18,16 @@ log = "0.4.17" reqwest = "0.11.14" rpassword = "7.2.0" serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0.94" -sp-core = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } -subxt = { git = "https://github.com/duniter/subxt.git", branch = "duniter-substrate-v0.9.32" } +serde_json = "^1.0.107" +sp-core = { git = "https://github.com/duniter/substrate.git", branch = "duniter-substrate-v0.9.42" } +sp-runtime = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42" } +subxt = { git = "https://github.com/duniter/subxt.git", branch = "subxt-v0.32.1-duniter-substrate-v0.9.42", features = ["substrate-compat"] } +# subxt-signer = { git = "https://github.com/duniter/subxt.git", branch = "subxt-v0.32.1-duniter-substrate-v0.9.42", features = ["subxt"] } tokio = { version = "1.26.0", features = ["macros"] } confy = "0.5.1" +scrypt = { version = "0.11", default-features = false } # for old-style key generation +nacl = { version = "0.5.3" } # for old-style key generation +bs58 = "0.5.0" # allows to build gcli for different runtimes and with different predefined networks [features] diff --git a/res/metadata.scale b/res/metadata.scale index ff2e4c744170ba9f541fe08fb699d41f1a28eb0a..d8de4291f43a4003606bc6b6f0183ff31a696c85 100644 Binary files a/res/metadata.scale and b/res/metadata.scale differ diff --git a/src/cache.rs b/src/cache.rs index 5662335068d0c53b8492a0fdd30d5cd32bbb9556..7f8f647669e52b40413c72868deaf91b70a4f06a 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -4,7 +4,7 @@ use std::collections::{hash_map, HashMap}; pub struct IdentityCache { client: Client, - identities: HashMap<u32, String>, + identities: HashMap<IdtyId, String>, indexer: Option<Indexer>, } @@ -19,7 +19,7 @@ impl IdentityCache { pub async fn fetch_identity( &mut self, - identity_id: u32, + identity_id: IdtyId, parent_hash: sp_core::H256, ) -> anyhow::Result<String> { Ok(match self.identities.entry(identity_id) { @@ -29,10 +29,8 @@ impl IdentityCache { let pubkey = self .client .storage() - .fetch( - &runtime::storage().identity().identities(identity_id), - Some(parent_hash), - ) + .at(parent_hash) + .fetch(&runtime::storage().identity().identities(identity_id)) .await? .ok_or_else(|| anyhow!("Identity {} not found", identity_id))? .owner_key diff --git a/src/commands.rs b/src/commands.rs index b69cbaf175f1aaa7e09cc220a4bd4c971d30514f..cd474b727bc03567f2b895183914a9f53e2f7944 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1,6 +1,7 @@ pub mod account; pub mod blockchain; pub mod certification; +pub mod cesium; pub mod collective; pub mod expire; pub mod identity; @@ -12,3 +13,4 @@ pub mod smith; pub mod sudo; pub mod transfer; pub mod ud; +pub mod distance; diff --git a/src/commands/account.rs b/src/commands/account.rs index 3d8844d96a2421dd31ef5038d3c3b26840bcb951..ffeb3f17e45edf7eff10e901901b582c5f22b576 100644 --- a/src/commands/account.rs +++ b/src/commands/account.rs @@ -32,11 +32,10 @@ pub enum Subcommand { } /// handle account commands -pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<()> { - let mut data = data.build_client().await?; +pub async fn handle_command(data: Data, command: Subcommand) -> Result<(), GcliError> { + let data = data.build_client().await?.fetch_system_properties().await?; match command { Subcommand::Balance => { - data = data.fetch_system_properties().await?; get_balance(data).await? } Subcommand::Transfer { @@ -80,7 +79,9 @@ pub async fn get_account_info( ) -> Result<Option<AccountInfo>, subxt::Error> { client .storage() - .fetch(&runtime::storage().system().account(account_id), None) + .at_latest() + .await? + .fetch(&runtime::storage().system().account(account_id)) .await } @@ -88,7 +89,7 @@ pub async fn get_account_info( pub async fn unlink_account(data: &Data) -> Result<(), subxt::Error> { submit_call_and_look_event::< runtime::account::events::AccountUnlinked, - StaticTxPayload<runtime::account::calls::UnlinkIdentity>, + Payload<runtime::account::calls::types::UnlinkIdentity>, >(data, &runtime::tx().account().unlink_identity()) .await } diff --git a/src/commands/blockchain.rs b/src/commands/blockchain.rs index f64a34c06821e034ee783638340d6607990f8a21..293822957474e852a452a234f0ad6a8fdc562bf1 100644 --- a/src/commands/blockchain.rs +++ b/src/commands/blockchain.rs @@ -24,7 +24,7 @@ pub enum Subcommand { } /// handle blockchain commands -pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<()> { +pub async fn handle_command(data: Data, command: Subcommand) -> Result<(), GcliError> { let mut data = data.build_client().await?; match command { Subcommand::Repart { @@ -44,16 +44,19 @@ pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<( data.cfg.duniter_endpoint, data.client() .storage() - .fetch(&runtime::storage().system().number(), None) + .at_latest() + .await? + .fetch(&runtime::storage().system().number()) .await? .unwrap() ); } Subcommand::CreateBlock => { - data.client() - .rpc() - .request("engine_createBlock", subxt::rpc::rpc_params![true, true]) // create empty block and finalize - .await?; // FIXME this gives a serialization error + todo!() + // data.client() + // .backend() + // .call("engine_createBlock", subxt::backend::rpc::rpc_params![true, true]) // create empty block and finalize + // .await?; // FIXME this gives a serialization error } } Ok(()) @@ -64,7 +67,9 @@ pub async fn fetch_genesis_hash(data: &Data) -> Result<Hash, anyhow::Error> { Ok(data .client() .storage() - .fetch(&runtime::storage().system().block_hash(0), None) + .at_latest() + .await? + .fetch(&runtime::storage().system().block_hash(0)) .await? .unwrap()) } diff --git a/src/commands/certification.rs b/src/commands/certification.rs index 366b85321933feff3a61bc7c552476eb5611712d..1376b1044ac86ebab39b184e02ff697d698fcdd8 100644 --- a/src/commands/certification.rs +++ b/src/commands/certification.rs @@ -1,7 +1,7 @@ use crate::*; /// submit a certification and track progress -pub async fn certify(data: &Data, receiver: u32) -> Result<(), anyhow::Error> { +pub async fn certify(data: &Data, receiver: IdtyId) -> Result<(), anyhow::Error> { let progress = submit_call( data, &runtime::tx().cert().add_cert(data.idty_index(), receiver), @@ -12,7 +12,7 @@ pub async fn certify(data: &Data, receiver: u32) -> Result<(), anyhow::Error> { } let events = track_progress(progress).await?; // look for the expected event - look_event::<runtime::cert::events::NewCert>(&events)?; - look_event::<runtime::cert::events::RenewedCert>(&events)?; + look_event::<runtime::cert::events::NewCert>(data, &events)?; + look_event::<runtime::cert::events::RenewedCert>(data, &events)?; Ok(()) } diff --git a/src/commands/cesium.rs b/src/commands/cesium.rs new file mode 100644 index 0000000000000000000000000000000000000000..cb6a104c18159611d89760d8c1b6c82c9d2951b6 --- /dev/null +++ b/src/commands/cesium.rs @@ -0,0 +1,78 @@ +use crate::*; +use bs58; + +/// define cesium subcommands +#[derive(Clone, Default, Debug, clap::Parser)] +pub enum Subcommand { + // Nothing + #[default] + #[clap(hide = true)] + Nothing, + /// Generate key pair with old style unsafe scrypt + Pubkey { id: String, pass: String }, + /// Prompt + Prompt, +} + +/// handle blockchain commands +pub async fn handle_command(_data: Data, command: Subcommand) -> Result<(), GcliError> { + match command { + Subcommand::Nothing => {} + Subcommand::Pubkey { id, pass } => { + let keypair = pair_from_cesium(id, pass); + println!( + "Pubkey: {}", + bs58::encode(keypair.pkey).into_string() + ); + } + Subcommand::Prompt => { + let keypair = prompt_secret_cesium(); + println!( + "Pubkey: {}", + bs58::encode(keypair.pkey).into_string() + ); + } + } + Ok(()) +} + +pub struct CesiumSigner<T: subxt::Config> { + account_id: T::AccountId, + keypair: nacl::sign::Keypair, +} +impl<T> CesiumSigner<T> +where + T: subxt::Config, + T::AccountId: From<[u8; 32]>, +{ + pub fn new(keypair: nacl::sign::Keypair) -> Self { + Self { + account_id: T::AccountId::from(keypair.pkey), + keypair, + } + } +} +impl<T> subxt::tx::Signer<T> for CesiumSigner<T> +where + T: subxt::Config, + T::Address: From<T::AccountId>, + T::Signature: From<sp_core::ed25519::Signature>, +{ + fn account_id(&self) -> T::AccountId { + self.account_id.clone() + } + + fn address(&self) -> T::Address { + self.account_id.clone().into() + } + + fn sign(&self, payload: &[u8]) -> T::Signature { + sp_core::ed25519::Signature( + nacl::sign::signature(payload, &self.keypair.skey) + .unwrap() + .try_into() + .expect("could not read signature"), + ) + .into() + } +} diff --git a/src/commands/collective.rs b/src/commands/collective.rs index cc7f10e5819506004c769bc56bacf3c83c67aa86..80da16a0b7210ad8509a46da5cdded92f002b0b7 100644 --- a/src/commands/collective.rs +++ b/src/commands/collective.rs @@ -22,7 +22,7 @@ pub enum Subcommand { } /// handle technical committee commands -pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<()> { +pub async fn handle_command(data: Data, command: Subcommand) -> Result<(), GcliError> { let mut data = data.build_client().await?.build_indexer().await?; match command { Subcommand::Members => { @@ -58,16 +58,16 @@ pub async fn technical_committee_members(data: &Data) -> Result<()> { let parent_hash = client .storage() - .fetch(&runtime::storage().system().parent_hash(), None) + .at_latest() + .await? + .fetch(&runtime::storage().system().parent_hash()) .await? .unwrap(); for account_id in client .storage() - .fetch( - &runtime::storage().technical_committee().members(), - Some(parent_hash), - ) + .at(parent_hash) + .fetch(&runtime::storage().technical_committee().members()) .await? .unwrap_or_default() { @@ -82,10 +82,8 @@ pub async fn technical_committee_members(data: &Data) -> Result<()> { } else { client .storage() - .fetch( - &runtime::storage().identity().identity_index_of(&account_id), - Some(parent_hash), - ) + .at(parent_hash) + .fetch(&runtime::storage().identity().identity_index_of(&account_id)) .await .ok() .flatten() @@ -105,22 +103,19 @@ pub async fn technical_committee_members(data: &Data) -> Result<()> { pub async fn technical_committee_proposals(client: &Client) -> Result<()> { let parent_hash = client .storage() - .fetch(&runtime::storage().system().parent_hash(), None) + .at_latest() + .await? + .fetch(&runtime::storage().system().parent_hash()) .await? .unwrap(); let mut proposals_iter = client .storage() - .iter( - runtime::storage() - .technical_committee() - .proposal_of(Hash::default()), - 10, - Some(parent_hash), - ) + .at(parent_hash) + .iter(runtime::storage().technical_committee().proposal_of_iter()) .await?; - while let Some((proposal_hash, proposal)) = proposals_iter.next().await? { - println!("{}", hex::encode(&proposal_hash.0[32..64])); + while let Some(Ok((proposal_hash, proposal))) = proposals_iter.next().await { + println!("{}", hex::encode(&proposal_hash[32..64])); println!("{proposal:#?}"); println!(); } @@ -137,7 +132,7 @@ pub async fn technical_committee_vote( ) -> Result<(), subxt::Error> { submit_call_and_look_event::< runtime::technical_committee::events::Voted, - StaticTxPayload<runtime::technical_committee::calls::Vote>, + Payload<runtime::technical_committee::calls::types::Vote>, >( data, &runtime::tx() diff --git a/src/commands/distance.rs b/src/commands/distance.rs new file mode 100644 index 0000000000000000000000000000000000000000..24c1fe677400bfbefaf6aafb434725e2cee4a2ec --- /dev/null +++ b/src/commands/distance.rs @@ -0,0 +1,24 @@ +use crate::*; + +/// request distance evaluation +pub async fn request_distance_evaluation(data: &Data) -> Result<(), subxt::Error> { + let progress = submit_call(data, &runtime::tx().distance().request_distance_evaluation()) + .await?; + if data.args.no_wait { + return Ok(()); + } + let _ = track_progress(progress).await?; + Ok(()) +} + +/// get identity distance status +pub async fn get_identity_distance_status( + data: &Data, +) -> Result<Option<(AccountId, runtime::runtime_types::pallet_distance::types::DistanceStatus)>, subxt::Error> { + data.client() + .storage() + .at_latest() + .await? + .fetch(&runtime::storage().distance().identity_distance_status(data.idty_index())) + .await +} \ No newline at end of file diff --git a/src/commands/expire.rs b/src/commands/expire.rs index 43d7d98379b6cc63dca208451e1cb1fe96a6be90..f6b496331d2c370cd16a892eb5ba091cd8b8c2c6 100644 --- a/src/commands/expire.rs +++ b/src/commands/expire.rs @@ -9,18 +9,19 @@ pub async fn monitor_expirations(data: &Data, blocks: u32, _sessions: u32) -> an let parent_hash = client .storage() - .fetch(&runtime::storage().system().parent_hash(), None) + .at_latest() + .await? + .fetch(&runtime::storage().system().parent_hash()) .await? .unwrap(); let addr_current_block = runtime::storage().system().number(); let addr_current_session = runtime::storage().session().current_index(); let (current_block, _current_session) = join!( + client.storage().at(parent_hash).fetch(&addr_current_block), client .storage() - .fetch(&addr_current_block, Some(parent_hash)), - client - .storage() - .fetch(&addr_current_session, Some(parent_hash),) + .at(parent_hash) + .fetch(&addr_current_session) ); let current_block = current_block?.unwrap_or_default(); @@ -31,15 +32,12 @@ pub async fn monitor_expirations(data: &Data, blocks: u32, _sessions: u32) -> an // Certifications let mut basic_certs_iter = client .storage() - .iter( - runtime::storage().cert().storage_certs_removable_on(0), - 10, - Some(parent_hash), - ) + .at(parent_hash) + .iter(runtime::storage().cert().storage_certs_removable_on_iter()) .await?; let mut basic_certs = BTreeMap::new(); - while let Some((k, v)) = basic_certs_iter.next().await? { - let block_number = u32::from_le_bytes(k.as_ref()[40..44].try_into().unwrap()); + while let Some(Ok((k, v))) = basic_certs_iter.next().await { + let block_number = BlockNumber::from_le_bytes(k[40..44].try_into().unwrap()); if block_number < end_block { basic_certs.insert(block_number - current_block, v); } @@ -47,17 +45,16 @@ pub async fn monitor_expirations(data: &Data, blocks: u32, _sessions: u32) -> an let mut smith_certs_iter = client .storage() + .at(parent_hash) .iter( runtime::storage() .smith_cert() - .storage_certs_removable_on(0), - 10, - Some(parent_hash), + .storage_certs_removable_on_iter(), ) .await?; let mut smith_certs = BTreeMap::new(); - while let Some((k, v)) = smith_certs_iter.next().await? { - let block_number = u32::from_le_bytes(k.as_ref()[40..44].try_into().unwrap()); + while let Some(Ok((k, v))) = smith_certs_iter.next().await { + let block_number = BlockNumber::from_le_bytes(k[40..44].try_into().unwrap()); if block_number < end_block { smith_certs.insert(block_number - current_block, v); } @@ -91,15 +88,12 @@ pub async fn monitor_expirations(data: &Data, blocks: u32, _sessions: u32) -> an // Memberships let mut basic_membership_iter = client .storage() - .iter( - runtime::storage().membership().memberships_expire_on(0), - 10, - Some(parent_hash), - ) + .at(parent_hash) + .iter(runtime::storage().membership().memberships_expire_on_iter()) .await?; let mut basic_memberships = BTreeMap::new(); - while let Some((k, v)) = basic_membership_iter.next().await? { - let block_number = u32::from_le_bytes(k.as_ref()[40..44].try_into().unwrap()); + while let Some(Ok((k, v))) = basic_membership_iter.next().await { + let block_number = BlockNumber::from_le_bytes(k[40..44].try_into().unwrap()); if block_number < end_block { if block_number < current_block { dbg!((block_number, current_block)); @@ -110,17 +104,16 @@ pub async fn monitor_expirations(data: &Data, blocks: u32, _sessions: u32) -> an let mut smith_membership_iter = client .storage() + .at(parent_hash) .iter( runtime::storage() .smith_membership() - .memberships_expire_on(0), - 10, - Some(parent_hash), + .memberships_expire_on_iter(), ) .await?; let mut smith_memberships = BTreeMap::new(); - while let Some((k, v)) = smith_membership_iter.next().await? { - let block_number = u32::from_le_bytes(k.as_ref()[40..44].try_into().unwrap()); + while let Some(Ok((k, v))) = smith_membership_iter.next().await { + let block_number = BlockNumber::from_le_bytes(k[40..44].try_into().unwrap()); if block_number < end_block { smith_memberships.insert(block_number - current_block, v); } diff --git a/src/commands/identity.rs b/src/commands/identity.rs index 5543854cac331ce31bf47a86be8317b8e90faca0..2ddcc678adeb21022ddb4d1ee6b7f5921a649c38 100644 --- a/src/commands/identity.rs +++ b/src/commands/identity.rs @@ -5,7 +5,6 @@ use crate::{ runtime::runtime_types::{ common_runtime::entities::{IdtyData, NewOwnerKeySignature}, pallet_identity::types::*, - sp_core::sr25519::Signature, sp_runtime::MultiSignature, }, }; @@ -22,7 +21,7 @@ pub enum Subcommand { #[clap(short = 'a', long = "address")] account_id: Option<AccountId>, #[clap(short = 'i', long = "identity")] - identity_id: Option<u32>, + identity_id: Option<IdtyId>, #[clap(short = 'u', long = "username")] username: Option<String>, }, @@ -36,12 +35,17 @@ pub enum Subcommand { Confirm { name: String }, /// Validate an identity /// Should be called when the distance has been evaluated positively - Validate { index: u32 }, + Validate { index: IdtyId }, + /// Request distance evaluation + /// make sure that it's ok otherwise currency is slashed + RequestDistanceEvaluation, + /// Get distance status + DistanceStatus, /// Renew membership /// When membership comes to and end, it should be renewed for the identity to stay member RenewMembership, /// Certify an identity - Certify { target: u32 }, + Certify { target: IdtyId }, /// Revoke an identity immediately Revoke, /// Generate a revocation document for the provided account @@ -50,15 +54,21 @@ pub enum Subcommand { MemberCount, /// Link an account to the identity LinkAccount { - /// address of the account that has to be linked - address: AccountId, + /// Secret key format (seed, substrate) + #[clap(short = 'S', long, default_value = SecretFormat::Substrate)] + secret_format: SecretFormat, + /// Secret of account to link + /// most likely different from the one owning the identity + #[clap(short, long)] + secret: Option<String>, }, } /// handle identity commands -pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<()> { +pub async fn handle_command(data: Data, command: Subcommand) -> Result<(), GcliError> { let mut data = data.build_client().await?; match command { + // TODO remove indexer where not necessary when BlakeConcat will be there Subcommand::Show => {} Subcommand::Get { ref account_id, @@ -77,6 +87,13 @@ pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<( Subcommand::Validate { index } => { validate_identity(&data, index).await?; } + Subcommand::RequestDistanceEvaluation => { + commands::distance::request_distance_evaluation(&data).await?; + } + Subcommand::DistanceStatus => { + data = data.fetch_idty_index().await?; + dbg!(commands::distance::get_identity_distance_status(&data).await?); + } Subcommand::RenewMembership => { renew_membership(&data).await?; } @@ -99,17 +116,21 @@ pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<( "member count: {}", data.client() .storage() - .fetch( - &runtime::storage().membership().counter_for_membership(), - None, - ) + .at_latest() + .await? + .fetch(&runtime::storage().membership().counter_for_membership(),) .await? .unwrap() ) } - Subcommand::LinkAccount { address } => { + Subcommand::LinkAccount { + secret_format, + secret, + } => { + let keypair = get_keypair(secret_format, secret.as_deref())?; + let address = keypair.address(); data = data.fetch_idty_index().await?; // idty index required for payload - link_account(&data, address).await?; + link_account(&data, address, keypair).await?; } }; @@ -122,7 +143,7 @@ pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<( pub async fn get_identity( data: &Data, mut account_id: Option<AccountId>, - mut identity_id: Option<u32>, + mut identity_id: Option<IdtyId>, mut username: Option<String>, ) -> Result<(), anyhow::Error> { let client = data.client(); @@ -186,24 +207,25 @@ pub async fn get_identity( pub async fn get_idty_index_by_account_id( client: &Client, account_id: &AccountId, -) -> Result<Option<u32>, anyhow::Error> { +) -> Result<Option<IdtyId>, anyhow::Error> { Ok(client .storage() - .fetch( - &runtime::storage().identity().identity_index_of(account_id), - None, - ) + .at_latest() + .await? + .fetch(&runtime::storage().identity().identity_index_of(account_id)) .await?) } /// get identityt value by index pub async fn get_identity_by_index( client: &Client, - idty_index: u32, -) -> Result<Option<IdtyValue<u32, AccountId, IdtyData>>, anyhow::Error> { + idty_index: IdtyId, +) -> Result<Option<IdtyValue<IdtyId, AccountId, IdtyData>>, anyhow::Error> { Ok(client .storage() - .fetch(&runtime::storage().identity().identities(idty_index), None) + .at_latest() + .await? + .fetch(&runtime::storage().identity().identities(idty_index)) .await?) } @@ -211,7 +233,7 @@ pub async fn get_identity_by_index( pub async fn create_identity(data: &Data, target: AccountId) -> Result<(), subxt::Error> { submit_call_and_look_event::< runtime::identity::events::IdtyCreated, - StaticTxPayload<runtime::identity::calls::CreateIdentity>, + Payload<runtime::identity::calls::types::CreateIdentity>, >(data, &runtime::tx().identity().create_identity(target)) .await } @@ -220,16 +242,16 @@ pub async fn create_identity(data: &Data, target: AccountId) -> Result<(), subxt pub async fn confirm_identity(data: &Data, name: String) -> Result<(), subxt::Error> { submit_call_and_look_event::< runtime::identity::events::IdtyConfirmed, - StaticTxPayload<runtime::identity::calls::ConfirmIdentity>, + Payload<runtime::identity::calls::types::ConfirmIdentity>, >(data, &runtime::tx().identity().confirm_identity(name)) .await } /// confirm identity -pub async fn validate_identity(data: &Data, index: u32) -> Result<(), subxt::Error> { +pub async fn validate_identity(data: &Data, index: IdtyId) -> Result<(), subxt::Error> { submit_call_and_look_event::< runtime::identity::events::IdtyValidated, - StaticTxPayload<runtime::identity::calls::ValidateIdentity>, + Payload<runtime::identity::calls::types::ValidateIdentity>, >(data, &runtime::tx().identity().validate_identity(index)) .await } @@ -238,23 +260,23 @@ pub async fn validate_identity(data: &Data, index: u32) -> Result<(), subxt::Err pub async fn renew_membership(data: &Data) -> Result<(), subxt::Error> { submit_call_and_look_event::< runtime::membership::events::MembershipRenewed, - StaticTxPayload<runtime::membership::calls::RenewMembership>, + Payload<runtime::membership::calls::types::RenewMembership>, >(data, &runtime::tx().membership().renew_membership()) .await } /// generate revokation document and submit it immediately pub async fn revoke_identity(data: &Data) -> Result<(), subxt::Error> { - let (_payload, signature) = generate_revoc_doc(&data); + let (_payload, signature) = generate_revoc_doc(data); // Transform signature to MultiSignature // TODO: this is a hack, we should be able to use the signature directly - let signature = Signature(signature.0); + let signature = runtime::runtime_types::sp_core::sr25519::Signature(signature.0); let multisign = MultiSignature::Sr25519(signature); submit_call_and_look_event::< runtime::identity::events::IdtyRemoved, - StaticTxPayload<runtime::identity::calls::RevokeIdentity>, + Payload<runtime::identity::calls::types::RevokeIdentity>, >( data, &runtime::tx() @@ -269,23 +291,31 @@ type LinkAccountPayload = Vec<u8>; pub fn generate_link_account( data: &Data, address: AccountId, -) -> (LinkAccountPayload, sp_core::sr25519::Signature) { + keypair: KeyPair, +) -> (LinkAccountPayload, sr25519::Signature) { let payload = (b"link", data.genesis_hash, data.idty_index(), address).encode(); - let signature = data.keypair().sign(&payload); + let KeyPair::Sr25519(keypair) = keypair else { + panic!("Cesium keys not implemented there") + }; + let signature = keypair.sign(&payload); (payload, signature) } /// link an account to the identity -pub async fn link_account(data: &Data, address: AccountId) -> Result<(), subxt::Error> { - let (_payload, signature) = generate_link_account(data, address.clone()); +pub async fn link_account( + data: &Data, + address: AccountId, + keypair: KeyPair, +) -> Result<(), subxt::Error> { + let (_payload, signature) = generate_link_account(data, address.clone(), keypair); // this is a hack, see // https://substrate.stackexchange.com/questions/10309/how-to-use-core-crypto-types-instead-of-runtime-types - let signature = Signature(signature.0); + let signature = runtime::runtime_types::sp_core::sr25519::Signature(signature.0); submit_call_and_look_event::< runtime::account::events::AccountLinked, - StaticTxPayload<runtime::identity::calls::LinkAccount>, + Payload<runtime::identity::calls::types::LinkAccount>, >( data, &runtime::tx() diff --git a/src/commands/net_test.rs b/src/commands/net_test.rs index ca8648021516a72b342639148c0d2964c685f507..96bb11e81d402f790c5c61f4bafc08741e303dd6 100644 --- a/src/commands/net_test.rs +++ b/src/commands/net_test.rs @@ -4,10 +4,12 @@ use sp_core::DeriveJunction; use subxt::ext::sp_runtime::MultiAddress; pub async fn repart(data: &Data, target: u32, actual_repart: Option<u32>) -> anyhow::Result<()> { + let KeyPair::Sr25519(keypair) = data.keypair() else { + panic!("Cesium keys not implemented there") + }; let mut pairs = Vec::new(); for i in actual_repart.unwrap_or_default()..target { - let pair_i = data - .keypair() + let pair_i = keypair .derive(std::iter::once(DeriveJunction::hard::<u32>(i)), None) .map_err(|_| anyhow!("Fail to derive //{}", i))? .0; @@ -19,7 +21,7 @@ pub async fn repart(data: &Data, target: u32, actual_repart: Option<u32>) -> any .tx() .balances() .transfer(MultiAddress::Id(pair_i.public().into()), 501)? - .sign_and_submit_then_watch(&signer, BaseExtrinsicParamsBuilder::new()) + .sign_and_submit_then_watch(&signer, DefaultExtrinsicParamsBuilder::new()) .await? .wait_for_in_block() .await?; @@ -28,10 +30,9 @@ pub async fn repart(data: &Data, target: u32, actual_repart: Option<u32>) -> any if let Some(pair_i_account) = data .client() .storage() - .fetch( - &runtime::storage().system().account(&pair_i.public().into()), - None, - ) + .at_latest() + .await? + .fetch(&runtime::storage().system().account(&pair_i.public().into())) .await? { log::info!("account //{} balance: {}", i, pair_i_account.data.free); @@ -42,12 +43,15 @@ pub async fn repart(data: &Data, target: u32, actual_repart: Option<u32>) -> any } pub async fn spam_roll(data: &Data, actual_repart: usize) -> anyhow::Result<()> { + let KeyPair::Sr25519(keypair) = data.keypair() else { + panic!("Cesium keys not implemented there") + }; let client = data.client(); let mut nonce = 0; - let mut pairs = Vec::<(PairSigner<Runtime, Pair>, AccountId)>::with_capacity(actual_repart); + let mut pairs = + Vec::<(PairSigner<Runtime, sr25519::Pair>, AccountId)>::with_capacity(actual_repart); for i in 0..actual_repart { - let pair_i = data - .keypair() + let pair_i = keypair .derive(std::iter::once(DeriveJunction::hard::<u32>(i as u32)), None) .map_err(|_| anyhow!("Fail to derive //{}", i))? .0; @@ -62,10 +66,12 @@ pub async fn spam_roll(data: &Data, actual_repart: usize) -> anyhow::Result<()> let watcher = client .tx() .create_signed_with_nonce( - &runtime::tx().balances().transfer(MultiAddress::Id(dest), 1), + &runtime::tx() + .balances() + .transfer(MultiAddress::Id(dest).into(), 1), &pairs[i].0, nonce, - BaseExtrinsicParamsBuilder::new(), + DefaultExtrinsicParamsBuilder::new().build(), )? .submit_and_watch() .await?; @@ -77,9 +83,11 @@ pub async fn spam_roll(data: &Data, actual_repart: usize) -> anyhow::Result<()> let watcher = client .tx() .sign_and_submit_then_watch( - &runtime::tx().balances().transfer(MultiAddress::Id(dest), 1), + &runtime::tx() + .balances() + .transfer(MultiAddress::Id(dest).into(), 1), &pairs[actual_repart - 1].0, - BaseExtrinsicParamsBuilder::new(), + DefaultExtrinsicParamsBuilder::new().build(), ) .await?; nonce += 1; diff --git a/src/commands/oneshot.rs b/src/commands/oneshot.rs index c4cf3c362941e21b0aea0b462bdde9b03cd5e8dc..8907261587c6017bf349c790f1a3353fce2f5be5 100644 --- a/src/commands/oneshot.rs +++ b/src/commands/oneshot.rs @@ -27,7 +27,7 @@ pub enum Subcommand { } /// handle oneshot commands -pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<()> { +pub async fn handle_command(data: Data, command: Subcommand) -> Result<(), GcliError> { // build indexer because it is needed for all subcommands let mut data = data.build_client().await?; // match subcommand @@ -71,11 +71,12 @@ pub async fn oneshot_account_balance(data: &Data) -> Result<(), anyhow::Error> { data.address(), data.client() .storage() + .at_latest() + .await? .fetch( &runtime::storage() .oneshot_account() .oneshot_accounts(data.address()), - None ) .await? .unwrap_or(0) @@ -90,74 +91,45 @@ pub async fn create_oneshot_account( balance: u64, dest: AccountId, ) -> Result<(), subxt::Error> { - let progress = data - .client() - .tx() - .sign_and_submit_then_watch( - &runtime::tx() - .oneshot_account() - .create_oneshot_account(dest.into(), balance), - &PairSigner::new(data.keypair()), - BaseExtrinsicParamsBuilder::new(), - ) - .await?; - - if data.args.no_wait { - return Ok(()); - } - let events = track_progress(progress).await?; - if let Some(e) = - events.find_first::<runtime::oneshot_account::events::OneshotAccountCreated>()? - { - println!("{e:?}"); - } - Ok(()) + submit_call_and_look_event::< + runtime::oneshot_account::events::OneshotAccountCreated, + Payload<runtime::oneshot_account::calls::types::CreateOneshotAccount>, + >( + data, + &runtime::tx() + .oneshot_account() + .create_oneshot_account(dest.into(), balance), + ) + .await } /// consume oneshot account pub async fn consume_oneshot_account( data: &Data, - dest: AccountId, dest_oneshot: bool, ) -> Result<(), subxt::Error> { let client = data.client(); - let number = client .storage() - .fetch(&runtime::storage().system().number(), None) + .at_latest() + .await? + .fetch(&runtime::storage().system().number()) .await? .unwrap(); - let progress = client - .tx() - .sign_and_submit_then_watch( - &runtime::tx().oneshot_account().consume_oneshot_account( - number, - if dest_oneshot { - runtime::runtime_types::pallet_oneshot_account::types::Account::Oneshot( - dest.into(), - ) - } else { - runtime::runtime_types::pallet_oneshot_account::types::Account::Normal( - dest.into(), - ) - }, - ), - &PairSigner::new(data.keypair()), - BaseExtrinsicParamsBuilder::new(), - ) - .await?; - - if data.args.no_wait { - return Ok(()); - } - let events = track_progress(progress).await?; - if let Some(e) = - events.find_first::<runtime::oneshot_account::events::OneshotAccountConsumed>()? - { - println!("{e:?}"); - } - Ok(()) + let payload = &runtime::tx().oneshot_account().consume_oneshot_account( + number, + if dest_oneshot { + runtime::runtime_types::pallet_oneshot_account::types::Account::Oneshot(dest.into()) + } else { + runtime::runtime_types::pallet_oneshot_account::types::Account::Normal(dest.into()) + }, + ); + submit_call_and_look_event::< + runtime::oneshot_account::events::OneshotAccountConsumed, + Payload<runtime::oneshot_account::calls::types::ConsumeOneshotAccount>, + >(data, payload) + .await } /// consume oneshot account with remaining @@ -173,11 +145,13 @@ pub async fn consume_oneshot_account_with_remaining( let number = client .storage() - .fetch(&runtime::storage().system().number(), None) + .at_latest() + .await? + .fetch(&runtime::storage().system().number()) .await? .unwrap(); - let call = &runtime::tx() + let payload = &runtime::tx() .oneshot_account() .consume_oneshot_account_with_remaining( number, @@ -200,7 +174,7 @@ pub async fn consume_oneshot_account_with_remaining( submit_call_and_look_event::< runtime::oneshot_account::events::OneshotAccountConsumed, - StaticTxPayload<runtime::oneshot_account::calls::ConsumeOneshotAccountWithRemaining>, - >(data, call) + Payload<runtime::oneshot_account::calls::types::ConsumeOneshotAccountWithRemaining>, + >(data, payload) .await } diff --git a/src/commands/revocation.rs b/src/commands/revocation.rs index 20521887004d6d6d847ac5ed039e5866124aa0ef..d9d60e1a603b79dd20ccb7229049c08aad6b3e56 100644 --- a/src/commands/revocation.rs +++ b/src/commands/revocation.rs @@ -1,7 +1,5 @@ use crate::*; -use sp_core::sr25519::Signature; - // TODO include prefix in RevocationPayload and use below // use crate::runtime::runtime_types::pallet_identity::types::RevocationPayload; type EncodedRevocationPayload = Vec<u8>; @@ -12,9 +10,12 @@ pub fn print_revoc_sig(data: &Data) { println!("0x{}", hex::encode(signature)); } -pub fn generate_revoc_doc(data: &Data) -> (EncodedRevocationPayload, Signature) { +pub fn generate_revoc_doc(data: &Data) -> (EncodedRevocationPayload, sr25519::Signature) { let payload = (b"revo", data.genesis_hash, data.idty_index()).encode(); - let signature = data.keypair().sign(&payload); + let KeyPair::Sr25519(keypair) = data.keypair() else { + panic!("Cesium keys not implemented there") + }; + let signature = keypair.sign(&payload); (payload, signature) } diff --git a/src/commands/smith.rs b/src/commands/smith.rs index f7b25e21c12413cf85d7a30a7d4c783351a71f28..366bc36cab8fd05e81d8717003a585b850cfb461 100644 --- a/src/commands/smith.rs +++ b/src/commands/smith.rs @@ -13,7 +13,7 @@ pub enum Subcommand { /// Request smith membership Request { endpoint: String }, /// Emit a smith certification - Cert { to: u32 }, + Cert { to: IdtyId }, /// Claim smith membership Claim, /// Renew smith membership @@ -25,8 +25,6 @@ pub enum Subcommand { GoOffline, /// Rotate and set session keys UpdateKeys, - /// set sudo keys - SudoSetKey { new_key: AccountId }, /// List upcoming expirations that require an action ShowExpire { /// Show certs that expire within less than this number of blocks @@ -43,7 +41,7 @@ pub enum Subcommand { } /// handle smith commands -pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<()> { +pub async fn handle_command(data: Data, command: Subcommand) -> Result<(), GcliError> { let mut data = data.build_client().await?; match command { Subcommand::Request { endpoint } => { @@ -68,10 +66,6 @@ pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<( Subcommand::UpdateKeys => { update_session_keys(&data).await?; } - Subcommand::SudoSetKey { new_key } => { - data = data.build_client().await?; - commands::sudo::set_key(&data, new_key).await?; - } Subcommand::ShowExpire { blocks, sessions } => { data = data.build_client().await?.build_indexer().await?; commands::expire::monitor_expirations(&data, blocks, sessions).await? @@ -85,11 +79,12 @@ pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<( "smith member count: {:?}", data.client() .storage() + .at_latest() + .await? .fetch( &runtime::storage() .smith_membership() .counter_for_membership(), - None, ) .await? ) @@ -101,10 +96,10 @@ pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<( /// rotate session keys /// (needs to be connected to unsafe RPC) -pub async fn rotate_keys(client: &Client) -> Result<SessionKeys, anyhow::Error> { - client - .rpc() - .rotate_keys() +pub async fn rotate_keys(data: &Data) -> Result<SessionKeys, anyhow::Error> { + data.legacy_rpc_methods() + .await + .author_rotate_keys() .await .map_err(|e| { anyhow!( @@ -119,33 +114,23 @@ pub async fn rotate_keys(client: &Client) -> Result<SessionKeys, anyhow::Error> /// request smith membership pub async fn request_smith_membership(data: &Data, endpoint: String) -> Result<(), anyhow::Error> { - let session_keys = rotate_keys(data.client()).await?; + let session_keys = rotate_keys(data).await?; let metadata = SmithMembershipMetaData { session_keys, owner_key: data.address(), p2p_endpoint: endpoint, }; - let progress = data - .client() - .tx() - .sign_and_submit_then_watch( - &runtime::tx() - .smith_membership() - .request_membership(metadata), - &PairSigner::new(data.keypair()), - BaseExtrinsicParamsBuilder::new(), - ) - .await?; - - if data.args.no_wait { - return Ok(()); - } - let events = track_progress(progress).await?; - let request = events.find_first::<runtime::smith_membership::events::MembershipRequested>()?; - if let Some(event) = request { - println!("{event:?}"); - } - Ok(()) + submit_call_and_look_event::< + runtime::smith_membership::events::MembershipRequested, + Payload<runtime::smith_membership::calls::types::RequestMembership>, + >( + data, + &runtime::tx() + .smith_membership() + .request_membership(metadata), + ) + .await + .map_err(|e| anyhow!(e)) } /// set session keys @@ -153,21 +138,18 @@ pub async fn set_session_keys( data: &Data, session_keys: SessionKeys, ) -> Result<TxProgress, subxt::Error> { - data.client() - .tx() - .sign_and_submit_then_watch( - &runtime::tx() - .authority_members() - .set_session_keys(session_keys), - &PairSigner::new(data.keypair()), - BaseExtrinsicParamsBuilder::new(), - ) - .await + submit_call::<Payload<runtime::authority_members::calls::types::SetSessionKeys>>( + data, + &runtime::tx() + .authority_members() + .set_session_keys(session_keys), + ) + .await } /// update session keys pub async fn update_session_keys(data: &Data) -> Result<(), GcliError> { - let session_keys = rotate_keys(data.client()).await?; + let session_keys = rotate_keys(data).await?; let progress = set_session_keys(data, session_keys).await?; if data.args.no_wait { @@ -182,10 +164,9 @@ pub async fn go_online(data: &Data) -> Result<(), GcliError> { if data .client() .storage() - .fetch( - &runtime::storage().session().next_keys(data.address()), - None, - ) + .at_latest() + .await? + .fetch(&runtime::storage().session().next_keys(data.address())) .await? .is_none() { @@ -196,7 +177,7 @@ pub async fn go_online(data: &Data) -> Result<(), GcliError> { submit_call_and_look_event::< runtime::authority_members::events::MemberGoOnline, - StaticTxPayload<runtime::authority_members::calls::GoOnline>, + Payload<runtime::authority_members::calls::types::GoOnline>, >(data, &runtime::tx().authority_members().go_online()) .await .map_err(|e| e.into()) @@ -206,7 +187,7 @@ pub async fn go_online(data: &Data) -> Result<(), GcliError> { pub async fn claim_smith_membership(data: &Data) -> Result<(), subxt::Error> { submit_call_and_look_event::< runtime::smith_membership::events::MembershipAcquired, - StaticTxPayload<runtime::smith_membership::calls::ClaimMembership>, + Payload<runtime::smith_membership::calls::types::ClaimMembership>, >(data, &runtime::tx().smith_membership().claim_membership()) .await } @@ -215,7 +196,7 @@ pub async fn claim_smith_membership(data: &Data) -> Result<(), subxt::Error> { pub async fn renew_smith_membership(data: &Data) -> Result<(), subxt::Error> { submit_call_and_look_event::< runtime::smith_membership::events::MembershipRenewed, - StaticTxPayload<runtime::smith_membership::calls::RenewMembership>, + Payload<runtime::smith_membership::calls::types::RenewMembership>, >(data, &runtime::tx().smith_membership().renew_membership()) .await } @@ -224,7 +205,7 @@ pub async fn renew_smith_membership(data: &Data) -> Result<(), subxt::Error> { pub async fn go_offline(data: &Data) -> Result<(), subxt::Error> { submit_call_and_look_event::< runtime::authority_members::events::MemberGoOffline, - StaticTxPayload<runtime::authority_members::calls::GoOffline>, + Payload<runtime::authority_members::calls::types::GoOffline>, >(data, &runtime::tx().authority_members().go_offline()) .await } @@ -237,7 +218,9 @@ pub async fn online(data: &Data) -> Result<(), anyhow::Error> { let parent_hash = client .clone() .storage() - .fetch(&runtime::storage().system().parent_hash(), None) + .at_latest() + .await? + .fetch(&runtime::storage().system().parent_hash()) .await? .unwrap(); @@ -245,10 +228,8 @@ pub async fn online(data: &Data) -> Result<(), anyhow::Error> { let online_authorities = client .storage() - .fetch( - &runtime::storage().authority_members().online_authorities(), - Some(parent_hash), - ) + .at(parent_hash) + .fetch(&runtime::storage().authority_members().online_authorities()) .await? .unwrap_or_default(); @@ -265,11 +246,11 @@ pub async fn online(data: &Data) -> Result<(), anyhow::Error> { let incoming_authorities = client .storage() + .at(parent_hash) .fetch( &runtime::storage() .authority_members() .incoming_authorities(), - Some(parent_hash), ) .await? .unwrap_or_default(); @@ -287,11 +268,11 @@ pub async fn online(data: &Data) -> Result<(), anyhow::Error> { let outgoing_authorities = client .storage() + .at(parent_hash) .fetch( &runtime::storage() .authority_members() .outgoing_authorities(), - Some(parent_hash), ) .await? .unwrap_or_default(); @@ -311,7 +292,7 @@ pub async fn online(data: &Data) -> Result<(), anyhow::Error> { } /// submit a smith certification and track progress -pub async fn cert(data: &Data, receiver: u32) -> Result<(), anyhow::Error> { +pub async fn cert(data: &Data, receiver: IdtyId) -> Result<(), anyhow::Error> { let progress = submit_call( data, &runtime::tx() @@ -324,7 +305,7 @@ pub async fn cert(data: &Data, receiver: u32) -> Result<(), anyhow::Error> { } let events = track_progress(progress).await?; // look for the expected event - look_event::<runtime::smith_cert::events::NewCert>(&events)?; - look_event::<runtime::smith_cert::events::RenewedCert>(&events)?; + look_event::<runtime::smith_cert::events::NewCert>(data, &events)?; + look_event::<runtime::smith_cert::events::RenewedCert>(data, &events)?; Ok(()) } diff --git a/src/commands/sudo.rs b/src/commands/sudo.rs index 7b7b5053687eb01b839ce08b5535a2ad0969e028..afd497bc4ecbf3057888b110819dae17eceea173 100644 --- a/src/commands/sudo.rs +++ b/src/commands/sudo.rs @@ -1,10 +1,53 @@ use crate::*; + +/// define sudo subcommands +#[derive(Clone, Default, Debug, clap::Parser)] +pub enum Subcommand { + /// Nothing + #[default] + #[clap(hide = true)] + Nothing, + /// set sudo keys + SetKey { new_key: AccountId }, + /// force set distance status to DistanceStatus::Valid + SetDistanceOk { identity: IdtyId }, +} + +/// handle smith commands +pub async fn handle_command(data: Data, command: Subcommand) -> Result<(), GcliError> { + let data = data.build_client().await?; + match command { + Subcommand::Nothing => todo!(), + Subcommand::SetKey { new_key } => { + set_key(&data, new_key).await?; + } + Subcommand::SetDistanceOk { identity } => { + set_distance_ok(&data, identity).await?; + } + }; + + Ok(()) +} + + /// set sudo key pub async fn set_key(data: &Data, new_key: AccountId) -> Result<(), subxt::Error> { submit_call_and_look_event::< runtime::sudo::events::KeyChanged, - StaticTxPayload<runtime::sudo::calls::SetKey>, + Payload<runtime::sudo::calls::types::SetKey>, >(data, &runtime::tx().sudo().set_key(new_key.into())) .await } + + +/// set distance ok +pub async fn set_distance_ok(data: &Data, identity: IdtyId) -> Result<(), subxt::Error> { + let inner = runtime::distance::Call::force_set_distance_status { identity, status: Some((data.address(), runtime::runtime_types::pallet_distance::types::DistanceStatus::Valid)) }; + let inner = runtime::Call::Distance(inner); + submit_call_and_look_event::< + runtime::sudo::events::Sudid, + Payload<runtime::sudo::calls::types::Sudo>, + >(data, &runtime::tx().sudo().sudo(inner.into())) + .await +} diff --git a/src/commands/transfer.rs b/src/commands/transfer.rs index 555c05e7b428b76f75a848bbd153fe7887023feb..b0ce4549f7770bafffa83c2c277f4798b9f50621 100644 --- a/src/commands/transfer.rs +++ b/src/commands/transfer.rs @@ -16,7 +16,7 @@ pub async fn transfer( (true, false) => { submit_call_and_look_event::< runtime::balances::events::Transfer, - StaticTxPayload<runtime::balances::calls::TransferKeepAlive>, + Payload<runtime::balances::calls::types::TransferKeepAlive>, >( data, &runtime::tx() @@ -28,7 +28,7 @@ pub async fn transfer( (false, false) => { submit_call_and_look_event::< runtime::balances::events::Transfer, - StaticTxPayload<runtime::balances::calls::Transfer>, + Payload<runtime::balances::calls::types::Transfer>, >( data, &runtime::tx().balances().transfer(dest.into(), balance), @@ -38,7 +38,7 @@ pub async fn transfer( (true, true) => { submit_call_and_look_event::< runtime::balances::events::Transfer, - StaticTxPayload<runtime::universal_dividend::calls::TransferUdKeepAlive>, + Payload<runtime::universal_dividend::calls::types::TransferUdKeepAlive>, >( data, &runtime::tx() @@ -50,7 +50,7 @@ pub async fn transfer( (false, true) => { submit_call_and_look_event::< runtime::balances::events::Transfer, - StaticTxPayload<runtime::universal_dividend::calls::TransferUd>, + Payload<runtime::universal_dividend::calls::types::TransferUd>, >( data, &runtime::tx() @@ -81,7 +81,7 @@ pub async fn transfer_multiple( // wrap these calls in a batch call submit_call_and_look_event::< runtime::utility::events::BatchCompleted, - StaticTxPayload<runtime::utility::calls::Batch>, + Payload<runtime::utility::calls::types::Batch>, >(data, &runtime::tx().utility().batch(transactions)) .await } diff --git a/src/commands/ud.rs b/src/commands/ud.rs index 28d7ef4e13826a9d2c1f61a3479b2c0ee9ad8438..50606cb1921c3baed261e7842cb931436082c8fd 100644 --- a/src/commands/ud.rs +++ b/src/commands/ud.rs @@ -9,7 +9,7 @@ pub enum Subcommand { } /// handle ud commands -pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<()> { +pub async fn handle_command(data: Data, command: Subcommand) -> Result<(), GcliError> { // build indexer because it is needed for all subcommands let data = data.build_client().await?; // match subcommand @@ -26,7 +26,7 @@ pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<( pub async fn claim_ud(data: &Data) -> Result<(), subxt::Error> { submit_call_and_look_event::< runtime::universal_dividend::events::UdsClaimed, - StaticTxPayload<runtime::universal_dividend::calls::ClaimUds>, + Payload<runtime::universal_dividend::calls::types::ClaimUds>, >(data, &runtime::tx().universal_dividend().claim_uds()) .await } diff --git a/src/conf.rs b/src/conf.rs index 9801172134129417509ae5b240e2f87421f87da4..0b8f68389e66095fb12292a91864c1bd148495ab 100644 --- a/src/conf.rs +++ b/src/conf.rs @@ -74,10 +74,12 @@ pub enum Subcommand { Show, /// Save config as modified by command line arguments Save, + /// Rest config to default + Default, } /// handle conf command -pub fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<()> { +pub fn handle_command(data: Data, command: Subcommand) -> Result<(), GcliError> { // match subcommand match command { Subcommand::Where => { @@ -92,6 +94,9 @@ pub fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<()> { Subcommand::Save => { confy::store(APP_NAME, None, &data.cfg).expect("unable to write config"); } + Subcommand::Default => { + confy::store(APP_NAME, None, Config::default()).expect("unable to write config"); + } }; Ok(()) diff --git a/src/data.rs b/src/data.rs index 47e0007c3eb94967a17b4860d52b4e1182f62a35..bbeb551ec878aab4ea0a2afabea5d6af7ae6dbb7 100644 --- a/src/data.rs +++ b/src/data.rs @@ -4,10 +4,6 @@ use crate::*; use indexer::Indexer; // consts -pub const SUBSTRATE_MNEMONIC: &str = - "bottom drive obey lake curtain smoke basket hold race lonely fit walk"; -pub const TEST_MNEMONIC: &str = - "pipe paddle ketchup filter life ice feel embody glide quantum ride usage"; pub const LOCAL_DUNITER_ENDPOINT: &str = "ws://localhost:9944"; pub const LOCAL_INDEXER_ENDPOINT: &str = "http://localhost:8080/v1/graphql"; @@ -40,9 +36,9 @@ pub struct Data { // graphql to duniter-indexer pub indexer: Option<Indexer>, // user keypair - pub keypair: Option<Pair>, + pub keypair: Option<KeyPair>, // user identity index - pub idty_index: Option<u32>, + pub idty_index: Option<IdtyId>, // token decimals pub token_decimals: u32, // token symbol @@ -86,13 +82,13 @@ impl Data { pub fn address(&self) -> AccountId { self.cfg.address.clone().expect("an address is needed") } - pub fn keypair(&self) -> Pair { + pub fn keypair(&self) -> KeyPair { match self.keypair.clone() { Some(keypair) => keypair, None => prompt_secret(self.args.secret_format), } } - pub fn idty_index(&self) -> u32 { + pub fn idty_index(&self) -> IdtyId { self.idty_index.expect("must fetch idty index first") } // --- methods --- @@ -148,24 +144,12 @@ impl Data { if let Some(indexer_endpoint) = self.args.indexer.clone() { self.cfg.indexer_endpoint = indexer_endpoint } - // predefined secret + // predefined secret format overwrites secret with mnemonic if self.args.secret_format == SecretFormat::Predefined { match self.args.secret.clone() { None => {} Some(derivation) => { - if derivation.starts_with("test") { - let derivation = match &derivation[..] { - "test1" => "2", - "test2" => "4", - "test3" => "6", - "test4" => "8", - "test5" => "10", - _ => "", - }; - self.cfg.secret = Some(format!("{TEST_MNEMONIC}//{derivation}")); - } else { - self.cfg.secret = Some(format!("{SUBSTRATE_MNEMONIC}//{derivation}")); - } + self.cfg.secret = Some(predefined_mnemonic(&derivation)); } }; } else if let Some(secret) = self.args.secret.clone() { @@ -182,14 +166,23 @@ impl Data { } /// build from config pub fn build_from_config(mut self) -> Self { - // if a secret is defined, build keypair and silently overwrite address - if let Some(secret) = self.cfg.secret.clone() { - let (address, keypair) = - addr_and_pair_from_secret(SecretFormat::Predefined, &secret).unwrap(); - self.cfg.address = Some(address); - self.cfg.secret = Some(secret); + let secret_format = self.args.secret_format; + // prevent incoherent state + if secret_format == SecretFormat::Cesium && self.cfg.secret.is_some() { + panic!("incompatible input: secret arg with cesium format"); + } + // if secret format is cesium, force a prompt now and record keypair + if secret_format == SecretFormat::Cesium { + let keypair = prompt_secret(SecretFormat::Cesium); + self.cfg.address = Some(keypair.address()); self.keypair = Some(keypair); } + // if a secret is defined (format should not be cesium), build keypair and silently overwrite address + if let Some(secret) = self.cfg.secret.clone() { + let keypair = pair_from_secret(secret_format, &secret).expect("invalid secret"); + self.cfg.address = Some(keypair.public().into()); + self.keypair = Some(keypair.into()); + } self } /// build a client from url @@ -226,17 +219,19 @@ impl Data { } /// get issuer index /// needs address and client first - pub async fn fetch_idty_index(mut self) -> Result<Self, anyhow::Error> { + pub async fn fetch_idty_index(mut self) -> Result<Self, GcliError> { self.idty_index = Some( commands::identity::get_idty_index_by_account_id(self.client(), &self.address()) .await? - .ok_or(anyhow::anyhow!("needs to be member to use this command"))?, + .ok_or(GcliError::Logic( + "you need to be member to use this command".to_string(), + ))?, ); Ok(self) } /// get properties pub async fn fetch_system_properties(mut self) -> Result<Self, anyhow::Error> { - let system_properties = self.client().rpc().system_properties().await?; + let system_properties = self.legacy_rpc_methods().await.system_properties().await?; let system_properties = serde_json::from_value::<SystemProperties>( serde_json::Value::Object(system_properties), )?; @@ -257,3 +252,18 @@ impl Data { // ); // ); } + +// legacy methods (see subxt changelog) +use subxt::{ + backend::{legacy::LegacyRpcMethods, rpc::RpcClient}, + config::SubstrateConfig, +}; + +impl Data { + pub async fn legacy_rpc_methods(&self) -> LegacyRpcMethods<SubstrateConfig> { + let rpc_client = RpcClient::from_url(self.cfg.duniter_endpoint.clone()) + .await + .expect("error"); + LegacyRpcMethods::<SubstrateConfig>::new(rpc_client) + } +} diff --git a/src/display.rs b/src/display.rs new file mode 100644 index 0000000000000000000000000000000000000000..5631a07d06962909ceae41095de905e7a72d0a56 --- /dev/null +++ b/src/display.rs @@ -0,0 +1,130 @@ +use crate::*; + +// display events in a friendly manner + +pub trait DisplayEvent { + fn display(&self, data: &Data) -> String; +} +impl DisplayEvent for runtime::universal_dividend::events::UdsClaimed { + fn display(&self, data: &Data) -> String { + format!( + "claimed {} UD, for a total of {}", + self.count, data.format_balance(self.total) + ) + } +} +impl DisplayEvent for runtime::cert::events::NewCert { + fn display(&self, _data: &Data) -> String { + format!("new certification {} → {}", self.issuer, self.receiver) + } +} +impl DisplayEvent for runtime::cert::events::RenewedCert { + fn display(&self, _data: &Data) -> String { + format!("renewed cert {:?}", self) + } +} +impl DisplayEvent for runtime::smith_cert::events::NewCert { + fn display(&self, _data: &Data) -> String { + format!("certified as smith {:?}", self) + } +} +impl DisplayEvent for runtime::smith_cert::events::RenewedCert { + fn display(&self, _data: &Data) -> String { + format!("renewed smith cert {:?}", self) + } +} +impl DisplayEvent for runtime::account::events::AccountUnlinked { + fn display(&self, _data: &Data) -> String { + format!("account unlinked: {}", self.0) + } +} +impl DisplayEvent for runtime::technical_committee::events::Voted { + fn display(&self, _data: &Data) -> String { + format!("voted {:?}", self) + } +} +impl DisplayEvent for runtime::identity::events::IdtyCreated { + fn display(&self, _data: &Data) -> String { + format!("identity created for {} with index {}", self.owner_key, self.idty_index) + } +} +impl DisplayEvent for runtime::identity::events::IdtyConfirmed { + fn display(&self, _data: &Data) -> String { + format!("identity confirmed with name \"{}\" (index {}, owner key {})", self.name, self.idty_index, self.owner_key) + } +} +impl DisplayEvent for runtime::identity::events::IdtyValidated { + fn display(&self, _data: &Data) -> String { + format!("identity validated {:?}", self) + } +} +impl DisplayEvent for runtime::membership::events::MembershipRenewed { + fn display(&self, _data: &Data) -> String { + format!("membership renewed {:?}", self) + } +} +impl DisplayEvent for runtime::identity::events::IdtyRemoved { + fn display(&self, _data: &Data) -> String { + format!("identity removed {:?}", self) + } +} +impl DisplayEvent for runtime::account::events::AccountLinked { + fn display(&self, _data: &Data) -> String { + format!("account {} linked to identity {}", self.who, self.identity) + } +} +impl DisplayEvent for runtime::oneshot_account::events::OneshotAccountCreated { + fn display(&self, _data: &Data) -> String { + format!("oneshot {:?}", self) + } +} +impl DisplayEvent for runtime::oneshot_account::events::OneshotAccountConsumed { + fn display(&self, _data: &Data) -> String { + format!("oneshot {:?}", self) + } +} +impl DisplayEvent for runtime::smith_membership::events::MembershipRequested { + fn display(&self, _data: &Data) -> String { + format!("smith membership requested {:?}", self) + } +} +impl DisplayEvent for runtime::authority_members::events::MemberGoOnline { + fn display(&self, _data: &Data) -> String { + format!("smith went online {:?}", self) + } +} +impl DisplayEvent for runtime::smith_membership::events::MembershipAcquired { + fn display(&self, _data: &Data) -> String { + format!("smith membership aquired {:?}", self) + } +} +impl DisplayEvent for runtime::smith_membership::events::MembershipRenewed { + fn display(&self, _data: &Data) -> String { + format!("membership renewed {:?}", self) + } +} +impl DisplayEvent for runtime::authority_members::events::MemberGoOffline { + fn display(&self, _data: &Data) -> String { + format!("smith went offline {:?}", self) + } +} +impl DisplayEvent for runtime::sudo::events::KeyChanged { + fn display(&self, _data: &Data) -> String { + format!("sudo key changed {:?}", self) + } +} +impl DisplayEvent for runtime::balances::events::Transfer { + fn display(&self, data: &Data) -> String { + format!("transfered {} ({} → {})", data.format_balance(self.amount), self.from, self.to) + } +} +impl DisplayEvent for runtime::utility::events::BatchCompleted { + fn display(&self, _data: &Data) -> String { + format!("batch completed {:?}", self) + } +} +impl DisplayEvent for runtime::sudo::events::Sudid { + fn display(&self, _data: &Data) -> String { + format!("SUDO call succeeded {:?}", self) + } +} diff --git a/src/indexer.rs b/src/indexer.rs index 51677d664cf82429ad9c3325bac9044a8c2ddb40..3f7b0d22586abf1ef05ee6b2fa2227cda6ffae6c 100644 --- a/src/indexer.rs +++ b/src/indexer.rs @@ -118,7 +118,7 @@ pub enum Subcommand { } /// handle indexer commands -pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<()> { +pub async fn handle_command(data: Data, command: Subcommand) -> Result<(), GcliError> { // build indexer because it is needed for all subcommands let mut data = data.build_indexer().await?; // match subcommand diff --git a/src/keys.rs b/src/keys.rs index 5ac176d21c621522c78ed385b0651c2b71b945d0..f646cd61e5b322bba5a0ea2bd2db419cb1dc3139 100644 --- a/src/keys.rs +++ b/src/keys.rs @@ -1,15 +1,12 @@ use crate::*; - use clap::builder::OsStr; +use sr25519::Pair as Sr25519Pair; use std::str::FromStr; -// #[derive(Clone, Copy, Debug, Eq, PartialEq)] -// pub enum NeededKeys { -// None, -// Public, -// Secret, -// } +pub const SUBSTRATE_MNEMONIC: &str = + "bottom drive obey lake curtain smoke basket hold race lonely fit walk"; +/// secret format #[derive(Clone, Copy, Debug, Eq, PartialEq, Default)] pub enum SecretFormat { /// Raw 32B seed @@ -19,8 +16,9 @@ pub enum SecretFormat { Substrate, /// Predefined (Alice, Bob, ...) Predefined, + /// Cesium (scrypt + nacl) + Cesium, } - impl FromStr for SecretFormat { type Err = std::io::Error; @@ -29,113 +27,169 @@ impl FromStr for SecretFormat { "seed" => Ok(SecretFormat::Seed), "substrate" => Ok(SecretFormat::Substrate), "predefined" => Ok(SecretFormat::Predefined), + "cesium" => Ok(SecretFormat::Cesium), _ => Err(std::io::Error::from(std::io::ErrorKind::InvalidInput)), } } } - impl From<SecretFormat> for &'static str { fn from(val: SecretFormat) -> &'static str { match val { SecretFormat::Seed => "seed", SecretFormat::Substrate => "substrate", SecretFormat::Predefined => "predefined", + SecretFormat::Cesium => "cesium", } } } - impl From<SecretFormat> for OsStr { fn from(val: SecretFormat) -> OsStr { OsStr::from(Into::<&str>::into(val)) } } -/// get keypair from given string secret -pub fn pair_from_str(secret_format: SecretFormat, secret: &str) -> anyhow::Result<Pair> { - match secret_format { - SecretFormat::Seed => { - let mut seed = [0; 32]; - hex::decode_to_slice(secret, &mut seed).map_err(|_| anyhow!("Invalid secret"))?; - let pair = Pair::from_seed(&seed); - Ok(pair) +/// wrapper type for keys +pub enum KeyPair { + Sr25519(Sr25519Pair), + Nacl(nacl::sign::Keypair), +} +impl KeyPair { + pub fn address(&self) -> AccountId { + match self { + KeyPair::Sr25519(keypair) => keypair.public().into(), + KeyPair::Nacl(keypair) => keypair.pkey.into(), } - // "predefined" replaces secret before - SecretFormat::Substrate | SecretFormat::Predefined => { - Pair::from_string(secret, None).map_err(|_| anyhow!("Invalid secret")) + } +} +// can not derive clone because nacl does not implement it +impl Clone for KeyPair { + fn clone(&self) -> Self { + match self { + KeyPair::Sr25519(keypair) => KeyPair::Sr25519(keypair.clone()), + KeyPair::Nacl(keypair) => KeyPair::Nacl(nacl::sign::Keypair { + skey: keypair.skey, + pkey: keypair.pkey, + }), } } } +impl From<Sr25519Pair> for KeyPair { + fn from(pair: Sr25519Pair) -> KeyPair { + KeyPair::Sr25519(pair) + } +} +impl From<nacl::sign::Keypair> for KeyPair { + fn from(pair: nacl::sign::Keypair) -> KeyPair { + KeyPair::Nacl(pair) + } +} + +/// get keypair in any possible way +/// at this point, if secret is predefined, it's not replaced yet +pub fn get_keypair( + secret_format: SecretFormat, + secret: Option<&str>, +) -> Result<KeyPair, GcliError> { + match (secret_format, secret) { + (SecretFormat::Cesium, None) => Ok(prompt_secret(SecretFormat::Cesium)), + (SecretFormat::Predefined, Some(deriv)) => pair_from_predefined(deriv).map(|v| v.into()), + (_, Some(secret)) => Ok(pair_from_secret(secret_format, secret)?.into()), + _ => Err(GcliError::Logic( + "can not get keypair from available options".to_string(), + )), + } +} -/// get keypair and address from given secret string -pub fn addr_and_pair_from_secret( +/// get keypair from given secret +/// if secret is predefined, secret should contain the predefined value +pub fn pair_from_secret( secret_format: SecretFormat, secret: &str, -) -> anyhow::Result<(AccountId, Pair)> { - let pair = pair_from_str(secret_format, secret)?; - let address = pair.public().into(); - Ok((address, pair)) +) -> Result<Sr25519Pair, GcliError> { + match secret_format { + SecretFormat::Substrate => pair_from_str(secret), + SecretFormat::Predefined => pair_from_str(secret), /* if predefined, secret arg is replaced in config */ + SecretFormat::Seed => pair_from_seed(secret), + SecretFormat::Cesium => Err(GcliError::Logic( + "cesium format incompatible with single secret".to_string(), + )), + } +} + +/// get keypair from given string secret +pub fn pair_from_str(secret: &str) -> Result<Sr25519Pair, GcliError> { + Sr25519Pair::from_string(secret, None) + .map_err(|_| GcliError::Input("Invalid secret".to_string())) +} + +/// get keypair from given seed +pub fn pair_from_seed(secret: &str) -> Result<Sr25519Pair, GcliError> { + let mut seed = [0; 32]; + hex::decode_to_slice(secret, &mut seed) + .map_err(|_| GcliError::Input("Invalid secret".to_string()))?; + let pair = Sr25519Pair::from_seed(&seed); + Ok(pair) +} + +/// get mnemonic from predefined derivation path +pub fn predefined_mnemonic(deriv: &str) -> String { + format!("{SUBSTRATE_MNEMONIC}//{deriv}") +} + +/// get keypair from predefined secret +pub fn pair_from_predefined(deriv: &str) -> Result<Sr25519Pair, GcliError> { + pair_from_str(&predefined_mnemonic(deriv)) +} + +/// get keypair from Cesium id/pwd +pub fn pair_from_cesium(id: String, pwd: String) -> nacl::sign::Keypair { + let params = scrypt::Params::new(12u8, 16u32, 1u32, 32).unwrap(); + let seed = &mut [0u8; 32]; + scrypt::scrypt(&pwd.into_bytes(), &id.into_bytes(), ¶ms, seed).unwrap(); + nacl::sign::generate_keypair(seed) } /// ask user to input a secret -pub fn prompt_secret(secret_format: SecretFormat) -> Pair { +pub fn prompt_secret_substrate() -> Sr25519Pair { loop { - match pair_from_str( - secret_format, - &rpassword::prompt_password(format!("Secret key ({secret_format:?}): ")).unwrap(), - ) { + let mnemonic = &rpassword::prompt_password("Mnemonic: ").unwrap(); + match pair_from_str(mnemonic) { Ok(pair) => return pair, Err(_) => println!("Invalid secret"), } } } -// /// get keys with interactive prompt if needed -// pub fn get_keys( -// secret_format: SecretFormat, -// accout_id: Option<AccountId>, -// secret: &Option<String>, -// needed_keys: NeededKeys, -// ) -> anyhow::Result<(Option<AccountId>, Option<Pair>)> { -// // Get from args -// let mut account_id = match (accout_id, secret) { -// // both are defined, check that they match. -// // if they do not match, use secret -// (Some(accout_id), Some(secret)) => { -// let pair = pair_from_str(secret_format, secret)?; -// let secret_address = pair.public().into(); -// if accout_id != secret_address { -// println!("Secret ({secret_address}) and address ({accout_id}) do not match, using secret"); -// } -// return Ok((Some(secret_address), Some(pair))); -// } -// // only secret, build both -// (None, Some(secret)) => { -// let pair = pair_from_str(secret_format, secret)?; -// return Ok((Some(pair.public().into()), Some(pair))); -// } -// // only address -// (Some(accout_id), None) => Some(accout_id), -// // none of them -// (None, None) => None, -// }; - -// // Prompt -// if needed_keys == NeededKeys::Secret -// || (account_id.is_none() && needed_keys == NeededKeys::Public) -// { -// loop { -// let pair = prompt_secret(secret_format); - -// if let Some(account_id) = &account_id { -// if account_id != &pair.public().into() { -// println!("Secret and address do not match."); -// } -// } else { -// account_id = Some(pair.public().into()); -// return Ok((account_id, Some(pair))); -// } -// } -// } - -// Ok((account_id, None)) -// } +/// ask user pass (Cesium format) +pub fn prompt_secret_cesium() -> nacl::sign::Keypair { + let id = rpassword::prompt_password("Cesium id: ").unwrap(); + let pwd = rpassword::prompt_password("Cesium password: ").unwrap(); + pair_from_cesium(id, pwd) +} + +/// ask user to input a seed +pub fn prompt_seed() -> Sr25519Pair { + loop { + let seed = &rpassword::prompt_password("Seed: ").unwrap(); + match pair_from_seed(seed) { + Ok(pair) => return pair, + Err(_) => println!("Invalid seed"), + } + } +} + +/// ask user pass (Cesium format) +pub fn prompt_predefined() -> Sr25519Pair { + let deriv = rpassword::prompt_password("Enter derivation path: ").unwrap(); + pair_from_predefined(&deriv).expect("invalid secret") +} + +/// ask user secret in relevant format +pub fn prompt_secret(secret_format: SecretFormat) -> KeyPair { + match secret_format { + SecretFormat::Substrate => prompt_secret_substrate().into(), + SecretFormat::Cesium => prompt_secret_cesium().into(), + SecretFormat::Seed => prompt_seed().into(), + SecretFormat::Predefined => prompt_predefined().into(), + } +} diff --git a/src/main.rs b/src/main.rs index 1c90aacc3cbf9037f90b0a032c2d2d89ffe1f39f..33910a75db12b475c1e3ea6bbafca302e513d766 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ mod cache; mod commands; mod conf; mod data; +mod display; mod indexer; mod keys; mod runtime_config; @@ -14,11 +15,13 @@ use data::*; use keys::*; use runtime_config::*; use serde::Deserialize; -use sp_core::{sr25519::Pair, Pair as _}; +use display::DisplayEvent; use subxt::{ blocks::ExtrinsicEvents, + config::DefaultExtrinsicParamsBuilder, events::StaticEvent, - tx::{BaseExtrinsicParamsBuilder, PairSigner, StaticTxPayload, TxPayload, TxStatus}, + ext::sp_core::{sr25519, Pair as _}, + tx::{PairSigner, Payload, TxPayload, TxStatus}, }; use utils::*; @@ -62,7 +65,7 @@ pub enum Subcommand { /// Nothing #[default] #[clap(hide = true)] - DoNothing, + Nothing, /// Account (balance, transfer...) #[clap(subcommand)] Account(commands::account::Subcommand), @@ -72,6 +75,10 @@ pub enum Subcommand { /// Smith (certify, go-online, go-offline...) #[clap(subcommand)] Smith(commands::smith::Subcommand), + /// Sudo (set key, sudo calls...) + #[clap(hide = true)] + #[clap(subcommand)] + Sudo(commands::sudo::Subcommand), /// Tech (list members, proposals, vote...) #[clap(subcommand)] Tech(commands::collective::Subcommand), @@ -90,6 +97,9 @@ pub enum Subcommand { /// Config (show, save...) #[clap(subcommand)] Config(conf::Subcommand), + /// Cesium + #[clap(subcommand, hide = true)] + Cesium(commands::cesium::Subcommand), } /// main function @@ -102,8 +112,8 @@ async fn main() -> Result<(), GcliError> { let data = Data::new(Args::parse()); // match subcommands - match data.args.subcommand.clone() { - Subcommand::DoNothing => Ok(()), + let result = match data.args.subcommand.clone() { + Subcommand::Nothing => Ok(()), Subcommand::Account(subcommand) => { commands::account::handle_command(data, subcommand).await } @@ -111,6 +121,7 @@ async fn main() -> Result<(), GcliError> { commands::identity::handle_command(data, subcommand).await } Subcommand::Smith(subcommand) => commands::smith::handle_command(data, subcommand).await, + Subcommand::Sudo(subcommand) => commands::sudo::handle_command(data, subcommand).await, Subcommand::Tech(subcommand) => { commands::collective::handle_command(data, subcommand).await } @@ -123,6 +134,13 @@ async fn main() -> Result<(), GcliError> { } Subcommand::Indexer(subcommand) => indexer::handle_command(data, subcommand).await, Subcommand::Config(subcommand) => conf::handle_command(data, subcommand), + Subcommand::Cesium(subcommand) => commands::cesium::handle_command(data, subcommand).await, + }; + if let Err(ref e) = result { + println!("{}", e) } - .map_err(|e| dbg!(e).into()) + println!(""); + // still return result for detailed error message + result + // Ok(()) } diff --git a/src/runtime_config.rs b/src/runtime_config.rs index 509c78551328ac90d72f713fe39f868bbfeb096b..f20d875010c7cc86cd583719387687bcf4224869 100644 --- a/src/runtime_config.rs +++ b/src/runtime_config.rs @@ -4,37 +4,30 @@ runtime_metadata_path = "res/metadata.scale", derive_for_all_types = "Debug" )] -pub mod runtime { - // IF NEEDED - // #[subxt(substitute_type = "sp_core::sr25519::Signature")] - // use crate::runtime::runtime_types::sp_core::sr25519::Signature; -} +pub mod runtime {} // declare custom types pub type Client = subxt::OnlineClient<Runtime>; -pub type AccountId = subxt::ext::sp_runtime::AccountId32; +pub type AccountId = subxt::utils::AccountId32; +pub type IdtyId = u32; +pub type BlockNumber = u32; pub type TxProgress = subxt::tx::TxProgress<Runtime, Client>; pub type Balance = u64; pub type AccountData = - runtime::runtime_types::pallet_duniter_account::types::AccountData<Balance, u32>; + runtime::runtime_types::pallet_duniter_account::types::AccountData<Balance, IdtyId>; pub type AccountInfo = runtime::runtime_types::frame_system::AccountInfo<u32, AccountData>; pub type Hash = sp_core::H256; // declare runtime types pub enum Runtime {} impl subxt::config::Config for Runtime { - type Index = u32; - type BlockNumber = u32; type Hash = Hash; - type Hashing = subxt::ext::sp_runtime::traits::BlakeTwo256; type AccountId = AccountId; - type Address = subxt::ext::sp_runtime::MultiAddress<Self::AccountId, u32>; - type Header = subxt::ext::sp_runtime::generic::Header< - Self::BlockNumber, - subxt::ext::sp_runtime::traits::BlakeTwo256, - >; - type Signature = subxt::ext::sp_runtime::MultiSignature; - type ExtrinsicParams = subxt::tx::BaseExtrinsicParams<Self, Tip>; + type Address = sp_runtime::MultiAddress<Self::AccountId, u32>; + type Signature = sp_runtime::MultiSignature; + type Hasher = subxt::config::substrate::BlakeTwo256; + type Header = subxt::config::substrate::SubstrateHeader<BlockNumber, Self::Hasher>; + type ExtrinsicParams = subxt::config::DefaultExtrinsicParams<Self>; } // Tip for transaction fee diff --git a/src/utils.rs b/src/utils.rs index d3077f78708fde761f038ac5b6bcb05613dcf235..0db801847d4c336c64f812f2d4ba65982a107472 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -6,14 +6,14 @@ pub async fn track_progress( mut progress: TxProgress, ) -> Result<ExtrinsicEvents<Runtime>, subxt::Error> { loop { - if let Some(status) = progress.next_item().await { + if let Some(status) = progress.next().await { match status? { - TxStatus::Ready => { + TxStatus::Validated => { println!("transaction submitted to the network, waiting 6 seconds..."); } - TxStatus::InBlock(in_block) => break in_block, - TxStatus::Invalid => { - println!("Invalid"); + TxStatus::InBestBlock(in_block) => break in_block, + TxStatus::Invalid { message } => { + println!("Invalid {message}"); } _ => continue, } @@ -24,12 +24,15 @@ pub async fn track_progress( } /// generic extrinsic submitter -pub async fn submit_call_and_look_event<E: std::fmt::Debug + StaticEvent, Call: TxPayload>( +pub async fn submit_call_and_look_event< + E: std::fmt::Debug + StaticEvent + DisplayEvent, + Payload: TxPayload, +>( data: &Data, - call: &Call, + payload: &Payload, ) -> Result<(), subxt::Error> { // submit call - let progress = submit_call(data, call).await?; + let progress = submit_call(data, payload).await?; // if no wait, return immediately if data.args.no_wait { return Ok(()); @@ -37,30 +40,47 @@ pub async fn submit_call_and_look_event<E: std::fmt::Debug + StaticEvent, Call: // collect events let events = track_progress(progress).await?; // print given event if there - look_event::<E>(&events) + look_event::<E>(data, &events) } /// submit call -pub async fn submit_call<Call: TxPayload>( +pub async fn submit_call<Payload: TxPayload>( data: &Data, - call: &Call, + payload: &Payload, ) -> Result<TxProgress, subxt::Error> { - data.client() - .tx() - .sign_and_submit_then_watch( - call, - &PairSigner::new(data.keypair()), - BaseExtrinsicParamsBuilder::new(), - ) - .await + match data.keypair() { + // sr25519 key pair + KeyPair::Sr25519(keypair) => { + data.client() + .tx() + .sign_and_submit_then_watch_default( + payload, + &PairSigner::<Runtime, sp_core::sr25519::Pair>::new(keypair), + ) + .await + } + // nacl key pair + KeyPair::Nacl(keypair) => { + data.client() + .tx() + .sign_and_submit_then_watch_default( + payload, + &commands::cesium::CesiumSigner::new(keypair), + ) + .await + } + } } /// look event -pub fn look_event<E: std::fmt::Debug + StaticEvent>( +pub fn look_event<E: std::fmt::Debug + StaticEvent + DisplayEvent>( + data: &Data, events: &ExtrinsicEvents<Runtime>, ) -> Result<(), subxt::Error> { if let Some(e) = events.find_first::<E>()? { - println!("{e:?}"); + println!("{}", e.display(data)); + } else { + println!("(no event of type {})", std::any::type_name::<E>()) } Ok(()) } @@ -76,12 +96,21 @@ pub enum GcliError { Indexer(String), /// logic error (illegal operation or security) Logic(String), - /// error coming from anyhow + /// input error + Input(String), + /// error coming from anyhow (to be removed) Anyhow(anyhow::Error), } impl std::fmt::Display for GcliError { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - write!(f, "{:?}", self) + match self { + // prettier runtime error + GcliError::Subxt(subxt::Error::Runtime(e)) => { + write!(f, "{e}") + } + // debug log for detailed error + _ => write!(f, "{:?}", self), + } } } impl std::error::Error for GcliError {} @@ -95,3 +124,8 @@ impl From<anyhow::Error> for GcliError { GcliError::Anyhow(e) } } +impl From<confy::ConfyError> for GcliError { + fn from(e: confy::ConfyError) -> GcliError { + GcliError::Anyhow(e.into()) + } +}