From b332fbfcde00b5b49508198c41c1f68ca1923337 Mon Sep 17 00:00:00 2001 From: aoikurokawa Date: Sat, 8 Aug 2026 09:09:51 +0900 Subject: [PATCH 1/3] fix: add cli into workspace --- Cargo.lock | 424 ++++++++++++++++++++++++++++++++++++++++++++++++----- Cargo.toml | 1 + 2 files changed, 389 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8fef8dcb..65f6e254 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -515,6 +515,15 @@ dependencies = [ "libc", ] +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + [[package]] name = "anstream" version = "1.0.0" @@ -551,7 +560,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -562,7 +571,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -582,7 +591,7 @@ dependencies = [ "cfg_aliases", "pin-project-lite", "quinn-udp", - "rustc-hash", + "rustc-hash 2.1.1", "rustls", "socket2", "thiserror 2.0.18", @@ -603,7 +612,7 @@ dependencies = [ "lru-slab", "rand 0.9.2", "ring", - "rustc-hash", + "rustc-hash 2.1.1", "rustls", "rustls-pki-types", "rustls-platform-verifier", @@ -981,6 +990,17 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + [[package]] name = "autocfg" version = "1.5.0" @@ -1032,6 +1052,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.11.0" @@ -1385,8 +1411,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", + "js-sys", "num-traits", "serde", + "wasm-bindgen", "windows-link", ] @@ -1409,6 +1437,21 @@ dependencies = [ "inout", ] +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "ansi_term", + "atty", + "bitflags 1.3.2", + "strsim 0.8.0", + "textwrap", + "unicode-width 0.1.14", + "vec_map", +] + [[package]] name = "clap" version = "4.6.0" @@ -1419,6 +1462,15 @@ dependencies = [ "clap_derive", ] +[[package]] +name = "clap-markdown" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2a2617956a06d4885b490697b5307ebb09fec10b088afc18c81762d848c2339" +dependencies = [ + "clap 4.6.0", +] + [[package]] name = "clap_builder" version = "4.6.0" @@ -1428,7 +1480,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.1", ] [[package]] @@ -1505,6 +1557,19 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "console" +version = "0.15.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width 0.2.2", + "windows-sys 0.59.0", +] + [[package]] name = "console" version = "0.16.3" @@ -1513,7 +1578,7 @@ checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ "encode_unicode", "libc", - "unicode-width", + "unicode-width 0.2.2", "windows-sys 0.61.2", ] @@ -1751,7 +1816,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.11.1", "syn 2.0.117", ] @@ -1764,7 +1829,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.11.1", "syn 2.0.117", ] @@ -1862,6 +1927,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "dialoguer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +dependencies = [ + "console 0.15.11", + "shell-words", + "tempfile", + "zeroize", +] + [[package]] name = "difflib" version = "0.4.0" @@ -1918,6 +1995,16 @@ dependencies = [ "dirs-sys", ] +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + [[package]] name = "dirs-sys" version = "0.3.7" @@ -1929,6 +2016,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -2227,7 +2325,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -2663,6 +2761,15 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hermit-abi" version = "0.5.2" @@ -2675,6 +2782,19 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hidapi" +version = "2.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c78dadfc12f865bc3fcac3897e64533b930737ceb9ef245c8277de98d0b010e9" +dependencies = [ + "cc", + "cfg-if", + "libc", + "pkg-config", + "windows-sys 0.61.2", +] + [[package]] name = "histogram" version = "0.6.9" @@ -3033,9 +3153,9 @@ version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb" dependencies = [ - "console", + "console 0.16.3", "portable-atomic", - "unicode-width", + "unicode-width 0.2.2", "unit-prefix", "web-time", ] @@ -3055,7 +3175,7 @@ version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdd7bddefd0a8833b88a4b68f90dae22c7450d11b354198baee3874fd811b344" dependencies = [ - "bitflags", + "bitflags 2.11.0", "cfg-if", "libc", ] @@ -3082,9 +3202,9 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ - "hermit-abi", + "hermit-abi 0.5.2", "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -3199,6 +3319,45 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "jito-restaking-cli" +version = "1.0.1" +dependencies = [ + "anyhow", + "base64 0.22.1", + "borsh 1.6.1", + "bytemuck", + "chrono", + "clap 4.6.0", + "clap-markdown", + "env_logger 0.10.2", + "jito-bytemuck", + "jito-jsm-core", + "jito-restaking-client", + "jito-restaking-client-common", + "jito-restaking-core", + "jito-vault-client", + "jito-vault-core", + "jito-vault-sdk", + "log", + "serde", + "serde_json", + "solana-account-decoder", + "solana-cli-config", + "solana-commitment-config", + "solana-derivation-path", + "solana-program", + "solana-remote-wallet", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", + "spl-associated-token-account-interface", + "spl-token-interface", + "thiserror 2.0.18", + "tokio", + "uriparse", +] + [[package]] name = "jito-restaking-client" version = "0.0.5" @@ -3305,7 +3464,7 @@ name = "jito-shank-cli" version = "0.0.5" dependencies = [ "anyhow", - "clap", + "clap 4.6.0", "env_logger 0.10.2", "envfile", "log", @@ -3355,7 +3514,7 @@ dependencies = [ "anyhow", "base64 0.22.1", "bincode", - "clap", + "clap 4.6.0", "dotenvy", "env_logger 0.10.2", "futures", @@ -3551,7 +3710,7 @@ version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ddbf48fd451246b1f8c2610bd3b4ac0cc6e149d89832867093ab69a17194f08" dependencies = [ - "bitflags", + "bitflags 2.11.0", "libc", "plain", "redox_syscall 0.7.3", @@ -3816,7 +3975,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags", + "bitflags 2.11.0", "cfg-if", "cfg_aliases", "libc", @@ -3960,7 +4119,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi", + "hermit-abi 0.5.2", "libc", ] @@ -4019,7 +4178,7 @@ version = "0.10.76" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf" dependencies = [ - "bitflags", + "bitflags 2.11.0", "cfg-if", "foreign-types", "libc", @@ -4145,6 +4304,16 @@ dependencies = [ "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]] name = "pem" version = "1.1.1" @@ -4398,7 +4567,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash", + "rustc-hash 2.1.1", "rustls", "socket2", "thiserror 2.0.18", @@ -4418,7 +4587,7 @@ dependencies = [ "lru-slab", "rand 0.9.2", "ring", - "rustc-hash", + "rustc-hash 2.1.1", "rustls", "rustls-pki-types", "slab", @@ -4587,7 +4756,7 @@ version = "11.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" dependencies = [ - "bitflags", + "bitflags 2.11.0", ] [[package]] @@ -4616,7 +4785,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags", + "bitflags 2.11.0", ] [[package]] @@ -4625,7 +4794,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce70a74e890531977d37e532c34d45e9055d2409ed08ddba14529471ed0be16" dependencies = [ - "bitflags", + "bitflags 2.11.0", ] [[package]] @@ -4767,12 +4936,39 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rpassword" +version = "7.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da316a15f47e3d053de9cb2c439650bd8fa4aaeb9365f2e5f27f492ff73c196" +dependencies = [ + "libc", + "rtoolbox", + "windows-sys 0.61.2", +] + +[[package]] +name = "rtoolbox" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50a0e551c1e27e1731aba276dbeaeac73f53c7cd34d1bda485d02bd1e0f36844" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "rustc-demangle" version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hash" version = "2.1.1" @@ -4803,11 +4999,11 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags", + "bitflags 2.11.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -4864,7 +5060,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -4964,7 +5160,7 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags", + "bitflags 2.11.0", "core-foundation", "core-foundation-sys", "libc", @@ -5051,6 +5247,7 @@ version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ + "indexmap 2.13.0", "itoa", "memchr", "serde", @@ -5119,6 +5316,19 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap 2.13.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "sha1" version = "0.10.6" @@ -5251,6 +5461,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shell-words" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" + [[package]] name = "shellexpand" version = "2.1.2" @@ -5358,7 +5574,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -5814,6 +6030,50 @@ dependencies = [ "solana-vote-program", ] +[[package]] +name = "solana-clap-utils" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6b30762a9dd2e9781a3ee1b39e3acf63111fb2e5b3fd6d622801b184dec21fc" +dependencies = [ + "chrono", + "clap 2.34.0", + "rpassword", + "solana-bls-signatures", + "solana-clock", + "solana-cluster-type", + "solana-commitment-config", + "solana-derivation-path", + "solana-hash 3.1.0", + "solana-keypair", + "solana-message", + "solana-native-token", + "solana-presigner", + "solana-pubkey 3.0.0", + "solana-remote-wallet", + "solana-seed-phrase", + "solana-signature", + "solana-signer", + "thiserror 2.0.18", + "tiny-bip39", + "uriparse", + "url", +] + +[[package]] +name = "solana-cli-config" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "452814c85a97b7c064d068805e697938ab4ee510fe021d444662b375e65eb892" +dependencies = [ + "dirs-next", + "serde", + "serde_yaml", + "solana-clap-utils", + "solana-commitment-config", + "url", +] + [[package]] name = "solana-client" version = "3.1.11" @@ -6352,7 +6612,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ddf67876c541aa1e21ee1acae35c95c6fbc61119814bfef70579317a5e26955" dependencies = [ - "bitflags", + "bitflags 2.11.0", "solana-account-info", "solana-instruction", "solana-instruction-error", @@ -6630,7 +6890,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6edf2f25743c95229ac0fdc32f8f5893ef738dbf332c669e9861d33ddb0f469d" dependencies = [ "bincode", - "bitflags", + "bitflags 2.11.0", "cfg_eval", "serde", "serde_derive", @@ -7028,6 +7288,30 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "solana-remote-wallet" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24328633f4e6c072f3f1cbb8e43de1b881d0d94aa831e9836466cbb6a733a7af" +dependencies = [ + "console 0.16.3", + "dialoguer", + "hidapi", + "log", + "num-derive", + "num-traits", + "parking_lot", + "qstring", + "semver", + "solana-derivation-path", + "solana-offchain-message", + "solana-pubkey 3.0.0", + "solana-signature", + "solana-signer", + "thiserror 2.0.18", + "uriparse", +] + [[package]] name = "solana-rent" version = "3.1.0" @@ -7468,7 +7752,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc905b200a95f2ea9146e43f2a7181e3aeb55de6bc12afb36462d00a3c7310de" dependencies = [ "hmac 0.12.1", - "pbkdf2", + "pbkdf2 0.11.0", "sha2 0.10.9", ] @@ -8570,6 +8854,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + [[package]] name = "strsim" version = "0.11.1" @@ -8726,7 +9016,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -8777,6 +9067,15 @@ dependencies = [ "test-case-core", ] +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width 0.1.14", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -8866,6 +9165,23 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a30fd743a02bf35236f6faf99adb03089bb77e91c998dac2c2ad76bb424f668c" +dependencies = [ + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.5", + "rustc-hash 1.1.0", + "sha2 0.10.9", + "thiserror 1.0.69", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + [[package]] name = "tinystr" version = "0.8.2" @@ -9133,7 +9449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ "async-compression", - "bitflags", + "bitflags 2.11.0", "bytes", "futures-core", "futures-util", @@ -9256,12 +9572,27 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +[[package]] +name = "unicode-normalization" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +dependencies = [ + "tinyvec", +] + [[package]] name = "unicode-segmentation" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + [[package]] name = "unicode-width" version = "0.2.2" @@ -9305,6 +9636,12 @@ dependencies = [ "void", ] +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "untrusted" version = "0.9.0" @@ -9369,6 +9706,12 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + [[package]] name = "version_check" version = "0.9.5" @@ -9549,7 +9892,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -9660,6 +10003,15 @@ 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" diff --git a/Cargo.toml b/Cargo.toml index bb78ea49..c2581d87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [workspace] members = [ + "cli", "clients/rust/common", "clients/rust/restaking_client", "clients/rust/vault_client", From c871d9905949a3c2e4919b7c8e2c8129251b30b8 Mon Sep 17 00:00:00 2001 From: aoikurokawa Date: Sat, 8 Aug 2026 09:18:42 +0900 Subject: [PATCH 2/3] fix: lint --- cli/src/lib.rs | 29 ++++++++++++++++++++++++++++- cli/src/log.rs | 2 +- cli/src/restaking_handler.rs | 26 ++++++++++---------------- cli/src/vault_handler.rs | 12 +++++------- 4 files changed, 44 insertions(+), 25 deletions(-) diff --git a/cli/src/lib.rs b/cli/src/lib.rs index 4019d577..34d16990 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -14,7 +14,8 @@ use solana_rpc_client_api::{ filter::{Memcmp, MemcmpEncodedBytes, RpcFilterType}, }; use solana_sdk::{ - instruction::Instruction, pubkey::Pubkey, signers::Signers, transaction::Transaction, + account::Account, instruction::Instruction, pubkey::Pubkey, signers::Signers, + transaction::Transaction, }; pub mod cli_args; @@ -134,6 +135,32 @@ pub(crate) trait CliHandler { Ok(config) } + + /// Fetches the program accounts matching `config`. + /// + /// The RPC client returns base64-encoded [`solana_account_decoder::UiAccount`]s, which this + /// method decodes back into [`Account`]s so callers can deserialize the account data. + async fn get_program_accounts( + &self, + program_id: &Pubkey, + config: RpcProgramAccountsConfig, + ) -> anyhow::Result> { + let rpc_client = self.get_rpc_client(); + + rpc_client + .get_program_ui_accounts_with_config(program_id, config) + .await? + .into_iter() + .map(|(pubkey, ui_account)| { + let account = ui_account + .decode() + .ok_or_else(|| anyhow!("Failed to decode account {pubkey}"))?; + + Ok((pubkey, account)) + }) + .collect() + } + /// Fetches and deserializes an account /// /// This method retrieves account data using the configured RPC client, diff --git a/cli/src/log.rs b/cli/src/log.rs index a0f60add..7b8e8c89 100644 --- a/cli/src/log.rs +++ b/cli/src/log.rs @@ -29,7 +29,7 @@ fn format_log_message(buf: &mut Formatter, record: &Record) -> std::io::Result<( ) } -fn colored_level(style: &mut Style, level: log::Level) -> StyledValue<&'static str> { +fn colored_level(style: &mut Style, level: log::Level) -> StyledValue<'_, &'static str> { match level { log::Level::Trace => style.set_color(Color::Magenta).value("TRACE"), log::Level::Debug => style.set_color(Color::Blue).value("DEBUG"), diff --git a/cli/src/restaking_handler.rs b/cli/src/restaking_handler.rs index e8d49ff0..9c9ce106 100644 --- a/cli/src/restaking_handler.rs +++ b/cli/src/restaking_handler.rs @@ -1285,11 +1285,10 @@ impl RestakingCliHandler { #[allow(clippy::future_not_send)] pub async fn list_ncn(&self) -> Result<()> { - let rpc_client = self.get_rpc_client(); let config = self.get_rpc_program_accounts_config::(None)?; - let accounts = rpc_client - .get_program_accounts_with_config(&self.restaking_program_id, config) + let accounts = self + .get_program_accounts(&self.restaking_program_id, config) .await?; for (index, (ncn_pubkey, ncn)) in accounts.iter().enumerate() { let ncn = jito_restaking_client::accounts::Ncn::deserialize(&mut ncn.data.as_slice())?; @@ -1306,8 +1305,6 @@ impl RestakingCliHandler { ncn: Option<&Pubkey>, operator: Option<&Pubkey>, ) -> Result<()> { - let rpc_client = self.get_rpc_client(); - let (pubkey, offset) = match (ncn, operator) { (Some(ncn_pubkey), None) => (ncn_pubkey, 8), (None, Some(operator_pubkey)) => (operator_pubkey, 8 + 32), @@ -1317,8 +1314,8 @@ impl RestakingCliHandler { let config = self.get_rpc_program_accounts_config::(Some((pubkey, offset)))?; - let accounts = rpc_client - .get_program_accounts_with_config(&self.restaking_program_id, config) + let accounts = self + .get_program_accounts(&self.restaking_program_id, config) .await?; for (index, (ncn_operator_state_pubkey, ncn_operator_state)) in accounts.iter().enumerate() { @@ -1338,11 +1335,10 @@ impl RestakingCliHandler { /// Lists NCN operator state accounts filtered by NCN public key. #[allow(clippy::future_not_send)] pub async fn list_ncn_vault_ticket(&self, ncn: Pubkey) -> Result<()> { - let rpc_client = self.get_rpc_client(); let config = self.get_rpc_program_accounts_config::(Some((&ncn, 8)))?; - let accounts = rpc_client - .get_program_accounts_with_config(&self.restaking_program_id, config) + let accounts = self + .get_program_accounts(&self.restaking_program_id, config) .await?; for (index, (ticket_pubkey, ticket)) in accounts.iter().enumerate() { let ticket = jito_restaking_client::accounts::NcnVaultTicket::deserialize( @@ -1366,10 +1362,9 @@ impl RestakingCliHandler { #[allow(clippy::future_not_send)] pub async fn list_operator(&self) -> Result<()> { - let rpc_client = self.get_rpc_client(); let config = self.get_rpc_program_accounts_config::(None)?; - let accounts = rpc_client - .get_program_accounts_with_config(&self.restaking_program_id, config) + let accounts = self + .get_program_accounts(&self.restaking_program_id, config) .await?; for (index, (operator_pubkey, operator)) in accounts.iter().enumerate() { let operator = jito_restaking_client::accounts::Operator::deserialize( @@ -1382,11 +1377,10 @@ impl RestakingCliHandler { #[allow(clippy::future_not_send)] pub async fn list_operator_vault_ticket(&self, operator: &Pubkey) -> Result<()> { - let rpc_client = self.get_rpc_client(); let config = self.get_rpc_program_accounts_config::(Some((operator, 8)))?; - let accounts = rpc_client - .get_program_accounts_with_config(&self.restaking_program_id, config) + let accounts = self + .get_program_accounts(&self.restaking_program_id, config) .await?; for (index, (ticket_pubkey, ticket)) in accounts.iter().enumerate() { let ticket = jito_restaking_client::accounts::OperatorVaultTicket::deserialize( diff --git a/cli/src/vault_handler.rs b/cli/src/vault_handler.rs index 9de20f3b..208147b2 100644 --- a/cli/src/vault_handler.rs +++ b/cli/src/vault_handler.rs @@ -1520,12 +1520,10 @@ impl VaultCliHandler { #[allow(clippy::future_not_send)] pub async fn list_vaults(&self) -> Result<()> { - let rpc_client = self.get_rpc_client(); let config = self.get_rpc_program_accounts_config::(None)?; - let accounts = rpc_client - .get_program_accounts_with_config(&self.vault_program_id, config) - .await - .unwrap(); + let accounts = self + .get_program_accounts(&self.vault_program_id, config) + .await?; log::info!("{:?}", accounts); for (index, (vault_pubkey, vault)) in accounts.iter().enumerate() { let vault = @@ -1630,8 +1628,8 @@ impl VaultCliHandler { let config = self.get_rpc_program_accounts_config::( Some((&vault, 8)), )?; - let accounts = rpc_client - .get_program_accounts_with_config(&self.vault_program_id, config) + let accounts = self + .get_program_accounts(&self.vault_program_id, config) .await?; for (index, (pubkey, account)) in accounts.iter().enumerate() { From 562b9c7ae7215748ac3d21cf2d9bfe33569ba9b8 Mon Sep 17 00:00:00 2001 From: aoikurokawa Date: Sat, 8 Aug 2026 09:23:21 +0900 Subject: [PATCH 3/3] fix: lint --- cli/src/restaking_handler.rs | 2 +- cli/src/vault_handler.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/restaking_handler.rs b/cli/src/restaking_handler.rs index 9c9ce106..67b49104 100644 --- a/cli/src/restaking_handler.rs +++ b/cli/src/restaking_handler.rs @@ -92,7 +92,7 @@ impl RestakingCliHandler { } } - #[allow(clippy::future_not_send)] + #[allow(clippy::cognitive_complexity, clippy::future_not_send)] pub async fn handle(&self, action: RestakingCommands) -> Result<()> { match action { RestakingCommands::Config { diff --git a/cli/src/vault_handler.rs b/cli/src/vault_handler.rs index 208147b2..e78d5db4 100644 --- a/cli/src/vault_handler.rs +++ b/cli/src/vault_handler.rs @@ -106,7 +106,7 @@ impl VaultCliHandler { } } - #[allow(clippy::future_not_send)] + #[allow(clippy::cognitive_complexity, clippy::future_not_send)] pub async fn handle(&self, action: VaultCommands) -> Result<()> { match action { VaultCommands::Config {