diff --git a/Cargo.lock b/Cargo.lock index 35d4ed7..50fb8cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,22 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + [[package]] name = "aead" version = "0.5.2" @@ -40,9 +56,9 @@ dependencies = [ [[package]] name = "agave-feature-set" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd05b6a1f0867ccce373385f007b9683a116228bad9c3a0965316209617788a8" +checksum = "bfe79fc4c114c51ea8461d829bb49853a21a76c7c8ef20e9041b071558f628ce" dependencies = [ "ahash", "solana-epoch-schedule", @@ -54,9 +70,9 @@ dependencies = [ [[package]] name = "agave-reserved-account-keys" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c1bcebf73c3adb9fe92474a03e6192ee6c5041a6be6eeeb28166fc7e678809d" +checksum = "6e8ceb5117fa390898f473b0d165f88482a2b36fb4a47441d8b40e22823207cb" dependencies = [ "agave-feature-set", "solana-pubkey 3.0.0", @@ -65,9 +81,9 @@ dependencies = [ [[package]] name = "agave-syscalls" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ae5f415f57e60b9dc1c17a314d595b32308f2470c2969beacaec9d0461d089d" +checksum = "98807b80e4367cc38c2b24ea30d6d16466553982aeedb0b0cb2c70bbae8ba5b0" dependencies = [ "bincode", "libsecp256k1", @@ -119,6 +135,30 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" +dependencies = [ + "alloc-no-stdlib", +] + [[package]] name = "allocator-api2" version = "0.2.21" @@ -134,6 +174,62 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "anyhow" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" + [[package]] name = "ark-bn254" version = "0.4.0" @@ -251,7 +347,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -277,7 +373,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -352,7 +448,7 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -383,9 +479,9 @@ checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[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 = "ascii" @@ -393,11 +489,40 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" +[[package]] +name = "async-compression" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79b3f8a79cccc2898f31920fc69f304859b3bd567490f75ebf51ae1c792a9ac" +dependencies = [ + "compression-codecs", + "compression-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[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.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "base16ct" @@ -449,9 +574,9 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" -version = "2.11.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" [[package]] name = "blake3" @@ -488,18 +613,18 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" dependencies = [ "hybrid-array", ] [[package]] name = "borsh" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd1e3f8955a5d7de9fab72fc8373fade9fb8a703968cb200ae3dc6cf08e185a" +checksum = "2f3f6da4992df95bbcd9af42a6c7dcb994498fc9048230405f3b36ff7cd3f145" dependencies = [ "borsh-derive", "bytes", @@ -508,15 +633,36 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfcfdc083699101d5a7965e49925975f2f55060f94f9a05e7187be95d530ca59" +checksum = "3ae8fb4fb5740e4b2c4884ff95f5f32f5e8479db1e8fd8eb49ddbe09eb09bb7c" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", +] + +[[package]] +name = "brotli" +version = "8.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", ] [[package]] @@ -530,9 +676,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.20.2" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "bv" @@ -561,7 +707,7 @@ checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -572,17 +718,19 @@ 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.62" +version = "1.2.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" +checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96" dependencies = [ "find-msvc-tools", + "jobserver", + "libc", "shlex", ] @@ -606,7 +754,7 @@ checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -619,11 +767,57 @@ dependencies = [ "inout", ] +[[package]] +name = "clap" +version = "4.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + [[package]] name = "cmov" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f88a43d011fc4a6876cb7344703e297c71dda42494fee094d5f7c76bf13f746" +checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "combine" @@ -638,6 +832,36 @@ dependencies = [ "unreachable", ] +[[package]] +name = "compression-codecs" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf" +dependencies = [ + "brotli", + "compression-core", + "flate2", + "memchr", +] + +[[package]] +name = "compression-core" +version = "0.4.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" + +[[package]] +name = "console" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" +dependencies = [ + "encode_unicode", + "libc", + "unicode-width", + "windows-sys 0.61.2", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -650,6 +874,24 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" +[[package]] +name = "cow-test-cli" +version = "0.1.0" +dependencies = [ + "anyhow", + "clap", + "settlement-client", + "solana-commitment-config", + "solana-instruction", + "solana-program-pack", + "solana-rpc-client", + "solana-sdk", + "solana-system-interface 3.2.0", + "spl-associated-token-account-interface", + "spl-token", + "spl-token-interface", +] + [[package]] name = "cpufeatures" version = "0.2.17" @@ -668,6 +910,15 @@ dependencies = [ "libc", ] +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + [[package]] name = "crunchy" version = "0.2.4" @@ -750,17 +1001,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", -] - -[[package]] -name = "darling" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" -dependencies = [ - "darling_core 0.21.3", - "darling_macro 0.21.3", + "syn 2.0.118", ] [[package]] @@ -769,22 +1010,8 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" dependencies = [ - "darling_core 0.23.0", - "darling_macro 0.23.0", -] - -[[package]] -name = "darling_core" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.117", + "darling_core", + "darling_macro", ] [[package]] @@ -797,18 +1024,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.117", -] - -[[package]] -name = "darling_macro" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" -dependencies = [ - "darling_core 0.21.3", - "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -817,9 +1033,9 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ - "darling_core 0.23.0", + "darling_core", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -866,7 +1082,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -896,11 +1112,22 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ - "block-buffer 0.12.0", + "block-buffer 0.12.1", "crypto-common 0.2.2", "ctutils", ] +[[package]] +name = "displaydoc" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + [[package]] name = "eager" version = "0.1.0" @@ -967,14 +1194,14 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "elliptic-curve" @@ -995,6 +1222,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "enum-iterator" version = "1.5.0" @@ -1012,27 +1245,27 @@ checksum = "685adfa4d6f3d765a26bc5dbc936577de9abf756c1feeb3089b01dd395034842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] name = "enum-ordinalize" -version = "4.3.2" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1091a7bb1f8f2c4b28f1fe2cef4980ca2d410a3d727d67ecc3178c9b0800f0" +checksum = "07f808d588c10e464ea6f7d3eaed500049eff30aaac103460f61828c2d65b3eb" dependencies = [ "enum-ordinalize-derive", ] [[package]] name = "enum-ordinalize-derive" -version = "4.3.2" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631" +checksum = "42e528e2d34ba8a67a1a650b86beae8ef69fc5fdb638016f386b973226590432" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1048,7 +1281,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -1109,18 +1342,96 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "059c31d7d36c43fe39d89e55711858b4da8be7eb6dabac23c7289b1a19489406" +[[package]] +name = "flate2" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", + "futures-sink", +] + [[package]] name = "futures-core" version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" +[[package]] +name = "futures-executor" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "futures-sink" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + [[package]] name = "futures-task" version = "0.3.32" @@ -1133,8 +1444,13 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ + "futures-channel", "futures-core", + "futures-io", + "futures-macro", + "futures-sink", "futures-task", + "memchr", "pin-project-lite", "slab", ] @@ -1181,9 +1497,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", + "js-sys", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", ] [[package]] @@ -1230,6 +1559,12 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hex-literal" version = "1.1.0" @@ -1246,20 +1581,221 @@ dependencies = [ ] [[package]] -name = "hybrid-array" -version = "0.4.12" +name = "http" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da" +checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" dependencies = [ - "typenum", + "bytes", + "itoa", ] [[package]] -name = "ident_case" +name = "http-body" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hybrid-array" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "818356c5132c1fede50f837ca96afbe78ff42413047f4abb886217845e1b6c8c" +dependencies = [ + "typenum", +] + +[[package]] +name = "hyper" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + [[package]] name = "indexmap" version = "2.14.0" @@ -1270,6 +1806,19 @@ dependencies = [ "hashbrown 0.17.1", ] +[[package]] +name = "indicatif" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993f007684f2e9727160da8b960ec161264703bfd1af084fd2e34d040c9a0dd4" +dependencies = [ + "console", + "portable-atomic", + "unicode-width", + "unit-prefix", + "web-time", +] + [[package]] name = "inout" version = "0.1.4" @@ -1279,6 +1828,18 @@ dependencies = [ "generic-array", ] +[[package]] +name = "ipnet" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + [[package]] name = "itertools" version = "0.10.5" @@ -1321,18 +1882,42 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + [[package]] name = "js-sys" -version = "0.3.98" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" dependencies = [ "cfg-if", "futures-util", - "once_cell", "wasm-bindgen", ] +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + [[package]] name = "k256" version = "0.13.4" @@ -1444,6 +2029,12 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + [[package]] name = "litesvm" version = "0.12.0" @@ -1541,15 +2132,21 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" + +[[package]] +name = "lru-slab" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "memchr" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" [[package]] name = "memoffset" @@ -1572,6 +2169,27 @@ dependencies = [ "zeroize", ] +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.61.2", +] + [[package]] name = "num" version = "0.2.1" @@ -1625,7 +2243,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1688,7 +2306,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1697,6 +2315,12 @@ version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + [[package]] name = "opaque-debug" version = "0.3.1" @@ -1734,9 +2358,9 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pastey" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5a797f0e07bdf071d15742978fc3128ec6c22891c31a3a931513263904c982a" +checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4" [[package]] name = "pbkdf2" @@ -1770,9 +2394,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pinocchio" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d707cea2843c1a2fd8ec49e4116ce3fdaedcd552a3ee168b03ce60e627fc0f62" +checksum = "a6cababcb62a2e739c7078ae16eda02789a6e3edd21bbdded864e85c38a7914d" dependencies = [ "solana-account-view", "solana-address 2.6.1", @@ -1813,6 +2437,12 @@ dependencies = [ "spki", ] +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + [[package]] name = "polyval" version = "0.6.2" @@ -1825,6 +2455,21 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + [[package]] name = "ppv-lite86" version = "0.2.21" @@ -1888,7 +2533,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -1897,11 +2542,66 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quinn" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.18", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fcb935c5bec503c2f0e306bdd3e58bb9029dcb14fa8d9ac76e3a5256ac0763e" +dependencies = [ + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.4", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.18", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "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", ] @@ -1912,6 +2612,12 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" version = "0.7.3" @@ -2030,11 +2736,89 @@ dependencies = [ "bitflags", ] +[[package]] +name = "regex" +version = "1.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + [[package]] name = "regex-syntax" -version = "0.8.10" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "reqwest-middleware" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" +checksum = "57f17d28a6e6acfe1733fe24bcd30774d13bffa4b8a22535b4c8c98423088d4e" +dependencies = [ + "anyhow", + "async-trait", + "http", + "reqwest", + "serde", + "thiserror 1.0.69", + "tower-service", +] [[package]] name = "rfc6979" @@ -2046,12 +2830,32 @@ dependencies = [ "subtle", ] +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.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 = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + [[package]] name = "rustc_version" version = "0.4.1" @@ -2071,15 +2875,50 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] -name = "rustversion" -version = "1.0.22" +name = "rustls" +version = "0.23.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - +checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + [[package]] name = "rusty-fork" version = "0.3.1" @@ -2092,6 +2931,12 @@ dependencies = [ "wait-timeout", ] +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + [[package]] name = "scopeguard" version = "1.2.0" @@ -2164,14 +3009,14 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "itoa", "memchr", @@ -2180,11 +3025,23 @@ dependencies = [ "zmij", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "serde_with" -version = "3.20.0" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e72c1c2cb7b223fafb600a619537a871c2818583d619401b785e7c0b746ccde2" +checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" dependencies = [ "serde_core", "serde_with_macros", @@ -2192,14 +3049,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.20.0" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b90c488738ecb4fb0262f41f43bc40efc5868d9fb744319ddf5f5317f417bfac" +checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" dependencies = [ - "darling 0.23.0", + "darling", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -2292,9 +3149,19 @@ dependencies = [ [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] [[package]] name = "signature" @@ -2306,6 +3173,12 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "simd-adler32" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" + [[package]] name = "siphasher" version = "0.3.11" @@ -2320,9 +3193,19 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + +[[package]] +name = "socket2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] [[package]] name = "solana-account" @@ -2342,6 +3225,63 @@ dependencies = [ "solana-sysvar", ] +[[package]] +name = "solana-account-decoder" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "751157b033a30c178a272ec2bbab8a5bae14b21490451627990cbe84391b8264" +dependencies = [ + "Inflector", + "base64 0.22.1", + "bincode", + "bs58", + "bv", + "serde", + "serde_json", + "solana-account", + "solana-account-decoder-client-types", + "solana-address-lookup-table-interface", + "solana-clock", + "solana-config-interface", + "solana-epoch-schedule", + "solana-fee-calculator", + "solana-instruction", + "solana-loader-v3-interface", + "solana-nonce", + "solana-program-option", + "solana-program-pack", + "solana-pubkey 3.0.0", + "solana-rent 3.1.0", + "solana-sdk-ids", + "solana-slot-hashes", + "solana-slot-history", + "solana-stake-interface", + "solana-sysvar", + "solana-vote-interface", + "spl-generic-token", + "spl-token-2022-interface", + "spl-token-group-interface", + "spl-token-interface", + "spl-token-metadata-interface", + "thiserror 2.0.18", + "zstd", +] + +[[package]] +name = "solana-account-decoder-client-types" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c200fb0019770f6ccf869a9b71653d37b76a633114d79176eedea6931c09cc7c" +dependencies = [ + "base64 0.22.1", + "bs58", + "serde", + "serde_json", + "solana-account", + "solana-pubkey 3.0.0", + "zstd", +] + [[package]] name = "solana-account-info" version = "3.1.1" @@ -2392,6 +3332,7 @@ dependencies = [ "sha2-const-stable", "solana-atomic-u64", "solana-define-syscall 5.1.0", + "solana-nullable", "solana-program-error", "solana-sanitize", "solana-sha256-hasher", @@ -2400,9 +3341,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-interface" -version = "3.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e8df0b083c10ce32490410f3795016b1b5d9b4d094658c0a5e496753645b7cd" +checksum = "115b4f773acc4f3f3cb986b0d335e9845c0368c82b0940410935bc11ae065578" dependencies = [ "bincode", "bytemuck", @@ -2455,7 +3396,7 @@ checksum = "7116e1d942a2432ca3f514625104757ab8a56233787e95144c93950029e31176" dependencies = [ "blake3", "solana-define-syscall 4.0.1", - "solana-hash 4.3.0", + "solana-hash 4.4.0", ] [[package]] @@ -2484,9 +3425,9 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cc6de8801030c776e7f2875621f19f806330bb8c0e273a97d5c1112663c0d63" +checksum = "bb423db3faa08533a122f867456bb5b7aab211818af004552ea6df5f3c43ef49" dependencies = [ "agave-syscalls", "bincode", @@ -2513,9 +3454,9 @@ dependencies = [ [[package]] name = "solana-builtins" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f76574e46c312cd1970d5d53e30f0abe91d38fa5a9e0b3403d71bca0f780fbc" +checksum = "cc47a5aefa70261825037efd942c2c78a600f4dcc110d59808b359c5d37aa941" dependencies = [ "agave-feature-set", "solana-bpf-loader-program", @@ -2533,9 +3474,9 @@ dependencies = [ [[package]] name = "solana-builtins-default-costs" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1bda64d71859131227ba12b47e64c313c9f0c998bd0bca29a7ee245ab52464" +checksum = "6a91f5db54bebaffb93e8bd0d85575139597de7cb1ac32f040442fd66bc90ed0" dependencies = [ "agave-feature-set", "ahash", @@ -2551,22 +3492,33 @@ dependencies = [ [[package]] name = "solana-clock" -version = "3.1.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea35d8f69b67daddb921a9da7f78ca591b533cf5e98833cd9ae62fdc2e4652c" +checksum = "f0acdace90d96e2c9e70d681465b4fe888b6bcf27c354ae9774e9f8a3b72923d" dependencies = [ "serde", "serde_derive", + "solana-get-sysvar", "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", ] +[[package]] +name = "solana-commitment-config" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1517aa49dcfa9cb793ef90e7aac81346d62ca4a546bb1a754030a033e3972e1c" +dependencies = [ + "serde", + "serde_derive", +] + [[package]] name = "solana-compute-budget" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e87b9f9e3014226c130c630b8a982212f8f562763e0245955cc3698512b08cc" +checksum = "8de86231371bf26dbcf473a0ea7ca424184db0c7720fafbb899d2fca2eaf1ac2" dependencies = [ "solana-fee-structure", "solana-program-runtime", @@ -2574,9 +3526,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-instruction" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ba0080c3b4ea2f7775546e027d617f37f65b514c82a4a4e8aee15aa7db1ad93" +checksum = "27f3d546bf7f979423b8cca3c16ac9b51c80104b5f6bba77ef90b41aa00ec96d" dependencies = [ "agave-feature-set", "log", @@ -2606,13 +3558,30 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "230f049bd1f84c2009bb0d31d2a5551c30cd5f32a9fa1f23068ade298d2cf6e8" +checksum = "b54b78862ca94a2a86354c22f2789ffd095c5f972c15ca104020697dd2cf3409" dependencies = [ "solana-program-runtime", ] +[[package]] +name = "solana-config-interface" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e401ae56aed512821cc7a0adaa412ff97fecd2dff4602be7b1330d2daec0c4" +dependencies = [ + "bincode", + "serde", + "serde_derive", + "solana-account", + "solana-instruction", + "solana-pubkey 3.0.0", + "solana-sdk-ids", + "solana-short-vec", + "solana-system-interface 2.0.0", +] + [[package]] name = "solana-cpi" version = "3.1.0" @@ -2629,9 +3598,9 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "720e1d774f0404957bf112365b2720ca9af9b0d1bdf0a653b22cfb52dbaa9c9e" +checksum = "5aff7432cdf2ec6a44ac06b4d64d2ee006f6c0066d6456e032a7fe25be40cd5c" dependencies = [ "bytemuck", "bytemuck_derive", @@ -2682,13 +3651,14 @@ dependencies = [ [[package]] name = "solana-epoch-rewards" -version = "3.0.2" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cddf2388b28291210d9aa60690740733cab527531f06ed153c4d388951e407c" +checksum = "daf7eb4986b0b1d6f562b21f75a836f1a6df6e00c275efcef50aab5c144dc59e" dependencies = [ "serde", "serde_derive", - "solana-hash 4.3.0", + "solana-get-sysvar", + "solana-hash 4.4.0", "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", @@ -2702,17 +3672,19 @@ checksum = "1ee8beac9bff4db9225e57d532d169b0be5e447f1e6601a2f50f27a01bf5518f" dependencies = [ "siphasher", "solana-address 2.6.1", - "solana-hash 4.3.0", + "solana-hash 4.4.0", ] [[package]] name = "solana-epoch-schedule" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce264b7b42322325947c4136a09460bf5c73d9aa8262c9b0a2064be63ba8639" +checksum = "8116e6ffa6002237d5ab5edcbda17f9ba66b6742c45a89c9fb40a94dbacd4c1d" dependencies = [ "serde", "serde_derive", + "solana-get-sysvar", + "solana-program-error", "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", @@ -2763,16 +3735,16 @@ dependencies = [ "solana-instruction", "solana-program-error", "solana-pubkey 4.2.0", - "solana-rent 4.2.0", + "solana-rent 4.3.0", "solana-sdk-ids", "solana-system-interface 3.2.0", ] [[package]] name = "solana-fee" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed09f24debf8af4738c54fb41d73142571c91a04e93f7db406408c0ef7405606" +checksum = "c276ea9723bfb6bf9fa2bcde1fa652140b0879d258c78a482533c9c01f71f416" dependencies = [ "agave-feature-set", "solana-fee-structure", @@ -2781,9 +3753,9 @@ dependencies = [ [[package]] name = "solana-fee-calculator" -version = "3.2.0" +version = "3.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e8add96b5741573e9f7529c4bb7719cfcfa999c3847a68cdfaef0cb6adf567" +checksum = "ef67f01cc6a0c72e99a08d0d484683f995de4c80e9568728fa77d1537f9b7e09" dependencies = [ "log", "serde", @@ -2800,11 +3772,22 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "solana-get-sysvar" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef3bc859fc036ed490146793557386cbfae614ebba4adc704c37d94350824ed4" +dependencies = [ + "solana-address 2.6.1", + "solana-define-syscall 5.1.0", + "solana-program-error", +] + [[package]] name = "solana-hard-forks" -version = "3.1.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52fd9cc610fd0782f09482527cb7b4f41ec22071303742718b7b57fc43bb236b" +checksum = "45406eccad36220e52988b024d8daa93e691e38d5d71ad5fec55410cc9cf427d" [[package]] name = "solana-hash" @@ -2812,14 +3795,14 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "337c246447142f660f778cf6cb582beba8e28deb05b3b24bfb9ffd7c562e5f41" dependencies = [ - "solana-hash 4.3.0", + "solana-hash 4.4.0", ] [[package]] name = "solana-hash" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b113239362cee7093bfb250467138f079a2a03673181dc15bff6ccd677912d" +checksum = "fe51db00ac3aa9f950d1e6201a126acfa26e6d81bc4a183ba64ec02effcad883" dependencies = [ "borsh", "bytemuck", @@ -2829,14 +3812,13 @@ dependencies = [ "serde_derive", "solana-atomic-u64", "solana-sanitize", - "wincode", ] [[package]] name = "solana-inflation" -version = "3.1.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f762559c5f962727efdcb03c61f5cf6c5364645695978fb145d25c88bbacdada" +checksum = "ccf104167e42e747602b88e02b25cacfc5de699c3b7cbba60d3250437e6a22ed" dependencies = [ "serde", "serde_derive", @@ -2859,9 +3841,9 @@ dependencies = [ [[package]] name = "solana-instruction-error" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0b188842592fdf6cb96f55263ae1bf11713ab5114401d1d5a881ed7cc41bef6" +checksum = "3b7d34343838343a3755b7dfb1e438d94c6db2263b519cfe3c2257af932b6e93" dependencies = [ "num-traits", "serde", @@ -2883,16 +3865,15 @@ dependencies = [ [[package]] name = "solana-instructions-sysvar" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ddf67876c541aa1e21ee1acae35c95c6fbc61119814bfef70579317a5e26955" +checksum = "9e0732294560e88ecdb2bbc656e67383e9f88c78ec09469cef172f0d28cd1bcd" dependencies = [ "bitflags", "solana-account-info", "solana-instruction", "solana-instruction-error", "solana-program-error", - "solana-pubkey 3.0.0", "solana-sanitize", "solana-sdk-ids", "solana-serialize-utils", @@ -2907,18 +3888,19 @@ checksum = "ed1c0d16d6fdeba12291a1f068cdf0d479d9bff1141bf44afd7aa9d485f65ef8" dependencies = [ "sha3", "solana-define-syscall 4.0.1", - "solana-hash 4.3.0", + "solana-hash 4.4.0", ] [[package]] name = "solana-keypair" -version = "3.1.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d3c6690dc56679545e3a31f72f590b3f5deaf48d9ea03efd2922c6a5984ed4" +checksum = "263d614c12aa267a3278703175fd6440552ca61bc960b5a02a4482720c53438b" dependencies = [ "ed25519-dalek", "ed25519-dalek-bip32", "five8", + "five8_core", "rand 0.9.4", "solana-address 2.6.1", "solana-derivation-path", @@ -2930,12 +3912,13 @@ dependencies = [ [[package]] name = "solana-last-restart-slot" -version = "3.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426711c6564b790026e45cabec3c64b971864c48b6b2d83c0ebf52a118bb4cda" +checksum = "c22474b83d3c7c318e1c3a725784fc2d1d03b728e36369e58ce48769a61ed85e" dependencies = [ "serde", "serde_derive", + "solana-get-sysvar", "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", @@ -2943,15 +3926,15 @@ dependencies = [ [[package]] name = "solana-loader-v3-interface" -version = "6.1.0" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee44c9b1328c5c712c68966fb8de07b47f3e7bac006e74ddd1bb053d3e46e5d" +checksum = "2e0538d4dbc9022e01616f1c58f2db98ece739c5d5ed4a2ef8737a953e76a2d4" dependencies = [ "serde", "serde_bytes", "serde_derive", "solana-instruction", - "solana-pubkey 3.0.0", + "solana-pubkey 4.2.0", "solana-sdk-ids", ] @@ -2972,9 +3955,9 @@ dependencies = [ [[package]] name = "solana-loader-v4-program" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431f88b97c0d89abb272dbafa8ee6d930d0979a811a3283b8cca42715f1b2b9b" +checksum = "4495b9ef97f369302d882f752465c563ac2aaf7f52cd1a9cf15891a90f986f5f" dependencies = [ "log", "solana-account", @@ -3006,7 +3989,7 @@ dependencies = [ "serde", "serde_derive", "solana-address 2.6.1", - "solana-hash 4.3.0", + "solana-hash 4.4.0", "solana-instruction", "solana-sanitize", "solana-sdk-ids", @@ -3038,7 +4021,7 @@ dependencies = [ "serde", "serde_derive", "solana-fee-calculator", - "solana-hash 4.3.0", + "solana-hash 4.4.0", "solana-pubkey 4.2.0", "solana-sha256-hasher", ] @@ -3055,6 +4038,15 @@ dependencies = [ "solana-sdk-ids", ] +[[package]] +name = "solana-nullable" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0f95d3028ef0f682bb174b77379c19d5dae2904a649f4a103fe29be7a139980" +dependencies = [ + "bytemuck", +] + [[package]] name = "solana-offchain-message" version = "3.0.0" @@ -3082,9 +4074,9 @@ dependencies = [ [[package]] name = "solana-poseidon" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f78b376ada87092ac1ce2aeda1b90e16a3c07b881497bce9fec4fa7762ce19" +checksum = "13ac13134287d7af80717353a8136e3c515d7f34d88e6f116b47350bd623e338" dependencies = [ "ark-bn254 0.4.0", "ark-bn254 0.5.0", @@ -3210,9 +4202,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad04a3aa8e5597c2d8e4933be8c50126f9911ed7bf97eb17a2516d93a19266" +checksum = "2c03c5100c43bf28fd03a11b66345ccdc28c1b7e5a7d49dbcff64e6442595627" dependencies = [ "base64 0.22.1", "bincode", @@ -3287,13 +4279,111 @@ dependencies = [ [[package]] name = "solana-rent" -version = "4.2.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9809b081e99bc142ce803bcd7ee18306759ce3b30a96a9da3f6f41c45e50ef0" +checksum = "39f0d780bf8e8a1fe8b5b5fce1acad6b209485b86dec246e7523d5e4a8b7c7fc" dependencies = [ "solana-sdk-macro", ] +[[package]] +name = "solana-reward-info" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82be7946105c2ee6be9f9ee7bd18a068b558389221d29efa92b906476102bfcc" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "solana-rpc-client" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a11dd2723748fb6a7a2b5b83e4186cb99f35f1384d8b310cd57122ea8627839a" +dependencies = [ + "async-trait", + "base64 0.22.1", + "bincode", + "bs58", + "futures", + "indicatif", + "log", + "reqwest", + "reqwest-middleware", + "semver", + "serde", + "serde_json", + "solana-account", + "solana-account-decoder", + "solana-account-decoder-client-types", + "solana-clock", + "solana-commitment-config", + "solana-epoch-info", + "solana-epoch-schedule", + "solana-feature-gate-interface", + "solana-hash 3.1.0", + "solana-instruction", + "solana-message", + "solana-pubkey 3.0.0", + "solana-rpc-client-api", + "solana-signature", + "solana-transaction", + "solana-transaction-error", + "solana-transaction-status-client-types", + "solana-version", + "solana-vote-interface", + "tokio", +] + +[[package]] +name = "solana-rpc-client-api" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a81a57ed54176e3aa4bca8e894f9326638a3f6870f79b078d8b3fadda8a4c9b" +dependencies = [ + "anyhow", + "jsonrpc-core", + "reqwest", + "reqwest-middleware", + "serde", + "serde_json", + "solana-account-decoder-client-types", + "solana-clock", + "solana-rpc-client-types", + "solana-signer", + "solana-transaction-error", + "solana-transaction-status-client-types", + "thiserror 2.0.18", +] + +[[package]] +name = "solana-rpc-client-types" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a6f06038b9f88ecaecb0d283a325040429c700c1d04526c015c2c8182686c9b" +dependencies = [ + "base64 0.22.1", + "bs58", + "semver", + "serde", + "serde_json", + "solana-account", + "solana-account-decoder-client-types", + "solana-address 1.1.0", + "solana-clock", + "solana-commitment-config", + "solana-fee-calculator", + "solana-inflation", + "solana-reward-info", + "solana-transaction", + "solana-transaction-error", + "solana-transaction-status-client-types", + "solana-version", + "spl-generic-token", + "thiserror 2.0.18", +] + [[package]] name = "solana-sanitize" version = "3.0.1" @@ -3373,14 +4463,14 @@ dependencies = [ "bs58", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] name = "solana-secp256k1-recover" -version = "3.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c5f18893d62e6c73117dcba48f8f5e3266d90e5ec3d0a0a90f9785adac36c1" +checksum = "e3a1ad3ed7846631c88c71c5d2f21a2ecb6b61da333d9be173b6b061b35609ae" dependencies = [ "k256", "solana-define-syscall 5.1.0", @@ -3427,9 +4517,9 @@ dependencies = [ [[package]] name = "solana-serialize-utils" -version = "3.1.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d7cc401931d178472358e6b78dc72d031dc08f752d7410f0e8bd259dd6f02fa" +checksum = "761357b0853c9623bf12c1d2314b3d6160a85b087b84c45224fb85766d22616b" dependencies = [ "solana-instruction-error", "solana-pubkey 4.2.0", @@ -3444,14 +4534,14 @@ checksum = "db7dc3011ea4c0334aaaa7e7128cb390ecf546b28d412e9bf2064680f57f588f" dependencies = [ "sha2 0.10.9", "solana-define-syscall 4.0.1", - "solana-hash 4.3.0", + "solana-hash 4.4.0", ] [[package]] name = "solana-short-vec" -version = "3.2.1" +version = "3.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb8cc883fc7b8ce4a7814cb1441b48c06437049ec11847005cf63bcfa85c546" +checksum = "7d8250a4495aad49ad20556a607da53bdcb20de78da10b65afbf918b7f1de647" dependencies = [ "serde_core", ] @@ -3463,15 +4553,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6c79722e299d957958bf33695f7cd1ef6724ff55563c60fd9e3e24487cccde2" dependencies = [ "solana-hard-forks", - "solana-hash 4.3.0", + "solana-hash 4.4.0", "solana-sha256-hasher", ] [[package]] name = "solana-signature" -version = "3.4.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a73c6e97cc2108be0adf6a6ea326434f8398df9d7eed81da2a4548b69e971c" +checksum = "b0364c7577c3c82a693ce28a1febc8d1b5d1b0a175fdc2114ae6186b69effe1e" dependencies = [ "ed25519-dalek", "five8", @@ -3485,37 +4575,39 @@ dependencies = [ [[package]] name = "solana-signer" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bfea97951fee8bae0d6038f39a5efcb6230ecdfe33425ac75196d1a1e3e3235" +checksum = "520bd6021163ee517f4bdc7ae03ded904f97e11320001ba0b3355f45eb14f558" dependencies = [ - "solana-pubkey 3.0.0", + "solana-pubkey 4.2.0", "solana-signature", "solana-transaction-error", ] [[package]] name = "solana-slot-hashes" -version = "3.0.2" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a57c158c35629f9e302ab385f16b15813f4927a31c27dda72f3df828bb08d93" +checksum = "5c7ce2b4b8911bf2db3de7b6266e67bfc21a6a9f8c566fb096d9782ca2ad16ee" dependencies = [ "serde", "serde_derive", - "solana-hash 4.3.0", + "solana-get-sysvar", + "solana-hash 4.4.0", "solana-sdk-ids", "solana-sysvar-id", ] [[package]] name = "solana-slot-history" -version = "3.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0622d03a823770f7763afd866e012b296d5a3cbbbe51e110b5bd9ab3441efdca" +checksum = "40427c04d3e808493cb5e3d1a97cef84d7c15cb6f89b15c5684d0d4027105600" dependencies = [ "bv", "serde", "serde_derive", + "solana-get-sysvar", "solana-sdk-ids", "solana-sysvar-id", ] @@ -3551,9 +4643,9 @@ dependencies = [ [[package]] name = "solana-svm-callback" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce7750f8e00d1116629b47ab0a9dba78b332d4e6583ee4e15df1b791dc834099" +checksum = "012617d16d2994673d98792f7f6d93f612dea00b1b747a3c4aec24c12547875b" dependencies = [ "solana-account", "solana-clock", @@ -3563,30 +4655,30 @@ dependencies = [ [[package]] name = "solana-svm-feature-set" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b991162ad8f2fa5e35f15c7d2c90bf8ad3fdfc269cc1eaac199749d60420e4" +checksum = "7cc2e2fdebd77159b7a14ee45c9dbb3f1d202e8e7ccc14e4cda78c006a7a78a9" [[package]] name = "solana-svm-log-collector" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d92fe6bc5e6376b28cba96cbb31c3158605a51d4b66bb5ed1a25233ef4c276" +checksum = "4ce188c2c438ced63a975af79f06db2ff5accaf1a4027a26e35783be566f6070" dependencies = [ "log", ] [[package]] name = "solana-svm-measure" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a1dd1d72be70c87927454988359177107925e3c328226358ed82f1b023061aa" +checksum = "fea64909ba06fa651c95c4db35614430b1a0bc722e51996e97b5b779e3528bad" [[package]] name = "solana-svm-timings" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12493e27f0fdcd34dcb1e7c0d41c88571dcec3ed704aaec405557bad7287f834" +checksum = "a8a05b09e2caac9b4d7c35c5997d754433e15ee5f506509117eb77032e1718ac" dependencies = [ "eager", "enum-iterator", @@ -3595,9 +4687,9 @@ dependencies = [ [[package]] name = "solana-svm-transaction" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae5b541edec0d134ff094d9f9394475ac242df424ecb98665c83849bebb0dde" +checksum = "be3250a278a769ba59059e13d0f16c2aba0ca1de7595fb0e02556091751560c8" dependencies = [ "solana-hash 3.1.0", "solana-message", @@ -3609,9 +4701,9 @@ dependencies = [ [[package]] name = "solana-svm-type-overrides" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c9f8e9939fd6ae4d9b1072de19500380f3dc7b990439b304b504219016cc3d" +checksum = "3b78cd0bfb102d4197ce8c590f800a119ba0d358369ca57b0f66e94d1317fd0e" dependencies = [ "rand 0.8.6", ] @@ -3648,9 +4740,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad3cdd09f7d9e13f41c7e107ef96445a2249085be5da217b1e7ef1deb126b543" +checksum = "8b4b6faeddf5a62c06991a9a077fd1097da6867060f884595a659b3b24dc3a4a" dependencies = [ "bincode", "log", @@ -3691,7 +4783,7 @@ dependencies = [ "solana-epoch-rewards", "solana-epoch-schedule", "solana-fee-calculator", - "solana-hash 4.3.0", + "solana-hash 4.4.0", "solana-instruction", "solana-last-restart-slot", "solana-program-entrypoint", @@ -3732,7 +4824,7 @@ dependencies = [ "serde", "serde_derive", "solana-address 2.6.1", - "solana-hash 4.3.0", + "solana-hash 4.4.0", "solana-instruction", "solana-instruction-error", "solana-message", @@ -3746,9 +4838,9 @@ dependencies = [ [[package]] name = "solana-transaction-context" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5378750bacbb3e3c19203588a240e725712e2e92336aa345ece0efb67258215" +checksum = "b1a3c3a69688293a195b02c60a5384d855b8de19981f404c71ccb9e7f139b98f" dependencies = [ "bincode", "serde", @@ -3763,9 +4855,9 @@ dependencies = [ [[package]] name = "solana-transaction-error" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a2165ad25b694c654d5395fc7a049452a192376e4c96a7fad05580f6ba5ba1c" +checksum = "757a648388ab1e7350a806ffceb31ce656dc5b5fe607b9f8209aa56f63040179" dependencies = [ "serde", "serde_derive", @@ -3774,36 +4866,74 @@ dependencies = [ ] [[package]] -name = "solana-vote-interface" -version = "4.0.4" +name = "solana-transaction-status-client-types" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6e123e16bfdd7a81d71b4c4699e0b29580b619f4cd2ef5b6aae1eb85e8979f" +checksum = "11f7c3d15f25111cd1e320ad8ee3515ccae9983ab750cec83517c8553419b70a" dependencies = [ + "base64 0.22.1", "bincode", - "cfg_eval", - "num-derive", - "num-traits", + "bs58", "serde", - "serde_derive", - "serde_with", - "solana-clock", - "solana-hash 3.1.0", + "serde_json", + "solana-account-decoder-client-types", + "solana-commitment-config", "solana-instruction", - "solana-instruction-error", + "solana-message", "solana-pubkey 3.0.0", - "solana-rent 3.1.0", - "solana-sdk-ids", - "solana-serde-varint", - "solana-serialize-utils", - "solana-short-vec", - "solana-system-interface 2.0.0", -] + "solana-reward-info", + "solana-signature", + "solana-transaction", + "solana-transaction-context", + "solana-transaction-error", + "thiserror 2.0.18", +] + +[[package]] +name = "solana-version" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8b34a38f1aab0be22e3d9810c84229a5668a50839fc38e9a409912dabbc227" +dependencies = [ + "agave-feature-set", + "rand 0.8.6", + "semver", + "serde", + "solana-sanitize", + "solana-serde-varint", +] + +[[package]] +name = "solana-vote-interface" +version = "4.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db6e123e16bfdd7a81d71b4c4699e0b29580b619f4cd2ef5b6aae1eb85e8979f" +dependencies = [ + "bincode", + "cfg_eval", + "num-derive", + "num-traits", + "serde", + "serde_derive", + "serde_with", + "solana-clock", + "solana-hash 3.1.0", + "solana-instruction", + "solana-instruction-error", + "solana-pubkey 3.0.0", + "solana-rent 3.1.0", + "solana-sdk-ids", + "solana-serde-varint", + "solana-serialize-utils", + "solana-short-vec", + "solana-system-interface 2.0.0", +] [[package]] name = "solana-vote-program" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc892d65dd35e791b495e118ab33b8ac823846b4fb733ebede592a50bc133cff" +checksum = "4164d0eb4760cbdb3dd46457999dba735079774381fe4042a70ec7484930a297" dependencies = [ "agave-feature-set", "bincode", @@ -3831,11 +4961,22 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "solana-zero-copy" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea15126ebdc7e270c50d43884369af9f51d2308156d46a18e351522a164844d" +dependencies = [ + "borsh", + "bytemuck", + "bytemuck_derive", +] + [[package]] name = "solana-zk-elgamal-proof-program" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f5958bf5724955730ee67ee02200eede18c2400f9c614f491c21bb83448f34" +checksum = "14f30c80edc4aac841745f7e93bbf1afc27d2b496b8ae9fe9777935151cb9352" dependencies = [ "agave-feature-set", "bytemuck", @@ -3887,9 +5028,9 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1969df9bfd95199f5248969dd7a46e465982205bf836a12b9c4c6d969c7c95b6" +checksum = "962938a9994cc6d54b46b5f0d6a978024f4847272f560f8f11edd1575a0d8e8f" dependencies = [ "agave-feature-set", "bytemuck", @@ -3904,9 +5045,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "3.1.9" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8171bc921005f8f37c551c5d03a76fc9f919bcd64e987752be48c0b00a1aeeba" +checksum = "6e5fe47f0389206960e272a6f1af3b06c2b32551be77f9e4254564b6d1177b83" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -3956,6 +5097,178 @@ dependencies = [ "solana-pubkey 3.0.0", ] +[[package]] +name = "spl-discriminator" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e597c5ff9ed7c74a54dbc47bae2f06e4db8c98f4356ad280200dc11878266db1" +dependencies = [ + "bytemuck", + "solana-program-error", + "solana-sha256-hasher", + "spl-discriminator-derive", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" +dependencies = [ + "quote", + "spl-discriminator-syn", + "syn 2.0.118", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d1dbc82ab91422345b6df40a79e2b78c7bce1ebb366da323572dd60b7076b67" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.9", + "syn 2.0.118", + "thiserror 1.0.69", +] + +[[package]] +name = "spl-generic-token" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233df81b75ab99b42f002b5cdd6e65a7505ffa930624f7096a7580a56765e9cf" +dependencies = [ + "bytemuck", + "solana-pubkey 3.0.0", +] + +[[package]] +name = "spl-pod" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f9c6e142cdf1e7e77f480053ec9f0ce989890768ddf91f619b50f39d1b456f5" +dependencies = [ + "borsh", + "bytemuck", + "bytemuck_derive", + "num-derive", + "num-traits", + "num_enum", + "solana-program-error", + "solana-program-option", + "solana-pubkey 3.0.0", + "solana-zero-copy", + "solana-zk-sdk", + "thiserror 2.0.18", +] + +[[package]] +name = "spl-token" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "878b0183d51fcd8a53e1604f4c13321894cf53227e6773c529b0d03d499a8dfd" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-account-info", + "solana-cpi", + "solana-instruction", + "solana-msg", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey 3.0.0", + "solana-rent 3.1.0", + "solana-sdk-ids", + "solana-sysvar", + "spl-token-interface", + "thiserror 2.0.18", +] + +[[package]] +name = "spl-token-2022-interface" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fcd81188211f4b3c8a5eba7fd534c7142f9dd026123b3472492782cc72f4dc6" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-account-info", + "solana-instruction", + "solana-program-error", + "solana-program-option", + "solana-program-pack", + "solana-pubkey 3.0.0", + "solana-sdk-ids", + "solana-zk-sdk", + "spl-pod", + "spl-token-confidential-transfer-proof-extraction", + "spl-token-confidential-transfer-proof-generation", + "spl-token-group-interface", + "spl-token-metadata-interface", + "spl-type-length-value", + "thiserror 2.0.18", +] + +[[package]] +name = "spl-token-confidential-transfer-proof-extraction" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879a9ebad0d77383d3ea71e7de50503554961ff0f4ef6cbca39ad126e6f6da3a" +dependencies = [ + "bytemuck", + "solana-account-info", + "solana-curve25519", + "solana-instruction", + "solana-instructions-sysvar", + "solana-msg", + "solana-program-error", + "solana-pubkey 3.0.0", + "solana-sdk-ids", + "solana-zk-sdk", + "spl-pod", + "thiserror 2.0.18", +] + +[[package]] +name = "spl-token-confidential-transfer-proof-generation" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0cd59fce3dc00f563c6fa364d67c3f200d278eae681f4dc250240afcfe044b1" +dependencies = [ + "curve25519-dalek", + "solana-zk-sdk", + "thiserror 2.0.18", +] + +[[package]] +name = "spl-token-group-interface" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841cbd6f2322d02719be4da1affedbe6495b1048b7b985ec9796032564026e22" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-address 2.6.1", + "solana-instruction", + "solana-nullable", + "solana-program-error", + "solana-zero-copy", + "spl-discriminator", + "thiserror 2.0.18", +] + [[package]] name = "spl-token-interface" version = "2.0.0" @@ -3976,6 +5289,48 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "spl-token-metadata-interface" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c467c7c3bd056f8fe60119e7ec34ddd6f23052c2fa8f1f51999098063b72676" +dependencies = [ + "borsh", + "num-derive", + "num-traits", + "solana-borsh", + "solana-instruction", + "solana-program-error", + "solana-pubkey 3.0.0", + "spl-discriminator", + "spl-pod", + "spl-type-length-value", + "thiserror 2.0.18", +] + +[[package]] +name = "spl-type-length-value" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2504631748c48d2a937414d64a12dcac4588d34bd07d355d648619c189d29435" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-account-info", + "solana-program-error", + "solana-zero-copy", + "spl-discriminator", + "thiserror 2.0.18", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + [[package]] name = "strsim" version = "0.11.1" @@ -4001,15 +5356,35 @@ 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", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + [[package]] name = "tempfile" version = "3.27.0" @@ -4017,10 +5392,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -4056,7 +5431,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -4067,7 +5442,17 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", ] [[package]] @@ -4085,6 +5470,57 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "tokio" +version = "1.52.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml_datetime" version = "1.1.1+spec-1.1.0" @@ -4096,9 +5532,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.11+spec-1.1.0" +version = "0.25.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" +checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" dependencies = [ "indexmap", "toml_datetime", @@ -4115,11 +5551,86 @@ dependencies = [ "winnow", ] +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "async-compression", + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "pin-project-lite", + "tokio", + "tokio-util", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] name = "typenum" -version = "1.20.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "unarray" @@ -4133,6 +5644,18 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unit-prefix" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" + [[package]] name = "universal-hash" version = "0.5.1" @@ -4152,6 +5675,12 @@ dependencies = [ "void", ] +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "uriparse" version = "0.6.4" @@ -4162,6 +5691,30 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "version_check" version = "0.9.5" @@ -4183,6 +5736,15 @@ dependencies = [ "libc", ] +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -4197,18 +5759,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", ] [[package]] name = "wasm-bindgen" -version = "0.2.121" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" dependencies = [ "cfg-if", "once_cell", @@ -4217,11 +5779,21 @@ dependencies = [ "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "wasm-bindgen-macro" -version = "0.2.121" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4229,26 +5801,55 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.121" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.121" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" dependencies = [ "unicode-ident", ] +[[package]] +name = "web-sys" +version = "0.3.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf85cb06032201fa7c6f829d7db5a7e5aa45bcc0655327713065f6f0576731bf" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "winapi" version = "0.3.9" @@ -4273,9 +5874,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "wincode" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37095eb18dd6254c66217edc61a29d83d51f8818de8a2ffe88e4584ad73fb5f9" +checksum = "66d967db7705dc29120bb6e8ce5b5a2e27734ed5976d1c904e95bd238d1c3c5a" dependencies = [ "pastey", "proc-macro2", @@ -4286,14 +5887,14 @@ dependencies = [ [[package]] name = "wincode-derive" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e262d55d1261f31e2cfe49cc6385a421d14d99faa0526bbe3cc1bda0d3005c62" +checksum = "15ab90b719560d0fda79c74550ad1c948d17b118765942838055ebaf34d67071" dependencies = [ - "darling 0.21.3", + "darling", "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", ] [[package]] @@ -4302,6 +5903,24 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +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" @@ -4311,6 +5930,135 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + [[package]] name = "winnow" version = "1.0.3" @@ -4326,44 +6074,127 @@ version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", + "synstructure", +] + [[package]] name = "zerocopy" -version = "0.8.48" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 2.0.118", + "synstructure", ] [[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", - "syn 2.0.117", + "syn 2.0.118", +] + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", ] [[package]] @@ -4371,3 +6202,31 @@ name = "zmij" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index a5ee9da..6f16d7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "2" -members = ["client", "interface", "programs/settlement", "programs/test/cpi-caller"] +members = ["test-cli", "client", "interface", "programs/settlement", "programs/test/cpi-caller"] [workspace.package] version = "0.1.0" @@ -11,7 +11,12 @@ edition = "2021" license = "MIT OR Apache-2.0" [workspace.dependencies] +anyhow = "1" arrayref = "0.3" +clap = { version = "4", features = ["derive", "env"] } +solana-commitment-config = "3" +solana-program-pack = "3" +solana-rpc-client = "3" derive_more = { version = "1", features = ["deref"] } hex-literal = "1" litesvm = "0.12.0" @@ -34,6 +39,8 @@ solana-sdk = "3" solana-sdk-ids = "3" solana-sha256-hasher = { version = "3", features = ["sha2"] } solana-system-interface = "3" +spl-associated-token-account-interface = { version = "2" } +spl-token = "9" spl-token-interface = "2" [workspace.metadata.cli] diff --git a/interface/src/data/intent.rs b/interface/src/data/intent.rs index 3686f6d..fbab54c 100644 --- a/interface/src/data/intent.rs +++ b/interface/src/data/intent.rs @@ -87,7 +87,7 @@ pub struct OrderIntent { /// /// Layout: one character per byte, cell widths proportional to field size, /// each divider belongs to the cell on its right. The byte range is -/// annotated below. Amounts and `valid_to` are big-endian encoded. +/// annotated below. Amounts and `valid_to` are little-endian encoded. /// /// ```text /// partially_fillable ─────┐ @@ -178,9 +178,9 @@ impl From<&OrderIntent> for EncodedOrderIntent { *owner = intent.owner.to_bytes(); *buy_token = intent.buy_token_account.to_bytes(); *sell_token = intent.sell_token_account.to_bytes(); - *sell_amount = intent.sell_amount.to_be_bytes(); - *buy_amount = intent.buy_amount.to_be_bytes(); - *valid_to = intent.valid_to.to_be_bytes(); + *sell_amount = intent.sell_amount.to_le_bytes(); + *buy_amount = intent.buy_amount.to_le_bytes(); + *valid_to = intent.valid_to.to_le_bytes(); *kind = [intent.kind as u8]; *partially_fillable = [intent.partially_fillable as u8]; *app_data = intent.app_data; @@ -226,9 +226,9 @@ impl TryFrom<&[u8; EncodedOrderIntent::SIZE]> for OrderIntent { owner: Pubkey::new_from_array(*owner), buy_token_account: Pubkey::new_from_array(*buy_token), sell_token_account: Pubkey::new_from_array(*sell_token), - sell_amount: u64::from_be_bytes(*sell_amount), - buy_amount: u64::from_be_bytes(*buy_amount), - valid_to: u32::from_be_bytes(*valid_to), + sell_amount: u64::from_le_bytes(*sell_amount), + buy_amount: u64::from_le_bytes(*buy_amount), + valid_to: u32::from_le_bytes(*valid_to), kind: match kind { [0] => OrderKind::Sell, [1] => OrderKind::Buy, @@ -457,7 +457,7 @@ mod tests { #[test] fn uid_digest_regression() { let intent = sample_intent(OrderKind::Buy, true); - let expected = hex!("091d7e1959ac6f7a400a91f1dcd9ce436f8f53e2b7a1d968acb08f79d3c1231d"); + let expected = hex!("7ce7c6a74671090771fa33851387444064aca759ce55b80708723076722f5e00"); assert_eq!(intent.uid(), Hash::from(expected)); } @@ -482,12 +482,12 @@ mod tests { 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - // sell_amount (0x0123_4567_89ab_cdef, BE u64) - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - // buy_amount (0xfedc_ba98_7654_3210, BE u64) - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, - // valid_to (0xdead_beef, BE u32) - 0xde, 0xad, 0xbe, 0xef, + // sell_amount (0x0123_4567_89ab_cdef, LE u64) + 0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, + // buy_amount (0xfedc_ba98_7654_3210, LE u64) + 0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe, + // valid_to (0xdead_beef, LE u32) + 0xef, 0xbe, 0xad, 0xde, // kind (Buy = 1) 0x01, // partially_fillable (true = 1) diff --git a/interface/src/data/mod.rs b/interface/src/data/mod.rs index 47a4a0f..8365c12 100644 --- a/interface/src/data/mod.rs +++ b/interface/src/data/mod.rs @@ -4,3 +4,4 @@ pub mod intent; pub mod order; +pub mod state; diff --git a/interface/src/data/order.rs b/interface/src/data/order.rs index 2130523..edea997 100644 --- a/interface/src/data/order.rs +++ b/interface/src/data/order.rs @@ -51,40 +51,49 @@ pub struct OrderAccount { pub intent: OrderIntent, } -/// Canonical 199-byte representation of an [`OrderAccount`]. The bytes +/// Canonical 200-byte representation of an [`OrderAccount`]. The bytes /// written to/read from the order PDA's data area. /// /// Layout: one character per byte, cell widths proportional to field size, -/// each divider belongs to the cell on its right. Integers are big-endian. -/// The intent slot holds a verbatim [`EncodedOrderIntent`]; see that -/// type's docs for its inner layout. +/// each divider belongs to the cell on its right. Integers are little-endian +/// (Anchor/Borsh convention). The intent slot holds a verbatim +/// [`EncodedOrderIntent`]; see that type's docs for its inner layout. /// /// ```text -/// ┌──── cancelled +/// ┌──── discriminator +/// │┌─── cancelled /// ┌┬───────┬───────┬───────────────────────────────┬─────────────────...─────────────────┐ /// ││amount_│amount_│ │ │ /// ││with- │re- │ created_by │ intent (EncodedOrderIntent) │ /// ││drawn │ceived │ │ │ /// └┴───────┴───────┴───────────────────────────────┴─────────────────...─────────────────┘ -/// 0 1 9 17 49 ... 199 +/// 0 1 2 10 18 ... 200 /// ``` +/// +/// The first byte is an IDL-style account discriminator (see +/// [`EncodedOrderAccount::DISCRIMINATOR`]), letting IDL-driven tooling (e.g. +/// Solscan) identify the account type before decoding the rest. #[derive(Clone, Debug, Deref, Eq, PartialEq)] pub struct EncodedOrderAccount([u8; Self::SIZE]); impl EncodedOrderAccount { // Per-field widths, derived from the `OrderAccount` field types. + const W_DISCRIMINATOR: usize = 1; const W_CANCELLED: usize = size_of::(); const W_AMOUNT_WITHDRAWN: usize = size_of::(); const W_AMOUNT_RECEIVED: usize = size_of::(); const W_CREATED_BY: usize = size_of::(); const W_INTENT: usize = EncodedOrderIntent::SIZE; - pub const SIZE: usize = 199; + pub const SIZE: usize = 200; + + /// Single-byte account discriminator. See [`crate::SettlementAccount`]. + pub const DISCRIMINATOR: [u8; 1] = [crate::SettlementAccount::OrderAccount.discriminator()]; /// Decode the account body and compute the embedded intent's UID in one /// shot, mirroring [`EncodedOrderIntent::decode_and_hash`]. Decoding - /// validates the intent; returns [`ProgramError::InvalidAccountData`] on a - /// decode error. + /// validates the discriminator and the intent; returns + /// [`ProgramError::InvalidAccountData`] on a decode error. pub fn decode_and_hash(bytes: &[u8; Self::SIZE]) -> Result<(OrderAccount, Hash), ProgramError> { let order_account = OrderAccount::try_from(*bytes)?; // The order UID is the hash of the intent's canonical bytes. Decoding @@ -111,17 +120,26 @@ pub fn write_account( created_by: &Pubkey, encoded_intent: &[u8; EncodedOrderIntent::SIZE], ) { - let (cancelled_slot, amount_withdrawn_slot, amount_received_slot, created_by_slot, intent_slot) = mut_array_refs![ + let ( + discriminator_slot, + cancelled_slot, + amount_withdrawn_slot, + amount_received_slot, + created_by_slot, + intent_slot, + ) = mut_array_refs![ buffer, + EncodedOrderAccount::W_DISCRIMINATOR, EncodedOrderAccount::W_CANCELLED, EncodedOrderAccount::W_AMOUNT_WITHDRAWN, EncodedOrderAccount::W_AMOUNT_RECEIVED, EncodedOrderAccount::W_CREATED_BY, EncodedOrderAccount::W_INTENT ]; + *discriminator_slot = EncodedOrderAccount::DISCRIMINATOR; *cancelled_slot = [cancelled as u8]; - *amount_withdrawn_slot = amount_withdrawn.to_be_bytes(); - *amount_received_slot = amount_received.to_be_bytes(); + *amount_withdrawn_slot = amount_withdrawn.to_le_bytes(); + *amount_received_slot = amount_received.to_le_bytes(); *created_by_slot = created_by.to_bytes(); *intent_slot = *encoded_intent; } @@ -151,8 +169,9 @@ impl TryFrom<[u8; EncodedOrderAccount::SIZE]> for OrderAccount { type Error = ProgramError; fn try_from(bytes: [u8; EncodedOrderAccount::SIZE]) -> Result { - let (cancelled, amount_withdrawn, amount_received, created_by, intent) = array_refs![ + let (discriminator, cancelled, amount_withdrawn, amount_received, created_by, intent) = array_refs![ &bytes, + EncodedOrderAccount::W_DISCRIMINATOR, EncodedOrderAccount::W_CANCELLED, EncodedOrderAccount::W_AMOUNT_WITHDRAWN, EncodedOrderAccount::W_AMOUNT_RECEIVED, @@ -160,14 +179,18 @@ impl TryFrom<[u8; EncodedOrderAccount::SIZE]> for OrderAccount { EncodedOrderAccount::W_INTENT ]; + if *discriminator != EncodedOrderAccount::DISCRIMINATOR { + return Err(ProgramError::InvalidAccountData); + } + Ok(OrderAccount { cancelled: match cancelled { [0] => false, [1] => true, _ => return Err(ProgramError::InvalidAccountData), }, - amount_withdrawn: u64::from_be_bytes(*amount_withdrawn), - amount_received: u64::from_be_bytes(*amount_received), + amount_withdrawn: u64::from_le_bytes(*amount_withdrawn), + amount_received: u64::from_le_bytes(*amount_received), created_by: Pubkey::new_from_array(*created_by), intent: OrderIntent::try_from(intent).map_err(|_| ProgramError::InvalidAccountData)?, }) @@ -193,8 +216,8 @@ pub mod fixtures { }; // Hardcoded but verified in a sanity-check test. - pub const CANCELLED_OFFSET: usize = 0; - pub const INTENT_OFFSET: usize = 49; + pub const CANCELLED_OFFSET: usize = 1; + pub const INTENT_OFFSET: usize = 50; /// Hand-picked example order account wrapping [`sample_intent`]. pub fn sample_account(cancelled: bool) -> OrderAccount { @@ -321,6 +344,15 @@ mod tests { ); } + #[test] + fn decode_rejects_wrong_discriminator() { + let mut bytes: [u8; EncodedOrderAccount::SIZE] = + EncodedOrderAccount::from(sample_account(false)).into(); + bytes[0] ^= 0xff; + let err = OrderAccount::try_from(bytes).expect_err("wrong discriminator must be rejected"); + assert_eq!(err, ProgramError::InvalidAccountData); + } + #[test] fn decode_rejects_non_boolean_cancelled() { let mut bytes: [u8; EncodedOrderAccount::SIZE] = @@ -416,6 +448,8 @@ mod tests { kind in arb_order_kind(), partially_fillable in any::(), ) { + bytes[..EncodedOrderAccount::DISCRIMINATOR.len()] + .copy_from_slice(&EncodedOrderAccount::DISCRIMINATOR); bytes[CANCELLED_OFFSET] = cancelled as u8; bytes[INTENT_OFFSET + KIND_OFFSET] = kind as u8; bytes[INTENT_OFFSET + PARTIALLY_FILLABLE_OFFSET] = partially_fillable as u8; diff --git a/interface/src/data/state.rs b/interface/src/data/state.rs new file mode 100644 index 0000000..1c260dc --- /dev/null +++ b/interface/src/data/state.rs @@ -0,0 +1,40 @@ +//! Settlement state PDA body. +//! +//! The state PDA carries no fields of its own (see [`crate::pda::state`]); its +//! only content is the account discriminator, so that IDL-driven tooling can +//! identify the account type. + +use solana_program_error::ProgramError; + +use crate::SettlementAccount; + +/// Canonical size of the settlement state PDA's body: just the discriminator. +pub const SIZE: usize = 1; + +/// Single-byte account discriminator. See [`crate::SettlementAccount`]. +pub const DISCRIMINATOR: [u8; SIZE] = [SettlementAccount::SettlementState.discriminator()]; + +/// Validate that `bytes` carries the expected discriminator. +pub fn decode(bytes: &[u8; SIZE]) -> Result<(), ProgramError> { + if *bytes != DISCRIMINATOR { + return Err(ProgramError::InvalidAccountData); + } + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn decode_accepts_discriminator() { + assert_eq!(decode(&DISCRIMINATOR), Ok(())); + } + + #[test] + fn decode_rejects_wrong_discriminator() { + let mut bytes = DISCRIMINATOR; + bytes[0] ^= 0xff; + assert_eq!(decode(&bytes), Err(ProgramError::InvalidAccountData)); + } +} diff --git a/interface/src/instruction/initialize.rs b/interface/src/instruction/initialize.rs index ce37dfd..16d0fea 100644 --- a/interface/src/instruction/initialize.rs +++ b/interface/src/instruction/initialize.rs @@ -54,7 +54,7 @@ impl From for Instruction { /// Parsed inputs of an `Initialize` instruction. pub struct InitializeInput<'a> { pub payer: &'a AccountView, - pub state_pda: &'a AccountView, + pub state_pda: &'a mut AccountView, } impl<'a> InstructionInputParsing<'a> for InitializeInput<'a> { diff --git a/interface/src/instruction/settle/begin.rs b/interface/src/instruction/settle/begin.rs index c690008..059e4de 100644 --- a/interface/src/instruction/settle/begin.rs +++ b/interface/src/instruction/settle/begin.rs @@ -33,7 +33,7 @@ pub struct Pull { /// the builder. /// /// Wire format (grouped, with `n` orders and `T` total transfers): -/// `[discriminator=0][finalize_ix_index: u16 BE][n: u8][bump×n][transfer_count×n] +/// `[discriminator=0][finalize_ix_index: u16 LE][n: u8][bump×n][transfer_count×n] /// [amount: u64 BE ×T]`. /// Required accounts: `[instructions_sysvar (R), state_pda (R), token_program /// (R)]` followed, per order, by `[order_pda (R), sell_token_account (W), @@ -79,7 +79,7 @@ impl From> for Instruction { .collect(); let data = [ &[SettlementInstruction::BeginSettle.discriminator()][..], - &finalize_ix_index.to_be_bytes()[..], + &finalize_ix_index.to_le_bytes()[..], &[order_pdas.len() as u8][..], &order .iter() @@ -309,7 +309,7 @@ mod tests { data, [ &[SettlementInstruction::BeginSettle.discriminator()][..], - &hex!("1337")[..], // counterpart index + &hex!("3713")[..], // counterpart index, little-endian &[0][..], // order count ] .concat(), @@ -354,7 +354,7 @@ mod tests { data, [ &[SettlementInstruction::BeginSettle.discriminator()][..], - &hex!("1337")[..], // counterpart index + &hex!("3713")[..], // counterpart index, little-endian &[2][..], // order count &[low_bump, high_bump][..], // bumps &[0, 0][..], // transfer counts (both zero) @@ -430,7 +430,7 @@ mod tests { data, [ &[SettlementInstruction::BeginSettle.discriminator()][..], - &hex!("1337")[..], // counterpart index + &hex!("3713")[..], // counterpart index, little-endian &[2][..], // order count &[0xa1, 0xb1][..], // bumps &[2, 1][..], // counts @@ -480,7 +480,7 @@ mod tests { ]; let data = ix_data![ [SettlementInstruction::BeginSettle.discriminator()], - [0x13, 0x37], // finalize index + [0x37, 0x13], // finalize index, little-endian [0x00], // order count ]; let BeginSettleInput { @@ -539,7 +539,7 @@ mod tests { ]; let data = ix_data![ [SettlementInstruction::BeginSettle.discriminator()], - [0x13, 0x37], // finalize index + [0x37, 0x13], // finalize index, little-endian [0x01], // order count [0xab], // one order's bump [0x00], // that order's transfer count @@ -585,7 +585,7 @@ mod tests { ]; let data = ix_data![ [SettlementInstruction::BeginSettle.discriminator()], - [0x13, 0x37], // finalize index + [0x37, 0x13], // finalize index, little-endian [0x01], // order count [0xab], // bump [0x02], // transfer count @@ -640,7 +640,7 @@ mod tests { // then all transfer counts (every order has zero transfers). let data = ix_data![ [SettlementInstruction::BeginSettle.discriminator()], - [0x13, 0x37], // finalize index + [0x37, 0x13], // finalize index, little-endian [ORDER_COUNT as u8], // order count bumps, [0u8; ORDER_COUNT], diff --git a/interface/src/instruction/settle/finalize.rs b/interface/src/instruction/settle/finalize.rs index e6dc737..ae55bad 100644 --- a/interface/src/instruction/settle/finalize.rs +++ b/interface/src/instruction/settle/finalize.rs @@ -17,7 +17,7 @@ use super::{recover_counterpart, INSTRUCTIONS_SYSVAR_ID}; /// `begin_ix_index` is the index of the paired `BeginSettle` instruction in the /// same transaction. /// -/// Wire format: `[discriminator=1, begin_ix_index: u16 BE]`, 3 bytes. +/// Wire format: `[discriminator=1, begin_ix_index: u16 LE]`, 3 bytes. /// Required accounts: `[instructions_sysvar (R)]`. pub struct FinalizeSettle { pub program_id: Pubkey, @@ -31,7 +31,7 @@ impl From for Instruction { accounts: vec![AccountMeta::new_readonly(INSTRUCTIONS_SYSVAR_ID, false)], data: [ &[SettlementInstruction::FinalizeSettle.discriminator()], - &builder.begin_ix_index.to_be_bytes()[..], + &builder.begin_ix_index.to_le_bytes()[..], ] .concat(), } @@ -86,7 +86,7 @@ mod tests { data, [ &[SettlementInstruction::FinalizeSettle.discriminator()][..], - &hex!("1337")[..], // counterpart index + &hex!("3713")[..], // counterpart index, little-endian ] .concat(), ); @@ -104,7 +104,7 @@ mod tests { let mut accounts = [fake_account(address)]; let data = ix_data![ [SettlementInstruction::FinalizeSettle.discriminator()], - [0x13, 0x37], // begin index + [0x37, 0x13], // begin index, little-endian ]; let FinalizeSettleInput { begin_ix_index, @@ -147,7 +147,7 @@ mod tests { let mut accounts = [fake_account(first_address), fake_account(second_address)]; let data = ix_data![ [SettlementInstruction::FinalizeSettle.discriminator()], - [0x13, 0x37], // begin index + [0x37, 0x13], // begin index, little-endian [42], // extra ]; let FinalizeSettleInput { diff --git a/interface/src/instruction/settle/mod.rs b/interface/src/instruction/settle/mod.rs index d9afa22..c4ac4c4 100644 --- a/interface/src/instruction/settle/mod.rs +++ b/interface/src/instruction/settle/mod.rs @@ -13,16 +13,16 @@ pub use begin::{BeginSettle, BeginSettleInput, Pull, SettledOrder, SettledOrders pub use finalize::{FinalizeSettle, FinalizeSettleInput}; /// Reads the first two bytes of a byte slice (instruction data) and -/// interprets them as a big-endian u16, returning it together with the +/// interprets them as a little-endian u16, returning it together with the /// remaining bytes to parse. /// It's meant to be used for BeginSettle and FinalizeSettle to extract the /// counterpart index, that is, the index linking that instruction to the /// opposite instruction which is encoded as the first -/// 2 bytes of the instruction data: `[0x13, 0x37]` → `0x1337`. +/// 2 bytes of the instruction data: `[0x37, 0x13]` → `0x1337`. /// Returns `InvalidInstructionData` if fewer than two bytes are provided. pub fn recover_counterpart(instruction_data: &[u8]) -> Result<(u16, &[u8]), ProgramError> { match instruction_data { - [b1, b2, rest @ ..] => Ok((u16::from_be_bytes([*b1, *b2]), rest)), + [b1, b2, rest @ ..] => Ok((u16::from_le_bytes([*b1, *b2]), rest)), _ => Err(ProgramError::InvalidInstructionData), } } @@ -35,7 +35,7 @@ mod tests { /// Builds an instruction-data byte vector from a list of field chunks, so a /// test can spell out the wire layout one field per line without repeating /// the `&[..][..]` slicing. Each chunk is anything sliceable to `[u8]` (a - /// byte array, a `Vec`, the result of `to_be_bytes()`, ...). + /// byte array, a `Vec`, the result of `to_le_bytes()`, ...). macro_rules! ix_data { ($($chunk:expr),* $(,)?) => { [$(&$chunk[..]),*].concat() @@ -64,7 +64,7 @@ mod tests { assert_eq!( recover_counterpart( &[ - &hex!("1337")[..], // counterpart index + &hex!("3713")[..], // counterpart index, little-endian &[42][..], // trailing ] .concat() diff --git a/interface/src/lib.rs b/interface/src/lib.rs index 732831d..c5590e4 100644 --- a/interface/src/lib.rs +++ b/interface/src/lib.rs @@ -34,6 +34,30 @@ impl SettlementInstruction { } } +/// Identifies the account type a given account's data belongs to, via the +/// single discriminator byte stored at its front. Starts at 128 to keep +/// account discriminators visually distinct from instruction discriminators. +#[derive(Clone, Copy, Debug, Eq, PartialEq, num_enum::TryFromPrimitive)] +#[repr(u8)] +#[num_enum(error_type( + name = ProgramError, + constructor = SettlementAccount::unknown_discriminator, +))] +pub enum SettlementAccount { + OrderAccount = 128, + SettlementState = 129, +} + +impl SettlementAccount { + pub const fn discriminator(self) -> u8 { + self as u8 + } + + fn unknown_discriminator(_: u8) -> ProgramError { + ProgramError::InvalidAccountData + } +} + /// Recover the discriminator from the first byte of the payload and the /// remaining bytes to parse. /// Returns `InvalidInstructionData` for an insufficient length or an @@ -175,4 +199,30 @@ mod tests { Ok(SettlementInstruction::BeginSettle) ); } + + #[test] + fn settlement_account_try_from_partitions_all_bytes() { + for i in u8::MIN..=u8::MAX { + match SettlementAccount::try_from(i) { + Ok(account) => assert_eq!(account as u8, i), + Err(err) => assert_eq!(err, ProgramError::InvalidAccountData), + } + } + } + + #[test] + fn settlement_account_try_from_matches_order_account() { + assert_eq!( + SettlementAccount::try_from(128), + Ok(SettlementAccount::OrderAccount) + ); + } + + #[test] + fn settlement_account_discriminators_are_distinct() { + assert_ne!( + SettlementAccount::OrderAccount.discriminator(), + SettlementAccount::SettlementState.discriminator(), + ); + } } diff --git a/programs/settlement/idl/cow_settlement.json b/programs/settlement/idl/cow_settlement.json new file mode 100644 index 0000000..e9ca134 --- /dev/null +++ b/programs/settlement/idl/cow_settlement.json @@ -0,0 +1,430 @@ +{ + "address": "MooohhPEAAHwAwEozL7JPEmnDvaahuUpccYN4Yb8ccK", + "metadata": { + "name": "cow_settlement", + "version": "0.1.0", + "spec": "0.1.0", + "description": "CoW Protocol settlement program. HAND-WRITTEN IDL: this program is a native/Pinocchio program, not built with the Anchor framework, so this file was authored manually to describe its wire format as closely as the Anchor IDL grammar allows. See the per-instruction/type docs for spots where the on-chain format cannot be fully expressed (non-standard 1-byte instruction discriminators, and BeginSettle's dynamically-shaped tail)." + }, + "instructions": [ + { + "name": "initialize", + "docs": [ + "Creates the singleton settlement state PDA. Succeeds only once.", + "Non-standard discriminator: this program uses a single instruction-selector byte (see SettlementInstruction in the Rust source), not Anchor's usual 8-byte sighash. The `discriminator` below reflects the real on-chain bytes." + ], + "discriminator": [3], + "accounts": [ + { + "name": "payer", + "writable": true, + "signer": true, + "docs": [ + "Funds the state PDA's rent and pays the transaction fee." + ] + }, + { + "name": "state_pda", + "writable": true, + "pda": { + "seeds": [ + { + "kind": "const", + "value": [115, 101, 116, 116, 108, 101, 109, 101, 110, 116] + } + ] + }, + "docs": [ + "Canonical PDA seeded by the literal string \"settlement\"." + ] + }, + { + "name": "system_program", + "address": "11111111111111111111111111111111" + } + ], + "args": [] + }, + { + "name": "create_buffer", + "docs": [ + "Creates one or more per-token buffer PDAs (SPL token accounts) in a single instruction.", + "IDL MODELING NOTE: the real instruction accepts an unbounded number of (buffer_pda, mint) pairs as remaining accounts, one pair per buffer, with at least one pair required (CreateBuffer rejects zero buffers). Anchor's IDL grammar has no 'repeated group' construct, so this file only declares the guaranteed index-0 template (buffer_pda_0/mint_0). This instruction is solver/internal tooling only, not part of the public client surface, so buffers beyond the first are intentionally left unmodeled here: callers needing more than one buffer per transaction append the extra (buffer_pda, mint) account-meta pairs by hand after building the base instruction.", + "Each buffer_pda_i must be the canonical PDA for seeds [\"settlement\", mint_i, \"buffer\"]." + ], + "discriminator": [4], + "accounts": [ + { + "name": "payer", + "writable": true, + "signer": true + }, + { + "name": "system_program", + "address": "11111111111111111111111111111111" + }, + { + "name": "token_program", + "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + }, + { + "name": "buffer_pda_0", + "writable": true, + "pda": { + "seeds": [ + { + "kind": "const", + "value": [115, 101, 116, 116, 108, 101, 109, 101, 110, 116] + }, + { + "kind": "account", + "path": "mint_0" + }, + { + "kind": "const", + "value": [98, 117, 102, 102, 101, 114] + } + ] + }, + "docs": [ + "Guaranteed present: CreateBuffer rejects an instruction with zero buffers." + ] + }, + { + "name": "mint_0", + "docs": [ + "Guaranteed present: CreateBuffer rejects an instruction with zero buffers." + ] + } + ], + "args": [] + }, + { + "name": "create_order", + "docs": [ + "Allocates a per-order PDA and writes the initial OrderAccount body.", + "order_pda's canonical seeds are [\"settlement\", sha256(intent_bytes), \"order\"]. This is not expressible as a static `pda` entry because the middle seed is a hash of the entire `intent` argument, not a plain field/account reference, which is outside what the Anchor PDA-seed grammar (const / arg / account) can describe." + ], + "discriminator": [2], + "accounts": [ + { + "name": "owner", + "signer": true, + "docs": [ + "Must match intent.owner; authenticates the order." + ] + }, + { + "name": "created_by", + "writable": true, + "signer": true, + "docs": [ + "Funds the new order PDA's rent." + ] + }, + { + "name": "order_pda", + "writable": true, + "docs": [ + "See the seed-derivation note above; cannot be auto-derived by IDL-driven tooling." + ] + }, + { + "name": "system_program", + "address": "11111111111111111111111111111111" + } + ], + "args": [ + { + "name": "intent", + "type": { + "defined": { + "name": "OrderIntent" + } + } + } + ] + }, + { + "name": "begin_settle", + "docs": [ + "Pulls funds for a batch of orders. Must be paired in the same transaction with a FinalizeSettle at `finalize_ix_index`.", + "IDL LIMITATION: only the fixed-size prefix (finalize_ix_index) is represented as a typed argument. After it, the real wire format is `[order_count: u8][bump; order_count][transfer_count; order_count][amount: u64 BE; sum(transfer_count)]` \u2014 a hand-packed layout with no Borsh length prefixes and a trailing array whose length depends on the sum of an earlier array. This has no representation in the Anchor/Borsh/IDL type grammar (no vec/array type can express 'shared count governs several sibling arrays' or 'length = sum of another field'), so it is intentionally left out of `args` rather than mislabeled as `bytes` (which would imply a Borsh Vec length prefix that isn't actually present and would make a generic decoder misparse it). Anchor/Solscan-style tooling will only decode the discriminator and finalize_ix_index for this instruction; the remainder needs bespoke client logic.", + "Per-order accounts follow the 3 shared accounts below as a repeated remaining-accounts group: [order_pda (readonly), sell_token_account (writable), destination (writable) x transfer_count], sorted by ascending order_pda address." + ], + "discriminator": [0], + "accounts": [ + { + "name": "instructions_sysvar", + "address": "Sysvar1nstructions1111111111111111111111111" + }, + { + "name": "state_pda", + "docs": [ + "Must be the canonical state PDA; signs each pull as the user's SPL delegate." + ] + }, + { + "name": "token_program", + "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + } + ], + "args": [ + { + "name": "finalize_ix_index", + "type": "u16", + "docs": [ + "Index of the paired FinalizeSettle in this transaction. Little-endian, matching standard Borsh/Anchor u16 decoding." + ] + } + ] + }, + { + "name": "finalize_settle", + "docs": [ + "Validates that a BeginSettle at `begin_ix_index` exists and points back at this instruction. Must not be called via CPI.", + "Non-standard discriminator, see the note on `initialize`." + ], + "discriminator": [1], + "accounts": [ + { + "name": "instructions_sysvar", + "address": "Sysvar1nstructions1111111111111111111111111" + } + ], + "args": [ + { + "name": "begin_ix_index", + "type": "u16", + "docs": [ + "Index of the paired BeginSettle in this transaction. Little-endian, matching standard Borsh/Anchor u16 decoding." + ] + } + ] + } + ], + "accounts": [ + { + "name": "OrderAccount", + "discriminator": [128] + }, + { + "name": "SettlementState", + "discriminator": [129] + } + ], + "types": [ + { + "name": "OrderAccount", + "docs": [ + "Body of an order PDA, created by create_order. 200 bytes total: 1-byte discriminator + 199 bytes of fields below." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "cancelled", + "type": "bool" + }, + { + "name": "amount_withdrawn", + "type": "u64" + }, + { + "name": "amount_received", + "type": "u64" + }, + { + "name": "created_by", + "type": "pubkey" + }, + { + "name": "intent", + "type": { + "defined": { + "name": "OrderIntent" + } + } + } + ] + } + }, + { + "name": "SettlementState", + "docs": [ + "Body of the singleton settlement state PDA. Carries no fields beyond the 1-byte discriminator; its existence and address are what matter." + ], + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "OrderIntent", + "docs": [ + "Canonical 150-byte order intent. Also the exact bytes hashed (SHA-256) to produce the order UID used in the order PDA's seeds, and the exact wire format of create_order's `intent` argument. Field order and encoding here are load-bearing: they must match this program's Rust definition exactly." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "owner", + "type": "pubkey" + }, + { + "name": "buy_token_account", + "type": "pubkey" + }, + { + "name": "sell_token_account", + "type": "pubkey" + }, + { + "name": "sell_amount", + "type": "u64" + }, + { + "name": "buy_amount", + "type": "u64" + }, + { + "name": "valid_to", + "type": "u32" + }, + { + "name": "kind", + "type": { + "defined": { + "name": "OrderKind" + } + } + }, + { + "name": "partially_fillable", + "type": "bool" + }, + { + "name": "app_data", + "type": { + "array": [ + "u8", + 32 + ] + } + } + ] + } + }, + { + "name": "OrderKind", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Sell" + }, + { + "name": "Buy" + } + ] + } + } + ], + "errors": [ + { + "code": 0, + "name": "FinalizeBeforeInitialize", + "msg": "The FinalizeSettle included as input to BeginSettle isn't before the actual BeginSettle index." + }, + { + "code": 1, + "name": "BeginFinalizePairOverlap", + "msg": "Another BeginSettle/FinalizeSettle of this program appears strictly between this pair's bounds, nesting or overlapping two settlements." + }, + { + "code": 2, + "name": "MissingCounterpartInstruction", + "msg": "The counterpart index points past the end of the transaction's instruction list, so no instruction sits there." + }, + { + "code": 3, + "name": "CounterpartIsExternal", + "msg": "The instruction at the counterpart index belongs to a different program." + }, + { + "code": 4, + "name": "InvalidCounterpartDiscriminator", + "msg": "The counterpart instruction's discriminator byte couldn't be recovered from its data." + }, + { + "code": 5, + "name": "InvalidCounterpartCounterpart", + "msg": "The counterpart instruction's own counterpart index couldn't be recovered from its data." + }, + { + "code": 6, + "name": "MismatchedCounterpartDiscriminator", + "msg": "The counterpart's discriminator isn't the expected BeginSettle/FinalizeSettle kind, or its counterpart index doesn't point back at this instruction." + }, + { + "code": 7, + "name": "OwnerMismatch", + "msg": "CreateOrder instruction wasn't signed by the created OrderIntent owner." + }, + { + "code": 8, + "name": "OrderNotCanonical", + "msg": "A BeginSettle order account doesn't sit at the canonical order PDA derived from the intent it stores and the supplied bump." + }, + { + "code": 9, + "name": "OrdersNotStrictlyIncreasing", + "msg": "BeginSettle's order accounts aren't passed strictly increasing by address." + }, + { + "code": 10, + "name": "SellTokenAccountMismatch", + "msg": "A BeginSettle sell token account doesn't match the sell_token_account recorded in the order's intent." + }, + { + "code": 11, + "name": "SellTokenAccountInvalid", + "msg": "A BeginSettle sell token account isn't a valid SPL token account (wrong data length or not owned by the token program)." + }, + { + "code": 12, + "name": "SellTokenOwnerMismatch", + "msg": "A BeginSettle sell token account's SPL owner isn't the order's intent owner." + }, + { + "code": 13, + "name": "AccountCountNotMatchingOrderCount", + "msg": "BeginSettle's order-account count doesn't match the structure its instruction data expects." + }, + { + "code": 14, + "name": "CalledViaCpi", + "msg": "BeginSettle or FinalizeSettle was invoked via CPI rather than as a top-level transaction instruction." + }, + { + "code": 15, + "name": "OrderCancelled", + "msg": "A BeginSettle order has been cancelled by its owner and can no longer be settled." + }, + { + "code": 16, + "name": "OrderExpired", + "msg": "A BeginSettle order's valid_to lies in the past: the order has expired and can no longer be settled." + }, + { + "code": 17, + "name": "TransferCountMismatch", + "msg": "The transfer counts in BeginSettle don't sum to the number of transfer amounts, so destinations and amounts can't be paired up exactly." + }, + { + "code": 18, + "name": "StateAccountMismatch", + "msg": "BeginSettle's state account isn't the canonical settlement state PDA, which must sign the pulls as the user's token delegate." + } + ] +} diff --git a/programs/settlement/src/initialize.rs b/programs/settlement/src/initialize.rs index 2ccf19e..653cd7a 100644 --- a/programs/settlement/src/initialize.rs +++ b/programs/settlement/src/initialize.rs @@ -1,7 +1,8 @@ //! `Initialize` instruction handler. -use pinocchio::{AccountView, Address, ProgramResult}; +use pinocchio::{error::ProgramError, AccountView, Address, ProgramResult}; use settlement_interface::{ + data::state, instruction::{initialize::InitializeInput, InstructionInputParsing}, pda::state::state_pda_seeds, }; @@ -25,12 +26,18 @@ pub fn process_initialize( program_id, payer, pda: state_pda, - size: 0, + size: state::SIZE as u64, owner: program_id, seeds: state_pda_seeds(), } .create()?; + let mut buffer = state_pda.try_borrow_mut()?; + let buffer: &mut [u8; state::SIZE] = (&mut *buffer) + .try_into() + .map_err(|_| ProgramError::AccountDataTooSmall)?; + *buffer = state::DISCRIMINATOR; + Ok(()) } diff --git a/programs/settlement/tests/begin_settle_orders.rs b/programs/settlement/tests/begin_settle_orders.rs index abf1811..1f5da25 100644 --- a/programs/settlement/tests/begin_settle_orders.rs +++ b/programs/settlement/tests/begin_settle_orders.rs @@ -403,7 +403,7 @@ fn rejects_orders_in_wrong_address_order() { // Lay out the two distinct orders strictly decreasing by PDA address, which // the program rejects. The interface builder would sort them, so build the // instruction by hand in the current wire format: data is - // `[discriminator, finalize_ix_index (BE), order_count, bump×n, transfer_count×n]` + // `[discriminator, finalize_ix_index (LE), order_count, bump×n, transfer_count×n]` // (no transfers here) and accounts are `[instructions_sysvar, state_pda, // token_program, (order_pda, sell_token_account)...]`. let mut orders = [ @@ -413,7 +413,7 @@ fn rejects_orders_in_wrong_address_order() { orders.sort_by_key(|&(pda, _, _)| std::cmp::Reverse(pda)); let mut data = vec![SettlementInstruction::BeginSettle.discriminator()]; - data.extend_from_slice(&1u16.to_be_bytes()); + data.extend_from_slice(&1u16.to_le_bytes()); data.push(orders.len() as u8); data.extend(orders.iter().map(|&(_, _, bump)| bump)); // No transfers: one zero transfer-count byte per order. diff --git a/programs/settlement/tests/initialize.rs b/programs/settlement/tests/initialize.rs index 0f10753..cd91997 100644 --- a/programs/settlement/tests/initialize.rs +++ b/programs/settlement/tests/initialize.rs @@ -1,6 +1,6 @@ use settlement_client::instructions::Initialize; use settlement_client::settlement_interface::{ - instruction::initialize::Initialize as InitializeRaw, pda::state::find_state_pda, + data::state, instruction::initialize::Initialize as InitializeRaw, pda::state::find_state_pda, }; use solana_sdk::{ pubkey::Pubkey, @@ -10,7 +10,7 @@ use solana_sdk::{ mod common; #[test] -fn happy_path_initializes_empty_state_pda() { +fn happy_path_initializes_state_pda_with_discriminator() { let (mut svm, program_id, payer) = common::setup(); let (state_pda, _bump) = find_state_pda(&program_id); @@ -30,9 +30,13 @@ fn happy_path_initializes_empty_state_pda() { account.owner, program_id, "state PDA must be owned by the settlement program" ); - assert!(account.data.is_empty(), "state PDA must be empty"); + assert_eq!( + account.data, + state::DISCRIMINATOR, + "state PDA must hold only the Anchor-style discriminator" + ); - let rent = svm.minimum_balance_for_rent_exemption(0); + let rent = svm.minimum_balance_for_rent_exemption(state::SIZE); assert_eq!( account.lamports, rent, "state PDA must hold exactly the rent minimum: {} != {}", @@ -59,7 +63,7 @@ fn funding_payer_can_differ_from_fee_payer() { // The rent came out of the funder, not the fee payer: the funder paid no // transaction fee, so its balance dropped by exactly the PDA rent. - let rent = svm.minimum_balance_for_rent_exemption(0); + let rent = svm.minimum_balance_for_rent_exemption(state::SIZE); assert_eq!( common::lamports(&svm, &funder.pubkey()), funder_airdrop - rent, diff --git a/test-cli/Cargo.toml b/test-cli/Cargo.toml new file mode 100644 index 0000000..d00c825 --- /dev/null +++ b/test-cli/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "cow-test-cli" +version.workspace = true +edition.workspace = true + +[[bin]] +name = "cow" +path = "src/main.rs" + +[dependencies] +anyhow.workspace = true +clap.workspace = true +settlement-client.workspace = true +solana-commitment-config.workspace = true +solana-instruction.workspace = true +solana-program-pack.workspace = true +solana-rpc-client.workspace = true +solana-sdk.workspace = true +solana-system-interface = { workspace = true, features = ["bincode"] } +spl-associated-token-account-interface.workspace = true +spl-token.workspace = true +spl-token-interface.workspace = true + +[lints] +workspace = true diff --git a/test-cli/src/cmd/create_order.rs b/test-cli/src/cmd/create_order.rs new file mode 100644 index 0000000..dc45239 --- /dev/null +++ b/test-cli/src/cmd/create_order.rs @@ -0,0 +1,224 @@ +use anyhow::Context as _; +use clap::{Args as ClapArgs, Parser}; +use settlement_client::{ + instructions::CreateOrder, + settlement_interface::{ + data::intent::{EncodedOrderIntent, OrderIntent, OrderKind}, + pda::order::find_order_pda, + }, +}; +use solana_sdk::{signature::Signer, transaction::Transaction}; + +use super::Context; +use crate::token::ResolvedToken; + +#[derive(ClapArgs)] +struct CommonArgs { + /// Unix timestamp after which the order expires (defaults to 5 minutes from now) + #[arg(long, default_value_t = valid_to_in(300))] + valid_to: u32, + + /// Allow partial fills across multiple settlements + #[arg(long)] + partially_fillable: bool, +} + +#[derive(Parser)] +#[command(long_about = "\ +Create an order to sell or buy exactly N token, per the subcommand used \ +(`cow sell` / `cow buy`). This only creates the order on-chain; it does not \ +itself execute the swap. Supported forms: + + cow sell 1.0 SOL USDC sell exactly 1.0 SOL, receive any USDC + cow sell 1.0 SOL 50.0 USDC sell exactly 1.0 SOL, receive ≥ 50.0 USDC + cow sell 1.0 SOL for 50.0 USDC same as before, but more english + cow sell 1.0 USDC sell 1.0 SOL into USDC (SOL implied as sell token) + cow buy 1.0 SOL 100.0 USDC buy exactly 1.0 SOL, spend at most 100.0 USDC + cow buy 1.0 SOL for 100.0 USDC same as before, but more english + cow buy 1.0 SOL USDC buy exactly 1.0 SOL, spending any USDC + cow buy 1.0 USDC buy 1.0 USDC, selling any amount of SOL (implied) + +Tokens can be a builtin symbol (SOL, WSOL, USDC), a mint address, or a token-account address.")] +pub struct BuyOrSellArgs { + /// Amount to sell (e.g. 1.0) + amount: String, + + /// Remaining terms (tokens and/or an amount) — run with --help for supported forms + #[arg(num_args = 1..=4)] + terms: Vec, + + #[command(flatten)] + common: CommonArgs, +} + +pub fn run_sell(ctx: Context, args: BuyOrSellArgs) -> anyhow::Result<()> { + let BuyOrSellArgs { + amount, + terms, + common, + } = args; + let parsed = parse(&ctx, OrderKind::Sell, &amount, &terms)?; + execute(ctx, parsed, common) +} + +pub fn run_buy(ctx: Context, args: BuyOrSellArgs) -> anyhow::Result<()> { + let BuyOrSellArgs { + amount, + terms, + common, + } = args; + let parsed = parse(&ctx, OrderKind::Buy, &amount, &terms)?; + execute(ctx, parsed, common) +} + +/// Fully resolved and in sell/buy order — `parse` applies the buy-side flip +/// and does token/amount resolution, so `execute` just builds instructions. +struct ParsedOrder { + kind: OrderKind, + sell: ResolvedToken, + sell_amount: u64, + sell_is_sol: bool, + buy: ResolvedToken, + buy_amount: u64, +} + +fn parse( + ctx: &Context, + kind: OrderKind, + amount: &str, + terms: &[String], +) -> anyhow::Result { + let t: Vec<&str> = terms + .iter() + .filter(|s| !s.eq_ignore_ascii_case("for") && !s.eq_ignore_ascii_case("with")) + .map(String::as_str) + .collect(); + + // a/b are in the order the user typed them, not sell/buy order. + let (a_tok, a_amount, b_tok, b_amount) = match t.as_slice() { + [tok] => ("SOL", amount, *tok, "0"), + [a, b] => (*a, amount, *b, "0"), + [a, buy_amount, b] if is_amount(buy_amount) => (*a, amount, *b, *buy_amount), + _ => anyhow::bail!( + "cannot interpret {:?}; run `cow sell --help` for usage", + terms + ), + }; + + let (sell_tok, sell_amount_str, buy_tok, buy_amount_str) = match kind { + OrderKind::Sell => (a_tok, a_amount, b_tok, b_amount), + OrderKind::Buy => (b_tok, b_amount, a_tok, a_amount), + }; + + let sell = crate::token::resolve(&ctx.rpc, &ctx.payer.pubkey(), sell_tok)?; + let buy = crate::token::resolve(&ctx.rpc, &ctx.payer.pubkey(), buy_tok)?; + + let sell_amount = + spl_token::try_ui_amount_into_amount(sell_amount_str.to_string(), sell.decimals) + .map_err(|_| anyhow::anyhow!("invalid sell amount: {sell_amount_str}"))?; + let buy_amount = spl_token::try_ui_amount_into_amount(buy_amount_str.to_string(), buy.decimals) + .map_err(|_| anyhow::anyhow!("invalid buy amount: {buy_amount_str}"))?; + + Ok(ParsedOrder { + kind, + sell_is_sol: sell_tok.eq_ignore_ascii_case("sol"), + sell, + sell_amount, + buy, + buy_amount, + }) +} + +fn execute(ctx: Context, parsed: ParsedOrder, common: CommonArgs) -> anyhow::Result<()> { + let ParsedOrder { + kind, + sell, + sell_amount, + sell_is_sol, + buy, + buy_amount, + } = parsed; + + // If the sell token is SOL, wrap it into the payer's WSOL ATA first. + // NOTE: later this will be swapped for the solflow program. + let mut ixs = Vec::new(); + + if sell_is_sol { + let (wsol_ata, wrap_ixs) = crate::instructions::wrap_sol(&ctx.payer.pubkey(), sell_amount)?; + assert_eq!(wsol_ata, sell.account, "resolved WSOL ATA mismatch"); + ixs.extend(wrap_ixs); + } + + // Approve the settlement program to pull sell tokens on our behalf. + ixs.push(crate::instructions::approve( + &ctx.program_id, + &sell.account, + &ctx.payer.pubkey(), + sell_amount, + )?); + + let intent = OrderIntent { + owner: ctx.payer.pubkey(), + sell_token_account: sell.account, + buy_token_account: buy.account, + sell_amount, + buy_amount, + valid_to: common.valid_to, + kind, + partially_fillable: common.partially_fillable, + app_data: [0u8; 32], + }; + + let encoded = EncodedOrderIntent::from(&intent); + let uid = encoded.hash(); + let (order_pda, _) = find_order_pda(&ctx.program_id, &uid); + + // owner == created_by: the payer both owns the order and funds the rent. + let create_order_ix = CreateOrder { + program_id: ctx.program_id, + owner: ctx.payer.pubkey(), + created_by: ctx.payer.pubkey(), + intent: &intent, + }; + + ixs.push(create_order_ix.into()); + + let blockhash = ctx + .rpc + .get_latest_blockhash() + .context("failed to fetch blockhash")?; + let tx = Transaction::new_signed_with_payer( + &ixs, + Some(&ctx.payer.pubkey()), + &[&ctx.payer], + blockhash, + ); + let sig = ctx + .rpc + .send_and_confirm_transaction(&tx) + .context("transaction failed")?; + + let uid_hex: String = uid.as_ref().iter().map(|b| format!("{b:02x}")).collect(); + println!("signature: {sig}"); + println!("order PDA: {order_pda}"); + println!("order UID: {uid_hex}"); + + Ok(()) +} + +/// Returns `true` if `s` looks like a numeric amount (as opposed to a token +/// symbol/mint), so the 3-token form can be disambiguated before decimals are +/// known. Real validation happens later via `spl_token::try_ui_amount_into_amount`. +fn is_amount(s: &str) -> bool { + !s.is_empty() && s.chars().all(|c| c.is_ascii_digit() || c == '.') +} + +/// Returns the current unix timestamp plus `secs_from_now`, saturating at `u32::MAX`. +fn valid_to_in(secs_from_now: u64) -> u32 { + use std::time::{SystemTime, UNIX_EPOCH}; + let now = SystemTime::now() + .duration_since(UNIX_EPOCH) + .unwrap_or_default() + .as_secs(); + now.saturating_add(secs_from_now).min(u32::MAX as u64) as u32 +} diff --git a/test-cli/src/cmd/mod.rs b/test-cli/src/cmd/mod.rs new file mode 100644 index 0000000..42608bd --- /dev/null +++ b/test-cli/src/cmd/mod.rs @@ -0,0 +1,29 @@ +use settlement_client::settlement_interface::Pubkey; + +use crate::Cli; + +pub mod create_order; + +/// Shared context threaded through every subcommand. +pub struct Context { + pub payer: solana_sdk::signer::keypair::Keypair, + pub program_id: Pubkey, + pub rpc: solana_rpc_client::rpc_client::RpcClient, +} + +impl Context { + pub fn from_args(cli: &Cli) -> anyhow::Result { + let payer = solana_sdk::signature::read_keypair_file(&cli.keypair) + .map_err(|e| anyhow::anyhow!("failed to read keypair from {}: {e}", cli.keypair))?; + Ok(Self { + payer, + program_id: cli + .program_id + .unwrap_or(settlement_client::settlement_interface::ID), + rpc: solana_rpc_client::rpc_client::RpcClient::new_with_commitment( + cli.rpc_url.clone(), + solana_commitment_config::CommitmentConfig::confirmed(), + ), + }) + } +} diff --git a/test-cli/src/instructions.rs b/test-cli/src/instructions.rs new file mode 100644 index 0000000..9fe06f8 --- /dev/null +++ b/test-cli/src/instructions.rs @@ -0,0 +1,52 @@ +//! Instruction builders for operations the CLI needs to compose. + +use anyhow::Context as _; +use settlement_client::settlement_interface::{pda::state::find_state_pda, Pubkey}; +use solana_instruction::Instruction; +use spl_associated_token_account_interface::{ + address::get_associated_token_address_with_program_id, + instruction::create_associated_token_account_idempotent, +}; +use spl_token_interface::instruction::{self as token_ix}; + +/// Build instructions that wrap `amount` lamports into the payer's WSOL ATA. +/// +/// Returns in order: create ATA (idempotent), system transfer, sync_native. +/// The caller should use the returned `wsol_ata` as the input token parameter for any following operations +pub fn wrap_sol(payer: &Pubkey, amount: u64) -> anyhow::Result<(Pubkey, Vec)> { + let wsol_mint: Pubkey = spl_token_interface::native_mint::id(); + let token_program: Pubkey = spl_token_interface::id(); + + let wsol_ata = get_associated_token_address_with_program_id(payer, &wsol_mint, &token_program); + + let create_ata = + create_associated_token_account_idempotent(payer, payer, &wsol_mint, &token_program); + + let transfer = solana_system_interface::instruction::transfer(payer, &wsol_ata, amount); + + let sync = token_ix::sync_native(&token_program, &wsol_ata) + .context("failed to build SyncNative instruction")?; + + Ok((wsol_ata, vec![create_ata, transfer, sync])) +} + +/// Build an `Approve` instruction delegating `amount` tokens on `token_account` +/// to the PDA derived from `program_id`. +pub fn approve( + program_id: &Pubkey, + token_account: &Pubkey, + owner: &Pubkey, + amount: u64, +) -> anyhow::Result { + let (settlement_pda, _) = find_state_pda(program_id); + + token_ix::approve( + &spl_token_interface::id(), + token_account, + &settlement_pda, + owner, + &[], + amount, + ) + .context("failed to build Approve instruction") +} diff --git a/test-cli/src/main.rs b/test-cli/src/main.rs new file mode 100644 index 0000000..5fb8a4f --- /dev/null +++ b/test-cli/src/main.rs @@ -0,0 +1,57 @@ +use clap::{Parser, Subcommand}; +use settlement_client::settlement_interface::Pubkey; + +mod cmd; +mod instructions; +mod token; + +fn default_keypair_path() -> String { + let home = std::env::var("HOME").expect("`HOME` env not available"); + format!("{home}/.config/solana/id.json") +} + +#[derive(Parser)] +#[command(name = "cow", about = "CoW Protocol Solana dev/testing CLI")] +struct Cli { + /// Solana RPC endpoint + #[arg( + long, + global = true, + env = "RPC_URL", + default_value = "https://api.devnet.solana.com" + )] + rpc_url: String, + + /// Path to the payer keypair (JSON format as written by `solana-keygen`) + #[arg( + long, + global = true, + env = "KEYPAIR", + default_value_t = default_keypair_path() + )] + keypair: String, + + /// Settlement program ID + #[arg(long, global = true, default_value = None)] + program_id: Option, + + #[command(subcommand)] + command: Commands, +} + +#[derive(Subcommand)] +enum Commands { + #[command(about = "Sell a token for another (e.g. `cow sell 1.0 SOL for USDC`)")] + Sell(cmd::create_order::BuyOrSellArgs), + #[command(about = "Buy a token using another (e.g. `cow buy 1.0 SOL with USDC`)")] + Buy(cmd::create_order::BuyOrSellArgs), +} + +fn main() -> anyhow::Result<()> { + let cli = Cli::parse(); + let ctx = cmd::Context::from_args(&cli)?; + match cli.command { + Commands::Sell(args) => cmd::create_order::run_sell(ctx, args), + Commands::Buy(args) => cmd::create_order::run_buy(ctx, args), + } +} diff --git a/test-cli/src/token.rs b/test-cli/src/token.rs new file mode 100644 index 0000000..b0ed49d --- /dev/null +++ b/test-cli/src/token.rs @@ -0,0 +1,133 @@ +//! Token resolution helpers: converts a user-supplied token string (alias, mint address, +//! or token-account address) into an SPL token account address and decimal count. +//! +//! Entry point: [`resolve`]. + +use anyhow::Context as _; +use settlement_client::settlement_interface::Pubkey; +use solana_program_pack::Pack; +use solana_rpc_client::rpc_client::RpcClient; +use spl_associated_token_account_interface::address::get_associated_token_address_with_program_id; +use spl_token_interface::native_mint; +use spl_token_interface::state::{Account as TokenAccount, Mint}; + +/// Inline registry of recognised token symbols. +/// Avoids an RPC round-trip for well-known mints whose decimals are fixed. +/// Replace with a proper on-chain registry or quote-API lookup when available. +struct KnownToken { + mint: &'static str, + decimals: u8, +} + +const DEVNET_GENESIS_HASH: &str = "EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG"; + +// Temporary registry mapping solana networks (isolated by "genesis" hash) and token symbols to mint addresess. Intended to be replaced in the +// future with something more robust. +static REGISTRY: &[(&str, &str, KnownToken)] = &[( + DEVNET_GENESIS_HASH, + "USDC", + KnownToken { + mint: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", + decimals: 6, + }, +)]; + +pub struct ResolvedToken { + /// SPL token account to use in the order (ATA if supplied program argument was a mint). + pub account: Pubkey, + /// On-chain `decimals` value for the token's mint. + pub decimals: u8, +} + +/// Resolve a user-supplied token string to a token account and decimal count. +pub fn resolve(rpc: &RpcClient, owner: &Pubkey, token_str: &str) -> anyhow::Result { + let upper = token_str.to_uppercase(); + + // 1. `"SOL"` / `"WSOL"` — payer's WSOL ATA, 9 decimals, no RPC call needed. + if matches!(upper.as_str(), "SOL" | "WSOL") { + let wsol_mint: Pubkey = native_mint::id(); + let wsol_ata = get_associated_token_address_with_program_id( + owner, + &wsol_mint, + &spl_token_interface::id(), + ); + return Ok(ResolvedToken { + account: wsol_ata, + decimals: native_mint::DECIMALS, + }); + } + + // 2. Base58 mint or token-account address — fetches decimals from the mint, and possibly the token account owner. + if let Ok(pubkey) = token_str.parse::() { + return resolve_from_account(rpc, owner, &pubkey); + } + + // 3. Known symbol (e.g. `"USDC"`) — payer's ATA for the registered mint, RPC call required to get genesis hash (detecting the network). + let genesis_hash = rpc + .get_genesis_hash() + .with_context(|| "failed to fetch genesis hash (is the RPC URL correct?)")? + .to_string(); + if let Some((_, _, known)) = REGISTRY.iter().find(|(registry_genesis_hash, sym, _)| { + *registry_genesis_hash == genesis_hash && *sym == upper.as_str() + }) { + let mint: Pubkey = known.mint.parse().expect("registry mint constant"); + let ata = + get_associated_token_address_with_program_id(owner, &mint, &spl_token_interface::id()); + return Ok(ResolvedToken { + account: ata, + decimals: known.decimals, + }); + } + + anyhow::bail!( + "unknown token '{token_str}'; supported symbols: SOL, WSOL, USDC — \ + or provide a mint / token-account address" + ) +} + +fn resolve_from_account( + rpc: &RpcClient, + owner: &Pubkey, + token_account_or_mint: &Pubkey, +) -> anyhow::Result { + let account = rpc + .get_account(token_account_or_mint) + .with_context(|| format!("account {token_account_or_mint} not found on-chain"))?; + + anyhow::ensure!( + account.owner == spl_token_interface::id(), + "{token_account_or_mint} is not owned by the token program (owner: {})", + account.owner + ); + + if let Ok(token_account) = TokenAccount::unpack(&account.data) { + Ok(ResolvedToken { + account: *token_account_or_mint, + decimals: fetch_mint_decimals(rpc, &token_account.mint)?, + }) + } else if let Ok(mint) = Mint::unpack(&account.data) { + Ok(ResolvedToken { + account: get_associated_token_address_with_program_id( + owner, + token_account_or_mint, + &account.owner, + ), + decimals: mint.decimals, + }) + } else { + anyhow::bail!( + "{token_account_or_mint} could not be unpacked as a token account or mint \ + (data length: {})", + account.data.len() + ) + } +} + +fn fetch_mint_decimals(rpc: &RpcClient, mint: &Pubkey) -> anyhow::Result { + let data = rpc + .get_account_data(mint) + .with_context(|| format!("mint account {mint} not found"))?; + Ok(Mint::unpack(&data) + .with_context(|| format!("failed to unpack mint {mint}"))? + .decimals) +}