diff --git a/Cargo.lock b/Cargo.lock index 7ef4224..4514e20 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,7 +21,7 @@ checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", - "cpufeatures 0.2.17", + "cpufeatures", ] [[package]] @@ -78,16 +78,12 @@ dependencies = [ "ed25519-bip32", "hex", "hmac", - "irpc", - "irpc-derive", - "postcard", "rand 0.8.6", "secp256k1", "serde", "serde_json", "sha2", "thiserror 2.0.18", - "tokio", "zeroize", ] @@ -123,9 +119,9 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +checksum = "f02882884d3e1bc524fb12c79f107f6ad0e1cfd498c536ffb494301740995dfe" [[package]] name = "asn1-rs" @@ -133,7 +129,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ - "asn1-rs-derive 0.5.1", + "asn1-rs-derive", "asn1-rs-impl", "displaydoc", "nom", @@ -143,22 +139,6 @@ dependencies = [ "time", ] -[[package]] -name = "asn1-rs" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f43a50ac4fdca5df8e885c21b835997f0a1cdee65494a6847694a98652d9d8" -dependencies = [ - "asn1-rs-derive 0.6.0", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror 2.0.18", - "time", -] - [[package]] name = "asn1-rs-derive" version = "0.5.1" @@ -171,18 +151,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "asn1-rs-derive" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - [[package]] name = "asn1-rs-impl" version = "0.2.0" @@ -229,15 +197,6 @@ dependencies = [ "rustc_version", ] -[[package]] -name = "atomic-polyfill" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" -dependencies = [ - "critical-section", -] - [[package]] name = "atomic-waker" version = "1.1.2" @@ -332,20 +291,11 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "bit-vec" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" -dependencies = [ - "serde", -] - [[package]] name = "bitcoin_hashes" -version = "0.14.100" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9901a56e133a1fc86eeb1113e2591f45f4682451ca893bff494d2f88918e3f" +checksum = "4ed83caece3afc59919481b33b472e1432d1abc4641ed9100be142ef5110b406" dependencies = [ "hex-conservative", ] @@ -358,9 +308,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.12.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84d7ced0ae9557296835c32bf1b1e02b44c746701f898460fb000d7eaa84f00a" +checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" [[package]] name = "block-buffer" @@ -391,15 +341,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" [[package]] name = "cc" -version = "1.2.63" +version = "1.2.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f" +checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96" dependencies = [ "find-msvc-tools", "jobserver", @@ -433,18 +383,7 @@ checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", "cipher", - "cpufeatures 0.2.17", -] - -[[package]] -name = "chacha20" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "rand_core 0.10.1", + "cpufeatures", ] [[package]] @@ -513,15 +452,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "convert_case" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "cordyceps" version = "0.3.4" @@ -567,15 +497,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cpufeatures" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" -dependencies = [ - "libc", -] - [[package]] name = "crc" version = "3.4.0" @@ -639,7 +560,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16182b4f39a82ec8a6851155cc4c0cda3065bb1db33651726a29e1951de0f009" dependencies = [ "aead", - "chacha20 0.9.1", + "chacha20", "crypto_secretbox", "curve25519-dalek", "salsa20", @@ -655,7 +576,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d6cf87adf719ddf43a805e92c6870a531aedda35ff640442cbaf8674e141e1" dependencies = [ "aead", - "chacha20 0.9.1", + "chacha20", "cipher", "generic-array", "poly1305", @@ -686,7 +607,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures", "curve25519-dalek-derive", "digest", "fiat-crypto", @@ -732,21 +653,7 @@ version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" dependencies = [ - "asn1-rs 0.6.2", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - -[[package]] -name = "der-parser" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" -dependencies = [ - "asn1-rs 0.7.2", + "asn1-rs", "displaydoc", "nom", "num-bigint", @@ -770,9 +677,6 @@ name = "deranged" version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" -dependencies = [ - "powerfmt", -] [[package]] name = "derive_more" @@ -780,16 +684,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" dependencies = [ - "derive_more-impl 1.0.0", -] - -[[package]] -name = "derive_more" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" -dependencies = [ - "derive_more-impl 2.1.1", + "derive_more-impl", ] [[package]] @@ -804,20 +699,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "derive_more-impl" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn", - "unicode-xid", -] - [[package]] name = "diatomic-waker" version = "0.2.3" @@ -937,17 +818,6 @@ dependencies = [ "syn", ] -[[package]] -name = "enum-assoc" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed8956bd5c1f0415200516e78ff07ec9e16415ade83c056c230d7b7ea0d55b7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "enumflags2" version = "0.7.12" @@ -1072,7 +942,7 @@ dependencies = [ "diatomic-waker", "futures-core", "pin-project-lite", - "spin 0.10.0", + "spin", ] [[package]] @@ -1216,18 +1086,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi 6.0.0", - "rand_core 0.10.1", - "wasip2", - "wasip3", - "wasm-bindgen", ] [[package]] @@ -1277,15 +1142,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "hash32" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" -dependencies = [ - "byteorder", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -1303,20 +1159,6 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" -[[package]] -name = "heapless" -version = "0.7.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" -dependencies = [ - "atomic-polyfill", - "hash32", - "rustc_version", - "serde", - "spin 0.9.8", - "stable_deref_trait", -] - [[package]] name = "heck" version = "0.5.0" @@ -1627,18 +1469,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - -[[package]] -name = "identity-hash" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfdd7caa900436d8f13b2346fe10257e0c05c1f1f9e351f4f5d57c03bd5f45da" - [[package]] name = "idna" version = "1.1.0" @@ -1689,8 +1519,6 @@ checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", "hashbrown 0.17.1", - "serde", - "serde_core", ] [[package]] @@ -1749,7 +1577,7 @@ dependencies = [ "crypto_box", "data-encoding", "der", - "derive_more 1.0.0", + "derive_more", "ed25519-dalek", "futures-buffered", "futures-util", @@ -1764,14 +1592,14 @@ dependencies = [ "iroh-quinn-proto", "iroh-quinn-udp", "iroh-relay", - "n0-future 0.1.3", + "n0-future", "netdev", "netwatch", "pin-project", "pkarr", "portmapper", "rand 0.8.6", - "rcgen 0.13.2", + "rcgen", "reqwest", "ring", "rustls", @@ -1791,7 +1619,7 @@ dependencies = [ "url", "wasm-bindgen-futures", "webpki-roots 0.26.11", - "x509-parser 0.16.0", + "x509-parser", "z32", ] @@ -1803,7 +1631,7 @@ checksum = "f91ac4aaab68153d726c4e6b39c30f9f9253743f0e25664e52f4caeb46f48d11" dependencies = [ "curve25519-dalek", "data-encoding", - "derive_more 1.0.0", + "derive_more", "ed25519-dalek", "rand_core 0.6.4", "serde", @@ -1887,7 +1715,7 @@ dependencies = [ "once_cell", "socket2 0.5.10", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1900,7 +1728,7 @@ dependencies = [ "bytes", "cfg_aliases", "data-encoding", - "derive_more 1.0.0", + "derive_more", "getrandom 0.3.4", "hickory-resolver", "http", @@ -1912,7 +1740,7 @@ dependencies = [ "iroh-quinn", "iroh-quinn-proto", "lru 0.12.5", - "n0-future 0.1.3", + "n0-future", "num_enum", "pin-project", "pkarr", @@ -1937,39 +1765,6 @@ dependencies = [ "z32", ] -[[package]] -name = "irpc" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a05799eb70acd04843c327ef939233ccf80f607d30e9ca94857ac7f3d8f18b46" -dependencies = [ - "futures-buffered", - "futures-util", - "irpc-derive", - "n0-error", - "n0-future 0.3.2", - "noq", - "postcard", - "rcgen 0.14.8", - "rustls", - "serde", - "smallvec", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "irpc-derive" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445d81dbc1eed4dab6379bf7f97d12ac28ce8e6f3f7d6660c9f333b7b5d8d03b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "itoa" version = "1.0.18" @@ -2032,13 +1827,12 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.99" +version = "0.3.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142bc4740e452c1e57ade0cbc129f139c9093e354346f0872ef985f4f5cf5f11" +checksum = "03d04c30968dffe80775bd4d7fb676131cd04a1fb46d2686dbffbaec2d9dfd31" dependencies = [ "cfg-if", "futures-util", - "once_cell", "wasm-bindgen", ] @@ -2048,12 +1842,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - [[package]] name = "libc" version = "0.2.186" @@ -2089,9 +1877,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "loom" @@ -2144,9 +1932,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.8.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" +checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" [[package]] name = "minimal-lexical" @@ -2182,27 +1970,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "n0-error" -version = "1.0.0-rc.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "223e946a84aa91644507a6b7865cfebbb9a231ace499041c747ab0fd30408212" -dependencies = [ - "n0-error-macros", - "spez", -] - -[[package]] -name = "n0-error-macros" -version = "1.0.0-rc.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "565305a21e6b3bf26640ad98f05a0fda12d3ab4315394566b52a7bddb8b34828" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "n0-future" version = "0.1.3" @@ -2210,28 +1977,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bb0e5d99e681ab3c938842b96fcb41bf8a7bb4bfdb11ccbd653a7e83e06c794" dependencies = [ "cfg_aliases", - "derive_more 1.0.0", - "futures-buffered", - "futures-lite", - "futures-util", - "js-sys", - "pin-project", - "send_wrapper", - "tokio", - "tokio-util", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-time", -] - -[[package]] -name = "n0-future" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ab99dfb861450e68853d34ae665243a88b8c493d01ba957321a1e9b2312bbe" -dependencies = [ - "cfg_aliases", - "derive_more 2.1.1", + "derive_more", "futures-buffered", "futures-lite", "futures-util", @@ -2306,7 +2052,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0800eae8638a299eaa67476e1c6b6692922273e0f7939fd188fc861c837b9cd2" dependencies = [ "anyhow", - "bitflags 2.12.1", + "bitflags 2.13.0", "byteorder", "libc", "log", @@ -2362,11 +2108,11 @@ dependencies = [ "atomic-waker", "bytes", "cfg_aliases", - "derive_more 1.0.0", + "derive_more", "iroh-quinn-udp", "js-sys", "libc", - "n0-future 0.1.3", + "n0-future", "nested_enum_utils", "netdev", "netlink-packet-core", @@ -2402,68 +2148,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "noq" -version = "1.0.0-rc.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198b99fc085a5db1f7d259edb5ede8311e59f28cdd2687920b4313613d21a73f" -dependencies = [ - "bytes", - "cfg_aliases", - "derive_more 2.1.1", - "noq-proto", - "noq-udp", - "pin-project-lite", - "rustc-hash", - "rustls", - "socket2 0.6.4", - "thiserror 2.0.18", - "tokio", - "tokio-stream", - "tracing", - "web-time", -] - -[[package]] -name = "noq-proto" -version = "1.0.0-rc.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab0ac774795ce1e42a7e61266e71f3be8110210630441169ac8dda403dd23f1" -dependencies = [ - "aes-gcm", - "bytes", - "derive_more 2.1.1", - "enum-assoc", - "getrandom 0.4.2", - "identity-hash", - "lru-slab", - "rand 0.10.1", - "rand_pcg", - "ring", - "rustc-hash", - "rustls", - "rustls-pki-types", - "slab", - "sorted-index-buffer", - "thiserror 2.0.18", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "noq-udp" -version = "1.0.0-rc.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c1520eacd33fd6b009e2e70116b05508ade51db5e0d315ff8bf6b702148c2b" -dependencies = [ - "cfg_aliases", - "libc", - "socket2 0.6.4", - "tracing", - "windows-sys 0.61.2", -] - [[package]] name = "ntimestamp" version = "1.0.0" @@ -2550,16 +2234,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" dependencies = [ - "asn1-rs 0.6.2", -] - -[[package]] -name = "oid-registry" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7" -dependencies = [ - "asn1-rs 0.7.2", + "asn1-rs", ] [[package]] @@ -2812,7 +2487,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ - "cpufeatures 0.2.17", + "cpufeatures", "opaque-debug", "universal-hash", ] @@ -2824,7 +2499,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures", "opaque-debug", "universal-hash", ] @@ -2843,7 +2518,7 @@ checksum = "7d6db66007eac4a0ec8331d0d20c734bd64f6445d64bbaf0d0a27fea7a054e36" dependencies = [ "base64", "bytes", - "derive_more 1.0.0", + "derive_more", "futures-lite", "futures-util", "hyper-util", @@ -2875,7 +2550,6 @@ dependencies = [ "cobs", "embedded-io 0.4.0", "embedded-io 0.6.1", - "heapless", "postcard-derive", "serde", ] @@ -2949,16 +2623,6 @@ dependencies = [ "ucd-parse", ] -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn", -] - [[package]] name = "proc-macro-crate" version = "3.5.0" @@ -3031,14 +2695,14 @@ dependencies = [ "once_cell", "socket2 0.6.4", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] name = "quote" -version = "1.0.45" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" dependencies = [ "proc-macro2", ] @@ -3086,17 +2750,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "rand" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" -dependencies = [ - "chacha20 0.10.0", - "getrandom 0.4.2", - "rand_core 0.10.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -3135,21 +2788,6 @@ dependencies = [ "getrandom 0.3.4", ] -[[package]] -name = "rand_core" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" - -[[package]] -name = "rand_pcg" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" -dependencies = [ - "rand_core 0.10.1", -] - [[package]] name = "rcgen" version = "0.13.2" @@ -3160,21 +2798,7 @@ dependencies = [ "ring", "rustls-pki-types", "time", - "yasna 0.5.2", -] - -[[package]] -name = "rcgen" -version = "0.14.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57f6d249aad744e274e682777a50283a225a32705394ee6d5fcc01efa25e4055" -dependencies = [ - "pem", - "ring", - "rustls-pki-types", - "time", - "x509-parser 0.18.1", - "yasna 0.6.0", + "yasna", ] [[package]] @@ -3183,14 +2807,14 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.12.1", + "bitflags 2.13.0", ] [[package]] name = "regex" -version = "1.12.3" +version = "1.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" dependencies = [ "aho-corasick", "memchr", @@ -3217,9 +2841,9 @@ checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" [[package]] name = "regex-syntax" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "reqwest" @@ -3308,9 +2932,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.40" +version = "0.23.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" +checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f" dependencies = [ "aws-lc-rs", "log", @@ -3469,7 +3093,7 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.12.1", + "bitflags 2.13.0", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -3585,7 +3209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures", "digest", ] @@ -3602,7 +3226,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures", "digest", ] @@ -3652,7 +3276,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dee851d0e5e7af3721faea1843e8015e820a234f81fda3dea9247e15bac9a86a" dependencies = [ - "bitflags 2.12.1", + "bitflags 2.13.0", ] [[package]] @@ -3669,9 +3293,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" [[package]] name = "snafu" @@ -3714,32 +3338,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "sorted-index-buffer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea06cc588e43c632923a55450401b8f25e628131571d4e1baea1bdfdb2b5ed06" - -[[package]] -name = "spez" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87e960f4dca2788eeb86bbdde8dd246be8948790b7618d656e68f9b720a86e8" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - [[package]] name = "spin" version = "0.10.0" @@ -3832,9 +3430,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.117" +version = "2.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" dependencies = [ "proc-macro2", "quote", @@ -3867,7 +3465,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.12.1", + "bitflags 2.13.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -3939,12 +3537,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.47" +version = "0.3.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +checksum = "85c17d80feb7334b40c484e45ed1a5273dfd8bfda537c3be2e74a06a6686f327" dependencies = [ "deranged", - "itoa", "js-sys", "num-conv", "powerfmt", @@ -3955,15 +3552,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.27" +version = "0.2.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +checksum = "dcef1a61bdb119096e153208ec5cbec23944ce8bca13be5c7f60c634f7403935" dependencies = [ "num-conv", "time-core", @@ -4172,7 +3769,7 @@ version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ - "bitflags 2.12.1", + "bitflags 2.13.0", "bytes", "futures-util", "http", @@ -4300,12 +3897,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" - [[package]] name = "unicode-xid" version = "0.2.6" @@ -4353,7 +3944,7 @@ version = "1.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "144d6b123cef80b301b8f72a9e2ca4370ddec21950d0a103dd22c437006d2db7" dependencies = [ - "getrandom 0.4.2", + "getrandom 0.4.3", "js-sys", "wasm-bindgen", ] @@ -4397,27 +3988,18 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.3+wasi-0.2.9" +version = "1.0.4+wasi-0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" dependencies = [ - "wit-bindgen 0.57.1", -] - -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen 0.51.0", + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.122" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed04576f974d2b2fba0f38c51dbc5518011e38c36bf1143164be765528fd409" +checksum = "8ddb3f79143bced6de84270411622a2699cee572fc0875aeaf1e7867cf9fca1a" dependencies = [ "cfg-if", "once_cell", @@ -4428,9 +4010,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.72" +version = "0.4.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9473dbd2991ae90b6291c3c32c30c6187ac49aa32f9905d1cce280ec1e110b0f" +checksum = "503b14d284f2c8dac03b819967e155ea753f573586193b2b2c95990cb5d69280" dependencies = [ "js-sys", "wasm-bindgen", @@ -4438,9 +4020,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.122" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916151b09da36bd82f6615cbf3a419e2f0ba23a03c6160e8e92eb6bd4aa1dec6" +checksum = "4e21a184b13fb19e157296e2c46056aec9092264fab83e4ba59e68c61b323c3d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4448,9 +4030,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.122" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "299047362ccbfce148b67ab7e73349f77748e00c8296f9542adfad2ad82c5c5e" +checksum = "fecefd9c35bd935a20fc3fc344b5f29138961e4f47fb03297d88f2587afb5ebd" dependencies = [ "bumpalo", "proc-macro2", @@ -4461,35 +4043,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.122" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a929b2c61f11ba3e9bc35b50c1f25cb38e0e892c0c231ae2b8cf78d5dad4437" +checksum = "23939e44bb9a5d7576fa2b563dc2e136628f1224e88a8deed09e04858b77871f" dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap", - "wasm-encoder", - "wasmparser", -] - [[package]] name = "wasm-streams" version = "0.4.2" @@ -4503,23 +4063,11 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags 2.12.1", - "hashbrown 0.15.5", - "indexmap", - "semver", -] - [[package]] name = "web-sys" -version = "0.3.99" +version = "0.3.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621441cfc37b84979402712047321980c178f299193a3589d05b99e8763436" +checksum = "a6430a72df5eb332242960fe84b3002a241163998241eb596d4f739b9757061d" dependencies = [ "js-sys", "wasm-bindgen", @@ -4745,6 +4293,24 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + [[package]] name = "windows-sys" version = "0.61.2" @@ -4958,100 +4524,12 @@ dependencies = [ "memchr", ] -[[package]] -name = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - [[package]] name = "wit-bindgen" version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck", - "indexmap", - "prettyplease", - "syn", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags 2.12.1", - "indexmap", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] - [[package]] name = "wmi" version = "0.14.5" @@ -5098,35 +4576,17 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" dependencies = [ - "asn1-rs 0.6.2", + "asn1-rs", "data-encoding", - "der-parser 9.0.0", + "der-parser", "lazy_static", "nom", - "oid-registry 0.7.1", + "oid-registry", "rusticata-macros", "thiserror 1.0.69", "time", ] -[[package]] -name = "x509-parser" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d43b0f71ce057da06bc0851b23ee24f3f86190b07203dd8f567d0b706a185202" -dependencies = [ - "asn1-rs 0.7.2", - "data-encoding", - "der-parser 10.0.0", - "lazy_static", - "nom", - "oid-registry 0.8.1", - "ring", - "rusticata-macros", - "thiserror 2.0.18", - "time", -] - [[package]] name = "xml-rs" version = "0.8.28" @@ -5151,16 +4611,6 @@ dependencies = [ "time", ] -[[package]] -name = "yasna" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5f6765e852b9b4dc8e2a76843e4d64d1cea8e79bcde0b6901aea8e7c7f08282" -dependencies = [ - "bit-vec", - "time", -] - [[package]] name = "yoke" version = "0.8.3" @@ -5192,18 +4642,18 @@ checksum = "2164e798d9e3d84ee2c91139ace54638059a3b23e361f5c11781c2c6459bde0f" [[package]] name = "zerocopy" -version = "0.8.50" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b065d4f0e55f82fae73202e189638116a87c55ab6b8e6c2721e13dd9d854ad1" +checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.50" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b631b19d36a892ab55420c92dbc83ccd79274f25be714855d3074aa71cab639" +checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" dependencies = [ "proc-macro2", "quote", @@ -5233,18 +4683,18 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.8.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" dependencies = [ "proc-macro2", "quote", diff --git a/crates/alknet-vault/Cargo.toml b/crates/alknet-vault/Cargo.toml index b92b81f..497d517 100644 --- a/crates/alknet-vault/Cargo.toml +++ b/crates/alknet-vault/Cargo.toml @@ -25,11 +25,7 @@ zeroize = { version = "1", features = ["derive"] } hmac = "0.12" rand = "0.8" base64 = "0.22" -irpc = { workspace = true } -irpc-derive = { workspace = true } -tokio = { version = "1", features = ["sync", "rt", "macros"] } secp256k1 = { version = "0.29", optional = true } [dev-dependencies] -hex = "0.4" -postcard = { version = "1", features = ["alloc"] } \ No newline at end of file +hex = "0.4" \ No newline at end of file diff --git a/crates/alknet-vault/src/cache.rs b/crates/alknet-vault/src/cache.rs index 193b8d2..664a86d 100644 --- a/crates/alknet-vault/src/cache.rs +++ b/crates/alknet-vault/src/cache.rs @@ -309,8 +309,10 @@ mod tests { #[test] fn test_cache_expired_entry_evicted_on_access() { - let mut config = CacheConfig::default(); - config.ttl = Duration::from_millis(1); + let config = CacheConfig { + ttl: Duration::from_millis(1), + ..Default::default() + }; let mut cache = KeyCache::new(config); cache.insert("m/74'/0'/0'/0'", make_cached_key(KeyType::Ed25519)); @@ -323,8 +325,10 @@ mod tests { #[test] fn test_cache_lru_eviction() { - let mut config = CacheConfig::default(); - config.max_entries = 3; + let config = CacheConfig { + max_entries: 3, + ..Default::default() + }; let mut cache = KeyCache::new(config); @@ -345,8 +349,10 @@ mod tests { #[test] fn test_cache_lru_access_reorders() { - let mut config = CacheConfig::default(); - config.max_entries = 3; + let config = CacheConfig { + max_entries: 3, + ..Default::default() + }; let mut cache = KeyCache::new(config); @@ -381,8 +387,10 @@ mod tests { #[test] fn test_evict_expired_removes_only_expired() { - let mut config = CacheConfig::default(); - config.ttl = Duration::from_millis(10); + let config = CacheConfig { + ttl: Duration::from_millis(10), + ..Default::default() + }; let mut cache = KeyCache::new(config); cache.insert("path1", make_cached_key(KeyType::Ed25519)); diff --git a/crates/alknet-vault/src/lib.rs b/crates/alknet-vault/src/lib.rs index dfbaacd..a99a73d 100644 --- a/crates/alknet-vault/src/lib.rs +++ b/crates/alknet-vault/src/lib.rs @@ -25,8 +25,8 @@ //! - [`mnemonic`] — BIP39 mnemonic generation, validation, and seed derivation //! - [`derivation`] — SLIP-0010 Ed25519 HD key derivation and path constants //! - [`encryption`] — AES-256-GCM encrypt/decrypt and `EncryptedData` type -//! - [`protocol`] — `VaultProtocol` irpc message enum, `DerivedKey`, `KeyType` -//! - [`service`] — `VaultService` implementation with Unlock/Lock lifecycle +//! - [`protocol`] — `DerivedKey` and `KeyType` (return types from vault methods) +//! - [`service`] — `VaultServiceHandle` runtime API with Unlock/Lock lifecycle //! - [`ethereum`] — BIP-0032 secp256k1 HD key derivation (behind `secp256k1` feature) pub mod cache; @@ -42,7 +42,8 @@ pub mod ethereum; // Re-export primary public API pub use cache::CacheConfig; pub use derivation::{DerivationError, ExtendedPrivKey, PATHS}; -pub use encryption::{EncryptedData, EncryptionError}; +pub use encryption::CURRENT_KEY_VERSION; +pub use encryption::{EncryptedData, EncryptionError, EncryptionKey}; pub use mnemonic::{Language, Mnemonic, Seed}; -pub use protocol::{DerivedKey, KeyType, VaultMessage, VaultProtocol}; -pub use service::{VaultService, VaultServiceActor, VaultServiceError, VaultServiceHandle}; +pub use protocol::{DerivedKey, KeyType}; +pub use service::{VaultServiceError, VaultServiceHandle}; diff --git a/crates/alknet-vault/src/protocol.rs b/crates/alknet-vault/src/protocol.rs index dd148c4..d4ab611 100644 --- a/crates/alknet-vault/src/protocol.rs +++ b/crates/alknet-vault/src/protocol.rs @@ -1,32 +1,19 @@ -//! VaultProtocol irpc message definition and associated types. +//! Vault key types: `DerivedKey` and `KeyType`. //! -//! This module defines the `VaultProtocol` enum for irpc-based message dispatch. -//! The protocol supports unlock/lock lifecycle, key derivation, -//! and encryption/decryption operations. +//! The vault's dispatch is direct method calls on `VaultServiceHandle` +//! (ADR-025). The types defined here — `DerivedKey`, `KeyType` — are the +//! return types from those methods. There is no `VaultProtocol` enum, no +//! `VaultMessage`, no `VaultServiceActor`, and no remote dispatch capability. //! -//! # Protocol Operation -//! -//! The VaultProtocol follows a lifecycle: the vault starts in a **locked** -//! state where no derivation or encryption operations are possible. The `Unlock` -//! call loads the seed into memory (derived from the mnemonic passphrase). After -//! that, derive and encrypt/decrypt operations are available. The `Lock` call -//! purges the seed and all cached keys. -//! -//! # Wire Format -//! -//! For local (in-process) calls, the protocol uses tokio channels directly. -//! For remote (in-cluster) calls, the protocol is serialized with postcard. -//! For cross-node (call protocol) exposure, the vault is wrapped in an -//! operation that serializes to JSON. +//! The vault is **local-only by construction**. If remote vault access is +//! ever needed, it requires a separate crate that wraps the vault and adds +//! remote transport + auth (ADR-025, OQ-021). use std::fmt; -use irpc::rpc_requests; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use zeroize::Zeroize; -use crate::encryption::EncryptedData; - /// The type of a derived key. #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] pub enum KeyType { @@ -46,10 +33,8 @@ pub enum KeyType { /// by `#[zeroize(drop)]`). /// /// Serialization redacts the `private_key` field for human-readable formats -/// (JSON) for safety, showing `"[REDACTED]"` instead of the key bytes. For -/// binary formats (postcard, used by irpc), the actual bytes are serialized -/// so that remote communication works correctly. Deserialization always reads -/// the full bytes. +/// (JSON) for safety, showing `"[REDACTED]"` instead of the key bytes. +/// Deserialization always reads the full bytes. #[derive(Zeroize, Deserialize)] #[zeroize(drop)] pub struct DerivedKey { @@ -98,115 +83,6 @@ impl Serialize for DerivedKey { } } -/// VaultProtocol message definition. -/// -/// This is the irpc protocol enum that defines all vault operations. -/// The `#[rpc_requests]` macro generates: -/// - **`VaultMessage`**: message enum with `WithChannels` wrappers for each variant -/// - **`Channels`** impls for each wrapper type -/// - **`From`** impls for protocol enum and message enum conversions -/// - **`Service`** and **`RemoteService`** trait impls for remote dispatch -/// -/// # State Requirements -/// -/// All operations except `Unlock` require the vault to be in an **unlocked** -/// state. Calling derive/encrypt/decrypt on a locked vault returns an error. -#[rpc_requests(message = VaultMessage, no_spans)] -#[derive(Debug, Serialize, Deserialize)] -pub enum VaultProtocol { - /// Derive an Ed25519 keypair at the given path. - /// - /// Path format: `m/74'/0'/0'/0'` (SLIP-0010 hardened-only notation). - /// Returns a `DerivedKey` with `KeyType::Ed25519`. - #[rpc(tx = irpc::channel::oneshot::Sender>)] - #[wrap(DeriveEd25519)] - DeriveEd25519 { - /// SLIP-0010 derivation path (e.g., "m/74'/0'/0'/0'"). - path: String, - }, - - /// Derive an AES-256-GCM encryption key at the given path. - /// - /// The default encryption path is `m/74'/2'/0'/0'`. - /// Returns a `DerivedKey` with `KeyType::Aes256Gcm`. - #[rpc(tx = irpc::channel::oneshot::Sender>)] - #[wrap(DeriveEncryptionKey)] - DeriveEncryptionKey { - /// SLIP-0010 derivation path for the encryption key. - path: String, - }, - - /// Derive a secp256k1 (Ethereum) keypair at the given path. - /// - /// The default Ethereum path is `m/44'/60'/0'/0/0`. - /// Returns a `DerivedKey` with `KeyType::Secp256k1`. - #[rpc(tx = irpc::channel::oneshot::Sender>)] - #[wrap(DeriveEthereumKey)] - DeriveEthereumKey { - /// BIP-0032 derivation path (e.g., "m/44'/60'/0'/0/0"). - path: String, - }, - - /// Derive a deterministic password at the given path. - /// - /// Path format: `m/74'/1'/0'/{hash}'` (SLIP-0010 hardened notation). - /// The `length` parameter controls the output length. - #[rpc(tx = irpc::channel::oneshot::Sender, crate::service::VaultServiceError>>)] - #[wrap(DerivePassword)] - DerivePassword { - /// SLIP-0010 derivation path for the password. - path: String, - /// Desired password length in bytes. - length: usize, - }, - - /// Encrypt plaintext using a derived encryption key. - /// - /// The key is derived at the path `m/74'/2'/0'/0'` with the given version. - /// Returns an `EncryptedData` blob suitable for storage. - #[rpc(tx = irpc::channel::oneshot::Sender>)] - #[wrap(Encrypt)] - Encrypt { - /// The plaintext string to encrypt. - plaintext: String, - /// The key version for rotation tracking. - key_version: u32, - }, - - /// Decrypt an `EncryptedData` blob back to plaintext. - /// - /// The key is derived from the seed at the path indicated by the key version. - #[rpc(tx = irpc::channel::oneshot::Sender>)] - #[wrap(Decrypt)] - Decrypt { - /// The encrypted data blob to decrypt. - encrypted: EncryptedData, - }, - - /// Lock the service, purging the seed and all cached derived keys. - /// - /// After locking, no derive/encrypt/decrypt operations are possible - /// until `Unlock` is called again. Calls `zeroize()` on all sensitive - /// material (ADR-038). - #[rpc(tx = irpc::channel::oneshot::Sender>)] - #[wrap(Lock)] - Lock, - - /// Unlock the service with a BIP39 mnemonic and optional passphrase. - /// - /// The mnemonic is the space-separated BIP39 word list. The passphrase is - /// the optional BIP39 password extension (the "25th word"). After unlocking, - /// derive and encrypt/decrypt operations are available. - #[rpc(tx = irpc::channel::oneshot::Sender>)] - #[wrap(Unlock)] - Unlock { - /// The BIP39 mnemonic phrase (space-separated word list). - mnemonic: String, - /// Optional BIP39 passphrase (the "25th word" password extension). - passphrase: Option, - }, -} - #[cfg(test)] mod tests { use super::*; @@ -249,35 +125,6 @@ mod tests { assert!(json.contains("Ed25519"), "JSON must contain key_type"); } - #[test] - fn test_derived_key_serialize_preserves_bytes_postcard() { - let key = make_test_key(); - let bytes = postcard::to_allocvec(&key).unwrap(); - let restored: DerivedKey = postcard::from_bytes(&bytes).unwrap(); - assert_eq!( - restored.private_key, - vec![0xABu8; 32], - "postcard must preserve private_key bytes" - ); - assert_eq!( - restored.public_key, - vec![0xCDu8; 32], - "postcard must preserve public_key bytes" - ); - } - - #[test] - fn test_derived_key_deserialize_preserves_bytes() { - let key = make_test_key(); - let bytes = postcard::to_allocvec(&key.private_key).unwrap(); - let restored: Vec = postcard::from_bytes(&bytes).unwrap(); - assert_eq!( - restored, - vec![0xABu8; 32], - "Deserialization must preserve private_key bytes" - ); - } - #[test] fn test_derived_key_zeroize_on_drop() { let key = DerivedKey { diff --git a/crates/alknet-vault/src/service.rs b/crates/alknet-vault/src/service.rs index c3ffb17..d365d41 100644 --- a/crates/alknet-vault/src/service.rs +++ b/crates/alknet-vault/src/service.rs @@ -1,8 +1,8 @@ -//! VaultService implementation with Unlock/Lock lifecycle. +//! VaultServiceHandle — the sole runtime API for the vault. //! -//! The `VaultService` is the primary runtime interface for key management. -//! It holds the master seed in `Zeroize`-protected memory and provides methods -//! for the Unlock/Lock lifecycle, key derivation, and encryption/decryption. +//! The `VaultServiceHandle` wraps the vault's state in an +//! `Arc>` and provides direct, synchronous method calls +//! for the unlock/lock lifecycle, key derivation, and encryption/decryption. //! //! # Lifecycle //! @@ -25,37 +25,30 @@ //! → vault returns to locked state //! ``` //! -//! # Dispatch Paths +//! # Dispatch //! -//! There are two ways to interact with the vault: -//! -//! 1. **Local (in-process)**: `VaultServiceHandle` wraps `VaultServiceInner` -//! behind `Arc>` and provides direct method calls without serialization. -//! 2. **Remote (in-cluster)**: `VaultServiceActor` processes `VaultMessage` -//! variants from an mpsc channel and dispatches to the handle methods. +//! The vault uses **direct method calls** on `VaultServiceHandle` — no actor, +//! no message enum, no channels, no serialization (ADR-025). The handle is +//! `Arc>` — clone it, share it, call +//! methods directly. All methods are synchronous (no `async`, no `.await`). +//! The vault does not depend on `tokio` (ADR-025). //! //! # Assembly //! -//! The `VaultService` is assembled by the CLI binary. The CLI unlocks the vault -//! at startup and injects derived/decrypted material into operation contexts. -//! No handler crate accesses the vault directly — they receive keys through -//! their operation context or via the call protocol. +//! The `VaultServiceHandle` is assembled by the CLI binary. The CLI unlocks +//! the vault at startup and injects derived/decrypted material into operation +//! contexts. No handler crate accesses the vault directly — they receive keys +//! through their operation context or via the call protocol. use std::sync::{Arc, RwLock}; use base64::engine::general_purpose::URL_SAFE_NO_PAD; use base64::Engine; -use irpc::WithChannels; -use serde::{Deserialize, Serialize}; use crate::cache::{CacheConfig, CachedKey, KeyCache}; use crate::derivation::{self, DerivationError, PATHS}; use crate::encryption::{self, EncryptedData, EncryptionKey}; use crate::mnemonic::{Language, Mnemonic, Seed}; -use crate::protocol::{ - Decrypt, DeriveEd25519, DeriveEncryptionKey, DeriveEthereumKey, DerivePassword, Encrypt, - VaultMessage, VaultProtocol, Unlock, -}; use crate::protocol::{DerivedKey, KeyType}; /// Handle to a running VaultService for local (in-process) use. @@ -80,7 +73,7 @@ struct VaultServiceInner { } /// Errors that can occur during vault operations. -#[derive(Debug, thiserror::Error, Serialize, Deserialize)] +#[derive(Debug, thiserror::Error)] pub enum VaultServiceError { #[error("vault is locked; call Unlock first")] VaultLocked, @@ -206,10 +199,7 @@ impl VaultServiceHandle { }); } - let seed = inner - .seed - .as_ref() - .ok_or(VaultServiceError::VaultLocked)?; + let seed = inner.seed.as_ref().ok_or(VaultServiceError::VaultLocked)?; let key = derivation::derive_path_from_seed(seed.as_bytes(), path)?; let private_key = key.private_key().to_vec(); let public_key = key.public_key().to_vec(); @@ -237,10 +227,7 @@ impl VaultServiceHandle { }); } - let seed = inner - .seed - .as_ref() - .ok_or(VaultServiceError::VaultLocked)?; + let seed = inner.seed.as_ref().ok_or(VaultServiceError::VaultLocked)?; let key = derivation::derive_path_from_seed(seed.as_bytes(), path)?; let private_key = key.private_key().to_vec(); let public_key = key.public_key().to_vec(); @@ -274,10 +261,7 @@ impl VaultServiceHandle { }); } - let seed = inner - .seed - .as_ref() - .ok_or(VaultServiceError::VaultLocked)?; + let seed = inner.seed.as_ref().ok_or(VaultServiceError::VaultLocked)?; let key = crate::ethereum::derive_secp256k1_path(seed.as_bytes(), path)?; let private_key = key.private_key().to_vec(); @@ -299,19 +283,12 @@ impl VaultServiceHandle { } } - pub fn derive_password( - &self, - path: &str, - length: usize, - ) -> Result, VaultServiceError> { + pub fn derive_password(&self, path: &str, length: usize) -> Result, VaultServiceError> { let inner = self.inner.read().unwrap(); if !inner.unlocked { return Err(VaultServiceError::VaultLocked); } - let seed = inner - .seed - .as_ref() - .ok_or(VaultServiceError::VaultLocked)?; + let seed = inner.seed.as_ref().ok_or(VaultServiceError::VaultLocked)?; let key = derivation::derive_path_from_seed(seed.as_bytes(), path)?; let private_key = key.private_key(); @@ -345,10 +322,7 @@ impl VaultServiceHandle { let private_key = if let Some(cached) = inner.cache.get(PATHS::ENCRYPTION) { cached.private_key.clone() } else { - let seed = inner - .seed - .as_ref() - .ok_or(VaultServiceError::VaultLocked)?; + let seed = inner.seed.as_ref().ok_or(VaultServiceError::VaultLocked)?; let derived = derivation::derive_path_from_seed(seed.as_bytes(), PATHS::ENCRYPTION)?; let pk = derived.private_key().to_vec(); let pubk = derived.public_key().to_vec(); @@ -372,10 +346,7 @@ impl VaultServiceHandle { let private_key = if let Some(cached) = inner.cache.get(PATHS::ENCRYPTION) { cached.private_key.clone() } else { - let seed = inner - .seed - .as_ref() - .ok_or(VaultServiceError::VaultLocked)?; + let seed = inner.seed.as_ref().ok_or(VaultServiceError::VaultLocked)?; let derived = derivation::derive_path_from_seed(seed.as_bytes(), PATHS::ENCRYPTION)?; let pk = derived.private_key().to_vec(); let pubk = derived.public_key().to_vec(); @@ -396,166 +367,9 @@ impl Default for VaultServiceHandle { } } -/// The VaultService manages the lifecycle of the master seed and provides -/// secret operations. This is the type used by the irpc service handler. -/// -/// For local (in-process) use, prefer `VaultServiceHandle` which wraps -/// this in thread-safe locks. -pub struct VaultService { - handle: VaultServiceHandle, -} - -impl VaultService { - /// Create a new VaultService in the locked state. - pub fn new() -> Self { - Self { - handle: VaultServiceHandle::new(), - } - } - - /// Get a handle for local (in-process) use. - pub fn handle(&self) -> &VaultServiceHandle { - &self.handle - } -} - -impl Default for VaultService { - fn default() -> Self { - Self::new() - } -} - -/// Actor that processes `VaultMessage` variants and dispatches to `VaultServiceHandle`. -/// -/// The actor runs as a `tokio::task`, receives messages from an mpsc channel, -/// dispatches to the handle methods, and sends responses through oneshot channels. -/// -/// # Usage -/// -/// ```ignore -/// let handle = VaultServiceHandle::new(); -/// let (client, actor) = VaultServiceActor::spawn(handle); -/// tokio::task::spawn(actor.run(rx)); -/// // Use client to send messages -/// ``` -pub struct VaultServiceActor { - handle: VaultServiceHandle, -} - -impl VaultServiceActor { - /// Create a new actor wrapping the given handle. - pub fn new(handle: VaultServiceHandle) -> Self { - Self { handle } - } - - /// Run the actor message loop, processing `VaultMessage` variants. - /// - /// This method runs until the receiver channel is closed. Each message - /// variant is dispatched to the corresponding `VaultServiceHandle` method - /// and the response is sent through the oneshot channel embedded in the message. - pub async fn run(mut self, mut rx: tokio::sync::mpsc::Receiver) { - while let Some(msg) = rx.recv().await { - self.handle_message(msg); - } - } - - /// Spawn the actor as a `tokio::task` and return a `Client` for sending messages. - /// - /// The actor runs on a tokio task and processes messages from the mpsc channel. - /// The returned `Client` can be used to send `VaultMessage` variants - /// to the actor. - pub fn spawn( - handle: VaultServiceHandle, - ) -> (irpc::Client, VaultServiceActor) { - let (tx, rx) = tokio::sync::mpsc::channel(64); - let client = irpc::Client::local(tx); - let actor = Self::new(handle.clone()); - tokio::task::spawn(actor.run(rx)); - (client, Self::new(handle)) - } - - /// Handle a single `VaultMessage` by dispatching to the appropriate handle method. - fn handle_message(&mut self, msg: VaultMessage) { - match msg { - VaultMessage::DeriveEd25519(msg) => { - let WithChannels { inner, tx, .. } = msg; - let DeriveEd25519 { path } = inner; - let result = self.handle.derive_ed25519(&path); - tokio::spawn(async move { - let _ = tx.send(result).await; - }); - } - VaultMessage::DeriveEncryptionKey(msg) => { - let WithChannels { inner, tx, .. } = msg; - let DeriveEncryptionKey { path } = inner; - let result = self.handle.derive_encryption_key(&path); - tokio::spawn(async move { - let _ = tx.send(result).await; - }); - } - VaultMessage::DeriveEthereumKey(msg) => { - let WithChannels { inner, tx, .. } = msg; - let DeriveEthereumKey { path } = inner; - let result = self.handle.derive_ethereum_key(&path); - tokio::spawn(async move { - let _ = tx.send(result).await; - }); - } - VaultMessage::DerivePassword(msg) => { - let WithChannels { inner, tx, .. } = msg; - let DerivePassword { path, length } = inner; - let result = self.handle.derive_password(&path, length); - tokio::spawn(async move { - let _ = tx.send(result).await; - }); - } - VaultMessage::Encrypt(msg) => { - let WithChannels { inner, tx, .. } = msg; - let Encrypt { - plaintext, - key_version, - } = inner; - let result = self.handle.encrypt(&plaintext, key_version); - tokio::spawn(async move { - let _ = tx.send(result).await; - }); - } - VaultMessage::Decrypt(msg) => { - let WithChannels { inner, tx, .. } = msg; - let Decrypt { encrypted } = inner; - let result = self.handle.decrypt(&encrypted); - tokio::spawn(async move { - let _ = tx.send(result).await; - }); - } - VaultMessage::Lock(msg) => { - let WithChannels { inner: _, tx, .. } = msg; - self.handle.lock(); - tokio::spawn(async move { - let _ = tx.send(Ok(())).await; - }); - } - VaultMessage::Unlock(msg) => { - let WithChannels { inner, tx, .. } = msg; - let Unlock { - mnemonic, - passphrase, - } = inner; - let result = self.handle.unlock(&mnemonic, passphrase.as_deref()); - tokio::spawn(async move { - let _ = tx.send(result).await; - }); - } - } - } -} - #[cfg(test)] mod tests { use super::*; - use crate::protocol::Lock; - use irpc::channel::oneshot; - use irpc::WithChannels; #[test] fn test_service_starts_locked() { @@ -750,10 +564,7 @@ mod tests { service.unlock_new(24).unwrap(); let result = service.derive_ethereum_key(PATHS::ETHEREUM); - assert!(matches!( - result, - Err(VaultServiceError::UnsupportedKeyType) - )); + assert!(matches!(result, Err(VaultServiceError::UnsupportedKeyType))); } #[test] @@ -847,72 +658,6 @@ mod tests { assert_eq!(service.inner.read().unwrap().cache.len(), 1); } - #[tokio::test] - async fn test_actor_unlock_responds_successfully() { - let handle = VaultServiceHandle::new(); - let (tx, rx) = tokio::sync::mpsc::channel(64); - let actor = VaultServiceActor::new(handle); - tokio::task::spawn(actor.run(rx)); - - let (resp_tx, resp_rx) = oneshot::channel(); - let msg = VaultMessage::Unlock(WithChannels::from(( - Unlock { - mnemonic: "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about".to_string(), - passphrase: None, - }, - resp_tx, - ))); - tx.send(msg).await.unwrap(); - - let result = resp_rx.await.unwrap(); - assert!(result.is_ok(), "Unlock via actor must succeed"); - } - - #[tokio::test] - async fn test_actor_derive_ed25519_returns_key() { - let handle = VaultServiceHandle::new(); - handle.unlock_new(24).unwrap(); - let (tx, rx) = tokio::sync::mpsc::channel(64); - let actor = VaultServiceActor::new(handle); - tokio::task::spawn(actor.run(rx)); - - let (resp_tx, resp_rx) = oneshot::channel(); - let msg = VaultMessage::DeriveEd25519(WithChannels::from(( - DeriveEd25519 { - path: PATHS::IDENTITY.to_string(), - }, - resp_tx, - ))); - tx.send(msg).await.unwrap(); - - let result = resp_rx.await.unwrap(); - assert!(result.is_ok(), "DeriveEd25519 via actor must succeed"); - let key = result.unwrap(); - assert!( - !key.private_key.is_empty(), - "DerivedKey must have private_key" - ); - assert_eq!(key.key_type, KeyType::Ed25519); - } - - #[tokio::test] - async fn test_actor_lock_clears_state() { - let handle = VaultServiceHandle::new(); - handle.unlock_new(24).unwrap(); - let (tx, rx) = tokio::sync::mpsc::channel(64); - let actor = VaultServiceActor::new(handle.clone()); - tokio::task::spawn(actor.run(rx)); - - let (resp_tx, resp_rx): (oneshot::Sender>, _) = - oneshot::channel(); - let msg = VaultMessage::Lock(WithChannels::from((Lock, resp_tx))); - tx.send(msg).await.unwrap(); - - let result = resp_rx.await.unwrap(); - assert!(result.is_ok(), "Lock via actor must succeed"); - assert!(!handle.is_unlocked(), "Handle must be locked after Lock"); - } - #[test] fn test_unlock_with_passphrase_produces_different_seed() { let service_a = VaultServiceHandle::new(); @@ -943,30 +688,4 @@ mod tests { "Unlock with None passphrase must produce same seed as another None passphrase unlock" ); } - - #[tokio::test] - async fn test_actor_unlock_with_passphrase() { - let handle = VaultServiceHandle::new(); - let (tx, rx) = tokio::sync::mpsc::channel(64); - let actor = VaultServiceActor::new(handle); - tokio::task::spawn(actor.run(rx)); - - let mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"; - - let (resp_tx, resp_rx) = oneshot::channel(); - let msg = VaultMessage::Unlock(WithChannels::from(( - Unlock { - mnemonic: mnemonic.to_string(), - passphrase: Some("TREZOR".to_string()), - }, - resp_tx, - ))); - tx.send(msg).await.unwrap(); - - let result = resp_rx.await.unwrap(); - assert!( - result.is_ok(), - "Unlock with passphrase via actor must succeed" - ); - } }