From 0b946a925c2c5e64639ee74cfc12a8d179f92e36 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 07:56:41 +0200 Subject: [PATCH 01/19] Added helius --- Cargo.lock | 4642 +++++++++++++++++++++++++++++++++++++++++++++++++++- Cargo.toml | 1 + 2 files changed, 4599 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8cdcaa7..7fe6ee8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,83 @@ # 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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common 0.1.7", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures 0.2.17", +] + +[[package]] +name = "aes-gcm-siv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae0784134ba9375416d469ec31e7c5f9fa94405049cf08c5ce5b4698be673e0d" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "polyval", + "subtle", + "zeroize", +] + +[[package]] +name = "agave-feature-set" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfe79fc4c114c51ea8461d829bb49853a21a76c7c8ef20e9041b071558f628ce" +dependencies = [ + "ahash 0.8.12", + "solana-epoch-schedule", + "solana-hash 3.1.0", + "solana-pubkey 3.0.0", + "solana-sha256-hasher", + "solana-svm-feature-set", +] + +[[package]] +name = "agave-reserved-account-keys" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e8ceb5117fa390898f473b0d165f88482a2b36fb4a47441d8b40e22823207cb" +dependencies = [ + "agave-feature-set", + "solana-pubkey 3.0.0", + "solana-sdk-ids", +] + [[package]] name = "ahash" version = "0.7.8" @@ -13,6 +90,19 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.5" @@ -22,6 +112,27 @@ 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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "android_system_properties" version = "0.1.6" @@ -87,12 +198,138 @@ version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" +[[package]] +name = "anza-quinn" +version = "0.11.9-rustsec20260037" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91bfa08f6e7e4187354ff4f793b81cc08218a6a95cc48f5de7616d44452bf6e0" +dependencies = [ + "anza-quinn-proto", + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.19", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "anza-quinn-proto" +version = "0.11.13-rustsec20260037" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d00a4d8cf8d72ee56e0ee20d3b4eef4785ce1b05299c4982c6de7f251c458efe" +dependencies = [ + "bytes", + "fastbloom", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.5", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier 0.6.2", + "slab", + "thiserror 2.0.19", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "arc-swap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b" +dependencies = [ + "rustversion", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror 1.0.69", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure 0.12.6", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "async-compression" +version = "0.4.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3976abdc8fe7d1133d43d304afd42abdf5bc3e1319d263d223bde07b5efc4be8" +dependencies = [ + "compression-codecs", + "compression-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-lock" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + [[package]] name = "async-trait" version = "0.1.91" @@ -139,12 +376,39 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -156,6 +420,9 @@ name = "bitflags" version = "2.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" +dependencies = [ + "serde_core", +] [[package]] name = "bitvec" @@ -169,6 +436,30 @@ dependencies = [ "wyz", ] +[[package]] +name = "blake3" +version = "1.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ae7bad254120e9e4c63bafc385310756f90c484eac0e36b8317cf09cb92a77" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "block-buffer" version = "0.12.1" @@ -202,12 +493,52 @@ dependencies = [ "syn 2.0.119", ] +[[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]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + [[package]] name = "bumpalo" version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + [[package]] name = "bytecheck" version = "0.6.12" @@ -230,11 +561,49 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0e56a716f1e132ff6bf4bdac1c944a3fcdc1cae65f70a4a2a1ac3b401d2d1f" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +dependencies = [ + "serde", +] + +[[package]] +name = "caps" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd1ddba47aba30b6a889298ad0109c3b8dcb0e8fc993b459daa7067d46f865e0" +dependencies = [ + "libc", +] [[package]] name = "cc" @@ -248,6 +617,12 @@ dependencies = [ "shlex", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cfg-if" version = "1.0.4" @@ -260,6 +635,17 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" +[[package]] +name = "cfg_eval" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "chacha20" version = "0.10.1" @@ -267,7 +653,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.3.0", "rand_core 0.10.1", ] @@ -285,6 +671,16 @@ dependencies = [ "windows-link", ] +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common 0.1.7", + "inout", +] + [[package]] name = "cmake" version = "0.1.58" @@ -294,12 +690,31 @@ dependencies = [ "cc", ] +[[package]] +name = "cmov" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" + [[package]] name = "colorchoice" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +dependencies = [ + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", +] + [[package]] name = "combine" version = "4.6.7" @@ -310,12 +725,54 @@ dependencies = [ "memchr", ] +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fe5f465a4f6fee88fad41b85d990f84c835335e85b5d9e6e63e0d06d28cba7c" +dependencies = [ + "encode_unicode", + "libc", + "unicode-width", + "windows-sys 0.61.2", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "const-oid" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" +[[package]] +name = "constant_time_eq" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" + [[package]] name = "core-foundation" version = "0.9.4" @@ -342,6 +799,15 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + [[package]] name = "cpufeatures" version = "0.3.0" @@ -351,6 +817,72 @@ 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 = "crossbeam-channel" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "typenum", +] + [[package]] name = "crypto-common" version = "0.2.2" @@ -381,6 +913,134 @@ dependencies = [ "memchr", ] +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "ctutils" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" +dependencies = [ + "cmov", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rand_core 0.6.4", + "rustc_version", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +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.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core 0.23.0", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.11.1" @@ -415,7 +1075,55 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" dependencies = [ - "thiserror", + "thiserror 2.0.19", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid 0.9.6", + "zeroize", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint 0.4.8", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" + +[[package]] +name = "derivation-path" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid 0.9.6", + "crypto-common 0.1.7", + "subtle", ] [[package]] @@ -424,9 +1132,10 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", + "block-buffer 0.12.1", + "const-oid 0.10.2", + "crypto-common 0.2.2", + "ctutils", ] [[package]] @@ -440,12 +1149,117 @@ dependencies = [ "syn 3.0.3", ] +[[package]] +name = "dlopen2" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b4f5f101177ff01b8ec4ecc81eead416a8aa42819a2869311b3420fa114ffa" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "dunce" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand_core 0.6.4", + "serde", + "sha2 0.10.9", + "subtle", + "zeroize", +] + +[[package]] +name = "ed25519-dalek-bip32" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b49a684b133c4980d7ee783936af771516011c8cd15f429dbda77245e282f03" +dependencies = [ + "derivation-path", + "ed25519-dalek", + "hmac", + "sha2 0.10.9", +] + +[[package]] +name = "either" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.35" @@ -494,24 +1308,127 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fastbloom" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7f34442dbe69c60fe8eaf58a8cafff81a1f278816d8ab4db255b3bef4ac3c4" +dependencies = [ + "getrandom 0.3.4", + "libm", + "rand 0.9.5", + "siphasher 1.0.3", +] + [[package]] name = "fastrand" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "find-msvc-tools" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +[[package]] +name = "five8" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f76610e969fa1784327ded240f1e28a3fd9520c9cec93b636fcf62dd37f772" +dependencies = [ + "five8_core", +] + +[[package]] +name = "five8_const" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a0f1728185f277989ca573a402716ae0beaaea3f76a8ff87ef9dd8fb19436c5" +dependencies = [ + "five8_core", +] + +[[package]] +name = "five8_core" +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 = "float-cmp" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" +dependencies = [ + "num-traits", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -548,6 +1465,21 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" +[[package]] +name = "futures" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a88cf1f829d945f548cf8fec32c61b1f202b6d93b45848602fc02af4b12ad218" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.33" @@ -555,6 +1487,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" dependencies = [ "futures-core", + "futures-sink", ] [[package]] @@ -563,6 +1496,23 @@ version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" +[[package]] +name = "futures-executor" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" + [[package]] name = "futures-macro" version = "0.3.33" @@ -586,20 +1536,50 @@ version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" +[[package]] +name = "futures-timer" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968" + [[package]] name = "futures-util" version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" dependencies = [ + "futures-channel", "futures-core", + "futures-io", "futures-macro", "futures-sink", "futures-task", + "memchr", "pin-project-lite", "slab", ] +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "getrandom" version = "0.2.17" @@ -613,6 +1593,20 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 5.3.0", + "wasip2", + "wasm-bindgen", +] + [[package]] name = "getrandom" version = "0.4.3" @@ -622,11 +1616,42 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "r-efi", + "r-efi 6.0.0", "rand_core 0.10.1", "wasm-bindgen", ] +[[package]] +name = "governor" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b" +dependencies = [ + "cfg-if", + "dashmap", + "futures", + "futures-timer", + "no-std-compat", + "nonzero_ext", + "parking_lot", + "portable-atomic", + "quanta", + "rand 0.8.7", + "smallvec", + "spinning_top", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "h2" version = "0.4.15" @@ -638,7 +1663,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http", + "http 1.5.0", "indexmap", "slab", "tokio", @@ -646,13 +1671,49 @@ dependencies = [ "tracing", ] +[[package]] +name = "halfbrown" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2c385c6df70fd180bbb673d93039dbd2cd34e41d782600bdf6e1ca7bce39aa" +dependencies = [ + "hashbrown 0.15.5", + "serde", +] + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", ] [[package]] @@ -661,6 +1722,75 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +[[package]] +name = "helius" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4013b30bbf25b4a218354ba80c36b51d45120138c87c28247e09468fda6e10a9" +dependencies = [ + "base64 0.22.1", + "bincode", + "chrono", + "futures-util", + "log", + "once_cell", + "phf", + "rand 0.9.5", + "reqwest 0.12.28", + "semver", + "serde", + "serde-enum-str", + "serde_json", + "simd-json", + "solana-account-decoder", + "solana-client", + "solana-commitment-config", + "solana-compute-budget-interface", + "solana-program", + "solana-rpc-client-api", + "solana-sdk", + "solana-stake-interface", + "solana-system-interface 2.0.0", + "solana-transaction-status", + "thiserror 2.0.19", + "tokio", + "tokio-stream", + "tokio-tungstenite 0.28.0", + "url", +] + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "histogram" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http" version = "1.5.0" @@ -678,7 +1808,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", - "http", + "http 1.5.0", ] [[package]] @@ -689,7 +1819,7 @@ checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" dependencies = [ "bytes", "futures-core", - "http", + "http 1.5.0", "http-body", "pin-project-lite", ] @@ -720,7 +1850,7 @@ dependencies = [ "futures-channel", "futures-core", "h2", - "http", + "http 1.5.0", "http-body", "httparse", "itoa", @@ -736,13 +1866,30 @@ version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ - "http", + "http 1.5.0", "hyper", "hyper-util", "rustls", "tokio", "tokio-rustls", "tower-service", + "webpki-roots 1.0.9", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", ] [[package]] @@ -751,11 +1898,11 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-channel", "futures-util", - "http", + "http 1.5.0", "http-body", "hyper", "ipnet", @@ -876,6 +2023,12 @@ dependencies = [ "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" @@ -907,6 +2060,28 @@ dependencies = [ "hashbrown 0.17.1", ] +[[package]] +name = "indicatif" +version = "0.18.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9433806cd6b4ec1aba79c021c7e4c58fb4c3b9977c085062e611ac929998fb0c" +dependencies = [ + "console", + "portable-atomic", + "unicode-width", + "unit-prefix", + "web-time", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + [[package]] name = "ipnet" version = "2.12.1" @@ -919,6 +2094,15 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.18" @@ -961,6 +2145,22 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine 4.6.7", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + [[package]] name = "jni" version = "0.22.4" @@ -968,12 +2168,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" dependencies = [ "cfg-if", - "combine", + "combine 4.6.7", "jni-macros", - "jni-sys", + "jni-sys 0.4.1", "log", "simd_cesu8", - "thiserror", + "thiserror 2.0.19", "walkdir", "windows-link", ] @@ -991,6 +2191,15 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + [[package]] name = "jni-sys" version = "0.4.1" @@ -1031,12 +2240,62 @@ dependencies = [ "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.9", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb26cec98cce3a3d96cbb7bced3c4b16e3d13f27ec56dbd62cbc8f39cfb9d653" +dependencies = [ + "cpufeatures 0.2.17", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + [[package]] name = "libc" version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -1049,6 +2308,15 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + [[package]] name = "log" version = "0.4.33" @@ -1067,12 +2335,49 @@ version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + [[package]] name = "mio" version = "1.2.2" @@ -1101,6 +2406,134 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nix" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +dependencies = [ + "bitflags 2.13.1", + "cfg-if", + "cfg_aliases", + "libc", + "memoffset", +] + +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nonzero_ext" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" + +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92800bd69a1eac91786bcfe9da64a897eb72911b8dc3095decbd07429e8048b" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -1110,6 +2543,47 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs", +] + [[package]] name = "once_cell" version = "1.21.4" @@ -1122,6 +2596,12 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "openssl" version = "0.10.81" @@ -1165,24 +2645,151 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "pastey" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + [[package]] name = "percent-encoding" version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "percentage" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" +dependencies = [ + "num", +] + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros", + "phf_shared", + "serde", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher 1.0.3", +] + [[package]] name = "pin-project-lite" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "opaque-debug", + "universal-hash", +] + [[package]] name = "portable-atomic" version = "1.14.0" @@ -1207,6 +2814,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.21" @@ -1254,6 +2867,30 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "quanta" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi", + "web-sys", + "winapi", +] + [[package]] name = "quinn" version = "0.11.11" @@ -1268,7 +2905,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror", + "thiserror 2.0.19", "tokio", "tracing", "web-time", @@ -1291,7 +2928,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror", + "thiserror 2.0.19", "tinyvec", "tracing", "web-time", @@ -1320,6 +2957,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "r-efi" version = "6.0.0" @@ -1339,10 +2982,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" dependencies = [ "libc", - "rand_chacha", + "rand_chacha 0.3.1", "rand_core 0.6.4", ] +[[package]] +name = "rand" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + [[package]] name = "rand" version = "0.10.2" @@ -1364,6 +3017,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + [[package]] name = "rand_core" version = "0.6.4" @@ -1373,6 +3036,15 @@ dependencies = [ "getrandom 0.2.17", ] +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + [[package]] name = "rand_core" version = "0.10.1" @@ -1388,6 +3060,64 @@ dependencies = [ "rand_core 0.10.1", ] +[[package]] +name = "raw-cpuid" +version = "11.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" +dependencies = [ + "bitflags 2.13.1", +] + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.1", +] + +[[package]] +name = "ref-cast" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + [[package]] name = "regex" version = "1.13.1" @@ -1426,18 +3156,61 @@ dependencies = [ "bytecheck", ] +[[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 1.5.0", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "native-tls", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 1.0.9", +] + [[package]] name = "reqwest" version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "encoding_rs", "futures-core", "h2", - "http", + "http 1.5.0", "http-body", "http-body-util", "hyper", @@ -1451,7 +3224,7 @@ dependencies = [ "quinn", "rustls", "rustls-pki-types", - "rustls-platform-verifier", + "rustls-platform-verifier 0.7.0", "serde", "serde_json", "sync_wrapper", @@ -1466,6 +3239,31 @@ dependencies = [ "web-sys", ] +[[package]] +name = "reqwest-middleware" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57f17d28a6e6acfe1733fe24bcd30774d13bffa4b8a22535b4c8c98423088d4e" +dependencies = [ + "anyhow", + "async-trait", + "http 1.5.0", + "reqwest 0.12.28", + "serde", + "thiserror 1.0.69", + "tower-service", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "ring" version = "0.17.14" @@ -1537,6 +3335,12 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "rustc-demangle" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb" + [[package]] name = "rustc-hash" version = "2.1.3" @@ -1552,6 +3356,15 @@ dependencies = [ "semver", ] +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + [[package]] name = "rustix" version = "1.1.4" @@ -1573,6 +3386,7 @@ checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" dependencies = [ "aws-lc-rs", "once_cell", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -1601,6 +3415,27 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +dependencies = [ + "core-foundation 0.10.1", + "core-foundation-sys", + "jni 0.21.1", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + [[package]] name = "rustls-platform-verifier" version = "0.7.0" @@ -1609,7 +3444,7 @@ checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" dependencies = [ "core-foundation 0.10.1", "core-foundation-sys", - "jni", + "jni 0.22.4", "log", "once_cell", "rustls", @@ -1670,12 +3505,32 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + [[package]] name = "seahash" version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "security-framework" version = "3.7.0" @@ -1715,6 +3570,55 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-attributes" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eb8ec7724e4e524b2492b510e66957fe1a2c76c26a6975ec80823f2439da685" +dependencies = [ + "darling_core 0.14.4", + "serde-rename-rule", + "syn 1.0.109", +] + +[[package]] +name = "serde-big-array" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11fc7cc2c76d73e0f27ee52abbd64eec84d46f370c88371120433196934e4b7f" +dependencies = [ + "serde", +] + +[[package]] +name = "serde-enum-str" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26416dc95fcd46b0e4b12a3758043a229a6914050aaec2e8191949753ed4e9aa" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "serde-attributes", + "syn 1.0.109", +] + +[[package]] +name = "serde-rename-rule" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8a059d895f1a31dd928f40abbea4e7177e3d8ff3aa4152fdb7a396ae1ef63a3" + +[[package]] +name = "serde_bytes" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" +dependencies = [ + "serde", + "serde_core", +] + [[package]] name = "serde_core" version = "1.0.229" @@ -1748,6 +3652,51 @@ 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.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" +dependencies = [ + "serde_core", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "3.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" +dependencies = [ + "darling 0.23.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + [[package]] name = "sha1" version = "0.11.0" @@ -1755,8 +3704,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" dependencies = [ "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + +[[package]] +name = "sha2-const-stable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f179d4e11094a893b82fff208f74d448a7512f99f5a0acbd5c679b705f83ed9" + +[[package]] +name = "sha3" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77fd7028345d415a4034cf8777cd4f8ab1851274233b45f84e3d955502d93874" +dependencies = [ + "digest 0.10.7", + "keccak", ] [[package]] @@ -1765,6 +3752,47 @@ 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 = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "simd-json" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c962f626b54771990066e5435ec8331d1462576cd2d1e62f24076ae014f92112" +dependencies = [ + "getrandom 0.3.4", + "halfbrown", + "ref-cast", + "serde", + "serde_json", + "simdutf8", + "value-trait", +] + [[package]] name = "simd_cesu8" version = "1.2.0" @@ -1781,6 +3809,18 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + [[package]] name = "slab" version = "0.4.12" @@ -1813,13 +3853,2123 @@ dependencies = [ "csv", "env_logger", "futures-util", + "helius", "log", - "reqwest", + "reqwest 0.13.4", "rust_decimal", "serde", "serde_json", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.30.0", +] + +[[package]] +name = "solana-account" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efc0ed36decb689413b9da5d57f2be49eea5bebb3cf7897015167b0c4336e731" +dependencies = [ + "bincode", + "serde", + "serde_bytes", + "serde_derive", + "solana-account-info", + "solana-clock", + "solana-instruction-error", + "solana-pubkey 4.3.0", + "solana-sdk-ids", + "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", + "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.19", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9cf16495d9eb53e3d04e72366a33bb1c20c24e78c171d8b8f5978357b63ae95" +dependencies = [ + "bincode", + "serde_core", + "solana-address 2.7.0", + "solana-program-error", + "solana-program-memory", +] + +[[package]] +name = "solana-address" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2ecac8e1b7f74c2baa9e774c42817e3e75b20787134b76cc4d45e8a604488f5" +dependencies = [ + "solana-address 2.7.0", +] + +[[package]] +name = "solana-address" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01332a01c0a3098404d55a724c8d9a92aed4a50fe40a7dd0c7a51e29274c14de" +dependencies = [ + "borsh", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "five8", + "five8_const", + "rand 0.9.5", + "serde", + "serde_derive", + "sha2-const-stable", + "solana-atomic-u64", + "solana-define-syscall 5.2.0", + "solana-nullable", + "solana-program-error", + "solana-sanitize", + "solana-sha256-hasher", + "wincode", +] + +[[package]] +name = "solana-address-lookup-table-interface" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dedafa11d25554279235dd0539d378adc144183eca65072a302c9592cc6a591" +dependencies = [ + "bincode", + "bytemuck", + "serde", + "serde_derive", + "solana-clock", + "solana-instruction", + "solana-instruction-error", + "solana-pubkey 4.3.0", + "solana-sdk-ids", + "solana-slot-hashes", +] + +[[package]] +name = "solana-atomic-u64" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "085db4906d89324cef2a30840d59eaecf3d4231c560ec7c9f6614a93c652f501" +dependencies = [ + "parking_lot", +] + +[[package]] +name = "solana-big-mod-exp" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30c80fb6d791b3925d5ec4bf23a7c169ef5090c013059ec3ed7d0b2c04efa085" +dependencies = [ + "num-bigint 0.4.8", + "num-traits", + "solana-define-syscall 3.0.0", +] + +[[package]] +name = "solana-blake3-hasher" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7116e1d942a2432ca3f514625104757ab8a56233787e95144c93950029e31176" +dependencies = [ + "blake3", + "solana-define-syscall 4.0.1", + "solana-hash 4.6.0", +] + +[[package]] +name = "solana-borsh" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c04abbae16f57178a163125805637b8a076175bb5c0002fb04f4792bea901cf7" +dependencies = [ + "borsh", +] + +[[package]] +name = "solana-client" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1021bbda77368c57f3d8b850c5d9b19077906d21d1c516b1ccfbb8fe7737553f" +dependencies = [ + "anza-quinn", + "async-trait", + "bincode", + "dashmap", + "futures", + "futures-util", + "indexmap", + "indicatif", + "log", + "rayon", + "solana-account", + "solana-client-traits", + "solana-commitment-config", + "solana-connection-cache", + "solana-epoch-info", + "solana-hash 3.1.0", + "solana-instruction", + "solana-keypair", + "solana-measure", + "solana-message", + "solana-net-utils", + "solana-pubkey 3.0.0", + "solana-pubsub-client", + "solana-quic-client", + "solana-quic-definitions", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-rpc-client-nonce-utils", + "solana-signature", + "solana-signer", + "solana-streamer", + "solana-time-utils", + "solana-tpu-client", + "solana-transaction", + "solana-transaction-error", + "solana-transaction-status-client-types", + "solana-udp-client", + "thiserror 2.0.19", + "tokio", + "tokio-util", +] + +[[package]] +name = "solana-client-traits" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08618ed587e128105510c54ae3e456b9a06d674d8640db75afe66dad65cb4e02" +dependencies = [ + "solana-account", + "solana-commitment-config", + "solana-epoch-info", + "solana-hash 3.1.0", + "solana-instruction", + "solana-keypair", + "solana-message", + "solana-pubkey 3.0.0", + "solana-signature", + "solana-signer", + "solana-system-interface 2.0.0", + "solana-transaction", + "solana-transaction-error", +] + +[[package]] +name = "solana-clock" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7708bdb262fd9c257c3a56d4289297b10a3e821b8cba3f7cf42b49c40201ab9" +dependencies = [ + "serde", + "serde_derive", + "solana-get-sysvar", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-cluster-type" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0cb69036cd1ac8b8a2c644115535396794b057976de2a1033635c25aba333d5" +dependencies = [ + "solana-hash 4.6.0", +] + +[[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-interface" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0139c131989ae133c23b31c04ecf03949c198a335e5dc028ddd54bb5c9fe6ee8" +dependencies = [ + "solana-instruction", + "solana-sdk-ids", +] + +[[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-connection-cache" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a1f37271395e9e5371ef18d93197d5d53a18acd5651b66a5aa2ac68bd6dd54" +dependencies = [ + "async-trait", + "bincode", + "crossbeam-channel", + "futures-util", + "indexmap", + "log", + "rand 0.8.7", + "rayon", + "solana-keypair", + "solana-measure", + "solana-metrics", + "solana-time-utils", + "solana-transaction-error", + "thiserror 2.0.19", + "tokio", +] + +[[package]] +name = "solana-cpi" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dea26709d867aada85d0d3617db0944215c8bb28d3745b912de7db13a23280c" +dependencies = [ + "solana-account-info", + "solana-define-syscall 4.0.1", + "solana-instruction", + "solana-program-error", + "solana-pubkey 4.3.0", + "solana-stable-layout", +] + +[[package]] +name = "solana-curve25519" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aff7432cdf2ec6a44ac06b4d64d2ee006f6c0066d6456e032a7fe25be40cd5c" +dependencies = [ + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "solana-define-syscall 3.0.0", + "subtle", + "thiserror 2.0.19", +] + +[[package]] +name = "solana-define-syscall" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9697086a4e102d28a156b8d6b521730335d6951bd39a5e766512bbe09007cee" + +[[package]] +name = "solana-define-syscall" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e5b1c0bc1d4a4d10c88a4100499d954c09d3fecfae4912c1a074dff68b1738" + +[[package]] +name = "solana-define-syscall" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf8209ece2bd9f1450e672858ffc0e5c8c786ff6916d2a862b126dd0128f380f" + +[[package]] +name = "solana-derivation-path" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff71743072690fdbdfcdc37700ae1cb77485aaad49019473a81aee099b1e0b8c" +dependencies = [ + "derivation-path", + "qstring", + "uriparse", +] + +[[package]] +name = "solana-ed25519" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9eb363f7bce265f568551029efdff3f33752376fe8289cb628fe084503a925f" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "curve25519-dalek-derive", + "digest 0.11.3", + "ed25519", + "hashbrown 0.15.5", + "rand 0.10.2", + "rand_core 0.10.1", + "rustc_version", + "sha2 0.11.0", + "subtle", + "zeroize", +] + +[[package]] +name = "solana-epoch-info" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e093c84f6ece620a6b10cd036574b0cd51944231ab32d81f80f76d54aba833e6" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "solana-epoch-rewards" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0788d74ee15778deecaa15ed1a1e37727ba954f86cbc35225450a1f2b5012969" +dependencies = [ + "serde", + "serde_derive", + "solana-get-sysvar", + "solana-hash 4.6.0", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-epoch-rewards-hasher" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee8beac9bff4db9225e57d532d169b0be5e447f1e6601a2f50f27a01bf5518f" +dependencies = [ + "siphasher 0.3.11", + "solana-address 2.7.0", + "solana-hash 4.6.0", +] + +[[package]] +name = "solana-epoch-schedule" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1633cfd10cde127f2caf8f12021b4f8e9a425e7e4eea4326e428c422376d6fd" +dependencies = [ + "serde", + "serde_derive", + "solana-get-sysvar", + "solana-program-error", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-epoch-stake" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "027e6d0b9e7daac5b2ac7c3f9ca1b727861121d9ef05084cf435ff736051e7c2" +dependencies = [ + "solana-define-syscall 5.2.0", + "solana-pubkey 4.3.0", +] + +[[package]] +name = "solana-example-mocks" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978855d164845c1b0235d4b4d101cadc55373fffaf0b5b6cfa2194d25b2ed658" +dependencies = [ + "serde", + "serde_derive", + "solana-address-lookup-table-interface", + "solana-clock", + "solana-hash 3.1.0", + "solana-instruction", + "solana-keccak-hasher", + "solana-message", + "solana-nonce", + "solana-pubkey 3.0.0", + "solana-sdk-ids", + "solana-system-interface 2.0.0", + "thiserror 2.0.19", +] + +[[package]] +name = "solana-feature-gate-interface" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75ca9b5cbb6f500f7fd73db5bd95640f71a83f04d6121a0e59a43b202dca2731" +dependencies = [ + "serde", + "serde_derive", + "solana-program-error", + "solana-pubkey 4.3.0", + "solana-sdk-ids", +] + +[[package]] +name = "solana-fee-calculator" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4bf4f4afb4704212ef1d994ee65bef7293441721639dfd16f0e60996f37be51" +dependencies = [ + "log", + "serde", + "serde_derive", +] + +[[package]] +name = "solana-fee-structure" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2abdb1223eea8ec64136f39cb1ffcf257e00f915c957c35c0dd9e3f4e700b0" +dependencies = [ + "serde", + "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.7.0", + "solana-define-syscall 5.2.0", + "solana-program-error", +] + +[[package]] +name = "solana-hard-forks" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb50b2df7a36a2af58ce24bb0229622ac845dcc196e8c23b3ea4a29dd6bee09" + +[[package]] +name = "solana-hash" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "337c246447142f660f778cf6cb582beba8e28deb05b3b24bfb9ffd7c562e5f41" +dependencies = [ + "solana-hash 4.6.0", +] + +[[package]] +name = "solana-hash" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0df9b01495ed31100aca97a7f5862d5e19ab1636d60d1a9f02391408dd9dec84" +dependencies = [ + "borsh", + "bytemuck", + "bytemuck_derive", + "five8", + "serde", + "serde_derive", + "solana-atomic-u64", + "solana-sanitize", +] + +[[package]] +name = "solana-inflation" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf186550ea7438e2708bd0c233f01fe9c3fa45b9b607ff993b650ce60af102e" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "solana-instruction" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d70cf6ece1070a66d25e68274f338f29664794669c175223940a298645ef3495" +dependencies = [ + "bincode", + "borsh", + "serde", + "serde_derive", + "solana-define-syscall 5.2.0", + "solana-instruction-error", + "solana-pubkey 4.3.0", +] + +[[package]] +name = "solana-instruction-error" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8e7db78c122d02189619490b1fef04a2a042c389662920617c0e6381fdf8fdd" +dependencies = [ + "num-traits", + "serde", + "serde_derive", + "solana-program-error", +] + +[[package]] +name = "solana-instructions-sysvar" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e0732294560e88ecdb2bbc656e67383e9f88c78ec09469cef172f0d28cd1bcd" +dependencies = [ + "bitflags 2.13.1", + "solana-account-info", + "solana-instruction", + "solana-instruction-error", + "solana-program-error", + "solana-sanitize", + "solana-sdk-ids", + "solana-serialize-utils", + "solana-sysvar-id", +] + +[[package]] +name = "solana-keccak-hasher" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed1c0d16d6fdeba12291a1f068cdf0d479d9bff1141bf44afd7aa9d485f65ef8" +dependencies = [ + "sha3", + "solana-define-syscall 4.0.1", + "solana-hash 4.6.0", +] + +[[package]] +name = "solana-keypair" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "263d614c12aa267a3278703175fd6440552ca61bc960b5a02a4482720c53438b" +dependencies = [ + "ed25519-dalek", + "ed25519-dalek-bip32", + "five8", + "five8_core", + "rand 0.9.5", + "solana-address 2.7.0", + "solana-derivation-path", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-signature", + "solana-signer", +] + +[[package]] +name = "solana-last-restart-slot" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5099e736c3c06c451b307a60637d69eb65b3144143ebeed899e2fd1134f4fc35" +dependencies = [ + "serde", + "serde_derive", + "solana-get-sysvar", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-loader-v2-interface" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e4a6f0ad4fd9c30679bfee2ce3ea6a449cac38049f210480b751f65676dfe82" +dependencies = [ + "serde", + "serde_bytes", + "serde_derive", + "solana-instruction", + "solana-pubkey 3.0.0", + "solana-sdk-ids", +] + +[[package]] +name = "solana-loader-v3-interface" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0538d4dbc9022e01616f1c58f2db98ece739c5d5ed4a2ef8737a953e76a2d4" +dependencies = [ + "serde", + "serde_bytes", + "serde_derive", + "solana-instruction", + "solana-pubkey 4.3.0", + "solana-sdk-ids", + "solana-system-interface 3.3.0", +] + +[[package]] +name = "solana-measure" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b0eef68497ca818f50da3de449c64dc406d28170e395fd2ec40b64b6798afec" + +[[package]] +name = "solana-message" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0448b1fd891c5f46491e5dc7d9986385ba3c852c340db2911dd29faa01d2b08d" +dependencies = [ + "bincode", + "blake3", + "lazy_static", + "serde", + "serde_derive", + "solana-address 2.7.0", + "solana-hash 4.6.0", + "solana-instruction", + "solana-sanitize", + "solana-sdk-ids", + "solana-short-vec", + "solana-transaction-error", +] + +[[package]] +name = "solana-metrics" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba33d34f2297e307bc124c3108da4b5b536a63022d705c0367a8512caebc9c4f" +dependencies = [ + "crossbeam-channel", + "gethostname", + "log", + "reqwest 0.12.28", + "solana-cluster-type", + "solana-sha256-hasher", + "solana-time-utils", + "thiserror 2.0.19", +] + +[[package]] +name = "solana-msg" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726b7cbbc6be6f1c6f29146ac824343b9415133eee8cce156452ad1db93f8008" +dependencies = [ + "solana-define-syscall 5.2.0", +] + +[[package]] +name = "solana-native-token" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8dd4c280dca9d046139eb5b7a5ac9ad10403fbd64964c7d7571214950d758f" + +[[package]] +name = "solana-net-utils" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2a83f0f11be6d2c0104871136ae22250a5dafd013fe137678312b73a7e35044" +dependencies = [ + "anyhow", + "bincode", + "bytes", + "cfg-if", + "dashmap", + "itertools", + "log", + "nix", + "rand 0.8.7", + "serde", + "socket2", + "solana-serde", + "solana-svm-type-overrides", + "tokio", + "url", +] + +[[package]] +name = "solana-nonce" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f13b7ec92de6dd4ef713ed763d22585efa0042cd244bce81997e52077885c47" +dependencies = [ + "serde", + "serde_derive", + "solana-fee-calculator", + "solana-hash 4.6.0", + "solana-pubkey 4.3.0", + "solana-sha256-hasher", +] + +[[package]] +name = "solana-nullable" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "889194d8c5faec648f2f6fadddb60566249921ebb074e2707e7095458d5864e2" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "solana-offchain-message" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e2a1141a673f72a05cf406b99e4b2b8a457792b7c01afa07b3f00d4e2de393" +dependencies = [ + "num_enum", + "solana-hash 3.1.0", + "solana-packet", + "solana-pubkey 3.0.0", + "solana-sanitize", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", +] + +[[package]] +name = "solana-packet" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edf2f25743c95229ac0fdc32f8f5893ef738dbf332c669e9861d33ddb0f469d" +dependencies = [ + "bincode", + "bitflags 2.13.1", + "cfg_eval", + "serde", + "serde_derive", + "serde_with", +] + +[[package]] +name = "solana-perf" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "794506987f9168331a84836eb66e762ecd5fd18920f0c5bcdf349eefff553e59" +dependencies = [ + "ahash 0.8.12", + "bincode", + "bv", + "bytes", + "caps", + "curve25519-dalek", + "dlopen2", + "fnv", + "libc", + "log", + "nix", + "rand 0.8.7", + "rayon", + "serde", + "solana-hash 3.1.0", + "solana-message", + "solana-metrics", + "solana-packet", + "solana-pubkey 3.0.0", + "solana-rayon-threadlimit", + "solana-sdk-ids", + "solana-short-vec", + "solana-signature", + "solana-time-utils", + "solana-transaction-context", +] + +[[package]] +name = "solana-presigner" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f704eaf825be3180832445b9e4983b875340696e8e7239bf2d535b0f86c14a2" +dependencies = [ + "solana-pubkey 3.0.0", + "solana-signature", + "solana-signer", +] + +[[package]] +name = "solana-program" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91b12305dd81045d705f427acd0435a2e46444b65367d7179d7bdcfc3bc5f5eb" +dependencies = [ + "memoffset", + "solana-account-info", + "solana-big-mod-exp", + "solana-blake3-hasher", + "solana-borsh", + "solana-clock", + "solana-cpi", + "solana-define-syscall 3.0.0", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-epoch-stake", + "solana-example-mocks", + "solana-fee-calculator", + "solana-hash 3.1.0", + "solana-instruction", + "solana-instruction-error", + "solana-instructions-sysvar", + "solana-keccak-hasher", + "solana-last-restart-slot", + "solana-msg", + "solana-native-token", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey 3.0.0", + "solana-rent", + "solana-sdk-ids", + "solana-secp256k1-recover", + "solana-serde-varint", + "solana-serialize-utils", + "solana-sha256-hasher", + "solana-short-vec", + "solana-slot-hashes", + "solana-slot-history", + "solana-stable-layout", + "solana-sysvar", + "solana-sysvar-id", +] + +[[package]] +name = "solana-program-entrypoint" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c9b0a1ff494e05f503a08b3d51150b73aa639544631e510279d6375f290997" +dependencies = [ + "solana-account-info", + "solana-define-syscall 4.0.1", + "solana-program-error", + "solana-pubkey 4.3.0", +] + +[[package]] +name = "solana-program-error" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f04fa578707b3612b095f0c8e19b66a1233f7c42ca8082fcb3b745afcc0add6" +dependencies = [ + "borsh", + "serde", + "serde_derive", +] + +[[package]] +name = "solana-program-memory" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4068648649653c2c50546e9a7fb761791b5ab0cda054c771bb5808d3a4b9eb52" +dependencies = [ + "solana-define-syscall 4.0.1", +] + +[[package]] +name = "solana-program-option" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a88006a9b8594088cec9027ab77caaaa258a2aaa2083d3f086c44b42e50aeab" + +[[package]] +name = "solana-program-pack" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7701cb15b90667ae1c89ef4ac35a59c61e66ce58ddee13d729472af7f41d59" +dependencies = [ + "solana-program-error", +] + +[[package]] +name = "solana-pubkey" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8909d399deb0851aa524420beeb5646b115fd253ef446e35fe4504c904da3941" +dependencies = [ + "rand 0.8.7", + "solana-address 1.1.0", +] + +[[package]] +name = "solana-pubkey" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f71b7a414de2ced1071f015834e9be581592d013432adbd06d02e4af11eba9" +dependencies = [ + "solana-address 2.7.0", +] + +[[package]] +name = "solana-pubsub-client" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3eb58936a5c35140f7eb0fc0a30685a32523001b24c4e3e18e70ca05c8c680b" +dependencies = [ + "crossbeam-channel", + "futures-util", + "http 0.2.12", + "log", + "semver", + "serde", + "serde_json", + "solana-account-decoder-client-types", + "solana-clock", + "solana-pubkey 3.0.0", + "solana-rpc-client-types", + "solana-signature", + "thiserror 2.0.19", + "tokio", + "tokio-stream", + "tokio-tungstenite 0.28.0", + "tungstenite 0.28.0", + "url", +] + +[[package]] +name = "solana-quic-client" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dab47dde0f9b63bfee69fb7f4c7525b87b6685de2e538e8d0ab614625df3d093" +dependencies = [ + "anza-quinn", + "anza-quinn-proto", + "async-lock", + "async-trait", + "futures", + "itertools", + "log", + "rustls", + "solana-connection-cache", + "solana-keypair", + "solana-measure", + "solana-metrics", + "solana-net-utils", + "solana-pubkey 3.0.0", + "solana-quic-definitions", + "solana-rpc-client-api", + "solana-signer", + "solana-streamer", + "solana-tls-utils", + "solana-transaction-error", + "thiserror 2.0.19", + "tokio", +] + +[[package]] +name = "solana-quic-definitions" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15319accf7d3afd845817aeffa6edd8cc185f135cefbc6b985df29cfd8c09609" +dependencies = [ + "solana-keypair", +] + +[[package]] +name = "solana-rayon-threadlimit" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d06a84c1c10b97998364e06e1254e2e2364c338ce0cf1bdcfc996ab39e85c618" +dependencies = [ + "log", + "num_cpus", +] + +[[package]] +name = "solana-rent" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e860d5499a705369778647e97d760f7670adfb6fc8419dd3d568deccd46d5487" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[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 0.12.28", + "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 0.12.28", + "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.19", +] + +[[package]] +name = "solana-rpc-client-nonce-utils" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4804524b94b49e721c6febc0b4c8f745cd76fc05dfbd972a1e6257e23502b59" +dependencies = [ + "solana-account", + "solana-commitment-config", + "solana-hash 3.1.0", + "solana-message", + "solana-nonce", + "solana-pubkey 3.0.0", + "solana-rpc-client", + "solana-sdk-ids", + "thiserror 2.0.19", +] + +[[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.19", +] + +[[package]] +name = "solana-sanitize" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf09694a0fc14e5ffb18f9b7b7c0f15ecb6eac5b5610bf76a1853459d19daf9" + +[[package]] +name = "solana-sbpf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15b079e08471a9dbfe1e48b2c7439c85aa2a055cbd54eddd8bd257b0a7dbb29" +dependencies = [ + "byteorder", + "combine 3.8.1", + "hash32", + "log", + "rustc-demangle", + "thiserror 2.0.19", +] + +[[package]] +name = "solana-sdk" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f03df7969f5e723ad31b6c9eadccc209037ac4caa34d8dc259316b05c11e82b" +dependencies = [ + "bincode", + "bs58", + "serde", + "solana-account", + "solana-epoch-info", + "solana-epoch-rewards-hasher", + "solana-fee-structure", + "solana-inflation", + "solana-keypair", + "solana-message", + "solana-offchain-message", + "solana-presigner", + "solana-program", + "solana-program-memory", + "solana-pubkey 3.0.0", + "solana-sanitize", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-serde", + "solana-serde-varint", + "solana-short-vec", + "solana-shred-version", + "solana-signature", + "solana-signer", + "solana-time-utils", + "solana-transaction", + "solana-transaction-error", + "thiserror 2.0.19", +] + +[[package]] +name = "solana-sdk-ids" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "def234c1956ff616d46c9dd953f251fa7096ddbaa6d52b165218de97882b7280" +dependencies = [ + "solana-address 2.7.0", +] + +[[package]] +name = "solana-sdk-macro" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8765316242300c48242d84a41614cb3388229ec353ba464f6fe62a733e41806f" +dependencies = [ + "bs58", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "solana-secp256k1-recover" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce0d2e8d53946f04e789476d6c407e4997b7fb412483df5fc10c075c65cb2edf" +dependencies = [ + "k256", + "solana-define-syscall 5.2.0", + "thiserror 2.0.19", +] + +[[package]] +name = "solana-seed-derivable" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff7bdb72758e3bec33ed0e2658a920f1f35dfb9ed576b951d20d63cb61ecd95c" +dependencies = [ + "solana-derivation-path", +] + +[[package]] +name = "solana-seed-phrase" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc905b200a95f2ea9146e43f2a7181e3aeb55de6bc12afb36462d00a3c7310de" +dependencies = [ + "hmac", + "pbkdf2", + "sha2 0.10.9", +] + +[[package]] +name = "solana-serde" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709a93cab694c70f40b279d497639788fc2ccbcf9b4aa32273d4b361322c02dd" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-serde-varint" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "950e5b83e839dc0f92c66afc124bb8f40e89bc90f0579e8ec5499296d27f54e3" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-serialize-utils" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "761357b0853c9623bf12c1d2314b3d6160a85b087b84c45224fb85766d22616b" +dependencies = [ + "solana-instruction-error", + "solana-pubkey 4.3.0", + "solana-sanitize", +] + +[[package]] +name = "solana-sha256-hasher" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db7dc3011ea4c0334aaaa7e7128cb390ecf546b28d412e9bf2064680f57f588f" +dependencies = [ + "sha2 0.10.9", + "solana-define-syscall 4.0.1", + "solana-hash 4.6.0", +] + +[[package]] +name = "solana-short-vec" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75782529cc4521114c1ecd71c7e2cdebd41a6fe9844b5d088fd36ef08c57c36" +dependencies = [ + "serde_core", +] + +[[package]] +name = "solana-shred-version" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6c79722e299d957958bf33695f7cd1ef6724ff55563c60fd9e3e24487cccde2" +dependencies = [ + "solana-hard-forks", + "solana-hash 4.6.0", + "solana-sha256-hasher", +] + +[[package]] +name = "solana-signature" +version = "3.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6843d39c97ac1e6ef7ae06c676183e1c2d427aaa7cfdec8a61982342eb86fc2d" +dependencies = [ + "five8", + "rand 0.9.5", + "serde", + "serde-big-array", + "serde_derive", + "solana-ed25519", + "solana-sanitize", + "wincode", +] + +[[package]] +name = "solana-signer" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520bd6021163ee517f4bdc7ae03ded904f97e11320001ba0b3355f45eb14f558" +dependencies = [ + "solana-pubkey 4.3.0", + "solana-signature", + "solana-transaction-error", +] + +[[package]] +name = "solana-slot-hashes" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "007d6bc909599eea325c9d09f7ff16ef6166c134876ff47a6a122d693d058dad" +dependencies = [ + "serde", + "serde_derive", + "solana-get-sysvar", + "solana-hash 4.6.0", + "solana-sdk-ids", + "solana-sysvar-id", +] + +[[package]] +name = "solana-slot-history" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4560fde841a6f2001aedc33b74fe99840ee3d56a71fe9b98ee332303b8597900" +dependencies = [ + "bv", + "serde", + "serde_derive", + "solana-get-sysvar", + "solana-sdk-ids", + "solana-sysvar-id", +] + +[[package]] +name = "solana-stable-layout" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9f6a291ba063a37780af29e7db14bdd3dc447584d8ba5b3fc4b88e2bbc982fa" +dependencies = [ + "solana-instruction", + "solana-pubkey 4.3.0", +] + +[[package]] +name = "solana-stake-interface" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9bc26191b533f9a6e5a14cca05174119819ced680a80febff2f5051a713f0db" +dependencies = [ + "num-traits", + "serde", + "serde_derive", + "solana-clock", + "solana-cpi", + "solana-instruction", + "solana-program-error", + "solana-pubkey 3.0.0", + "solana-system-interface 2.0.0", + "solana-sysvar", + "solana-sysvar-id", +] + +[[package]] +name = "solana-streamer" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1506f6dc927e86fd673bee67fafa27c942527874bac7d4aea63869dcbf22615" +dependencies = [ + "anza-quinn", + "anza-quinn-proto", + "arc-swap", + "bytes", + "crossbeam-channel", + "dashmap", + "futures", + "futures-util", + "governor", + "histogram", + "indexmap", + "itertools", + "libc", + "log", + "nix", + "num_cpus", + "pem", + "percentage", + "rand 0.8.7", + "rustls", + "smallvec", + "socket2", + "solana-keypair", + "solana-measure", + "solana-metrics", + "solana-net-utils", + "solana-packet", + "solana-perf", + "solana-pubkey 3.0.0", + "solana-quic-definitions", + "solana-signature", + "solana-signer", + "solana-time-utils", + "solana-tls-utils", + "solana-transaction-error", + "solana-transaction-metrics-tracker", + "thiserror 2.0.19", + "tokio", + "tokio-util", + "x509-parser", +] + +[[package]] +name = "solana-svm-feature-set" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc2e2fdebd77159b7a14ee45c9dbb3f1d202e8e7ccc14e4cda78c006a7a78a9" + +[[package]] +name = "solana-svm-type-overrides" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b78cd0bfb102d4197ce8c590f800a119ba0d358369ca57b0f66e94d1317fd0e" +dependencies = [ + "rand 0.8.7", +] + +[[package]] +name = "solana-system-interface" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e1790547bfc3061f1ee68ea9d8dc6c973c02a163697b24263a8e9f2e6d4afa2" +dependencies = [ + "num-traits", + "serde", + "serde_derive", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey 3.0.0", +] + +[[package]] +name = "solana-system-interface" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e2d5311d0584af231c6c2b0503ba1c3aa50118ead4f503ab215ccbdd1ffac57" +dependencies = [ + "num-traits", + "serde", + "serde_derive", + "solana-address 2.7.0", + "solana-instruction", + "solana-msg", + "solana-program-error", +] + +[[package]] +name = "solana-sysvar" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6690d3dd88f15c21edff68eb391ef8800df7a1f5cec84ee3e8d1abf05affdf74" +dependencies = [ + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "lazy_static", + "serde", + "serde_derive", + "solana-account-info", + "solana-clock", + "solana-define-syscall 4.0.1", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-fee-calculator", + "solana-hash 4.6.0", + "solana-instruction", + "solana-last-restart-slot", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-pubkey 4.3.0", + "solana-rent", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-slot-hashes", + "solana-slot-history", + "solana-sysvar-id", +] + +[[package]] +name = "solana-sysvar-id" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17358d1e9a13e5b9c2264d301102126cf11a47fd394cdf3dec174fe7bc96e1de" +dependencies = [ + "solana-address 2.7.0", + "solana-sdk-ids", +] + +[[package]] +name = "solana-time-utils" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced92c60aa76ec4780a9d93f3bd64dfa916e1b998eacc6f1c110f3f444f02c9" + +[[package]] +name = "solana-tls-utils" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8e195a1cd2dbb54fb234abb1fd5c92021152669f0d8853075a52b67bc9e7095" +dependencies = [ + "rustls", + "solana-keypair", + "solana-pubkey 3.0.0", + "solana-signer", + "x509-parser", +] + +[[package]] +name = "solana-tpu-client" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71b3e8d4db00daee1efb357c2e810ce07fd5f0d9167c722434b77c4f9aa668b1" +dependencies = [ + "async-trait", + "bincode", + "futures-util", + "indexmap", + "indicatif", + "log", + "rayon", + "solana-client-traits", + "solana-clock", + "solana-commitment-config", + "solana-connection-cache", + "solana-epoch-schedule", + "solana-measure", + "solana-message", + "solana-net-utils", + "solana-pubkey 3.0.0", + "solana-pubsub-client", + "solana-quic-definitions", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-signature", + "solana-signer", + "solana-transaction", + "solana-transaction-error", + "thiserror 2.0.19", + "tokio", +] + +[[package]] +name = "solana-transaction" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96697cff5075a028265324255efed226099f6d761ca67342b230d09f72cc48d2" +dependencies = [ + "bincode", + "serde", + "serde_derive", + "solana-address 2.7.0", + "solana-hash 4.6.0", + "solana-instruction", + "solana-instruction-error", + "solana-message", + "solana-sanitize", + "solana-sdk-ids", + "solana-short-vec", + "solana-signature", + "solana-signer", + "solana-transaction-error", +] + +[[package]] +name = "solana-transaction-context" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a3c3a69688293a195b02c60a5384d855b8de19981f404c71ccb9e7f139b98f" +dependencies = [ + "bincode", + "serde", + "solana-account", + "solana-instruction", + "solana-instructions-sysvar", + "solana-pubkey 3.0.0", + "solana-rent", + "solana-sbpf", + "solana-sdk-ids", +] + +[[package]] +name = "solana-transaction-error" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a37cf28c58b03878d38c38411f0414d3a99a9e3b7e5ebb0f83f3317b2796d18" +dependencies = [ + "serde", + "serde_derive", + "solana-instruction-error", + "solana-sanitize", +] + +[[package]] +name = "solana-transaction-metrics-tracker" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfdbabf25f0b1335c4042924011f1be7d93b668d3315b12bbb33781ad388adc" +dependencies = [ + "base64 0.22.1", + "bincode", + "log", + "rand 0.8.7", + "solana-packet", + "solana-perf", + "solana-short-vec", + "solana-signature", +] + +[[package]] +name = "solana-transaction-status" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56d3f07d7cd026143e96d09cbccf37f5d5a06c4816719f7c48da32978f28aa8e" +dependencies = [ + "Inflector", + "agave-reserved-account-keys", + "base64 0.22.1", + "bincode", + "borsh", + "bs58", + "log", + "serde", + "serde_json", + "solana-account-decoder", + "solana-address-lookup-table-interface", + "solana-clock", + "solana-hash 3.1.0", + "solana-instruction", + "solana-loader-v2-interface", + "solana-loader-v3-interface", + "solana-message", + "solana-program-option", + "solana-pubkey 3.0.0", + "solana-reward-info", + "solana-sdk-ids", + "solana-signature", + "solana-stake-interface", + "solana-system-interface 2.0.0", + "solana-transaction", + "solana-transaction-error", + "solana-transaction-status-client-types", + "solana-vote-interface", + "spl-associated-token-account-interface", + "spl-memo-interface", + "spl-token-2022-interface", + "spl-token-group-interface", + "spl-token-interface", + "spl-token-metadata-interface", + "thiserror 2.0.19", +] + +[[package]] +name = "solana-transaction-status-client-types" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f7c3d15f25111cd1e320ad8ee3515ccae9983ab750cec83517c8553419b70a" +dependencies = [ + "base64 0.22.1", + "bincode", + "bs58", + "serde", + "serde_json", + "solana-account-decoder-client-types", + "solana-commitment-config", + "solana-instruction", + "solana-message", + "solana-pubkey 3.0.0", + "solana-reward-info", + "solana-signature", + "solana-transaction", + "solana-transaction-context", + "solana-transaction-error", + "thiserror 2.0.19", +] + +[[package]] +name = "solana-udp-client" +version = "3.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e01a3aa2c2f0c1cd9e493e59ef9c7f0281cdf56845900927d3e3a021222bbab" +dependencies = [ + "async-trait", + "solana-connection-cache", + "solana-keypair", + "solana-net-utils", + "solana-streamer", + "solana-transaction-error", + "thiserror 2.0.19", + "tokio", +] + +[[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.7", + "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", + "solana-sdk-ids", + "solana-serde-varint", + "solana-serialize-utils", + "solana-short-vec", + "solana-system-interface 2.0.0", +] + +[[package]] +name = "solana-zero-copy" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd3183a7934dd7e6490ae86732616cd70361f5ab9401b9a375ab62f7fa17b112" +dependencies = [ + "borsh", + "bytemuck", + "bytemuck_derive", +] + +[[package]] +name = "solana-zk-sdk" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9602bcb1f7af15caef92b91132ec2347e1c51a72ecdbefdaefa3eac4b8711475" +dependencies = [ + "aes-gcm-siv", + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "getrandom 0.2.17", + "itertools", + "js-sys", + "merlin", + "num-derive", + "num-traits", + "rand 0.8.7", + "serde", + "serde_derive", + "serde_json", + "sha3", + "solana-derivation-path", + "solana-instruction", + "solana-pubkey 3.0.0", + "solana-sdk-ids", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-signature", + "solana-signer", + "subtle", + "thiserror 2.0.19", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "spinning_top" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "spl-associated-token-account-interface" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6433917b60441d68d99a17e121d9db0ea15a9a69c0e5afa34649cf5ba12612f" +dependencies = [ + "borsh", + "solana-instruction", + "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.119", +] + +[[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.119", + "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-memo-interface" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3745d384b0afee980d43d62b66c27bdcbbd03507732b8d3626d3413cb72084f2" +dependencies = [ + "solana-instruction", + "solana-pubkey 4.3.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.19", +] + +[[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.19", +] + +[[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.19", +] + +[[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.19", +] + +[[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.7.0", + "solana-instruction", + "solana-nullable", + "solana-program-error", + "solana-zero-copy", + "spl-discriminator", + "thiserror 2.0.19", +] + +[[package]] +name = "spl-token-interface" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c564ac05a7c8d8b12e988a37d82695b5ba4db376d07ea98bc4882c81f96c7f3" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-instruction", + "solana-program-error", + "solana-program-option", + "solana-program-pack", + "solana-pubkey 3.0.0", + "solana-sdk-ids", + "thiserror 2.0.19", +] + +[[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.19", +] + +[[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.19", ] [[package]] @@ -1828,6 +5978,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "subtle" version = "2.6.1" @@ -1876,6 +6032,18 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + [[package]] name = "synstructure" version = "0.13.2" @@ -1927,13 +6095,33 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + [[package]] name = "thiserror" version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.19", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", ] [[package]] @@ -1947,6 +6135,36 @@ dependencies = [ "syn 3.0.3", ] +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + [[package]] name = "tinystr" version = "0.8.3" @@ -1981,7 +6199,9 @@ dependencies = [ "bytes", "libc", "mio", + "parking_lot", "pin-project-lite", + "signal-hook-registry", "socket2", "tokio-macros", "windows-sys 0.61.2", @@ -2018,6 +6238,35 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-stream" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" +dependencies = [ + "futures-util", + "log", + "native-tls", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tungstenite 0.28.0", + "webpki-roots 0.26.11", +] + [[package]] name = "tokio-tungstenite" version = "0.30.0" @@ -2029,7 +6278,7 @@ dependencies = [ "native-tls", "tokio", "tokio-native-tls", - "tungstenite", + "tungstenite 0.30.0", ] [[package]] @@ -2041,6 +6290,7 @@ dependencies = [ "bytes", "futures-core", "futures-sink", + "futures-util", "libc", "pin-project-lite", "tokio", @@ -2097,12 +6347,17 @@ version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ + "async-compression", "bitflags 2.13.1", "bytes", + "futures-core", "futures-util", - "http", + "http 1.5.0", "http-body", + "http-body-util", "pin-project-lite", + "tokio", + "tokio-util", "tower", "tower-layer", "tower-service", @@ -2127,6 +6382,7 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ + "log", "pin-project-lite", "tracing-core", ] @@ -2146,6 +6402,27 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" +dependencies = [ + "bytes", + "data-encoding", + "http 1.5.0", + "httparse", + "log", + "native-tls", + "rand 0.9.5", + "rustls", + "rustls-pki-types", + "sha1 0.10.7", + "thiserror 2.0.19", + "utf-8", + "webpki-roots 0.26.11", +] + [[package]] name = "tungstenite" version = "0.30.0" @@ -2154,13 +6431,13 @@ checksum = "e48ac77174b19c110a50ab2128b24215ac9cb40e0e12e093fb602d175c569d22" dependencies = [ "bytes", "data-encoding", - "http", + "http 1.5.0", "httparse", "log", "native-tls", "rand 0.10.2", - "sha1", - "thiserror", + "sha1 0.11.0", + "thiserror 2.0.19", ] [[package]] @@ -2175,12 +6452,59 @@ 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 = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common 0.1.7", + "subtle", +] + +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" +dependencies = [ + "fnv", + "lazy_static", +] + [[package]] name = "url" version = "2.5.8" @@ -2193,6 +6517,12 @@ dependencies = [ "serde", ] +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "utf8_iter" version = "1.0.4" @@ -2215,6 +6545,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "value-trait" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0508fce11ad19e0aab49ce20b6bec7f8f82902ded31df1c9fc61b90f0eb396b8" +dependencies = [ + "float-cmp", + "halfbrown", + "itoa", + "ryu", +] + [[package]] name = "vcpkg" version = "0.2.15" @@ -2227,6 +6569,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + [[package]] name = "walkdir" version = "2.5.0" @@ -2252,6 +6600,15 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "wasm-bindgen" version = "0.2.126" @@ -2337,6 +6694,40 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "webpki-roots" +version = "0.26.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.9", +] + +[[package]] +name = "webpki-roots" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.11" @@ -2346,6 +6737,37 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "wincode" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5d39d1a984eb7ae37afa348f058216d62a6d5f71640f4113a8114386c2a812a" +dependencies = [ + "pastey", + "proc-macro2", + "quote", + "thiserror 2.0.19", + "wincode-derive", +] + +[[package]] +name = "wincode-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cb427b174d0f50b407f003623db1d892986e780651ee9d4231f3c9fe9ffcbb7" +dependencies = [ + "darling 0.23.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "windows-core" version = "0.62.2" @@ -2416,13 +6838,22 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -2434,34 +6865,67 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "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_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[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_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2474,24 +6938,48 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[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_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[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_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -2507,6 +6995,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + [[package]] name = "writeable" version = "0.6.3" @@ -2522,6 +7016,24 @@ dependencies = [ "tap", ] +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs", + "base64 0.13.1", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror 1.0.69", + "time", +] + [[package]] name = "yoke" version = "0.8.3" @@ -2542,7 +7054,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.119", - "synstructure", + "synstructure 0.13.2", ] [[package]] @@ -2583,7 +7095,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.119", - "synstructure", + "synstructure 0.13.2", ] [[package]] @@ -2591,6 +7103,20 @@ name = "zeroize" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] [[package]] name = "zerotrie" @@ -2630,3 +7156,31 @@ name = "zmij" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[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 b0cdeae..246397b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,3 +19,4 @@ reqwest = { version = "0.13.4", features = ["json"] } async-trait = "0.1.91" csv = "1.4.0" chrono = { version = "0.4.45", features = ["serde"] } +helius = "1.1.0" From ba2baadd11f00ec74ecd3e571bc5af3e29535f5b Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 08:25:47 +0200 Subject: [PATCH 02/19] Refactored account management --- src/account.rs | 52 ++++++++----------------- src/bot.rs | 6 +-- src/executor/mod.rs | 10 ----- src/executor/pump_fun.rs | 82 +--------------------------------------- 4 files changed, 21 insertions(+), 129 deletions(-) diff --git a/src/account.rs b/src/account.rs index 829f916..6210ecc 100644 --- a/src/account.rs +++ b/src/account.rs @@ -1,7 +1,6 @@ use std::{collections::HashMap, path::PathBuf}; -use crate::executor::pump_fun::PumpDevAccount; -use anyhow::{Context, anyhow}; +use anyhow::Context; use serde::{Deserialize, Serialize}; pub fn get_accounts_path() -> anyhow::Result { @@ -13,47 +12,21 @@ pub fn get_accounts_path() -> anyhow::Result { } #[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(tag = "type")] -pub enum Account { - PumpDev(PumpDevAccount), +pub struct Account { + #[serde(rename = "publicKey")] + pub public_key: String, + #[serde(rename = "privateKey")] + pub private_key: String, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AccountManager { + #[serde(rename = "apiKey")] + pub api_key: String, pub active: String, pub accounts: HashMap, } -impl Account { - pub async fn new() -> anyhow::Result { - let response = reqwest::Client::new() - .post("https://pumpdev.io/api/wallet/create") - .json(&serde_json::json!({})) - .send() - .await - .context("Failed to create PumpDev wallet")?; - - if !response.status().is_success() { - let status = response.status(); - let body: serde_json::Value = response.json().await.unwrap_or_default(); - let message = body - .get("error") - .and_then(serde_json::Value::as_str) - .unwrap_or("Unknown error"); - return Err(anyhow!( - "Failed to create PumpDev wallet ({status}): {message}" - )); - } - - let account: PumpDevAccount = response - .json() - .await - .context("Failed to parse PumpDev wallet")?; - - Ok(Self::PumpDev(account)) - } -} - impl AccountManager { pub async fn get() -> anyhow::Result { let path = get_accounts_path()?; @@ -74,10 +47,17 @@ impl AccountManager { pub async fn new() -> anyhow::Result { let mut accounts = HashMap::new(); - accounts.insert("default".to_string(), Account::new().await?); + accounts.insert( + "default".to_string(), + Account { + public_key: String::new(), + private_key: String::new(), + }, + ); Ok(Self { active: "default".to_string(), + api_key: String::new(), accounts, }) } diff --git a/src/bot.rs b/src/bot.rs index 13ad9da..d75126a 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -11,7 +11,7 @@ use tokio_tungstenite::{MaybeTlsStream, WebSocketStream, connect_async}; use crate::{ account::AccountManager, - executor::ExecutorWrapper, + executor::{ExecutorWrapper, pump_fun::PumpDev}, strategy::{Strategy, veloc::MomentumVelocityStrategy}, tradelog::TradeLog, }; @@ -73,7 +73,7 @@ impl Bot { Ok(Arc::new(Self { ws: Mutex::new(connect_async("wss://pumpdev.io/ws").await?.0), executor: Mutex::new(ExecutorWrapper { - executor: Box::new(account.executor()), + executor: Box::new(PumpDev { account }), positions: HashMap::new(), }), accounts: Mutex::new(accounts), @@ -97,7 +97,7 @@ impl Bot { .context("Failed to get account")? .clone(); - self.executor.lock().await.executor = Box::new(account.executor()); + self.executor.lock().await.executor = Box::new(PumpDev { account }); Ok(()) } diff --git a/src/executor/mod.rs b/src/executor/mod.rs index 851ae1d..1a25ed0 100644 --- a/src/executor/mod.rs +++ b/src/executor/mod.rs @@ -4,8 +4,6 @@ use std::collections::HashMap; use rust_decimal::Decimal; -use crate::account::Account; - pub struct ExecutorWrapper { pub executor: Box, pub positions: HashMap, @@ -45,14 +43,6 @@ pub trait Executor: Send + Sync { } } -impl Account { - pub fn executor(self) -> impl Executor { - match self { - Self::PumpDev(account) => pump_fun::PumpDev::new(account), - } - } -} - impl ExecutorWrapper { pub async fn buy( &mut self, diff --git a/src/executor/pump_fun.rs b/src/executor/pump_fun.rs index 186e0c0..d29c7eb 100644 --- a/src/executor/pump_fun.rs +++ b/src/executor/pump_fun.rs @@ -1,87 +1,9 @@ -use anyhow::{Context, anyhow}; -use reqwest::Client; use rust_decimal::Decimal; -use serde::{Deserialize, Serialize}; -use tokio::sync::Mutex; -use crate::executor::Executor; - -const TRADE_LIGHTNING_URL: &str = "https://pumpdev.io/api/trade-lightning"; - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct PumpDevAccount { - #[serde(rename = "apiKey")] - pub api_key: String, - #[serde(rename = "publicKey")] - pub public_key: String, - #[serde(rename = "privateKey")] - pub private_key: String, -} - -#[derive(Debug, Deserialize)] -struct TradeResponse { - signature: String, -} +use crate::{account::Account, executor::Executor}; pub struct PumpDev { - pub account: Mutex, - pub client: Client, -} - -impl PumpDev { - pub fn new(account: PumpDevAccount) -> Self { - Self { - account: Mutex::new(account), - client: Client::new(), - } - } - - async fn trade( - &self, - action: &str, - mint: &str, - amount: String, - priority: Decimal, - slippage: u16, - denominated_in_sol: bool, - ) -> anyhow::Result<()> { - let account = self.account.lock().await; - - let response = self - .client - .post(format!("{TRADE_LIGHTNING_URL}?api-key={}", account.api_key)) - .json(&serde_json::json!({ - "action": action, - "mint": mint, - "amount": amount, - "denominatedInSol": if denominated_in_sol { "true" } else { "false" }, - "slippage": slippage, - "priorityFee": priority, - })) - .send() - .await - .context("Failed to send trade request")?; - - let status = response.status(); - let body = response.text().await?; - - if !status.is_success() { - let error = serde_json::from_str::(&body) - .ok() - .and_then(|value| value.get("error").cloned()) - .and_then(|value| value.as_str().map(str::to_string)) - .unwrap_or_else(|| body.trim().to_string()); - - return Err(anyhow!("Trade failed ({status}): {error}")); - } - - let data: TradeResponse = - serde_json::from_str(&body).context("Failed to parse trade response")?; - - log::info!("{action} executed: {}", data.signature); - - Ok(()) - } + pub account: Account, } #[async_trait::async_trait] From 675745226475449afdecfe1864152f37230458ac Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 09:03:07 +0200 Subject: [PATCH 03/19] Refactoring to helius --- Cargo.lock | 312 ++------------------------------------- Cargo.toml | 5 +- src/account.rs | 2 + src/bot.rs | 173 +++++++--------------- src/executor/pump_fun.rs | 6 +- 5 files changed, 77 insertions(+), 421 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7fe6ee8..3a836be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -233,7 +233,7 @@ dependencies = [ "rustc-hash", "rustls", "rustls-pki-types", - "rustls-platform-verifier 0.6.2", + "rustls-platform-verifier", "slab", "thiserror 2.0.19", "tinyvec", @@ -353,29 +353,6 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" -[[package]] -name = "aws-lc-rs" -version = "1.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00bdb5da18dac48ca2cc7cd4a98e533e8635a58e2361d13a1a4ee3888e0d72f1" -dependencies = [ - "aws-lc-sys", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43103168cc76fe62678a375e722fc9cb3a0146159ac5828bc4f0dfd755c2224c" -dependencies = [ - "cc", - "cmake", - "dunce", - "fs_extra", - "pkg-config", -] - [[package]] name = "base16ct" version = "0.2.0" @@ -681,15 +658,6 @@ dependencies = [ "inout", ] -[[package]] -name = "cmake" -version = "0.1.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" -dependencies = [ - "cc", -] - [[package]] name = "cmov" version = "0.5.4" @@ -761,28 +729,12 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "const-oid" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" - [[package]] name = "constant_time_eq" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation" version = "0.10.1" @@ -1084,7 +1036,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ - "const-oid 0.9.6", + "const-oid", "zeroize", ] @@ -1121,7 +1073,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", - "const-oid 0.9.6", + "const-oid", "crypto-common 0.1.7", "subtle", ] @@ -1133,7 +1085,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ "block-buffer 0.12.1", - "const-oid 0.10.2", "crypto-common 0.2.2", "ctutils", ] @@ -1172,12 +1123,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - [[package]] name = "ecdsa" version = "0.16.9" @@ -1260,15 +1205,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - [[package]] name = "env_filter" version = "2.0.0" @@ -1453,12 +1389,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - [[package]] name = "funty" version = "2.0.0" @@ -1652,25 +1582,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http 1.5.0", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "halfbrown" version = "0.3.0" @@ -1736,7 +1647,7 @@ dependencies = [ "once_cell", "phf", "rand 0.9.5", - "reqwest 0.12.28", + "reqwest", "semver", "serde", "serde-enum-str", @@ -1755,7 +1666,7 @@ dependencies = [ "thiserror 2.0.19", "tokio", "tokio-stream", - "tokio-tungstenite 0.28.0", + "tokio-tungstenite", "url", ] @@ -1849,7 +1760,6 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2", "http 1.5.0", "http-body", "httparse", @@ -1910,11 +1820,9 @@ dependencies = [ "percent-encoding", "pin-project-lite", "socket2", - "system-configuration", "tokio", "tower-service", "tracing", - "windows-registry", ] [[package]] @@ -2161,36 +2069,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "jni" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" -dependencies = [ - "cfg-if", - "combine 4.6.7", - "jni-macros", - "jni-sys 0.4.1", - "log", - "simd_cesu8", - "thiserror 2.0.19", - "walkdir", - "windows-link", -] - -[[package]] -name = "jni-macros" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "simd_cesu8", - "syn 2.0.119", -] - [[package]] name = "jni-sys" version = "0.3.1" @@ -2356,12 +2234,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2917,7 +2789,6 @@ version = "0.11.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560" dependencies = [ - "aws-lc-rs", "bytes", "getrandom 0.4.3", "lru-slab", @@ -3199,46 +3070,6 @@ dependencies = [ "webpki-roots 1.0.9", ] -[[package]] -name = "reqwest" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" -dependencies = [ - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures-core", - "h2", - "http 1.5.0", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "js-sys", - "log", - "mime", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-pki-types", - "rustls-platform-verifier 0.7.0", - "serde", - "serde_json", - "sync_wrapper", - "tokio", - "tokio-rustls", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "reqwest-middleware" version = "0.4.2" @@ -3248,7 +3079,7 @@ dependencies = [ "anyhow", "async-trait", "http 1.5.0", - "reqwest 0.12.28", + "reqwest", "serde", "thiserror 1.0.69", "tower-service", @@ -3384,7 +3215,6 @@ version = "0.23.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" dependencies = [ - "aws-lc-rs", "once_cell", "ring", "rustls-pki-types", @@ -3421,30 +3251,9 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" dependencies = [ - "core-foundation 0.10.1", + "core-foundation", "core-foundation-sys", - "jni 0.21.1", - "log", - "once_cell", - "rustls", - "rustls-native-certs", - "rustls-platform-verifier-android", - "rustls-webpki", - "security-framework", - "security-framework-sys", - "webpki-root-certs", - "windows-sys 0.61.2", -] - -[[package]] -name = "rustls-platform-verifier" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" -dependencies = [ - "core-foundation 0.10.1", - "core-foundation-sys", - "jni 0.22.4", + "jni", "log", "once_cell", "rustls", @@ -3469,7 +3278,6 @@ version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ - "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -3538,7 +3346,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ "bitflags 2.13.1", - "core-foundation 0.10.1", + "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", @@ -3697,17 +3505,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha1" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "digest 0.11.3", -] - [[package]] name = "sha2" version = "0.10.9" @@ -3793,16 +3590,6 @@ dependencies = [ "value-trait", ] -[[package]] -name = "simd_cesu8" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" -dependencies = [ - "rustc_version", - "simdutf8", -] - [[package]] name = "simdutf8" version = "0.1.5" @@ -3852,15 +3639,12 @@ dependencies = [ "chrono", "csv", "env_logger", - "futures-util", "helius", "log", - "reqwest 0.13.4", "rust_decimal", "serde", "serde_json", "tokio", - "tokio-tungstenite 0.30.0", ] [[package]] @@ -4592,7 +4376,7 @@ dependencies = [ "crossbeam-channel", "gethostname", "log", - "reqwest 0.12.28", + "reqwest", "solana-cluster-type", "solana-sha256-hasher", "solana-time-utils", @@ -4868,8 +4652,8 @@ dependencies = [ "thiserror 2.0.19", "tokio", "tokio-stream", - "tokio-tungstenite 0.28.0", - "tungstenite 0.28.0", + "tokio-tungstenite", + "tungstenite", "url", ] @@ -4958,7 +4742,7 @@ dependencies = [ "futures", "indicatif", "log", - "reqwest 0.12.28", + "reqwest", "reqwest-middleware", "semver", "serde", @@ -4993,7 +4777,7 @@ checksum = "8a81a57ed54176e3aa4bca8e894f9326638a3f6870f79b078d8b3fadda8a4c9b" dependencies = [ "anyhow", "jsonrpc-core", - "reqwest 0.12.28", + "reqwest", "reqwest-middleware", "serde", "serde_json", @@ -6055,27 +5839,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "system-configuration" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" -dependencies = [ - "bitflags 2.13.1", - "core-foundation 0.9.4", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "tap" version = "1.0.1" @@ -6263,24 +6026,10 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls", - "tungstenite 0.28.0", + "tungstenite", "webpki-roots 0.26.11", ] -[[package]] -name = "tokio-tungstenite" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17a073bfed563fa236697a068031408a93cd9522e08abf9933ead3e73411bd71" -dependencies = [ - "futures-util", - "log", - "native-tls", - "tokio", - "tokio-native-tls", - "tungstenite 0.30.0", -] - [[package]] name = "tokio-util" version = "0.7.19" @@ -6291,7 +6040,6 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "libc", "pin-project-lite", "tokio", ] @@ -6417,29 +6165,12 @@ dependencies = [ "rand 0.9.5", "rustls", "rustls-pki-types", - "sha1 0.10.7", + "sha1", "thiserror 2.0.19", "utf-8", "webpki-roots 0.26.11", ] -[[package]] -name = "tungstenite" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48ac77174b19c110a50ab2128b24215ac9cb40e0e12e093fb602d175c569d22" -dependencies = [ - "bytes", - "data-encoding", - "http 1.5.0", - "httparse", - "log", - "native-tls", - "rand 0.10.2", - "sha1 0.11.0", - "thiserror 2.0.19", -] - [[package]] name = "typenum" version = "1.20.1" @@ -6809,17 +6540,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" -dependencies = [ - "windows-link", - "windows-result", - "windows-strings", -] - [[package]] name = "windows-result" version = "0.4.1" diff --git a/Cargo.toml b/Cargo.toml index 246397b..6178806 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,18 +4,15 @@ version = "0.1.0" edition = "2024" [dependencies] +tokio = { version = "1.53.1", features = ["macros", "rt-multi-thread", "sync", "fs", "io-std"] } anyhow = "1.0.104" -futures-util = "0.3.33" serde = { version = "1.0.229", features = ["derive", "serde_derive"] } serde_json = "1.0.151" -tokio = { version = "1.53.1", features = ["macros", "rt-multi-thread", "sync", "fs", "io-std"] } -tokio-tungstenite = { version = "0.30.0", features = ["native-tls"] } log = "0.4.33" env_logger = "0.11.11" rust_decimal = { version = "1.42.1", features = ["macros"] } -reqwest = { version = "0.13.4", features = ["json"] } async-trait = "0.1.91" csv = "1.4.0" chrono = { version = "0.4.45", features = ["serde"] } diff --git a/src/account.rs b/src/account.rs index 6210ecc..8ab401d 100644 --- a/src/account.rs +++ b/src/account.rs @@ -37,6 +37,8 @@ impl AccountManager { tokio::fs::create_dir_all(path.parent().unwrap()).await?; tokio::fs::write(&path, default.to_string()?).await?; + println!("Please open {path:?} and edit the data accordingly"); + return Ok(default); } diff --git a/src/bot.rs b/src/bot.rs index d75126a..676aa2b 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -1,63 +1,27 @@ use std::{collections::HashMap, sync::Arc}; use anyhow::Context; -use futures_util::{SinkExt, StreamExt}; -use serde_json::json; -use tokio::{ - net::TcpStream, - sync::{Mutex, watch}, -}; -use tokio_tungstenite::{MaybeTlsStream, WebSocketStream, connect_async}; +use helius::Helius; + +use tokio::sync::{Mutex, watch}; use crate::{ - account::AccountManager, + account::{Account, AccountManager}, executor::{ExecutorWrapper, pump_fun::PumpDev}, strategy::{Strategy, veloc::MomentumVelocityStrategy}, tradelog::TradeLog, }; pub struct Bot { - pub ws: Mutex>>, - pub accounts: Mutex, - pub executor: Mutex, + pub account_manager: Mutex, + pub current_account: Mutex, + pub strategy: Mutex>, + + pub executor: Mutex, pub trade_log: Mutex>, -} -impl Bot { - pub async fn subscribe(&self, mint: &str) -> anyhow::Result<()> { - self.ws - .lock() - .await - .send(tokio_tungstenite::tungstenite::Message::Text( - json!({ - "method": "subscribeTokenTrade", - "keys": [mint] - }) - .to_string() - .into(), - )) - .await?; - - Ok(()) - } - - pub async fn unsubscribe(&self, mint: &str) -> anyhow::Result<()> { - self.ws - .lock() - .await - .send(tokio_tungstenite::tungstenite::Message::Text( - json!({ - "method": "unsubscribeTokenTrade", - "keys": [mint] - }) - .to_string() - .into(), - )) - .await?; - - Ok(()) - } + pub helius: Helius, } impl Bot { @@ -71,55 +35,24 @@ impl Bot { .clone(); Ok(Arc::new(Self { - ws: Mutex::new(connect_async("wss://pumpdev.io/ws").await?.0), + helius: Helius::new_async(&accounts.api_key, helius::types::Cluster::Devnet).await?, + + account_manager: Mutex::new(accounts), + current_account: Mutex::new(account), + strategy: Mutex::new(Box::new(MomentumVelocityStrategy::new())), + + trade_log: Mutex::new(Vec::new()), executor: Mutex::new(ExecutorWrapper { - executor: Box::new(PumpDev { account }), + executor: Box::new(PumpDev {}), positions: HashMap::new(), }), - accounts: Mutex::new(accounts), - strategy: Mutex::new(Box::new(MomentumVelocityStrategy::new())), - trade_log: Mutex::new(Vec::new()), })) } - pub async fn refresh_account(self: &Arc) -> anyhow::Result<()> { - self.strategy - .lock() - .await - .execute_sell_all(self.clone()) - .await?; - - let accounts = self.accounts.lock().await; - - let account = accounts - .accounts - .get(&accounts.active) - .context("Failed to get account")? - .clone(); - - self.executor.lock().await.executor = Box::new(PumpDev { account }); - - Ok(()) - } - - pub async fn initialize_websocket_subscribe(&self) -> anyhow::Result<()> { - self.ws - .lock() - .await - .send(tokio_tungstenite::tungstenite::Message::Text( - json!({ "method": "subscribeNewToken" }).to_string().into(), - )) - .await?; - - Ok(()) - } - pub async fn start( self: &Arc, mut shutdown: watch::Receiver, ) -> anyhow::Result<()> { - self.initialize_websocket_subscribe().await?; - loop { tokio::select! { _ = shutdown.changed() => { @@ -151,44 +84,50 @@ impl Bot { } pub async fn tick(self: &Arc) -> anyhow::Result { - let mut ws = self.ws.lock().await; + // drop(ws); + // self.strategy + // .lock() + // .await + // .on_new_coin(self.clone(), token) + // .await?; - if let Some(msg) = ws.next().await.transpose()? { - if let tokio_tungstenite::tungstenite::Message::Text(text) = msg { - match serde_json::from_str::(&text) { - Ok(crate::types::PumpDevEvent::Create(token)) => { - drop(ws); + // drop(ws); + // self.strategy + // .lock() + // .await + // .on_trade(self.clone(), trade) + // .await?; - self.strategy - .lock() - .await - .on_new_coin(self.clone(), token) - .await?; - } + Ok(false) + } +} - Ok(crate::types::PumpDevEvent::Trade(trade)) => { - drop(ws); +impl Bot { + pub async fn subscribe(&self, mint: &str) -> anyhow::Result<()> { + Ok(()) + } - self.strategy - .lock() - .await - .on_trade(self.clone(), trade) - .await?; - } + pub async fn unsubscribe(&self, mint: &str) -> anyhow::Result<()> { + Ok(()) + } - Ok(_event) => { - // println!("{:?}", event); - } + pub async fn refresh_account(self: &Arc) -> anyhow::Result<()> { + self.strategy + .lock() + .await + .execute_sell_all(self.clone()) + .await?; - Err(err) => { - log::error!("{err}, MSG -> {text}"); - } - } - } + let accounts = self.account_manager.lock().await; - Ok(false) - } else { - Ok(true) - } + let account = accounts + .accounts + .get(&accounts.active) + .context("Failed to get account")? + .clone(); + + *self.current_account.lock().await = account; + + Ok(()) } } diff --git a/src/executor/pump_fun.rs b/src/executor/pump_fun.rs index d29c7eb..d6c091b 100644 --- a/src/executor/pump_fun.rs +++ b/src/executor/pump_fun.rs @@ -1,10 +1,8 @@ use rust_decimal::Decimal; -use crate::{account::Account, executor::Executor}; +use crate::executor::Executor; -pub struct PumpDev { - pub account: Account, -} +pub struct PumpDev {} #[async_trait::async_trait] impl Executor for PumpDev { From c1f591b94071e066a4dd880892fa3fe23b9f2d0f Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 09:25:51 +0200 Subject: [PATCH 04/19] Refactor --- src/bot.rs | 21 ++++--- src/{ => data}/account.rs | 0 src/data/mod.rs | 2 + src/{ => data}/tradelog.rs | 0 src/executor/mod.rs | 122 ------------------------------------- src/executor/pump_fun.rs | 68 --------------------- src/main.rs | 4 +- src/strategy/veloc.rs | 2 +- 8 files changed, 15 insertions(+), 204 deletions(-) rename src/{ => data}/account.rs (100%) create mode 100644 src/data/mod.rs rename src/{ => data}/tradelog.rs (100%) delete mode 100644 src/executor/mod.rs delete mode 100644 src/executor/pump_fun.rs diff --git a/src/bot.rs b/src/bot.rs index 676aa2b..171317a 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -1,15 +1,14 @@ -use std::{collections::HashMap, sync::Arc}; +use std::sync::Arc; -use anyhow::Context; +use anyhow::{Context, anyhow}; use helius::Helius; use tokio::sync::{Mutex, watch}; use crate::{ - account::{Account, AccountManager}, - executor::{ExecutorWrapper, pump_fun::PumpDev}, + data::account::{Account, AccountManager}, + data::tradelog::TradeLog, strategy::{Strategy, veloc::MomentumVelocityStrategy}, - tradelog::TradeLog, }; pub struct Bot { @@ -18,7 +17,7 @@ pub struct Bot { pub strategy: Mutex>, - pub executor: Mutex, + pub executor: Mutex<()>, pub trade_log: Mutex>, pub helius: Helius, @@ -42,10 +41,7 @@ impl Bot { strategy: Mutex::new(Box::new(MomentumVelocityStrategy::new())), trade_log: Mutex::new(Vec::new()), - executor: Mutex::new(ExecutorWrapper { - executor: Box::new(PumpDev {}), - positions: HashMap::new(), - }), + executor: Mutex::new(()), })) } @@ -84,6 +80,11 @@ impl Bot { } pub async fn tick(self: &Arc) -> anyhow::Result { + let ws = self + .helius + .ws() + .ok_or_else(|| anyhow!("Unable to obtain ws"))?; + // drop(ws); // self.strategy // .lock() diff --git a/src/account.rs b/src/data/account.rs similarity index 100% rename from src/account.rs rename to src/data/account.rs diff --git a/src/data/mod.rs b/src/data/mod.rs new file mode 100644 index 0000000..6e2986e --- /dev/null +++ b/src/data/mod.rs @@ -0,0 +1,2 @@ +pub mod account; +pub mod tradelog; diff --git a/src/tradelog.rs b/src/data/tradelog.rs similarity index 100% rename from src/tradelog.rs rename to src/data/tradelog.rs diff --git a/src/executor/mod.rs b/src/executor/mod.rs deleted file mode 100644 index 1a25ed0..0000000 --- a/src/executor/mod.rs +++ /dev/null @@ -1,122 +0,0 @@ -pub mod pump_fun; - -use std::collections::HashMap; - -use rust_decimal::Decimal; - -pub struct ExecutorWrapper { - pub executor: Box, - pub positions: HashMap, -} - -#[allow(unused_variables)] -#[async_trait::async_trait] -pub trait Executor: Send + Sync { - async fn buy( - &self, - mint: &str, - amount: Decimal, - priority: Decimal, - slippage: u16, - ) -> anyhow::Result<()> { - Ok(()) - } - - async fn sell( - &self, - mint: &str, - amount: Decimal, - priority: Decimal, - slippage: u16, - ) -> anyhow::Result<()> { - Ok(()) - } - - async fn sell_percent( - &self, - mint: &str, - amount: u8, - priority: Decimal, - slippage: u16, - ) -> anyhow::Result<()> { - Ok(()) - } -} - -impl ExecutorWrapper { - pub async fn buy( - &mut self, - mint: &str, - amount: Decimal, - priority: Decimal, - slippage: u16, - ) -> anyhow::Result<()> { - self.executor.buy(mint, amount, priority, slippage).await?; - - let position = self - .positions - .entry(mint.to_string()) - .or_insert(Decimal::ZERO); - - *position += amount; - - Ok(()) - } - - pub async fn sell( - &mut self, - mint: &str, - amount: Decimal, - priority: Decimal, - slippage: u16, - ) -> anyhow::Result<()> { - self.executor.sell(mint, amount, priority, slippage).await?; - - if let Some(position) = self.positions.get_mut(mint) { - *position -= amount; - - if *position <= Decimal::ZERO { - self.positions.remove(mint); - } - } - - Ok(()) - } - - pub async fn sell_percent( - &mut self, - mint: &str, - amount: u8, - priority: Decimal, - slippage: u16, - ) -> anyhow::Result<()> { - let sell_amount = match self.positions.get(mint) { - Some(position) => *position * Decimal::from(amount) / Decimal::from(100), - None => return Ok(()), - }; - - self.executor - .sell_percent(mint, amount, priority, slippage) - .await?; - - if let Some(position) = self.positions.get_mut(mint) { - *position -= sell_amount; - - if *position <= Decimal::ZERO { - self.positions.remove(mint); - } - } - - Ok(()) - } - - pub async fn sell_all(&mut self, priority: Decimal, slippage: u16) -> anyhow::Result<()> { - for (mint, _) in self.positions.drain() { - self.executor - .sell_percent(&mint, 100, priority, slippage) - .await?; - } - - Ok(()) - } -} diff --git a/src/executor/pump_fun.rs b/src/executor/pump_fun.rs deleted file mode 100644 index d6c091b..0000000 --- a/src/executor/pump_fun.rs +++ /dev/null @@ -1,68 +0,0 @@ -use rust_decimal::Decimal; - -use crate::executor::Executor; - -pub struct PumpDev {} - -#[async_trait::async_trait] -impl Executor for PumpDev { - async fn buy( - &self, - mint: &str, - amount: Decimal, - priority: Decimal, - slippage: u16, - ) -> anyhow::Result<()> { - log::info!("BUY {mint} {amount} SOL"); - Ok(()) - // self.trade( - // "buy", - // mint, - // amount.round_dp(3).to_string(), - // priority, - // slippage, - // true, - // ) - // .await - } - - async fn sell( - &self, - mint: &str, - amount: Decimal, - priority: Decimal, - slippage: u16, - ) -> anyhow::Result<()> { - log::info!("SELL {mint} {amount} SOL"); - Ok(()) - // self.trade( - // "sell", - // mint, - // amount.round_dp(3).to_string(), - // priority, - // slippage, - // false, - // ) - // .await - } - - async fn sell_percent( - &self, - mint: &str, - amount: u8, - priority: Decimal, - slippage: u16, - ) -> anyhow::Result<()> { - log::info!("SELL {mint} {amount}%"); - Ok(()) - // self.trade( - // "sell", - // mint, - // format!("{amount}%"), - // priority, - // slippage, - // false, - // ) - // .await - } -} diff --git a/src/main.rs b/src/main.rs index 40a4cba..4db2e5c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,6 @@ -pub mod account; pub mod bot; -pub mod executor; +pub mod data; pub mod strategy; -pub mod tradelog; pub mod types; use std::sync::Arc; diff --git a/src/strategy/veloc.rs b/src/strategy/veloc.rs index 0a061f3..9e29469 100644 --- a/src/strategy/veloc.rs +++ b/src/strategy/veloc.rs @@ -6,8 +6,8 @@ use log::{debug, info, trace, warn}; use rust_decimal::{Decimal, dec}; use crate::bot::Bot; +use crate::data::tradelog::{ExitReason, TradeLog}; use crate::strategy::Strategy; -use crate::tradelog::{ExitReason, TradeLog}; use crate::types::{NewToken, Trade, TradeType}; const BUY_AMOUNT_SOL: Decimal = dec!(0.2); From 2f084bab24baf092cf631dd6ac94ce5f8fc833c2 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 09:30:43 +0200 Subject: [PATCH 05/19] Refactor --- src/main.rs | 2 +- src/strategy/mod.rs | 57 +++++++++++++++++++-- src/strategy/veloc.rs | 4 +- src/types.rs | 115 ------------------------------------------ 4 files changed, 56 insertions(+), 122 deletions(-) delete mode 100644 src/types.rs diff --git a/src/main.rs b/src/main.rs index 4db2e5c..a2acef3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ pub mod bot; pub mod data; pub mod strategy; -pub mod types; +// pub mod types; use std::sync::Arc; diff --git a/src/strategy/mod.rs b/src/strategy/mod.rs index d358b70..77ad8ef 100644 --- a/src/strategy/mod.rs +++ b/src/strategy/mod.rs @@ -2,10 +2,59 @@ pub mod veloc; use std::sync::Arc; -use crate::{ - bot::Bot, - types::{NewToken, Trade}, -}; +use crate::bot::Bot; + +use serde::Deserialize; + +#[derive(Debug, Clone, Deserialize)] +pub struct NewToken { + pub mint: String, + #[serde(rename = "traderPublicKey")] + pub trader_public_key: String, + + pub name: String, + pub symbol: String, + pub uri: String, + #[serde(rename = "marketCapSol")] + pub market_cap_sol: f64, + #[serde(rename = "solAmount")] + pub sol_amount: f64, +} + +#[derive(Debug, Clone, Deserialize)] +pub enum TradeType { + #[serde(rename = "buy")] + Buy, + #[serde(rename = "sell")] + Sell, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct Trade { + pub signature: String, + pub mint: String, + + #[serde(rename = "traderPublicKey")] + pub trader: String, + + #[serde(rename = "txType")] + pub tx_type: TradeType, + + #[serde(rename = "solAmount")] + pub sol_amount: f64, + + #[serde(rename = "tokenAmount")] + pub token_amount: f64, + + #[serde(rename = "marketCapSol")] + pub market_cap_sol: f64, + + #[serde(rename = "vTokensInBondingCurve")] + pub v_tokens_in_bonding_curve: f64, + + #[serde(rename = "vSolInBondingCurve")] + pub v_sol_in_bonding_curve: f64, +} #[async_trait::async_trait] pub trait Strategy: Send + Sync { diff --git a/src/strategy/veloc.rs b/src/strategy/veloc.rs index 9e29469..fe7f09f 100644 --- a/src/strategy/veloc.rs +++ b/src/strategy/veloc.rs @@ -5,10 +5,10 @@ use std::time::{Duration, Instant}; use log::{debug, info, trace, warn}; use rust_decimal::{Decimal, dec}; +use super::{NewToken, Trade}; use crate::bot::Bot; use crate::data::tradelog::{ExitReason, TradeLog}; -use crate::strategy::Strategy; -use crate::types::{NewToken, Trade, TradeType}; +use crate::strategy::{Strategy, TradeType}; const BUY_AMOUNT_SOL: Decimal = dec!(0.2); const PRIORITY: Decimal = dec!(0.0002); diff --git a/src/types.rs b/src/types.rs deleted file mode 100644 index fc2a030..0000000 --- a/src/types.rs +++ /dev/null @@ -1,115 +0,0 @@ -use serde::{Deserialize, Deserializer}; -use serde_json::Value; - -#[derive(Debug)] -pub enum PumpDevEvent { - Connected { client_id: u64, message: String }, - ConnectionStatus { connected: bool, timestamp: u64 }, - Subscribed { method: String }, - Unsubscribed { method: String, keys: Vec }, - Create(NewToken), - Trade(Trade), -} - -impl<'de> Deserialize<'de> for PumpDevEvent { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let value = Value::deserialize(deserializer)?; - if value.get("txType").is_some() && value.get("name").is_none() { - let trade: Trade = serde_json::from_value(value).map_err(serde::de::Error::custom)?; - return Ok(PumpDevEvent::Trade(trade)); - } - - if value.get("name").is_some() { - let token: NewToken = - serde_json::from_value(value).map_err(serde::de::Error::custom)?; - return Ok(PumpDevEvent::Create(token)); - } - - #[derive(Deserialize)] - #[serde(tag = "type")] - enum Tagged { - #[serde(rename = "connected")] - Connected { - #[serde(rename = "clientId")] - client_id: u64, - message: String, - }, - #[serde(rename = "connectionStatus")] - ConnectionStatus { connected: bool, timestamp: u64 }, - #[serde(rename = "subscribed")] - Subscribed { method: String }, - #[serde(rename = "unsubscribed")] - Unsubscribed { method: String, keys: Vec }, - } - - match serde_json::from_value(value).map_err(serde::de::Error::custom)? { - Tagged::Connected { client_id, message } => { - Ok(PumpDevEvent::Connected { client_id, message }) - } - Tagged::ConnectionStatus { - connected, - timestamp, - } => Ok(PumpDevEvent::ConnectionStatus { - connected, - timestamp, - }), - Tagged::Subscribed { method } => Ok(PumpDevEvent::Subscribed { method }), - Tagged::Unsubscribed { method, keys } => { - Ok(PumpDevEvent::Unsubscribed { method, keys }) - } - } - } -} - -#[derive(Debug, Clone, Deserialize)] -pub struct NewToken { - pub mint: String, - #[serde(rename = "traderPublicKey")] - pub trader_public_key: String, - - pub name: String, - pub symbol: String, - pub uri: String, - #[serde(rename = "marketCapSol")] - pub market_cap_sol: f64, - #[serde(rename = "solAmount")] - pub sol_amount: f64, -} - -#[derive(Debug, Clone, Deserialize)] -pub enum TradeType { - #[serde(rename = "buy")] - Buy, - #[serde(rename = "sell")] - Sell, -} - -#[derive(Debug, Clone, Deserialize)] -pub struct Trade { - pub signature: String, - pub mint: String, - - #[serde(rename = "traderPublicKey")] - pub trader: String, - - #[serde(rename = "txType")] - pub tx_type: TradeType, - - #[serde(rename = "solAmount")] - pub sol_amount: f64, - - #[serde(rename = "tokenAmount")] - pub token_amount: f64, - - #[serde(rename = "marketCapSol")] - pub market_cap_sol: f64, - - #[serde(rename = "vTokensInBondingCurve")] - pub v_tokens_in_bonding_curve: f64, - - #[serde(rename = "vSolInBondingCurve")] - pub v_sol_in_bonding_curve: f64, -} From d5c446b77904c07bc833b4bf123b3f128c8e03de Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 15:41:56 +0200 Subject: [PATCH 06/19] Launchpad --- src/bot.rs | 11 ++++--- src/launchpad/mod.rs | 67 +++++++++++++++++++++++++++++++++++++++ src/launchpad/pump_fun.rs | 45 ++++++++++++++++++++++++++ src/main.rs | 2 +- src/strategy/veloc.rs | 2 +- 5 files changed, 121 insertions(+), 6 deletions(-) create mode 100644 src/launchpad/mod.rs create mode 100644 src/launchpad/pump_fun.rs diff --git a/src/bot.rs b/src/bot.rs index 171317a..d5c12ac 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -6,8 +6,11 @@ use helius::Helius; use tokio::sync::{Mutex, watch}; use crate::{ - data::account::{Account, AccountManager}, - data::tradelog::TradeLog, + data::{ + account::{Account, AccountManager}, + tradelog::TradeLog, + }, + launchpad::Executor, strategy::{Strategy, veloc::MomentumVelocityStrategy}, }; @@ -17,7 +20,7 @@ pub struct Bot { pub strategy: Mutex>, - pub executor: Mutex<()>, + pub executor: Mutex, pub trade_log: Mutex>, pub helius: Helius, @@ -41,7 +44,7 @@ impl Bot { strategy: Mutex::new(Box::new(MomentumVelocityStrategy::new())), trade_log: Mutex::new(Vec::new()), - executor: Mutex::new(()), + executor: Mutex::new(Executor::new()), })) } diff --git a/src/launchpad/mod.rs b/src/launchpad/mod.rs new file mode 100644 index 0000000..58faf35 --- /dev/null +++ b/src/launchpad/mod.rs @@ -0,0 +1,67 @@ +mod pump_fun; + +use crate::launchpad::pump_fun::PumpFun; +use rust_decimal::Decimal; +use std::collections::HashMap; + +pub struct Executor { + pub pump_fun: PumpFun, +} + +#[allow(unused_variables)] +#[async_trait::async_trait] +pub trait Launchpad: Send + Sync { + async fn buy( + &mut self, + mint: &str, + amount: Decimal, + priority: Decimal, + slippage: u16, + ) -> anyhow::Result<()>; + + async fn sell( + &mut self, + mint: &str, + amount: u8, + priority: Decimal, + slippage: u16, + ) -> anyhow::Result<()>; + + fn get_positions(&self) -> HashMap; +} + +impl Executor { + pub fn new() -> Self { + Self { + pump_fun: PumpFun::new(), + } + } + + pub async fn buy( + &mut self, + mint: &str, + amount: Decimal, + priority: Decimal, + slippage: u16, + ) -> anyhow::Result<()> { + self.pump_fun.buy(mint, amount, priority, slippage).await + } + + pub async fn sell( + &mut self, + mint: &str, + amount: u8, + priority: Decimal, + slippage: u16, + ) -> anyhow::Result<()> { + self.pump_fun.sell(mint, amount, priority, slippage).await + } + + pub async fn sell_all(&mut self, priority: Decimal, slippage: u16) -> anyhow::Result<()> { + for (mint, _) in self.pump_fun.get_positions() { + self.pump_fun.sell(&mint, 100, priority, slippage).await?; + } + + Ok(()) + } +} diff --git a/src/launchpad/pump_fun.rs b/src/launchpad/pump_fun.rs new file mode 100644 index 0000000..6e19d27 --- /dev/null +++ b/src/launchpad/pump_fun.rs @@ -0,0 +1,45 @@ +use std::collections::HashMap; + +use rust_decimal::Decimal; + +use crate::launchpad::Launchpad; + +pub struct PumpFun { + pub positions: HashMap, +} + +impl PumpFun { + pub fn new() -> Self { + Self { + positions: HashMap::new(), + } + } +} + +#[allow(unused_variables)] +#[async_trait::async_trait] +impl Launchpad for PumpFun { + async fn buy( + &mut self, + mint: &str, + amount: Decimal, + priority: Decimal, + slippage: u16, + ) -> anyhow::Result<()> { + Ok(()) + } + + async fn sell( + &mut self, + mint: &str, + amount: u8, + priority: Decimal, + slippage: u16, + ) -> anyhow::Result<()> { + Ok(()) + } + + fn get_positions<'a>(&'a self) -> HashMap { + self.positions.clone() + } +} diff --git a/src/main.rs b/src/main.rs index a2acef3..f42f639 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ pub mod bot; pub mod data; pub mod strategy; -// pub mod types; +pub mod launchpad; use std::sync::Arc; diff --git a/src/strategy/veloc.rs b/src/strategy/veloc.rs index fe7f09f..905ddaf 100644 --- a/src/strategy/veloc.rs +++ b/src/strategy/veloc.rs @@ -173,7 +173,7 @@ impl Strategy for MomentumVelocityStrategy { bot.executor .lock() .await - .sell_percent(mint, 100, PRIORITY, SLIPPAGE) + .sell(mint, 100, PRIORITY, SLIPPAGE) .await?; if let Some(mut pos) = self.positions.remove(mint) { From bd9f883a949f0649386bc0bf46968dd9045adf4c Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 15:57:27 +0200 Subject: [PATCH 07/19] Helius on executor --- src/bot.rs | 23 ++++-------------- src/launchpad/mod.rs | 51 +++++++++++++++++++++++++++++---------- src/launchpad/pump_fun.rs | 5 ++++ src/strategy/veloc.rs | 10 ++------ 4 files changed, 50 insertions(+), 39 deletions(-) diff --git a/src/bot.rs b/src/bot.rs index d5c12ac..b67e1ec 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -1,7 +1,6 @@ use std::sync::Arc; -use anyhow::{Context, anyhow}; -use helius::Helius; +use anyhow::Context; use tokio::sync::{Mutex, watch}; @@ -15,15 +14,11 @@ use crate::{ }; pub struct Bot { + pub executor: Arc, + pub strategy: Mutex>, pub account_manager: Mutex, pub current_account: Mutex, - - pub strategy: Mutex>, - - pub executor: Mutex, pub trade_log: Mutex>, - - pub helius: Helius, } impl Bot { @@ -37,14 +32,11 @@ impl Bot { .clone(); Ok(Arc::new(Self { - helius: Helius::new_async(&accounts.api_key, helius::types::Cluster::Devnet).await?, - + executor: Executor::new(&accounts.api_key).await?, + strategy: Mutex::new(Box::new(MomentumVelocityStrategy::new())), account_manager: Mutex::new(accounts), current_account: Mutex::new(account), - strategy: Mutex::new(Box::new(MomentumVelocityStrategy::new())), - trade_log: Mutex::new(Vec::new()), - executor: Mutex::new(Executor::new()), })) } @@ -83,11 +75,6 @@ impl Bot { } pub async fn tick(self: &Arc) -> anyhow::Result { - let ws = self - .helius - .ws() - .ok_or_else(|| anyhow!("Unable to obtain ws"))?; - // drop(ws); // self.strategy // .lock() diff --git a/src/launchpad/mod.rs b/src/launchpad/mod.rs index 58faf35..dc98385 100644 --- a/src/launchpad/mod.rs +++ b/src/launchpad/mod.rs @@ -1,11 +1,15 @@ mod pump_fun; use crate::launchpad::pump_fun::PumpFun; +use helius::Helius; use rust_decimal::Decimal; -use std::collections::HashMap; +use std::{collections::HashMap, sync::Arc}; +use tokio::sync::Mutex; pub struct Executor { - pub pump_fun: PumpFun, + pub client: Helius, + + pub pump_fun: Mutex, } #[allow(unused_variables)] @@ -13,6 +17,8 @@ pub struct Executor { pub trait Launchpad: Send + Sync { async fn buy( &mut self, + client: &Helius, + mint: &str, amount: Decimal, priority: Decimal, @@ -21,6 +27,8 @@ pub trait Launchpad: Send + Sync { async fn sell( &mut self, + client: &Helius, + mint: &str, amount: u8, priority: Decimal, @@ -31,35 +39,52 @@ pub trait Launchpad: Send + Sync { } impl Executor { - pub fn new() -> Self { - Self { - pump_fun: PumpFun::new(), - } + pub async fn new(api_key: &str) -> anyhow::Result> { + Ok(Arc::new(Self { + client: Helius::new_async(api_key, helius::types::Cluster::Devnet).await?, + + pump_fun: Mutex::new(PumpFun::new()), + })) } pub async fn buy( - &mut self, + self: &Arc, mint: &str, amount: Decimal, priority: Decimal, slippage: u16, ) -> anyhow::Result<()> { - self.pump_fun.buy(mint, amount, priority, slippage).await + self.pump_fun + .lock() + .await + .buy(&self.client, mint, amount, priority, slippage) + .await } pub async fn sell( - &mut self, + self: &Arc, mint: &str, amount: u8, priority: Decimal, slippage: u16, ) -> anyhow::Result<()> { - self.pump_fun.sell(mint, amount, priority, slippage).await + self.pump_fun + .lock() + .await + .sell(&self.client, mint, amount, priority, slippage) + .await } - pub async fn sell_all(&mut self, priority: Decimal, slippage: u16) -> anyhow::Result<()> { - for (mint, _) in self.pump_fun.get_positions() { - self.pump_fun.sell(&mint, 100, priority, slippage).await?; + pub async fn sell_all( + self: &Arc, + priority: Decimal, + slippage: u16, + ) -> anyhow::Result<()> { + let mut pump = self.pump_fun.lock().await; + + for (mint, _) in pump.get_positions() { + pump.sell(&self.client, &mint, 100, priority, slippage) + .await?; } Ok(()) diff --git a/src/launchpad/pump_fun.rs b/src/launchpad/pump_fun.rs index 6e19d27..7e1bfff 100644 --- a/src/launchpad/pump_fun.rs +++ b/src/launchpad/pump_fun.rs @@ -1,5 +1,6 @@ use std::collections::HashMap; +use helius::Helius; use rust_decimal::Decimal; use crate::launchpad::Launchpad; @@ -21,6 +22,8 @@ impl PumpFun { impl Launchpad for PumpFun { async fn buy( &mut self, + client: &Helius, + mint: &str, amount: Decimal, priority: Decimal, @@ -31,6 +34,8 @@ impl Launchpad for PumpFun { async fn sell( &mut self, + client: &Helius, + mint: &str, amount: u8, priority: Decimal, diff --git a/src/strategy/veloc.rs b/src/strategy/veloc.rs index 905ddaf..ef55206 100644 --- a/src/strategy/veloc.rs +++ b/src/strategy/veloc.rs @@ -75,7 +75,7 @@ impl MomentumVelocityStrategy { #[async_trait::async_trait] impl Strategy for MomentumVelocityStrategy { async fn execute_sell_all(&mut self, bot: Arc) -> anyhow::Result<()> { - bot.executor.lock().await.sell_all(PRIORITY, SLIPPAGE).await + bot.executor.sell_all(PRIORITY, SLIPPAGE).await } async fn on_new_coin(&mut self, bot: Arc, token: NewToken) -> anyhow::Result<()> { @@ -170,11 +170,7 @@ impl Strategy for MomentumVelocityStrategy { price_change_pct * 100.0 ); - bot.executor - .lock() - .await - .sell(mint, 100, PRIORITY, SLIPPAGE) - .await?; + bot.executor.sell(mint, 100, PRIORITY, SLIPPAGE).await?; if let Some(mut pos) = self.positions.remove(mint) { pos.trade.close(current_price, reason); @@ -244,8 +240,6 @@ impl Strategy for MomentumVelocityStrategy { ); bot.executor - .lock() - .await .buy(mint, BUY_AMOUNT_SOL, PRIORITY, SLIPPAGE) .await?; From e7ec2dece9218d2d240a746b11daf9787fbeafaf Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 16:13:50 +0200 Subject: [PATCH 08/19] Event listener --- src/bot.rs | 38 ++++++++++++++++++++++---------------- src/launchpad/mod.rs | 13 ++++++++++++- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/bot.rs b/src/bot.rs index b67e1ec..3486ff6 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use anyhow::Context; -use tokio::sync::{Mutex, watch}; +use tokio::sync::{Mutex, mpsc, watch}; use crate::{ data::{ @@ -44,6 +44,8 @@ impl Bot { self: &Arc, mut shutdown: watch::Receiver, ) -> anyhow::Result<()> { + let mut rx = self.executor.listen().await?; + loop { tokio::select! { _ = shutdown.changed() => { @@ -62,7 +64,7 @@ impl Bot { } } - result = self.tick() => { + result = self.tick(&mut rx) => { if result? { log::warn!("Websocket closed."); break; @@ -74,22 +76,26 @@ impl Bot { Ok(()) } - pub async fn tick(self: &Arc) -> anyhow::Result { - // drop(ws); - // self.strategy - // .lock() - // .await - // .on_new_coin(self.clone(), token) - // .await?; + pub async fn tick(self: &Arc, rx: &mut mpsc::Receiver) -> anyhow::Result { + if let Some(data) = rx.recv().await { + // drop(ws); + // self.strategy + // .lock() + // .await + // .on_new_coin(self.clone(), token) + // .await?; - // drop(ws); - // self.strategy - // .lock() - // .await - // .on_trade(self.clone(), trade) - // .await?; + // drop(ws); + // self.strategy + // .lock() + // .await + // .on_trade(self.clone(), trade) + // .await?; - Ok(false) + Ok(false) + } else { + Ok(true) + } } } diff --git a/src/launchpad/mod.rs b/src/launchpad/mod.rs index dc98385..2735ee8 100644 --- a/src/launchpad/mod.rs +++ b/src/launchpad/mod.rs @@ -1,10 +1,11 @@ mod pump_fun; use crate::launchpad::pump_fun::PumpFun; +use anyhow::Context; use helius::Helius; use rust_decimal::Decimal; use std::{collections::HashMap, sync::Arc}; -use tokio::sync::Mutex; +use tokio::sync::{Mutex, mpsc}; pub struct Executor { pub client: Helius, @@ -89,4 +90,14 @@ impl Executor { Ok(()) } + + pub async fn listen(self: &Arc) -> anyhow::Result> { + let (tx, rx) = mpsc::channel(10); + + let ws = self.client.ws().context("Failed to get WebSocket")?; + + tokio::spawn(async move {}); + + Ok(rx) + } } From c7d28d6cc761cc93d8f25f7b40d699e1f689ff56 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 16:59:16 +0200 Subject: [PATCH 09/19] Testing websocket --- Cargo.lock | 65 ++++++++++++++++++++++++++++++++++----- Cargo.toml | 7 +++-- src/data/mod.rs | 52 +++++++++++++++++++++++++++++++ src/launchpad/mod.rs | 37 +++++++++++++++++----- src/launchpad/pump_fun.rs | 6 ++-- src/strategy/mod.rs | 57 +++------------------------------- src/strategy/veloc.rs | 3 +- 7 files changed, 153 insertions(+), 74 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3a836be..2c954a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -729,6 +729,12 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + [[package]] name = "constant_time_eq" version = "0.4.2" @@ -1036,7 +1042,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ - "const-oid", + "const-oid 0.9.6", "zeroize", ] @@ -1073,7 +1079,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", - "const-oid", + "const-oid 0.9.6", "crypto-common 0.1.7", "subtle", ] @@ -1085,6 +1091,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ "block-buffer 0.12.1", + "const-oid 0.10.2", "crypto-common 0.2.2", "ctutils", ] @@ -1666,7 +1673,7 @@ dependencies = [ "thiserror 2.0.19", "tokio", "tokio-stream", - "tokio-tungstenite", + "tokio-tungstenite 0.28.0", "url", ] @@ -3505,6 +3512,17 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha1" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + [[package]] name = "sha2" version = "0.10.9" @@ -3639,12 +3657,14 @@ dependencies = [ "chrono", "csv", "env_logger", + "futures-util", "helius", "log", "rust_decimal", "serde", "serde_json", "tokio", + "tokio-tungstenite 0.30.0", ] [[package]] @@ -4652,8 +4672,8 @@ dependencies = [ "thiserror 2.0.19", "tokio", "tokio-stream", - "tokio-tungstenite", - "tungstenite", + "tokio-tungstenite 0.28.0", + "tungstenite 0.28.0", "url", ] @@ -6026,10 +6046,24 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls", - "tungstenite", + "tungstenite 0.28.0", "webpki-roots 0.26.11", ] +[[package]] +name = "tokio-tungstenite" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17a073bfed563fa236697a068031408a93cd9522e08abf9933ead3e73411bd71" +dependencies = [ + "futures-util", + "log", + "native-tls", + "tokio", + "tokio-native-tls", + "tungstenite 0.30.0", +] + [[package]] name = "tokio-util" version = "0.7.19" @@ -6165,12 +6199,29 @@ dependencies = [ "rand 0.9.5", "rustls", "rustls-pki-types", - "sha1", + "sha1 0.10.7", "thiserror 2.0.19", "utf-8", "webpki-roots 0.26.11", ] +[[package]] +name = "tungstenite" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48ac77174b19c110a50ab2128b24215ac9cb40e0e12e093fb602d175c569d22" +dependencies = [ + "bytes", + "data-encoding", + "http 1.5.0", + "httparse", + "log", + "native-tls", + "rand 0.10.2", + "sha1 0.11.0", + "thiserror 2.0.19", +] + [[package]] name = "typenum" version = "1.20.1" diff --git a/Cargo.toml b/Cargo.toml index 6178806..2e5632d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,15 +5,18 @@ edition = "2024" [dependencies] tokio = { version = "1.53.1", features = ["macros", "rt-multi-thread", "sync", "fs", "io-std"] } +tokio-tungstenite = { version = "0.30.0", features = ["native-tls"] } +futures-util = "0.3.33" anyhow = "1.0.104" serde = { version = "1.0.229", features = ["derive", "serde_derive"] } serde_json = "1.0.151" +csv = "1.4.0" log = "0.4.33" env_logger = "0.11.11" -rust_decimal = { version = "1.42.1", features = ["macros"] } async-trait = "0.1.91" -csv = "1.4.0" + +rust_decimal = { version = "1.42.1", features = ["macros"] } chrono = { version = "0.4.45", features = ["serde"] } helius = "1.1.0" diff --git a/src/data/mod.rs b/src/data/mod.rs index 6e2986e..94beafb 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -1,2 +1,54 @@ pub mod account; pub mod tradelog; + +use serde::Deserialize; + +#[derive(Debug, Clone, Deserialize)] +pub struct NewToken { + pub mint: String, + #[serde(rename = "traderPublicKey")] + pub trader_public_key: String, + + pub name: String, + pub symbol: String, + pub uri: String, + #[serde(rename = "marketCapSol")] + pub market_cap_sol: f64, + #[serde(rename = "solAmount")] + pub sol_amount: f64, +} + +#[derive(Debug, Clone, Deserialize)] +pub enum TradeType { + #[serde(rename = "buy")] + Buy, + #[serde(rename = "sell")] + Sell, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct Trade { + pub signature: String, + pub mint: String, + + #[serde(rename = "traderPublicKey")] + pub trader: String, + + #[serde(rename = "txType")] + pub tx_type: TradeType, + + #[serde(rename = "solAmount")] + pub sol_amount: f64, + + #[serde(rename = "tokenAmount")] + pub token_amount: f64, + + #[serde(rename = "marketCapSol")] + pub market_cap_sol: f64, + + #[serde(rename = "vTokensInBondingCurve")] + pub v_tokens_in_bonding_curve: f64, + + #[serde(rename = "vSolInBondingCurve")] + pub v_sol_in_bonding_curve: f64, +} diff --git a/src/launchpad/mod.rs b/src/launchpad/mod.rs index 2735ee8..5b68390 100644 --- a/src/launchpad/mod.rs +++ b/src/launchpad/mod.rs @@ -1,14 +1,22 @@ mod pump_fun; use crate::launchpad::pump_fun::PumpFun; -use anyhow::Context; -use helius::Helius; +use futures_util::StreamExt; use rust_decimal::Decimal; use std::{collections::HashMap, sync::Arc}; use tokio::sync::{Mutex, mpsc}; +use tokio_tungstenite::tungstenite::Message; + +pub struct Client( + pub Mutex< + tokio_tungstenite::WebSocketStream< + tokio_tungstenite::MaybeTlsStream, + >, + >, +); pub struct Executor { - pub client: Helius, + pub client: Arc, pub pump_fun: Mutex, } @@ -18,7 +26,7 @@ pub struct Executor { pub trait Launchpad: Send + Sync { async fn buy( &mut self, - client: &Helius, + client: &Client, mint: &str, amount: Decimal, @@ -28,7 +36,7 @@ pub trait Launchpad: Send + Sync { async fn sell( &mut self, - client: &Helius, + client: &Client, mint: &str, amount: u8, @@ -42,7 +50,13 @@ pub trait Launchpad: Send + Sync { impl Executor { pub async fn new(api_key: &str) -> anyhow::Result> { Ok(Arc::new(Self { - client: Helius::new_async(api_key, helius::types::Cluster::Devnet).await?, + client: Arc::new(Client(Mutex::new( + tokio_tungstenite::connect_async(format!( + "wss://devnet.helius-rpc.com/?api-key={api_key}" + )) + .await? + .0, + ))), pump_fun: Mutex::new(PumpFun::new()), })) @@ -94,9 +108,16 @@ impl Executor { pub async fn listen(self: &Arc) -> anyhow::Result> { let (tx, rx) = mpsc::channel(10); - let ws = self.client.ws().context("Failed to get WebSocket")?; + let client = self.client.clone(); - tokio::spawn(async move {}); + tokio::spawn(async move { + match client.0.lock().await.next().await { + Some(Ok(Message::Text(msg))) => {} + Some(Ok(msg)) => {} + Some(Err(e)) => {} + None => {} + } + }); Ok(rx) } diff --git a/src/launchpad/pump_fun.rs b/src/launchpad/pump_fun.rs index 7e1bfff..9e153ad 100644 --- a/src/launchpad/pump_fun.rs +++ b/src/launchpad/pump_fun.rs @@ -1,8 +1,8 @@ use std::collections::HashMap; -use helius::Helius; use rust_decimal::Decimal; +use crate::launchpad::Client; use crate::launchpad::Launchpad; pub struct PumpFun { @@ -22,7 +22,7 @@ impl PumpFun { impl Launchpad for PumpFun { async fn buy( &mut self, - client: &Helius, + client: &Client, mint: &str, amount: Decimal, @@ -34,7 +34,7 @@ impl Launchpad for PumpFun { async fn sell( &mut self, - client: &Helius, + client: &Client, mint: &str, amount: u8, diff --git a/src/strategy/mod.rs b/src/strategy/mod.rs index 77ad8ef..7471feb 100644 --- a/src/strategy/mod.rs +++ b/src/strategy/mod.rs @@ -2,59 +2,10 @@ pub mod veloc; use std::sync::Arc; -use crate::bot::Bot; - -use serde::Deserialize; - -#[derive(Debug, Clone, Deserialize)] -pub struct NewToken { - pub mint: String, - #[serde(rename = "traderPublicKey")] - pub trader_public_key: String, - - pub name: String, - pub symbol: String, - pub uri: String, - #[serde(rename = "marketCapSol")] - pub market_cap_sol: f64, - #[serde(rename = "solAmount")] - pub sol_amount: f64, -} - -#[derive(Debug, Clone, Deserialize)] -pub enum TradeType { - #[serde(rename = "buy")] - Buy, - #[serde(rename = "sell")] - Sell, -} - -#[derive(Debug, Clone, Deserialize)] -pub struct Trade { - pub signature: String, - pub mint: String, - - #[serde(rename = "traderPublicKey")] - pub trader: String, - - #[serde(rename = "txType")] - pub tx_type: TradeType, - - #[serde(rename = "solAmount")] - pub sol_amount: f64, - - #[serde(rename = "tokenAmount")] - pub token_amount: f64, - - #[serde(rename = "marketCapSol")] - pub market_cap_sol: f64, - - #[serde(rename = "vTokensInBondingCurve")] - pub v_tokens_in_bonding_curve: f64, - - #[serde(rename = "vSolInBondingCurve")] - pub v_sol_in_bonding_curve: f64, -} +use crate::{ + bot::Bot, + data::{NewToken, Trade}, +}; #[async_trait::async_trait] pub trait Strategy: Send + Sync { diff --git a/src/strategy/veloc.rs b/src/strategy/veloc.rs index ef55206..9a3fa94 100644 --- a/src/strategy/veloc.rs +++ b/src/strategy/veloc.rs @@ -7,8 +7,9 @@ use rust_decimal::{Decimal, dec}; use super::{NewToken, Trade}; use crate::bot::Bot; +use crate::data::TradeType; use crate::data::tradelog::{ExitReason, TradeLog}; -use crate::strategy::{Strategy, TradeType}; +use crate::strategy::Strategy; const BUY_AMOUNT_SOL: Decimal = dec!(0.2); const PRIORITY: Decimal = dec!(0.0002); From 665e4a58327a7fbb7f8e84caab954aee7e3bdfab Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 20:13:54 +0200 Subject: [PATCH 10/19] New token streaming --- Cargo.lock | 2 + Cargo.toml | 2 + src/bot.rs | 23 ++--- src/data/mod.rs | 2 - src/launchpad/mod.rs | 24 ++--- src/launchpad/pump_fun.rs | 194 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 214 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2c954a8..14a5491 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3654,6 +3654,8 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", + "base64 0.22.1", + "bs58", "chrono", "csv", "env_logger", diff --git a/Cargo.toml b/Cargo.toml index 2e5632d..40c1e70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,8 @@ anyhow = "1.0.104" serde = { version = "1.0.229", features = ["derive", "serde_derive"] } serde_json = "1.0.151" +base64 = "0.22.1" +bs58 = "0.5.1" csv = "1.4.0" log = "0.4.33" diff --git a/src/bot.rs b/src/bot.rs index 3486ff6..9c97977 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -6,6 +6,7 @@ use tokio::sync::{Mutex, mpsc, watch}; use crate::{ data::{ + NewToken, account::{Account, AccountManager}, tradelog::TradeLog, }, @@ -76,21 +77,13 @@ impl Bot { Ok(()) } - pub async fn tick(self: &Arc, rx: &mut mpsc::Receiver) -> anyhow::Result { - if let Some(data) = rx.recv().await { - // drop(ws); - // self.strategy - // .lock() - // .await - // .on_new_coin(self.clone(), token) - // .await?; - - // drop(ws); - // self.strategy - // .lock() - // .await - // .on_trade(self.clone(), trade) - // .await?; + pub async fn tick(self: &Arc, rx: &mut mpsc::Receiver) -> anyhow::Result { + if let Some(token) = rx.recv().await { + self.strategy + .lock() + .await + .on_new_coin(self.clone(), token) + .await?; Ok(false) } else { diff --git a/src/data/mod.rs b/src/data/mod.rs index 94beafb..1ee8d25 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -14,8 +14,6 @@ pub struct NewToken { pub uri: String, #[serde(rename = "marketCapSol")] pub market_cap_sol: f64, - #[serde(rename = "solAmount")] - pub sol_amount: f64, } #[derive(Debug, Clone, Deserialize)] diff --git a/src/launchpad/mod.rs b/src/launchpad/mod.rs index 5b68390..24aa7b6 100644 --- a/src/launchpad/mod.rs +++ b/src/launchpad/mod.rs @@ -1,11 +1,10 @@ mod pump_fun; -use crate::launchpad::pump_fun::PumpFun; -use futures_util::StreamExt; use rust_decimal::Decimal; use std::{collections::HashMap, sync::Arc}; use tokio::sync::{Mutex, mpsc}; -use tokio_tungstenite::tungstenite::Message; + +use crate::{data::NewToken, launchpad::pump_fun::PumpFun}; pub struct Client( pub Mutex< @@ -44,6 +43,8 @@ pub trait Launchpad: Send + Sync { slippage: u16, ) -> anyhow::Result<()>; + async fn listen(client: Arc, tx: mpsc::Sender) -> anyhow::Result<()>; + fn get_positions(&self) -> HashMap; } @@ -52,7 +53,7 @@ impl Executor { Ok(Arc::new(Self { client: Arc::new(Client(Mutex::new( tokio_tungstenite::connect_async(format!( - "wss://devnet.helius-rpc.com/?api-key={api_key}" + "wss://mainnet.helius-rpc.com/?api-key={api_key}" )) .await? .0, @@ -105,19 +106,10 @@ impl Executor { Ok(()) } - pub async fn listen(self: &Arc) -> anyhow::Result> { - let (tx, rx) = mpsc::channel(10); + pub async fn listen(self: &Arc) -> anyhow::Result> { + let (tx, rx) = mpsc::channel(100); - let client = self.client.clone(); - - tokio::spawn(async move { - match client.0.lock().await.next().await { - Some(Ok(Message::Text(msg))) => {} - Some(Ok(msg)) => {} - Some(Err(e)) => {} - None => {} - } - }); + tokio::spawn(PumpFun::listen(self.client.clone(), tx)); Ok(rx) } diff --git a/src/launchpad/pump_fun.rs b/src/launchpad/pump_fun.rs index 9e153ad..f8f2adf 100644 --- a/src/launchpad/pump_fun.rs +++ b/src/launchpad/pump_fun.rs @@ -1,10 +1,21 @@ use std::collections::HashMap; +use std::sync::Arc; +use base64::{Engine, engine::general_purpose::STANDARD}; +use futures_util::SinkExt; +use futures_util::StreamExt; use rust_decimal::Decimal; +use serde::Deserialize; +use tokio::sync::mpsc; +use tokio_tungstenite::tungstenite::Message; +use crate::data::NewToken; use crate::launchpad::Client; use crate::launchpad::Launchpad; +const PUMP_FUN_PROGRAM: &str = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"; +const CREATE_EVENT_DISCRIMINATOR: [u8; 8] = [27, 114, 169, 77, 222, 235, 99, 118]; + pub struct PumpFun { pub positions: HashMap, } @@ -44,7 +55,190 @@ impl Launchpad for PumpFun { Ok(()) } + async fn listen(client: Arc, tx: mpsc::Sender) -> anyhow::Result<()> { + let mut ws = client.0.lock().await; + + ws.send( + serde_json::json!({ + "jsonrpc": "2.0", + "id": 1, + "method": "logsSubscribe", + "params": [ + { "mentions": [PUMP_FUN_PROGRAM] }, + { "commitment": "processed" } + ] + }) + .to_string() + .into(), + ) + .await?; + + log::info!( + "[PUMP.FUN] Listening for new tokens from {}", + PUMP_FUN_PROGRAM + ); + + while let Some(message) = ws.next().await { + let Message::Text(text) = message? else { + continue; + }; + + let Ok(notification) = serde_json::from_str::(&text) else { + continue; + }; + + if notification.method != "logsNotification" { + continue; + } + + let logs = notification.params.result.value.logs; + + if !logs + .iter() + .any(|log| log.starts_with("Program log: Instruction: Create")) + { + continue; + } + + let Some(event) = logs.iter().find_map(|log| { + log.strip_prefix("Program data: ") + .and_then(|encoded| STANDARD.decode(encoded).ok()) + .and_then(|data| parse_create_event(&data)) + }) else { + continue; + }; + + let token = NewToken { + mint: event.mint, + trader_public_key: event.user, + name: event.name, + symbol: event.symbol, + uri: event.uri, + market_cap_sol: event.market_cap_sol, + }; + + log::info!( + "[PUMP.FUN] New token: {} (${}) - {}", + token.name, + token.symbol, + token.mint + ); + + if tx.send(token).await.is_err() { + break; + } + } + + Ok(()) + } + fn get_positions<'a>(&'a self) -> HashMap { self.positions.clone() } } + +struct CreateEvent { + name: String, + symbol: String, + uri: String, + mint: String, + user: String, + market_cap_sol: f64, +} + +fn parse_create_event(data: &[u8]) -> Option { + if data.len() < 8 || data[..8] != CREATE_EVENT_DISCRIMINATOR { + return None; + } + + let mut offset = 8; + + let name = decode_string(data, &mut offset)?; + let symbol = decode_string(data, &mut offset)?; + let uri = decode_string(data, &mut offset)?; + let mint = decode_pubkey(data, &mut offset)?; + let _bonding_curve = decode_pubkey(data, &mut offset)?; + let user = decode_pubkey(data, &mut offset)?; + let _creator = decode_pubkey(data, &mut offset)?; + + // Virtual reserves were added in a later program version; fall back to 0.0 for legacy events. + let market_cap_sol = decode_market_cap(data, &mut offset).unwrap_or(0.0); + + Some(CreateEvent { + name, + symbol, + uri, + mint, + user, + market_cap_sol, + }) +} + +fn decode_market_cap(data: &[u8], offset: &mut usize) -> Option { + let _timestamp = decode_i64(data, offset)?; + let virtual_token_reserves = decode_u64(data, offset)?; + let virtual_sol_reserves = decode_u64(data, offset)?; + let _real_token_reserves = decode_u64(data, offset)?; + let token_total_supply = decode_u64(data, offset)?; + + if virtual_token_reserves == 0 { + return Some(0.0); + } + + Some( + virtual_sol_reserves as f64 / 1e9 * token_total_supply as f64 + / virtual_token_reserves as f64, + ) +} + +fn decode_string(data: &[u8], offset: &mut usize) -> Option { + let len = u32::from_le_bytes(data.get(*offset..*offset + 4)?.try_into().ok()?) as usize; + *offset += 4; + + let bytes = data.get(*offset..*offset + len)?; + *offset += len; + + String::from_utf8(bytes.to_vec()).ok() +} + +fn decode_pubkey(data: &[u8], offset: &mut usize) -> Option { + let bytes = data.get(*offset..*offset + 32)?; + *offset += 32; + + Some(bs58::encode(bytes).into_string()) +} + +fn decode_u64(data: &[u8], offset: &mut usize) -> Option { + let bytes = data.get(*offset..*offset + 8)?.try_into().ok()?; + *offset += 8; + + Some(u64::from_le_bytes(bytes)) +} + +fn decode_i64(data: &[u8], offset: &mut usize) -> Option { + let bytes = data.get(*offset..*offset + 8)?.try_into().ok()?; + *offset += 8; + + Some(i64::from_le_bytes(bytes)) +} + +#[derive(Deserialize)] +struct LogsNotification { + method: String, + params: NotificationParams, +} + +#[derive(Deserialize)] +struct NotificationParams { + result: NotificationResult, +} + +#[derive(Deserialize)] +struct NotificationResult { + value: LogsValue, +} + +#[derive(Deserialize)] +struct LogsValue { + logs: Vec, +} From 5447dd27186cfb3e48a863c88cdb99385ab5edcc Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 20:30:55 +0200 Subject: [PATCH 11/19] Using solana rpc for new tokens for credit saving --- src/launchpad/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/launchpad/mod.rs b/src/launchpad/mod.rs index 24aa7b6..d5a9142 100644 --- a/src/launchpad/mod.rs +++ b/src/launchpad/mod.rs @@ -16,6 +16,7 @@ pub struct Client( pub struct Executor { pub client: Arc, + pub new_tokens_client: Arc, pub pump_fun: Mutex, } @@ -59,6 +60,12 @@ impl Executor { .0, ))), + new_tokens_client: Arc::new(Client(Mutex::new( + tokio_tungstenite::connect_async(format!("wss://api.mainnet-beta.solana.com")) + .await? + .0, + ))), + pump_fun: Mutex::new(PumpFun::new()), })) } @@ -109,7 +116,7 @@ impl Executor { pub async fn listen(self: &Arc) -> anyhow::Result> { let (tx, rx) = mpsc::channel(100); - tokio::spawn(PumpFun::listen(self.client.clone(), tx)); + tokio::spawn(PumpFun::listen(self.new_tokens_client.clone(), tx)); Ok(rx) } From 4167e898246c5d54f9463fa28a2179048e8be09b Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 20:35:11 +0200 Subject: [PATCH 12/19] Trade event structure --- src/bot.rs | 28 ++++++++++++++++++++-------- src/data/mod.rs | 6 ++++++ src/launchpad/mod.rs | 6 +++--- src/launchpad/pump_fun.rs | 5 +++-- 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/bot.rs b/src/bot.rs index 9c97977..d86e245 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -6,7 +6,7 @@ use tokio::sync::{Mutex, mpsc, watch}; use crate::{ data::{ - NewToken, + Event, NewToken, account::{Account, AccountManager}, tradelog::TradeLog, }, @@ -77,13 +77,25 @@ impl Bot { Ok(()) } - pub async fn tick(self: &Arc, rx: &mut mpsc::Receiver) -> anyhow::Result { - if let Some(token) = rx.recv().await { - self.strategy - .lock() - .await - .on_new_coin(self.clone(), token) - .await?; + pub async fn tick(self: &Arc, rx: &mut mpsc::Receiver) -> anyhow::Result { + if let Some(event) = rx.recv().await { + match event { + Event::NewToken(token) => { + self.strategy + .lock() + .await + .on_new_coin(self.clone(), token) + .await?; + } + + Event::Trade(trade) => { + self.strategy + .lock() + .await + .on_trade(self.clone(), trade) + .await?; + } + } Ok(false) } else { diff --git a/src/data/mod.rs b/src/data/mod.rs index 1ee8d25..1715e9f 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -3,6 +3,12 @@ pub mod tradelog; use serde::Deserialize; +#[derive(Debug, Clone)] +pub enum Event { + NewToken(NewToken), + Trade(Trade), +} + #[derive(Debug, Clone, Deserialize)] pub struct NewToken { pub mint: String, diff --git a/src/launchpad/mod.rs b/src/launchpad/mod.rs index d5a9142..896c62f 100644 --- a/src/launchpad/mod.rs +++ b/src/launchpad/mod.rs @@ -4,7 +4,7 @@ use rust_decimal::Decimal; use std::{collections::HashMap, sync::Arc}; use tokio::sync::{Mutex, mpsc}; -use crate::{data::NewToken, launchpad::pump_fun::PumpFun}; +use crate::{data::Event, launchpad::pump_fun::PumpFun}; pub struct Client( pub Mutex< @@ -44,7 +44,7 @@ pub trait Launchpad: Send + Sync { slippage: u16, ) -> anyhow::Result<()>; - async fn listen(client: Arc, tx: mpsc::Sender) -> anyhow::Result<()>; + async fn listen(client: Arc, tx: mpsc::Sender) -> anyhow::Result<()>; fn get_positions(&self) -> HashMap; } @@ -113,7 +113,7 @@ impl Executor { Ok(()) } - pub async fn listen(self: &Arc) -> anyhow::Result> { + pub async fn listen(self: &Arc) -> anyhow::Result> { let (tx, rx) = mpsc::channel(100); tokio::spawn(PumpFun::listen(self.new_tokens_client.clone(), tx)); diff --git a/src/launchpad/pump_fun.rs b/src/launchpad/pump_fun.rs index f8f2adf..1f6f305 100644 --- a/src/launchpad/pump_fun.rs +++ b/src/launchpad/pump_fun.rs @@ -9,6 +9,7 @@ use serde::Deserialize; use tokio::sync::mpsc; use tokio_tungstenite::tungstenite::Message; +use crate::data::Event; use crate::data::NewToken; use crate::launchpad::Client; use crate::launchpad::Launchpad; @@ -55,7 +56,7 @@ impl Launchpad for PumpFun { Ok(()) } - async fn listen(client: Arc, tx: mpsc::Sender) -> anyhow::Result<()> { + async fn listen(client: Arc, tx: mpsc::Sender) -> anyhow::Result<()> { let mut ws = client.0.lock().await; ws.send( @@ -124,7 +125,7 @@ impl Launchpad for PumpFun { token.mint ); - if tx.send(token).await.is_err() { + if tx.send(Event::NewToken(token)).await.is_err() { break; } } From 679b2b31d9af7563a387ad86a0d6c4b7d567e2c0 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 20:45:52 +0200 Subject: [PATCH 13/19] Refactored --- src/bot.rs | 10 +------ src/launchpad/mod.rs | 60 ++++++++++++++++++++++++++------------- src/launchpad/pump_fun.rs | 9 +----- src/strategy/veloc.rs | 6 ++-- 4 files changed, 45 insertions(+), 40 deletions(-) diff --git a/src/bot.rs b/src/bot.rs index d86e245..0ed6e33 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -6,7 +6,7 @@ use tokio::sync::{Mutex, mpsc, watch}; use crate::{ data::{ - Event, NewToken, + Event, account::{Account, AccountManager}, tradelog::TradeLog, }, @@ -105,14 +105,6 @@ impl Bot { } impl Bot { - pub async fn subscribe(&self, mint: &str) -> anyhow::Result<()> { - Ok(()) - } - - pub async fn unsubscribe(&self, mint: &str) -> anyhow::Result<()> { - Ok(()) - } - pub async fn refresh_account(self: &Arc) -> anyhow::Result<()> { self.strategy .lock() diff --git a/src/launchpad/mod.rs b/src/launchpad/mod.rs index 896c62f..51ed05b 100644 --- a/src/launchpad/mod.rs +++ b/src/launchpad/mod.rs @@ -6,17 +6,19 @@ use tokio::sync::{Mutex, mpsc}; use crate::{data::Event, launchpad::pump_fun::PumpFun}; -pub struct Client( - pub Mutex< - tokio_tungstenite::WebSocketStream< - tokio_tungstenite::MaybeTlsStream, - >, - >, -); +type ClientMutex = Mutex< + tokio_tungstenite::WebSocketStream>, +>; + +pub struct Client { + pub helius: ClientMutex, + pub solana: ClientMutex, +} pub struct Executor { pub client: Arc, - pub new_tokens_client: Arc, + + pub event_tx: Mutex>, pub pump_fun: Mutex, } @@ -51,20 +53,28 @@ pub trait Launchpad: Send + Sync { impl Executor { pub async fn new(api_key: &str) -> anyhow::Result> { - Ok(Arc::new(Self { - client: Arc::new(Client(Mutex::new( - tokio_tungstenite::connect_async(format!( - "wss://mainnet.helius-rpc.com/?api-key={api_key}" - )) - .await? - .0, - ))), + let (tx, _) = mpsc::channel(1); - new_tokens_client: Arc::new(Client(Mutex::new( - tokio_tungstenite::connect_async(format!("wss://api.mainnet-beta.solana.com")) + tx.closed().await; + + Ok(Arc::new(Self { + client: Arc::new(Client { + helius: Mutex::new( + tokio_tungstenite::connect_async(format!( + "wss://mainnet.helius-rpc.com/?api-key={api_key}" + )) .await? .0, - ))), + ), + + solana: Mutex::new( + tokio_tungstenite::connect_async(format!("wss://api.mainnet-beta.solana.com")) + .await? + .0, + ), + }), + + event_tx: Mutex::new(tx), pump_fun: Mutex::new(PumpFun::new()), })) @@ -116,8 +126,18 @@ impl Executor { pub async fn listen(self: &Arc) -> anyhow::Result> { let (tx, rx) = mpsc::channel(100); - tokio::spawn(PumpFun::listen(self.new_tokens_client.clone(), tx)); + *self.event_tx.lock().await = tx.clone(); + + tokio::spawn(PumpFun::listen(self.client.clone(), tx)); Ok(rx) } + + pub async fn subscribe(&self, mint: &str) -> anyhow::Result<()> { + Ok(()) + } + + pub async fn unsubscribe(&self, mint: &str) -> anyhow::Result<()> { + Ok(()) + } } diff --git a/src/launchpad/pump_fun.rs b/src/launchpad/pump_fun.rs index 1f6f305..7d7d951 100644 --- a/src/launchpad/pump_fun.rs +++ b/src/launchpad/pump_fun.rs @@ -57,7 +57,7 @@ impl Launchpad for PumpFun { } async fn listen(client: Arc, tx: mpsc::Sender) -> anyhow::Result<()> { - let mut ws = client.0.lock().await; + let mut ws = client.solana.lock().await; ws.send( serde_json::json!({ @@ -118,13 +118,6 @@ impl Launchpad for PumpFun { market_cap_sol: event.market_cap_sol, }; - log::info!( - "[PUMP.FUN] New token: {} (${}) - {}", - token.name, - token.symbol, - token.mint - ); - if tx.send(Event::NewToken(token)).await.is_err() { break; } diff --git a/src/strategy/veloc.rs b/src/strategy/veloc.rs index 9a3fa94..61ed627 100644 --- a/src/strategy/veloc.rs +++ b/src/strategy/veloc.rs @@ -64,7 +64,7 @@ impl MomentumVelocityStrategy { /// Internal helper to safely handle unsubscribing and cleaning state async fn cleanup_and_unsubscribe(&mut self, bot: &Arc, mint: &str) -> anyhow::Result<()> { debug!("[{}] Cleaning up state and unsubscribing", mint); - if let Err(e) = bot.unsubscribe(mint).await { + if let Err(e) = bot.executor.unsubscribe(mint).await { warn!("[{}] Unsubscribe request failed: {:?}", mint, e); } self.trackers.remove(mint); @@ -103,7 +103,7 @@ impl Strategy for MomentumVelocityStrategy { "[{}] Capacity reached ({}/{}). Evicting un-bought token from queue.", mint_to_remove, MAX_SUBSCRIBED_TOKENS, MAX_SUBSCRIBED_TOKENS ); - let _ = bot.unsubscribe(&mint_to_remove).await; + let _ = bot.executor.unsubscribe(&mint_to_remove).await; self.trackers.remove(&mint_to_remove); } } else { @@ -116,7 +116,7 @@ impl Strategy for MomentumVelocityStrategy { } info!("[{}] Subscribing and creating tracker.", token.mint); - bot.subscribe(&token.mint).await?; + bot.executor.subscribe(&token.mint).await?; self.active_subscriptions.push_back(token.mint.clone()); self.trackers.insert( From af528e589bc6cb5ace0ba736949b9a9b13beb61d Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 21:02:28 +0200 Subject: [PATCH 14/19] Trades --- src/data/mod.rs | 12 ---- src/launchpad/pump_fun.rs | 123 ++++++++++++++++++++++++++++---------- 2 files changed, 91 insertions(+), 44 deletions(-) diff --git a/src/data/mod.rs b/src/data/mod.rs index 1715e9f..9ea871a 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -34,25 +34,13 @@ pub enum TradeType { pub struct Trade { pub signature: String, pub mint: String, - - #[serde(rename = "traderPublicKey")] pub trader: String, - #[serde(rename = "txType")] pub tx_type: TradeType, - - #[serde(rename = "solAmount")] pub sol_amount: f64, - - #[serde(rename = "tokenAmount")] pub token_amount: f64, - #[serde(rename = "marketCapSol")] pub market_cap_sol: f64, - - #[serde(rename = "vTokensInBondingCurve")] pub v_tokens_in_bonding_curve: f64, - - #[serde(rename = "vSolInBondingCurve")] pub v_sol_in_bonding_curve: f64, } diff --git a/src/launchpad/pump_fun.rs b/src/launchpad/pump_fun.rs index 7d7d951..7112bba 100644 --- a/src/launchpad/pump_fun.rs +++ b/src/launchpad/pump_fun.rs @@ -11,11 +11,14 @@ use tokio_tungstenite::tungstenite::Message; use crate::data::Event; use crate::data::NewToken; +use crate::data::Trade; +use crate::data::TradeType; use crate::launchpad::Client; use crate::launchpad::Launchpad; const PUMP_FUN_PROGRAM: &str = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"; const CREATE_EVENT_DISCRIMINATOR: [u8; 8] = [27, 114, 169, 77, 222, 235, 99, 118]; +const TRADE_EVENT_DISCRIMINATOR: [u8; 8] = [189, 219, 127, 211, 78, 230, 97, 238]; pub struct PumpFun { pub positions: HashMap, @@ -101,25 +104,24 @@ impl Launchpad for PumpFun { continue; } - let Some(event) = logs.iter().find_map(|log| { - log.strip_prefix("Program data: ") - .and_then(|encoded| STANDARD.decode(encoded).ok()) - .and_then(|data| parse_create_event(&data)) - }) else { - continue; - }; + for log in &logs { + let Some(encoded) = log.strip_prefix("Program data: ") else { + continue; + }; - let token = NewToken { - mint: event.mint, - trader_public_key: event.user, - name: event.name, - symbol: event.symbol, - uri: event.uri, - market_cap_sol: event.market_cap_sol, - }; + let Ok(data) = STANDARD.decode(encoded) else { + continue; + }; - if tx.send(Event::NewToken(token)).await.is_err() { - break; + if let Some(token) = parse_create_event(&data) { + tx.send(Event::NewToken(token)).await?; + } + + if let Some(trade) = + parse_trade_event(&data, notification.params.result.value.signature.clone()) + { + tx.send(Event::Trade(trade)).await?; + } } } @@ -131,16 +133,61 @@ impl Launchpad for PumpFun { } } -struct CreateEvent { - name: String, - symbol: String, - uri: String, - mint: String, - user: String, - market_cap_sol: f64, +fn parse_trade_event(data: &[u8], signature: String) -> Option { + if data.len() < 8 || data[..8] != TRADE_EVENT_DISCRIMINATOR { + return None; + } + + let mut offset = 8; + + let mint = decode_pubkey(data, &mut offset)?; + + let sol_amount = decode_u64(data, &mut offset)? as f64; + let token_amount = decode_u64(data, &mut offset)? as f64; + + let is_buy = decode_bool(data, &mut offset)?; + + let trader = decode_pubkey(data, &mut offset)?; + + // timestamp exists but we don't need it currently + let _timestamp = decode_i64(data, &mut offset)?; + + let v_sol_in_bonding_curve = decode_u64(data, &mut offset)? as f64; + + let v_tokens_in_bonding_curve = decode_u64(data, &mut offset)? as f64; + + // These exist in the event but aren't needed for your struct + let _real_sol_reserves = decode_u64(data, &mut offset)?; + + let _real_token_reserves = decode_u64(data, &mut offset)?; + + Some(Trade { + signature, + mint, + trader, + tx_type: if is_buy { + TradeType::Buy + } else { + TradeType::Sell + }, + sol_amount, + token_amount, + + // Pump.fun bonding curve market cap: + // token_price = virtual SOL / virtual tokens + // market cap is derived + market_cap_sol: if v_tokens_in_bonding_curve > 0.0 { + v_sol_in_bonding_curve / v_tokens_in_bonding_curve + } else { + 0.0 + }, + + v_tokens_in_bonding_curve, + v_sol_in_bonding_curve, + }) } -fn parse_create_event(data: &[u8]) -> Option { +fn parse_create_event(data: &[u8]) -> Option { if data.len() < 8 || data[..8] != CREATE_EVENT_DISCRIMINATOR { return None; } @@ -152,18 +199,18 @@ fn parse_create_event(data: &[u8]) -> Option { let uri = decode_string(data, &mut offset)?; let mint = decode_pubkey(data, &mut offset)?; let _bonding_curve = decode_pubkey(data, &mut offset)?; - let user = decode_pubkey(data, &mut offset)?; + let trader_public_key = decode_pubkey(data, &mut offset)?; let _creator = decode_pubkey(data, &mut offset)?; // Virtual reserves were added in a later program version; fall back to 0.0 for legacy events. let market_cap_sol = decode_market_cap(data, &mut offset).unwrap_or(0.0); - Some(CreateEvent { + Some(NewToken { name, symbol, uri, mint, - user, + trader_public_key, market_cap_sol, }) } @@ -216,23 +263,35 @@ fn decode_i64(data: &[u8], offset: &mut usize) -> Option { Some(i64::from_le_bytes(bytes)) } -#[derive(Deserialize)] +fn decode_bool(data: &[u8], offset: &mut usize) -> Option { + if *offset >= data.len() { + return None; + } + + let value = data[*offset] != 0; + *offset += 1; + + Some(value) +} + +#[derive(Debug, Deserialize)] struct LogsNotification { method: String, params: NotificationParams, } -#[derive(Deserialize)] +#[derive(Debug, Deserialize)] struct NotificationParams { result: NotificationResult, } -#[derive(Deserialize)] +#[derive(Debug, Deserialize)] struct NotificationResult { value: LogsValue, } -#[derive(Deserialize)] +#[derive(Debug, Deserialize)] struct LogsValue { + signature: String, logs: Vec, } From 6032b56ab80c494c3ca91ae61448bd0ea61cc909 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 21:11:46 +0200 Subject: [PATCH 15/19] Working subscribe and unsubscribe --- src/launchpad/mod.rs | 16 +++++++++++----- src/launchpad/pump_fun.rs | 4 +++- src/strategy/veloc.rs | 8 +++----- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/launchpad/mod.rs b/src/launchpad/mod.rs index 51ed05b..9a98d65 100644 --- a/src/launchpad/mod.rs +++ b/src/launchpad/mod.rs @@ -1,7 +1,10 @@ mod pump_fun; use rust_decimal::Decimal; -use std::{collections::HashMap, sync::Arc}; +use std::{ + collections::{HashMap, HashSet}, + sync::Arc, +}; use tokio::sync::{Mutex, mpsc}; use crate::{data::Event, launchpad::pump_fun::PumpFun}; @@ -13,6 +16,7 @@ type ClientMutex = Mutex< pub struct Client { pub helius: ClientMutex, pub solana: ClientMutex, + pub subscribed: Mutex>, } pub struct Executor { @@ -72,6 +76,8 @@ impl Executor { .await? .0, ), + + subscribed: Mutex::new(HashSet::new()), }), event_tx: Mutex::new(tx), @@ -133,11 +139,11 @@ impl Executor { Ok(rx) } - pub async fn subscribe(&self, mint: &str) -> anyhow::Result<()> { - Ok(()) + pub async fn subscribe(&self, mint: &str) { + self.client.subscribed.lock().await.insert(mint.to_string()); } - pub async fn unsubscribe(&self, mint: &str) -> anyhow::Result<()> { - Ok(()) + pub async fn unsubscribe(&self, mint: &str) { + self.client.subscribed.lock().await.remove(mint); } } diff --git a/src/launchpad/pump_fun.rs b/src/launchpad/pump_fun.rs index 7112bba..bbe8ab2 100644 --- a/src/launchpad/pump_fun.rs +++ b/src/launchpad/pump_fun.rs @@ -120,7 +120,9 @@ impl Launchpad for PumpFun { if let Some(trade) = parse_trade_event(&data, notification.params.result.value.signature.clone()) { - tx.send(Event::Trade(trade)).await?; + if client.subscribed.lock().await.contains(&trade.mint) { + tx.send(Event::Trade(trade)).await?; + } } } } diff --git a/src/strategy/veloc.rs b/src/strategy/veloc.rs index 61ed627..ccfef1e 100644 --- a/src/strategy/veloc.rs +++ b/src/strategy/veloc.rs @@ -64,9 +64,7 @@ impl MomentumVelocityStrategy { /// Internal helper to safely handle unsubscribing and cleaning state async fn cleanup_and_unsubscribe(&mut self, bot: &Arc, mint: &str) -> anyhow::Result<()> { debug!("[{}] Cleaning up state and unsubscribing", mint); - if let Err(e) = bot.executor.unsubscribe(mint).await { - warn!("[{}] Unsubscribe request failed: {:?}", mint, e); - } + bot.executor.unsubscribe(mint).await; self.trackers.remove(mint); self.active_subscriptions.retain(|m| m != mint); Ok(()) @@ -103,7 +101,7 @@ impl Strategy for MomentumVelocityStrategy { "[{}] Capacity reached ({}/{}). Evicting un-bought token from queue.", mint_to_remove, MAX_SUBSCRIBED_TOKENS, MAX_SUBSCRIBED_TOKENS ); - let _ = bot.executor.unsubscribe(&mint_to_remove).await; + bot.executor.unsubscribe(&mint_to_remove).await; self.trackers.remove(&mint_to_remove); } } else { @@ -116,7 +114,7 @@ impl Strategy for MomentumVelocityStrategy { } info!("[{}] Subscribing and creating tracker.", token.mint); - bot.executor.subscribe(&token.mint).await?; + bot.executor.subscribe(&token.mint).await; self.active_subscriptions.push_back(token.mint.clone()); self.trackers.insert( From 10375faf9e598f2944f480fdb87e97987b512531 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 21:19:19 +0200 Subject: [PATCH 16/19] Adjusted --- src/strategy/veloc.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/strategy/veloc.rs b/src/strategy/veloc.rs index ccfef1e..772afbc 100644 --- a/src/strategy/veloc.rs +++ b/src/strategy/veloc.rs @@ -14,7 +14,7 @@ use crate::strategy::Strategy; const BUY_AMOUNT_SOL: Decimal = dec!(0.2); const PRIORITY: Decimal = dec!(0.0002); const SLIPPAGE: u16 = 10; -const MAX_SUBSCRIBED_TOKENS: usize = 5; +const MAX_SUBSCRIBED_TOKENS: usize = 100; struct TokenTracker { created_at: Instant, @@ -97,10 +97,6 @@ impl Strategy for MomentumVelocityStrategy { if let Some(idx) = eviction_index { if let Some(mint_to_remove) = self.active_subscriptions.remove(idx) { - info!( - "[{}] Capacity reached ({}/{}). Evicting un-bought token from queue.", - mint_to_remove, MAX_SUBSCRIBED_TOKENS, MAX_SUBSCRIBED_TOKENS - ); bot.executor.unsubscribe(&mint_to_remove).await; self.trackers.remove(&mint_to_remove); } @@ -113,7 +109,6 @@ impl Strategy for MomentumVelocityStrategy { } } - info!("[{}] Subscribing and creating tracker.", token.mint); bot.executor.subscribe(&token.mint).await; self.active_subscriptions.push_back(token.mint.clone()); @@ -155,7 +150,7 @@ impl Strategy for MomentumVelocityStrategy { _ if drop_from_peak >= 0.12 && price_change_pct > 0.10 => { Some(ExitReason::TrailingStop) } - _ if pos.last_high_time.elapsed() >= Duration::from_secs(25) => { + _ if pos.last_high_time.elapsed() >= Duration::from_secs(2) => { Some(ExitReason::MomentumStalled) } _ => None, From 05b997752ae18585717f1b413676005b448e05c3 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 7 Aug 2026 22:54:41 +0200 Subject: [PATCH 17/19] Improved --- src/strategy/veloc.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/strategy/veloc.rs b/src/strategy/veloc.rs index 772afbc..b8a8ada 100644 --- a/src/strategy/veloc.rs +++ b/src/strategy/veloc.rs @@ -5,16 +5,15 @@ use std::time::{Duration, Instant}; use log::{debug, info, trace, warn}; use rust_decimal::{Decimal, dec}; -use super::{NewToken, Trade}; use crate::bot::Bot; -use crate::data::TradeType; use crate::data::tradelog::{ExitReason, TradeLog}; +use crate::data::{NewToken, Trade, TradeType}; use crate::strategy::Strategy; const BUY_AMOUNT_SOL: Decimal = dec!(0.2); const PRIORITY: Decimal = dec!(0.0002); const SLIPPAGE: u16 = 10; -const MAX_SUBSCRIBED_TOKENS: usize = 100; +const MAX_SUBSCRIBED_TOKENS: usize = 25; struct TokenTracker { created_at: Instant, @@ -65,6 +64,9 @@ impl MomentumVelocityStrategy { async fn cleanup_and_unsubscribe(&mut self, bot: &Arc, mint: &str) -> anyhow::Result<()> { debug!("[{}] Cleaning up state and unsubscribing", mint); bot.executor.unsubscribe(mint).await; + // if let Err(e) = bot.executor.unsubscribe(mint).await { + // warn!("[{}] Unsubscribe request failed: {:?}", mint, e); + // } self.trackers.remove(mint); self.active_subscriptions.retain(|m| m != mint); Ok(()) @@ -97,6 +99,10 @@ impl Strategy for MomentumVelocityStrategy { if let Some(idx) = eviction_index { if let Some(mint_to_remove) = self.active_subscriptions.remove(idx) { + debug!( + "[{}] Capacity reached ({}/{}). Evicting un-bought token from queue.", + mint_to_remove, MAX_SUBSCRIBED_TOKENS, MAX_SUBSCRIBED_TOKENS + ); bot.executor.unsubscribe(&mint_to_remove).await; self.trackers.remove(&mint_to_remove); } @@ -109,6 +115,7 @@ impl Strategy for MomentumVelocityStrategy { } } + debug!("[{}] Subscribing and creating tracker.", token.mint); bot.executor.subscribe(&token.mint).await; self.active_subscriptions.push_back(token.mint.clone()); From a26b4892ca11cae546de009a539e6d45e49e1f17 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Sat, 8 Aug 2026 00:03:21 +0200 Subject: [PATCH 18/19] Strat --- src/strategy/veloc.rs | 188 +++++++++++++++++++++++++++++++----------- 1 file changed, 141 insertions(+), 47 deletions(-) diff --git a/src/strategy/veloc.rs b/src/strategy/veloc.rs index b8a8ada..ce5a644 100644 --- a/src/strategy/veloc.rs +++ b/src/strategy/veloc.rs @@ -14,9 +14,25 @@ const BUY_AMOUNT_SOL: Decimal = dec!(0.2); const PRIORITY: Decimal = dec!(0.0002); const SLIPPAGE: u16 = 10; const MAX_SUBSCRIBED_TOKENS: usize = 25; +const MAX_OPEN_POSITIONS: usize = 5; + +// Strict entry filters +const MIN_UNIQUE_BUYERS: usize = 0; +const MIN_NET_SOL_FLOW: f64 = 0.0003; +const MIN_TRADE_COUNT: usize = 0; +const MAX_CURVE_SOL: f64 = 800.0; +const MIN_MOMENTUM_PCT: f64 = 0.001; + +// Exit rules +const TAKE_PROFIT_PCT: f64 = 0.40; +const STOP_LOSS_PCT: f64 = -0.10; +const TRAILING_STOP_DROP_PCT: f64 = 0.12; +const TRAILING_STOP_MIN_GAIN_PCT: f64 = 0.10; +const STALL_DURATION: Duration = Duration::from_secs(2); struct TokenTracker { created_at: Instant, + first_price_sol: Option, unique_buyers: HashSet, net_sol_flow: f64, trade_count: usize, @@ -26,12 +42,11 @@ struct OpenPosition { trade: TradeLog, highest_price_sol: f64, + last_price_sol: f64, last_high_time: Instant, } pub struct MomentumVelocityStrategy { - min_unique_buyers: usize, - min_net_sol_flow: f64, max_tracking_duration: Duration, trackers: HashMap, @@ -41,17 +56,21 @@ pub struct MomentumVelocityStrategy { active_subscriptions: VecDeque, } -impl MomentumVelocityStrategy { - pub fn new() -> Self { +impl Default for MomentumVelocityStrategy { + fn default() -> Self { Self { - min_unique_buyers: 1, - min_net_sol_flow: 0.001, max_tracking_duration: Duration::from_secs(45), trackers: HashMap::new(), positions: HashMap::new(), active_subscriptions: VecDeque::with_capacity(MAX_SUBSCRIBED_TOKENS), } } +} + +impl MomentumVelocityStrategy { + pub fn new() -> Self { + Self::default() + } fn calculate_price_sol(&self, trade: &Trade) -> f64 { if trade.v_tokens_in_bonding_curve == 0.0 { @@ -71,6 +90,39 @@ impl MomentumVelocityStrategy { self.active_subscriptions.retain(|m| m != mint); Ok(()) } + + async fn execute_exit( + &mut self, + bot: &Arc, + mint: &str, + reason: ExitReason, + ) -> anyhow::Result<()> { + let Some((entry_price, exit_price)) = self + .positions + .get(mint) + .map(|pos| (pos.trade.entry_price_sol, pos.last_price_sol)) + else { + return Ok(()); + }; + + let pnl = ((exit_price - entry_price) / entry_price) * 100.0; + + info!( + "[{}] EXECUTING SELL {}% {:?}", + mint, pnl, reason, + ); + + bot.executor.sell(mint, 100, PRIORITY, SLIPPAGE).await?; + + if let Some(mut pos) = self.positions.remove(mint) { + pos.trade.close(exit_price, reason); + + bot.trade_log.lock().await.push(pos.trade); + } + + self.cleanup_and_unsubscribe(bot, mint).await?; + Ok(()) + } } #[async_trait::async_trait] @@ -123,6 +175,7 @@ impl Strategy for MomentumVelocityStrategy { token.mint, TokenTracker { created_at: Instant::now(), + first_price_sol: None, unique_buyers: HashSet::new(), net_sol_flow: 0.0, trade_count: 0, @@ -137,11 +190,13 @@ impl Strategy for MomentumVelocityStrategy { let current_price = self.calculate_price_sol(&trade); // ------------------------------------------------------------- - // 1. Manage Active Positions (Take Profit / Stop Loss / Stall) + // 1. Price-based exits for the mint of this trade. + // Updates the highest price / stall timer before any stall scan. // ------------------------------------------------------------- + let mut exits: Vec<(String, ExitReason)> = Vec::new(); + if let Some(pos) = self.positions.get_mut(mint) { - let price_change_pct = - (current_price - pos.trade.entry_price_sol) / pos.trade.entry_price_sol; + pos.last_price_sol = current_price; if current_price > pos.highest_price_sol { pos.highest_price_sol = current_price; @@ -149,44 +204,47 @@ impl Strategy for MomentumVelocityStrategy { trace!("[{}] New high reached: {:.9} SOL", mint, current_price); } + let price_change_pct = + (current_price - pos.trade.entry_price_sol) / pos.trade.entry_price_sol; let drop_from_peak = (pos.highest_price_sol - current_price) / pos.highest_price_sol; - let should_sell = match () { - _ if price_change_pct >= 0.40 => Some(ExitReason::TakeProfit), - _ if price_change_pct <= -0.1 => Some(ExitReason::StopLoss), - _ if drop_from_peak >= 0.12 && price_change_pct > 0.10 => { + let reason = match () { + _ if price_change_pct >= TAKE_PROFIT_PCT => Some(ExitReason::TakeProfit), + _ if price_change_pct <= STOP_LOSS_PCT => Some(ExitReason::StopLoss), + _ if drop_from_peak >= TRAILING_STOP_DROP_PCT + && price_change_pct > TRAILING_STOP_MIN_GAIN_PCT => + { Some(ExitReason::TrailingStop) } - _ if pos.last_high_time.elapsed() >= Duration::from_secs(2) => { - Some(ExitReason::MomentumStalled) - } _ => None, }; - if let Some(reason) = should_sell { - info!( - "[{}] EXECUTING SELL. Reason: {:?} {:.1}%", - mint, - reason, - price_change_pct * 100.0 - ); - - bot.executor.sell(mint, 100, PRIORITY, SLIPPAGE).await?; - - if let Some(mut pos) = self.positions.remove(mint) { - pos.trade.close(current_price, reason); - - bot.trade_log.lock().await.push(pos.trade); - } - - self.cleanup_and_unsubscribe(&bot, mint).await?; + if let Some(reason) = reason { + exits.push((mint.clone(), reason)); } - - return Ok(()); } // ------------------------------------------------------------- - // 2. Evaluate Potential Buys + // 2. Stall exits for ALL open positions. Stalled positions stop + // producing trades, so this must NOT be gated on the incoming + // trade's mint — any trade evaluates every position. + // ------------------------------------------------------------- + for (position_mint, pos) in self.positions.iter() { + if pos.last_high_time.elapsed() >= STALL_DURATION { + exits.push((position_mint.clone(), ExitReason::MomentumStalled)); + } + } + + // ------------------------------------------------------------- + // 3. Execute any pending exits. Duplicates are no-ops since the + // position is removed on the first exit. + // ------------------------------------------------------------- + for (exit_mint, reason) in exits { + self.execute_exit(&bot, &exit_mint, reason).await?; + } + + // ------------------------------------------------------------- + // 4. Evaluate Potential Buys // ------------------------------------------------------------- if let Some(tracker) = self.trackers.get_mut(mint) { let elapsed = tracker.created_at.elapsed(); @@ -200,6 +258,11 @@ impl Strategy for MomentumVelocityStrategy { } tracker.trade_count += 1; + + if tracker.first_price_sol.is_none() { + tracker.first_price_sol = Some(current_price); + } + match trade.tx_type { TradeType::Buy => { tracker.unique_buyers.insert(trade.trader.clone()); @@ -210,34 +273,64 @@ impl Strategy for MomentumVelocityStrategy { } } - let has_enough_buyers = tracker.unique_buyers.len() >= self.min_unique_buyers; - let has_volume_surge = tracker.net_sol_flow >= self.min_net_sol_flow; let v_sol = trade.v_sol_in_bonding_curve / 1_000_000_000.0; - let is_early_curve = v_sol < 60.0; + let price_change_pct = match tracker.first_price_sol { + Some(first_price) if first_price > 0.0 => { + (current_price - first_price) / first_price + } + _ => 0.0, + }; + + let has_enough_buyers = tracker.unique_buyers.len() >= MIN_UNIQUE_BUYERS; + let has_volume_surge = tracker.net_sol_flow >= MIN_NET_SOL_FLOW; + let has_min_trades = tracker.trade_count >= MIN_TRADE_COUNT; + let is_early_curve = v_sol < MAX_CURVE_SOL; + let is_buy_trade = matches!(trade.tx_type, TradeType::Buy); + let has_momentum = price_change_pct >= MIN_MOMENTUM_PCT; + let has_capacity = self.positions.len() < MAX_OPEN_POSITIONS; // Log detailed status of buy criteria evaluation on every trade debug!( - "[{}] Trade #{} ({:?}) | Buyers: {}/{} [{}] | Net Flow: {:.3}/{:.3} SOL [{}] | Curve SOL: {:.2} < 60 [{}]", + "[{}] Trade #{} ({:?}) | Buyers: {}/{} [{}] | Net Flow: {:.3}/{:.3} SOL [{}] | Trades: {}/{} [{}] | Curve SOL: {:.2} < {:.0} [{}] | Price Δ: {:.2}% >= {:.0}% [{}] | Capacity: {}/{} [{}]", mint, tracker.trade_count, trade.tx_type, tracker.unique_buyers.len(), - self.min_unique_buyers, + MIN_UNIQUE_BUYERS, if has_enough_buyers { "PASS" } else { "FAIL" }, tracker.net_sol_flow, - self.min_net_sol_flow, + MIN_NET_SOL_FLOW, if has_volume_surge { "PASS" } else { "FAIL" }, - trade.v_sol_in_bonding_curve, - if is_early_curve { "PASS" } else { "FAIL" } + tracker.trade_count, + MIN_TRADE_COUNT, + if has_min_trades { "PASS" } else { "FAIL" }, + v_sol, + MAX_CURVE_SOL, + if is_early_curve { "PASS" } else { "FAIL" }, + price_change_pct * 100.0, + MIN_MOMENTUM_PCT * 100.0, + if has_momentum { "PASS" } else { "FAIL" }, + self.positions.len(), + MAX_OPEN_POSITIONS, + if has_capacity { "PASS" } else { "FAIL" } ); - if has_enough_buyers && has_volume_surge && is_early_curve { + if has_capacity + && has_enough_buyers + && has_volume_surge + && has_min_trades + && is_buy_trade + && has_momentum + && is_early_curve + { info!( - "🚀 BUY SIGNAL TRIGGERED for {}! Unique Buyers: {}, Net Flow: {:.3} SOL, Curve SOL: {:.2}", + "🚀 BUY SIGNAL TRIGGERED for {}! Unique Buyers: {}, Net Flow: {:.3} SOL, Trades: {}, Curve SOL: {:.2}, Price Δ: {:.2}%", mint, tracker.unique_buyers.len(), tracker.net_sol_flow, - trade.v_sol_in_bonding_curve + tracker.trade_count, + trade.v_sol_in_bonding_curve, + price_change_pct * 100.0 ); bot.executor @@ -255,6 +348,7 @@ impl Strategy for MomentumVelocityStrategy { trade.v_sol_in_bonding_curve, ), highest_price_sol: current_price, + last_price_sol: current_price, last_high_time: Instant::now(), }, ); From 37bbbb8aac3958cd04d4aa840bca16e7d632b763 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Sat, 8 Aug 2026 00:06:03 +0200 Subject: [PATCH 19/19] Fix --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index f42f639..63f6fb1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ pub mod bot; pub mod data; -pub mod strategy; pub mod launchpad; +pub mod strategy; use std::sync::Arc; @@ -27,8 +27,6 @@ async fn try_shutdown_listener(bot: Arc, tx: watch::Sender) -> anyhow } "save" => { - log::info!("Saving trades"); - let now = Local::now(); let formatted_time = now.format("%m-%d-%H-%M").to_string(); @@ -51,6 +49,8 @@ async fn try_shutdown_listener(bot: Arc, tx: watch::Sender) -> anyhow _ => {} } + + line.clear(); } }