From b144226db8cf8210a660b25cc300f690405aee1e Mon Sep 17 00:00:00 2001 From: gallynaut Date: Mon, 29 Jun 2026 17:06:35 -0400 Subject: [PATCH 1/6] feat: update Phoenix Rise and Solana dependencies --- Cargo.lock | 2401 ++++++++--------- Cargo.toml | 16 +- agents/tool-catalog.json | 2 +- vulcan-lib/Cargo.toml | 4 +- vulcan-lib/src/auth.rs | 4 +- vulcan-lib/src/commands/account.rs | 8 +- vulcan-lib/src/commands/auth.rs | 2 +- vulcan-lib/src/commands/conditional_orders.rs | 26 +- vulcan-lib/src/commands/margin.rs | 16 +- vulcan-lib/src/commands/market.rs | 16 +- vulcan-lib/src/commands/portfolio.rs | 2 +- vulcan-lib/src/commands/position.rs | 29 +- vulcan-lib/src/commands/setup.rs | 2 +- vulcan-lib/src/commands/trade.rs | 68 +- vulcan-lib/src/commands/trader_state.rs | 29 +- vulcan-lib/src/context.rs | 46 +- vulcan-lib/src/crypto/encryption.rs | 13 +- vulcan-lib/src/history/mod.rs | 2 +- vulcan-lib/src/mcp/server.rs | 2 +- vulcan-lib/src/mcp/session_wallet.rs | 2 +- vulcan-lib/src/paper/mod.rs | 2 +- vulcan-lib/src/strategy/execution.rs | 2 +- vulcan-lib/src/strategy/grid.rs | 8 +- vulcan-lib/src/wallet/keypair.rs | 3 +- vulcan-lib/src/wallet/signer.rs | 10 +- vulcan-lib/src/watch.rs | 2 +- vulcan/Cargo.toml | 2 +- 27 files changed, 1232 insertions(+), 1487 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a0cd965..01db264 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # 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" @@ -43,16 +53,31 @@ dependencies = [ "subtle", ] +[[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 = "2.3.13" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a2c365c0245cbb8959de725fc2b44c754b673fdf34c9a7f9d4a25c35a7bf1" +checksum = "bfe79fc4c114c51ea8461d829bb49853a21a76c7c8ef20e9041b071558f628ce" dependencies = [ "ahash 0.8.12", "solana-epoch-schedule", - "solana-hash", - "solana-pubkey", + "solana-hash 3.1.0", + "solana-pubkey 3.0.0", "solana-sha256-hasher", "solana-svm-feature-set", ] @@ -182,123 +207,6 @@ dependencies = [ "password-hash", ] -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", - "itertools", - "num-traits", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", - "derivative", - "digest 0.10.7", - "itertools", - "num-bigint", - "num-traits", - "paste", - "rustc_version", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive", - "ark-std", - "digest 0.10.7", - "num-bigint", -] - -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - [[package]] name = "arrayref" version = "0.3.9" @@ -311,6 +219,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + [[package]] name = "async-compression" version = "0.4.41" @@ -340,17 +254,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.5.0" @@ -608,18 +511,18 @@ dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", "h2 0.3.27", - "h2 0.4.13", + "h2 0.4.15", "http 0.2.12", "http 1.4.0", "http-body 0.4.6", "hyper 0.14.32", - "hyper 1.8.1", + "hyper 1.10.1", "hyper-rustls 0.24.2", "hyper-rustls 0.27.7", "hyper-util", "pin-project-lite", "rustls 0.21.12", - "rustls 0.23.37", + "rustls 0.23.41", "rustls-native-certs", "rustls-pki-types", "tokio", @@ -771,12 +674,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - [[package]] name = "base64" version = "0.22.1" @@ -828,9 +725,6 @@ name = "bitflags" version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" -dependencies = [ - "serde_core", -] [[package]] name = "bitvec" @@ -868,15 +762,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -895,40 +780,17 @@ dependencies = [ "hybrid-array", ] -[[package]] -name = "borsh" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" -dependencies = [ - "borsh-derive 0.10.4", - "hashbrown 0.13.2", -] - [[package]] name = "borsh" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfd1e3f8955a5d7de9fab72fc8373fade9fb8a703968cb200ae3dc6cf08e185a" dependencies = [ - "borsh-derive 1.6.1", + "borsh-derive", "bytes", "cfg_aliases", ] -[[package]] -name = "borsh-derive" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" -dependencies = [ - "borsh-derive-internal", - "borsh-schema-derive-internal", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - [[package]] name = "borsh-derive" version = "1.6.1" @@ -936,34 +798,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfcfdc083699101d5a7965e49925975f2f55060f94f9a05e7187be95d530ca59" dependencies = [ "once_cell", - "proc-macro-crate 3.5.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.117", ] -[[package]] -name = "borsh-derive-internal" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "brotli" version = "8.0.2" @@ -1218,6 +1058,19 @@ dependencies = [ "windows-sys 0.59.0", ] +[[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" @@ -1259,35 +1112,14 @@ checksum = "75984efb6ed102a0d42db99afb6c1948f0380d1d91808d5529916e6c08b49d8d" [[package]] name = "console" -version = "0.15.11" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ "encode_unicode", "libc", - "once_cell", "unicode-width", - "windows-sys 0.59.0", -] - -[[package]] -name = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if", - "wasm-bindgen", -] - -[[package]] -name = "console_log" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" -dependencies = [ - "log", - "web-sys", + "windows-sys 0.61.2", ] [[package]] @@ -1422,16 +1254,6 @@ dependencies = [ "hybrid-array", ] -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "ctr" version = "0.9.2" @@ -1450,19 +1272,6 @@ dependencies = [ "cmov", ] -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -1476,6 +1285,7 @@ dependencies = [ "fiat-crypto", "rand_core 0.6.4", "rustc_version", + "serde", "subtle", "zeroize", ] @@ -1558,26 +1368,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" @@ -1665,19 +1455,10 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature 2.2.0", + "signature", "spki", ] -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - [[package]] name = "ed25519" version = "2.2.3" @@ -1685,21 +1466,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "signature 2.2.0", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", + "signature", ] [[package]] @@ -1708,8 +1475,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ - "curve25519-dalek 4.1.3", - "ed25519 2.2.3", + "curve25519-dalek", + "ed25519", + "rand_core 0.6.4", "serde", "sha2 0.10.9", "subtle", @@ -1718,12 +1486,12 @@ dependencies = [ [[package]] name = "ed25519-dalek-bip32" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" +checksum = "6b49a684b133c4980d7ee783936af771516011c8cd15f429dbda77245e282f03" dependencies = [ "derivation-path", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "hmac 0.12.1", "sha2 0.10.9", ] @@ -1770,19 +1538,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - [[package]] name = "equivalent" version = "1.0.2" @@ -1835,27 +1590,27 @@ checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "five8" -version = "0.2.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75b8549488b4715defcb0d8a8a1c1c76a80661b5fa106b4ca0e7fce59d7d875" +checksum = "23f76610e969fa1784327ded240f1e28a3fd9520c9cec93b636fcf62dd37f772" dependencies = [ "five8_core", ] [[package]] name = "five8_const" -version = "0.1.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26dec3da8bc3ef08f2c04f61eab298c3ab334523e55f076354d6d6f613799a7b" +checksum = "1a0f1728185f277989ca573a402716ae0beaaea3f76a8ff87ef9dd8fb19436c5" dependencies = [ "five8_core", ] [[package]] name = "five8_core" -version = "0.1.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2551bf44bc5f776c15044b9b94153a00198be06743e262afaaa61f11ac7523a5" +checksum = "059c31d7d36c43fe39d89e55711858b4da8be7eb6dabac23c7289b1a19489406" [[package]] name = "fixed" @@ -2028,27 +1783,14 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] @@ -2092,27 +1834,27 @@ dependencies = [ [[package]] name = "google-cloud-auth" -version = "1.8.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27e658fc9f8b6bdf9a5c816ebca6dd6bcd32f8550e5c6580652b2c0eac1980f6" +checksum = "a300d4011cb53573eafe2419630d303ced54aab6c194a6d9e4156de375800372" dependencies = [ "async-trait", "aws-lc-rs", - "base64 0.22.1", + "base64", "bytes", "chrono", "google-cloud-gax", "hex", - "hmac 0.12.1", + "hmac 0.13.0", "http 1.4.0", "jsonwebtoken", - "reqwest 0.13.3", + "reqwest 0.13.4", "rustc_version", - "rustls 0.23.37", + "rustls 0.23.41", "rustls-pki-types", "serde", "serde_json", - "sha2 0.10.9", + "sha2 0.11.0", "thiserror 2.0.18", "time", "tokio", @@ -2121,11 +1863,10 @@ dependencies = [ [[package]] name = "google-cloud-gax" -version = "1.9.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dc387965cc2efc28d73896d6707125815c16792c23c33a0c67794f3d6e31cc8" +checksum = "4f60f45dd97ff91cedfcb6b2b9f860d3d84739386c3557027687c52cc0e698fd" dependencies = [ - "base64 0.22.1", "bytes", "futures", "google-cloud-rpc", @@ -2141,9 +1882,9 @@ dependencies = [ [[package]] name = "google-cloud-gax-internal" -version = "0.7.11" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d462b4fcee5f495bfb58edbf4a9250c230a1079d410bdcb8505bc5f713dcee" +checksum = "78e0d5b25e5714321efc3ea48a1457bcd943ba85fe7a0e80e97d989f3c9aea17" dependencies = [ "bytes", "futures", @@ -2152,14 +1893,14 @@ dependencies = [ "google-cloud-rpc", "http 1.4.0", "http-body-util", - "hyper 1.8.1", + "hyper 1.10.1", "lazy_static", "opentelemetry", "opentelemetry-semantic-conventions", "opentelemetry_sdk", "percent-encoding", "pin-project", - "reqwest 0.13.3", + "reqwest 0.13.4", "rustc_version", "serde", "serde_json", @@ -2172,9 +1913,9 @@ dependencies = [ [[package]] name = "google-cloud-iam-v1" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ce870ac18f3e0a474000cd57eab8bf3c64af8b5ed820468df8612182709c9a" +checksum = "70a245c548c002e22d1644e88d9b7d6c32183b335e63510a1bb8580045c3282d" dependencies = [ "async-trait", "bytes", @@ -2190,9 +1931,9 @@ dependencies = [ [[package]] name = "google-cloud-kms-v1" -version = "1.7.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8301672f4d7f4207710cf85d224d77fd922c8d3d1677474cb1b468e0b3c9050" +checksum = "365c6e9243fb50ad929fa959c916e4816e5bb2999ca8aa38d9a10e5fbb31945b" dependencies = [ "async-trait", "bytes", @@ -2211,9 +1952,9 @@ dependencies = [ [[package]] name = "google-cloud-location" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9929c1cec55461f86983fde945f08ec35d2a2fbb19fa239a7a9a1fe8d131f10e" +checksum = "20a6d8ac73bb9d78fff74be261bf5b17dba4a49a12b41cd3b5abbc173c0771e4" dependencies = [ "async-trait", "bytes", @@ -2228,9 +1969,9 @@ dependencies = [ [[package]] name = "google-cloud-longrunning" -version = "1.8.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebab215997c51f786852840fec8c76174b8a4af96d08e5fc1569742805baab09" +checksum = "6de120149ea50fd0cccc2d3dfb863bc23e398ead386fa59c5d8f8f6004ced01c" dependencies = [ "async-trait", "bytes", @@ -2246,9 +1987,9 @@ dependencies = [ [[package]] name = "google-cloud-lro" -version = "1.4.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a4f93a1ec8e6e5448899877ea6021e0f5d06e6b08ccd9b0bd99bc837ca357b" +checksum = "f40d4311479512e408b67777cf497dac6e41fbe8c96730416ed9d47855584b29" dependencies = [ "google-cloud-gax", "google-cloud-longrunning", @@ -2256,6 +1997,7 @@ dependencies = [ "google-cloud-wkt", "serde", "tokio", + "tracing", ] [[package]] @@ -2286,11 +2028,11 @@ dependencies = [ [[package]] name = "google-cloud-wkt" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5daa3084991800bcc5333d7e77bb19259a02b34ee35f35c27b49d602732306e" +checksum = "88e0186e2221bf82c5296500251b4650b111172c324984159a0de9f6bcaa18a5" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "serde", "serde_json", @@ -2332,9 +2074,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.13" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" dependencies = [ "atomic-waker", "bytes", @@ -2361,21 +2103,21 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "hash32" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" dependencies = [ - "ahash 0.7.8", + "byteorder", ] [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.8.12", + "ahash 0.7.8", ] [[package]] @@ -2399,15 +2141,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hex" version = "0.4.3" @@ -2423,16 +2156,6 @@ dependencies = [ "hmac 0.12.1", ] -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.12.1" @@ -2451,17 +2174,6 @@ dependencies = [ "digest 0.11.3", ] -[[package]] -name = "hmac-drbg" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" -dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac 0.8.1", -] - [[package]] name = "http" version = "0.2.12" @@ -2529,12 +2241,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "humantime" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" - [[package]] name = "hybrid-array" version = "0.4.10" @@ -2570,21 +2276,20 @@ dependencies = [ [[package]] name = "hyper" -version = "1.8.1" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" dependencies = [ "atomic-waker", "bytes", "futures-channel", "futures-core", - "h2 0.4.13", + "h2 0.4.15", "http 1.4.0", "http-body 1.0.1", "httparse", "itoa", "pin-project-lite", - "pin-utils", "smallvec", "tokio", "want", @@ -2612,9 +2317,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ "http 1.4.0", - "hyper 1.8.1", + "hyper 1.10.1", "hyper-util", - "rustls 0.23.37", + "rustls 0.23.41", "rustls-native-certs", "rustls-pki-types", "tokio", @@ -2629,7 +2334,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.8.1", + "hyper 1.10.1", "hyper-util", "pin-project-lite", "tokio", @@ -2644,7 +2349,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.8.1", + "hyper 1.10.1", "hyper-util", "native-tls", "tokio", @@ -2658,13 +2363,13 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-channel", "futures-util", "http 1.4.0", "http-body 1.0.1", - "hyper 1.8.1", + "hyper 1.10.1", "ipnet", "libc", "percent-encoding", @@ -2840,14 +2545,14 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.11" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" +checksum = "993f007684f2e9727160da8b960ec161264703bfd1af084fd2e34d040c9a0dd4" dependencies = [ "console", - "number_prefix", "portable-atomic", "unicode-width", + "unit-prefix", "web-time", ] @@ -2884,9 +2589,9 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itertools" -version = "0.10.5" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -2904,7 +2609,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" dependencies = [ "cfg-if", - "combine", + "combine 4.6.7", "jni-macros", "jni-sys", "log", @@ -2990,8 +2695,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eba32bfb4ffdeaca3e34431072faf01745c9b26d25504aa7a6cf5684334fc4fc" dependencies = [ "aws-lc-rs", - "base64 0.22.1", - "ed25519-dalek 2.2.0", + "base64", + "ed25519-dalek", "getrandom 0.2.17", "hmac 0.12.1", "js-sys", @@ -3003,11 +2708,25 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "signature 2.2.0", + "signature", "simple_asn1", "zeroize", ] +[[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 = "kand" version = "0.2.2" @@ -3063,54 +2782,6 @@ dependencies = [ "libc", ] -[[package]] -name = "libsecp256k1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" -dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "typenum", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" -dependencies = [ - "libsecp256k1-core", -] - [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -3166,21 +2837,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] -name = "memmap2" -version = "0.5.10" +name = "memoffset" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ - "libc", + "autocfg", ] [[package]] -name = "memoffset" -version = "0.9.1" +name = "merlin" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" dependencies = [ - "autocfg", + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", ] [[package]] @@ -3206,7 +2880,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "windows-sys 0.61.2", ] @@ -3325,18 +2999,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ - "proc-macro-crate 3.5.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.117", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "once_cell" version = "1.21.4" @@ -3401,9 +3069,9 @@ dependencies = [ [[package]] name = "opentelemetry" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84bcd6ae87133e903af7ef497404dda70c60d0ea14895fc8a5e6722754fc2a0" +checksum = "b0142c63252a9e054e68a4c61a5778f7b14f576274d593f8ce883d191a099682" dependencies = [ "futures-core", "futures-sink", @@ -3415,21 +3083,22 @@ dependencies = [ [[package]] name = "opentelemetry-semantic-conventions" -version = "0.31.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e62e29dfe041afb8ed2a6c9737ab57db4907285d999ef8ad3a59092a36bdc846" +checksum = "c913ac17a6c451661ee255f4625d143e51647ae78ebd969b75e41c4442f4fe47" [[package]] name = "opentelemetry_sdk" -version = "0.31.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ae4f5991976fd48df6d843de219ca6d31b01daaab2dad5af2badeded372bd" +checksum = "9b59f80e1ac4d5ff7a2db8fb6c80badb7f0f3f858211fba08dd9aaec750894f9" dependencies = [ "futures-channel", "futures-executor", "futures-util", "opentelemetry", "percent-encoding", + "portable-atomic", "rand 0.9.2", "thiserror 2.0.18", ] @@ -3504,12 +3173,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "pastey" version = "0.1.1" @@ -3518,9 +3181,9 @@ checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" [[package]] name = "pastey" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b867cad97c0791bbd3aaa6472142568c6c9e8f71937e98379f584cfb0cf35bec" +checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4" [[package]] name = "pbkdf2" @@ -3537,7 +3200,7 @@ version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" dependencies = [ - "base64 0.22.1", + "base64", "serde_core", ] @@ -3558,34 +3221,65 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "phoenix-rise" -version = "0.1.14" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c02bbd17914c812b9621097dbcab6ee13e03be2af85573d9cc8b281ec9fc076" +dependencies = [ + "phoenix-rise-accounts", + "phoenix-rise-api", + "phoenix-rise-core", + "phoenix-rise-ix", + "phoenix-rise-math", + "phoenix-rise-types", +] + +[[package]] +name = "phoenix-rise-accounts" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c25cc44f57651a362e7984b47acd1f50bf72b7106cabf9639f3fb2b4c2571002" +dependencies = [ + "borsh", + "bs58", + "bytemuck", + "phoenix-rise-math", + "serde", + "sha2-const-stable", + "solana-pubkey 3.0.0", + "thiserror 2.0.18", +] + +[[package]] +name = "phoenix-rise-api" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e6f701edcb1f2e8c5b4c2e7c3675000ecb73ef2e463639dd661020e4db7551" +checksum = "ad0ab7eda4d89bd429abc67c4f5d51f5ef035846541005f26fe72e1d3d23a9fc" dependencies = [ "async-trait", - "base64 0.22.1", - "borsh 1.6.1", + "base64", "bs58", "bytemuck", "chrono", - "fixed", + "ed25519-dalek", "futures-util", "parking_lot", - "pastey 0.1.1", + "phoenix-rise-accounts", + "phoenix-rise-ix", + "phoenix-rise-math", + "phoenix-rise-types", "rand 0.10.1", "reqwest 0.12.28", "rust_decimal", "serde", "serde_json", "serde_urlencoded", - "serde_with", - "sha2 0.10.9", - "sha2-const-stable", "solana-compute-budget-interface", "solana-instruction", - "solana-pubkey", + "solana-keypair", + "solana-pubkey 3.0.0", "solana-rpc-client", "solana-rpc-client-api", + "solana-signer", "solana-transaction", "solana-transaction-error", "solana-transaction-status-client-types", @@ -3597,6 +3291,74 @@ dependencies = [ "url", ] +[[package]] +name = "phoenix-rise-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680cf1d81949048ac7f1a98b8878c0667ce13d6ade402ec982e9a4ba70667080" +dependencies = [ + "base64", + "bytemuck", + "phoenix-rise-accounts", + "phoenix-rise-api", + "phoenix-rise-ix", + "phoenix-rise-math", + "solana-compute-budget-interface", + "solana-instruction", + "solana-pubkey 3.0.0", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-transaction", + "solana-transaction-error", + "solana-transaction-status-client-types", + "thiserror 2.0.18", +] + +[[package]] +name = "phoenix-rise-ix" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9581b168bc81cffc3e4c2c25b0678b3e5a7fcf7090e9a97a3aa8581dd904c348" +dependencies = [ + "borsh", + "bytemuck", + "phoenix-rise-accounts", + "sha2 0.10.9", + "sha2-const-stable", + "solana-instruction", + "solana-pubkey 3.0.0", + "thiserror 2.0.18", +] + +[[package]] +name = "phoenix-rise-math" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a68c74b1bd9d5ca125021620f44752f8ef12348d981a6210ac41c432cb546f35" +dependencies = [ + "borsh", + "bytemuck", + "fixed", + "pastey 0.1.1", + "rand 0.10.1", + "rust_decimal", + "sha2-const-stable", + "solana-pubkey 3.0.0", + "thiserror 2.0.18", +] + +[[package]] +name = "phoenix-rise-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fdce222fa3532e7aa1994944d089957192ddd71a265ed38b06ce1e5798f4b26" +dependencies = [ + "chrono", + "serde", + "serde_json", + "serde_with", +] + [[package]] name = "pin-project" version = "1.1.13" @@ -3717,15 +3479,6 @@ dependencies = [ "elliptic-curve", ] -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml 0.5.11", -] - [[package]] name = "proc-macro-crate" version = "3.5.0" @@ -3810,7 +3563,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.37", + "rustls 0.23.41", "socket2 0.6.3", "thiserror 2.0.18", "tokio", @@ -3831,7 +3584,7 @@ dependencies = [ "rand 0.9.2", "ring", "rustc-hash", - "rustls 0.23.37", + "rustls 0.23.41", "rustls-pki-types", "slab", "thiserror 2.0.18", @@ -3881,19 +3634,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -3926,16 +3666,6 @@ dependencies = [ "rand_core 0.10.1", ] -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -3956,15 +3686,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - [[package]] name = "rand_core" version = "0.6.4" @@ -3989,15 +3710,6 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_xorshift" version = "0.4.0" @@ -4097,17 +3809,17 @@ version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "encoding_rs", "futures-channel", "futures-core", "futures-util", - "h2 0.4.13", + "h2 0.4.15", "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.8.1", + "hyper 1.10.1", "hyper-rustls 0.27.7", "hyper-tls", "hyper-util", @@ -4118,7 +3830,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.37", + "rustls 0.23.41", "rustls-pki-types", "serde", "serde_json", @@ -4139,17 +3851,17 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-core", "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.8.1", + "hyper 1.10.1", "hyper-rustls 0.27.7", "hyper-util", "js-sys", @@ -4157,7 +3869,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.37", + "rustls 0.23.41", "rustls-pki-types", "rustls-platform-verifier", "serde", @@ -4250,10 +3962,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2231b2c085b371c01bc90c0e6c1cab8834711b6394533375bdbf870b0166d419" dependencies = [ "async-trait", - "base64 0.22.1", + "base64", "chrono", "futures", - "pastey 0.2.1", + "pastey 0.2.3", "pin-project-lite", "rmcp-macros", "schemars 1.2.1", @@ -4302,7 +4014,7 @@ dependencies = [ "pkcs1", "pkcs8", "rand_core 0.6.4", - "signature 2.2.0", + "signature", "spki", "subtle", "zeroize", @@ -4315,7 +4027,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ce901f9a19d251159075a4c37af514c3b8ef99c22e02dd8c19161cf397ee94a" dependencies = [ "arrayvec", - "borsh 1.6.1", + "borsh", "bytes", "num-traits", "rand 0.8.5", @@ -4325,6 +4037,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "rustc-demangle" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" + [[package]] name = "rustc-hash" version = "2.1.2" @@ -4367,9 +4085,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.37" +version = "0.23.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" +checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f" dependencies = [ "aws-lc-rs", "log", @@ -4414,7 +4132,7 @@ dependencies = [ "jni", "log", "once_cell", - "rustls 0.23.37", + "rustls 0.23.41", "rustls-native-certs", "rustls-platform-verifier-android", "rustls-webpki 0.103.10", @@ -4659,9 +4377,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "indexmap 2.13.0", "itoa", @@ -4698,7 +4416,7 @@ version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" dependencies = [ - "base64 0.22.1", + "base64", "chrono", "hex", "indexmap 1.9.3", @@ -4734,19 +4452,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures 0.2.17", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha2" version = "0.10.9" @@ -4801,31 +4506,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] -name = "signal-hook" -version = "0.3.18" +name = "signal-hook-registry" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" -dependencies = [ - "errno", + "errno", "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - [[package]] name = "signature" version = "2.2.0" @@ -4910,9 +4599,9 @@ dependencies = [ [[package]] name = "solana-account" -version = "2.2.1" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f949fe4edaeaea78c844023bfc1c898e0b1f5a100f8a8d2d0f85d0a7b090258" +checksum = "efc0ed36decb689413b9da5d57f2be49eea5bebb3cf7897015167b0c4336e731" dependencies = [ "bincode", "serde", @@ -4920,46 +4609,120 @@ dependencies = [ "serde_derive", "solana-account-info", "solana-clock", + "solana-instruction-error", + "solana-pubkey 4.2.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", + "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-pubkey", + "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.18", + "zstd", ] [[package]] name = "solana-account-decoder-client-types" -version = "2.3.13" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5519e8343325b707f17fbed54fcefb325131b692506d0af9e08a539d15e4f8cf" +checksum = "c200fb0019770f6ccf869a9b71653d37b76a633114d79176eedea6931c09cc7c" dependencies = [ - "base64 0.22.1", + "base64", "bs58", "serde", - "serde_derive", "serde_json", "solana-account", - "solana-pubkey", + "solana-pubkey 3.0.0", "zstd", ] [[package]] name = "solana-account-info" -version = "2.3.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8f5152a288ef1912300fc6efa6c2d1f9bb55d9398eb6c72326360b8063987da" +checksum = "a9cf16495d9eb53e3d04e72366a33bb1c20c24e78c171d8b8f5978357b63ae95" dependencies = [ "bincode", - "serde", + "serde_core", + "solana-address 2.6.1", "solana-program-error", "solana-program-memory", - "solana-pubkey", +] + +[[package]] +name = "solana-address" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2ecac8e1b7f74c2baa9e774c42817e3e75b20787134b76cc4d45e8a604488f5" +dependencies = [ + "solana-address 2.6.1", +] + +[[package]] +name = "solana-address" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39c93e262f671bf402e1040e4a7e40b05d81da5956c7681948c975a0997517bb" +dependencies = [ + "borsh", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "five8", + "five8_const", + "rand 0.9.2", + "serde", + "serde_derive", + "sha2-const-stable", + "solana-atomic-u64", + "solana-define-syscall 5.1.0", + "solana-program-error", + "solana-sanitize", + "solana-sha256-hasher", + "wincode 0.5.5", ] [[package]] name = "solana-address-lookup-table-interface" -version = "2.2.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1673f67efe870b64a65cb39e6194be5b26527691ce5922909939961a6e6b395" +checksum = "5e8df0b083c10ce32490410f3795016b1b5d9b4d094658c0a5e496753645b7cd" dependencies = [ "bincode", "bytemuck", @@ -4967,207 +4730,165 @@ dependencies = [ "serde_derive", "solana-clock", "solana-instruction", - "solana-pubkey", + "solana-instruction-error", + "solana-pubkey 4.2.0", "solana-sdk-ids", "solana-slot-hashes", ] [[package]] name = "solana-atomic-u64" -version = "2.2.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52e52720efe60465b052b9e7445a01c17550666beec855cce66f44766697bc2" +checksum = "085db4906d89324cef2a30840d59eaecf3d4231c560ec7c9f6614a93c652f501" dependencies = [ "parking_lot", ] [[package]] name = "solana-big-mod-exp" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75db7f2bbac3e62cfd139065d15bcda9e2428883ba61fc8d27ccb251081e7567" +checksum = "30c80fb6d791b3925d5ec4bf23a7c169ef5090c013059ec3ed7d0b2c04efa085" dependencies = [ "num-bigint", "num-traits", - "solana-define-syscall", -] - -[[package]] -name = "solana-bincode" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a3787b8cf9c9fe3dd360800e8b70982b9e5a8af9e11c354b6665dd4a003adc" -dependencies = [ - "bincode", - "serde", - "solana-instruction", + "solana-define-syscall 3.0.0", ] [[package]] name = "solana-blake3-hasher" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0801e25a1b31a14494fc80882a036be0ffd290efc4c2d640bfcca120a4672" +checksum = "7116e1d942a2432ca3f514625104757ab8a56233787e95144c93950029e31176" dependencies = [ "blake3", - "solana-define-syscall", - "solana-hash", - "solana-sanitize", -] - -[[package]] -name = "solana-bn254" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4420f125118732833f36facf96a27e7b78314b2d642ba07fa9ffdacd8d79e243" -dependencies = [ - "ark-bn254", - "ark-ec", - "ark-ff", - "ark-serialize", - "bytemuck", - "solana-define-syscall", - "thiserror 2.0.18", + "solana-define-syscall 4.0.1", + "solana-hash 4.4.0", ] [[package]] name = "solana-borsh" -version = "2.2.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718333bcd0a1a7aed6655aa66bef8d7fb047944922b2d3a18f49cbc13e73d004" +checksum = "c04abbae16f57178a163125805637b8a076175bb5c0002fb04f4792bea901cf7" dependencies = [ - "borsh 0.10.4", - "borsh 1.6.1", -] - -[[package]] -name = "solana-client-traits" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83f0071874e629f29e0eb3dab8a863e98502ac7aba55b7e0df1803fc5cac72a7" -dependencies = [ - "solana-account", - "solana-commitment-config", - "solana-epoch-info", - "solana-hash", - "solana-instruction", - "solana-keypair", - "solana-message", - "solana-pubkey", - "solana-signature", - "solana-signer", - "solana-system-interface", - "solana-transaction", - "solana-transaction-error", + "borsh", ] [[package]] name = "solana-clock" -version = "2.2.3" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8584296123df8fe229b95e2ebfd37ae637fe9db9b7d4dd677ac5a78e80dbfce" +checksum = "f0acdace90d96e2c9e70d681465b4fe888b6bcf27c354ae9774e9f8a3b72923d" dependencies = [ "serde", "serde_derive", + "solana-get-sysvar", "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", ] [[package]] -name = "solana-cluster-type" -version = "2.2.1" +name = "solana-commitment-config" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ace9fea2daa28354d107ea879cff107181d85cd4e0f78a2bedb10e1a428c97e" +checksum = "1517aa49dcfa9cb793ef90e7aac81346d62ca4a546bb1a754030a033e3972e1c" dependencies = [ "serde", "serde_derive", - "solana-hash", ] [[package]] -name = "solana-commitment-config" -version = "2.2.1" +name = "solana-compute-budget-interface" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac49c4dde3edfa832de1697e9bcdb7c3b3f7cb7a1981b7c62526c8bb6700fb73" +checksum = "8292c436b269ad23cecc8b24f7da3ab07ca111661e25e00ce0e1d22771951ab9" dependencies = [ - "serde", - "serde_derive", + "solana-instruction", + "solana-sdk-ids", ] [[package]] -name = "solana-compute-budget-interface" -version = "2.2.2" +name = "solana-config-interface" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8432d2c4c22d0499aa06d62e4f7e333f81777b3d7c96050ae9e5cb71a8c3aee4" +checksum = "63e401ae56aed512821cc7a0adaa412ff97fecd2dff4602be7b1330d2daec0c4" dependencies = [ - "borsh 1.6.1", + "bincode", "serde", "serde_derive", + "solana-account", "solana-instruction", + "solana-pubkey 3.0.0", "solana-sdk-ids", + "solana-short-vec", + "solana-system-interface", ] [[package]] name = "solana-cpi" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dc71126edddc2ba014622fc32d0f5e2e78ec6c5a1e0eb511b85618c09e9ea11" +checksum = "4dea26709d867aada85d0d3617db0944215c8bb28d3745b912de7db13a23280c" dependencies = [ "solana-account-info", - "solana-define-syscall", + "solana-define-syscall 4.0.1", "solana-instruction", "solana-program-error", - "solana-pubkey", + "solana-pubkey 4.2.0", "solana-stable-layout", ] [[package]] -name = "solana-decode-error" -version = "2.3.0" +name = "solana-curve25519" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c781686a18db2f942e70913f7ca15dc120ec38dcab42ff7557db2c70c625a35" +checksum = "5aff7432cdf2ec6a44ac06b4d64d2ee006f6c0066d6456e032a7fe25be40cd5c" dependencies = [ - "num-traits", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "solana-define-syscall 3.0.0", + "subtle", + "thiserror 2.0.18", ] [[package]] name = "solana-define-syscall" -version = "2.3.0" +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.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae3e2abcf541c8122eafe9a625d4d194b4023c20adde1e251f94e056bb1aee2" +checksum = "21e14a4f604117f379840956a8fc8695e4c84f5b0ebed192f31f60d9b85d581d" [[package]] name = "solana-derivation-path" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "939756d798b25c5ec3cca10e06212bdca3b1443cb9bb740a38124f58b258737b" +checksum = "ff71743072690fdbdfcdc37700ae1cb77485aaad49019473a81aee099b1e0b8c" dependencies = [ "derivation-path", "qstring", "uriparse", ] -[[package]] -name = "solana-ed25519-program" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feafa1691ea3ae588f99056f4bdd1293212c7ece28243d7da257c443e84753" -dependencies = [ - "bytemuck", - "bytemuck_derive", - "ed25519-dalek 1.0.1", - "solana-feature-set", - "solana-instruction", - "solana-precompile-error", - "solana-sdk-ids", -] - [[package]] name = "solana-epoch-info" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ef6f0b449290b0b9f32973eefd95af35b01c5c0c34c569f936c34c5b20d77b" +checksum = "e093c84f6ece620a6b10cd036574b0cd51944231ab32d81f80f76d54aba833e6" dependencies = [ "serde", "serde_derive", @@ -5175,13 +4896,14 @@ dependencies = [ [[package]] name = "solana-epoch-rewards" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b575d3dd323b9ea10bb6fe89bf6bf93e249b215ba8ed7f68f1a3633f384db7" +checksum = "daf7eb4986b0b1d6f562b21f75a836f1a6df6e00c275efcef50aab5c144dc59e" dependencies = [ "serde", "serde_derive", - "solana-hash", + "solana-get-sysvar", + "solana-hash 4.4.0", "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", @@ -5189,44 +4911,56 @@ dependencies = [ [[package]] name = "solana-epoch-rewards-hasher" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c5fd2662ae7574810904585fd443545ed2b568dbd304b25a31e79ccc76e81b" +checksum = "1ee8beac9bff4db9225e57d532d169b0be5e447f1e6601a2f50f27a01bf5518f" dependencies = [ "siphasher", - "solana-hash", - "solana-pubkey", + "solana-address 2.6.1", + "solana-hash 4.4.0", ] [[package]] name = "solana-epoch-schedule" -version = "2.2.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fce071fbddecc55d727b1d7ed16a629afe4f6e4c217bc8d00af3b785f6f67ed" +checksum = "8116e6ffa6002237d5ab5edcbda17f9ba66b6742c45a89c9fb40a94dbacd4c1d" 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.1.0", + "solana-pubkey 4.2.0", +] + [[package]] name = "solana-example-mocks" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84461d56cbb8bb8d539347151e0525b53910102e4bced875d49d5139708e39d3" +checksum = "978855d164845c1b0235d4b4d101cadc55373fffaf0b5b6cfa2194d25b2ed658" dependencies = [ "serde", "serde_derive", "solana-address-lookup-table-interface", "solana-clock", - "solana-hash", + "solana-hash 3.1.0", "solana-instruction", "solana-keccak-hasher", "solana-message", "solana-nonce", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-sdk-ids", "solana-system-interface", "thiserror 2.0.18", @@ -5234,42 +4968,22 @@ dependencies = [ [[package]] name = "solana-feature-gate-interface" -version = "2.2.2" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f5c5382b449e8e4e3016fb05e418c53d57782d8b5c30aa372fc265654b956d" +checksum = "75ca9b5cbb6f500f7fd73db5bd95640f71a83f04d6121a0e59a43b202dca2731" dependencies = [ - "bincode", "serde", "serde_derive", - "solana-account", - "solana-account-info", - "solana-instruction", "solana-program-error", - "solana-pubkey", - "solana-rent", + "solana-pubkey 4.2.0", "solana-sdk-ids", - "solana-system-interface", -] - -[[package]] -name = "solana-feature-set" -version = "2.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93b93971e289d6425f88e6e3cb6668c4b05df78b3c518c249be55ced8efd6b6d" -dependencies = [ - "ahash 0.8.12", - "lazy_static", - "solana-epoch-schedule", - "solana-hash", - "solana-pubkey", - "solana-sha256-hasher", ] [[package]] name = "solana-fee-calculator" -version = "2.2.1" +version = "3.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89bc408da0fb3812bc3008189d148b4d3e08252c79ad810b245482a3f70cd8d" +checksum = "ef67f01cc6a0c72e99a08d0d484683f995de4c80e9568728fa77d1537f9b7e09" dependencies = [ "log", "serde", @@ -5278,79 +4992,61 @@ dependencies = [ [[package]] name = "solana-fee-structure" -version = "2.3.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33adf673581c38e810bf618f745bf31b683a0a4a4377682e6aaac5d9a058dd4e" +checksum = "5e2abdb1223eea8ec64136f39cb1ffcf257e00f915c957c35c0dd9e3f4e700b0" dependencies = [ "serde", "serde_derive", - "solana-message", - "solana-native-token", ] [[package]] -name = "solana-genesis-config" -version = "2.3.0" +name = "solana-get-sysvar" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3725085d47b96d37fef07a29d78d2787fc89a0b9004c66eed7753d1e554989f" +checksum = "ef3bc859fc036ed490146793557386cbfae614ebba4adc704c37d94350824ed4" dependencies = [ - "bincode", - "chrono", - "memmap2", - "serde", - "serde_derive", - "solana-account", - "solana-clock", - "solana-cluster-type", - "solana-epoch-schedule", - "solana-fee-calculator", - "solana-hash", - "solana-inflation", - "solana-keypair", - "solana-logger", - "solana-poh-config", - "solana-pubkey", - "solana-rent", - "solana-sdk-ids", - "solana-sha256-hasher", - "solana-shred-version", - "solana-signer", - "solana-time-utils", + "solana-address 2.6.1", + "solana-define-syscall 5.1.0", + "solana-program-error", ] [[package]] name = "solana-hard-forks" -version = "2.2.1" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c28371f878e2ead55611d8ba1b5fb879847156d04edea13693700ad1a28baf" +checksum = "45406eccad36220e52988b024d8daa93e691e38d5d71ad5fec55410cc9cf427d" + +[[package]] +name = "solana-hash" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "337c246447142f660f778cf6cb582beba8e28deb05b3b24bfb9ffd7c562e5f41" dependencies = [ - "serde", - "serde_derive", + "solana-hash 4.4.0", ] [[package]] name = "solana-hash" -version = "2.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b96e9f0300fa287b545613f007dfe20043d7812bee255f418c1eb649c93b63" +checksum = "fe51db00ac3aa9f950d1e6201a126acfa26e6d81bc4a183ba64ec02effcad883" dependencies = [ - "borsh 1.6.1", + "borsh", "bytemuck", "bytemuck_derive", "five8", - "js-sys", "serde", "serde_derive", "solana-atomic-u64", "solana-sanitize", - "wasm-bindgen", ] [[package]] name = "solana-inflation" -version = "2.2.1" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23eef6a09eb8e568ce6839573e4966850e85e9ce71e6ae1a6c930c1c43947de3" +checksum = "ccf104167e42e747602b88e02b25cacfc5de699c3b7cbba60d3250437e6a22ed" dependencies = [ "serde", "serde_derive", @@ -5358,34 +5054,43 @@ dependencies = [ [[package]] name = "solana-instruction" -version = "2.3.3" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab5682934bd1f65f8d2c16f21cb532526fcc1a09f796e2cacdb091eee5774ad" +checksum = "8df4e8fcba01d7efa647ed20a081c234475df5e11a93acb4393cc2c9a7b99bab" dependencies = [ "bincode", - "borsh 1.6.1", - "getrandom 0.2.17", - "js-sys", + "borsh", + "serde", + "serde_derive", + "solana-define-syscall 3.0.0", + "solana-instruction-error", + "solana-pubkey 3.0.0", +] + +[[package]] +name = "solana-instruction-error" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b7d34343838343a3755b7dfb1e438d94c6db2263b519cfe3c2257af932b6e93" +dependencies = [ "num-traits", "serde", "serde_derive", - "serde_json", - "solana-define-syscall", - "solana-pubkey", - "wasm-bindgen", + "solana-program-error", ] [[package]] name = "solana-instructions-sysvar" -version = "2.2.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0e85a6fad5c2d0c4f5b91d34b8ca47118fc593af706e523cdbedf846a954f57" +checksum = "7ddf67876c541aa1e21ee1acae35c95c6fbc61119814bfef70579317a5e26955" dependencies = [ "bitflags", "solana-account-info", "solana-instruction", + "solana-instruction-error", "solana-program-error", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-sanitize", "solana-sdk-ids", "solana-serialize-utils", @@ -5394,30 +5099,29 @@ dependencies = [ [[package]] name = "solana-keccak-hasher" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7aeb957fbd42a451b99235df4942d96db7ef678e8d5061ef34c9b34cae12f79" +checksum = "ed1c0d16d6fdeba12291a1f068cdf0d479d9bff1141bf44afd7aa9d485f65ef8" dependencies = [ "sha3", - "solana-define-syscall", - "solana-hash", - "solana-sanitize", + "solana-define-syscall 4.0.1", + "solana-hash 4.4.0", ] [[package]] name = "solana-keychain" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a9fc1ac28499fc3c913776c70bcf9a5373505b94e42d8b0f17ca2c57a47052" +checksum = "c6faefd705bf8e950cf15d7ab0690246abfaf3b898b556e8be3482b21ed2f95a" dependencies = [ "async-trait", "aws-config", "aws-sdk-kms", - "base64 0.22.1", + "base64", "bincode", "bs58", "chrono", - "ed25519-dalek 2.2.0", + "ed25519-dalek", "google-cloud-auth", "google-cloud-kms-v1", "hex", @@ -5431,6 +5135,8 @@ dependencies = [ "serde_json", "sha2 0.10.9", "solana-sdk", + "solana-shred-version", + "solana-signature", "thiserror 2.0.18", "tokio", "uuid", @@ -5439,167 +5145,110 @@ dependencies = [ [[package]] name = "solana-keypair" -version = "2.2.3" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd3f04aa1a05c535e93e121a95f66e7dcccf57e007282e8255535d24bf1e98bb" +checksum = "263d614c12aa267a3278703175fd6440552ca61bc960b5a02a4482720c53438b" dependencies = [ - "ed25519-dalek 1.0.1", + "ed25519-dalek", "ed25519-dalek-bip32", "five8", - "rand 0.7.3", + "five8_core", + "rand 0.9.2", + "solana-address 2.6.1", "solana-derivation-path", - "solana-pubkey", "solana-seed-derivable", "solana-seed-phrase", "solana-signature", "solana-signer", - "wasm-bindgen", ] [[package]] name = "solana-last-restart-slot" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6360ac2fdc72e7463565cd256eedcf10d7ef0c28a1249d261ec168c1b55cdd" +checksum = "c22474b83d3c7c318e1c3a725784fc2d1d03b728e36369e58ce48769a61ed85e" dependencies = [ "serde", "serde_derive", + "solana-get-sysvar", "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", ] -[[package]] -name = "solana-loader-v2-interface" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8ab08006dad78ae7cd30df8eea0539e207d08d91eaefb3e1d49a446e1c49654" -dependencies = [ - "serde", - "serde_bytes", - "serde_derive", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", -] - [[package]] name = "solana-loader-v3-interface" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f7162a05b8b0773156b443bccd674ea78bb9aa406325b467ea78c06c99a63a2" -dependencies = [ - "serde", - "serde_bytes", - "serde_derive", - "solana-instruction", - "solana-pubkey", - "solana-sdk-ids", - "solana-system-interface", -] - -[[package]] -name = "solana-loader-v4-interface" -version = "2.2.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "706a777242f1f39a83e2a96a2a6cb034cb41169c6ecbee2cf09cb873d9659e7e" +checksum = "dee44c9b1328c5c712c68966fb8de07b47f3e7bac006e74ddd1bb053d3e46e5d" dependencies = [ "serde", "serde_bytes", "serde_derive", "solana-instruction", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-sdk-ids", - "solana-system-interface", -] - -[[package]] -name = "solana-logger" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8e777ec1afd733939b532a42492d888ec7c88d8b4127a5d867eb45c6eb5cd5" -dependencies = [ - "env_logger", - "lazy_static", - "libc", - "log", - "signal-hook", ] [[package]] name = "solana-message" -version = "2.4.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1796aabce376ff74bf89b78d268fa5e683d7d7a96a0a4e4813ec34de49d5314b" +checksum = "0448b1fd891c5f46491e5dc7d9986385ba3c852c340db2911dd29faa01d2b08d" dependencies = [ "bincode", "blake3", "lazy_static", "serde", "serde_derive", - "solana-bincode", - "solana-hash", + "solana-address 2.6.1", + "solana-hash 4.4.0", "solana-instruction", - "solana-pubkey", "solana-sanitize", "solana-sdk-ids", "solana-short-vec", - "solana-system-interface", "solana-transaction-error", - "wasm-bindgen", ] [[package]] name = "solana-msg" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36a1a14399afaabc2781a1db09cb14ee4cc4ee5c7a5a3cfcc601811379a8092" +checksum = "726b7cbbc6be6f1c6f29146ac824343b9415133eee8cce156452ad1db93f8008" dependencies = [ - "solana-define-syscall", + "solana-define-syscall 5.1.0", ] [[package]] name = "solana-native-token" -version = "2.3.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61515b880c36974053dd499c0510066783f0cc6ac17def0c7ef2a244874cf4a9" +checksum = "ae8dd4c280dca9d046139eb5b7a5ac9ad10403fbd64964c7d7571214950d758f" [[package]] name = "solana-nonce" -version = "2.2.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703e22eb185537e06204a5bd9d509b948f0066f2d1d814a6f475dafb3ddf1325" +checksum = "d95dbc9f2e33b6c10e231df15cb2a3bff9ea7eab6347f9e316fe75c97fd67bbb" dependencies = [ "serde", "serde_derive", "solana-fee-calculator", - "solana-hash", - "solana-pubkey", + "solana-hash 4.4.0", + "solana-pubkey 4.2.0", "solana-sha256-hasher", ] -[[package]] -name = "solana-nonce-account" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde971a20b8dbf60144d6a84439dda86b5466e00e2843091fe731083cda614da" -dependencies = [ - "solana-account", - "solana-hash", - "solana-nonce", - "solana-sdk-ids", -] - [[package]] name = "solana-offchain-message" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b526398ade5dea37f1f147ce55dae49aa017a5d7326606359b0445ca8d946581" +checksum = "f6e2a1141a673f72a05cf406b99e4b2b8a457792b7c01afa07b3f00d4e2de393" dependencies = [ "num_enum", - "solana-hash", + "solana-hash 3.1.0", "solana-packet", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-sanitize", "solana-sha256-hasher", "solana-signature", @@ -5608,129 +5257,59 @@ dependencies = [ [[package]] name = "solana-packet" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004f2d2daf407b3ec1a1ca5ec34b3ccdfd6866dd2d3c7d0715004a96e4b6d127" +checksum = "6edf2f25743c95229ac0fdc32f8f5893ef738dbf332c669e9861d33ddb0f469d" dependencies = [ - "bincode", "bitflags", - "cfg_eval", - "serde", - "serde_derive", - "serde_with", -] - -[[package]] -name = "solana-poh-config" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d650c3b4b9060082ac6b0efbbb66865089c58405bfb45de449f3f2b91eccee75" -dependencies = [ - "serde", - "serde_derive", -] - -[[package]] -name = "solana-precompile-error" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d87b2c1f5de77dfe2b175ee8dd318d196aaca4d0f66f02842f80c852811f9f8" -dependencies = [ - "num-traits", - "solana-decode-error", -] - -[[package]] -name = "solana-precompiles" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e92768a57c652edb0f5d1b30a7d0bc64192139c517967c18600debe9ae3832" -dependencies = [ - "lazy_static", - "solana-ed25519-program", - "solana-feature-set", - "solana-message", - "solana-precompile-error", - "solana-pubkey", - "solana-sdk-ids", - "solana-secp256k1-program", - "solana-secp256r1-program", ] [[package]] name = "solana-presigner" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a57a24e6a4125fc69510b6774cd93402b943191b6cddad05de7281491c90fe" +checksum = "0f704eaf825be3180832445b9e4983b875340696e8e7239bf2d535b0f86c14a2" dependencies = [ - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-signature", "solana-signer", ] [[package]] name = "solana-program" -version = "2.3.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98eca145bd3545e2fbb07166e895370576e47a00a7d824e325390d33bf467210" +checksum = "91b12305dd81045d705f427acd0435a2e46444b65367d7179d7bdcfc3bc5f5eb" dependencies = [ - "bincode", - "blake3", - "borsh 0.10.4", - "borsh 1.6.1", - "bs58", - "bytemuck", - "console_error_panic_hook", - "console_log", - "getrandom 0.2.17", - "lazy_static", - "log", "memoffset", - "num-bigint", - "num-derive", - "num-traits", - "rand 0.8.5", - "serde", - "serde_bytes", - "serde_derive", "solana-account-info", - "solana-address-lookup-table-interface", - "solana-atomic-u64", "solana-big-mod-exp", - "solana-bincode", "solana-blake3-hasher", "solana-borsh", "solana-clock", "solana-cpi", - "solana-decode-error", - "solana-define-syscall", + "solana-define-syscall 3.0.0", "solana-epoch-rewards", "solana-epoch-schedule", + "solana-epoch-stake", "solana-example-mocks", - "solana-feature-gate-interface", "solana-fee-calculator", - "solana-hash", + "solana-hash 3.1.0", "solana-instruction", + "solana-instruction-error", "solana-instructions-sysvar", "solana-keccak-hasher", "solana-last-restart-slot", - "solana-loader-v2-interface", - "solana-loader-v3-interface", - "solana-loader-v4-interface", - "solana-message", "solana-msg", "solana-native-token", - "solana-nonce", "solana-program-entrypoint", "solana-program-error", "solana-program-memory", "solana-program-option", "solana-program-pack", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rent", - "solana-sanitize", "solana-sdk-ids", - "solana-sdk-macro", "solana-secp256k1-recover", "solana-serde-varint", "solana-serialize-utils", @@ -5739,108 +5318,81 @@ dependencies = [ "solana-slot-hashes", "solana-slot-history", "solana-stable-layout", - "solana-stake-interface", - "solana-system-interface", "solana-sysvar", "solana-sysvar-id", - "solana-vote-interface", - "thiserror 2.0.18", - "wasm-bindgen", ] [[package]] name = "solana-program-entrypoint" -version = "2.3.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ce041b1a0ed275290a5008ee1a4a6c48f5054c8a3d78d313c08958a06aedbd" +checksum = "84c9b0a1ff494e05f503a08b3d51150b73aa639544631e510279d6375f290997" dependencies = [ "solana-account-info", - "solana-msg", + "solana-define-syscall 4.0.1", "solana-program-error", - "solana-pubkey", + "solana-pubkey 4.2.0", ] [[package]] name = "solana-program-error" -version = "2.2.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee2e0217d642e2ea4bee237f37bd61bb02aec60da3647c48ff88f6556ade775" +checksum = "4f04fa578707b3612b095f0c8e19b66a1233f7c42ca8082fcb3b745afcc0add6" dependencies = [ - "borsh 1.6.1", - "num-traits", + "borsh", "serde", "serde_derive", - "solana-decode-error", - "solana-instruction", - "solana-msg", - "solana-pubkey", ] [[package]] name = "solana-program-memory" -version = "2.3.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a5426090c6f3fd6cfdc10685322fede9ca8e5af43cd6a59e98bfe4e91671712" +checksum = "4068648649653c2c50546e9a7fb761791b5ab0cda054c771bb5808d3a4b9eb52" dependencies = [ - "solana-define-syscall", + "solana-define-syscall 4.0.1", ] [[package]] name = "solana-program-option" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc677a2e9bc616eda6dbdab834d463372b92848b2bfe4a1ed4e4b4adba3397d0" +checksum = "7a88006a9b8594088cec9027ab77caaaa258a2aaa2083d3f086c44b42e50aeab" [[package]] name = "solana-program-pack" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "319f0ef15e6e12dc37c597faccb7d62525a509fec5f6975ecb9419efddeb277b" +checksum = "3d7701cb15b90667ae1c89ef4ac35a59c61e66ce58ddee13d729472af7f41d59" dependencies = [ "solana-program-error", ] [[package]] name = "solana-pubkey" -version = "2.4.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b62adb9c3261a052ca1f999398c388f1daf558a1b492f60a6d9e64857db4ff1" +checksum = "8909d399deb0851aa524420beeb5646b115fd253ef446e35fe4504c904da3941" dependencies = [ - "borsh 0.10.4", - "borsh 1.6.1", - "bytemuck", - "bytemuck_derive", - "curve25519-dalek 4.1.3", - "five8", - "five8_const", - "getrandom 0.2.17", - "js-sys", - "num-traits", "rand 0.8.5", - "serde", - "serde_derive", - "solana-atomic-u64", - "solana-decode-error", - "solana-define-syscall", - "solana-sanitize", - "solana-sha256-hasher", - "wasm-bindgen", + "solana-address 1.1.0", ] [[package]] -name = "solana-quic-definitions" -version = "2.3.1" +name = "solana-pubkey" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf0d4d5b049eb1d0c35f7b18f305a27c8986fc5c0c9b383e97adaa35334379e" +checksum = "7db719574990de7e8b0f55a8593ac92a5ccb42c8ce67b3e4bf05b139d5d9ee71" dependencies = [ - "solana-keypair", + "solana-address 2.6.1", ] [[package]] name = "solana-rent" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1aea8fdea9de98ca6e8c2da5827707fb3842833521b528a713810ca685d2480" +checksum = "e860d5499a705369778647e97d760f7670adfb6fc8419dd3d568deccd46d5487" dependencies = [ "serde", "serde_derive", @@ -5849,50 +5401,11 @@ dependencies = [ "solana-sysvar-id", ] -[[package]] -name = "solana-rent-collector" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "127e6dfa51e8c8ae3aa646d8b2672bc4ac901972a338a9e1cd249e030564fb9d" -dependencies = [ - "serde", - "serde_derive", - "solana-account", - "solana-clock", - "solana-epoch-schedule", - "solana-genesis-config", - "solana-pubkey", - "solana-rent", - "solana-sdk-ids", -] - -[[package]] -name = "solana-rent-debits" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f6f9113c6003492e74438d1288e30cffa8ccfdc2ef7b49b9e816d8034da18cd" -dependencies = [ - "solana-pubkey", - "solana-reward-info", -] - -[[package]] -name = "solana-reserved-account-keys" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4b22ea19ca2a3f28af7cd047c914abf833486bf7a7c4a10fc652fff09b385b1" -dependencies = [ - "lazy_static", - "solana-feature-set", - "solana-pubkey", - "solana-sdk-ids", -] - [[package]] name = "solana-reward-info" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18205b69139b1ae0ab8f6e11cdcb627328c0814422ad2482000fa2ca54ae4a2f" +checksum = "82be7946105c2ee6be9f9ee7bd18a068b558389221d29efa92b906476102bfcc" dependencies = [ "serde", "serde_derive", @@ -5900,12 +5413,12 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "2.3.13" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d3161ac0918178e674c1f7f1bfac40de3e7ed0383bd65747d63113c156eaeb" +checksum = "a11dd2723748fb6a7a2b5b83e4186cb99f35f1384d8b310cd57122ea8627839a" dependencies = [ "async-trait", - "base64 0.22.1", + "base64", "bincode", "bs58", "futures", @@ -5915,19 +5428,19 @@ dependencies = [ "reqwest-middleware", "semver", "serde", - "serde_derive", "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", + "solana-hash 3.1.0", "solana-instruction", "solana-message", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rpc-client-api", "solana-signature", "solana-transaction", @@ -5940,16 +5453,15 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "2.3.13" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dbc138685c79d88a766a8fd825057a74ea7a21e1dd7f8de275ada899540fff7" +checksum = "8a81a57ed54176e3aa4bca8e894f9326638a3f6870f79b078d8b3fadda8a4c9b" dependencies = [ "anyhow", "jsonrpc-core", "reqwest 0.12.28", "reqwest-middleware", "serde", - "serde_derive", "serde_json", "solana-account-decoder-client-types", "solana-clock", @@ -5962,23 +5474,24 @@ dependencies = [ [[package]] name = "solana-rpc-client-types" -version = "2.3.13" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea428a81729255d895ea47fba9b30fd4dacbfe571a080448121bd0592751676" +checksum = "2a6f06038b9f88ecaecb0d283a325040429c700c1d04526c015c2c8182686c9b" dependencies = [ - "base64 0.22.1", + "base64", "bs58", "semver", "serde", - "serde_derive", "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-pubkey", + "solana-reward-info", + "solana-transaction", "solana-transaction-error", "solana-transaction-status-client-types", "solana-version", @@ -5988,63 +5501,48 @@ dependencies = [ [[package]] name = "solana-sanitize" -version = "2.2.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61f1bc1357b8188d9c4a3af3fc55276e56987265eb7ad073ae6f8180ee54cecf" +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.18", +] [[package]] name = "solana-sdk" -version = "2.3.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cc0e4a7635b902791c44b6581bfb82f3ada32c5bc0929a64f39fe4bb384c86a" +checksum = "3f03df7969f5e723ad31b6c9eadccc209037ac4caa34d8dc259316b05c11e82b" dependencies = [ "bincode", "bs58", - "getrandom 0.1.16", - "js-sys", "serde", - "serde_json", "solana-account", - "solana-bn254", - "solana-client-traits", - "solana-cluster-type", - "solana-commitment-config", - "solana-compute-budget-interface", - "solana-decode-error", - "solana-derivation-path", - "solana-ed25519-program", "solana-epoch-info", "solana-epoch-rewards-hasher", - "solana-feature-set", "solana-fee-structure", - "solana-genesis-config", - "solana-hard-forks", "solana-inflation", - "solana-instruction", "solana-keypair", "solana-message", - "solana-native-token", - "solana-nonce-account", "solana-offchain-message", - "solana-packet", - "solana-poh-config", - "solana-precompile-error", - "solana-precompiles", "solana-presigner", "solana-program", "solana-program-memory", - "solana-pubkey", - "solana-quic-definitions", - "solana-rent-collector", - "solana-rent-debits", - "solana-reserved-account-keys", - "solana-reward-info", + "solana-pubkey 3.0.0", "solana-sanitize", "solana-sdk-ids", "solana-sdk-macro", - "solana-secp256k1-program", - "solana-secp256k1-recover", - "solana-secp256r1-program", "solana-seed-derivable", "solana-seed-phrase", "solana-serde", @@ -6053,30 +5551,26 @@ dependencies = [ "solana-shred-version", "solana-signature", "solana-signer", - "solana-system-transaction", "solana-time-utils", "solana-transaction", - "solana-transaction-context", "solana-transaction-error", - "solana-validator-exit", "thiserror 2.0.18", - "wasm-bindgen", ] [[package]] name = "solana-sdk-ids" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5d8b9cc68d5c88b062a33e23a6466722467dde0035152d8fb1afbcdf350a5f" +checksum = "def234c1956ff616d46c9dd953f251fa7096ddbaa6d52b165218de97882b7280" dependencies = [ - "solana-pubkey", + "solana-address 2.6.1", ] [[package]] name = "solana-sdk-macro" -version = "2.2.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86280da8b99d03560f6ab5aca9de2e38805681df34e0bb8f238e69b29433b9df" +checksum = "8765316242300c48242d84a41614cb3388229ec353ba464f6fe62a733e41806f" dependencies = [ "bs58", "proc-macro2", @@ -6084,65 +5578,31 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "solana-secp256k1-program" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f19833e4bc21558fe9ec61f239553abe7d05224347b57d65c2218aeeb82d6149" -dependencies = [ - "bincode", - "digest 0.10.7", - "libsecp256k1", - "serde", - "serde_derive", - "sha3", - "solana-feature-set", - "solana-instruction", - "solana-precompile-error", - "solana-sdk-ids", - "solana-signature", -] - [[package]] name = "solana-secp256k1-recover" -version = "2.2.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa3120b6cdaa270f39444f5093a90a7b03d296d362878f7a6991d6de3bbe496" +checksum = "e3a1ad3ed7846631c88c71c5d2f21a2ecb6b61da333d9be173b6b061b35609ae" dependencies = [ - "borsh 1.6.1", - "libsecp256k1", - "solana-define-syscall", + "k256", + "solana-define-syscall 5.1.0", "thiserror 2.0.18", ] -[[package]] -name = "solana-secp256r1-program" -version = "2.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0ae46da3071a900f02d367d99b2f3058fe2e90c5062ac50c4f20cfedad8f0f" -dependencies = [ - "bytemuck", - "openssl", - "solana-feature-set", - "solana-instruction", - "solana-precompile-error", - "solana-sdk-ids", -] - [[package]] name = "solana-seed-derivable" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beb82b5adb266c6ea90e5cf3967235644848eac476c5a1f2f9283a143b7c97f" +checksum = "ff7bdb72758e3bec33ed0e2658a920f1f35dfb9ed576b951d20d63cb61ecd95c" dependencies = [ "solana-derivation-path", ] [[package]] name = "solana-seed-phrase" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36187af2324f079f65a675ec22b31c24919cb4ac22c79472e85d819db9bbbc15" +checksum = "dc905b200a95f2ea9146e43f2a7181e3aeb55de6bc12afb36462d00a3c7310de" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -6151,191 +5611,176 @@ dependencies = [ [[package]] name = "solana-serde" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1931484a408af466e14171556a47adaa215953c7f48b24e5f6b0282763818b04" +checksum = "709a93cab694c70f40b279d497639788fc2ccbcf9b4aa32273d4b361322c02dd" dependencies = [ "serde", ] [[package]] name = "solana-serde-varint" -version = "2.2.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a7e155eba458ecfb0107b98236088c3764a09ddf0201ec29e52a0be40857113" +checksum = "950e5b83e839dc0f92c66afc124bb8f40e89bc90f0579e8ec5499296d27f54e3" dependencies = [ "serde", ] [[package]] name = "solana-serialize-utils" -version = "2.2.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "817a284b63197d2b27afdba829c5ab34231da4a9b4e763466a003c40ca4f535e" +checksum = "761357b0853c9623bf12c1d2314b3d6160a85b087b84c45224fb85766d22616b" dependencies = [ - "solana-instruction", - "solana-pubkey", + "solana-instruction-error", + "solana-pubkey 4.2.0", "solana-sanitize", ] [[package]] name = "solana-sha256-hasher" -version = "2.3.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa3feb32c28765f6aa1ce8f3feac30936f16c5c3f7eb73d63a5b8f6f8ecdc44" +checksum = "db7dc3011ea4c0334aaaa7e7128cb390ecf546b28d412e9bf2064680f57f588f" dependencies = [ "sha2 0.10.9", - "solana-define-syscall", - "solana-hash", + "solana-define-syscall 4.0.1", + "solana-hash 4.4.0", ] [[package]] name = "solana-short-vec" -version = "2.2.1" +version = "3.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c54c66f19b9766a56fa0057d060de8378676cb64987533fa088861858fc5a69" +checksum = "7d8250a4495aad49ad20556a607da53bdcb20de78da10b65afbf918b7f1de647" dependencies = [ - "serde", + "serde_core", ] [[package]] name = "solana-shred-version" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afd3db0461089d1ad1a78d9ba3f15b563899ca2386351d38428faa5350c60a98" +checksum = "94953e22ca28fe4541a3447d6baeaf519cc4ddc063253bfa673b721f34c136bb" dependencies = [ "solana-hard-forks", - "solana-hash", + "solana-hash 3.1.0", "solana-sha256-hasher", ] [[package]] name = "solana-signature" -version = "2.3.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c8ec8e657aecfc187522fc67495142c12f35e55ddeca8698edbb738b8dbd8c" +checksum = "132a93134f1262aa832f1849b83bec6c9945669b866da18661a427943b9e801e" dependencies = [ - "ed25519-dalek 1.0.1", + "ed25519-dalek", "five8", - "rand 0.8.5", + "rand 0.9.2", "serde", "serde-big-array", "serde_derive", "solana-sanitize", + "wincode 0.4.9", ] [[package]] name = "solana-signer" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c41991508a4b02f021c1342ba00bcfa098630b213726ceadc7cb032e051975b" +checksum = "5bfea97951fee8bae0d6038f39a5efcb6230ecdfe33425ac75196d1a1e3e3235" dependencies = [ - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-signature", "solana-transaction-error", ] [[package]] name = "solana-slot-hashes" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c8691982114513763e88d04094c9caa0376b867a29577939011331134c301ce" +checksum = "5c7ce2b4b8911bf2db3de7b6266e67bfc21a6a9f8c566fb096d9782ca2ad16ee" dependencies = [ "serde", "serde_derive", - "solana-hash", + "solana-get-sysvar", + "solana-hash 4.4.0", "solana-sdk-ids", "solana-sysvar-id", ] [[package]] name = "solana-slot-history" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ccc1b2067ca22754d5283afb2b0126d61eae734fc616d23871b0943b0d935e" +checksum = "40427c04d3e808493cb5e3d1a97cef84d7c15cb6f89b15c5684d0d4027105600" dependencies = [ "bv", "serde", "serde_derive", + "solana-get-sysvar", "solana-sdk-ids", "solana-sysvar-id", ] [[package]] name = "solana-stable-layout" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f14f7d02af8f2bc1b5efeeae71bc1c2b7f0f65cd75bcc7d8180f2c762a57f54" +checksum = "1da74507795b6e8fb60b7c7306c0c36e2c315805d16eaaf479452661234685ac" dependencies = [ "solana-instruction", - "solana-pubkey", + "solana-pubkey 3.0.0", ] [[package]] name = "solana-stake-interface" -version = "1.2.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5269e89fde216b4d7e1d1739cf5303f8398a1ff372a81232abbee80e554a838c" +checksum = "b9bc26191b533f9a6e5a14cca05174119819ced680a80febff2f5051a713f0db" dependencies = [ - "borsh 0.10.4", - "borsh 1.6.1", "num-traits", "serde", "serde_derive", "solana-clock", "solana-cpi", - "solana-decode-error", "solana-instruction", "solana-program-error", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-system-interface", + "solana-sysvar", "solana-sysvar-id", ] [[package]] name = "solana-svm-feature-set" -version = "2.3.13" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f24b836eb4d74ec255217bdbe0f24f64a07adeac31aca61f334f91cd4a3b1d5" +checksum = "7cc2e2fdebd77159b7a14ee45c9dbb3f1d202e8e7ccc14e4cda78c006a7a78a9" [[package]] name = "solana-system-interface" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7c18cb1a91c6be5f5a8ac9276a1d7c737e39a21beba9ea710ab4b9c63bc90" +checksum = "4e1790547bfc3061f1ee68ea9d8dc6c973c02a163697b24263a8e9f2e6d4afa2" dependencies = [ - "js-sys", "num-traits", "serde", "serde_derive", - "solana-decode-error", "solana-instruction", - "solana-pubkey", - "wasm-bindgen", -] - -[[package]] -name = "solana-system-transaction" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd98a25e5bcba8b6be8bcbb7b84b24c2a6a8178d7fb0e3077a916855ceba91a" -dependencies = [ - "solana-hash", - "solana-keypair", - "solana-message", - "solana-pubkey", - "solana-signer", - "solana-system-interface", - "solana-transaction", + "solana-msg", + "solana-program-error", + "solana-pubkey 3.0.0", ] [[package]] name = "solana-sysvar" -version = "2.3.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8c3595f95069f3d90f275bb9bd235a1973c4d059028b0a7f81baca2703815db" +checksum = "6690d3dd88f15c21edff68eb391ef8800df7a1f5cec84ee3e8d1abf05affdf74" dependencies = [ - "base64 0.22.1", + "base64", "bincode", "bytemuck", "bytemuck_derive", @@ -6344,115 +5789,108 @@ dependencies = [ "serde_derive", "solana-account-info", "solana-clock", - "solana-define-syscall", + "solana-define-syscall 4.0.1", "solana-epoch-rewards", "solana-epoch-schedule", "solana-fee-calculator", - "solana-hash", + "solana-hash 4.4.0", "solana-instruction", - "solana-instructions-sysvar", "solana-last-restart-slot", "solana-program-entrypoint", "solana-program-error", "solana-program-memory", - "solana-pubkey", + "solana-pubkey 4.2.0", "solana-rent", - "solana-sanitize", "solana-sdk-ids", "solana-sdk-macro", "solana-slot-hashes", "solana-slot-history", - "solana-stake-interface", "solana-sysvar-id", ] [[package]] name = "solana-sysvar-id" -version = "2.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5762b273d3325b047cfda250787f8d796d781746860d5d0a746ee29f3e8812c1" +checksum = "17358d1e9a13e5b9c2264d301102126cf11a47fd394cdf3dec174fe7bc96e1de" dependencies = [ - "solana-pubkey", + "solana-address 2.6.1", "solana-sdk-ids", ] [[package]] name = "solana-time-utils" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af261afb0e8c39252a04d026e3ea9c405342b08c871a2ad8aa5448e068c784c" +checksum = "0ced92c60aa76ec4780a9d93f3bd64dfa916e1b998eacc6f1c110f3f444f02c9" [[package]] name = "solana-transaction" -version = "2.2.3" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80657d6088f721148f5d889c828ca60c7daeedac9a8679f9ec215e0c42bcbf41" +checksum = "96697cff5075a028265324255efed226099f6d761ca67342b230d09f72cc48d2" dependencies = [ "bincode", "serde", "serde_derive", - "solana-bincode", - "solana-feature-set", - "solana-hash", + "solana-address 2.6.1", + "solana-hash 4.4.0", "solana-instruction", - "solana-keypair", + "solana-instruction-error", "solana-message", - "solana-precompiles", - "solana-pubkey", "solana-sanitize", "solana-sdk-ids", "solana-short-vec", "solana-signature", "solana-signer", - "solana-system-interface", "solana-transaction-error", - "wasm-bindgen", ] [[package]] name = "solana-transaction-context" -version = "2.3.13" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a312304361987a85b2ef2293920558e6612876a639dd1309daf6d0d59ef2fe" +checksum = "b1a3c3a69688293a195b02c60a5384d855b8de19981f404c71ccb9e7f139b98f" dependencies = [ "bincode", "serde", - "serde_derive", "solana-account", "solana-instruction", "solana-instructions-sysvar", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rent", + "solana-sbpf", "solana-sdk-ids", ] [[package]] name = "solana-transaction-error" -version = "2.2.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a9dc8fdb61c6088baab34fc3a8b8473a03a7a5fd404ed8dd502fa79b67cb1" +checksum = "4222065402340d7e6aec9dc3e54d22992ddcf923d91edcd815443c2bfca3144a" dependencies = [ "serde", "serde_derive", - "solana-instruction", + "solana-instruction-error", "solana-sanitize", ] [[package]] name = "solana-transaction-status-client-types" -version = "2.3.13" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f1d7c2387c35850848212244d2b225847666cb52d3bd59a5c409d2c300303d" +checksum = "11f7c3d15f25111cd1e320ad8ee3515ccae9983ab750cec83517c8553419b70a" dependencies = [ - "base64 0.22.1", + "base64", "bincode", "bs58", "serde", - "serde_derive", "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", @@ -6461,43 +5899,38 @@ dependencies = [ "thiserror 2.0.18", ] -[[package]] -name = "solana-validator-exit" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bbf6d7a3c0b28dd5335c52c0e9eae49d0ae489a8f324917faf0ded65a812c1d" - [[package]] name = "solana-version" -version = "2.3.13" +version = "3.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3324d46c7f7b7f5d34bf7dc71a2883bdc072c7b28ca81d0b2167ecec4cf8da9f" +checksum = "cf8b34a38f1aab0be22e3d9810c84229a5668a50839fc38e9a409912dabbc227" dependencies = [ "agave-feature-set", "rand 0.8.5", "semver", "serde", - "serde_derive", "solana-sanitize", "solana-serde-varint", ] [[package]] name = "solana-vote-interface" -version = "2.2.6" +version = "4.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b80d57478d6599d30acc31cc5ae7f93ec2361a06aefe8ea79bc81739a08af4c3" +checksum = "db6e123e16bfdd7a81d71b4c4699e0b29580b619f4cd2ef5b6aae1eb85e8979f" dependencies = [ "bincode", + "cfg_eval", "num-derive", "num-traits", "serde", "serde_derive", + "serde_with", "solana-clock", - "solana-decode-error", - "solana-hash", + "solana-hash 3.1.0", "solana-instruction", - "solana-pubkey", + "solana-instruction-error", + "solana-pubkey 3.0.0", "solana-rent", "solana-sdk-ids", "solana-serde-varint", @@ -6506,6 +5939,54 @@ dependencies = [ "solana-system-interface", ] +[[package]] +name = "solana-zero-copy" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea15126ebdc7e270c50d43884369af9f51d2308156d46a18e351522a164844d" +dependencies = [ + "borsh", + "bytemuck", + "bytemuck_derive", +] + +[[package]] +name = "solana-zk-sdk" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9602bcb1f7af15caef92b91132ec2347e1c51a72ecdbefdaefa3eac4b8711475" +dependencies = [ + "aes-gcm-siv", + "base64", + "bincode", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek", + "getrandom 0.2.17", + "itertools", + "js-sys", + "merlin", + "num-derive", + "num-traits", + "rand 0.8.5", + "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.18", + "wasm-bindgen", + "zeroize", +] + [[package]] name = "spin" version = "0.9.8" @@ -6522,14 +6003,203 @@ dependencies = [ "der", ] +[[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.117", +] + +[[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.117", + "thiserror 1.0.69", +] + [[package]] name = "spl-generic-token" -version = "1.0.1" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233df81b75ab99b42f002b5cdd6e65a7505ffa930624f7096a7580a56765e9cf" +dependencies = [ + "bytemuck", + "solana-pubkey 3.0.0", +] + +[[package]] +name = "spl-pod" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f9c6e142cdf1e7e77f480053ec9f0ce989890768ddf91f619b50f39d1b456f5" +dependencies = [ + "borsh", + "bytemuck", + "bytemuck_derive", + "num-derive", + "num-traits", + "num_enum", + "solana-program-error", + "solana-program-option", + "solana-pubkey 3.0.0", + "solana-zero-copy", + "solana-zk-sdk", + "thiserror 2.0.18", +] + +[[package]] +name = "spl-token-2022-interface" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fcd81188211f4b3c8a5eba7fd534c7142f9dd026123b3472492782cc72f4dc6" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-account-info", + "solana-instruction", + "solana-program-error", + "solana-program-option", + "solana-program-pack", + "solana-pubkey 3.0.0", + "solana-sdk-ids", + "solana-zk-sdk", + "spl-pod", + "spl-token-confidential-transfer-proof-extraction", + "spl-token-confidential-transfer-proof-generation", + "spl-token-group-interface", + "spl-token-metadata-interface", + "spl-type-length-value", + "thiserror 2.0.18", +] + +[[package]] +name = "spl-token-confidential-transfer-proof-extraction" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879a9ebad0d77383d3ea71e7de50503554961ff0f4ef6cbca39ad126e6f6da3a" +dependencies = [ + "bytemuck", + "solana-account-info", + "solana-curve25519", + "solana-instruction", + "solana-instructions-sysvar", + "solana-msg", + "solana-program-error", + "solana-pubkey 3.0.0", + "solana-sdk-ids", + "solana-zk-sdk", + "spl-pod", + "thiserror 2.0.18", +] + +[[package]] +name = "spl-token-confidential-transfer-proof-generation" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0cd59fce3dc00f563c6fa364d67c3f200d278eae681f4dc250240afcfe044b1" +dependencies = [ + "curve25519-dalek", + "solana-zk-sdk", + "thiserror 2.0.18", +] + +[[package]] +name = "spl-token-group-interface" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "452d0f758af20caaa10d9a6f7608232e000d4c74462f248540b3d2ddfa419776" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-instruction", + "solana-program-error", + "solana-pubkey 3.0.0", + "spl-discriminator", + "spl-pod", + "thiserror 2.0.18", +] + +[[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.18", +] + +[[package]] +name = "spl-token-metadata-interface" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c467c7c3bd056f8fe60119e7ec34ddd6f23052c2fa8f1f51999098063b72676" +dependencies = [ + "borsh", + "num-derive", + "num-traits", + "solana-borsh", + "solana-instruction", + "solana-program-error", + "solana-pubkey 3.0.0", + "spl-discriminator", + "spl-pod", + "spl-type-length-value", + "thiserror 2.0.18", +] + +[[package]] +name = "spl-type-length-value" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "741a62a566d97c58d33f9ed32337ceedd4e35109a686e31b1866c5dfa56abddc" +checksum = "2504631748c48d2a937414d64a12dcac4588d34bd07d355d648619c189d29435" dependencies = [ "bytemuck", - "solana-pubkey", + "num-derive", + "num-traits", + "num_enum", + "solana-account-info", + "solana-program-error", + "solana-zero-copy", + "spl-discriminator", + "thiserror 2.0.18", ] [[package]] @@ -6632,15 +6302,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "thiserror" version = "1.0.69" @@ -6748,9 +6409,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.50.0" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ "bytes", "libc", @@ -6765,9 +6426,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", @@ -6800,7 +6461,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.37", + "rustls 0.23.41", "tokio", ] @@ -6823,7 +6484,7 @@ checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" dependencies = [ "futures-util", "log", - "rustls 0.23.37", + "rustls 0.23.41", "rustls-pki-types", "tokio", "tokio-rustls 0.26.4", @@ -6844,15 +6505,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.8.23" @@ -6930,12 +6582,12 @@ version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.8.1", + "hyper 1.10.1", "hyper-timeout", "hyper-util", "percent-encoding", @@ -7051,9 +6703,9 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac28f2d093c6c477eaa76b23525478f38de514fa9aeb1285738d4b97a9552fc" +checksum = "adbc64cba7137545b8044cb1fe9814f7aacf3c6b5f9b45be8bb5db538befdb26" dependencies = [ "js-sys", "opentelemetry", @@ -7099,7 +6751,7 @@ dependencies = [ "httparse", "log", "rand 0.9.2", - "rustls 0.23.37", + "rustls 0.23.41", "rustls-pki-types", "sha1", "thiserror 2.0.18", @@ -7142,6 +6794,12 @@ 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" @@ -7152,6 +6810,15 @@ dependencies = [ "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.7.1" @@ -7239,6 +6906,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 = "vsimd" version = "0.8.0" @@ -7247,7 +6920,7 @@ checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" [[package]] name = "vulcan" -version = "0.6.3" +version = "0.6.4" dependencies = [ "anyhow", "clap", @@ -7263,12 +6936,12 @@ dependencies = [ [[package]] name = "vulcan-lib" -version = "0.6.3" +version = "0.6.4" dependencies = [ "aes-gcm", "anyhow", "argon2", - "base64 0.22.1", + "base64", "bs58", "chrono", "clap", @@ -7286,14 +6959,16 @@ dependencies = [ "semver", "serde", "serde_json", + "solana-commitment-config", + "solana-compute-budget-interface", "solana-keychain", - "solana-pubkey", + "solana-pubkey 3.0.0", "solana-rpc-client", "solana-sdk", "tempfile", "thiserror 2.0.18", "tokio", - "toml 0.8.23", + "toml", "tracing", "zeroize", ] @@ -7326,12 +7001,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" @@ -7524,6 +7193,44 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "wincode" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "657690780ce23e6f66576a782ffd88eb353512381817029cc1d7a99154bb6d1f" +dependencies = [ + "pastey 0.2.3", + "proc-macro2", + "quote", + "thiserror 2.0.18", + "wincode-derive", +] + +[[package]] +name = "wincode" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66d967db7705dc29120bb6e8ce5b5a2e27734ed5976d1c904e95bd238d1c3c5a" +dependencies = [ + "pastey 0.2.3", + "proc-macro2", + "quote", + "thiserror 2.0.18", + "wincode-derive", +] + +[[package]] +name = "wincode-derive" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15ab90b719560d0fda79c74550ad1c948d17b118765942838055ebaf34d67071" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "windows-core" version = "0.62.2" diff --git a/Cargo.toml b/Cargo.toml index 02c98a2..418279f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ resolver = "2" vulcan-lib = { path = "vulcan-lib" } # Rise SDK -phoenix-rise = "0.1.14" +phoenix-rise = "0.3.0" # CLI clap = { version = "4", features = ["derive"] } @@ -23,10 +23,10 @@ toml = "0.8" reqwest = { version = "0.12", features = ["json"] } # Solana -solana-sdk = "~2.3" +solana-sdk = "3" # Fireblocks is intentionally omitted: some modes can auto-broadcast, while # Vulcan expects every signer to return a locally submittable transaction. -solana-keychain = { version = "1.2", default-features = false, features = [ +solana-keychain = { version = "1.4", default-features = false, features = [ "memory", "vault", "privy", @@ -37,11 +37,13 @@ solana-keychain = { version = "1.2", default-features = false, features = [ "crossmint", "dfns", "openfort", - "sdk-v2", + "sdk-v3", ] } -solana-pubkey = { version = "~2.4", features = ["curve25519"] } -solana-instruction = { version = "~2.3", default-features = false, features = ["std"] } -solana-rpc-client = "~2.3" +solana-pubkey = { version = "3", features = ["curve25519"] } +solana-instruction = { version = "3", default-features = false, features = ["std"] } +solana-rpc-client = "3" +solana-commitment-config = "3" +solana-compute-budget-interface = "3" # Encryption aes-gcm = "0.10" diff --git a/agents/tool-catalog.json b/agents/tool-catalog.json index 28c32e8..7607a23 100644 --- a/agents/tool-catalog.json +++ b/agents/tool-catalog.json @@ -1,6 +1,6 @@ { "schema_version": "1.0.0", - "cli_version": "0.6.3", + "cli_version": "0.6.4", "description": "Machine-readable command catalog for vulcan. 66 tools across 13 groups.", "groups": { "market": "Market data: prices, orderbooks, candles, funding rates", diff --git a/vulcan-lib/Cargo.toml b/vulcan-lib/Cargo.toml index a56894b..85f65b8 100644 --- a/vulcan-lib/Cargo.toml +++ b/vulcan-lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vulcan-lib" -version = "0.6.3" +version = "0.6.4" edition = "2021" description = "Core library for the Vulcan CLI" @@ -31,6 +31,8 @@ solana-sdk = { workspace = true } solana-keychain = { workspace = true } solana-pubkey = { workspace = true } solana-rpc-client = { workspace = true } +solana-commitment-config = { workspace = true } +solana-compute-budget-interface = { workspace = true } # Encryption aes-gcm = { workspace = true } diff --git a/vulcan-lib/src/auth.rs b/vulcan-lib/src/auth.rs index 5899e94..027979c 100644 --- a/vulcan-lib/src/auth.rs +++ b/vulcan-lib/src/auth.rs @@ -2,7 +2,7 @@ use crate::config::VulcanConfig; use crate::error::VulcanError; -use phoenix_rise::{ +use phoenix_rise::api::{ AuthSession, AuthSessionSnapshot, FileAuthSessionStore, PhoenixHttpAuthConfig, PhoenixHttpClient, PhoenixHttpClientBuilder, }; @@ -58,7 +58,7 @@ fn build_authenticated_http_client( pub fn load_session(vulcan_dir: &Path) -> Result, VulcanError> { let path = session_path(vulcan_dir); let store = FileAuthSessionStore::new(path); - phoenix_rise::AuthSessionStore::load_session(&store) + phoenix_rise::api::AuthSessionStore::load_session(&store) .map_err(|e| VulcanError::auth("API_AUTH_SESSION_LOAD_FAILED", e.to_string())) } diff --git a/vulcan-lib/src/commands/account.rs b/vulcan-lib/src/commands/account.rs index 31fae9c..914ae44 100644 --- a/vulcan-lib/src/commands/account.rs +++ b/vulcan-lib/src/commands/account.rs @@ -255,9 +255,9 @@ pub async fn execute(ctx: &AppContext, cmd: AccountCommand) -> Result<(), Vulcan let mut ixs = builder .build_register_trader(authority, pda_index, subaccount_index) .map_err(|e| VulcanError::api("BUILD_REGISTER_FAILED", e.to_string()))?; - let parent_pda = phoenix_rise::types::TraderKey::derive_pda(&authority, pda_index, 0); + let parent_pda = phoenix_rise::api::TraderKey::derive_pda(&authority, pda_index, 0); let child_pda = - phoenix_rise::types::TraderKey::derive_pda(&authority, pda_index, subaccount_index); + phoenix_rise::api::TraderKey::derive_pda(&authority, pda_index, subaccount_index); ixs.extend( builder .build_sync_parent_to_child(authority, parent_pda, child_pda) @@ -269,7 +269,7 @@ pub async fn execute(ctx: &AppContext, cmd: AccountCommand) -> Result<(), Vulcan let sig = crate::commands::trade::send_or_dry_run(ctx, ixs, &wallet).await?; - let trader_key = phoenix_rise::types::TraderKey::new_with_idx( + let trader_key = phoenix_rise::api::TraderKey::new_with_idx( authority, pda_index, subaccount_index, @@ -438,7 +438,7 @@ async fn register_authority( } }; - let trader_key = phoenix_rise::types::TraderKey::new(authority); + let trader_key = phoenix_rise::api::TraderKey::new(authority); Ok(RegisterResult { authority: authority.to_string(), trader_pda: trader_key.pda().to_string(), diff --git a/vulcan-lib/src/commands/auth.rs b/vulcan-lib/src/commands/auth.rs index 69d506f..c87985a 100644 --- a/vulcan-lib/src/commands/auth.rs +++ b/vulcan-lib/src/commands/auth.rs @@ -7,7 +7,7 @@ use crate::error::VulcanError; use crate::output::{render_success, TableRenderable}; use crate::wallet::{ResolvedSigner, Wallet}; use chrono::Utc; -use phoenix_rise::{PhoenixHttpAuthConfig, PhoenixHttpClientBuilder}; +use phoenix_rise::api::{PhoenixHttpAuthConfig, PhoenixHttpClientBuilder}; use serde::Serialize; use std::io::{self, BufRead, Write}; diff --git a/vulcan-lib/src/commands/conditional_orders.rs b/vulcan-lib/src/commands/conditional_orders.rs index 11a9b0e..74c1e03 100644 --- a/vulcan-lib/src/commands/conditional_orders.rs +++ b/vulcan-lib/src/commands/conditional_orders.rs @@ -9,12 +9,12 @@ use crate::commands::trader_state::{ }; use crate::context::AppContext; use crate::error::VulcanError; -use phoenix_rise::accounts::{ConditionalOrderCollection, StopLossTradeSide}; -use phoenix_rise::get_conditional_orders_address; -use phoenix_rise::math::{BaseLots, Side as RiseSide, Ticks, WrapperNum}; -use phoenix_rise::types::PhoenixMetadata; +use phoenix_rise::accounts::owned::{ConditionalOrderCollection, StopLossTradeSide}; +use phoenix_rise::ix::constants::get_conditional_orders_address; +use phoenix_rise::math::{BaseLots, Side as RiseSide, Ticks}; +use phoenix_rise::api::PhoenixMetadata; use solana_pubkey::Pubkey; -use solana_sdk::commitment_config::CommitmentConfig; +use solana_commitment_config::CommitmentConfig; use std::collections::{HashMap, HashSet}; /// Fetch and decode the on-chain `ConditionalOrderCollection` for one trader. @@ -27,7 +27,8 @@ pub async fn fetch_conditional_orders( ctx: &AppContext, trader_pda: Pubkey, ) -> Result, VulcanError> { - let pda = get_conditional_orders_address(&trader_pda); + let pda = get_conditional_orders_address(&trader_pda) + .map_err(|e| VulcanError::api("CONDITIONAL_ORDERS_PDA_FAILED", e.to_string()))?; let rpc = ctx.rpc_client_async(); let account = rpc @@ -311,7 +312,7 @@ pub(crate) fn project_trader_state_limit_orders( out.push(TraderStateLimitOrderView { subaccount_index, symbol: symbol_upper.clone(), - side: row.side, + side: api_side_to_rise_side(row.side), order_sequence_number: row.order_sequence_number.clone(), order_sequence_number_u64, price_ticks, @@ -377,8 +378,8 @@ impl StateTriggerProjection<'_> { trigger_price: calc.ticks_to_price(Ticks::new(trigger_price_ticks)), size_tokens: calc.base_lots_to_units(BaseLots::new(size_lots)), side: match row.trigger.side { - RiseSide::Bid => StopLossTradeSide::Bid, - RiseSide::Ask => StopLossTradeSide::Ask, + phoenix_rise::types::prelude::Side::Bid => StopLossTradeSide::Bid, + phoenix_rise::types::prelude::Side::Ask => StopLossTradeSide::Ask, }, order_id, }); @@ -386,6 +387,13 @@ impl StateTriggerProjection<'_> { } } +fn api_side_to_rise_side(side: phoenix_rise::types::prelude::Side) -> RiseSide { + match side { + phoenix_rise::types::prelude::Side::Bid => RiseSide::Bid, + phoenix_rise::types::prelude::Side::Ask => RiseSide::Ask, + } +} + impl TraderStateTriggerRow { fn order_id(&self, kind: TriggerKind) -> Option<&str> { match kind { diff --git a/vulcan-lib/src/commands/margin.rs b/vulcan-lib/src/commands/margin.rs index 7f51d0c..c2272cc 100644 --- a/vulcan-lib/src/commands/margin.rs +++ b/vulcan-lib/src/commands/margin.rs @@ -242,8 +242,8 @@ pub async fn execute_transfer_inner( let (wallet, authority, _) = crate::commands::trade::resolve_wallet_and_pda(ctx, None).await?; let builder = ctx.tx_builder().await?; - let src_pda = phoenix_rise::types::TraderKey::derive_pda(&authority, 0, from); - let dst_pda = phoenix_rise::types::TraderKey::derive_pda(&authority, 0, to); + let src_pda = phoenix_rise::api::TraderKey::derive_pda(&authority, 0, from); + let dst_pda = phoenix_rise::api::TraderKey::derive_pda(&authority, 0, to); let ixs = builder .build_transfer_collateral(authority, src_pda, dst_pda, amount) @@ -291,13 +291,13 @@ pub async fn execute_transfer_child_to_parent_inner( let builder = ctx.tx_builder().await?; - let child_pda = phoenix_rise::types::TraderKey::derive_pda( + let child_pda = phoenix_rise::api::TraderKey::derive_pda( &authority, trader_state.trader_pda_index, child, ); let parent_pda = - phoenix_rise::types::TraderKey::derive_pda(&authority, trader_state.trader_pda_index, 0); + phoenix_rise::api::TraderKey::derive_pda(&authority, trader_state.trader_pda_index, 0); let ixs = builder .build_transfer_collateral_child_to_parent(authority, child_pda, parent_pda) @@ -345,8 +345,8 @@ pub async fn execute_sync_parent_to_child_inner( let builder = ctx.tx_builder().await?; let parent_pda = - phoenix_rise::types::TraderKey::derive_pda(&authority, trader_state.trader_pda_index, 0); - let child_pda = phoenix_rise::types::TraderKey::derive_pda( + phoenix_rise::api::TraderKey::derive_pda(&authority, trader_state.trader_pda_index, 0); + let child_pda = phoenix_rise::api::TraderKey::derive_pda( &authority, trader_state.trader_pda_index, child, @@ -392,8 +392,8 @@ pub async fn execute_add_collateral_inner( let sub_idx = subaccount.subaccount_index; let builder = ctx.tx_builder().await?; - let src_pda = phoenix_rise::types::TraderKey::derive_pda(&authority, 0, 0); - let dst_pda = phoenix_rise::types::TraderKey::derive_pda(&authority, 0, sub_idx); + let src_pda = phoenix_rise::api::TraderKey::derive_pda(&authority, 0, 0); + let dst_pda = phoenix_rise::api::TraderKey::derive_pda(&authority, 0, sub_idx); let ixs = builder .build_transfer_collateral(authority, src_pda, dst_pda, amount) diff --git a/vulcan-lib/src/commands/market.rs b/vulcan-lib/src/commands/market.rs index 271093e..07ac294 100644 --- a/vulcan-lib/src/commands/market.rs +++ b/vulcan-lib/src/commands/market.rs @@ -4,10 +4,8 @@ use crate::cli::market::MarketCommand; use crate::context::AppContext; use crate::error::VulcanError; use crate::output::{render_success, TableRenderable}; -use phoenix_rise::phoenix_rise_types::{ - candles::{ApiCandle, CandlesQueryParams, Timeframe}, - http_error::PhoenixHttpError, -}; +use phoenix_rise::api::PhoenixHttpError; +use phoenix_rise::types::prelude::{ApiCandle, CandlesQueryParams, Timeframe}; use serde::{de::DeserializeOwned, Serialize}; // ── Result types ──────────────────────────────────────────────────────── @@ -400,7 +398,7 @@ async fn fetch_api_json( pub(crate) async fn fetch_market_stats( ctx: &AppContext, symbol: &str, -) -> Result { +) -> Result { let symbol_upper = symbol.to_ascii_uppercase(); fetch_api_json( ctx, @@ -423,7 +421,7 @@ pub(crate) async fn fetch_market_quote_price( }) } -fn market_quote_price(stats: &phoenix_rise::types::MarketView) -> Option { +fn market_quote_price(stats: &phoenix_rise::types::prelude::MarketView) -> Option { stats .market .l2_orderbook @@ -432,7 +430,7 @@ fn market_quote_price(stats: &phoenix_rise::types::MarketView) -> Option { .filter(|price| price.is_finite() && *price > 0.0) } -fn decimal_to_f64(decimal: &phoenix_rise::types::Decimal) -> f64 { +fn decimal_to_f64(decimal: &phoenix_rise::types::prelude::Decimal) -> f64 { decimal.ui.parse().unwrap_or_else(|_| { let scale = 10f64.powi(decimal.decimals as i32); decimal.value as f64 / scale @@ -671,10 +669,10 @@ pub async fn execute_candles_inner( interval: &str, limit: usize, ) -> Result { - let timeframe: phoenix_rise::Timeframe = interval + let timeframe: phoenix_rise::types::prelude::Timeframe = interval .parse() .map_err(|e: String| VulcanError::validation("INVALID_INTERVAL", e))?; - let params = phoenix_rise::CandlesQueryParams::new(symbol, timeframe); + let params = phoenix_rise::types::prelude::CandlesQueryParams::new(symbol, timeframe); let candles = ctx .http_client .get_candles(params) diff --git a/vulcan-lib/src/commands/portfolio.rs b/vulcan-lib/src/commands/portfolio.rs index e4d20b6..f48798a 100644 --- a/vulcan-lib/src/commands/portfolio.rs +++ b/vulcan-lib/src/commands/portfolio.rs @@ -12,7 +12,7 @@ use crate::commands::trade::OrdersResult; use crate::context::AppContext; use crate::error::VulcanError; use crate::output::{render_success, TableRenderable}; -use phoenix_rise::types::Decimal as UiDecimal; +use phoenix_rise::types::prelude::Decimal as UiDecimal; use serde::Serialize; #[derive(Debug, Clone, Copy, Default)] diff --git a/vulcan-lib/src/commands/position.rs b/vulcan-lib/src/commands/position.rs index 190c943..dd2a14f 100644 --- a/vulcan-lib/src/commands/position.rs +++ b/vulcan-lib/src/commands/position.rs @@ -4,9 +4,10 @@ use crate::cli::position::PositionCommand; use crate::context::AppContext; use crate::error::VulcanError; use crate::output::{render_success, TableRenderable}; -use phoenix_rise::math::{SignedBaseLots, WrapperNum}; -use phoenix_rise::types::{decimal_from_signed_base_lots, Decimal as UiDecimal}; -use phoenix_rise::Side; +use phoenix_rise::math::SignedBaseLots; +use phoenix_rise::api::decimal_from_signed_base_lots; +use phoenix_rise::ix::types::Side; +use phoenix_rise::types::prelude::Decimal as UiDecimal; use serde::Serialize; use solana_pubkey::Pubkey; @@ -557,8 +558,8 @@ async fn execute_close_target_inner( let mut ixs = if subaccount_index == 0 { // Cross-margin: use standard market order - let trader_pda = phoenix_rise::types::TraderKey::derive_pda(&authority, 0, 0); - let ticket = phoenix_rise::MarketOrderTicket::builder() + let trader_pda = phoenix_rise::api::TraderKey::derive_pda(&authority, 0, 0); + let ticket = phoenix_rise::core::MarketOrderTicket::builder() .authority(authority) .trader_account(trader_pda) .symbol(symbol) @@ -572,12 +573,12 @@ async fn execute_close_target_inner( .await .map_err(|e| VulcanError::api("BUILD_CLOSE_FAILED", e.to_string()))? } else { - let trader_pda = phoenix_rise::types::TraderKey::derive_pda( + let trader_pda = phoenix_rise::api::TraderKey::derive_pda( &authority, trader_state.trader_pda_index, subaccount_index, ); - let ticket = phoenix_rise::MarketOrderTicket::builder() + let ticket = phoenix_rise::core::MarketOrderTicket::builder() .authority(authority) .trader_account(trader_pda) .symbol(symbol) @@ -598,12 +599,12 @@ async fn execute_close_target_inner( if let Some(reason) = subaccount.sweep_blocker(Some(&symbol_upper)) { (None, Some(reason)) } else { - let child_pda = phoenix_rise::types::TraderKey::derive_pda( + let child_pda = phoenix_rise::api::TraderKey::derive_pda( &authority, trader_state.trader_pda_index, subaccount_index, ); - let parent_pda = phoenix_rise::types::TraderKey::derive_pda( + let parent_pda = phoenix_rise::api::TraderKey::derive_pda( &authority, trader_state.trader_pda_index, 0, @@ -693,8 +694,8 @@ pub async fn execute_reduce_inner( let builder = ctx.tx_builder().await?; let ixs = if subaccount_index == 0 { - let trader_pda = phoenix_rise::types::TraderKey::derive_pda(&authority, 0, 0); - let ticket = phoenix_rise::MarketOrderTicket::builder() + let trader_pda = phoenix_rise::api::TraderKey::derive_pda(&authority, 0, 0); + let ticket = phoenix_rise::core::MarketOrderTicket::builder() .authority(authority) .trader_account(trader_pda) .symbol(symbol) @@ -708,12 +709,12 @@ pub async fn execute_reduce_inner( .await .map_err(|e| VulcanError::api("BUILD_REDUCE_FAILED", e.to_string()))? } else { - let trader_pda = phoenix_rise::types::TraderKey::derive_pda( + let trader_pda = phoenix_rise::api::TraderKey::derive_pda( &authority, trader_state.trader_pda_index, subaccount_index, ); - let ticket = phoenix_rise::MarketOrderTicket::builder() + let ticket = phoenix_rise::core::MarketOrderTicket::builder() .authority(authority) .trader_account(trader_pda) .symbol(symbol) @@ -773,7 +774,7 @@ pub async fn execute_tp_sl_inner( let (wallet, authority, _) = crate::commands::trade::resolve_wallet_and_pda(ctx, Some(&wallet_name)).await?; - let trader_pda = phoenix_rise::types::TraderKey::derive_pda( + let trader_pda = phoenix_rise::api::TraderKey::derive_pda( &authority, trader_state.trader_pda_index, subaccount_index, diff --git a/vulcan-lib/src/commands/setup.rs b/vulcan-lib/src/commands/setup.rs index 1568b8b..18df081 100644 --- a/vulcan-lib/src/commands/setup.rs +++ b/vulcan-lib/src/commands/setup.rs @@ -548,7 +548,7 @@ async fn maybe_register_trader( { if state.find_subaccount(0).is_some() { let trader_key = - phoenix_rise::types::TraderKey::new_with_idx(authority, state.trader_pda_index, 0); + phoenix_rise::api::TraderKey::new_with_idx(authority, state.trader_pda_index, 0); println!(" ✓ Trader account already registered"); println!(" Trader PDA: {}", trader_key.pda()); return Ok(()); diff --git a/vulcan-lib/src/commands/trade.rs b/vulcan-lib/src/commands/trade.rs index a5ed6f5..9d9f551 100644 --- a/vulcan-lib/src/commands/trade.rs +++ b/vulcan-lib/src/commands/trade.rs @@ -5,9 +5,10 @@ use crate::context::AppContext; use crate::error::VulcanError; use crate::output::{render_success, TableRenderable}; use crate::wallet::ResolvedSigner; -use phoenix_rise::types::{Trader, TraderKey}; +use phoenix_rise::api::{Trader, TraderKey}; use phoenix_rise::{ - BracketLeg, BracketLegOrders, BracketLegSize, IsolatedCollateralFlow, OrderFlags, Side, + core::{BracketLeg, BracketLegOrders, BracketLegSize}, + ix::types::{IsolatedCollateralFlow, OrderFlags, Side}, }; use serde::Serialize; use solana_keychain::SignTransactionResult; @@ -373,7 +374,7 @@ pub async fn resolve_wallet_and_pda( .map_err(|e| VulcanError::validation("INVALID_PUBKEY", e.to_string()))?; // Default trader PDA: pda_index=0, subaccount_index=0 (cross-margin) - let trader_key = phoenix_rise::types::TraderKey::new(authority); + let trader_key = phoenix_rise::api::TraderKey::new(authority); let trader_pda = trader_key.pda(); if ctx.dry_run { @@ -448,12 +449,12 @@ pub(crate) async fn sdk_trader_for_isolated_builder( pub fn bracket_leg_orders( tp: Option, sl: Option, -) -> Option { +) -> Option { if tp.is_none() && sl.is_none() { return None; } - Some(phoenix_rise::BracketLegOrders { + Some(phoenix_rise::core::BracketLegOrders { take_profit: tp.map(BracketLeg::new), stop_loss: sl.map(BracketLeg::new), }) @@ -518,7 +519,7 @@ pub async fn send_or_dry_run_with_cu_limit( let cu_limit = cu_limit.min(MAX_CU_LIMIT); let mut all_ixs = Vec::with_capacity(ixs.len() + 1); all_ixs.push( - solana_sdk::compute_budget::ComputeBudgetInstruction::set_compute_unit_limit(cu_limit), + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit(cu_limit), ); all_ixs.extend(ixs); @@ -560,11 +561,12 @@ pub async fn send_or_dry_run_with_cu_limit( /// subaccount flows. pub(crate) async fn conditional_orders_init_ixs_if_needed( ctx: &AppContext, - builder: &phoenix_rise::PhoenixTxBuilder<'_>, + builder: &phoenix_rise::core::PhoenixTxBuilder<'_>, authority: Pubkey, trader_pda: Pubkey, ) -> Result, VulcanError> { - let conditional_orders = phoenix_rise::get_conditional_orders_address(&trader_pda); + let conditional_orders = phoenix_rise::ix::constants::get_conditional_orders_address(&trader_pda) + .map_err(|e| VulcanError::api("CONDITIONAL_ORDERS_PDA_FAILED", e.to_string()))?; let rpc_client = ctx.rpc_client_async(); let response = rpc_client .get_account_with_commitment(&conditional_orders, rpc_client.commitment()) @@ -607,15 +609,15 @@ fn insert_before_first_order_or_conditional_ix( } fn is_order_or_position_conditional_ix(ix: &solana_sdk::instruction::Instruction) -> bool { - ix.program_id == *phoenix_rise::phoenix_rise_ix::PHOENIX_PROGRAM_ID + ix.program_id == *phoenix_rise::ix::PHOENIX_PROGRAM_ID && (ix .data - .starts_with(&phoenix_rise::phoenix_rise_ix::place_market_order_discriminant()) + .starts_with(&phoenix_rise::ix::PhoenixInstruction::PlaceMarketOrder.discriminant()) || ix .data - .starts_with(&phoenix_rise::phoenix_rise_ix::place_limit_order_discriminant()) + .starts_with(&phoenix_rise::ix::PhoenixInstruction::PlaceLimitOrder.discriminant()) || ix.data.starts_with( - &phoenix_rise::phoenix_rise_ix::place_position_conditional_order_discriminant(), + &phoenix_rise::ix::PhoenixInstruction::PlacePositionConditionalOrder.discriminant(), )) } @@ -1072,7 +1074,7 @@ pub async fn execute_market_order_inner( )); } - let mut ticket_builder = phoenix_rise::MarketOrderTicket::builder() + let mut ticket_builder = phoenix_rise::core::MarketOrderTicket::builder() .authority(authority) .trader_account(trader_pda) .symbol(symbol) @@ -1082,7 +1084,7 @@ pub async fn execute_market_order_inner( if let Some(bracket) = bracket { let rpc_client = Arc::new(ctx.rpc_client_async()); ticket_builder = ticket_builder - .bracket_leg_ticket(phoenix_rise::BracketLegTicket::new(rpc_client, bracket)); + .bracket_leg_ticket(phoenix_rise::core::BracketLegTicket::new(rpc_client, bracket)); } let ticket = ticket_builder @@ -1239,7 +1241,7 @@ pub async fn execute_limit_order_inner( ); } - let mut ticket_builder = phoenix_rise::LimitOrderTicket::builder() + let mut ticket_builder = phoenix_rise::core::LimitOrderTicket::builder() .authority(authority) .trader_account(sub_key.pda()) .symbol(symbol) @@ -1255,7 +1257,7 @@ pub async fn execute_limit_order_inner( if let Some(bracket) = bracket { let rpc_client = Arc::new(ctx.rpc_client_async()); ticket_builder = ticket_builder - .bracket_leg_ticket(phoenix_rise::BracketLegTicket::new(rpc_client, bracket)); + .bracket_leg_ticket(phoenix_rise::core::BracketLegTicket::new(rpc_client, bracket)); } let ticket = ticket_builder @@ -1326,7 +1328,7 @@ pub async fn execute_limit_order_inner( )); } - let mut ticket_builder = phoenix_rise::LimitOrderTicket::builder() + let mut ticket_builder = phoenix_rise::core::LimitOrderTicket::builder() .authority(authority) .trader_account(trader_pda) .symbol(symbol) @@ -1341,7 +1343,7 @@ pub async fn execute_limit_order_inner( if let Some(bracket) = bracket { let rpc_client = Arc::new(ctx.rpc_client_async()); ticket_builder = ticket_builder - .bracket_leg_ticket(phoenix_rise::BracketLegTicket::new(rpc_client, bracket)); + .bracket_leg_ticket(phoenix_rise::core::BracketLegTicket::new(rpc_client, bracket)); } let ticket = ticket_builder @@ -1415,7 +1417,7 @@ pub async fn execute_multi_limit_order_inner( let mut all_ixs: Vec = Vec::new(); for (legs, side) in [(&bids, Side::Bid), (&asks, Side::Ask)] { for leg in legs.iter() { - let mut ticket_builder = phoenix_rise::LimitOrderTicket::builder() + let mut ticket_builder = phoenix_rise::core::LimitOrderTicket::builder() .authority(authority) .trader_account(trader_pda) .symbol(symbol) @@ -1425,7 +1427,7 @@ pub async fn execute_multi_limit_order_inner( if let Some(bracket) = bracket_leg_orders(leg.tp, leg.sl) { ticket_builder = ticket_builder.bracket_leg_ticket( - phoenix_rise::BracketLegTicket::new(rpc_client.clone(), bracket), + phoenix_rise::core::BracketLegTicket::new(rpc_client.clone(), bracket), ); } @@ -1552,7 +1554,7 @@ async fn execute_limit_order( struct LimitOrderCancelSelection { order_ids: Vec, - cancel_ids_by_subaccount: BTreeMap>, + cancel_ids_by_subaccount: BTreeMap>, } async fn api_limit_order_cancel_selection( @@ -1592,12 +1594,12 @@ async fn api_limit_order_cancel_selection( } } - let mut cancel_ids_by_subaccount: BTreeMap> = BTreeMap::new(); + let mut cancel_ids_by_subaccount: BTreeMap> = BTreeMap::new(); for order in &selected { cancel_ids_by_subaccount .entry(order.subaccount_index) .or_default() - .push(phoenix_rise::CancelId::new( + .push(phoenix_rise::ix::types::CancelId::new( order.price_ticks, order.order_sequence_number_u64, )); @@ -2183,9 +2185,9 @@ pub async fn execute_cancel_tpsl_inner( let mut ixs = Vec::new(); if cancel_tp { let tp_direction = if is_long { - phoenix_rise::Direction::GreaterThan + phoenix_rise::ix::types::Direction::GreaterThan } else { - phoenix_rise::Direction::LessThan + phoenix_rise::ix::types::Direction::LessThan }; let tp_ixs = builder .build_cancel_bracket_leg(authority, trader_pda, &symbol_upper, tp_direction) @@ -2194,9 +2196,9 @@ pub async fn execute_cancel_tpsl_inner( } if cancel_sl { let sl_direction = if is_long { - phoenix_rise::Direction::LessThan + phoenix_rise::ix::types::Direction::LessThan } else { - phoenix_rise::Direction::GreaterThan + phoenix_rise::ix::types::Direction::GreaterThan }; let sl_ixs = builder .build_cancel_bracket_leg(authority, trader_pda, &symbol_upper, sl_direction) @@ -2416,7 +2418,7 @@ fn build_cancel_conditional_order_ix( disable_first: bool, disable_second: bool, ) -> Result { - let params = phoenix_rise::CancelConditionalOrderParams::builder() + let params = phoenix_rise::ix::conditional_order::CancelConditionalOrderParams::builder() .trader_account(trader_pda) .trader_wallet(authority) .orderbook(orderbook) @@ -2425,7 +2427,7 @@ fn build_cancel_conditional_order_ix( .disable_second(disable_second) .build() .map_err(|e| VulcanError::api("BUILD_CANCEL_COND_FAILED", e.to_string()))?; - let ix = phoenix_rise::phoenix_rise_ix::create_cancel_conditional_order_ix(params) + let ix = phoenix_rise::ix::conditional_order::create_cancel_conditional_order_ix(params) .map_err(|e| VulcanError::api("BUILD_CANCEL_COND_FAILED", e.to_string()))?; Ok(ix.into()) } @@ -2472,7 +2474,7 @@ mod conditional_orders_init_tests { fn phoenix_ix(discriminant: [u8; 8]) -> solana_sdk::instruction::Instruction { test_ix( - *phoenix_rise::phoenix_rise_ix::PHOENIX_PROGRAM_ID, + *phoenix_rise::ix::PHOENIX_PROGRAM_ID, discriminant.to_vec(), ) } @@ -2482,9 +2484,9 @@ mod conditional_orders_init_tests { let setup_ix = test_ix(Pubkey::new_unique(), vec![1]); let init_ix = test_ix(Pubkey::new_unique(), vec![2]); let market_ix = - phoenix_ix(phoenix_rise::phoenix_rise_ix::place_market_order_discriminant()); + phoenix_ix(phoenix_rise::ix::PhoenixInstruction::PlaceMarketOrder.discriminant()); let conditional_ix = phoenix_ix( - phoenix_rise::phoenix_rise_ix::place_position_conditional_order_discriminant(), + phoenix_rise::ix::PhoenixInstruction::PlacePositionConditionalOrder.discriminant(), ); let mut ixs = vec![setup_ix.clone(), market_ix.clone(), conditional_ix.clone()]; @@ -2501,7 +2503,7 @@ mod conditional_orders_init_tests { let setup_ix = test_ix(Pubkey::new_unique(), vec![1]); let init_ix = test_ix(Pubkey::new_unique(), vec![2]); let conditional_ix = phoenix_ix( - phoenix_rise::phoenix_rise_ix::place_position_conditional_order_discriminant(), + phoenix_rise::ix::PhoenixInstruction::PlacePositionConditionalOrder.discriminant(), ); let mut ixs = vec![setup_ix.clone(), conditional_ix.clone()]; diff --git a/vulcan-lib/src/commands/trader_state.rs b/vulcan-lib/src/commands/trader_state.rs index def019f..456738c 100644 --- a/vulcan-lib/src/commands/trader_state.rs +++ b/vulcan-lib/src/commands/trader_state.rs @@ -12,13 +12,14 @@ use crate::commands::conditional_orders::{ use crate::context::AppContext; use crate::error::VulcanError; use phoenix_rise::math::{ - PerpAssetMetadata, QuoteLots, Side as RiseSide, SignedBaseLots, SignedQuoteLots, Ticks, - TraderPortfolio, WrapperNum, + PerpAssetMetadata, QuoteLots, SignedBaseLots, SignedQuoteLots, Ticks, TraderPortfolio, }; -use phoenix_rise::types::trader_state::LimitOrder as SdkLimitOrder; -use phoenix_rise::types::{ - decimal_from_signed_base_lots, CooldownStatus, Decimal as UiDecimal, MarketStatsUpdate, - PhoenixMetadata, Position as SdkPosition, SubaccountState, Trader, TraderKey, +use phoenix_rise::api::{ + decimal_from_signed_base_lots, LimitOrder as SdkLimitOrder, PhoenixMetadata, + Position as SdkPosition, SubaccountState, Trader, TraderKey, +}; +use phoenix_rise::types::prelude::{ + CooldownStatus, Decimal as UiDecimal, MarketStatsUpdate, Side as ApiSide, TraderStateCapabilities, }; use serde::{Deserialize, Serialize}; @@ -121,7 +122,7 @@ pub(crate) struct TraderStateMarketOrders { #[serde(rename_all = "camelCase")] pub(crate) struct TraderStateLimitOrderRow { pub(crate) order_sequence_number: String, - pub(crate) side: RiseSide, + pub(crate) side: ApiSide, pub(crate) price_ticks: String, #[serde(default)] pub(crate) price_usd: Option, @@ -155,7 +156,7 @@ pub(crate) struct TraderStateTriggerRow { #[serde(rename_all = "camelCase")] pub(crate) struct TraderStateTrigger { pub(crate) trigger_price_ticks: String, - pub(crate) side: RiseSide, + pub(crate) side: ApiSide, #[serde(default)] pub(crate) max_size_lots: Option, #[serde(default)] @@ -343,15 +344,18 @@ impl TraderStatePosition { fn to_sdk_position(&self) -> SdkPosition { SdkPosition { symbol: self.symbol.clone(), + position_sequence_number: 0, base_position_lots: self.base_lots(), entry_price_ticks: parse_i64(&self.entry_price_ticks), entry_price_usd: self .entry_price_usd .parse() - .unwrap_or(phoenix_rise::Decimal::ZERO), + .unwrap_or_default(), virtual_quote_position_lots: parse_i64(&self.virtual_quote_position_lots), unsettled_funding_quote_lots: parse_i64(&self.unsettled_funding_quote_lots), accumulated_funding_quote_lots: parse_i64(&self.accumulated_funding_quote_lots), + take_profit_triggers: Vec::new(), + stop_loss_triggers: Vec::new(), } } } @@ -363,12 +367,13 @@ impl TraderStateLimitOrderRow { order_sequence_number: parse_u64(&self.order_sequence_number), side: format!("{:?}", self.side), order_type: String::new(), + conditional_kind: None, price_ticks: parse_i64(&self.price_ticks), price_usd: self .price_usd .as_deref() .and_then(|price| price.parse().ok()) - .unwrap_or(phoenix_rise::Decimal::ZERO), + .unwrap_or_default(), size_remaining_lots: parse_u64(&self.size_remaining_lots), initial_size_lots: parse_u64(&self.initial_size_lots), reduce_only: self.reduce_only, @@ -949,11 +954,11 @@ fn first_trigger_price_decimal( } fn signed_quote_decimal(value: SignedQuoteLots) -> UiDecimal { - value.into() + UiDecimal::from_i64_with_decimals(value.as_inner(), 0) } fn quote_decimal(value: QuoteLots) -> UiDecimal { - value.into() + UiDecimal::from_i64_with_decimals(value.as_inner() as i64, 0) } fn price_decimal_from_str(value: &str) -> UiDecimal { diff --git a/vulcan-lib/src/context.rs b/vulcan-lib/src/context.rs index 115fbb4..3bacf34 100644 --- a/vulcan-lib/src/context.rs +++ b/vulcan-lib/src/context.rs @@ -8,12 +8,17 @@ use crate::wallet::WalletStore; use anyhow::Result; use phoenix_rise::math::{ BaseLots, BasisPoints, Constant, LeverageTier, LeverageTiers, PerpAssetMetadata, - QuoteLotsPerBaseLotPerTick, SignedQuoteLotsPerBaseLot, Ticks, WrapperNum, + QuoteLotsPerBaseLotPerTick, SignedQuoteLotsPerBaseLot, Ticks, }; -use phoenix_rise::types::accounts::{PerpAssetMap, PerpAssetMetadata as AccountPerpAssetMetadata}; -use phoenix_rise::types::{ExchangeSnapshotView, PhoenixMetadata}; -use phoenix_rise::{PhoenixHttpClient, PhoenixTxBuilder}; +use phoenix_rise::accounts::perp_asset_map::{ + LeverageTier as AccountLeverageTier, PerpAssetMap, + PerpAssetMetadata as AccountPerpAssetMetadata, +}; +use phoenix_rise::api::{PhoenixHttpClient, PhoenixMetadata}; +use phoenix_rise::core::PhoenixTxBuilder; +use phoenix_rise::types::prelude::ExchangeSnapshotView; use serde::{Deserialize, Serialize}; +use solana_commitment_config::CommitmentConfig; use solana_pubkey::Pubkey; use std::path::{Path, PathBuf}; use std::str::FromStr; @@ -171,7 +176,7 @@ impl AppContext { self.metadata .get_or_try_init(|| async { let exchange = self.exchange_snapshot().await?; - let view: phoenix_rise::types::ExchangeView = + let view: phoenix_rise::api::ExchangeView = exchange.into_exchange_response().into(); Ok(PhoenixMetadata::new(view)) }) @@ -236,8 +241,15 @@ impl AppContext { crate::error::VulcanError::api("PERP_ASSET_MAP_DECODE_FAILED", e.to_string()) })?; - for (symbol, account_metadata) in perp_asset_map.iter() { - let perp_metadata = perp_asset_metadata_from_account(symbol, account_metadata)?; + for entry in perp_asset_map.iter() { + let entry = entry.map_err(|e| { + crate::error::VulcanError::api("PERP_ASSET_MAP_DECODE_FAILED", e.to_string()) + })?; + if !entry.metadata.is_active() { + continue; + } + let symbol = entry.symbol.as_str(); + let perp_metadata = perp_asset_metadata_from_account(symbol, &entry.metadata)?; metadata .all_perp_asset_metadata_mut() .insert(symbol.to_ascii_uppercase(), perp_metadata); @@ -258,7 +270,7 @@ impl AppContext { pub fn rpc_client(&self) -> solana_rpc_client::rpc_client::RpcClient { solana_rpc_client::rpc_client::RpcClient::new_with_commitment( self.config.network.rpc_url.clone(), - solana_sdk::commitment_config::CommitmentConfig::confirmed(), + CommitmentConfig::confirmed(), ) } @@ -301,7 +313,7 @@ impl AppContext { pub fn rpc_client_async(&self) -> solana_rpc_client::nonblocking::rpc_client::RpcClient { solana_rpc_client::nonblocking::rpc_client::RpcClient::new_with_commitment( self.config.network.rpc_url.clone(), - solana_sdk::commitment_config::CommitmentConfig::confirmed(), + CommitmentConfig::confirmed(), ) } } @@ -365,15 +377,15 @@ fn perp_asset_metadata_from_account( symbol: &str, account_metadata: &AccountPerpAssetMetadata, ) -> Result { - let static_params = &account_metadata.static_market_params; - let risk_params = &account_metadata.risk_params; - let mark_price_ticks = Ticks::new_checked(account_metadata.oracle_price.mark_price.price.ticks) + let static_params = account_metadata.static_market_params(); + let risk_params = account_metadata.risk_params(); + let mark_price_ticks = Ticks::new_checked(account_metadata.oracle_price().mark_price.price.ticks) .map_err(|e| crate::error::VulcanError::api("PERP_ASSET_MAP_INVALID", e.to_string()))?; let leverage_tiers = leverage_tiers_from_account(&risk_params.leverage_tiers)?; let risk_factors = risk_factors_from_account(&risk_params.risk_factors)?; let mut metadata = PerpAssetMetadata::new( symbol.to_ascii_uppercase(), - static_params.asset_id as u64, + static_params.asset_id() as u64, static_params.base_lot_decimals, mark_price_ticks, QuoteLotsPerBaseLotPerTick::new(static_params.tick_size), @@ -387,13 +399,13 @@ fn perp_asset_metadata_from_account( )?, ); metadata.cumulative_funding_rate = SignedQuoteLotsPerBaseLot::new( - account_metadata.funding_accumulator.cumulative_funding_rate, + account_metadata.funding_accumulator().cumulative_funding_rate, ); Ok(metadata) } fn leverage_tiers_from_account( - tiers: &[phoenix_rise::types::accounts::LeverageTier], + tiers: &[AccountLeverageTier], ) -> Result { if tiers.len() != 4 { return Err(crate::error::VulcanError::api( @@ -401,7 +413,7 @@ fn leverage_tiers_from_account( format!("Expected 4 leverage tiers, got {}", tiers.len()), )); } - let convert = |tier: &phoenix_rise::types::accounts::LeverageTier| -> Result { + let convert = |tier: &AccountLeverageTier| -> Result { Ok(LeverageTier { upper_bound_size: BaseLots::new(tier.upper_bound_size), max_leverage: Constant::new(tier.max_leverage), @@ -445,7 +457,7 @@ fn u16_checked(value: u64, field: &str) -> Result ExchangeSnapshotView { ExchangeSnapshotView { diff --git a/vulcan-lib/src/crypto/encryption.rs b/vulcan-lib/src/crypto/encryption.rs index 1169399..fe3dca5 100644 --- a/vulcan-lib/src/crypto/encryption.rs +++ b/vulcan-lib/src/crypto/encryption.rs @@ -10,6 +10,7 @@ use anyhow::{anyhow, Result}; use argon2::{password_hash::SaltString, Algorithm, Argon2, Params, PasswordHasher, Version}; use rand::{rngs::OsRng, RngCore}; use serde::{Deserialize, Serialize}; +use std::convert::TryInto; /// Encrypted data with metadata needed for decryption #[derive(Debug, Clone, Serialize, Deserialize)] @@ -84,13 +85,13 @@ pub fn encrypt(plaintext: &[u8], password: &str) -> Result { let mut nonce_bytes = [0u8; 12]; OsRng.fill_bytes(&mut nonce_bytes); - let nonce = Nonce::from_slice(&nonce_bytes); + let nonce = Nonce::from(nonce_bytes); let cipher = Aes256Gcm::new_from_slice(&key).map_err(|e| anyhow!("Failed to create cipher: {}", e))?; let ciphertext = cipher - .encrypt(nonce, plaintext) + .encrypt(&nonce, plaintext) .map_err(|e| anyhow!("Encryption failed: {}", e))?; Ok(EncryptedData { @@ -121,10 +122,14 @@ pub fn decrypt(encrypted: &EncryptedData, password: &str) -> Result> { let cipher = Aes256Gcm::new_from_slice(&key).map_err(|e| anyhow!("Failed to create cipher: {}", e))?; - let nonce = Nonce::from_slice(&nonce_bytes); + let nonce_bytes: [u8; 12] = nonce_bytes + .as_slice() + .try_into() + .map_err(|_| anyhow!("Invalid nonce length"))?; + let nonce = Nonce::from(nonce_bytes); let plaintext = cipher - .decrypt(nonce, ciphertext.as_ref()) + .decrypt(&nonce, ciphertext.as_ref()) .map_err(|_| anyhow!("Decryption failed - invalid password or corrupted data"))?; Ok(plaintext) diff --git a/vulcan-lib/src/history/mod.rs b/vulcan-lib/src/history/mod.rs index e4540e2..2a59dd7 100644 --- a/vulcan-lib/src/history/mod.rs +++ b/vulcan-lib/src/history/mod.rs @@ -2,7 +2,7 @@ use crate::context::AppContext; use crate::error::VulcanError; -use phoenix_rise::{ +use phoenix_rise::types::prelude::{ CollateralHistoryQueryParams, FundingHistoryQueryParams, OrderHistoryQueryParams, PnlQueryParams, PnlResolution, TradeHistoryQueryParams, }; diff --git a/vulcan-lib/src/mcp/server.rs b/vulcan-lib/src/mcp/server.rs index f37a679..93fd38d 100644 --- a/vulcan-lib/src/mcp/server.rs +++ b/vulcan-lib/src/mcp/server.rs @@ -12,7 +12,7 @@ use crate::commands::portfolio::{execute_snapshot_inner, PortfolioSections}; use crate::context::AppContext; use crate::mcp::registry::{self, ToolDef}; use crate::paper::{PaperOrderType, PaperSide, PaperSizeInput}; -use phoenix_rise::Side; +use phoenix_rise::ix::types::Side; use rmcp::model::*; use rmcp::ServerHandler; use serde_json::Value; diff --git a/vulcan-lib/src/mcp/session_wallet.rs b/vulcan-lib/src/mcp/session_wallet.rs index dfda3ed..d90c79e 100644 --- a/vulcan-lib/src/mcp/session_wallet.rs +++ b/vulcan-lib/src/mcp/session_wallet.rs @@ -37,7 +37,7 @@ impl SessionWallet { .map_err(|e| VulcanError::validation("INVALID_PUBKEY", e.to_string()))?; let key_guard = Zeroizing::new(wallet.to_bytes().to_vec()); let resolved = ResolvedSigner::from_unlocked_wallet_file(wallet_file, wallet)?; - let trader_key = phoenix_rise::types::TraderKey::new(authority); + let trader_key = phoenix_rise::api::TraderKey::new(authority); let trader_pda = trader_key.pda(); Ok(Self { diff --git a/vulcan-lib/src/paper/mod.rs b/vulcan-lib/src/paper/mod.rs index 2896a6b..f656931 100644 --- a/vulcan-lib/src/paper/mod.rs +++ b/vulcan-lib/src/paper/mod.rs @@ -1383,7 +1383,7 @@ async fn fetch_replay_candles( } const MAX_LOOKBACK_MS: i64 = 30 * 24 * 60 * 60 * 1000; let effective_since = since_ms.max(until_ms - MAX_LOOKBACK_MS); - let params = phoenix_rise::CandlesQueryParams::new(symbol, phoenix_rise::Timeframe::Hour1) + let params = phoenix_rise::types::prelude::CandlesQueryParams::new(symbol, phoenix_rise::types::prelude::Timeframe::Hour1) .with_start_time(effective_since) .with_end_time(until_ms); let Ok(raw) = ctx.http_client.get_candles(params).await else { diff --git a/vulcan-lib/src/strategy/execution.rs b/vulcan-lib/src/strategy/execution.rs index c108011..5a14e0b 100644 --- a/vulcan-lib/src/strategy/execution.rs +++ b/vulcan-lib/src/strategy/execution.rs @@ -8,7 +8,7 @@ use crate::paper::PaperSide; use crate::strategy::types::{ StrategyExecution, StrategyMarginMode, StrategyMarketSnapshot, StrategySide, }; -use phoenix_rise::Side; +use phoenix_rise::ix::types::Side; pub(crate) async fn execute_paper_market( ctx: &AppContext, diff --git a/vulcan-lib/src/strategy/grid.rs b/vulcan-lib/src/strategy/grid.rs index a3e71ad..74a4fd9 100644 --- a/vulcan-lib/src/strategy/grid.rs +++ b/vulcan-lib/src/strategy/grid.rs @@ -23,7 +23,7 @@ use crate::strategy::types::{ StrategySliceStatus, StrategyTick, StrategyWalletContext, }; use chrono::Utc; -use phoenix_rise::Side; +use phoenix_rise::ix::types::Side; use rand::RngCore; use serde::{Deserialize, Serialize}; use std::collections::{BTreeMap, HashSet}; @@ -2765,7 +2765,7 @@ mod tests { #[test] fn snap_price_with_calc_quantizes_to_nearest_tick() { - use phoenix_rise::math::{MarketCalculator, QuoteLotsPerBaseLotPerTick, WrapperNum}; + use phoenix_rise::math::{MarketCalculator, QuoteLotsPerBaseLotPerTick}; // base_lot_decimals=2, tick_size=100 → 1 tick = $0.01 (ZEC-like). let calc = MarketCalculator::new(2, QuoteLotsPerBaseLotPerTick::new(100)); @@ -2935,7 +2935,7 @@ mod tests { margin_feasibility: None, safety_policy: StrategySafetyPolicy::default(), }; - use phoenix_rise::math::{MarketCalculator, QuoteLotsPerBaseLotPerTick, WrapperNum}; + use phoenix_rise::math::{MarketCalculator, QuoteLotsPerBaseLotPerTick}; let calc = MarketCalculator::new(2, QuoteLotsPerBaseLotPerTick::new(100)); let replacement = replacement_level(&config, &level, &calc).unwrap(); assert_eq!(replacement.entry_side, StrategySide::Sell); @@ -2946,7 +2946,7 @@ mod tests { #[test] fn replacement_snaps_to_tick() { - use phoenix_rise::math::{MarketCalculator, QuoteLotsPerBaseLotPerTick, WrapperNum}; + use phoenix_rise::math::{MarketCalculator, QuoteLotsPerBaseLotPerTick}; // 1 tick = $0.01 (ZEC-like market). let calc = MarketCalculator::new(2, QuoteLotsPerBaseLotPerTick::new(100)); // Reproduces the ZEC failure mode: a sell at 570.71 fills, and the raw diff --git a/vulcan-lib/src/wallet/keypair.rs b/vulcan-lib/src/wallet/keypair.rs index de8bcf8..b461c0d 100644 --- a/vulcan-lib/src/wallet/keypair.rs +++ b/vulcan-lib/src/wallet/keypair.rs @@ -100,7 +100,8 @@ impl Wallet { /// Get a Solana SDK Keypair from this wallet #[allow(deprecated)] pub fn to_solana_keypair(&self) -> Result { - solana_sdk::signature::Keypair::from_bytes(&self.keypair_bytes) + let encoded = bs58::encode(&self.keypair_bytes).into_string(); + solana_sdk::signature::Keypair::try_from_base58_string(&encoded) .map_err(|e| anyhow!("Failed to create Solana keypair: {}", e)) } diff --git a/vulcan-lib/src/wallet/signer.rs b/vulcan-lib/src/wallet/signer.rs index a860486..c632e45 100644 --- a/vulcan-lib/src/wallet/signer.rs +++ b/vulcan-lib/src/wallet/signer.rs @@ -11,9 +11,9 @@ use solana_keychain::{AwsKmsSigner, AwsKmsSignerConfig}; use solana_keychain::{ CdpSigner, CdpSignerConfig, CrossmintSigner, CrossmintSignerConfig, DfnsSigner, DfnsSignerConfig, GcpKmsSigner, GcpKmsSignerConfig, MemorySigner, OpenfortSigner, - OpenfortSignerConfig, ParaSigner, ParaSignerConfig, PrivySigner, PrivySignerConfig, - Signer as KeychainSigner, SolanaSigner, TurnkeySigner, TurnkeySignerConfig, VaultSigner, - VaultSignerConfig, + OpenfortSignerConfig, ParaSigner, ParaSignerConfig, PrivyAuthorizationRequestExpiry, + PrivySigner, PrivySignerConfig, Signer as KeychainSigner, SolanaSigner, TurnkeySigner, + TurnkeySignerConfig, VaultSigner, VaultSignerConfig, }; use solana_pubkey::Pubkey; use std::str::FromStr; @@ -122,6 +122,8 @@ impl ResolvedSigner { wallet_id, api_base_url, http_client_config: None, + authorization_context: None, + authorization_request_expiry: PrivyAuthorizationRequestExpiry::Default, }); signer.init().await.map_err(signer_init_failed)?; KeychainSigner::Privy(signer) @@ -276,7 +278,7 @@ impl ResolvedSigner { } fn new(wallet_name: String, authority: Pubkey, signer: Option>) -> Self { - let trader_pda = phoenix_rise::types::TraderKey::new(authority).pda(); + let trader_pda = phoenix_rise::api::TraderKey::new(authority).pda(); Self { signer, wallet_name, diff --git a/vulcan-lib/src/watch.rs b/vulcan-lib/src/watch.rs index 9a84a82..4465455 100644 --- a/vulcan-lib/src/watch.rs +++ b/vulcan-lib/src/watch.rs @@ -5,7 +5,7 @@ use crate::context::AppContext; use crate::error::VulcanError; -use phoenix_rise::PhoenixWSClient; +use phoenix_rise::api::PhoenixWSClient; use solana_pubkey::Pubkey; /// What WS channel to subscribe to for live updates. diff --git a/vulcan/Cargo.toml b/vulcan/Cargo.toml index d6a0b01..3698566 100644 --- a/vulcan/Cargo.toml +++ b/vulcan/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vulcan" -version = "0.6.3" +version = "0.6.4" edition = "2021" description = "Vulcan — AI-native CLI for Phoenix Perpetuals DEX on Solana" From 6df9c728c660f8ee76cb1151452b09f468c4e899 Mon Sep 17 00:00:00 2001 From: gallynaut Date: Mon, 29 Jun 2026 17:17:07 -0400 Subject: [PATCH 2/6] cargo fmt --- vulcan-lib/src/commands/account.rs | 7 ++--- vulcan-lib/src/commands/conditional_orders.rs | 4 +-- vulcan-lib/src/commands/margin.rs | 14 +++------- vulcan-lib/src/commands/position.rs | 2 +- vulcan-lib/src/commands/trade.rs | 28 ++++++++++--------- vulcan-lib/src/commands/trader_state.rs | 11 +++----- vulcan-lib/src/context.rs | 17 ++++++----- vulcan-lib/src/paper/mod.rs | 9 ++++-- 8 files changed, 44 insertions(+), 48 deletions(-) diff --git a/vulcan-lib/src/commands/account.rs b/vulcan-lib/src/commands/account.rs index 914ae44..1dec6f0 100644 --- a/vulcan-lib/src/commands/account.rs +++ b/vulcan-lib/src/commands/account.rs @@ -269,11 +269,8 @@ pub async fn execute(ctx: &AppContext, cmd: AccountCommand) -> Result<(), Vulcan let sig = crate::commands::trade::send_or_dry_run(ctx, ixs, &wallet).await?; - let trader_key = phoenix_rise::api::TraderKey::new_with_idx( - authority, - pda_index, - subaccount_index, - ); + let trader_key = + phoenix_rise::api::TraderKey::new_with_idx(authority, pda_index, subaccount_index); let result = RegisterResult { authority: authority.to_string(), trader_pda: trader_key.pda().to_string(), diff --git a/vulcan-lib/src/commands/conditional_orders.rs b/vulcan-lib/src/commands/conditional_orders.rs index 74c1e03..6b4e553 100644 --- a/vulcan-lib/src/commands/conditional_orders.rs +++ b/vulcan-lib/src/commands/conditional_orders.rs @@ -10,11 +10,11 @@ use crate::commands::trader_state::{ use crate::context::AppContext; use crate::error::VulcanError; use phoenix_rise::accounts::owned::{ConditionalOrderCollection, StopLossTradeSide}; +use phoenix_rise::api::PhoenixMetadata; use phoenix_rise::ix::constants::get_conditional_orders_address; use phoenix_rise::math::{BaseLots, Side as RiseSide, Ticks}; -use phoenix_rise::api::PhoenixMetadata; -use solana_pubkey::Pubkey; use solana_commitment_config::CommitmentConfig; +use solana_pubkey::Pubkey; use std::collections::{HashMap, HashSet}; /// Fetch and decode the on-chain `ConditionalOrderCollection` for one trader. diff --git a/vulcan-lib/src/commands/margin.rs b/vulcan-lib/src/commands/margin.rs index c2272cc..95bc01d 100644 --- a/vulcan-lib/src/commands/margin.rs +++ b/vulcan-lib/src/commands/margin.rs @@ -291,11 +291,8 @@ pub async fn execute_transfer_child_to_parent_inner( let builder = ctx.tx_builder().await?; - let child_pda = phoenix_rise::api::TraderKey::derive_pda( - &authority, - trader_state.trader_pda_index, - child, - ); + let child_pda = + phoenix_rise::api::TraderKey::derive_pda(&authority, trader_state.trader_pda_index, child); let parent_pda = phoenix_rise::api::TraderKey::derive_pda(&authority, trader_state.trader_pda_index, 0); @@ -346,11 +343,8 @@ pub async fn execute_sync_parent_to_child_inner( let parent_pda = phoenix_rise::api::TraderKey::derive_pda(&authority, trader_state.trader_pda_index, 0); - let child_pda = phoenix_rise::api::TraderKey::derive_pda( - &authority, - trader_state.trader_pda_index, - child, - ); + let child_pda = + phoenix_rise::api::TraderKey::derive_pda(&authority, trader_state.trader_pda_index, child); let ixs = builder .build_sync_parent_to_child(authority, parent_pda, child_pda) diff --git a/vulcan-lib/src/commands/position.rs b/vulcan-lib/src/commands/position.rs index dd2a14f..84be9fc 100644 --- a/vulcan-lib/src/commands/position.rs +++ b/vulcan-lib/src/commands/position.rs @@ -4,9 +4,9 @@ use crate::cli::position::PositionCommand; use crate::context::AppContext; use crate::error::VulcanError; use crate::output::{render_success, TableRenderable}; -use phoenix_rise::math::SignedBaseLots; use phoenix_rise::api::decimal_from_signed_base_lots; use phoenix_rise::ix::types::Side; +use phoenix_rise::math::SignedBaseLots; use phoenix_rise::types::prelude::Decimal as UiDecimal; use serde::Serialize; use solana_pubkey::Pubkey; diff --git a/vulcan-lib/src/commands/trade.rs b/vulcan-lib/src/commands/trade.rs index 9d9f551..d2b7dd9 100644 --- a/vulcan-lib/src/commands/trade.rs +++ b/vulcan-lib/src/commands/trade.rs @@ -565,8 +565,9 @@ pub(crate) async fn conditional_orders_init_ixs_if_needed( authority: Pubkey, trader_pda: Pubkey, ) -> Result, VulcanError> { - let conditional_orders = phoenix_rise::ix::constants::get_conditional_orders_address(&trader_pda) - .map_err(|e| VulcanError::api("CONDITIONAL_ORDERS_PDA_FAILED", e.to_string()))?; + let conditional_orders = + phoenix_rise::ix::constants::get_conditional_orders_address(&trader_pda) + .map_err(|e| VulcanError::api("CONDITIONAL_ORDERS_PDA_FAILED", e.to_string()))?; let rpc_client = ctx.rpc_client_async(); let response = rpc_client .get_account_with_commitment(&conditional_orders, rpc_client.commitment()) @@ -1083,8 +1084,9 @@ pub async fn execute_market_order_inner( if let Some(bracket) = bracket { let rpc_client = Arc::new(ctx.rpc_client_async()); - ticket_builder = ticket_builder - .bracket_leg_ticket(phoenix_rise::core::BracketLegTicket::new(rpc_client, bracket)); + ticket_builder = ticket_builder.bracket_leg_ticket( + phoenix_rise::core::BracketLegTicket::new(rpc_client, bracket), + ); } let ticket = ticket_builder @@ -1256,8 +1258,9 @@ pub async fn execute_limit_order_inner( if let Some(bracket) = bracket { let rpc_client = Arc::new(ctx.rpc_client_async()); - ticket_builder = ticket_builder - .bracket_leg_ticket(phoenix_rise::core::BracketLegTicket::new(rpc_client, bracket)); + ticket_builder = ticket_builder.bracket_leg_ticket( + phoenix_rise::core::BracketLegTicket::new(rpc_client, bracket), + ); } let ticket = ticket_builder @@ -1342,8 +1345,9 @@ pub async fn execute_limit_order_inner( if let Some(bracket) = bracket { let rpc_client = Arc::new(ctx.rpc_client_async()); - ticket_builder = ticket_builder - .bracket_leg_ticket(phoenix_rise::core::BracketLegTicket::new(rpc_client, bracket)); + ticket_builder = ticket_builder.bracket_leg_ticket( + phoenix_rise::core::BracketLegTicket::new(rpc_client, bracket), + ); } let ticket = ticket_builder @@ -1594,7 +1598,8 @@ async fn api_limit_order_cancel_selection( } } - let mut cancel_ids_by_subaccount: BTreeMap> = BTreeMap::new(); + let mut cancel_ids_by_subaccount: BTreeMap> = + BTreeMap::new(); for order in &selected { cancel_ids_by_subaccount .entry(order.subaccount_index) @@ -2473,10 +2478,7 @@ mod conditional_orders_init_tests { } fn phoenix_ix(discriminant: [u8; 8]) -> solana_sdk::instruction::Instruction { - test_ix( - *phoenix_rise::ix::PHOENIX_PROGRAM_ID, - discriminant.to_vec(), - ) + test_ix(*phoenix_rise::ix::PHOENIX_PROGRAM_ID, discriminant.to_vec()) } #[test] diff --git a/vulcan-lib/src/commands/trader_state.rs b/vulcan-lib/src/commands/trader_state.rs index 456738c..478325c 100644 --- a/vulcan-lib/src/commands/trader_state.rs +++ b/vulcan-lib/src/commands/trader_state.rs @@ -11,13 +11,13 @@ use crate::commands::conditional_orders::{ }; use crate::context::AppContext; use crate::error::VulcanError; -use phoenix_rise::math::{ - PerpAssetMetadata, QuoteLots, SignedBaseLots, SignedQuoteLots, Ticks, TraderPortfolio, -}; use phoenix_rise::api::{ decimal_from_signed_base_lots, LimitOrder as SdkLimitOrder, PhoenixMetadata, Position as SdkPosition, SubaccountState, Trader, TraderKey, }; +use phoenix_rise::math::{ + PerpAssetMetadata, QuoteLots, SignedBaseLots, SignedQuoteLots, Ticks, TraderPortfolio, +}; use phoenix_rise::types::prelude::{ CooldownStatus, Decimal as UiDecimal, MarketStatsUpdate, Side as ApiSide, TraderStateCapabilities, @@ -347,10 +347,7 @@ impl TraderStatePosition { position_sequence_number: 0, base_position_lots: self.base_lots(), entry_price_ticks: parse_i64(&self.entry_price_ticks), - entry_price_usd: self - .entry_price_usd - .parse() - .unwrap_or_default(), + entry_price_usd: self.entry_price_usd.parse().unwrap_or_default(), virtual_quote_position_lots: parse_i64(&self.virtual_quote_position_lots), unsettled_funding_quote_lots: parse_i64(&self.unsettled_funding_quote_lots), accumulated_funding_quote_lots: parse_i64(&self.accumulated_funding_quote_lots), diff --git a/vulcan-lib/src/context.rs b/vulcan-lib/src/context.rs index 3bacf34..4cb883c 100644 --- a/vulcan-lib/src/context.rs +++ b/vulcan-lib/src/context.rs @@ -6,16 +6,16 @@ use crate::mcp::session_wallet::SessionWallet; use crate::output::OutputFormat; use crate::wallet::WalletStore; use anyhow::Result; -use phoenix_rise::math::{ - BaseLots, BasisPoints, Constant, LeverageTier, LeverageTiers, PerpAssetMetadata, - QuoteLotsPerBaseLotPerTick, SignedQuoteLotsPerBaseLot, Ticks, -}; use phoenix_rise::accounts::perp_asset_map::{ LeverageTier as AccountLeverageTier, PerpAssetMap, PerpAssetMetadata as AccountPerpAssetMetadata, }; use phoenix_rise::api::{PhoenixHttpClient, PhoenixMetadata}; use phoenix_rise::core::PhoenixTxBuilder; +use phoenix_rise::math::{ + BaseLots, BasisPoints, Constant, LeverageTier, LeverageTiers, PerpAssetMetadata, + QuoteLotsPerBaseLotPerTick, SignedQuoteLotsPerBaseLot, Ticks, +}; use phoenix_rise::types::prelude::ExchangeSnapshotView; use serde::{Deserialize, Serialize}; use solana_commitment_config::CommitmentConfig; @@ -379,8 +379,9 @@ fn perp_asset_metadata_from_account( ) -> Result { let static_params = account_metadata.static_market_params(); let risk_params = account_metadata.risk_params(); - let mark_price_ticks = Ticks::new_checked(account_metadata.oracle_price().mark_price.price.ticks) - .map_err(|e| crate::error::VulcanError::api("PERP_ASSET_MAP_INVALID", e.to_string()))?; + let mark_price_ticks = + Ticks::new_checked(account_metadata.oracle_price().mark_price.price.ticks) + .map_err(|e| crate::error::VulcanError::api("PERP_ASSET_MAP_INVALID", e.to_string()))?; let leverage_tiers = leverage_tiers_from_account(&risk_params.leverage_tiers)?; let risk_factors = risk_factors_from_account(&risk_params.risk_factors)?; let mut metadata = PerpAssetMetadata::new( @@ -399,7 +400,9 @@ fn perp_asset_metadata_from_account( )?, ); metadata.cumulative_funding_rate = SignedQuoteLotsPerBaseLot::new( - account_metadata.funding_accumulator().cumulative_funding_rate, + account_metadata + .funding_accumulator() + .cumulative_funding_rate, ); Ok(metadata) } diff --git a/vulcan-lib/src/paper/mod.rs b/vulcan-lib/src/paper/mod.rs index f656931..b485693 100644 --- a/vulcan-lib/src/paper/mod.rs +++ b/vulcan-lib/src/paper/mod.rs @@ -1383,9 +1383,12 @@ async fn fetch_replay_candles( } const MAX_LOOKBACK_MS: i64 = 30 * 24 * 60 * 60 * 1000; let effective_since = since_ms.max(until_ms - MAX_LOOKBACK_MS); - let params = phoenix_rise::types::prelude::CandlesQueryParams::new(symbol, phoenix_rise::types::prelude::Timeframe::Hour1) - .with_start_time(effective_since) - .with_end_time(until_ms); + let params = phoenix_rise::types::prelude::CandlesQueryParams::new( + symbol, + phoenix_rise::types::prelude::Timeframe::Hour1, + ) + .with_start_time(effective_since) + .with_end_time(until_ms); let Ok(raw) = ctx.http_client.get_candles(params).await else { return Vec::new(); }; From 3a3f2ebba6b9f59f582eb95f7907ca4bc98dd55e Mon Sep 17 00:00:00 2001 From: gallynaut Date: Mon, 29 Jun 2026 17:30:42 -0400 Subject: [PATCH 3/6] fix: update trader onboarding registration flow --- agents/error-catalog.json | 4 +- agents/tool-catalog.json | 4 +- skills/vulcan-onboarding/SKILL.md | 14 +- skills/vulcan-quickstart/SKILL.md | 4 +- vulcan-lib/src/cli/account.rs | 1 - vulcan-lib/src/commands/account.rs | 431 +++++++++++++++++++++++---- vulcan-lib/src/commands/agent.rs | 6 +- vulcan-lib/src/commands/setup.rs | 48 +-- vulcan-lib/src/error.rs | 4 +- vulcan-lib/src/mcp/registry.rs | 4 +- vulcan-lib/src/mcp/server.rs | 9 +- vulcan-lib/src/strategy/preflight.rs | 2 +- 12 files changed, 428 insertions(+), 103 deletions(-) diff --git a/agents/error-catalog.json b/agents/error-catalog.json index a86d610..7ebf86b 100644 --- a/agents/error-catalog.json +++ b/agents/error-catalog.json @@ -126,7 +126,7 @@ }, "REGISTER_API_FAILED": { "category": "api", - "recovery": "Check your invite code and API URL. Run 'vulcan status' to verify connectivity" + "recovery": "Check your registration code and API URL. Run 'vulcan status' to verify connectivity" }, "TRADERS_FETCH_FAILED": { "category": "api", @@ -134,7 +134,7 @@ }, "NO_TRADER_ACCOUNT": { "category": "api", - "recovery": "Register first with 'vulcan account register --invite-code '" + "recovery": "Register first with 'vulcan account register --yes'" }, "EXCHANGE_FETCH_FAILED": { "category": "api", diff --git a/agents/tool-catalog.json b/agents/tool-catalog.json index 7607a23..57cb792 100644 --- a/agents/tool-catalog.json +++ b/agents/tool-catalog.json @@ -1121,7 +1121,7 @@ "name": "vulcan_account_register", "command": "vulcan account register", "group": "account", - "description": "Register a new trader account with an access code or referral code. At least one of access_code, referral_code, or invite_code must be provided.", + "description": "Register and onboard a trader account. Omit a code for builder onboarding, pass referral_code for /v1/referral/activate-tx, or pass access_code/invite_code for allowlist activation.", "auth_required": true, "dangerous": true, "parameters": [ @@ -1150,7 +1150,7 @@ "description": "Must be true to execute" } ], - "example": "vulcan account register --access-code ABC123 --yes -o json" + "example": "vulcan account register --yes -o json" }, { "name": "vulcan_auth_status", diff --git a/skills/vulcan-onboarding/SKILL.md b/skills/vulcan-onboarding/SKILL.md index 906d4ce..0ac33ae 100644 --- a/skills/vulcan-onboarding/SKILL.md +++ b/skills/vulcan-onboarding/SKILL.md @@ -73,7 +73,7 @@ vulcan agent health -o json # readiness and next steps vulcan agent mcp doctor --target cursor --scope user -o json ``` -Setup creates `~/.vulcan/config.toml`, checks trader registration status, can complete registration with an access code or referral code, and can install read-only/paper MCP config. The Phoenix API session is signed in automatically using the configured wallet — no separate login step is required. +Setup creates `~/.vulcan/config.toml`, checks trader registration status, can complete registration with no code, an access code, or a referral code, and can install read-only/paper MCP config. The Phoenix API session is signed in automatically using the configured wallet — no separate login step is required. MCP is optional for paper and dry-run usage. For agent-driven live trading, prefer dangerous MCP with an unlocked session wallet: `vulcan agent mcp install --target cursor --dangerous`. Use this only after the user accepts that `VULCAN_WALLET_PASSWORD` may live in plaintext agent config. @@ -111,22 +111,24 @@ vulcan_wallet_balance → {} ## Step 4: Register Trader Account -Registration is invite/access-code gated. Health surfaces this before the user attempts registration. The setup wizard can do this interactively. CLI supports either code type: +Registration can be completed without a code through builder onboarding. If the user has a referral code, pass it so Vulcan uses the referral activation transaction flow; access codes remain supported for allowlist activation. The setup wizard can choose the path interactively: ```bash -vulcan account register --access-code +vulcan account register vulcan account register --referral-code +vulcan account register --access-code ``` For MCP: ``` -vulcan_account_register → { access_code: "YOUR_CODE", acknowledged: true } +vulcan_account_register → { acknowledged: true } vulcan_account_register → { referral_code: "YOUR_CODE", acknowledged: true } +vulcan_account_register → { access_code: "YOUR_CODE", acknowledged: true } vulcan_account_register → { invite_code: "YOUR_CODE", acknowledged: true } # backwards-compatible alias ``` -Registration activates the access/referral code through the Phoenix API and creates the on-chain trader account for the default cross-margin subaccount. If the trader is already registered, verify with `vulcan_account_info`. +Registration submits a signed onboarding transaction for the default cross-margin subaccount. Referral codes use `/v1/referral/activate-tx`; no-code onboarding uses the exchange builder endpoints. If the trader is already registered, verify with `vulcan_account_info`. ## Step 5: Deposit Collateral @@ -166,7 +168,7 @@ Then place a small test trade. | --------------------- | ------------------------------------------------------------ | | `NO_DEFAULT_WALLET` | For live: `vulcan wallet set-default `. For paper/dry-run: the call shouldn't have been made — switch to `vulcan_paper_*` tools and continue without a wallet. | | `DECRYPT_FAILED` | Wrong password. Set `VULCAN_WALLET_PASSWORD` | -| `NO_TRADER_ACCOUNT` | Register with an access code or referral code | +| `NO_TRADER_ACCOUNT` | Register with `vulcan account register` | | `CONFIG_ERROR` | Run `vulcan setup` | | `REGISTER_API_FAILED` | Check code validity and `api_url` in `~/.vulcan/config.toml` | | Insufficient SOL | Fund wallet with SOL for tx fees | diff --git a/skills/vulcan-quickstart/SKILL.md b/skills/vulcan-quickstart/SKILL.md index f429806..0f83683 100644 --- a/skills/vulcan-quickstart/SKILL.md +++ b/skills/vulcan-quickstart/SKILL.md @@ -71,7 +71,7 @@ For real funds, hand off to `vulcan-onboarding` — it covers wallet creation, a ```bash vulcan wallet create my-wallet # creates an encrypted wallet, prompts for password -vulcan account register --access-code # or --referral-code ; registers the trader on Phoenix +vulcan account register # or add --referral-code ; registers the trader on Phoenix vulcan margin deposit 50 # deposit 50 USDC of collateral ``` @@ -102,7 +102,7 @@ An AI agent should not have access to your main wallet's balance. Create a separ ```bash vulcan wallet create agent-sandbox # separate keypair, separate password # fund agent-sandbox externally with a little SOL + USDC, then: -vulcan account register --access-code -w agent-sandbox +vulcan account register -w agent-sandbox vulcan margin deposit 50 -w agent-sandbox # deposit 50 USDC to the sandbox trader ``` diff --git a/vulcan-lib/src/cli/account.rs b/vulcan-lib/src/cli/account.rs index 1b11ce8..a81a32a 100644 --- a/vulcan-lib/src/cli/account.rs +++ b/vulcan-lib/src/cli/account.rs @@ -7,7 +7,6 @@ pub enum AccountCommand { /// Register a trader account on Phoenix #[command(group( ArgGroup::new("registration_code") - .required(true) .args(["access_code", "referral_code", "invite_code"]) ))] Register { diff --git a/vulcan-lib/src/commands/account.rs b/vulcan-lib/src/commands/account.rs index 1dec6f0..7974243 100644 --- a/vulcan-lib/src/commands/account.rs +++ b/vulcan-lib/src/commands/account.rs @@ -4,10 +4,24 @@ use crate::cli::account::AccountCommand; use crate::context::AppContext; use crate::error::VulcanError; use crate::output::{render_success, TableRenderable}; +use crate::wallet::ResolvedSigner; +use phoenix_rise::accounts::owned::Permission; +use phoenix_rise::accounts::permission::TRADER_ONBOARDING_PERMISSION; +use phoenix_rise::api::{ + fetch_referral_activation_trader_status, ActivateReferralTxRequest, ApiInstructionResponse, + BuildRegisterIxsRequest, ReferralActivationTraderStatus, SendRegisterIxsRequest, TraderKey, +}; +use phoenix_rise::ix::onboard_trader_delegated::{ + create_onboard_trader_delegated_ix, OnboardTraderDelegatedParams, +}; +use phoenix_rise::ix::register_trader::{create_register_trader_ix, RegisterTraderParams}; use serde::Serialize; +use solana_keychain::SignTransactionResult; use solana_pubkey::Pubkey; use std::str::FromStr; +const CROSS_MARGIN_MAX_POSITIONS: u32 = 128; + // ── Result types ──────────────────────────────────────────────────────── #[derive(Debug, Serialize)] @@ -23,6 +37,35 @@ pub enum RegistrationCode { Referral(String), } +pub(crate) async fn trader_onboarding_status( + ctx: &AppContext, + authority: &Pubkey, +) -> Result { + let trader = TraderKey::new(*authority); + let rpc_client = ctx.rpc_client_async(); + fetch_referral_activation_trader_status(&rpc_client, &trader.pda()) + .await + .map_err(|e| VulcanError::network("TRADER_STATUS_FAILED", e.to_string())) +} + +fn parse_registration_code( + access_code: Option, + referral_code: Option, + invite_code: Option, +) -> Result, VulcanError> { + match (access_code, referral_code, invite_code) { + (None, None, None) => Ok(None), + (Some(code), None, None) | (None, None, Some(code)) => { + Ok(Some(RegistrationCode::Access(code))) + } + (None, Some(code), None) => Ok(Some(RegistrationCode::Referral(code))), + _ => Err(VulcanError::validation( + "REGISTRATION_CODE_CONFLICT", + "Provide at most one of --access-code, --referral-code, or --invite-code", + )), + } +} + impl TableRenderable for RegisterResult { fn render_table(&self) { if self.dry_run { @@ -130,18 +173,7 @@ pub async fn execute(ctx: &AppContext, cmd: AccountCommand) -> Result<(), Vulcan invite_code, } => { let (wallet_name, authority) = resolve_authority(ctx)?; - let code = match (access_code, referral_code, invite_code) { - (Some(code), None, None) | (None, None, Some(code)) => { - RegistrationCode::Access(code) - } - (None, Some(code), None) => RegistrationCode::Referral(code), - _ => { - return Err(VulcanError::validation( - "REGISTRATION_CODE_CONFLICT", - "Provide exactly one of --access-code, --referral-code, or --invite-code", - )); - } - }; + let code = parse_registration_code(access_code, referral_code, invite_code)?; let result = register_authority(ctx, &wallet_name, authority, code).await?; render_success(ctx.output_format, &result, serde_json::Value::Null); @@ -327,14 +359,14 @@ pub async fn execute_register_inner( ctx, &wallet_name, authority, - RegistrationCode::Access(invite_code.to_string()), + Some(RegistrationCode::Access(invite_code.to_string())), ) .await } pub async fn execute_register_with_code_inner( ctx: &AppContext, - code: RegistrationCode, + code: Option, ) -> Result { let (wallet_name, authority) = resolve_authority(ctx)?; register_authority(ctx, &wallet_name, authority, code).await @@ -343,7 +375,7 @@ pub async fn execute_register_with_code_inner( pub async fn execute_register_wallet_with_code_inner( ctx: &AppContext, wallet_name: &str, - code: RegistrationCode, + code: Option, ) -> Result { let wallet_file = ctx .wallet_store @@ -365,77 +397,358 @@ async fn is_cross_margin_registered( ) } -async fn activate_registration_code( +async fn activate_access_code( ctx: &AppContext, authority: &Pubkey, - code: &RegistrationCode, + code: &str, ) -> Result<(), VulcanError> { - match code { - RegistrationCode::Access(code) => { - ctx.http_client - .invite() - .activate_invite(authority, code.as_str()) - .await - .map_err(|e| VulcanError::api("REGISTER_API_FAILED", e.to_string()))?; - } - RegistrationCode::Referral(referral_code) => { - ctx.http_client - .invite() - .activate_referral(authority, referral_code.as_str()) - .await - .map_err(|e| VulcanError::api("REGISTER_API_FAILED", e.to_string()))?; + ctx.http_client + .invite() + .activate_invite(authority, code) + .await + .map_err(|e| VulcanError::api("REGISTER_API_FAILED", e.to_string()))?; + Ok(()) +} + +async fn submit_local_register_tx( + ctx: &AppContext, + wallet_name: &str, + authority: Pubkey, +) -> Result, VulcanError> { + let builder = ctx.tx_builder().await?; + let ixs = builder + .build_register_trader(authority, 0, 0) + .map_err(|e| VulcanError::api("BUILD_REGISTER_FAILED", e.to_string()))?; + + let (wallet, _, _) = + crate::commands::trade::resolve_wallet_and_pda(ctx, Some(wallet_name)).await?; + + match crate::commands::trade::send_or_dry_run(ctx, ixs, &wallet).await { + Ok(sig) => Ok(sig), + Err(err) + if err.category == crate::error::ErrorCategory::TxFailed + && is_cross_margin_registered(ctx, &authority).await? => + { + eprintln!("Registration transaction failed, but trader account is now registered."); + Ok(None) } + Err(err) => Err(err), + } +} + +fn api_instruction_to_solana( + api_instruction: &ApiInstructionResponse, +) -> Result { + Ok(solana_sdk::instruction::Instruction { + program_id: Pubkey::from_str(&api_instruction.program_id).map_err(|e| { + VulcanError::api( + "REGISTER_API_INVALID_IX", + format!("Invalid program id: {e}"), + ) + })?, + accounts: api_instruction + .keys + .iter() + .map(|account| { + Ok(solana_sdk::instruction::AccountMeta { + pubkey: Pubkey::from_str(&account.pubkey).map_err(|e| { + VulcanError::api( + "REGISTER_API_INVALID_IX", + format!("Invalid account pubkey: {e}"), + ) + })?, + is_signer: account.is_signer, + is_writable: account.is_writable, + }) + }) + .collect::, VulcanError>>()?, + data: api_instruction.data.clone(), + }) +} + +async fn sign_onboarding_transaction_for_api( + ctx: &AppContext, + wallet: &ResolvedSigner, + ixs: Vec, +) -> Result<(String, String, Pubkey), VulcanError> { + let signer = wallet.signer()?; + let fee_payer = signer.pubkey(); + if fee_payer != wallet.authority { + return Err(VulcanError::auth( + "SIGNER_PUBKEY_MISMATCH", + format!( + "Signer pubkey {} does not match active wallet authority {}", + fee_payer, wallet.authority + ), + )); + } + + let recent_blockhash = ctx + .rpc_client() + .get_latest_blockhash() + .map_err(|e| VulcanError::network("BLOCKHASH_FAILED", e.to_string()))?; + let mut tx = solana_sdk::transaction::Transaction::new_with_payer(&ixs, Some(&fee_payer)); + tx.message.recent_blockhash = recent_blockhash; + + let signed = signer + .sign_transaction(&mut tx) + .await + .map_err(|e| VulcanError::auth("TX_SIGN_FAILED", e.to_string()))?; + if matches!(signed, SignTransactionResult::Partial(_)) { + return Err(VulcanError::auth( + "PARTIAL_SIGNATURE", + "Transaction was only partially signed; onboarding requires a complete authority signature.", + )); + } + + let (transaction, _) = signed.into_signed_transaction(); + Ok((transaction, recent_blockhash.to_string(), fee_payer)) +} + +async fn submit_builder_onboarding_tx( + ctx: &AppContext, + wallet_name: &str, + authority: Pubkey, +) -> Result, VulcanError> { + let (wallet, _, _) = + crate::commands::trade::resolve_wallet_and_pda(ctx, Some(wallet_name)).await?; + let fee_payer = wallet.signer()?.pubkey(); + if fee_payer != wallet.authority { + return Err(VulcanError::auth( + "SIGNER_PUBKEY_MISMATCH", + format!( + "Signer pubkey {} does not match active wallet authority {}", + fee_payer, wallet.authority + ), + )); + } + let built = ctx + .http_client + .exchange() + .build_register_ixs(&BuildRegisterIxsRequest { + trader_authority: authority.to_string(), + tx_fee_payer: fee_payer.to_string(), + max_positions: Some(CROSS_MARGIN_MAX_POSITIONS), + }) + .await + .map_err(|e| VulcanError::api("BUILD_REGISTER_API_FAILED", e.to_string()))?; + let ixs = built + .instructions + .iter() + .map(api_instruction_to_solana) + .collect::, _>>()?; + let (transaction, _, fee_payer) = + sign_onboarding_transaction_for_api(ctx, &wallet, ixs).await?; + + let submitted = ctx + .http_client + .exchange() + .send_register_ixs(&SendRegisterIxsRequest { + transaction, + trader_authority: authority.to_string(), + tx_fee_payer: fee_payer.to_string(), + max_positions: Some(built.max_positions), + trader_pda_index: Some(0), + trader_subaccount_index: Some(0), + }) + .await + .map_err(|e| VulcanError::api("SEND_REGISTER_API_FAILED", e.to_string()))?; + Ok(Some(submitted.signature)) +} + +fn parse_api_pubkey(value: &str, field: &str) -> Result { + Pubkey::from_str(value).map_err(|e| { + VulcanError::api( + "REGISTER_API_INVALID_PUBKEY", + format!("Invalid {field} pubkey: {e}"), + ) + }) +} + +fn parse_api_pubkey_list(values: &[String], field: &str) -> Result, VulcanError> { + values + .iter() + .map(|value| parse_api_pubkey(value, field)) + .collect() +} + +async fn fetch_permission_account( + ctx: &AppContext, + permission_account: &Pubkey, +) -> Result { + let rpc = ctx.rpc_client_async(); + let account = rpc + .get_account_with_commitment(permission_account, rpc.commitment()) + .await + .map_err(|e| VulcanError::network("PERMISSION_FETCH_FAILED", e.to_string()))? + .value + .ok_or_else(|| { + VulcanError::api( + "PERMISSION_ACCOUNT_MISSING", + format!("Permission account does not exist: {permission_account}"), + ) + })?; + Permission::try_from_account_bytes(&account.data) + .map_err(|e| VulcanError::api("PERMISSION_DECODE_FAILED", e.to_string())) +} + +fn validate_permission( + permission: &Permission, + expected_risk_authority: Pubkey, + expected_onboarder: Pubkey, +) -> Result<(), VulcanError> { + if permission.permission_authority != expected_risk_authority { + return Err(VulcanError::api( + "PERMISSION_AUTHORITY_MISMATCH", + format!( + "Permission authority mismatch: expected {expected_risk_authority}, got {}", + permission.permission_authority + ), + )); + } + if permission.delegated_key != expected_onboarder { + return Err(VulcanError::api( + "PERMISSION_DELEGATE_MISMATCH", + format!( + "Permission delegated key mismatch: expected {expected_onboarder}, got {}", + permission.delegated_key + ), + )); + } + if permission.permission & TRADER_ONBOARDING_PERMISSION != TRADER_ONBOARDING_PERMISSION { + return Err(VulcanError::api( + "PERMISSION_MISSING_ONBOARDING", + "Permission account is missing trader-onboarding permission", + )); + } + if permission.allowed_signer_actions == 0 { + return Err(VulcanError::api( + "PERMISSION_EXHAUSTED", + "Permission account has no remaining signer actions", + )); } Ok(()) } +async fn submit_referral_activation_tx( + ctx: &AppContext, + wallet_name: &str, + authority: Pubkey, + referral_code: String, + status: ReferralActivationTraderStatus, +) -> Result, VulcanError> { + let trader = TraderKey::new(authority); + let (wallet, _, _) = + crate::commands::trade::resolve_wallet_and_pda(ctx, Some(wallet_name)).await?; + let permission_response = ctx + .http_client + .invite() + .get_referral_activation_permission() + .await + .map_err(|e| VulcanError::api("REFERRAL_PERMISSION_FAILED", e.to_string()))?; + let trader_onboarder = + parse_api_pubkey(&permission_response.trader_onboarder, "trader_onboarder")?; + let risk_authority = parse_api_pubkey(&permission_response.risk_authority, "risk_authority")?; + let permission_account = parse_api_pubkey( + &permission_response.permission_account, + "permission_account", + )?; + let permission = fetch_permission_account(ctx, &permission_account).await?; + validate_permission(&permission, risk_authority, trader_onboarder)?; + + let keys = ctx.metadata().await?.keys(); + let global_trader_index = + parse_api_pubkey_list(&keys.global_trader_index, "global_trader_index")?; + let active_trader_buffer = + parse_api_pubkey_list(&keys.active_trader_buffer, "active_trader_buffer")?; + + let mut ixs = Vec::::new(); + if status.should_include_register_trader() { + let register_params = RegisterTraderParams::builder() + .payer(authority) + .trader(authority) + .trader_account(trader.pda()) + .max_positions(CROSS_MARGIN_MAX_POSITIONS as u64) + .trader_pda_index(0) + .subaccount_index(0) + .build() + .map_err(|e| VulcanError::api("BUILD_REGISTER_FAILED", e.to_string()))?; + ixs.push( + create_register_trader_ix(register_params) + .map_err(|e| VulcanError::api("BUILD_REGISTER_FAILED", e.to_string()))? + .into(), + ); + } + + let onboard_params = OnboardTraderDelegatedParams::builder() + .authority(trader_onboarder) + .permission_account(permission_account) + .trader_account(trader.pda()) + .global_trader_index(global_trader_index) + .active_trader_buffer(active_trader_buffer) + .build() + .map_err(|e| VulcanError::api("BUILD_REFERRAL_ONBOARD_FAILED", e.to_string()))?; + ixs.push( + create_onboard_trader_delegated_ix(onboard_params) + .map_err(|e| VulcanError::api("BUILD_REFERRAL_ONBOARD_FAILED", e.to_string()))? + .into(), + ); + + let (transaction, recent_blockhash, _) = + sign_onboarding_transaction_for_api(ctx, &wallet, ixs).await?; + let response = ctx + .http_client + .invite() + .activate_referral_tx(&ActivateReferralTxRequest { + referral_code, + trader_authority: authority.to_string(), + trader_pda_index: Some(0), + trader_subaccount_index: Some(0), + recent_blockhash, + transaction, + }) + .await + .map_err(|e| VulcanError::api("REFERRAL_ACTIVATE_TX_FAILED", e.to_string()))?; + + Ok(response.signature) +} + async fn register_authority( ctx: &AppContext, wallet_name: &str, authority: Pubkey, - code: RegistrationCode, + code: Option, ) -> Result { - let already_registered = is_cross_margin_registered(ctx, &authority).await?; + let status = trader_onboarding_status(ctx, &authority).await?; - let sig = if already_registered { - eprintln!("Trader account already registered, skipping registration."); + let sig = if matches!(status, ReferralActivationTraderStatus::Activated) { + eprintln!("Trader account already registered and onboarded, skipping registration."); None } else if ctx.dry_run { None } else { - activate_registration_code(ctx, &authority, &code).await?; + match code { + Some(RegistrationCode::Access(code)) => { + activate_access_code(ctx, &authority, code.as_str()).await?; - if is_cross_margin_registered(ctx, &authority).await? { - eprintln!( - "Trader account registered after code activation; skipping on-chain transaction." - ); - None - } else { - let builder = ctx.tx_builder().await?; - let ixs = builder - .build_register_trader(authority, 0, 0) - .map_err(|e| VulcanError::api("BUILD_REGISTER_FAILED", e.to_string()))?; - - let (wallet, _, _) = - crate::commands::trade::resolve_wallet_and_pda(ctx, Some(wallet_name)).await?; - - match crate::commands::trade::send_or_dry_run(ctx, ixs, &wallet).await { - Ok(sig) => sig, - Err(err) - if err.category == crate::error::ErrorCategory::TxFailed - && is_cross_margin_registered(ctx, &authority).await? => - { + if is_cross_margin_registered(ctx, &authority).await? { eprintln!( - "Registration transaction failed, but trader account is now registered." + "Trader account registered after code activation; skipping on-chain transaction." ); None + } else { + submit_local_register_tx(ctx, wallet_name, authority).await? } - Err(err) => return Err(err), } + Some(RegistrationCode::Referral(referral_code)) => { + submit_referral_activation_tx(ctx, wallet_name, authority, referral_code, status) + .await? + } + None => submit_builder_onboarding_tx(ctx, wallet_name, authority).await?, } }; - let trader_key = phoenix_rise::api::TraderKey::new(authority); + let trader_key = TraderKey::new(authority); Ok(RegisterResult { authority: authority.to_string(), trader_pda: trader_key.pda().to_string(), diff --git a/vulcan-lib/src/commands/agent.rs b/vulcan-lib/src/commands/agent.rs index b860ec7..cd73049 100644 --- a/vulcan-lib/src/commands/agent.rs +++ b/vulcan-lib/src/commands/agent.rs @@ -942,7 +942,7 @@ fn live_readiness_from_health( wallet_has_sol, wallet_has_usdc, trader_registered, - invite_code_required: has_default_wallet && !trader_registered, + invite_code_required: false, deposited_collateral_usdc: status.trader.collateral.clone(), can_attempt_live_trading: status.api.ok && status.rpc.ok @@ -992,7 +992,9 @@ fn health_next_steps( steps.push("Set a default wallet: vulcan wallet set-default ".to_string()); } if live_readiness.invite_code_required { - steps.push("Registration requires an invite/access code: vulcan account register --access-code --yes".to_string()); + steps.push("Register the trader account: vulcan account register --yes (or add --referral-code when applicable).".to_string()); + } else if live_readiness.has_default_wallet && !status.trader.registered { + steps.push("Register the trader account: vulcan account register --yes (or add --referral-code when applicable).".to_string()); } if status.trader.registered { steps.push("Wallet funds and deposited collateral are separate. Check deposited collateral and positions: vulcan portfolio -o json".to_string()); diff --git a/vulcan-lib/src/commands/setup.rs b/vulcan-lib/src/commands/setup.rs index 18df081..800ea86 100644 --- a/vulcan-lib/src/commands/setup.rs +++ b/vulcan-lib/src/commands/setup.rs @@ -543,19 +543,23 @@ async fn maybe_register_trader( } println!(" Address: {}", wallet_file.public_key); - if let Some(state) = - crate::commands::trader_state::try_fetch_trader_state_snapshot(ctx, &authority, 0).await? - { - if state.find_subaccount(0).is_some() { - let trader_key = - phoenix_rise::api::TraderKey::new_with_idx(authority, state.trader_pda_index, 0); - println!(" ✓ Trader account already registered"); + match account::trader_onboarding_status(ctx, &authority).await? { + phoenix_rise::api::ReferralActivationTraderStatus::Activated => { + let trader_key = phoenix_rise::api::TraderKey::new(authority); + println!(" ✓ Trader account already registered and onboarded"); println!(" Trader PDA: {}", trader_key.pda()); return Ok(()); } + phoenix_rise::api::ReferralActivationTraderStatus::Registered => { + let trader_key = phoenix_rise::api::TraderKey::new(authority); + println!(" ○ Trader account is registered but still needs onboarding."); + println!(" Trader PDA: {}", trader_key.pda()); + } + phoenix_rise::api::ReferralActivationTraderStatus::Missing => { + println!(" ○ Trader account is not registered."); + } } - println!(" ○ Trader account is not registered."); println!(" Registration submits an on-chain transaction and requires SOL for fees."); println!(); @@ -565,10 +569,11 @@ async fn maybe_register_trader( } println!(); - println!(" Which code do you have?"); - println!(" 1) Access code"); + println!(" Which registration path do you want?"); + println!(" 1) No code"); println!(" 2) Referral code"); - println!(" 3) Skip"); + println!(" 3) Access code"); + println!(" 4) Skip"); println!(); let choice = prompt(" Choice [1]: ")?; @@ -579,34 +584,35 @@ async fn maybe_register_trader( }; let code_kind = match choice { - "1" => { - let code = prompt(" Access code: ")?; + "1" => None, + "2" => { + let code = prompt(" Referral code: ")?; if code.is_empty() { return Err(VulcanError::validation( "EMPTY_CODE", - "Access code cannot be empty", + "Referral code cannot be empty", )); } - RegistrationCode::Access(code) + Some(RegistrationCode::Referral(code)) } - "2" => { - let code = prompt(" Referral code: ")?; + "3" => { + let code = prompt(" Access code: ")?; if code.is_empty() { return Err(VulcanError::validation( "EMPTY_CODE", - "Referral code cannot be empty", + "Access code cannot be empty", )); } - RegistrationCode::Referral(code) + Some(RegistrationCode::Access(code)) } - "3" => { + "4" => { println!(" Skipped registration."); return Ok(()); } _ => { return Err(VulcanError::validation( "INVALID_CHOICE", - "Please enter 1, 2, or 3", + "Please enter 1, 2, 3, or 4", )); } }; diff --git a/vulcan-lib/src/error.rs b/vulcan-lib/src/error.rs index 1307147..29d969f 100644 --- a/vulcan-lib/src/error.rs +++ b/vulcan-lib/src/error.rs @@ -139,8 +139,8 @@ impl VulcanError { "NO_DEFAULT_WALLET" => "Run: vulcan wallet set-default ", "WALLET_NOT_FOUND" => "Run 'vulcan wallet list' to see available wallets", "DECRYPT_FAILED" => "Wrong password. Check VULCAN_WALLET_PASSWORD env var", - "NO_TRADER_ACCOUNT" => "Register first: vulcan account register --invite-code ", - "REGISTER_API_FAILED" => "Check invite code and API URL. Run 'vulcan status' to verify", + "NO_TRADER_ACCOUNT" => "Register first: vulcan account register --yes", + "REGISTER_API_FAILED" => "Check registration code and API URL. Run 'vulcan status' to verify", "TX_SEND_FAILED" => "Check wallet SOL balance and account state", "CONFIG_ERROR" | "CONFIG_LOAD_FAILED" | "INIT_FAILED" => { "Run 'vulcan setup' to configure" diff --git a/vulcan-lib/src/mcp/registry.rs b/vulcan-lib/src/mcp/registry.rs index ec88cc4..339dafe 100644 --- a/vulcan-lib/src/mcp/registry.rs +++ b/vulcan-lib/src/mcp/registry.rs @@ -893,7 +893,7 @@ pub static TOOLS: &[ToolDef] = &[ }, ToolDef { name: "vulcan_account_register", - description: "Register a new trader account with an access code or referral code. At least one of access_code, referral_code, or invite_code must be provided.", + description: "Register and onboard a trader account. Omit a code for builder onboarding, pass referral_code for /v1/referral/activate-tx, or pass access_code/invite_code for allowlist activation.", group: "account", dangerous: true, schema: || json!({ @@ -908,7 +908,7 @@ pub static TOOLS: &[ToolDef] = &[ "additionalProperties": false }), command: "vulcan account register", - example: "vulcan account register --access-code ABC123 --yes -o json", + example: "vulcan account register --yes -o json", auth_required: true, }, diff --git a/vulcan-lib/src/mcp/server.rs b/vulcan-lib/src/mcp/server.rs index 93fd38d..94e83e7 100644 --- a/vulcan-lib/src/mcp/server.rs +++ b/vulcan-lib/src/mcp/server.rs @@ -762,14 +762,17 @@ impl VulcanMcpServer { arg_str_opt(args, "referral_code"), arg_str_opt(args, "invite_code"), ) { + (None, None, None) => None, (Some(code), None, None) | (None, None, Some(code)) => { - commands::account::RegistrationCode::Access(code) + Some(commands::account::RegistrationCode::Access(code)) + } + (None, Some(code), None) => { + Some(commands::account::RegistrationCode::Referral(code)) } - (None, Some(code), None) => commands::account::RegistrationCode::Referral(code), _ => { return Err(crate::error::VulcanError::validation( "REGISTRATION_CODE_CONFLICT", - "Provide exactly one of access_code, referral_code, or invite_code", + "Provide at most one of access_code, referral_code, or invite_code", )); } }; diff --git a/vulcan-lib/src/strategy/preflight.rs b/vulcan-lib/src/strategy/preflight.rs index d3f543e..1dbc414 100644 --- a/vulcan-lib/src/strategy/preflight.rs +++ b/vulcan-lib/src/strategy/preflight.rs @@ -312,7 +312,7 @@ pub async fn check_live_readiness(ctx: &AppContext) -> LiveReadiness { blockers.push(Blocker { code: "TRADER_NOT_REGISTERED", message: "Wallet is not registered as a Phoenix trader.".to_string(), - remedy: "Run `vulcan account register --invite-code ` (ask for an invite code if needed).".to_string(), + remedy: "Run `vulcan account register --yes` (or add `--referral-code ` when applicable).".to_string(), }); } _ => { From 33491e428d732d8289102d607849e26efee66e89 Mon Sep 17 00:00:00 2001 From: gallynaut Date: Tue, 30 Jun 2026 10:50:03 -0400 Subject: [PATCH 4/6] fix: preflight trader registration funding --- Cargo.lock | 1 + Cargo.toml | 1 + agents/error-catalog.json | 16 +++ vulcan-lib/Cargo.toml | 1 + vulcan-lib/src/commands/account.rs | 172 ++++++++++++++++++++++++++++- vulcan-lib/src/error.rs | 11 +- 6 files changed, 200 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 01db264..bf055a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6964,6 +6964,7 @@ dependencies = [ "solana-keychain", "solana-pubkey 3.0.0", "solana-rpc-client", + "solana-rpc-client-api", "solana-sdk", "tempfile", "thiserror 2.0.18", diff --git a/Cargo.toml b/Cargo.toml index 418279f..3b1004c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,7 @@ solana-keychain = { version = "1.4", default-features = false, features = [ solana-pubkey = { version = "3", features = ["curve25519"] } solana-instruction = { version = "3", default-features = false, features = ["std"] } solana-rpc-client = "3" +solana-rpc-client-api = "3" solana-commitment-config = "3" solana-compute-budget-interface = "3" diff --git a/agents/error-catalog.json b/agents/error-catalog.json index 7ebf86b..9249bfc 100644 --- a/agents/error-catalog.json +++ b/agents/error-catalog.json @@ -164,6 +164,14 @@ "category": "api", "recovery": "Failed to build registration transaction. Account may already be registered" }, + "INSUFFICIENT_SOL_FOR_REGISTRATION": { + "category": "validation", + "recovery": "Fund the wallet with enough SOL for cross-margin trader account rent, then retry registration" + }, + "REGISTRATION_SIMULATION_FAILED": { + "category": "tx_failed", + "recovery": "Check the simulation logs, payer SOL balance, and account state before retrying registration" + }, "BUILD_DEPOSIT_FAILED": { "category": "api", "recovery": "Failed to build deposit transaction. Check USDC balance with 'vulcan wallet balance'" @@ -232,6 +240,14 @@ "category": "network", "recovery": "Cannot fetch balance from RPC. Check rpc_url in config" }, + "REGISTRATION_RENT_FETCH_FAILED": { + "category": "network", + "recovery": "Cannot fetch registration rent exemption from RPC. Check rpc_url in config" + }, + "REGISTRATION_SIMULATION_RPC_FAILED": { + "category": "network", + "recovery": "Cannot simulate registration transaction through RPC. Check rpc_url in config" + }, "TX_SEND_FAILED": { "category": "tx_failed", "recovery": "Transaction rejected on-chain. Check wallet SOL balance, account state, and error logs" diff --git a/vulcan-lib/Cargo.toml b/vulcan-lib/Cargo.toml index 85f65b8..54ff56e 100644 --- a/vulcan-lib/Cargo.toml +++ b/vulcan-lib/Cargo.toml @@ -31,6 +31,7 @@ solana-sdk = { workspace = true } solana-keychain = { workspace = true } solana-pubkey = { workspace = true } solana-rpc-client = { workspace = true } +solana-rpc-client-api = { workspace = true } solana-commitment-config = { workspace = true } solana-compute-budget-interface = { workspace = true } diff --git a/vulcan-lib/src/commands/account.rs b/vulcan-lib/src/commands/account.rs index 7974243..1a71112 100644 --- a/vulcan-lib/src/commands/account.rs +++ b/vulcan-lib/src/commands/account.rs @@ -18,9 +18,14 @@ use phoenix_rise::ix::register_trader::{create_register_trader_ix, RegisterTrade use serde::Serialize; use solana_keychain::SignTransactionResult; use solana_pubkey::Pubkey; +use solana_rpc_client_api::config::RpcSimulateTransactionConfig; use std::str::FromStr; const CROSS_MARGIN_MAX_POSITIONS: u32 = 128; +const LAMPORTS_PER_SOL: u64 = 1_000_000_000; +const TRADER_HEADER_LEN: usize = 224; +const TRADER_POSITION_MAP_PREFIX_LEN: usize = 16; +const TRADER_POSITION_ENTRY_LEN: usize = 40; // ── Result types ──────────────────────────────────────────────────────── @@ -66,6 +71,118 @@ fn parse_registration_code( } } +fn trader_account_size(max_positions: u32) -> Result { + let position_entries_len = TRADER_POSITION_ENTRY_LEN + .checked_mul(max_positions as usize) + .ok_or_else(|| { + VulcanError::validation( + "TRADER_ACCOUNT_SIZE_OVERFLOW", + "Trader account position map size overflowed", + ) + })?; + TRADER_HEADER_LEN + .checked_add(TRADER_POSITION_MAP_PREFIX_LEN) + .and_then(|prefix_len| prefix_len.checked_add(position_entries_len)) + .ok_or_else(|| { + VulcanError::validation( + "TRADER_ACCOUNT_SIZE_OVERFLOW", + "Trader account size overflowed", + ) + }) +} + +fn format_sol_lamports(lamports: u64) -> String { + let whole = lamports / LAMPORTS_PER_SOL; + let fractional = lamports % LAMPORTS_PER_SOL; + let mut value = format!("{whole}.{fractional:09}"); + while value.contains('.') && value.ends_with('0') { + value.pop(); + } + if value.ends_with('.') { + value.push('0'); + } + value +} + +async fn ensure_sol_for_cross_trader_rent( + ctx: &AppContext, + payer: Pubkey, + max_positions: u32, +) -> Result<(), VulcanError> { + let account_size = trader_account_size(max_positions)?; + let rpc = ctx.rpc_client_async(); + let required_lamports = rpc + .get_minimum_balance_for_rent_exemption(account_size) + .await + .map_err(|e| VulcanError::network("REGISTRATION_RENT_FETCH_FAILED", e.to_string()))?; + let balance_lamports = rpc + .get_balance(&payer) + .await + .map_err(|e| VulcanError::network("RPC_BALANCE_FAILED", e.to_string()))?; + + if balance_lamports < required_lamports { + return Err(VulcanError::validation( + "INSUFFICIENT_SOL_FOR_REGISTRATION", + format!( + "Wallet {payer} has {} SOL, but registering the cross-margin trader account needs at least {} SOL for rent exemption ({} bytes). Fund the wallet with SOL and retry.", + format_sol_lamports(balance_lamports), + format_sol_lamports(required_lamports), + account_size, + ), + )); + } + + Ok(()) +} + +async fn simulate_onboarding_transaction( + ctx: &AppContext, + ixs: &[solana_sdk::instruction::Instruction], + fee_payer: Pubkey, +) -> Result<(), VulcanError> { + let tx = solana_sdk::transaction::Transaction::new_with_payer(ixs, Some(&fee_payer)); + let result = ctx + .rpc_client_async() + .simulate_transaction_with_config( + &tx, + RpcSimulateTransactionConfig { + sig_verify: false, + replace_recent_blockhash: true, + commitment: Some(solana_commitment_config::CommitmentConfig::confirmed()), + ..RpcSimulateTransactionConfig::default() + }, + ) + .await + .map_err(|e| VulcanError::network("REGISTRATION_SIMULATION_RPC_FAILED", e.to_string()))?; + + if let Some(err) = result.value.err { + let logs = result + .value + .logs + .unwrap_or_default() + .into_iter() + .rev() + .take(8) + .collect::>() + .into_iter() + .rev() + .collect::>(); + let logs = if logs.is_empty() { + String::new() + } else { + format!(" Logs: {}", logs.join(" | ")) + }; + return Err(VulcanError::tx_failed( + "REGISTRATION_SIMULATION_FAILED", + format!( + "Registration transaction simulation failed for payer {fee_payer}: {err:?}.{logs}" + ), + )); + } + + Ok(()) +} + impl TableRenderable for RegisterResult { fn render_table(&self) { if self.dry_run { @@ -415,6 +532,8 @@ async fn submit_local_register_tx( wallet_name: &str, authority: Pubkey, ) -> Result, VulcanError> { + ensure_sol_for_cross_trader_rent(ctx, authority, CROSS_MARGIN_MAX_POSITIONS).await?; + let builder = ctx.tx_builder().await?; let ixs = builder .build_register_trader(authority, 0, 0) @@ -422,6 +541,24 @@ async fn submit_local_register_tx( let (wallet, _, _) = crate::commands::trade::resolve_wallet_and_pda(ctx, Some(wallet_name)).await?; + let fee_payer = wallet.signer()?.pubkey(); + if fee_payer != wallet.authority { + return Err(VulcanError::auth( + "SIGNER_PUBKEY_MISMATCH", + format!( + "Signer pubkey {} does not match active wallet authority {}", + fee_payer, wallet.authority + ), + )); + } + let mut simulation_ixs = Vec::with_capacity(ixs.len() + 1); + simulation_ixs.push( + solana_compute_budget_interface::ComputeBudgetInstruction::set_compute_unit_limit( + crate::commands::trade::DEFAULT_CU_LIMIT, + ), + ); + simulation_ixs.extend(ixs.iter().cloned()); + simulate_onboarding_transaction(ctx, &simulation_ixs, fee_payer).await?; match crate::commands::trade::send_or_dry_run(ctx, ixs, &wallet).await { Ok(sig) => Ok(sig), @@ -483,6 +620,8 @@ async fn sign_onboarding_transaction_for_api( )); } + simulate_onboarding_transaction(ctx, &ixs, fee_payer).await?; + let recent_blockhash = ctx .rpc_client() .get_latest_blockhash() @@ -509,6 +648,7 @@ async fn submit_builder_onboarding_tx( ctx: &AppContext, wallet_name: &str, authority: Pubkey, + status: ReferralActivationTraderStatus, ) -> Result, VulcanError> { let (wallet, _, _) = crate::commands::trade::resolve_wallet_and_pda(ctx, Some(wallet_name)).await?; @@ -522,6 +662,9 @@ async fn submit_builder_onboarding_tx( ), )); } + if status.should_include_register_trader() { + ensure_sol_for_cross_trader_rent(ctx, fee_payer, CROSS_MARGIN_MAX_POSITIONS).await?; + } let built = ctx .http_client .exchange() @@ -532,6 +675,9 @@ async fn submit_builder_onboarding_tx( }) .await .map_err(|e| VulcanError::api("BUILD_REGISTER_API_FAILED", e.to_string()))?; + if built.include_register_trader && built.max_positions != CROSS_MARGIN_MAX_POSITIONS { + ensure_sol_for_cross_trader_rent(ctx, fee_payer, built.max_positions).await?; + } let ixs = built .instructions .iter() @@ -664,6 +810,8 @@ async fn submit_referral_activation_tx( let mut ixs = Vec::::new(); if status.should_include_register_trader() { + ensure_sol_for_cross_trader_rent(ctx, authority, CROSS_MARGIN_MAX_POSITIONS).await?; + let register_params = RegisterTraderParams::builder() .payer(authority) .trader(authority) @@ -744,7 +892,7 @@ async fn register_authority( submit_referral_activation_tx(ctx, wallet_name, authority, referral_code, status) .await? } - None => submit_builder_onboarding_tx(ctx, wallet_name, authority).await?, + None => submit_builder_onboarding_tx(ctx, wallet_name, authority, status).await?, } }; @@ -756,3 +904,25 @@ async fn register_authority( tx_signature: sig, }) } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn trader_account_size_matches_rise_layout() { + assert_eq!( + trader_account_size(CROSS_MARGIN_MAX_POSITIONS).expect("cross account size"), + 5_360 + ); + assert_eq!(trader_account_size(1).expect("isolated account size"), 280); + } + + #[test] + fn format_sol_lamports_trims_fractional_padding() { + assert_eq!(format_sol_lamports(0), "0.0"); + assert_eq!(format_sol_lamports(1), "0.000000001"); + assert_eq!(format_sol_lamports(1_500_000_000), "1.5"); + assert_eq!(format_sol_lamports(2_000_000_000), "2.0"); + } +} diff --git a/vulcan-lib/src/error.rs b/vulcan-lib/src/error.rs index 29d969f..5fd6079 100644 --- a/vulcan-lib/src/error.rs +++ b/vulcan-lib/src/error.rs @@ -140,6 +140,12 @@ impl VulcanError { "WALLET_NOT_FOUND" => "Run 'vulcan wallet list' to see available wallets", "DECRYPT_FAILED" => "Wrong password. Check VULCAN_WALLET_PASSWORD env var", "NO_TRADER_ACCOUNT" => "Register first: vulcan account register --yes", + "INSUFFICIENT_SOL_FOR_REGISTRATION" => { + "Fund the wallet with SOL for cross-margin trader account rent, then retry registration" + } + "REGISTRATION_SIMULATION_FAILED" => { + "Check the simulation logs, payer SOL balance, and account state before retrying registration" + } "REGISTER_API_FAILED" => "Check registration code and API URL. Run 'vulcan status' to verify", "TX_SEND_FAILED" => "Check wallet SOL balance and account state", "CONFIG_ERROR" | "CONFIG_LOAD_FAILED" | "INIT_FAILED" => { @@ -149,7 +155,10 @@ impl VulcanError { "UNKNOWN_MARKET" => "Run 'vulcan market list' to see available markets", "MISSING_ARG" => "Check tool schema for required fields", "UNKNOWN_TOOL" => "Run MCP tools/list to see available tools", - "BLOCKHASH_FAILED" | "RPC_BALANCE_FAILED" => "Check rpc_url in config", + "BLOCKHASH_FAILED" + | "RPC_BALANCE_FAILED" + | "REGISTRATION_RENT_FETCH_FAILED" + | "REGISTRATION_SIMULATION_RPC_FAILED" => "Check rpc_url in config", "EXCHANGE_FETCH_FAILED" | "TRADERS_FETCH_FAILED" | "MARKETS_FETCH_FAILED" => { "Run 'vulcan status' to check API connectivity" } From e26722dc26e73f1fc1678f1ec7b6ae476e4aea8a Mon Sep 17 00:00:00 2001 From: gallynaut Date: Tue, 30 Jun 2026 10:58:59 -0400 Subject: [PATCH 5/6] fix: satisfy clippy health next steps --- vulcan-lib/src/commands/agent.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vulcan-lib/src/commands/agent.rs b/vulcan-lib/src/commands/agent.rs index cd73049..1b10059 100644 --- a/vulcan-lib/src/commands/agent.rs +++ b/vulcan-lib/src/commands/agent.rs @@ -991,9 +991,9 @@ fn health_next_steps( } else if wallets.default_wallet.is_none() { steps.push("Set a default wallet: vulcan wallet set-default ".to_string()); } - if live_readiness.invite_code_required { - steps.push("Register the trader account: vulcan account register --yes (or add --referral-code when applicable).".to_string()); - } else if live_readiness.has_default_wallet && !status.trader.registered { + if live_readiness.invite_code_required + || (live_readiness.has_default_wallet && !status.trader.registered) + { steps.push("Register the trader account: vulcan account register --yes (or add --referral-code when applicable).".to_string()); } if status.trader.registered { From 26ab5fafea621fab63c59fd038950d7e7680ad2a Mon Sep 17 00:00:00 2001 From: gallynaut Date: Wed, 1 Jul 2026 16:01:40 -0400 Subject: [PATCH 6/6] Update phoenix-rise to 0.3.1 --- Cargo.lock | 114 ++++++++++++++++++++++--------- Cargo.toml | 2 +- vulcan-lib/src/context.rs | 29 +++----- vulcan-lib/src/wallet/keypair.rs | 9 ++- 4 files changed, 99 insertions(+), 55 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bf055a9..c1bfd6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1301,14 +1301,38 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core 0.21.3", + "darling_macro 0.21.3", +] + [[package]] name = "darling" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.23.0", + "darling_macro 0.23.0", +] + +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.117", ] [[package]] @@ -1324,13 +1348,24 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core 0.21.3", + "quote", + "syn 2.0.117", +] + [[package]] name = "darling_macro" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ - "darling_core", + "darling_core 0.23.0", "quote", "syn 2.0.117", ] @@ -3221,9 +3256,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "phoenix-rise" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c02bbd17914c812b9621097dbcab6ee13e03be2af85573d9cc8b281ec9fc076" +checksum = "06840997b36d2893f0eda8a5c1fb04d192e3fee9b2c94d499d15f9dc1ecc3594" dependencies = [ "phoenix-rise-accounts", "phoenix-rise-api", @@ -3235,9 +3270,9 @@ dependencies = [ [[package]] name = "phoenix-rise-accounts" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c25cc44f57651a362e7984b47acd1f50bf72b7106cabf9639f3fb2b4c2571002" +checksum = "60ddac720ef43c6101abb5c70a53b127bd7e38990af2ee1b7aee844651d06df0" dependencies = [ "borsh", "bs58", @@ -3251,9 +3286,9 @@ dependencies = [ [[package]] name = "phoenix-rise-api" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0ab7eda4d89bd429abc67c4f5d51f5ef035846541005f26fe72e1d3d23a9fc" +checksum = "aec6f208ae0100b661324fc87b44bf0e6c45abd07ec43c63b52025d7e1e4a2e1" dependencies = [ "async-trait", "base64", @@ -3279,6 +3314,7 @@ dependencies = [ "solana-pubkey 3.0.0", "solana-rpc-client", "solana-rpc-client-api", + "solana-signature", "solana-signer", "solana-transaction", "solana-transaction-error", @@ -3293,9 +3329,9 @@ dependencies = [ [[package]] name = "phoenix-rise-core" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "680cf1d81949048ac7f1a98b8878c0667ce13d6ade402ec982e9a4ba70667080" +checksum = "f6d9de2fc6f888da45129a568c189f9db0313852837e33fa3cef3239735ac15b" dependencies = [ "base64", "bytemuck", @@ -3316,13 +3352,14 @@ dependencies = [ [[package]] name = "phoenix-rise-ix" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9581b168bc81cffc3e4c2c25b0678b3e5a7fcf7090e9a97a3aa8581dd904c348" +checksum = "6ca0176e2be9647ab8221a937a0924870a30a279621df5bea3f523605009c8fc" dependencies = [ "borsh", "bytemuck", "phoenix-rise-accounts", + "phoenix-rise-math", "sha2 0.10.9", "sha2-const-stable", "solana-instruction", @@ -3332,16 +3369,16 @@ dependencies = [ [[package]] name = "phoenix-rise-math" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68c74b1bd9d5ca125021620f44752f8ef12348d981a6210ac41c432cb546f35" +checksum = "b5739785af694dc6388f00672d3570998bb95b9c96363ce797229cb12a318014" dependencies = [ "borsh", "bytemuck", "fixed", "pastey 0.1.1", - "rand 0.10.1", "rust_decimal", + "serde", "sha2-const-stable", "solana-pubkey 3.0.0", "thiserror 2.0.18", @@ -3349,11 +3386,12 @@ dependencies = [ [[package]] name = "phoenix-rise-types" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fdce222fa3532e7aa1994944d089957192ddd71a265ed38b06ce1e5798f4b26" +checksum = "07c623927686da9c168297e4c630262f61d902a342ee2126d181dc02c5d30be1" dependencies = [ "chrono", + "phoenix-rise-math", "serde", "serde_json", "serde_with", @@ -3983,7 +4021,7 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36ea0e100fadf81be85d7ff70f86cd805c7572601d4ab2946207f36540854b43" dependencies = [ - "darling", + "darling 0.23.0", "proc-macro2", "quote", "serde_json", @@ -4435,7 +4473,7 @@ version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65" dependencies = [ - "darling", + "darling 0.23.0", "proc-macro2", "quote", "syn 2.0.117", @@ -5145,15 +5183,14 @@ dependencies = [ [[package]] name = "solana-keypair" -version = "3.1.2" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "263d614c12aa267a3278703175fd6440552ca61bc960b5a02a4482720c53438b" +checksum = "5ac8be597c9e231b0cab2928ce3bc3e4ee77d9c0ad92977b9d901f3879f25a7a" dependencies = [ "ed25519-dalek", "ed25519-dalek-bip32", "five8", - "five8_core", - "rand 0.9.2", + "rand 0.8.5", "solana-address 2.6.1", "solana-derivation-path", "solana-seed-derivable", @@ -5671,9 +5708,9 @@ dependencies = [ [[package]] name = "solana-signature" -version = "3.3.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "132a93134f1262aa832f1849b83bec6c9945669b866da18661a427943b9e801e" +checksum = "f4028aeedd443d80f1dccbf64872593a80e6a9676ee9007f6eccb63b65983ebd" dependencies = [ "ed25519-dalek", "five8", @@ -5682,7 +5719,7 @@ dependencies = [ "serde-big-array", "serde_derive", "solana-sanitize", - "wincode 0.4.9", + "wincode 0.2.5", ] [[package]] @@ -7196,15 +7233,14 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "wincode" -version = "0.4.9" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "657690780ce23e6f66576a782ffd88eb353512381817029cc1d7a99154bb6d1f" +checksum = "d5cec722a3274e47d1524cbe2cea762f2c19d615bd9d73ada21db9066349d57e" dependencies = [ - "pastey 0.2.3", "proc-macro2", "quote", "thiserror 2.0.18", - "wincode-derive", + "wincode-derive 0.2.3", ] [[package]] @@ -7217,7 +7253,19 @@ dependencies = [ "proc-macro2", "quote", "thiserror 2.0.18", - "wincode-derive", + "wincode-derive 0.4.6", +] + +[[package]] +name = "wincode-derive" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8961eb04054a1b2e026b5628e24da7e001350249a787e1a85aa961f33dc5f286" +dependencies = [ + "darling 0.21.3", + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] @@ -7226,7 +7274,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15ab90b719560d0fda79c74550ad1c948d17b118765942838055ebaf34d67071" dependencies = [ - "darling", + "darling 0.23.0", "proc-macro2", "quote", "syn 2.0.117", diff --git a/Cargo.toml b/Cargo.toml index 3b1004c..1f43629 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ resolver = "2" vulcan-lib = { path = "vulcan-lib" } # Rise SDK -phoenix-rise = "0.3.0" +phoenix-rise = "0.3.1" # CLI clap = { version = "4", features = ["derive"] } diff --git a/vulcan-lib/src/context.rs b/vulcan-lib/src/context.rs index 4cb883c..900e092 100644 --- a/vulcan-lib/src/context.rs +++ b/vulcan-lib/src/context.rs @@ -12,10 +12,7 @@ use phoenix_rise::accounts::perp_asset_map::{ }; use phoenix_rise::api::{PhoenixHttpClient, PhoenixMetadata}; use phoenix_rise::core::PhoenixTxBuilder; -use phoenix_rise::math::{ - BaseLots, BasisPoints, Constant, LeverageTier, LeverageTiers, PerpAssetMetadata, - QuoteLotsPerBaseLotPerTick, SignedQuoteLotsPerBaseLot, Ticks, -}; +use phoenix_rise::math::{BasisPoints, LeverageTier, LeverageTiers, PerpAssetMetadata}; use phoenix_rise::types::prelude::ExchangeSnapshotView; use serde::{Deserialize, Serialize}; use solana_commitment_config::CommitmentConfig; @@ -379,9 +376,7 @@ fn perp_asset_metadata_from_account( ) -> Result { let static_params = account_metadata.static_market_params(); let risk_params = account_metadata.risk_params(); - let mark_price_ticks = - Ticks::new_checked(account_metadata.oracle_price().mark_price.price.ticks) - .map_err(|e| crate::error::VulcanError::api("PERP_ASSET_MAP_INVALID", e.to_string()))?; + let mark_price_ticks = account_metadata.oracle_price().mark_price.price.ticks; let leverage_tiers = leverage_tiers_from_account(&risk_params.leverage_tiers)?; let risk_factors = risk_factors_from_account(&risk_params.risk_factors)?; let mut metadata = PerpAssetMetadata::new( @@ -389,21 +384,19 @@ fn perp_asset_metadata_from_account( static_params.asset_id() as u64, static_params.base_lot_decimals, mark_price_ticks, - QuoteLotsPerBaseLotPerTick::new(static_params.tick_size), + static_params.tick_size, leverage_tiers, risk_factors, risk_params.cancel_order_risk_factor, - u16_checked(risk_params.upnl_risk_factor, "upnl_risk_factor")?, + u16_checked(risk_params.upnl_risk_factor.into(), "upnl_risk_factor")?, u16_checked( - risk_params.upnl_risk_factor_for_withdrawals, + risk_params.upnl_risk_factor_for_withdrawals.into(), "upnl_risk_factor_for_withdrawals", )?, ); - metadata.cumulative_funding_rate = SignedQuoteLotsPerBaseLot::new( - account_metadata - .funding_accumulator() - .cumulative_funding_rate, - ); + metadata.cumulative_funding_rate = account_metadata + .funding_accumulator() + .cumulative_funding_rate; Ok(metadata) } @@ -418,10 +411,10 @@ fn leverage_tiers_from_account( } let convert = |tier: &AccountLeverageTier| -> Result { Ok(LeverageTier { - upper_bound_size: BaseLots::new(tier.upper_bound_size), - max_leverage: Constant::new(tier.max_leverage), + upper_bound_size: tier.upper_bound_size, + max_leverage: tier.max_leverage, limit_order_risk_factor: BasisPoints::new(u16_checked( - tier.limit_order_risk_factor, + tier.limit_order_risk_factor.into(), "leverage_tier.limit_order_risk_factor", )? as u64), }) diff --git a/vulcan-lib/src/wallet/keypair.rs b/vulcan-lib/src/wallet/keypair.rs index b461c0d..ceb2e22 100644 --- a/vulcan-lib/src/wallet/keypair.rs +++ b/vulcan-lib/src/wallet/keypair.rs @@ -98,10 +98,13 @@ impl Wallet { } /// Get a Solana SDK Keypair from this wallet - #[allow(deprecated)] pub fn to_solana_keypair(&self) -> Result { - let encoded = bs58::encode(&self.keypair_bytes).into_string(); - solana_sdk::signature::Keypair::try_from_base58_string(&encoded) + let keypair_bytes: [u8; 64] = self + .keypair_bytes + .as_slice() + .try_into() + .map_err(|_| anyhow!("Invalid keypair length: expected 64 bytes"))?; + solana_sdk::signature::Keypair::try_from(&keypair_bytes[..]) .map_err(|e| anyhow!("Failed to create Solana keypair: {}", e)) }