From 06eb9629b05b4135b356bcbeaf5e72e05657e5d3 Mon Sep 17 00:00:00 2001 From: ananas Date: Sat, 26 Jul 2025 01:33:44 +0100 Subject: [PATCH 01/14] feat: add lowlevel example --- lowlevel/Cargo.lock | 7977 ++++++++++++++++++++++++++++++++++++++++ lowlevel/Cargo.toml | 27 + lowlevel/README.md | 13 + lowlevel/Xargo.toml | 2 + lowlevel/src/lib.rs | 87 + lowlevel/tests/test.rs | 109 + 6 files changed, 8215 insertions(+) create mode 100644 lowlevel/Cargo.lock create mode 100644 lowlevel/Cargo.toml create mode 100644 lowlevel/README.md create mode 100644 lowlevel/Xargo.toml create mode 100644 lowlevel/src/lib.rs create mode 100644 lowlevel/tests/test.rs diff --git a/lowlevel/Cargo.lock b/lowlevel/Cargo.lock new file mode 100644 index 0000000..934d920 --- /dev/null +++ b/lowlevel/Cargo.lock @@ -0,0 +1,7977 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "account-compression" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0133fd66fc7bc5f78e566ce55e507f4b66a63ae18a719de86628c1986c80bca8" +dependencies = [ + "aligned-sized", + "anchor-lang", + "bytemuck", + "light-account-checks", + "light-batched-merkle-tree", + "light-bounded-vec", + "light-compressed-account", + "light-concurrent-merkle-tree", + "light-hash-set", + "light-hasher", + "light-indexed-merkle-tree", + "light-merkle-tree-metadata", + "light-zero-copy", + "num-bigint 0.4.6", + "solana-sdk", + "solana-security-txt", + "zerocopy", +] + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[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 = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.3", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "aligned-sized" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48a526ec4434d531d488af59fe866f36b310fe8906691c75dffa664450a3800a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "anchor-attribute-access-control" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f70fd141a4d18adf11253026b32504f885447048c7494faf5fa83b01af9c0cf" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "715a261c57c7679581e06f07a74fa2af874ac30f86bd8ea07cca4a7e5388a064" +dependencies = [ + "anchor-syn", + "bs58", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "730d6df8ae120321c5c25e0779e61789e4b70dc8297102248902022f286102e4" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27e6e449cc3a37b2880b74dcafb8e5a17b954c0e58e376432d7adc646fb333ef" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7710e4c54adf485affcd9be9adec5ef8846d9c71d7f31e16ba86ff9fc1dd49f" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ecfd49b2aeadeb32f35262230db402abed76ce87e27562b34f61318b2ec83c" +dependencies = [ + "anchor-lang-idl", + "anchor-syn", + "anyhow", + "bs58", + "heck", + "proc-macro2", + "quote", + "serde_json", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be89d160793a88495af462a7010b3978e48e30a630c91de47ce2c1d3cb7a6149" +dependencies = [ + "anchor-syn", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-serde" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abc6ee78acb7bfe0c2dd2abc677aaa4789c0281a0c0ef01dbf6fe85e0fd9e6e4" +dependencies = [ + "anchor-syn", + "borsh-derive-internal", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134a01c0703f6fd355a0e472c033f6f3e41fac1ef6e370b20c50f4c8d022cea7" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6bab117055905e930f762c196e08f861f8dfe7241b92cee46677a3b15561a0a" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", + "anchor-derive-serde", + "anchor-derive-space", + "anchor-lang-idl", + "base64 0.21.7", + "bincode", + "borsh 0.10.4", + "bytemuck", + "solana-program", + "thiserror 1.0.69", +] + +[[package]] +name = "anchor-lang-idl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e8599d21995f68e296265aa5ab0c3cef582fd58afec014d01bd0bce18a4418" +dependencies = [ + "anchor-lang-idl-spec", + "anyhow", + "heck", + "regex", + "serde", + "serde_json", + "sha2 0.10.9", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", +] + +[[package]] +name = "anchor-spl" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c08cb5d762c0694f74bd02c9a5b04ea53cefc496e2c27b3234acffca5cd076b" +dependencies = [ + "anchor-lang", + "spl-associated-token-account", + "spl-pod", + "spl-token", + "spl-token-2022 6.0.0", + "spl-token-group-interface", + "spl-token-metadata-interface", +] + +[[package]] +name = "anchor-syn" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dc7a6d90cc643df0ed2744862cdf180587d1e5d28936538c18fc8908489ed67" +dependencies = [ + "anyhow", + "bs58", + "cargo_toml", + "heck", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.9", + "syn 1.0.109", + "thiserror 1.0.69", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anyhow" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-bn254" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d69eab57e8d2663efa5c63135b2af4f396d66424f88954c21104125ab6b3e6bc" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe 0.6.0", + "fnv", + "hashbrown 0.15.4", + "itertools 0.13.0", + "num-bigint 0.4.6", + "num-integer", + "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 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" +dependencies = [ + "ark-ff-asm 0.5.0", + "ark-ff-macros 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "educe 0.6.0", + "itertools 0.13.0", + "num-bigint 0.4.6", + "num-traits", + "paste", + "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-asm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" +dependencies = [ + "quote", + "syn 2.0.104", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe 0.6.0", + "fnv", + "hashbrown 0.15.4", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive 0.4.2", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint 0.4.6", +] + +[[package]] +name = "ark-serialize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" +dependencies = [ + "ark-serialize-derive 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "num-bigint 0.4.6", +] + +[[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-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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 = "ark-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" +dependencies = [ + "num-traits", + "rand 0.8.5", + "rayon", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.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.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddb939d66e4ae03cee6091612804ba446b12878410cfa17f785f4dd67d4014e8" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "atomic-waker" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "backtrace" +version = "0.3.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake3" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-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.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" +dependencies = [ + "borsh-derive 1.5.7", + "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.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" +dependencies = [ + "once_cell", + "proc-macro-crate 3.3.0", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.23", +] + +[[package]] +name = "cc" +version = "1.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1599538de2394445747c8cf7935946e3cc27e9625f889d979bfb2aaf569362" +dependencies = [ + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "cfg_eval" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "chrono" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[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 = "console" +version = "0.15.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width", + "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", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "typenum", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[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.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b7c5dbd637569a2cca66e8d66b8c446a1e7bf064ea321d265d7b3dfe7c97e" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rand_core 0.6.4", + "rustc_version", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.104", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "deranged" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivation-path" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + +[[package]] +name = "eager" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[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", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-dalek-bip32" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" +dependencies = [ + "derivation-path", + "ed25519-dalek", + "hmac 0.12.1", + "sha2 0.10.9", +] + +[[package]] +name = "educe" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" +dependencies = [ + "enum-ordinalize 3.1.15", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize 4.3.0", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-iterator" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fd242f399be1da0a5354aa462d57b4ab2b4ee0683cc552f7c007d2d12d36e94" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "enum-ordinalize" +version = "3.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "fiat-crypto" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" + +[[package]] +name = "five8_const" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26dec3da8bc3ef08f2c04f61eab298c3ab334523e55f076354d6d6f613799a7b" +dependencies = [ + "five8_core", +] + +[[package]] +name = "five8_core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2551bf44bc5f776c15044b9b94153a00198be06743e262afaaa61f11ac7523a5" + +[[package]] +name = "flate2" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "groth16-solana" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a6d1ffb18dbf5cfc60b11bd7da88474c672870247c1e5b498619bcb6ba3d8f5" +dependencies = [ + "ark-bn254 0.5.0", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "num-bigint 0.4.6", + "solana-bn254", + "thiserror 1.0.69", +] + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.10.0", + "slab", + "tokio", + "tokio-util 0.7.15", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.3.1", + "indexmap 2.10.0", + "slab", + "tokio", + "tokio-util 0.7.15", + "tracing", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +dependencies = [ + "allocator-api2", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.3.1", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http 1.3.1", + "http-body 1.0.1", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" + +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.27", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.11", + "http 1.3.1", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.32", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http 1.3.1", + "hyper 1.6.0", + "hyper-util", + "rustls 0.23.29", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.2", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.32", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.6.0", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "hyper 1.6.0", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "system-configuration 0.6.1", + "tokio", + "tower-service", + "tracing", + "windows-registry", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +dependencies = [ + "equivalent", + "hashbrown 0.15.4", + "serde", +] + +[[package]] +name = "indicatif" +version = "0.17.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" +dependencies = [ + "console", + "number_prefix", + "portable-atomic", + "unicode-width", + "web-time", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "io-uring" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" +dependencies = [ + "bitflags 2.9.1", + "cfg-if", + "libc", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "jobserver" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +dependencies = [ + "getrandom 0.3.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.174" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" + +[[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 = "light-account-checks" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3fd000a2b8e0cc9d0b7b7712964870df51f2114f1693b9d8f0414f6f3ec16bd" +dependencies = [ + "solana-account-info", + "solana-program-error", + "solana-pubkey", + "solana-sysvar", + "thiserror 2.0.12", +] + +[[package]] +name = "light-batched-merkle-tree" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81c7e179246468b09bf5c6882ef33043e178ff90eb6eab0c1c4c3623ef84b154" +dependencies = [ + "aligned-sized", + "borsh 0.10.4", + "light-account-checks", + "light-bloom-filter", + "light-compressed-account", + "light-hasher", + "light-macros", + "light-merkle-tree-metadata", + "light-verifier", + "light-zero-copy", + "solana-account-info", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "solana-sysvar", + "thiserror 2.0.12", + "zerocopy", +] + +[[package]] +name = "light-bloom-filter" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44abcb5554e1c15cefa9ac17e4ceda6f5afb039db25ab1fd777f012356d0f964" +dependencies = [ + "bitvec", + "num-bigint 0.4.6", + "solana-nostd-keccak", + "solana-program-error", + "thiserror 2.0.12", +] + +[[package]] +name = "light-bounded-vec" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233a69f003522990dadcf923b436094ffcb55326a2c3cef7f67acdbcb6e5b039" +dependencies = [ + "bytemuck", + "memoffset", + "solana-program-error", + "thiserror 1.0.69", +] + +[[package]] +name = "light-client" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62345edfabd8ee46f62977105cc319213a8615e61325a18f82c8f25978dfe04d" +dependencies = [ + "async-trait", + "base64 0.13.1", + "borsh 0.10.4", + "bs58", + "bytemuck", + "lazy_static", + "light-compressed-account", + "light-concurrent-merkle-tree", + "light-hasher", + "light-indexed-merkle-tree", + "light-merkle-tree-metadata", + "light-prover-client", + "light-sdk", + "num-bigint 0.4.6", + "num-traits", + "photon-api", + "rand 0.8.5", + "solana-account", + "solana-account-decoder-client-types", + "solana-address-lookup-table-interface", + "solana-banks-client", + "solana-clock", + "solana-commitment-config", + "solana-compute-budget-interface", + "solana-epoch-info", + "solana-hash", + "solana-instruction", + "solana-keypair", + "solana-program-error", + "solana-pubkey", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-signature", + "solana-transaction", + "solana-transaction-error", + "solana-transaction-status-client-types", + "thiserror 2.0.12", + "tokio", + "tracing", +] + +[[package]] +name = "light-compressed-account" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f15113babaca9efb592631ec1e7e78c1c83413818a6e1e4248b7df53d88fe65" +dependencies = [ + "anchor-lang", + "borsh 0.10.4", + "bytemuck", + "light-hasher", + "light-macros", + "light-zero-copy", + "solana-program-error", + "solana-pubkey", + "thiserror 2.0.12", + "zerocopy", +] + +[[package]] +name = "light-compressed-token" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9ea8f8e9fb7c69ed05ee7899361de7b9ea2dbd08252348871a4a631aabe451" +dependencies = [ + "account-compression", + "anchor-lang", + "anchor-spl", + "light-compressed-account", + "light-hasher", + "light-heap", + "light-system-program-anchor", + "light-zero-copy", + "solana-sdk", + "solana-security-txt", + "spl-token", + "spl-token-2022 7.0.0", + "zerocopy", +] + +[[package]] +name = "light-concurrent-merkle-tree" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f878301620df78ba7e7758c5fd720f28040f5c157375f88d310f15ddb1746" +dependencies = [ + "borsh 0.10.4", + "light-bounded-vec", + "light-hasher", + "memoffset", + "solana-program-error", + "thiserror 2.0.12", +] + +[[package]] +name = "light-hash-set" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3893319277415f3ffbe9cfa3d1838d0d437b5539a69040fc0f161f29fb495673" +dependencies = [ + "light-hasher", + "num-bigint 0.4.6", + "num-traits", + "solana-program-error", + "thiserror 2.0.12", +] + +[[package]] +name = "light-hasher" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6445937ea244bebae0558e2aaec375791895d08c785b87cc45b62cd80d69139" +dependencies = [ + "ark-bn254 0.5.0", + "ark-ff 0.5.0", + "arrayvec", + "borsh 0.10.4", + "light-poseidon 0.3.0", + "num-bigint 0.4.6", + "sha2 0.10.9", + "sha3", + "solana-nostd-keccak", + "solana-program-error", + "solana-pubkey", + "thiserror 2.0.12", +] + +[[package]] +name = "light-heap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d28744e8876667e9ec8124c6b0fae425972a987648bd5e8de720dbe1323d5fe" +dependencies = [ + "anchor-lang", +] + +[[package]] +name = "light-indexed-array" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc786d8df68ef64493fea04914a7a7745f8122f2efbae043cd4ba4eaffa9e6db" +dependencies = [ + "light-hasher", + "num-bigint 0.4.6", + "num-traits", + "thiserror 2.0.12", +] + +[[package]] +name = "light-indexed-merkle-tree" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f38362948ad7b8ae1fd1626d38743bed5a15563336fb5d4148b9162186c8e55" +dependencies = [ + "light-bounded-vec", + "light-concurrent-merkle-tree", + "light-hasher", + "light-merkle-tree-reference", + "num-bigint 0.4.6", + "num-traits", + "solana-program-error", + "thiserror 2.0.12", +] + +[[package]] +name = "light-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "861c0817697c1201c2235cd831fcbaa2564a5f778e5229e9f5cc21035e97c273" +dependencies = [ + "bs58", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "light-merkle-tree-metadata" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "544048fa95ea95fc1e952a2b9b1d6f09340c8decaffd1ad239fe1f6eb905ae76" +dependencies = [ + "anchor-lang", + "borsh 0.10.4", + "bytemuck", + "light-compressed-account", + "solana-msg", + "solana-program-error", + "solana-sysvar", + "thiserror 2.0.12", + "zerocopy", +] + +[[package]] +name = "light-merkle-tree-reference" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1650701feac958261b2c3ab4da361ad8548985ee3ee496a17e76db44d2d3c9e3" +dependencies = [ + "light-hasher", + "light-indexed-array", + "num-bigint 0.4.6", + "num-traits", + "thiserror 2.0.12", +] + +[[package]] +name = "light-poseidon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +dependencies = [ + "ark-bn254 0.4.0", + "ark-ff 0.4.2", + "num-bigint 0.4.6", + "thiserror 1.0.69", +] + +[[package]] +name = "light-poseidon" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3d87542063daaccbfecd78b60f988079b6ec4e089249658b9455075c78d42" +dependencies = [ + "ark-bn254 0.5.0", + "ark-ff 0.5.0", + "num-bigint 0.4.6", + "thiserror 1.0.69", +] + +[[package]] +name = "light-program-test" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0294c42c34db697214f3e6f3eadb4fe0ced41a0f5df9059ec16a32fa31eda6a6" +dependencies = [ + "account-compression", + "anchor-lang", + "async-trait", + "borsh 0.10.4", + "bytemuck", + "light-batched-merkle-tree", + "light-client", + "light-compressed-account", + "light-compressed-token", + "light-concurrent-merkle-tree", + "light-hasher", + "light-indexed-array", + "light-indexed-merkle-tree", + "light-merkle-tree-metadata", + "light-merkle-tree-reference", + "light-prover-client", + "light-registry", + "light-sdk", + "litesvm", + "log", + "num-bigint 0.4.6", + "num-traits", + "photon-api", + "rand 0.8.5", + "reqwest 0.12.22", + "solana-account", + "solana-banks-client", + "solana-compute-budget", + "solana-instruction", + "solana-pubkey", + "solana-rpc-client-api", + "solana-sdk", + "solana-transaction", + "solana-transaction-status-client-types", + "tokio", +] + +[[package]] +name = "light-prover-client" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cea2ccb781ac0fe0e54d26d808c8dc48b3d3b8512302f7da5a0a606f9f1ac41" +dependencies = [ + "ark-bn254 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "light-hasher", + "light-indexed-array", + "light-sparse-merkle-tree", + "num-bigint 0.4.6", + "num-traits", + "reqwest 0.11.27", + "serde", + "serde_json", + "solana-bn254", + "thiserror 2.0.12", + "tokio", + "tracing", +] + +[[package]] +name = "light-registry" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb3e904173f6b8048e6fe4d25ddfe6a77586b284f8788e5141cd3486a09ce8a6" +dependencies = [ + "account-compression", + "aligned-sized", + "anchor-lang", + "light-batched-merkle-tree", + "light-merkle-tree-metadata", + "light-system-program-anchor", + "solana-sdk", + "solana-security-txt", +] + +[[package]] +name = "light-sdk" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043b8e1c5172494c65373330710df30b06e66582135b9c0342455c2c1d0ef247" +dependencies = [ + "anchor-lang", + "borsh 0.10.4", + "light-account-checks", + "light-compressed-account", + "light-hasher", + "light-macros", + "light-sdk-macros", + "light-sdk-types", + "light-zero-copy", + "num-bigint 0.4.6", + "solana-account-info", + "solana-cpi", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "thiserror 2.0.12", +] + +[[package]] +name = "light-sdk-macros" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "951ce0cad71f6c774bb6585281a3a5c636920b05b4d3e5ef27b5050f57b6032b" +dependencies = [ + "light-hasher", + "light-poseidon 0.3.0", + "proc-macro2", + "quote", + "solana-pubkey", + "syn 2.0.104", +] + +[[package]] +name = "light-sdk-types" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a641277a3e4272f3f619743f0ac31f81f9a085b69108bb625134ebce7a5a12c" +dependencies = [ + "anchor-lang", + "borsh 0.10.4", + "light-account-checks", + "light-compressed-account", + "light-hasher", + "light-macros", + "light-zero-copy", + "thiserror 2.0.12", +] + +[[package]] +name = "light-sparse-merkle-tree" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "169c23a6a74ba86a94f322ed514f47465beb53c9b7fdbad45955d8116c945760" +dependencies = [ + "light-hasher", + "light-indexed-array", + "num-bigint 0.4.6", + "num-traits", + "thiserror 2.0.12", +] + +[[package]] +name = "light-system-program-anchor" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1214b57abe1d89139f7ca632b66d4a8fc0e89945e781291a5cb12eb16de49cf3" +dependencies = [ + "account-compression", + "aligned-sized", + "anchor-lang", + "light-compressed-account", + "light-zero-copy", + "zerocopy", +] + +[[package]] +name = "light-verifier" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85fdf317ec3cfcd3a8e6556a5b5e7fbcc207a40264700f9a5271876838f26f58" +dependencies = [ + "groth16-solana", + "light-compressed-account", + "thiserror 2.0.12", +] + +[[package]] +name = "light-zero-copy" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a34d759f65547a6540db7047f38f4cb2c3f01658deca95a1dd06f26b578de947" +dependencies = [ + "solana-program-error", + "thiserror 2.0.12", + "zerocopy", +] + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + +[[package]] +name = "litesvm" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb7e5f4462f34439adcfcab58099bc7a89c67a17f8240b84a993b8b705c1becb" +dependencies = [ + "ansi_term", + "bincode", + "indexmap 2.10.0", + "itertools 0.14.0", + "log", + "solana-account", + "solana-address-lookup-table-interface", + "solana-bpf-loader-program", + "solana-builtins", + "solana-clock", + "solana-compute-budget", + "solana-compute-budget-instruction", + "solana-config-program", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-feature-set", + "solana-fee", + "solana-fee-structure", + "solana-hash", + "solana-instruction", + "solana-instructions-sysvar", + "solana-keypair", + "solana-last-restart-slot", + "solana-loader-v3-interface", + "solana-loader-v4-interface", + "solana-log-collector", + "solana-measure", + "solana-message", + "solana-native-token", + "solana-nonce", + "solana-nonce-account", + "solana-precompiles", + "solana-program-error", + "solana-program-runtime", + "solana-pubkey", + "solana-rent", + "solana-reserved-account-keys", + "solana-sdk-ids", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", + "solana-slot-hashes", + "solana-slot-history", + "solana-stake-interface", + "solana-svm-transaction", + "solana-system-interface", + "solana-system-program", + "solana-sysvar", + "solana-sysvar-id", + "solana-timings", + "solana-transaction", + "solana-transaction-context", + "solana-transaction-error", + "solana-vote-program", + "thiserror 2.0.12", +] + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" + +[[package]] +name = "lowlevel" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "borsh 0.10.4", + "light-client", + "light-compressed-account", + "light-hasher", + "light-program-test", + "light-sdk", + "light-sdk-types", + "solana-sdk", + "tokio", +] + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a973b4e44ce6cad84ce69d797acf9a044532e4184c4f267913d1b546a0727b7a" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" +dependencies = [ + "proc-macro-crate 3.3.0", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl" +version = "0.10.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +dependencies = [ + "bitflags 2.9.1", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "opentelemetry" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "thiserror 1.0.69", +] + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "percentage" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" +dependencies = [ + "num", +] + +[[package]] +name = "photon-api" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "217aa078d82b9366955e0603e5c7b9abad0eb6595c963579da0ec04bda4ab829" +dependencies = [ + "reqwest 0.12.22", + "serde", + "serde_derive", + "serde_json", + "serde_with", + "url", + "uuid", +] + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[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.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "qualifier_attr" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "radium" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[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 = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "ref-cast" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "async-compression", + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.27", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.32", + "hyper-rustls 0.24.2", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "log", + "mime", + "mime_guess", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.21.12", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration 0.5.1", + "tokio", + "tokio-native-tls", + "tokio-rustls 0.24.1", + "tokio-util 0.7.15", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "reqwest" +version = "0.12.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.11", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.6.0", + "hyper-rustls 0.27.7", + "hyper-tls 0.6.0", + "hyper-util", + "js-sys", + "log", + "mime", + "mime_guess", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "reqwest-middleware" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a735987236a8e238bf0296c7e351b999c188ccc11477f311b82b55c93984216" +dependencies = [ + "anyhow", + "async-trait", + "http 0.2.12", + "reqwest 0.11.27", + "serde", + "task-local-extensions", + "thiserror 1.0.69", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.16", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +dependencies = [ + "bitflags 2.9.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring", + "rustls-webpki 0.101.7", + "sct", +] + +[[package]] +name = "rustls" +version = "0.23.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki 0.103.4", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-pki-types" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.9.1", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-big-array" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11fc7cc2c76d73e0f27ee52abbd64eec84d46f370c88371120433196934e4b7f" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.10.0", + "schemars 0.9.0", + "schemars 1.0.4", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[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", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "slab" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "solana-account" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f949fe4edaeaea78c844023bfc1c898e0b1f5a100f8a8d2d0f85d0a7b090258" +dependencies = [ + "bincode", + "serde", + "serde_bytes", + "serde_derive", + "solana-account-info", + "solana-clock", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-sysvar", +] + +[[package]] +name = "solana-account-decoder-client-types" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6329c4f360f5173dd6f65022708486cdd24d302841058e2310945a2502284105" +dependencies = [ + "base64 0.22.1", + "bs58", + "serde", + "serde_derive", + "serde_json", + "solana-account", + "solana-pubkey", + "zstd", +] + +[[package]] +name = "solana-account-info" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c17d606a298a205fae325489fbed88ee6dc4463c111672172327e741c8905d" +dependencies = [ + "bincode", + "serde", + "solana-program-error", + "solana-program-memory", + "solana-pubkey", +] + +[[package]] +name = "solana-address-lookup-table-interface" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1673f67efe870b64a65cb39e6194be5b26527691ce5922909939961a6e6b395" +dependencies = [ + "bincode", + "bytemuck", + "serde", + "serde_derive", + "solana-clock", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-slot-hashes", +] + +[[package]] +name = "solana-address-lookup-table-program" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b87ae97f2d1b91a9790c1e35dba3f90a4d595d105097ad93fa685cbc034ad0f1" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive", + "num-traits", + "solana-address-lookup-table-interface", + "solana-bincode", + "solana-clock", + "solana-feature-set", + "solana-instruction", + "solana-log-collector", + "solana-packet", + "solana-program-runtime", + "solana-pubkey", + "solana-system-interface", + "solana-transaction-context", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-atomic-u64" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52e52720efe60465b052b9e7445a01c17550666beec855cce66f44766697bc2" +dependencies = [ + "parking_lot", +] + +[[package]] +name = "solana-banks-client" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e8b93a73f583fb03c9a43be9185c2e04c8a5df84e3c20fd813f0ff79a12142" +dependencies = [ + "borsh 1.5.7", + "futures", + "solana-banks-interface", + "solana-program", + "solana-sdk", + "tarpc", + "thiserror 2.0.12", + "tokio", + "tokio-serde", +] + +[[package]] +name = "solana-banks-interface" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e54bdc2f951d900289a3de58f8fc835fcea67fdaaea390b447e16a8a403a2399" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk", + "tarpc", +] + +[[package]] +name = "solana-big-mod-exp" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75db7f2bbac3e62cfd139065d15bcda9e2428883ba61fc8d27ccb251081e7567" +dependencies = [ + "num-bigint 0.4.6", + "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", +] + +[[package]] +name = "solana-blake3-hasher" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a0801e25a1b31a14494fc80882a036be0ffd290efc4c2d640bfcca120a4672" +dependencies = [ + "blake3", + "solana-define-syscall", + "solana-hash", + "solana-sanitize", +] + +[[package]] +name = "solana-bn254" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9abc69625158faaab02347370b91c0d8e0fe347bf9287239f0fbe8f5864d91da" +dependencies = [ + "ark-bn254 0.4.0", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "bytemuck", + "solana-define-syscall", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-borsh" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "718333bcd0a1a7aed6655aa66bef8d7fb047944922b2d3a18f49cbc13e73d004" +dependencies = [ + "borsh 0.10.4", + "borsh 1.5.7", +] + +[[package]] +name = "solana-bpf-loader-program" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6931e8893b48e3a1c8124938f580fff857d84895582578cc7dbf100dd08d2c8f" +dependencies = [ + "bincode", + "libsecp256k1", + "qualifier_attr", + "scopeguard", + "solana-account", + "solana-account-info", + "solana-big-mod-exp", + "solana-bincode", + "solana-blake3-hasher", + "solana-bn254", + "solana-clock", + "solana-compute-budget", + "solana-cpi", + "solana-curve25519", + "solana-feature-set", + "solana-hash", + "solana-instruction", + "solana-keccak-hasher", + "solana-loader-v3-interface", + "solana-loader-v4-interface", + "solana-log-collector", + "solana-measure", + "solana-packet", + "solana-poseidon", + "solana-precompiles", + "solana-program-entrypoint", + "solana-program-memory", + "solana-program-runtime", + "solana-pubkey", + "solana-sbpf", + "solana-sdk-ids", + "solana-secp256k1-recover", + "solana-sha256-hasher", + "solana-stable-layout", + "solana-system-interface", + "solana-sysvar", + "solana-sysvar-id", + "solana-timings", + "solana-transaction-context", + "solana-type-overrides", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-builtins" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9240641f944ece59e097c9981bdc33b2f519cbd91b9764ff5f62c307d986a3d" +dependencies = [ + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-compute-budget-program", + "solana-config-program", + "solana-feature-set", + "solana-loader-v4-program", + "solana-program-runtime", + "solana-pubkey", + "solana-sdk-ids", + "solana-stake-program", + "solana-system-program", + "solana-vote-program", + "solana-zk-elgamal-proof-program", + "solana-zk-token-proof-program", +] + +[[package]] +name = "solana-builtins-default-costs" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fb6728141dc45bdde9d68b67bb914013be28f94a2aea8bb7131ea8c6161c30e" +dependencies = [ + "ahash", + "lazy_static", + "log", + "qualifier_attr", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-compute-budget-program", + "solana-config-program", + "solana-feature-set", + "solana-loader-v4-program", + "solana-pubkey", + "solana-sdk-ids", + "solana-stake-program", + "solana-system-program", + "solana-vote-program", +] + +[[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", +] + +[[package]] +name = "solana-clock" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c2177a1b9fe8326004f1151a5acd124420b737811080b1035df31349e4d892" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-cluster-type" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ace9fea2daa28354d107ea879cff107181d85cd4e0f78a2bedb10e1a428c97e" +dependencies = [ + "serde", + "serde_derive", + "solana-hash", +] + +[[package]] +name = "solana-commitment-config" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac49c4dde3edfa832de1697e9bcdb7c3b3f7cb7a1981b7c62526c8bb6700fb73" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "solana-compute-budget" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46e593ce26764fa3366b6d125b9f2455f6cd8d557f86b4f3c7b7c517db6d8f5f" +dependencies = [ + "solana-fee-structure", + "solana-program-entrypoint", +] + +[[package]] +name = "solana-compute-budget-instruction" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240e28cf764d1468f2388fb0d10b70278a64d47277ff552379116ba45d609cd1" +dependencies = [ + "log", + "solana-borsh", + "solana-builtins-default-costs", + "solana-compute-budget", + "solana-compute-budget-interface", + "solana-feature-set", + "solana-instruction", + "solana-packet", + "solana-pubkey", + "solana-sdk-ids", + "solana-svm-transaction", + "solana-transaction-error", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-compute-budget-interface" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a5df17b195d312b66dccdde9beec6709766d8230cb4718c4c08854f780d0309" +dependencies = [ + "borsh 1.5.7", + "serde", + "serde_derive", + "solana-instruction", + "solana-sdk-ids", +] + +[[package]] +name = "solana-compute-budget-program" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfc6b8ea70ed5123412655ed15e7e0e29f06a7d5b82eb2572bee608d7755afb7" +dependencies = [ + "qualifier_attr", + "solana-program-runtime", +] + +[[package]] +name = "solana-config-program" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2417094a8c5c2d60812a5bd6f0bd31bdefc49479826c10347a85d217e088c964" +dependencies = [ + "bincode", + "chrono", + "serde", + "serde_derive", + "solana-account", + "solana-bincode", + "solana-instruction", + "solana-log-collector", + "solana-packet", + "solana-program-runtime", + "solana-pubkey", + "solana-sdk-ids", + "solana-short-vec", + "solana-stake-interface", + "solana-system-interface", + "solana-transaction-context", +] + +[[package]] +name = "solana-cpi" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc71126edddc2ba014622fc32d0f5e2e78ec6c5a1e0eb511b85618c09e9ea11" +dependencies = [ + "solana-account-info", + "solana-define-syscall", + "solana-instruction", + "solana-program-error", + "solana-pubkey", + "solana-stable-layout", +] + +[[package]] +name = "solana-curve25519" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3d15f1a893ced38529d44d7fe0d4348dc38c28fea13b6d6be5d13d438a441f" +dependencies = [ + "bytemuck", + "bytemuck_derive", + "curve25519-dalek 4.2.0", + "solana-define-syscall", + "subtle", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-decode-error" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c781686a18db2f942e70913f7ca15dc120ec38dcab42ff7557db2c70c625a35" +dependencies = [ + "num-traits", +] + +[[package]] +name = "solana-define-syscall" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf784bb2cb3e02cac9801813c30187344228d2ae952534902108f6150573a33d" + +[[package]] +name = "solana-derivation-path" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "939756d798b25c5ec3cca10e06212bdca3b1443cb9bb740a38124f58b258737b" +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", + "solana-feature-set", + "solana-instruction", + "solana-precompile-error", + "solana-sdk-ids", +] + +[[package]] +name = "solana-epoch-info" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ef6f0b449290b0b9f32973eefd95af35b01c5c0c34c569f936c34c5b20d77b" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "solana-epoch-rewards" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b575d3dd323b9ea10bb6fe89bf6bf93e249b215ba8ed7f68f1a3633f384db7" +dependencies = [ + "serde", + "serde_derive", + "solana-hash", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-epoch-rewards-hasher" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c5fd2662ae7574810904585fd443545ed2b568dbd304b25a31e79ccc76e81b" +dependencies = [ + "siphasher", + "solana-hash", + "solana-pubkey", +] + +[[package]] +name = "solana-epoch-schedule" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fce071fbddecc55d727b1d7ed16a629afe4f6e4c217bc8d00af3b785f6f67ed" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-example-mocks" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84461d56cbb8bb8d539347151e0525b53910102e4bced875d49d5139708e39d3" +dependencies = [ + "serde", + "serde_derive", + "solana-address-lookup-table-interface", + "solana-clock", + "solana-hash", + "solana-instruction", + "solana-keccak-hasher", + "solana-message", + "solana-nonce", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-feature-gate-interface" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9c7fbf3e58b64a667c5f35e90af580538a95daea7001ff7806c0662d301bdf" +dependencies = [ + "bincode", + "serde", + "serde_derive", + "solana-account", + "solana-account-info", + "solana-instruction", + "solana-program-error", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-system-interface", +] + +[[package]] +name = "solana-feature-set" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e1d3b52b4a014efeaaab67f14e40af3972a4be61c523d612860db8e3145529" +dependencies = [ + "ahash", + "lazy_static", + "solana-epoch-schedule", + "solana-hash", + "solana-pubkey", + "solana-sha256-hasher", +] + +[[package]] +name = "solana-fee" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c14eaaa9d099e4510c9105522d97778cd66c3d401f0d68eebcf43179a1bf094" +dependencies = [ + "solana-feature-set", + "solana-fee-structure", + "solana-svm-transaction", +] + +[[package]] +name = "solana-fee-calculator" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89bc408da0fb3812bc3008189d148b4d3e08252c79ad810b245482a3f70cd8d" +dependencies = [ + "log", + "serde", + "serde_derive", +] + +[[package]] +name = "solana-fee-structure" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f45f94a88efdb512805563181dfa1c85c60a21b6e6d602bf24a2ea88f9399d6e" +dependencies = [ + "serde", + "serde_derive", + "solana-message", + "solana-native-token", +] + +[[package]] +name = "solana-genesis-config" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "968dabd2b92d57131473eddbd475339da530e14f54397386abf303de3a2595a2" +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-native-token", + "solana-poh-config", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-sha256-hasher", + "solana-shred-version", + "solana-signer", + "solana-time-utils", +] + +[[package]] +name = "solana-hard-forks" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c28371f878e2ead55611d8ba1b5fb879847156d04edea13693700ad1a28baf" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "solana-hash" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf7bcb14392900fe02e4e34e90234fbf0c673d4e327888410ba99fa2ba0f4e99" +dependencies = [ + "borsh 1.5.7", + "bs58", + "bytemuck", + "bytemuck_derive", + "js-sys", + "serde", + "serde_derive", + "solana-atomic-u64", + "solana-sanitize", + "wasm-bindgen", +] + +[[package]] +name = "solana-inflation" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23eef6a09eb8e568ce6839573e4966850e85e9ce71e6ae1a6c930c1c43947de3" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "solana-inline-spl" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed78e6709851bb3fa8a0acb1ee40fbffa888049d042ca132d6ccb8e0b313ac72" +dependencies = [ + "bytemuck", + "solana-pubkey", +] + +[[package]] +name = "solana-instruction" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce496a475e5062ba5de97215ab39d9c358f9c9df4bb7f3a45a1f1a8bd9065ed" +dependencies = [ + "bincode", + "borsh 1.5.7", + "getrandom 0.2.16", + "js-sys", + "num-traits", + "serde", + "serde_derive", + "solana-define-syscall", + "solana-pubkey", + "wasm-bindgen", +] + +[[package]] +name = "solana-instructions-sysvar" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0e85a6fad5c2d0c4f5b91d34b8ca47118fc593af706e523cdbedf846a954f57" +dependencies = [ + "bitflags 2.9.1", + "solana-account-info", + "solana-instruction", + "solana-program-error", + "solana-pubkey", + "solana-sanitize", + "solana-sdk-ids", + "solana-serialize-utils", + "solana-sysvar-id", +] + +[[package]] +name = "solana-keccak-hasher" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7aeb957fbd42a451b99235df4942d96db7ef678e8d5061ef34c9b34cae12f79" +dependencies = [ + "sha3", + "solana-define-syscall", + "solana-hash", + "solana-sanitize", +] + +[[package]] +name = "solana-keypair" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dbb7042c2e0c561afa07242b2099d55c57bd1b1da3b6476932197d84e15e3e4" +dependencies = [ + "bs58", + "ed25519-dalek", + "ed25519-dalek-bip32", + "rand 0.7.3", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6360ac2fdc72e7463565cd256eedcf10d7ef0c28a1249d261ec168c1b55cdd" +dependencies = [ + "serde", + "serde_derive", + "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 = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4be76cfa9afd84ca2f35ebc09f0da0f0092935ccdac0595d98447f259538c2" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "706a777242f1f39a83e2a96a2a6cb034cb41169c6ecbee2cf09cb873d9659e7e" +dependencies = [ + "serde", + "serde_bytes", + "serde_derive", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", +] + +[[package]] +name = "solana-loader-v4-program" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0298bf161e18b146230b15e8fa57bd170a05342ab9c1fd996b0241c0f016c2" +dependencies = [ + "log", + "qualifier_attr", + "solana-account", + "solana-bincode", + "solana-bpf-loader-program", + "solana-compute-budget", + "solana-instruction", + "solana-loader-v3-interface", + "solana-loader-v4-interface", + "solana-log-collector", + "solana-measure", + "solana-packet", + "solana-program-runtime", + "solana-pubkey", + "solana-sbpf", + "solana-sdk-ids", + "solana-transaction-context", + "solana-type-overrides", +] + +[[package]] +name = "solana-log-collector" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d03bf4c676117575be755296e8f21233d74cd28dca227c42e97e86219a27193" +dependencies = [ + "log", +] + +[[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-measure" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b17ee553110d2bfc454b8784840a4b75867e123d3816e13046989463fed2c6b" + +[[package]] +name = "solana-message" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "268486ba8a294ed22a4d7c1ec05f540c3dbe71cfa7c6c54b6d4d13668d895678" +dependencies = [ + "bincode", + "blake3", + "lazy_static", + "serde", + "serde_derive", + "solana-bincode", + "solana-hash", + "solana-instruction", + "solana-pubkey", + "solana-sanitize", + "solana-sdk-ids", + "solana-short-vec", + "solana-system-interface", + "solana-transaction-error", + "wasm-bindgen", +] + +[[package]] +name = "solana-metrics" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98b79bd642efa8388791fef7a900bfeb48865669148d523fba041fa7e407312f" +dependencies = [ + "crossbeam-channel", + "gethostname", + "lazy_static", + "log", + "reqwest 0.11.27", + "solana-clock", + "solana-cluster-type", + "solana-sha256-hasher", + "solana-time-utils", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-msg" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36a1a14399afaabc2781a1db09cb14ee4cc4ee5c7a5a3cfcc601811379a8092" +dependencies = [ + "solana-define-syscall", +] + +[[package]] +name = "solana-native-token" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33e9de00960197412e4be3902a6cd35e60817c511137aca6c34c66cd5d4017ec" + +[[package]] +name = "solana-nonce" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703e22eb185537e06204a5bd9d509b948f0066f2d1d814a6f475dafb3ddf1325" +dependencies = [ + "serde", + "serde_derive", + "solana-fee-calculator", + "solana-hash", + "solana-pubkey", + "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-nostd-keccak" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8ced70920435b1baa58f76e6f84bbc1110ddd1d6161ec76b6d731ae8431e9c4" +dependencies = [ + "sha3", +] + +[[package]] +name = "solana-offchain-message" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b526398ade5dea37f1f147ce55dae49aa017a5d7326606359b0445ca8d946581" +dependencies = [ + "num_enum", + "solana-hash", + "solana-packet", + "solana-pubkey", + "solana-sanitize", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", +] + +[[package]] +name = "solana-packet" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "004f2d2daf407b3ec1a1ca5ec34b3ccdfd6866dd2d3c7d0715004a96e4b6d127" +dependencies = [ + "bincode", + "bitflags 2.9.1", + "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-poseidon" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2908b48b3828bc04b752d1ff36122f5a06de043258da88df5f8ce64791d208" +dependencies = [ + "ark-bn254 0.4.0", + "light-poseidon 0.2.0", + "solana-define-syscall", + "thiserror 2.0.12", +] + +[[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a460ab805ec063802105b463ecb5eb02c3ffe469e67a967eea8a6e778e0bc06" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a57a24e6a4125fc69510b6774cd93402b943191b6cddad05de7281491c90fe" +dependencies = [ + "solana-pubkey", + "solana-signature", + "solana-signer", +] + +[[package]] +name = "solana-program" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "586469467e93ceb79048f8d8e3a619bf61d05396ee7de95cb40280301a589d05" +dependencies = [ + "bincode", + "blake3", + "borsh 0.10.4", + "borsh 1.5.7", + "bs58", + "bytemuck", + "console_error_panic_hook", + "console_log", + "getrandom 0.2.16", + "lazy_static", + "log", + "memoffset", + "num-bigint 0.4.6", + "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-epoch-rewards", + "solana-epoch-schedule", + "solana-example-mocks", + "solana-feature-gate-interface", + "solana-fee-calculator", + "solana-hash", + "solana-instruction", + "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-rent", + "solana-sanitize", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-secp256k1-recover", + "solana-serde-varint", + "solana-serialize-utils", + "solana-sha256-hasher", + "solana-short-vec", + "solana-slot-hashes", + "solana-slot-history", + "solana-stable-layout", + "solana-stake-interface", + "solana-system-interface", + "solana-sysvar", + "solana-sysvar-id", + "solana-vote-interface", + "thiserror 2.0.12", + "wasm-bindgen", +] + +[[package]] +name = "solana-program-entrypoint" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "473ffe73c68d93e9f2aa726ad2985fe52760052709aaab188100a42c618060ec" +dependencies = [ + "solana-account-info", + "solana-msg", + "solana-program-error", + "solana-pubkey", +] + +[[package]] +name = "solana-program-error" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ee2e0217d642e2ea4bee237f37bd61bb02aec60da3647c48ff88f6556ade775" +dependencies = [ + "borsh 1.5.7", + "num-traits", + "serde", + "serde_derive", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-pubkey", +] + +[[package]] +name = "solana-program-memory" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b0268f6c89825fb634a34bd0c3b8fdaeaecfc3728be1d622a8ee6dd577b60d4" +dependencies = [ + "num-traits", + "solana-define-syscall", +] + +[[package]] +name = "solana-program-option" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc677a2e9bc616eda6dbdab834d463372b92848b2bfe4a1ed4e4b4adba3397d0" + +[[package]] +name = "solana-program-pack" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "319f0ef15e6e12dc37c597faccb7d62525a509fec5f6975ecb9419efddeb277b" +dependencies = [ + "solana-program-error", +] + +[[package]] +name = "solana-program-runtime" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce0a9acc6049c2ae8a2a2dd0b63269ab1a6d8fab4dead1aae75a9bcdd4aa6f05" +dependencies = [ + "base64 0.22.1", + "bincode", + "enum-iterator", + "itertools 0.12.1", + "log", + "percentage", + "rand 0.8.5", + "serde", + "solana-account", + "solana-clock", + "solana-compute-budget", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-feature-set", + "solana-hash", + "solana-instruction", + "solana-last-restart-slot", + "solana-log-collector", + "solana-measure", + "solana-metrics", + "solana-precompiles", + "solana-pubkey", + "solana-rent", + "solana-sbpf", + "solana-sdk-ids", + "solana-slot-hashes", + "solana-stable-layout", + "solana-sysvar", + "solana-sysvar-id", + "solana-timings", + "solana-transaction-context", + "solana-type-overrides", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-pubkey" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40db1ff5a0f8aea2c158d78ab5f2cf897848964251d1df42fef78efd3c85b863" +dependencies = [ + "borsh 0.10.4", + "borsh 1.5.7", + "bs58", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek 4.2.0", + "five8_const", + "getrandom 0.2.16", + "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", +] + +[[package]] +name = "solana-quic-definitions" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf0d4d5b049eb1d0c35f7b18f305a27c8986fc5c0c9b383e97adaa35334379e" +dependencies = [ + "solana-keypair", +] + +[[package]] +name = "solana-rent" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1aea8fdea9de98ca6e8c2da5827707fb3842833521b528a713810ca685d2480" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-rent-collector" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c1e19f5d5108b0d824244425e43bc78bbb9476e2199e979b0230c9f632d3bf4" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18205b69139b1ae0ab8f6e11cdcb627328c0814422ad2482000fa2ca54ae4a2f" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "solana-rpc-client" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f1809a424bb8d90aa40990451593cde7e734a060fb52b35e475db585450578" +dependencies = [ + "async-trait", + "base64 0.22.1", + "bincode", + "bs58", + "indicatif", + "log", + "reqwest 0.11.27", + "reqwest-middleware", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account", + "solana-account-decoder-client-types", + "solana-clock", + "solana-commitment-config", + "solana-epoch-info", + "solana-epoch-schedule", + "solana-feature-gate-interface", + "solana-hash", + "solana-instruction", + "solana-message", + "solana-pubkey", + "solana-rpc-client-api", + "solana-signature", + "solana-transaction", + "solana-transaction-error", + "solana-transaction-status-client-types", + "solana-version", + "tokio", +] + +[[package]] +name = "solana-rpc-client-api" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2eb4fe573cd2d59d8672f0d8ac65f64e70c948b36cf97218b9aeb80dca3329" +dependencies = [ + "anyhow", + "base64 0.22.1", + "bs58", + "jsonrpc-core", + "reqwest 0.11.27", + "reqwest-middleware", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account", + "solana-account-decoder-client-types", + "solana-clock", + "solana-commitment-config", + "solana-fee-calculator", + "solana-inflation", + "solana-inline-spl", + "solana-pubkey", + "solana-signer", + "solana-transaction-error", + "solana-transaction-status-client-types", + "solana-version", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-sanitize" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61f1bc1357b8188d9c4a3af3fc55276e56987265eb7ad073ae6f8180ee54cecf" + +[[package]] +name = "solana-sbpf" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a3ce7a0f4d6830124ceb2c263c36d1ee39444ec70146eb49b939e557e72b96" +dependencies = [ + "byteorder", + "combine", + "hash32", + "libc", + "log", + "rand 0.8.5", + "rustc-demangle", + "thiserror 1.0.69", + "winapi", +] + +[[package]] +name = "solana-sdk" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4808e8d7f3c931657e615042d4176b423e66f64dc99e3dc3c735a197e512029b" +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-sanitize", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-secp256k1-program", + "solana-secp256k1-recover", + "solana-secp256r1-program", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-serde", + "solana-serde-varint", + "solana-short-vec", + "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.12", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk-ids" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5d8b9cc68d5c88b062a33e23a6466722467dde0035152d8fb1afbcdf350a5f" +dependencies = [ + "solana-pubkey", +] + +[[package]] +name = "solana-sdk-macro" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86280da8b99d03560f6ab5aca9de2e38805681df34e0bb8f238e69b29433b9df" +dependencies = [ + "bs58", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "solana-secp256k1-program" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0a1caa972414cc78122c32bdae65ac5fe89df7db598585a5cde19d16a20280a" +dependencies = [ + "bincode", + "digest 0.10.7", + "libsecp256k1", + "serde", + "serde_derive", + "sha3", + "solana-feature-set", + "solana-instruction", + "solana-precompile-error", + "solana-sdk-ids", +] + +[[package]] +name = "solana-secp256k1-recover" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa3120b6cdaa270f39444f5093a90a7b03d296d362878f7a6991d6de3bbe496" +dependencies = [ + "borsh 1.5.7", + "libsecp256k1", + "solana-define-syscall", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-secp256r1-program" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf903cbdc36a161533812f90acfccdb434ed48982bd5dd71f3217930572c4a80" +dependencies = [ + "bytemuck", + "openssl", + "solana-feature-set", + "solana-instruction", + "solana-precompile-error", + "solana-sdk-ids", +] + +[[package]] +name = "solana-security-txt" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" + +[[package]] +name = "solana-seed-derivable" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beb82b5adb266c6ea90e5cf3967235644848eac476c5a1f2f9283a143b7c97f" +dependencies = [ + "solana-derivation-path", +] + +[[package]] +name = "solana-seed-phrase" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36187af2324f079f65a675ec22b31c24919cb4ac22c79472e85d819db9bbbc15" +dependencies = [ + "hmac 0.12.1", + "pbkdf2", + "sha2 0.10.9", +] + +[[package]] +name = "solana-serde" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1931484a408af466e14171556a47adaa215953c7f48b24e5f6b0282763818b04" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-serde-varint" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc07d00200d82e6def2f7f7a45738e3406b17fe54a18adcf0defa16a97ccadb" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-serialize-utils" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "817a284b63197d2b27afdba829c5ab34231da4a9b4e763466a003c40ca4f535e" +dependencies = [ + "solana-instruction", + "solana-pubkey", + "solana-sanitize", +] + +[[package]] +name = "solana-sha256-hasher" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0037386961c0d633421f53560ad7c80675c0447cba4d1bb66d60974dd486c7ea" +dependencies = [ + "sha2 0.10.9", + "solana-define-syscall", + "solana-hash", +] + +[[package]] +name = "solana-short-vec" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c54c66f19b9766a56fa0057d060de8378676cb64987533fa088861858fc5a69" +dependencies = [ + "serde", +] + +[[package]] +name = "solana-shred-version" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afd3db0461089d1ad1a78d9ba3f15b563899ca2386351d38428faa5350c60a98" +dependencies = [ + "solana-hard-forks", + "solana-hash", + "solana-sha256-hasher", +] + +[[package]] +name = "solana-signature" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d251c8f3dc015f320b4161daac7f108156c837428e5a8cc61136d25beb11d6" +dependencies = [ + "bs58", + "ed25519-dalek", + "rand 0.8.5", + "serde", + "serde-big-array", + "serde_derive", + "solana-sanitize", +] + +[[package]] +name = "solana-signer" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c41991508a4b02f021c1342ba00bcfa098630b213726ceadc7cb032e051975b" +dependencies = [ + "solana-pubkey", + "solana-signature", + "solana-transaction-error", +] + +[[package]] +name = "solana-slot-hashes" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c8691982114513763e88d04094c9caa0376b867a29577939011331134c301ce" +dependencies = [ + "serde", + "serde_derive", + "solana-hash", + "solana-sdk-ids", + "solana-sysvar-id", +] + +[[package]] +name = "solana-slot-history" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ccc1b2067ca22754d5283afb2b0126d61eae734fc616d23871b0943b0d935e" +dependencies = [ + "bv", + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sysvar-id", +] + +[[package]] +name = "solana-stable-layout" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f14f7d02af8f2bc1b5efeeae71bc1c2b7f0f65cd75bcc7d8180f2c762a57f54" +dependencies = [ + "solana-instruction", + "solana-pubkey", +] + +[[package]] +name = "solana-stake-interface" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5269e89fde216b4d7e1d1739cf5303f8398a1ff372a81232abbee80e554a838c" +dependencies = [ + "borsh 0.10.4", + "borsh 1.5.7", + "num-traits", + "serde", + "serde_derive", + "solana-clock", + "solana-cpi", + "solana-decode-error", + "solana-instruction", + "solana-program-error", + "solana-pubkey", + "solana-system-interface", + "solana-sysvar-id", +] + +[[package]] +name = "solana-stake-program" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b140dad8a60e40c381a0a359a350d37d51827d02ceb623acf8b942c04f3f3e6" +dependencies = [ + "bincode", + "log", + "solana-account", + "solana-bincode", + "solana-clock", + "solana-config-program", + "solana-feature-set", + "solana-genesis-config", + "solana-instruction", + "solana-log-collector", + "solana-native-token", + "solana-packet", + "solana-program-runtime", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-stake-interface", + "solana-sysvar", + "solana-transaction-context", + "solana-type-overrides", + "solana-vote-interface", +] + +[[package]] +name = "solana-svm-transaction" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1da9eb37e6ced0215a5e44df4ed1f3b885cf349156cbbf99197680cb7eaccf5f" +dependencies = [ + "solana-hash", + "solana-message", + "solana-pubkey", + "solana-sdk-ids", + "solana-signature", + "solana-transaction", +] + +[[package]] +name = "solana-system-interface" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94d7c18cb1a91c6be5f5a8ac9276a1d7c737e39a21beba9ea710ab4b9c63bc90" +dependencies = [ + "js-sys", + "num-traits", + "serde", + "serde_derive", + "solana-decode-error", + "solana-instruction", + "solana-pubkey", + "wasm-bindgen", +] + +[[package]] +name = "solana-system-program" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6321fd5380961387ef4633a98c109ac7f978667ceab2a38d0a699d6ddb2fc57a" +dependencies = [ + "bincode", + "log", + "serde", + "serde_derive", + "solana-account", + "solana-bincode", + "solana-instruction", + "solana-log-collector", + "solana-nonce", + "solana-nonce-account", + "solana-packet", + "solana-program-runtime", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", + "solana-sysvar", + "solana-transaction-context", + "solana-type-overrides", +] + +[[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", +] + +[[package]] +name = "solana-sysvar" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf6b44740d7f0c9f375d045c165bc0aab4a90658f92d6835aeb0649afaeaff9a" +dependencies = [ + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "lazy_static", + "serde", + "serde_derive", + "solana-account-info", + "solana-clock", + "solana-define-syscall", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-fee-calculator", + "solana-hash", + "solana-instruction", + "solana-instructions-sysvar", + "solana-last-restart-slot", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-pubkey", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5762b273d3325b047cfda250787f8d796d781746860d5d0a746ee29f3e8812c1" +dependencies = [ + "solana-pubkey", + "solana-sdk-ids", +] + +[[package]] +name = "solana-time-utils" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af261afb0e8c39252a04d026e3ea9c405342b08c871a2ad8aa5448e068c784c" + +[[package]] +name = "solana-timings" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224f93327d9d3178a30cd6c057e1ac6ca85e95287dd7355064dfa6b9c49f5671" +dependencies = [ + "eager", + "enum-iterator", + "solana-pubkey", +] + +[[package]] +name = "solana-transaction" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "753b3e9afed170e4cfc0ea1e87b5dfdc6d4a50270869414edd24c6ea1f529b29" +dependencies = [ + "bincode", + "serde", + "serde_derive", + "solana-bincode", + "solana-feature-set", + "solana-hash", + "solana-instruction", + "solana-keypair", + "solana-message", + "solana-precompiles", + "solana-pubkey", + "solana-reserved-account-keys", + "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.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5022de04cbba05377f68bf848c8c1322ead733f88a657bf792bb40f3257b8218" +dependencies = [ + "bincode", + "serde", + "serde_derive", + "solana-account", + "solana-instruction", + "solana-pubkey", + "solana-rent", + "solana-signature", +] + +[[package]] +name = "solana-transaction-error" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222a9dc8fdb61c6088baab34fc3a8b8473a03a7a5fd404ed8dd502fa79b67cb1" +dependencies = [ + "serde", + "serde_derive", + "solana-instruction", + "solana-sanitize", +] + +[[package]] +name = "solana-transaction-status-client-types" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1458fc750d0df4439bb4c1b418a4fe61afbd2e83963e452256eca99dc0c1cf76" +dependencies = [ + "base64 0.22.1", + "bincode", + "bs58", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder-client-types", + "solana-commitment-config", + "solana-message", + "solana-reward-info", + "solana-signature", + "solana-transaction", + "solana-transaction-context", + "solana-transaction-error", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-type-overrides" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26d927bf3ed2f2b6b06a0f409dd8d6b1ad1af73cbba337e9471d05d42f026c9" +dependencies = [ + "lazy_static", + "rand 0.8.5", +] + +[[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.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374dea09855d46655c776256dda9cc3c854cc70fd923ef22ba0805bc83ca7bfd" +dependencies = [ + "semver", + "serde", + "serde_derive", + "solana-feature-set", + "solana-sanitize", + "solana-serde-varint", +] + +[[package]] +name = "solana-vote-interface" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4507bb9d071fb81cfcf676f12fba3db4098f764524ef0b5567d671a81d41f3e" +dependencies = [ + "bincode", + "num-derive", + "num-traits", + "serde", + "serde_derive", + "solana-clock", + "solana-decode-error", + "solana-hash", + "solana-instruction", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-serde-varint", + "solana-serialize-utils", + "solana-short-vec", + "solana-system-interface", +] + +[[package]] +name = "solana-vote-program" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0289c18977992907d361ca94c86cf45fd24cb41169fa03eb84947779e22933f" +dependencies = [ + "bincode", + "log", + "num-derive", + "num-traits", + "serde", + "serde_derive", + "solana-account", + "solana-bincode", + "solana-clock", + "solana-epoch-schedule", + "solana-feature-set", + "solana-hash", + "solana-instruction", + "solana-keypair", + "solana-metrics", + "solana-packet", + "solana-program-runtime", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-signer", + "solana-slot-hashes", + "solana-transaction", + "solana-transaction-context", + "solana-vote-interface", + "thiserror 2.0.12", +] + +[[package]] +name = "solana-zk-elgamal-proof-program" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a96b0ad864cc4d2156dbf0c4d7cadac4140ae13ebf7e856241500f74eca46f4" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "solana-instruction", + "solana-log-collector", + "solana-program-runtime", + "solana-sdk-ids", + "solana-zk-sdk", +] + +[[package]] +name = "solana-zk-sdk" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71db02a2e496c58840077c96dd4ede61894a4e6053853cca6dcddbb73200fb77" +dependencies = [ + "aes-gcm-siv", + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek 4.2.0", + "itertools 0.12.1", + "js-sys", + "lazy_static", + "merlin", + "num-derive", + "num-traits", + "rand 0.8.5", + "serde", + "serde_derive", + "serde_json", + "sha3", + "solana-derivation-path", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-signature", + "solana-signer", + "subtle", + "thiserror 2.0.12", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-zk-token-proof-program" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c540a4f7df1300dc6087f0cbb271b620dd55e131ea26075bb52ba999be3105f0" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "solana-feature-set", + "solana-instruction", + "solana-log-collector", + "solana-program-runtime", + "solana-sdk-ids", + "solana-zk-token-sdk", +] + +[[package]] +name = "solana-zk-token-sdk" +version = "2.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4debebedfebfd4a188a7ac3dd0a56e86368417c35891d6f3c35550b46bfbc0" +dependencies = [ + "aes-gcm-siv", + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "curve25519-dalek 4.2.0", + "itertools 0.12.1", + "lazy_static", + "merlin", + "num-derive", + "num-traits", + "rand 0.8.5", + "serde", + "serde_derive", + "serde_json", + "sha3", + "solana-curve25519", + "solana-derivation-path", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-signature", + "solana-signer", + "subtle", + "thiserror 2.0.12", + "zeroize", +] + +[[package]] +name = "spl-associated-token-account" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76fee7d65013667032d499adc3c895e286197a35a0d3a4643c80e7fd3e9969e3" +dependencies = [ + "borsh 1.5.7", + "num-derive", + "num-traits", + "solana-program", + "spl-associated-token-account-client", + "spl-token", + "spl-token-2022 6.0.0", + "thiserror 1.0.69", +] + +[[package]] +name = "spl-associated-token-account-client" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f8349dbcbe575f354f9a533a21f272f3eb3808a49e2fdc1c34393b88ba76cb" +dependencies = [ + "solana-instruction", + "solana-pubkey", +] + +[[package]] +name = "spl-discriminator" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7398da23554a31660f17718164e31d31900956054f54f52d5ec1be51cb4f4b3" +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.104", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f05593b7ca9eac7caca309720f2eafb96355e037e6d373b909a80fe7b69b9" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.9", + "syn 2.0.104", + "thiserror 1.0.69", +] + +[[package]] +name = "spl-elgamal-registry" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce0f668975d2b0536e8a8fd60e56a05c467f06021dae037f1d0cfed0de2e231d" +dependencies = [ + "bytemuck", + "solana-program", + "solana-zk-sdk", + "spl-pod", + "spl-token-confidential-transfer-proof-extraction", +] + +[[package]] +name = "spl-memo" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f09647c0974e33366efeb83b8e2daebb329f0420149e74d3a4bd2c08cf9f7cb" +dependencies = [ + "solana-account-info", + "solana-instruction", + "solana-msg", + "solana-program-entrypoint", + "solana-program-error", + "solana-pubkey", +] + +[[package]] +name = "spl-pod" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d994afaf86b779104b4a95ba9ca75b8ced3fdb17ee934e38cb69e72afbe17799" +dependencies = [ + "borsh 1.5.7", + "bytemuck", + "bytemuck_derive", + "num-derive", + "num-traits", + "solana-decode-error", + "solana-msg", + "solana-program-error", + "solana-program-option", + "solana-pubkey", + "solana-zk-sdk", + "thiserror 2.0.12", +] + +[[package]] +name = "spl-program-error" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d39b5186f42b2b50168029d81e58e800b690877ef0b30580d107659250da1d1" +dependencies = [ + "num-derive", + "num-traits", + "solana-program", + "spl-program-error-derive", + "thiserror 1.0.69", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.9", + "syn 2.0.104", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd99ff1e9ed2ab86e3fd582850d47a739fec1be9f4661cba1782d3a0f26805f3" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "solana-account-info", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", + "thiserror 1.0.69", +] + +[[package]] +name = "spl-token" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed320a6c934128d4f7e54fe00e16b8aeaecf215799d060ae14f93378da6dc834" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "thiserror 1.0.69", +] + +[[package]] +name = "spl-token-2022" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b27f7405010ef816587c944536b0eafbcc35206ab6ba0f2ca79f1d28e488f4f" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "solana-security-txt", + "solana-zk-sdk", + "spl-elgamal-registry", + "spl-memo", + "spl-pod", + "spl-token", + "spl-token-confidential-transfer-ciphertext-arithmetic", + "spl-token-confidential-transfer-proof-extraction", + "spl-token-confidential-transfer-proof-generation 0.2.0", + "spl-token-group-interface", + "spl-token-metadata-interface", + "spl-transfer-hook-interface", + "spl-type-length-value", + "thiserror 1.0.69", +] + +[[package]] +name = "spl-token-2022" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9048b26b0df0290f929ff91317c83db28b3ef99af2b3493dd35baa146774924c" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "solana-security-txt", + "solana-zk-sdk", + "spl-elgamal-registry", + "spl-memo", + "spl-pod", + "spl-token", + "spl-token-confidential-transfer-ciphertext-arithmetic", + "spl-token-confidential-transfer-proof-extraction", + "spl-token-confidential-transfer-proof-generation 0.3.0", + "spl-token-group-interface", + "spl-token-metadata-interface", + "spl-transfer-hook-interface", + "spl-type-length-value", + "thiserror 2.0.12", +] + +[[package]] +name = "spl-token-confidential-transfer-ciphertext-arithmetic" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170378693c5516090f6d37ae9bad2b9b6125069be68d9acd4865bbe9fc8499fd" +dependencies = [ + "base64 0.22.1", + "bytemuck", + "solana-curve25519", + "solana-zk-sdk", +] + +[[package]] +name = "spl-token-confidential-transfer-proof-extraction" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff2d6a445a147c9d6dd77b8301b1e116c8299601794b558eafa409b342faf96" +dependencies = [ + "bytemuck", + "solana-curve25519", + "solana-program", + "solana-zk-sdk", + "spl-pod", + "thiserror 2.0.12", +] + +[[package]] +name = "spl-token-confidential-transfer-proof-generation" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8627184782eec1894de8ea26129c61303f1f0adeed65c20e0b10bc584f09356d" +dependencies = [ + "curve25519-dalek 4.2.0", + "solana-zk-sdk", + "thiserror 1.0.69", +] + +[[package]] +name = "spl-token-confidential-transfer-proof-generation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e3597628b0d2fe94e7900fd17cdb4cfbb31ee35c66f82809d27d86e44b2848b" +dependencies = [ + "curve25519-dalek 4.2.0", + "solana-zk-sdk", + "thiserror 2.0.12", +] + +[[package]] +name = "spl-token-group-interface" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d595667ed72dbfed8c251708f406d7c2814a3fa6879893b323d56a10bedfc799" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator", + "spl-pod", + "thiserror 1.0.69", +] + +[[package]] +name = "spl-token-metadata-interface" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfb9c89dbc877abd735f05547dcf9e6e12c00c11d6d74d8817506cab4c99fdbb" +dependencies = [ + "borsh 1.5.7", + "num-derive", + "num-traits", + "solana-borsh", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator", + "spl-pod", + "spl-type-length-value", + "thiserror 1.0.69", +] + +[[package]] +name = "spl-transfer-hook-interface" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aa7503d52107c33c88e845e1351565050362c2314036ddf19a36cd25137c043" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "solana-account-info", + "solana-cpi", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-tlv-account-resolution", + "spl-type-length-value", + "thiserror 1.0.69", +] + +[[package]] +name = "spl-type-length-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba70ef09b13af616a4c987797870122863cba03acc4284f226a4473b043923f9" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "solana-account-info", + "solana-decode-error", + "solana-msg", + "solana-program-error", + "spl-discriminator", + "spl-pod", + "thiserror 1.0.69", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.9.1", + "core-foundation", + "system-configuration-sys 0.6.0", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tarpc" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38a012bed6fb9681d3bf71ffaa4f88f3b4b9ed3198cda6e4c8462d24d4bb80" +dependencies = [ + "anyhow", + "fnv", + "futures", + "humantime", + "opentelemetry", + "pin-project", + "rand 0.8.5", + "serde", + "static_assertions", + "tarpc-plugins", + "thiserror 1.0.69", + "tokio", + "tokio-serde", + "tokio-util 0.6.10", + "tracing", + "tracing-opentelemetry", +] + +[[package]] +name = "tarpc-plugins" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "task-local-extensions" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba323866e5d033818e3240feeb9f7db2c4296674e4d9e16b97b7bf8f490434e8" +dependencies = [ + "pin-utils", +] + +[[package]] +name = "tempfile" +version = "3.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +dependencies = [ + "fastrand", + "getrandom 0.3.3", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" + +[[package]] +name = "time-macros" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.46.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "slab", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" +dependencies = [ + "rustls 0.23.29", + "tokio", +] + +[[package]] +name = "tokio-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" +dependencies = [ + "bincode", + "bytes", + "educe 0.4.23", + "futures-core", + "futures-sink", + "pin-project", + "serde", + "serde_json", +] + +[[package]] +name = "tokio-util" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "slab", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap 2.10.0", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 1.0.2", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags 2.9.1", + "bytes", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +dependencies = [ + "sharded-slab", + "thread_local", + "tracing-core", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-width" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +dependencies = [ + "void", +] + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "uriparse" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" +dependencies = [ + "fnv", + "lazy_static", +] + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" +dependencies = [ + "getrandom 0.3.3", + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +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 = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.104", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-registry" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" +dependencies = [ + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "winnow" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.15+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/lowlevel/Cargo.toml b/lowlevel/Cargo.toml new file mode 100644 index 0000000..77289c3 --- /dev/null +++ b/lowlevel/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "lowlevel" +version = "0.1.0" +edition = "2021" + +[lib] +crate-type = ["cdylib", "lib"] +name = "lowlevel" + +[features] +default = [] +test-sbf = [] + +[dependencies] +anchor-lang = "0.31.1" +borsh = "0.10.4" +light-sdk = "0.13.0" +light-hasher = { version = "3.1.0", features = ["solana"] } +light-sdk-types = "0.13.0" +light-compressed-account = "0.3.0" + + +[dev-dependencies] +light-program-test = "0.14.0" +light-client = "0.14.0" +tokio = "1.40.0" +solana-sdk = "2.2" diff --git a/lowlevel/README.md b/lowlevel/README.md new file mode 100644 index 0000000..301be9b --- /dev/null +++ b/lowlevel/README.md @@ -0,0 +1,13 @@ + +## Requirements +- light-cli install with npm -g install @lightprotocol/zk-compression-cli + +## Build and Test + +```bash +# Build the program +cargo build-sbf + +# Run tests and see tx +RUST_BACKTRACE=1 cargo test-sbf -- --nocapture +``` diff --git a/lowlevel/Xargo.toml b/lowlevel/Xargo.toml new file mode 100644 index 0000000..c6c3df9 --- /dev/null +++ b/lowlevel/Xargo.toml @@ -0,0 +1,2 @@ +[target.sbf-solana-solana.dependencies.std] +features = [] \ No newline at end of file diff --git a/lowlevel/src/lib.rs b/lowlevel/src/lib.rs new file mode 100644 index 0000000..e1e777d --- /dev/null +++ b/lowlevel/src/lib.rs @@ -0,0 +1,87 @@ +#![allow(unexpected_cfgs)] + +use anchor_lang::{prelude::*, AnchorDeserialize, AnchorSerialize}; +use light_compressed_account::instruction_data::with_account_info::{ + CompressedAccountInfo, OutAccountInfo, +}; +use light_sdk::{ + address::v1::derive_address, + cpi::{CpiAccounts, CpiInputs, CpiSigner}, + derive_light_cpi_signer, + instruction::{PackedAddressTreeInfo, ValidityProof}, +}; +declare_id!("HNqStLMpNuNJqhBF1FbGTKHEFbBLJmq8RdJJmZKWz6jH"); + +pub const LIGHT_CPI_SIGNER: CpiSigner = + derive_light_cpi_signer!("HNqStLMpNuNJqhBF1FbGTKHEFbBLJmq8RdJJmZKWz6jH"); + +pub const FIRST_SEED: &[u8] = b"first"; +pub const SECOND_SEED: &[u8] = b"second"; + +#[program] +pub mod lowlevel { + + use super::*; + + /// Creates a new compressed account with initial data + pub fn create_address_and_output_without_address<'info>( + ctx: Context<'_, '_, '_, 'info, GenericAnchorAccounts<'info>>, + proof: ValidityProof, // Required for the address create, it proves that the address does not exist yet in the light address tree. + address_tree_info: PackedAddressTreeInfo, + output_state_tree_index: u8, + encrypted_utxo: Vec, // must be checked by your zkp + output_utxo_hash: [u8; 32], // must be checked by your zkp + ) -> Result<()> { + let light_cpi_accounts = CpiAccounts::new( + ctx.accounts.signer.as_ref(), + ctx.remaining_accounts, + crate::LIGHT_CPI_SIGNER, + ); + let address_pubkey = address_tree_info + .get_tree_pubkey(&light_cpi_accounts) + .map_err(|_| ErrorCode::AccountNotEnoughKeys)?; + + if address_pubkey.to_bytes() != light_sdk::constants::ADDRESS_TREE_V1 { + msg!("Invalid address tree"); + return Err(ProgramError::InvalidAccountData.into()); + } + + let (_address, address_seed) = derive_address( + &[FIRST_SEED, ctx.accounts.signer.key().as_ref()], + &address_pubkey, + &crate::ID, + ); + + let output_account = CompressedAccountInfo { + address: None, + input: None, + output: Some(OutAccountInfo { + discriminator: 1u64.to_le_bytes(), // doesn't really matter as long as you only have one type of compressed account. + output_merkle_tree_index: output_state_tree_index, + lamports: 0, + data: encrypted_utxo, + data_hash: output_utxo_hash, + }), + }; + + // Create 1 output compressed account without address + // Create 1 address without compressed account + let cpi_inputs = CpiInputs::new_with_address( + proof, + vec![output_account], + vec![address_tree_info.into_new_address_params_packed(address_seed)], + ); + msg!("cpi_inputs {:?}", cpi_inputs); + cpi_inputs + .invoke_light_system_program(light_cpi_accounts) + .map_err(ProgramError::from)?; + + Ok(()) + } +} + +#[derive(Accounts)] +pub struct GenericAnchorAccounts<'info> { + #[account(mut)] + pub signer: Signer<'info>, +} diff --git a/lowlevel/tests/test.rs b/lowlevel/tests/test.rs new file mode 100644 index 0000000..38fc3a2 --- /dev/null +++ b/lowlevel/tests/test.rs @@ -0,0 +1,109 @@ +#![cfg(feature = "test-sbf")] + +use anchor_lang::{InstructionData, ToAccountMetas}; +use lowlevel::FIRST_SEED; +use light_program_test::{ + program_test::LightProgramTest, AddressWithTree, Indexer, ProgramTestConfig, Rpc, RpcError, +}; +use light_sdk::{ + address::v1::derive_address, + instruction::{PackedAccounts, SystemAccountMetaConfig}, +}; +use solana_sdk::{ + instruction::Instruction, + signature::{Keypair, Signature, Signer}, +}; + +#[tokio::test] +async fn test_create_address_and_output_without_address() { + let config = ProgramTestConfig::new( + true, + Some(vec![("lowlevel", lowlevel::ID)]), + ); + let mut rpc = LightProgramTest::new(config).await.unwrap(); + let payer = rpc.get_payer().insecure_clone(); + + let address_tree_info = rpc.get_address_tree_v1(); + + let (address, _) = derive_address( + &[FIRST_SEED, payer.pubkey().as_ref()], + &address_tree_info.tree, + &lowlevel::ID, + ); + + // Test data for the low-level instruction + let encrypted_utxo = vec![1, 2, 3, 4, 5]; // Example encrypted UTXO data + let output_utxo_hash = [42u8; 32]; // Example hash + + // Create the low-level account + create_address_and_output_without_address( + &mut rpc, + &payer, + &address, + address_tree_info, + encrypted_utxo, + output_utxo_hash, + ) + .await + .unwrap(); +} + +async fn create_address_and_output_without_address( + rpc: &mut R, + payer: &Keypair, + address: &[u8; 32], + address_tree_info: light_client::indexer::TreeInfo, + encrypted_utxo: Vec, + output_utxo_hash: [u8; 32], +) -> Result +where + R: Rpc + Indexer, +{ + let mut remaining_accounts = PackedAccounts::default(); + let config = SystemAccountMetaConfig::new(lowlevel::ID); + remaining_accounts.add_system_accounts(config); + + let rpc_result = rpc + .get_validity_proof( + vec![], + vec![AddressWithTree { + address: *address, + tree: address_tree_info.tree, + }], + None, + ) + .await? + .value; + + let packed_address_tree_accounts = rpc_result + .pack_tree_infos(&mut remaining_accounts) + .address_trees; + let output_state_tree_index = rpc + .get_random_state_tree_info()? + .pack_output_tree_index(&mut remaining_accounts)?; + + let instruction_data = lowlevel::instruction::CreateAddressAndOutputWithoutAddress { + proof: rpc_result.proof, + address_tree_info: packed_address_tree_accounts[0], + output_state_tree_index, + encrypted_utxo, + output_utxo_hash, + }; + + let accounts = lowlevel::accounts::GenericAnchorAccounts { + signer: payer.pubkey(), + }; + + let instruction = Instruction { + program_id: lowlevel::ID, + accounts: [ + accounts.to_account_metas(None), + remaining_accounts.to_account_metas().0, + ] + .concat(), + data: instruction_data.data(), + }; + + rpc.create_and_send_transaction(&[instruction], &payer.pubkey(), &[payer]) + .await +} From 8c726708e81675fce6e67241ca20fbfa99a62eea Mon Sep 17 00:00:00 2001 From: ananas Date: Sat, 26 Jul 2025 01:46:27 +0100 Subject: [PATCH 02/14] chore: add more realistic ix data --- lowlevel/tests/test.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lowlevel/tests/test.rs b/lowlevel/tests/test.rs index 38fc3a2..4795380 100644 --- a/lowlevel/tests/test.rs +++ b/lowlevel/tests/test.rs @@ -1,7 +1,6 @@ #![cfg(feature = "test-sbf")] use anchor_lang::{InstructionData, ToAccountMetas}; -use lowlevel::FIRST_SEED; use light_program_test::{ program_test::LightProgramTest, AddressWithTree, Indexer, ProgramTestConfig, Rpc, RpcError, }; @@ -9,6 +8,7 @@ use light_sdk::{ address::v1::derive_address, instruction::{PackedAccounts, SystemAccountMetaConfig}, }; +use lowlevel::FIRST_SEED; use solana_sdk::{ instruction::Instruction, signature::{Keypair, Signature, Signer}, @@ -16,10 +16,7 @@ use solana_sdk::{ #[tokio::test] async fn test_create_address_and_output_without_address() { - let config = ProgramTestConfig::new( - true, - Some(vec![("lowlevel", lowlevel::ID)]), - ); + let config = ProgramTestConfig::new(true, Some(vec![("lowlevel", lowlevel::ID)])); let mut rpc = LightProgramTest::new(config).await.unwrap(); let payer = rpc.get_payer().insecure_clone(); @@ -32,9 +29,9 @@ async fn test_create_address_and_output_without_address() { ); // Test data for the low-level instruction - let encrypted_utxo = vec![1, 2, 3, 4, 5]; // Example encrypted UTXO data - let output_utxo_hash = [42u8; 32]; // Example hash - + let encrypted_utxo = vec![1; 256]; // Example encrypted UTXO data + let mut output_utxo_hash = [42u8; 32]; // Example hash + output_utxo_hash[0] = 0; // Create the low-level account create_address_and_output_without_address( &mut rpc, From 88c45747952a4ffe10f7303466e0e7ec9c716730 Mon Sep 17 00:00:00 2001 From: ananas Date: Sat, 26 Jul 2025 02:03:57 +0100 Subject: [PATCH 03/14] add manual hash example --- lowlevel/tests/test.rs | 53 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/lowlevel/tests/test.rs b/lowlevel/tests/test.rs index 4795380..e6b3fe2 100644 --- a/lowlevel/tests/test.rs +++ b/lowlevel/tests/test.rs @@ -1,6 +1,10 @@ -#![cfg(feature = "test-sbf")] +// #![cfg(feature = "test-sbf")] use anchor_lang::{InstructionData, ToAccountMetas}; +use light_compressed_account::{ + compressed_account::hash_with_hashed_values, hash_to_bn254_field_size_be, +}; +use light_hasher::{Hasher, Poseidon}; use light_program_test::{ program_test::LightProgramTest, AddressWithTree, Indexer, ProgramTestConfig, Rpc, RpcError, }; @@ -43,6 +47,53 @@ async fn test_create_address_and_output_without_address() { ) .await .unwrap(); + + let program_compressed_accounts = rpc + .get_compressed_accounts_by_owner(&lowlevel::ID, None, None) + .await + .unwrap(); + let compressed_account = program_compressed_accounts.value.items[0].clone(); + println!("{:?}", compressed_account); + let data_hash = compressed_account.data.as_ref().unwrap().data_hash; + println!("data hash {:?}", data_hash); + let discriminator = compressed_account.data.as_ref().unwrap().discriminator; + println!("discriminator {:?}", discriminator); + let hashed_owner = hash_to_bn254_field_size_be(compressed_account.owner.as_ref()); + println!( + "hashed owner {:?}", + hash_to_bn254_field_size_be(compressed_account.owner.as_ref()) + ); + let hashed_merkle_tree = + hash_to_bn254_field_size_be(compressed_account.tree_info.tree.as_ref()); + println!("hashed merkle_tree {:?}", hashed_merkle_tree); + let leaf_index = compressed_account.leaf_index; + println!("leaf index le {}", compressed_account.leaf_index); + let mut discriminator_bytes = [0u8; 32]; + discriminator_bytes[24..].copy_from_slice(discriminator.as_slice()); + discriminator_bytes[23] = 2; // Domain separator for discriminator. + let compressed_account_hash = Poseidon::hashv(&[ + hashed_owner.as_slice(), + leaf_index.to_le_bytes().as_slice(), // this is a footgun, we serialize leaf_index le but Poseidon::hashv expects be bytes. + // Ts poseidon hashers expect le input, to be consistent you need to provide the be number to the ts hasher. + // It is a mistake in our hashing, not dangerous because we just use it to make the hash unique which holds true since it is consistent, but difficult to change, we fixed it in V2 trees. + // For the circuit this means that you need to pass leaf index twice once in be and use it to compute the light leaf hash, once le to verify the merkle proof. + hashed_merkle_tree.as_slice(), + discriminator_bytes.as_slice(), + data_hash.as_slice(), + ]) + .unwrap(); + assert_eq!(compressed_account_hash, compressed_account.hash); + let compressed_account_hash = hash_with_hashed_values( + &0, + None, + Some((discriminator.as_slice(), data_hash.as_slice())), + &hashed_owner, + &hashed_merkle_tree, + &leaf_index, + false, + ) + .unwrap(); + assert_eq!(compressed_account_hash, compressed_account.hash); } async fn create_address_and_output_without_address( From c02489910153ac15f60f12e69da4a772cd5816ee Mon Sep 17 00:00:00 2001 From: ananas Date: Sat, 26 Jul 2025 18:42:18 +0100 Subject: [PATCH 04/14] feat: add example getting root from concurrent v1 state Merkle tree --- lowlevel/Cargo.lock | 2 ++ lowlevel/Cargo.toml | 6 ++++-- lowlevel/src/lib.rs | 26 +++++++++++++++++++++++++- lowlevel/tests/test.rs | 5 +++++ 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/lowlevel/Cargo.lock b/lowlevel/Cargo.lock index 934d920..ace8534 100644 --- a/lowlevel/Cargo.lock +++ b/lowlevel/Cargo.lock @@ -2960,10 +2960,12 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" name = "lowlevel" version = "0.1.0" dependencies = [ + "account-compression", "anchor-lang", "borsh 0.10.4", "light-client", "light-compressed-account", + "light-concurrent-merkle-tree", "light-hasher", "light-program-test", "light-sdk", diff --git a/lowlevel/Cargo.toml b/lowlevel/Cargo.toml index 77289c3..ed636ea 100644 --- a/lowlevel/Cargo.toml +++ b/lowlevel/Cargo.toml @@ -14,11 +14,13 @@ test-sbf = [] [dependencies] anchor-lang = "0.31.1" borsh = "0.10.4" -light-sdk = "0.13.0" +light-sdk = { version = "0.13.0", features = ["anchor"] } light-hasher = { version = "3.1.0", features = ["solana"] } light-sdk-types = "0.13.0" light-compressed-account = "0.3.0" - +light-concurrent-merkle-tree = "2" +# use cpi feature to avoid custom allocator conflict issues +account-compression = { version = "2", features = ["cpi"] } [dev-dependencies] light-program-test = "0.14.0" diff --git a/lowlevel/src/lib.rs b/lowlevel/src/lib.rs index e1e777d..53cf297 100644 --- a/lowlevel/src/lib.rs +++ b/lowlevel/src/lib.rs @@ -1,5 +1,6 @@ #![allow(unexpected_cfgs)] +use account_compression::{state_merkle_tree_from_bytes_zero_copy, StateMerkleTreeAccount}; use anchor_lang::{prelude::*, AnchorDeserialize, AnchorSerialize}; use light_compressed_account::instruction_data::with_account_info::{ CompressedAccountInfo, OutAccountInfo, @@ -29,6 +30,7 @@ pub mod lowlevel { proof: ValidityProof, // Required for the address create, it proves that the address does not exist yet in the light address tree. address_tree_info: PackedAddressTreeInfo, output_state_tree_index: u8, + input_root_index: u16, encrypted_utxo: Vec, // must be checked by your zkp output_utxo_hash: [u8; 32], // must be checked by your zkp ) -> Result<()> { @@ -51,6 +53,9 @@ pub mod lowlevel { &address_pubkey, &crate::ID, ); + // get root for input Merkle tree + let input_root = read_merkle_tree_root(&ctx.accounts.input_merkle_tree, input_root_index)?; + msg!("Input merkle tree root: {:?}", input_root); let output_account = CompressedAccountInfo { address: None, @@ -71,7 +76,7 @@ pub mod lowlevel { vec![output_account], vec![address_tree_info.into_new_address_params_packed(address_seed)], ); - msg!("cpi_inputs {:?}", cpi_inputs); + cpi_inputs .invoke_light_system_program(light_cpi_accounts) .map_err(ProgramError::from)?; @@ -84,4 +89,23 @@ pub mod lowlevel { pub struct GenericAnchorAccounts<'info> { #[account(mut)] pub signer: Signer<'info>, + pub input_merkle_tree: AccountLoader<'info, StateMerkleTreeAccount>, +} + +/// Reads a root from the concurrent state merkle tree by index +pub fn read_merkle_tree_root( + input_merkle_tree: &AccountLoader, + root_index: u16, +) -> Result<[u8; 32]> { + let account_info = input_merkle_tree.to_account_info(); + let account_data = account_info.try_borrow_data()?; + + let merkle_tree = state_merkle_tree_from_bytes_zero_copy(&account_data) + .map_err(|_| ProgramError::InvalidAccountData)?; + + if root_index as usize >= merkle_tree.roots.len() { + return Err(ProgramError::InvalidArgument.into()); + } + + Ok(merkle_tree.roots[root_index as usize]) } diff --git a/lowlevel/tests/test.rs b/lowlevel/tests/test.rs index e6b3fe2..1fedc3a 100644 --- a/lowlevel/tests/test.rs +++ b/lowlevel/tests/test.rs @@ -129,17 +129,22 @@ where let output_state_tree_index = rpc .get_random_state_tree_info()? .pack_output_tree_index(&mut remaining_accounts)?; + + let input_state_tree_info = rpc.get_random_state_tree_info()?; + let input_root_index = 0u16; let instruction_data = lowlevel::instruction::CreateAddressAndOutputWithoutAddress { proof: rpc_result.proof, address_tree_info: packed_address_tree_accounts[0], output_state_tree_index, + input_root_index, encrypted_utxo, output_utxo_hash, }; let accounts = lowlevel::accounts::GenericAnchorAccounts { signer: payer.pubkey(), + input_merkle_tree: input_state_tree_info.tree, }; let instruction = Instruction { From 5f400028f1d2b2e7f17760f4035b3f791bdfc8fc Mon Sep 17 00:00:00 2001 From: ananas Date: Sun, 19 Oct 2025 23:46:16 +0100 Subject: [PATCH 05/14] add circuits with circom prover --- lowlevel/.gitignore | 10 + lowlevel/Cargo.lock | 2905 +++++++++++----- lowlevel/Cargo.toml | 21 +- lowlevel/build.rs | 5 + lowlevel/circuits/README.md | 76 + .../compressed_account_merkle_proof.circom | 100 + lowlevel/package-lock.json | 3086 +++++++++++++++++ lowlevel/package.json | 28 + lowlevel/scripts/clean.sh | 59 + lowlevel/scripts/setup.sh | 170 + lowlevel/src/lib.rs | 33 +- lowlevel/tests/circuit.rs | 203 ++ 12 files changed, 5804 insertions(+), 892 deletions(-) create mode 100644 lowlevel/.gitignore create mode 100644 lowlevel/build.rs create mode 100644 lowlevel/circuits/README.md create mode 100644 lowlevel/circuits/compressed_account_merkle_proof.circom create mode 100644 lowlevel/package-lock.json create mode 100644 lowlevel/package.json create mode 100755 lowlevel/scripts/clean.sh create mode 100755 lowlevel/scripts/setup.sh create mode 100644 lowlevel/tests/circuit.rs diff --git a/lowlevel/.gitignore b/lowlevel/.gitignore new file mode 100644 index 0000000..1daa656 --- /dev/null +++ b/lowlevel/.gitignore @@ -0,0 +1,10 @@ +node_modules/ +build/ +pot/ +*.sym +*.r1cs +*.wasm +*.zkey +*.wtns +proof.json +public.json diff --git a/lowlevel/Cargo.lock b/lowlevel/Cargo.lock index ace8534..0de24b5 100644 --- a/lowlevel/Cargo.lock +++ b/lowlevel/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 = "account-compression" version = "2.0.0" @@ -11,31 +21,22 @@ dependencies = [ "aligned-sized", "anchor-lang", "bytemuck", - "light-account-checks", - "light-batched-merkle-tree", + "light-account-checks 0.3.0", + "light-batched-merkle-tree 0.3.0", "light-bounded-vec", - "light-compressed-account", - "light-concurrent-merkle-tree", + "light-compressed-account 0.3.0", + "light-concurrent-merkle-tree 2.1.0", "light-hash-set", - "light-hasher", - "light-indexed-merkle-tree", - "light-merkle-tree-metadata", - "light-zero-copy", + "light-hasher 3.1.0", + "light-indexed-merkle-tree 2.1.0", + "light-merkle-tree-metadata 0.3.0", + "light-zero-copy 0.2.0", "num-bigint 0.4.6", "solana-sdk", "solana-security-txt", "zerocopy", ] -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -78,6 +79,53 @@ dependencies = [ "zeroize", ] +[[package]] +name = "agave-feature-set" +version = "2.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a2c365c0245cbb8959de725fc2b44c754b673fdf34c9a7f9d4a25c35a7bf1" +dependencies = [ + "ahash", + "solana-epoch-schedule", + "solana-hash", + "solana-pubkey", + "solana-sha256-hasher", + "solana-svm-feature-set", +] + +[[package]] +name = "agave-precompiles" +version = "2.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d60d73657792af7f2464e9181d13c3979e94bb09841d9ffa014eef4ef0492b77" +dependencies = [ + "agave-feature-set", + "bincode", + "digest 0.10.7", + "ed25519-dalek", + "libsecp256k1", + "openssl", + "sha3", + "solana-ed25519-program", + "solana-message", + "solana-precompile-error", + "solana-pubkey", + "solana-sdk-ids", + "solana-secp256k1-program", + "solana-secp256r1-program", +] + +[[package]] +name = "agave-reserved-account-keys" +version = "2.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8289c8a8a2ef5aa10ce49a070f360f4e035ee3410b8d8f3580fb39d8cf042581" +dependencies = [ + "agave-feature-set", + "solana-pubkey", + "solana-sdk-ids", +] + [[package]] name = "ahash" version = "0.8.12" @@ -85,7 +133,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.3.3", + "getrandom 0.3.4", "once_cell", "version_check", "zerocopy", @@ -108,7 +156,7 @@ checksum = "48a526ec4434d531d488af59fe866f36b310fe8906691c75dffa664450a3800a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -201,7 +249,7 @@ dependencies = [ "anchor-syn", "anyhow", "bs58", - "heck", + "heck 0.3.3", "proc-macro2", "quote", "serde_json", @@ -275,7 +323,7 @@ checksum = "32e8599d21995f68e296265aa5ab0c3cef582fd58afec014d01bd0bce18a4418" dependencies = [ "anchor-lang-idl-spec", "anyhow", - "heck", + "heck 0.3.3", "regex", "serde", "serde_json", @@ -299,12 +347,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c08cb5d762c0694f74bd02c9a5b04ea53cefc496e2c27b3234acffca5cd076b" dependencies = [ "anchor-lang", - "spl-associated-token-account", + "spl-associated-token-account 6.0.0", "spl-pod", - "spl-token", + "spl-token 7.0.0", "spl-token-2022 6.0.0", - "spl-token-group-interface", - "spl-token-metadata-interface", + "spl-token-group-interface 0.5.0", + "spl-token-metadata-interface 0.6.0", ] [[package]] @@ -316,7 +364,7 @@ dependencies = [ "anyhow", "bs58", "cargo_toml", - "heck", + "heck 0.3.3", "proc-macro2", "quote", "serde", @@ -326,12 +374,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -352,9 +394,21 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + +[[package]] +name = "ark-bls12-381" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", +] [[package]] name = "ark-bn254" @@ -378,6 +432,40 @@ dependencies = [ "ark-std 0.5.0", ] +[[package]] +name = "ark-crypto-primitives" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0c292754729c8a190e50414fd1a37093c786c709899f29c9f7daccecfa855e" +dependencies = [ + "ahash", + "ark-crypto-primitives-macros", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-relations", + "ark-serialize 0.5.0", + "ark-snark", + "ark-std 0.5.0", + "blake2", + "derivative", + "digest 0.10.7", + "fnv", + "merlin", + "rayon", + "sha2 0.10.9", +] + +[[package]] +name = "ark-crypto-primitives-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e89fe77d1f0f4fe5b96dfc940923d88d17b6a773808124f21e764dfb063c6a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.107", +] + [[package]] name = "ark-ec" version = "0.4.2" @@ -408,11 +496,12 @@ dependencies = [ "ark-std 0.5.0", "educe 0.6.0", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "itertools 0.13.0", "num-bigint 0.4.6", "num-integer", "num-traits", + "rayon", "zeroize", ] @@ -453,6 +542,7 @@ dependencies = [ "num-bigint 0.4.6", "num-traits", "paste", + "rayon", "zeroize", ] @@ -473,7 +563,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -499,7 +589,23 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", +] + +[[package]] +name = "ark-groth16" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88f1d0f3a534bb54188b8dcc104307db6c56cdae574ddc3212aec0625740fc7e" +dependencies = [ + "ark-crypto-primitives", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-relations", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "rayon", ] [[package]] @@ -527,7 +633,20 @@ dependencies = [ "ark-std 0.5.0", "educe 0.6.0", "fnv", - "hashbrown 0.15.4", + "hashbrown 0.15.5", + "rayon", +] + +[[package]] +name = "ark-relations" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec46ddc93e7af44bcab5230937635b06fb5744464dd6a7e7b083e80ebd274384" +dependencies = [ + "ark-ff 0.5.0", + "ark-std 0.5.0", + "tracing", + "tracing-subscriber 0.2.25", ] [[package]] @@ -553,6 +672,7 @@ dependencies = [ "arrayvec", "digest 0.10.7", "num-bigint 0.4.6", + "rayon", ] [[package]] @@ -574,7 +694,19 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", +] + +[[package]] +name = "ark-snark" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d368e2848c2d4c129ce7679a7d0d2d612b6a274d3ea6a13bad4445d61b381b88" +dependencies = [ + "ark-ff 0.5.0", + "ark-relations", + "ark-serialize 0.5.0", + "ark-std 0.5.0", ] [[package]] @@ -618,27 +750,26 @@ checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" [[package]] name = "async-compression" -version = "0.4.27" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddb939d66e4ae03cee6091612804ba446b12878410cfa17f785f4dd67d4014e8" +checksum = "5a89bce6054c720275ac2432fbba080a66a2106a44a1b804553930ca6909f4e0" dependencies = [ - "brotli", - "flate2", + "compression-codecs", + "compression-core", "futures-core", - "memchr", "pin-project-lite", "tokio", ] [[package]] name = "async-trait" -version = "0.1.88" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -664,21 +795,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - [[package]] name = "base64" version = "0.12.3" @@ -720,9 +836,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" dependencies = [ "serde", ] @@ -739,6 +855,15 @@ dependencies = [ "wyz", ] +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "blake3" version = "1.8.2" @@ -811,10 +936,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" dependencies = [ "once_cell", - "proc-macro-crate 3.3.0", + "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -841,9 +966,9 @@ dependencies = [ [[package]] name = "brotli" -version = "8.0.1" +version = "8.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d" +checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -885,24 +1010,30 @@ dependencies = [ "serde", ] +[[package]] +name = "bytecount" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" + [[package]] name = "bytemuck" -version = "1.23.1" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" +checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.9.3" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -929,10 +1060,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.29" +version = "1.2.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1599538de2394445747c8cf7935946e3cc27e9625f889d979bfb2aaf569362" +checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" dependencies = [ + "find-msvc-tools", "jobserver", "libc", "shlex", @@ -940,9 +1072,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cfg_aliases" @@ -958,22 +1090,21 @@ checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -986,6 +1117,36 @@ dependencies = [ "inout", ] +[[package]] +name = "circom-prover" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82cb9d752c87c707a7741ee2b1f9186780e20b8ea0ddb9fd288173ee10ba738e" +dependencies = [ + "anyhow", + "ark-bls12-381", + "ark-bn254 0.5.0", + "ark-crypto-primitives", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-groth16", + "ark-poly 0.5.0", + "ark-relations", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "byteorder", + "hex-literal", + "num 0.4.3", + "num-bigint 0.4.6", + "num-traits", + "rand 0.8.5", + "rayon", + "rust-witness", + "serde", + "serde_json", + "uuid", +] + [[package]] name = "combine" version = "3.8.1" @@ -999,6 +1160,24 @@ dependencies = [ "unreachable", ] +[[package]] +name = "compression-codecs" +version = "0.4.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef8a506ec4b81c460798f572caead636d57d3d7e940f998160f52bd254bf2d23" +dependencies = [ + "brotli", + "compression-core", + "flate2", + "memchr", +] + +[[package]] +name = "compression-core" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e47641d3deaf41fb1538ac1f54735925e275eaf3bf4d55c81b137fba797e5cbb" + [[package]] name = "console" version = "0.15.11" @@ -1157,9 +1336,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.2.0" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b7c5dbd637569a2cca66e8d66b8c446a1e7bf064ea321d265d7b3dfe7c97e" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", @@ -1181,14 +1360,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "darling" -version = "0.20.11" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ "darling_core", "darling_macro", @@ -1196,37 +1375,37 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.11" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "darling_macro" -version = "0.20.11" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "deranged" -version = "0.4.0" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071" dependencies = [ "powerfmt", - "serde", + "serde_core", ] [[package]] @@ -1274,14 +1453,14 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "eager" @@ -1345,7 +1524,7 @@ dependencies = [ "enum-ordinalize 4.3.0", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -1380,13 +1559,13 @@ dependencies = [ [[package]] name = "enum-iterator-derive" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" +checksum = "685adfa4d6f3d765a26bc5dbc936577de9abf756c1feeb3089b01dd395034842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -1399,7 +1578,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -1419,7 +1598,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -1443,12 +1622,12 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -1465,9 +1644,24 @@ checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" [[package]] name = "fiat-crypto" -version = "0.3.0" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "find-msvc-tools" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" + +[[package]] +name = "five8" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" +checksum = "a75b8549488b4715defcb0d8a8a1c1c76a80661b5fa106b4ca0e7fce59d7d875" +dependencies = [ + "five8_core", +] [[package]] name = "five8_const" @@ -1486,9 +1680,9 @@ checksum = "2551bf44bc5f776c15044b9b94153a00198be06743e262afaaa61f11ac7523a5" [[package]] name = "flate2" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +checksum = "dc5a4e564e38c699f2880d3fda590bedc2e69f3f84cd48b457bd892ce61d0aa9" dependencies = [ "crc32fast", "miniz_oxide", @@ -1517,9 +1711,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -1586,7 +1780,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -1621,9 +1815,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.7" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" dependencies = [ "typenum", "version_check", @@ -1667,22 +1861,18 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasip2", + "wasm-bindgen", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - [[package]] name = "groth16-solana" version = "0.2.0" @@ -1710,18 +1900,18 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.10.0", + "indexmap 2.12.0", "slab", "tokio", - "tokio-util 0.7.15", + "tokio-util 0.7.16", "tracing", ] [[package]] name = "h2" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", @@ -1729,18 +1919,18 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.10.0", + "indexmap 2.12.0", "slab", "tokio", - "tokio-util 0.7.15", + "tokio-util 0.7.16", "tracing", ] [[package]] name = "hash32" -version = "0.2.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" dependencies = [ "byteorder", ] @@ -1762,13 +1952,19 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" + [[package]] name = "heck" version = "0.3.3" @@ -1778,6 +1974,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -1793,6 +1995,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + [[package]] name = "hmac" version = "0.8.1" @@ -1893,9 +2101,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" +checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" [[package]] name = "hyper" @@ -1914,7 +2122,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -1923,19 +2131,21 @@ dependencies = [ [[package]] name = "hyper" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", - "h2 0.4.11", + "futures-core", + "h2 0.4.12", "http 1.3.1", "http-body 1.0.1", "httparse", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", @@ -1962,13 +2172,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ "http 1.3.1", - "hyper 1.6.0", + "hyper 1.7.0", "hyper-util", - "rustls 0.23.29", + "rustls 0.23.33", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls 0.26.4", "tower-service", + "webpki-roots 1.0.3", ] [[package]] @@ -1992,7 +2203,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.6.0", + "hyper 1.7.0", "hyper-util", "native-tls", "tokio", @@ -2002,9 +2213,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" dependencies = [ "base64 0.22.1", "bytes", @@ -2013,12 +2224,12 @@ dependencies = [ "futures-util", "http 1.3.1", "http-body 1.0.1", - "hyper 1.6.0", + "hyper 1.7.0", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.1", "system-configuration 0.6.1", "tokio", "tower-service", @@ -2028,9 +2239,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2144,9 +2355,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -2176,13 +2387,14 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" dependencies = [ "equivalent", - "hashbrown 0.15.4", + "hashbrown 0.16.0", "serde", + "serde_core", ] [[package]] @@ -2207,17 +2419,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "io-uring" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" -dependencies = [ - "bitflags 2.9.1", - "cfg-if", - "libc", -] - [[package]] name = "ipnet" version = "2.11.0" @@ -2278,19 +2479,19 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jobserver" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", "libc", ] [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" dependencies = [ "once_cell", "wasm-bindgen", @@ -2311,6 +2512,16 @@ dependencies = [ "serde_json", ] +[[package]] +name = "kaigan" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ba15de5aeb137f0f65aa3bf82187647f1285abfe5b20c80c2c37f7007ad519a" +dependencies = [ + "borsh 0.10.4", + "serde", +] + [[package]] name = "keccak" version = "0.1.5" @@ -2328,9 +2539,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.174" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libsecp256k1" @@ -2390,31 +2601,70 @@ dependencies = [ "solana-program-error", "solana-pubkey", "solana-sysvar", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] -name = "light-batched-merkle-tree" -version = "0.3.0" +name = "light-account-checks" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81c7e179246468b09bf5c6882ef33043e178ff90eb6eab0c1c4c3623ef84b154" +checksum = "6024d5fe8d30f940dbdaf64b8de62a0c5ed4b6d7920179f84925085f85ca3f8f" dependencies = [ - "aligned-sized", - "borsh 0.10.4", - "light-account-checks", - "light-bloom-filter", - "light-compressed-account", - "light-hasher", + "solana-account-info", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "solana-sysvar", + "thiserror 2.0.17", +] + +[[package]] +name = "light-batched-merkle-tree" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81c7e179246468b09bf5c6882ef33043e178ff90eb6eab0c1c4c3623ef84b154" +dependencies = [ + "aligned-sized", + "borsh 0.10.4", + "light-account-checks 0.3.0", + "light-bloom-filter 0.3.0", + "light-compressed-account 0.3.0", + "light-hasher 3.1.0", "light-macros", - "light-merkle-tree-metadata", - "light-verifier", - "light-zero-copy", + "light-merkle-tree-metadata 0.3.0", + "light-verifier 2.1.0", + "light-zero-copy 0.2.0", "solana-account-info", "solana-msg", "solana-program-error", "solana-pubkey", "solana-sysvar", - "thiserror 2.0.12", + "thiserror 2.0.17", + "zerocopy", +] + +[[package]] +name = "light-batched-merkle-tree" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28657736ca8ad2d71d32015dc9dd85a111c4ed75ba6133ba6ba8c632f63d26ff" +dependencies = [ + "aligned-sized", + "borsh 0.10.4", + "light-account-checks 0.4.0", + "light-bloom-filter 0.4.0", + "light-compressed-account 0.5.0", + "light-hasher 4.0.0", + "light-macros", + "light-merkle-tree-metadata 0.5.0", + "light-verifier 4.0.0", + "light-zero-copy 0.4.0", + "solana-account-info", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "solana-sysvar", + "thiserror 2.0.17", "zerocopy", ] @@ -2428,7 +2678,20 @@ dependencies = [ "num-bigint 0.4.6", "solana-nostd-keccak", "solana-program-error", - "thiserror 2.0.12", + "thiserror 2.0.17", +] + +[[package]] +name = "light-bloom-filter" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd2f80682ff403477cfc6ee2f26b423e56e7f4d362543783825fe71bcf0f30cd" +dependencies = [ + "bitvec", + "num-bigint 0.4.6", + "solana-nostd-keccak", + "solana-program-error", + "thiserror 2.0.17", ] [[package]] @@ -2445,9 +2708,9 @@ dependencies = [ [[package]] name = "light-client" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62345edfabd8ee46f62977105cc319213a8615e61325a18f82c8f25978dfe04d" +checksum = "a2420f5cabb1f8c4f26c4c50054ea51522507d2bada462e8c50cbff66d0f64b4" dependencies = [ "async-trait", "base64 0.13.1", @@ -2455,13 +2718,14 @@ dependencies = [ "bs58", "bytemuck", "lazy_static", - "light-compressed-account", - "light-concurrent-merkle-tree", - "light-hasher", - "light-indexed-merkle-tree", - "light-merkle-tree-metadata", + "light-compressed-account 0.5.0", + "light-concurrent-merkle-tree 3.0.0", + "light-hasher 4.0.0", + "light-indexed-merkle-tree 3.0.0", + "light-merkle-tree-metadata 0.5.0", "light-prover-client", "light-sdk", + "litesvm", "num-bigint 0.4.6", "num-traits", "photon-api", @@ -2485,7 +2749,7 @@ dependencies = [ "solana-transaction", "solana-transaction-error", "solana-transaction-status-client-types", - "thiserror 2.0.12", + "thiserror 2.0.17", "tokio", "tracing", ] @@ -2499,12 +2763,32 @@ dependencies = [ "anchor-lang", "borsh 0.10.4", "bytemuck", - "light-hasher", + "light-hasher 3.1.0", + "light-macros", + "light-zero-copy 0.2.0", + "solana-program-error", + "solana-pubkey", + "thiserror 2.0.17", + "zerocopy", +] + +[[package]] +name = "light-compressed-account" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0985921012ffc149596eac90d1170399bb70dbebfa2212bb72b2da30a558ec6" +dependencies = [ + "anchor-lang", + "borsh 0.10.4", + "bytemuck", + "light-hasher 4.0.0", "light-macros", - "light-zero-copy", + "light-program-profiler", + "light-zero-copy 0.4.0", + "solana-msg", "solana-program-error", "solana-pubkey", - "thiserror 2.0.12", + "thiserror 2.0.17", "zerocopy", ] @@ -2517,14 +2801,14 @@ dependencies = [ "account-compression", "anchor-lang", "anchor-spl", - "light-compressed-account", - "light-hasher", + "light-compressed-account 0.3.0", + "light-hasher 3.1.0", "light-heap", "light-system-program-anchor", - "light-zero-copy", + "light-zero-copy 0.2.0", "solana-sdk", "solana-security-txt", - "spl-token", + "spl-token 7.0.0", "spl-token-2022 7.0.0", "zerocopy", ] @@ -2537,10 +2821,24 @@ checksum = "9b4f878301620df78ba7e7758c5fd720f28040f5c157375f88d310f15ddb1746" dependencies = [ "borsh 0.10.4", "light-bounded-vec", - "light-hasher", + "light-hasher 3.1.0", "memoffset", "solana-program-error", - "thiserror 2.0.12", + "thiserror 2.0.17", +] + +[[package]] +name = "light-concurrent-merkle-tree" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d647f56701f1c634a70900484be6111cf661c8937785073471d489b05d868c" +dependencies = [ + "borsh 0.10.4", + "light-bounded-vec", + "light-hasher 4.0.0", + "memoffset", + "solana-program-error", + "thiserror 2.0.17", ] [[package]] @@ -2549,11 +2847,11 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3893319277415f3ffbe9cfa3d1838d0d437b5539a69040fc0f161f29fb495673" dependencies = [ - "light-hasher", + "light-hasher 3.1.0", "num-bigint 0.4.6", "num-traits", "solana-program-error", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] @@ -2573,7 +2871,27 @@ dependencies = [ "solana-nostd-keccak", "solana-program-error", "solana-pubkey", - "thiserror 2.0.12", + "thiserror 2.0.17", +] + +[[package]] +name = "light-hasher" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7b8b99f626dbfe0e9731a214e2b2e8990341f5fdb249744661ab7f3029d9859" +dependencies = [ + "ark-bn254 0.5.0", + "ark-ff 0.5.0", + "arrayvec", + "borsh 0.10.4", + "light-poseidon 0.3.0", + "num-bigint 0.4.6", + "sha2 0.10.9", + "sha3", + "solana-nostd-keccak", + "solana-program-error", + "solana-pubkey", + "thiserror 2.0.17", ] [[package]] @@ -2591,10 +2909,22 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc786d8df68ef64493fea04914a7a7745f8122f2efbae043cd4ba4eaffa9e6db" dependencies = [ - "light-hasher", + "light-hasher 3.1.0", + "num-bigint 0.4.6", + "num-traits", + "thiserror 2.0.17", +] + +[[package]] +name = "light-indexed-array" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271ba5b246a77e0d4797d6f1752ec3ca627b2359a669189c198f5e104951d928" +dependencies = [ + "light-hasher 4.0.0", "num-bigint 0.4.6", "num-traits", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] @@ -2604,13 +2934,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f38362948ad7b8ae1fd1626d38743bed5a15563336fb5d4148b9162186c8e55" dependencies = [ "light-bounded-vec", - "light-concurrent-merkle-tree", - "light-hasher", - "light-merkle-tree-reference", + "light-concurrent-merkle-tree 2.1.0", + "light-hasher 3.1.0", + "light-merkle-tree-reference 2.0.0", "num-bigint 0.4.6", "num-traits", "solana-program-error", - "thiserror 2.0.12", + "thiserror 2.0.17", +] + +[[package]] +name = "light-indexed-merkle-tree" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2d75ca453b5f75de51384386cb719402609ba6225ca28d65ea5d071297a5138" +dependencies = [ + "light-bounded-vec", + "light-concurrent-merkle-tree 3.0.0", + "light-hasher 4.0.0", + "light-merkle-tree-reference 3.0.1", + "num-bigint 0.4.6", + "num-traits", + "solana-program-error", + "thiserror 2.0.17", ] [[package]] @@ -2622,7 +2968,7 @@ dependencies = [ "bs58", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -2634,11 +2980,28 @@ dependencies = [ "anchor-lang", "borsh 0.10.4", "bytemuck", - "light-compressed-account", + "light-compressed-account 0.3.0", + "solana-msg", + "solana-program-error", + "solana-sysvar", + "thiserror 2.0.17", + "zerocopy", +] + +[[package]] +name = "light-merkle-tree-metadata" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cdc5dab70d1b821a3d77a7f6b074e83b8a5d966aa457487f49ab8b23cd84349" +dependencies = [ + "anchor-lang", + "borsh 0.10.4", + "bytemuck", + "light-compressed-account 0.5.0", "solana-msg", "solana-program-error", "solana-sysvar", - "thiserror 2.0.12", + "thiserror 2.0.17", "zerocopy", ] @@ -2648,11 +3011,24 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1650701feac958261b2c3ab4da361ad8548985ee3ee496a17e76db44d2d3c9e3" dependencies = [ - "light-hasher", - "light-indexed-array", + "light-hasher 3.1.0", + "light-indexed-array 0.1.0", + "num-bigint 0.4.6", + "num-traits", + "thiserror 2.0.17", +] + +[[package]] +name = "light-merkle-tree-reference" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93b3c707e7d506c1c0f1d94520c5d8d93eb59eb599ead658a7eb22416c04a590" +dependencies = [ + "light-hasher 4.0.0", + "light-indexed-array 0.2.0", "num-bigint 0.4.6", "num-traits", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] @@ -2679,37 +3055,62 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "light-profiler-macro" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a8be18fe4de58a6f754caa74a3fbc6d8a758a26f1f3c24d5b0f5b55df5f5408" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.107", +] + +[[package]] +name = "light-program-profiler" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1d345871581aebd8825868a3f08410290aa1cdddcb189ca7f7e588f61d79fcf" +dependencies = [ + "light-profiler-macro", +] + [[package]] name = "light-program-test" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0294c42c34db697214f3e6f3eadb4fe0ced41a0f5df9059ec16a32fa31eda6a6" +checksum = "527dc265e6151d89f4d4a2c2ddb52a164969c41bfb3a91296dcaadbc81635cd2" dependencies = [ "account-compression", "anchor-lang", "async-trait", "borsh 0.10.4", + "bs58", "bytemuck", - "light-batched-merkle-tree", + "chrono", + "light-batched-merkle-tree 0.5.0", "light-client", - "light-compressed-account", + "light-compressed-account 0.5.0", "light-compressed-token", - "light-concurrent-merkle-tree", - "light-hasher", - "light-indexed-array", - "light-indexed-merkle-tree", - "light-merkle-tree-metadata", - "light-merkle-tree-reference", + "light-concurrent-merkle-tree 3.0.0", + "light-hasher 4.0.0", + "light-indexed-array 0.2.0", + "light-indexed-merkle-tree 3.0.0", + "light-merkle-tree-metadata 0.5.0", + "light-merkle-tree-reference 3.0.1", "light-prover-client", "light-registry", "light-sdk", + "light-sdk-types", "litesvm", "log", "num-bigint 0.4.6", "num-traits", "photon-api", "rand 0.8.5", - "reqwest 0.12.22", + "reqwest 0.12.24", + "serde", + "serde_json", "solana-account", "solana-banks-client", "solana-compute-budget", @@ -2718,21 +3119,23 @@ dependencies = [ "solana-rpc-client-api", "solana-sdk", "solana-transaction", + "solana-transaction-status", "solana-transaction-status-client-types", + "tabled", "tokio", ] [[package]] name = "light-prover-client" -version = "2.0.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cea2ccb781ac0fe0e54d26d808c8dc48b3d3b8512302f7da5a0a606f9f1ac41" +checksum = "b9c91b395efa177040d8b156cba267bafa63b09b63b65c46444385a90c0e5684" dependencies = [ "ark-bn254 0.5.0", "ark-serialize 0.5.0", "ark-std 0.5.0", - "light-hasher", - "light-indexed-array", + "light-hasher 4.0.0", + "light-indexed-array 0.2.0", "light-sparse-merkle-tree", "num-bigint 0.4.6", "num-traits", @@ -2740,7 +3143,7 @@ dependencies = [ "serde", "serde_json", "solana-bn254", - "thiserror 2.0.12", + "thiserror 2.0.17", "tokio", "tracing", ] @@ -2754,8 +3157,8 @@ dependencies = [ "account-compression", "aligned-sized", "anchor-lang", - "light-batched-merkle-tree", - "light-merkle-tree-metadata", + "light-batched-merkle-tree 0.3.0", + "light-merkle-tree-metadata 0.3.0", "light-system-program-anchor", "solana-sdk", "solana-security-txt", @@ -2763,19 +3166,19 @@ dependencies = [ [[package]] name = "light-sdk" -version = "0.13.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043b8e1c5172494c65373330710df30b06e66582135b9c0342455c2c1d0ef247" +checksum = "41a2dfba0f29b02c33831a1c61070610dcb53e5b3a9403a8b7a6bb4292ce6fb7" dependencies = [ "anchor-lang", "borsh 0.10.4", - "light-account-checks", - "light-compressed-account", - "light-hasher", + "light-account-checks 0.4.0", + "light-compressed-account 0.5.0", + "light-hasher 4.0.0", "light-macros", "light-sdk-macros", "light-sdk-types", - "light-zero-copy", + "light-zero-copy 0.4.0", "num-bigint 0.4.6", "solana-account-info", "solana-cpi", @@ -2783,50 +3186,51 @@ dependencies = [ "solana-msg", "solana-program-error", "solana-pubkey", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] name = "light-sdk-macros" -version = "0.13.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951ce0cad71f6c774bb6585281a3a5c636920b05b4d3e5ef27b5050f57b6032b" +checksum = "c98682c853cdfd979b7e7ccef5ee21ebba60c3fecf6741dfa71416026e9ad504" dependencies = [ - "light-hasher", + "light-hasher 4.0.0", "light-poseidon 0.3.0", "proc-macro2", "quote", "solana-pubkey", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "light-sdk-types" -version = "0.13.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a641277a3e4272f3f619743f0ac31f81f9a085b69108bb625134ebce7a5a12c" +checksum = "1d5536c1dd2a81459fef69286318bee7faf2d51ca24089249dceff21ec483829" dependencies = [ "anchor-lang", "borsh 0.10.4", - "light-account-checks", - "light-compressed-account", - "light-hasher", + "light-account-checks 0.4.0", + "light-compressed-account 0.5.0", + "light-hasher 4.0.0", "light-macros", - "light-zero-copy", - "thiserror 2.0.12", + "light-zero-copy 0.4.0", + "solana-msg", + "thiserror 2.0.17", ] [[package]] name = "light-sparse-merkle-tree" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "169c23a6a74ba86a94f322ed514f47465beb53c9b7fdbad45955d8116c945760" +checksum = "721396404dbb3556b5c14102736ef840188ade960098ea3222c68945767ca030" dependencies = [ - "light-hasher", - "light-indexed-array", + "light-hasher 4.0.0", + "light-indexed-array 0.2.0", "num-bigint 0.4.6", "num-traits", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] @@ -2838,8 +3242,8 @@ dependencies = [ "account-compression", "aligned-sized", "anchor-lang", - "light-compressed-account", - "light-zero-copy", + "light-compressed-account 0.3.0", + "light-zero-copy 0.2.0", "zerocopy", ] @@ -2850,8 +3254,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85fdf317ec3cfcd3a8e6556a5b5e7fbcc207a40264700f9a5271876838f26f58" dependencies = [ "groth16-solana", - "light-compressed-account", - "thiserror 2.0.12", + "light-compressed-account 0.3.0", + "thiserror 2.0.17", +] + +[[package]] +name = "light-verifier" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26398153a8c0fa61957a9ad046b3a433c401a37e0e0e9c8d42dee097fa76ce65" +dependencies = [ + "groth16-solana", + "light-compressed-account 0.5.0", + "thiserror 2.0.17", ] [[package]] @@ -2861,15 +3276,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a34d759f65547a6540db7047f38f4cb2c3f01658deca95a1dd06f26b578de947" dependencies = [ "solana-program-error", - "thiserror 2.0.12", + "thiserror 2.0.17", + "zerocopy", +] + +[[package]] +name = "light-zero-copy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f4167c97f1291176414af783c01b647292d809ec14f991884c6d91b9ca2213e" +dependencies = [ + "light-zero-copy-derive", + "solana-program-error", "zerocopy", ] +[[package]] +name = "light-zero-copy-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552463371ee2a6383882b17f7ed1a6803dbc9cb3c0188e0c74a014c2eb22f29e" +dependencies = [ + "lazy_static", + "proc-macro2", + "quote", + "syn 2.0.107", +] + [[package]] name = "linux-raw-sys" -version = "0.9.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" @@ -2879,13 +3317,16 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "litesvm" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7e5f4462f34439adcfcab58099bc7a89c67a17f8240b84a993b8b705c1becb" +checksum = "23bca37ac374948b348e29c74b324dc36f18bbbd1ccf80e2046d967521cbd143" dependencies = [ + "agave-feature-set", + "agave-precompiles", + "agave-reserved-account-keys", "ansi_term", "bincode", - "indexmap 2.10.0", + "indexmap 2.12.0", "itertools 0.14.0", "log", "solana-account", @@ -2895,10 +3336,8 @@ dependencies = [ "solana-clock", "solana-compute-budget", "solana-compute-budget-instruction", - "solana-config-program", "solana-epoch-rewards", "solana-epoch-schedule", - "solana-feature-set", "solana-fee", "solana-fee-structure", "solana-hash", @@ -2909,17 +3348,15 @@ dependencies = [ "solana-loader-v3-interface", "solana-loader-v4-interface", "solana-log-collector", - "solana-measure", "solana-message", - "solana-native-token", + "solana-native-token 3.0.0", "solana-nonce", "solana-nonce-account", - "solana-precompiles", + "solana-precompile-error", "solana-program-error", "solana-program-runtime", "solana-pubkey", "solana-rent", - "solana-reserved-account-keys", "solana-sdk-ids", "solana-sha256-hasher", "solana-signature", @@ -2927,6 +3364,7 @@ dependencies = [ "solana-slot-hashes", "solana-slot-history", "solana-stake-interface", + "solana-svm-callback", "solana-svm-transaction", "solana-system-interface", "solana-system-program", @@ -2937,24 +3375,23 @@ dependencies = [ "solana-transaction-context", "solana-transaction-error", "solana-vote-program", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] name = "lock_api" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ - "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "lowlevel" @@ -2963,22 +3400,33 @@ dependencies = [ "account-compression", "anchor-lang", "borsh 0.10.4", + "circom-prover", "light-client", - "light-compressed-account", - "light-concurrent-merkle-tree", - "light-hasher", + "light-compressed-account 0.5.0", + "light-concurrent-merkle-tree 2.1.0", + "light-hasher 4.0.0", + "light-merkle-tree-reference 3.0.1", "light-program-test", "light-sdk", "light-sdk-types", + "num-bigint 0.4.6", + "rust-witness", + "serde_json", "solana-sdk", "tokio", ] +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + [[package]] name = "memchr" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "memmap2" @@ -3033,17 +3481,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] name = "mio" -version = "1.0.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" dependencies = [ "libc", "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3070,10 +3519,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" dependencies = [ "num-bigint 0.2.6", - "num-complex", + "num-complex 0.2.4", + "num-integer", + "num-iter", + "num-rational 0.2.4", + "num-traits", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint 0.4.6", + "num-complex 0.4.6", "num-integer", "num-iter", - "num-rational", + "num-rational 0.4.2", "num-traits", ] @@ -3096,6 +3559,7 @@ checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", + "rand 0.8.5", "serde", ] @@ -3109,6 +3573,15 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + [[package]] name = "num-conv" version = "0.1.0" @@ -3123,7 +3596,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -3158,6 +3631,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint 0.4.6", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -3169,9 +3653,9 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a973b4e44ce6cad84ce69d797acf9a044532e4184c4f267913d1b546a0727b7a" +checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" dependencies = [ "num_enum_derive", "rustversion", @@ -3179,14 +3663,14 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" +checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" dependencies = [ - "proc-macro-crate 3.3.0", + "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -3195,15 +3679,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" version = "1.21.3" @@ -3218,11 +3693,11 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.73" +version = "0.10.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "cfg-if", "foreign-types", "libc", @@ -3239,7 +3714,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -3248,14 +3723,24 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +[[package]] +name = "openssl-src" +version = "300.5.3+3.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6bad8cd0233b63971e232cc9c5e83039375b8586d2312f31fda85db8f888c2" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" -version = "0.9.109" +version = "0.9.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +checksum = "0a9f0075ba3c21b09f8e8b2026584b1d18d49388648f2fbbf3c97ea8deced8e2" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -3279,11 +3764,22 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "papergrid" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6978128c8b51d8f4080631ceb2302ab51e32cc6e8615f735ee2f83fd269ae3f1" +dependencies = [ + "bytecount", + "fnv", + "unicode-width", +] + [[package]] name = "parking_lot" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", "parking_lot_core", @@ -3291,15 +3787,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.11" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-link 0.2.1", ] [[package]] @@ -3319,9 +3815,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "percentage" @@ -3329,16 +3825,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" dependencies = [ - "num", + "num 0.2.1", ] [[package]] name = "photon-api" -version = "0.51.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "217aa078d82b9366955e0603e5c7b9abad0eb6595c963579da0ec04bda4ab829" +checksum = "503b549aede7d9f35752046b9a32d8dfc1c7acec3c304a012c8b3134d5b98e37" dependencies = [ - "reqwest 0.12.22", + "reqwest 0.12.24", "serde", "serde_derive", "serde_json", @@ -3364,7 +3860,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -3405,9 +3901,9 @@ checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] name = "potential_utf" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" dependencies = [ "zerovec", ] @@ -3438,18 +3934,40 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.3.0" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit 0.23.7", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ - "toml_edit", + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.107", ] [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] @@ -3471,14 +3989,69 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", +] + +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.23.33", + "socket2 0.6.1", + "thiserror 2.0.17", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +dependencies = [ + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.2", + "ring", + "rustc-hash", + "rustls 0.23.33", + "rustls-pki-types", + "slab", + "thiserror 2.0.17", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2 0.6.1", + "tracing", + "windows-sys 0.60.2", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" dependencies = [ "proc-macro2", ] @@ -3519,6 +4092,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -3539,6 +4122,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + [[package]] name = "rand_core" version = "0.5.1" @@ -3557,6 +4150,15 @@ dependencies = [ "getrandom 0.2.16", ] +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.4", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -3568,9 +4170,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ "either", "rayon-core", @@ -3578,9 +4180,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -3588,38 +4190,38 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.13" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", ] [[package]] name = "ref-cast" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "regex" -version = "1.11.1" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -3629,9 +4231,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -3640,9 +4242,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "reqwest" @@ -3650,7 +4252,6 @@ version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "async-compression", "base64 0.21.7", "bytes", "encoding_rs", @@ -3666,7 +4267,6 @@ dependencies = [ "js-sys", "log", "mime", - "mime_guess", "native-tls", "once_cell", "percent-encoding", @@ -3681,32 +4281,33 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls 0.24.1", - "tokio-util 0.7.15", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.25.4", "winreg", ] [[package]] name = "reqwest" -version = "0.12.22" +version = "0.12.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" +checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" dependencies = [ + "async-compression", "base64 0.22.1", "bytes", "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2 0.4.11", + "h2 0.4.12", "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", + "hyper 1.7.0", "hyper-rustls 0.27.7", "hyper-tls 0.6.0", "hyper-util", @@ -3717,6 +4318,8 @@ dependencies = [ "native-tls", "percent-encoding", "pin-project-lite", + "quinn", + "rustls 0.23.33", "rustls-pki-types", "serde", "serde_json", @@ -3724,6 +4327,8 @@ dependencies = [ "sync_wrapper 1.0.2", "tokio", "tokio-native-tls", + "tokio-rustls 0.26.4", + "tokio-util 0.7.16", "tower", "tower-http", "tower-service", @@ -3731,21 +4336,22 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots 1.0.3", ] [[package]] name = "reqwest-middleware" -version = "0.2.5" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a735987236a8e238bf0296c7e351b999c188ccc11477f311b82b55c93984216" +checksum = "57f17d28a6e6acfe1733fe24bcd30774d13bffa4b8a22535b4c8c98423088d4e" dependencies = [ "anyhow", "async-trait", - "http 0.2.12", - "reqwest 0.11.27", + "http 1.3.1", + "reqwest 0.12.24", "serde", - "task-local-extensions", "thiserror 1.0.69", + "tower-service", ] [[package]] @@ -3762,11 +4368,31 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rust-witness" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b59361683f7b6b3b0d343fc77e797ee5a267b8a470b9531ed9911aeed160dea0" +dependencies = [ + "cc", + "fnv", + "num-bigint 0.4.6", + "num-traits", + "paste", + "walkdir", +] + [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustc-hash" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc_version" @@ -3779,15 +4405,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3804,13 +4430,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.29" +version = "0.23.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" +checksum = "751e04a496ca00bb97a5e043158d23d66b5aabf2e1d5aa2a0aaebb1aafe6f82c" dependencies = [ "once_cell", + "ring", "rustls-pki-types", - "rustls-webpki 0.103.4", + "rustls-webpki 0.103.7", "subtle", "zeroize", ] @@ -3830,6 +4457,7 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" dependencies = [ + "web-time", "zeroize", ] @@ -3845,9 +4473,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.4" +version = "0.103.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" +checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf" dependencies = [ "ring", "rustls-pki-types", @@ -3856,9 +4484,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" @@ -3866,13 +4494,22 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3921,7 +4558,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "core-foundation", "core-foundation-sys", "libc", @@ -3930,9 +4567,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.14.0" +version = "2.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" dependencies = [ "core-foundation-sys", "libc", @@ -3940,16 +4577,17 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ + "serde_core", "serde_derive", ] @@ -3964,34 +4602,45 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.17" +version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" dependencies = [ "serde", + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] @@ -4017,19 +4666,18 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5" +checksum = "6093cd8c01b25262b84927e0f7151692158fab02d961e04c979d3903eba7ecc5" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.10.0", + "indexmap 2.12.0", "schemars 0.9.0", "schemars 1.0.4", - "serde", - "serde_derive", + "serde_core", "serde_json", "serde_with_macros", "time", @@ -4037,14 +4685,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f" +checksum = "a7e6c180db0816026a61afa1cff5344fb7ebded7e4d3062772179f2501481c27" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -4108,9 +4756,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] @@ -4121,6 +4769,12 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "siphasher" version = "0.3.11" @@ -4129,9 +4783,9 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" @@ -4149,6 +4803,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + [[package]] name = "solana-account" version = "2.2.1" @@ -4167,11 +4831,54 @@ dependencies = [ "solana-sysvar", ] +[[package]] +name = "solana-account-decoder" +version = "2.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba71c97fa4d85ce4a1e0e79044ad0406c419382be598c800202903a7688ce71a" +dependencies = [ + "Inflector", + "base64 0.22.1", + "bincode", + "bs58", + "bv", + "serde", + "serde_derive", + "serde_json", + "solana-account", + "solana-account-decoder-client-types", + "solana-address-lookup-table-interface", + "solana-clock", + "solana-config-program-client", + "solana-epoch-schedule", + "solana-fee-calculator", + "solana-instruction", + "solana-loader-v3-interface", + "solana-nonce", + "solana-program-option", + "solana-program-pack", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-slot-hashes", + "solana-slot-history", + "solana-stake-interface", + "solana-sysvar", + "solana-vote-interface", + "spl-generic-token", + "spl-token 8.0.0", + "spl-token-2022 8.0.1", + "spl-token-group-interface 0.6.0", + "spl-token-metadata-interface 0.7.0", + "thiserror 2.0.17", + "zstd", +] + [[package]] name = "solana-account-decoder-client-types" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6329c4f360f5173dd6f65022708486cdd24d302841058e2310945a2502284105" +checksum = "5519e8343325b707f17fbed54fcefb325131b692506d0af9e08a539d15e4f8cf" dependencies = [ "base64 0.22.1", "bs58", @@ -4185,9 +4892,9 @@ dependencies = [ [[package]] name = "solana-account-info" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c17d606a298a205fae325489fbed88ee6dc4463c111672172327e741c8905d" +checksum = "c8f5152a288ef1912300fc6efa6c2d1f9bb55d9398eb6c72326360b8063987da" dependencies = [ "bincode", "serde", @@ -4213,31 +4920,6 @@ dependencies = [ "solana-slot-hashes", ] -[[package]] -name = "solana-address-lookup-table-program" -version = "2.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87ae97f2d1b91a9790c1e35dba3f90a4d595d105097ad93fa685cbc034ad0f1" -dependencies = [ - "bincode", - "bytemuck", - "log", - "num-derive", - "num-traits", - "solana-address-lookup-table-interface", - "solana-bincode", - "solana-clock", - "solana-feature-set", - "solana-instruction", - "solana-log-collector", - "solana-packet", - "solana-program-runtime", - "solana-pubkey", - "solana-system-interface", - "solana-transaction-context", - "thiserror 2.0.12", -] - [[package]] name = "solana-atomic-u64" version = "2.2.1" @@ -4249,30 +4931,50 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e8b93a73f583fb03c9a43be9185c2e04c8a5df84e3c20fd813f0ff79a12142" +checksum = "68548570c38a021c724b5aa0112f45a54bdf7ff1b041a042848e034a95a96994" dependencies = [ "borsh 1.5.7", "futures", + "solana-account", "solana-banks-interface", - "solana-program", - "solana-sdk", + "solana-clock", + "solana-commitment-config", + "solana-hash", + "solana-message", + "solana-program-pack", + "solana-pubkey", + "solana-rent", + "solana-signature", + "solana-sysvar", + "solana-transaction", + "solana-transaction-context", + "solana-transaction-error", "tarpc", - "thiserror 2.0.12", + "thiserror 2.0.17", "tokio", "tokio-serde", ] [[package]] name = "solana-banks-interface" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54bdc2f951d900289a3de58f8fc835fcea67fdaaea390b447e16a8a403a2399" +checksum = "a6d90edc435bf488ef7abed4dcb1f94fa1970102cbabb25688f58417fd948286" dependencies = [ "serde", "serde_derive", - "solana-sdk", + "solana-account", + "solana-clock", + "solana-commitment-config", + "solana-hash", + "solana-message", + "solana-pubkey", + "solana-signature", + "solana-transaction", + "solana-transaction-context", + "solana-transaction-error", "tarpc", ] @@ -4312,9 +5014,9 @@ dependencies = [ [[package]] name = "solana-bn254" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9abc69625158faaab02347370b91c0d8e0fe347bf9287239f0fbe8f5864d91da" +checksum = "4420f125118732833f36facf96a27e7b78314b2d642ba07fa9ffdacd8d79e243" dependencies = [ "ark-bn254 0.4.0", "ark-ec 0.4.2", @@ -4322,7 +5024,7 @@ dependencies = [ "ark-serialize 0.4.2", "bytemuck", "solana-define-syscall", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] @@ -4337,12 +5039,13 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6931e8893b48e3a1c8124938f580fff857d84895582578cc7dbf100dd08d2c8f" +checksum = "b5aec57dcd80d0f6879956cad28854a6eebaed6b346ce56908ea01a9f36ab259" dependencies = [ "bincode", "libsecp256k1", + "num-traits", "qualifier_attr", "scopeguard", "solana-account", @@ -4352,10 +5055,8 @@ dependencies = [ "solana-blake3-hasher", "solana-bn254", "solana-clock", - "solana-compute-budget", "solana-cpi", "solana-curve25519", - "solana-feature-set", "solana-hash", "solana-instruction", "solana-keccak-hasher", @@ -4365,9 +5066,7 @@ dependencies = [ "solana-measure", "solana-packet", "solana-poseidon", - "solana-precompiles", "solana-program-entrypoint", - "solana-program-memory", "solana-program-runtime", "solana-pubkey", "solana-sbpf", @@ -4375,26 +5074,26 @@ dependencies = [ "solana-secp256k1-recover", "solana-sha256-hasher", "solana-stable-layout", + "solana-svm-feature-set", "solana-system-interface", "solana-sysvar", "solana-sysvar-id", "solana-timings", "solana-transaction-context", "solana-type-overrides", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] name = "solana-builtins" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9240641f944ece59e097c9981bdc33b2f519cbd91b9764ff5f62c307d986a3d" +checksum = "6d61a31b63b52b0d268cbcd56c76f50314867d7f8e07a0f2c62ee7c9886e07b2" dependencies = [ - "solana-address-lookup-table-program", + "agave-feature-set", "solana-bpf-loader-program", "solana-compute-budget-program", - "solana-config-program", - "solana-feature-set", + "solana-hash", "solana-loader-v4-program", "solana-program-runtime", "solana-pubkey", @@ -4408,19 +5107,15 @@ dependencies = [ [[package]] name = "solana-builtins-default-costs" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb6728141dc45bdde9d68b67bb914013be28f94a2aea8bb7131ea8c6161c30e" +checksum = "2ca69a299a6c969b18ea381a02b40c9e4dda04b2af0d15a007c1184c82163bbb" dependencies = [ + "agave-feature-set", "ahash", - "lazy_static", "log", - "qualifier_attr", - "solana-address-lookup-table-program", "solana-bpf-loader-program", "solana-compute-budget-program", - "solana-config-program", - "solana-feature-set", "solana-loader-v4-program", "solana-pubkey", "solana-sdk-ids", @@ -4452,9 +5147,9 @@ dependencies = [ [[package]] name = "solana-clock" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c2177a1b9fe8326004f1151a5acd124420b737811080b1035df31349e4d892" +checksum = "1bb482ab70fced82ad3d7d3d87be33d466a3498eb8aa856434ff3c0dfc2e2e31" dependencies = [ "serde", "serde_derive", @@ -4486,40 +5181,40 @@ dependencies = [ [[package]] name = "solana-compute-budget" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46e593ce26764fa3366b6d125b9f2455f6cd8d557f86b4f3c7b7c517db6d8f5f" +checksum = "9f4fc63bc2276a1618ca0bfc609da7448534ecb43a1cb387cdf9eaa2dc7bc272" dependencies = [ "solana-fee-structure", - "solana-program-entrypoint", + "solana-program-runtime", ] [[package]] name = "solana-compute-budget-instruction" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240e28cf764d1468f2388fb0d10b70278a64d47277ff552379116ba45d609cd1" +checksum = "503d94430f6d3c5ac1e1fa6a342c1c714d5b03c800999e7b6cf235298f0b5341" dependencies = [ + "agave-feature-set", "log", "solana-borsh", "solana-builtins-default-costs", "solana-compute-budget", "solana-compute-budget-interface", - "solana-feature-set", "solana-instruction", "solana-packet", "solana-pubkey", "solana-sdk-ids", "solana-svm-transaction", "solana-transaction-error", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] name = "solana-compute-budget-interface" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a5df17b195d312b66dccdde9beec6709766d8230cb4718c4c08854f780d0309" +checksum = "8432d2c4c22d0499aa06d62e4f7e333f81777b3d7c96050ae9e5cb71a8c3aee4" dependencies = [ "borsh 1.5.7", "serde", @@ -4530,36 +5225,24 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc6b8ea70ed5123412655ed15e7e0e29f06a7d5b82eb2572bee608d7755afb7" +checksum = "072b02beed1862c6b7b7a8a699379594c4470a9371c711856a0a3c266dcf57e5" dependencies = [ - "qualifier_attr", "solana-program-runtime", ] [[package]] -name = "solana-config-program" -version = "2.2.4" +name = "solana-config-program-client" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2417094a8c5c2d60812a5bd6f0bd31bdefc49479826c10347a85d217e088c964" +checksum = "53aceac36f105fd4922e29b4f0c1f785b69d7b3e7e387e384b8985c8e0c3595e" dependencies = [ "bincode", - "chrono", + "borsh 0.10.4", + "kaigan", "serde", - "serde_derive", - "solana-account", - "solana-bincode", - "solana-instruction", - "solana-log-collector", - "solana-packet", - "solana-program-runtime", - "solana-pubkey", - "solana-sdk-ids", - "solana-short-vec", - "solana-stake-interface", - "solana-system-interface", - "solana-transaction-context", + "solana-program", ] [[package]] @@ -4578,16 +5261,16 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3d15f1a893ced38529d44d7fe0d4348dc38c28fea13b6d6be5d13d438a441f" +checksum = "eae4261b9a8613d10e77ac831a8fa60b6fa52b9b103df46d641deff9f9812a23" dependencies = [ "bytemuck", "bytemuck_derive", - "curve25519-dalek 4.2.0", + "curve25519-dalek 4.1.3", "solana-define-syscall", "subtle", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] @@ -4601,9 +5284,9 @@ dependencies = [ [[package]] name = "solana-define-syscall" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf784bb2cb3e02cac9801813c30187344228d2ae952534902108f6150573a33d" +checksum = "2ae3e2abcf541c8122eafe9a625d4d194b4023c20adde1e251f94e056bb1aee2" [[package]] name = "solana-derivation-path" @@ -4697,14 +5380,14 @@ dependencies = [ "solana-pubkey", "solana-sdk-ids", "solana-system-interface", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] name = "solana-feature-gate-interface" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9c7fbf3e58b64a667c5f35e90af580538a95daea7001ff7806c0662d301bdf" +checksum = "43f5c5382b449e8e4e3016fb05e418c53d57782d8b5c30aa372fc265654b956d" dependencies = [ "bincode", "serde", @@ -4721,9 +5404,9 @@ dependencies = [ [[package]] name = "solana-feature-set" -version = "2.2.1" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e1d3b52b4a014efeaaab67f14e40af3972a4be61c523d612860db8e3145529" +checksum = "93b93971e289d6425f88e6e3cb6668c4b05df78b3c518c249be55ced8efd6b6d" dependencies = [ "ahash", "lazy_static", @@ -4735,11 +5418,11 @@ dependencies = [ [[package]] name = "solana-fee" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c14eaaa9d099e4510c9105522d97778cd66c3d401f0d68eebcf43179a1bf094" +checksum = "16beda37597046b1edd1cea6fa7caaed033c091f99ec783fe59c82828bc2adb8" dependencies = [ - "solana-feature-set", + "agave-feature-set", "solana-fee-structure", "solana-svm-transaction", ] @@ -4757,21 +5440,21 @@ dependencies = [ [[package]] name = "solana-fee-structure" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f45f94a88efdb512805563181dfa1c85c60a21b6e6d602bf24a2ea88f9399d6e" +checksum = "33adf673581c38e810bf618f745bf31b683a0a4a4377682e6aaac5d9a058dd4e" dependencies = [ "serde", "serde_derive", "solana-message", - "solana-native-token", + "solana-native-token 2.3.0", ] [[package]] name = "solana-genesis-config" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968dabd2b92d57131473eddbd475339da530e14f54397386abf303de3a2595a2" +checksum = "b3725085d47b96d37fef07a29d78d2787fc89a0b9004c66eed7753d1e554989f" dependencies = [ "bincode", "chrono", @@ -4787,7 +5470,6 @@ dependencies = [ "solana-inflation", "solana-keypair", "solana-logger", - "solana-native-token", "solana-poh-config", "solana-pubkey", "solana-rent", @@ -4810,14 +5492,14 @@ dependencies = [ [[package]] name = "solana-hash" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf7bcb14392900fe02e4e34e90234fbf0c673d4e327888410ba99fa2ba0f4e99" +checksum = "b5b96e9f0300fa287b545613f007dfe20043d7812bee255f418c1eb649c93b63" dependencies = [ "borsh 1.5.7", - "bs58", "bytemuck", "bytemuck_derive", + "five8", "js-sys", "serde", "serde_derive", @@ -4836,21 +5518,11 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "solana-inline-spl" -version = "2.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed78e6709851bb3fa8a0acb1ee40fbffa888049d042ca132d6ccb8e0b313ac72" -dependencies = [ - "bytemuck", - "solana-pubkey", -] - [[package]] name = "solana-instruction" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce496a475e5062ba5de97215ab39d9c358f9c9df4bb7f3a45a1f1a8bd9065ed" +checksum = "47298e2ce82876b64f71e9d13a46bc4b9056194e7f9937ad3084385befa50885" dependencies = [ "bincode", "borsh 1.5.7", @@ -4870,7 +5542,7 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0e85a6fad5c2d0c4f5b91d34b8ca47118fc593af706e523cdbedf846a954f57" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "solana-account-info", "solana-instruction", "solana-program-error", @@ -4895,13 +5567,13 @@ dependencies = [ [[package]] name = "solana-keypair" -version = "2.2.1" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dbb7042c2e0c561afa07242b2099d55c57bd1b1da3b6476932197d84e15e3e4" +checksum = "bd3f04aa1a05c535e93e121a95f66e7dcccf57e007282e8255535d24bf1e98bb" dependencies = [ - "bs58", "ed25519-dalek", "ed25519-dalek-bip32", + "five8", "rand 0.7.3", "solana-derivation-path", "solana-pubkey", @@ -4941,9 +5613,9 @@ dependencies = [ [[package]] name = "solana-loader-v3-interface" -version = "3.0.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4be76cfa9afd84ca2f35ebc09f0da0f0092935ccdac0595d98447f259538c2" +checksum = "6f7162a05b8b0773156b443bccd674ea78bb9aa406325b467ea78c06c99a63a2" dependencies = [ "serde", "serde_bytes", @@ -4971,16 +5643,15 @@ dependencies = [ [[package]] name = "solana-loader-v4-program" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0298bf161e18b146230b15e8fa57bd170a05342ab9c1fd996b0241c0f016c2" +checksum = "a6ab01855d851fa2fb6034b0d48de33d77d5c5f5fb4b0353d8e4a934cc03d48a" dependencies = [ "log", "qualifier_attr", "solana-account", "solana-bincode", "solana-bpf-loader-program", - "solana-compute-budget", "solana-instruction", "solana-loader-v3-interface", "solana-loader-v4-interface", @@ -4997,9 +5668,9 @@ dependencies = [ [[package]] name = "solana-log-collector" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d03bf4c676117575be755296e8f21233d74cd28dca227c42e97e86219a27193" +checksum = "9d945b1cf5bf7cbd6f5b78795beda7376370c827640df43bb2a1c17b492dc106" dependencies = [ "log", ] @@ -5019,15 +5690,15 @@ dependencies = [ [[package]] name = "solana-measure" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b17ee553110d2bfc454b8784840a4b75867e123d3816e13046989463fed2c6b" +checksum = "11dcd67cd2ae6065e494b64e861e0498d046d95a61cbbf1ae3d58be1ea0f42ed" [[package]] name = "solana-message" -version = "2.2.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268486ba8a294ed22a4d7c1ec05f540c3dbe71cfa7c6c54b6d4d13668d895678" +checksum = "1796aabce376ff74bf89b78d268fa5e683d7d7a96a0a4e4813ec34de49d5314b" dependencies = [ "bincode", "blake3", @@ -5048,20 +5719,18 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98b79bd642efa8388791fef7a900bfeb48865669148d523fba041fa7e407312f" +checksum = "0375159d8460f423d39e5103dcff6e07796a5ec1850ee1fcfacfd2482a8f34b5" dependencies = [ "crossbeam-channel", "gethostname", - "lazy_static", "log", - "reqwest 0.11.27", - "solana-clock", + "reqwest 0.12.24", "solana-cluster-type", "solana-sha256-hasher", "solana-time-utils", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] @@ -5075,9 +5744,15 @@ dependencies = [ [[package]] name = "solana-native-token" -version = "2.2.1" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61515b880c36974053dd499c0510066783f0cc6ac17def0c7ef2a244874cf4a9" + +[[package]] +name = "solana-native-token" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e9de00960197412e4be3902a6cd35e60817c511137aca6c34c66cd5d4017ec" +checksum = "ae8dd4c280dca9d046139eb5b7a5ac9ad10403fbd64964c7d7571214950d758f" [[package]] name = "solana-nonce" @@ -5137,7 +5812,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "004f2d2daf407b3ec1a1ca5ec34b3ccdfd6866dd2d3c7d0715004a96e4b6d127" dependencies = [ "bincode", - "bitflags 2.9.1", + "bitflags 2.9.4", "cfg_eval", "serde", "serde_derive", @@ -5156,14 +5831,14 @@ dependencies = [ [[package]] name = "solana-poseidon" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d2908b48b3828bc04b752d1ff36122f5a06de043258da88df5f8ce64791d208" +checksum = "cbac4eb90016eeb1d37fa36e592d3a64421510c49666f81020736611c319faff" dependencies = [ "ark-bn254 0.4.0", "light-poseidon 0.2.0", "solana-define-syscall", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] @@ -5178,9 +5853,9 @@ dependencies = [ [[package]] name = "solana-precompiles" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a460ab805ec063802105b463ecb5eb02c3ffe469e67a967eea8a6e778e0bc06" +checksum = "36e92768a57c652edb0f5d1b30a7d0bc64192139c517967c18600debe9ae3832" dependencies = [ "lazy_static", "solana-ed25519-program", @@ -5206,9 +5881,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "586469467e93ceb79048f8d8e3a619bf61d05396ee7de95cb40280301a589d05" +checksum = "98eca145bd3545e2fbb07166e895370576e47a00a7d824e325390d33bf467210" dependencies = [ "bincode", "blake3", @@ -5255,7 +5930,7 @@ dependencies = [ "solana-loader-v4-interface", "solana-message", "solana-msg", - "solana-native-token", + "solana-native-token 2.3.0", "solana-nonce", "solana-program-entrypoint", "solana-program-error", @@ -5280,15 +5955,15 @@ dependencies = [ "solana-sysvar", "solana-sysvar-id", "solana-vote-interface", - "thiserror 2.0.12", + "thiserror 2.0.17", "wasm-bindgen", ] [[package]] name = "solana-program-entrypoint" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "473ffe73c68d93e9f2aa726ad2985fe52760052709aaab188100a42c618060ec" +checksum = "32ce041b1a0ed275290a5008ee1a4a6c48f5054c8a3d78d313c08958a06aedbd" dependencies = [ "solana-account-info", "solana-msg", @@ -5314,11 +5989,10 @@ dependencies = [ [[package]] name = "solana-program-memory" -version = "2.2.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b0268f6c89825fb634a34bd0c3b8fdaeaecfc3728be1d622a8ee6dd577b60d4" +checksum = "3a5426090c6f3fd6cfdc10685322fede9ca8e5af43cd6a59e98bfe4e91671712" dependencies = [ - "num-traits", "solana-define-syscall", ] @@ -5339,9 +6013,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0a9acc6049c2ae8a2a2dd0b63269ab1a6d8fab4dead1aae75a9bcdd4aa6f05" +checksum = "5653001e07b657c9de6f0417cf9add1cf4325903732c480d415655e10cc86704" dependencies = [ "base64 0.22.1", "bincode", @@ -5353,43 +6027,45 @@ dependencies = [ "serde", "solana-account", "solana-clock", - "solana-compute-budget", "solana-epoch-rewards", "solana-epoch-schedule", - "solana-feature-set", + "solana-fee-structure", "solana-hash", "solana-instruction", "solana-last-restart-slot", "solana-log-collector", "solana-measure", "solana-metrics", - "solana-precompiles", + "solana-program-entrypoint", "solana-pubkey", "solana-rent", "solana-sbpf", "solana-sdk-ids", "solana-slot-hashes", "solana-stable-layout", + "solana-svm-callback", + "solana-svm-feature-set", + "solana-system-interface", "solana-sysvar", "solana-sysvar-id", "solana-timings", "solana-transaction-context", "solana-type-overrides", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] name = "solana-pubkey" -version = "2.2.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40db1ff5a0f8aea2c158d78ab5f2cf897848964251d1df42fef78efd3c85b863" +checksum = "9b62adb9c3261a052ca1f999398c388f1daf558a1b492f60a6d9e64857db4ff1" dependencies = [ "borsh 0.10.4", "borsh 1.5.7", - "bs58", "bytemuck", "bytemuck_derive", - "curve25519-dalek 4.2.0", + "curve25519-dalek 4.1.3", + "five8", "five8_const", "getrandom 0.2.16", "js-sys", @@ -5429,9 +6105,9 @@ dependencies = [ [[package]] name = "solana-rent-collector" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c1e19f5d5108b0d824244425e43bc78bbb9476e2199e979b0230c9f632d3bf4" +checksum = "127e6dfa51e8c8ae3aa646d8b2672bc4ac901972a338a9e1cd249e030564fb9d" dependencies = [ "serde", "serde_derive", @@ -5478,17 +6154,18 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f1809a424bb8d90aa40990451593cde7e734a060fb52b35e475db585450578" +checksum = "b8d3161ac0918178e674c1f7f1bfac40de3e7ed0383bd65747d63113c156eaeb" dependencies = [ "async-trait", "base64 0.22.1", "bincode", "bs58", + "futures", "indicatif", "log", - "reqwest 0.11.27", + "reqwest 0.12.24", "reqwest-middleware", "semver", "serde", @@ -5511,21 +6188,40 @@ dependencies = [ "solana-transaction-error", "solana-transaction-status-client-types", "solana-version", + "solana-vote-interface", "tokio", ] [[package]] name = "solana-rpc-client-api" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2eb4fe573cd2d59d8672f0d8ac65f64e70c948b36cf97218b9aeb80dca3329" +checksum = "2dbc138685c79d88a766a8fd825057a74ea7a21e1dd7f8de275ada899540fff7" dependencies = [ "anyhow", - "base64 0.22.1", - "bs58", "jsonrpc-core", - "reqwest 0.11.27", + "reqwest 0.12.24", "reqwest-middleware", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder-client-types", + "solana-clock", + "solana-rpc-client-types", + "solana-signer", + "solana-transaction-error", + "solana-transaction-status-client-types", + "thiserror 2.0.17", +] + +[[package]] +name = "solana-rpc-client-types" +version = "2.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea428a81729255d895ea47fba9b30fd4dacbfe571a080448121bd0592751676" +dependencies = [ + "base64 0.22.1", + "bs58", "semver", "serde", "serde_derive", @@ -5536,13 +6232,12 @@ dependencies = [ "solana-commitment-config", "solana-fee-calculator", "solana-inflation", - "solana-inline-spl", "solana-pubkey", - "solana-signer", "solana-transaction-error", "solana-transaction-status-client-types", "solana-version", - "thiserror 2.0.12", + "spl-generic-token", + "thiserror 2.0.17", ] [[package]] @@ -5553,9 +6248,9 @@ checksum = "61f1bc1357b8188d9c4a3af3fc55276e56987265eb7ad073ae6f8180ee54cecf" [[package]] name = "solana-sbpf" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a3ce7a0f4d6830124ceb2c263c36d1ee39444ec70146eb49b939e557e72b96" +checksum = "474a2d95dc819898ded08d24f29642d02189d3e1497bbb442a92a3997b7eb55f" dependencies = [ "byteorder", "combine", @@ -5564,15 +6259,15 @@ dependencies = [ "log", "rand 0.8.5", "rustc-demangle", - "thiserror 1.0.69", + "thiserror 2.0.17", "winapi", ] [[package]] name = "solana-sdk" -version = "2.2.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4808e8d7f3c931657e615042d4176b423e66f64dc99e3dc3c735a197e512029b" +checksum = "8cc0e4a7635b902791c44b6581bfb82f3ada32c5bc0929a64f39fe4bb384c86a" dependencies = [ "bincode", "bs58", @@ -5599,7 +6294,7 @@ dependencies = [ "solana-instruction", "solana-keypair", "solana-message", - "solana-native-token", + "solana-native-token 2.3.0", "solana-nonce-account", "solana-offchain-message", "solana-packet", @@ -5635,7 +6330,7 @@ dependencies = [ "solana-transaction-context", "solana-transaction-error", "solana-validator-exit", - "thiserror 2.0.12", + "thiserror 2.0.17", "wasm-bindgen", ] @@ -5657,14 +6352,14 @@ dependencies = [ "bs58", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "solana-secp256k1-program" -version = "2.2.1" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0a1caa972414cc78122c32bdae65ac5fe89df7db598585a5cde19d16a20280a" +checksum = "f19833e4bc21558fe9ec61f239553abe7d05224347b57d65c2218aeeb82d6149" dependencies = [ "bincode", "digest 0.10.7", @@ -5676,6 +6371,7 @@ dependencies = [ "solana-instruction", "solana-precompile-error", "solana-sdk-ids", + "solana-signature", ] [[package]] @@ -5687,14 +6383,14 @@ dependencies = [ "borsh 1.5.7", "libsecp256k1", "solana-define-syscall", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] name = "solana-secp256r1-program" -version = "2.2.3" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf903cbdc36a161533812f90acfccdb434ed48982bd5dd71f3217930572c4a80" +checksum = "ce0ae46da3071a900f02d367d99b2f3058fe2e90c5062ac50c4f20cfedad8f0f" dependencies = [ "bytemuck", "openssl", @@ -5741,9 +6437,9 @@ dependencies = [ [[package]] name = "solana-serde-varint" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc07d00200d82e6def2f7f7a45738e3406b17fe54a18adcf0defa16a97ccadb" +checksum = "2a7e155eba458ecfb0107b98236088c3764a09ddf0201ec29e52a0be40857113" dependencies = [ "serde", ] @@ -5761,9 +6457,9 @@ dependencies = [ [[package]] name = "solana-sha256-hasher" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0037386961c0d633421f53560ad7c80675c0447cba4d1bb66d60974dd486c7ea" +checksum = "5aa3feb32c28765f6aa1ce8f3feac30936f16c5c3f7eb73d63a5b8f6f8ecdc44" dependencies = [ "sha2 0.10.9", "solana-define-syscall", @@ -5792,12 +6488,12 @@ dependencies = [ [[package]] name = "solana-signature" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d251c8f3dc015f320b4161daac7f108156c837428e5a8cc61136d25beb11d6" +checksum = "64c8ec8e657aecfc187522fc67495142c12f35e55ddeca8698edbb738b8dbd8c" dependencies = [ - "bs58", "ed25519-dalek", + "five8", "rand 0.8.5", "serde", "serde-big-array", @@ -5875,21 +6571,21 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b140dad8a60e40c381a0a359a350d37d51827d02ceb623acf8b942c04f3f3e6" +checksum = "500e9b9d11573f12de91e94f9c4459882cd5ffc692776af49b610d6fcc0b167f" dependencies = [ + "agave-feature-set", "bincode", "log", "solana-account", "solana-bincode", "solana-clock", - "solana-config-program", - "solana-feature-set", + "solana-config-program-client", "solana-genesis-config", "solana-instruction", "solana-log-collector", - "solana-native-token", + "solana-native-token 2.3.0", "solana-packet", "solana-program-runtime", "solana-pubkey", @@ -5902,11 +6598,28 @@ dependencies = [ "solana-vote-interface", ] +[[package]] +name = "solana-svm-callback" +version = "2.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cef9f7d5cfb5d375081a6c8ad712a6f0e055a15890081f845acf55d8254a7a2" +dependencies = [ + "solana-account", + "solana-precompile-error", + "solana-pubkey", +] + +[[package]] +name = "solana-svm-feature-set" +version = "2.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f24b836eb4d74ec255217bdbe0f24f64a07adeac31aca61f334f91cd4a3b1d5" + [[package]] name = "solana-svm-transaction" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1da9eb37e6ced0215a5e44df4ed1f3b885cf349156cbbf99197680cb7eaccf5f" +checksum = "ab717b9539375ebb088872c6c87d1d8832d19f30f154ecc530154d23f60a6f0c" dependencies = [ "solana-hash", "solana-message", @@ -5934,9 +6647,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6321fd5380961387ef4633a98c109ac7f978667ceab2a38d0a699d6ddb2fc57a" +checksum = "23ca36cef39aea7761be58d4108a56a2e27042fb1e913355fdb142a05fc7eab7" dependencies = [ "bincode", "log", @@ -5944,6 +6657,7 @@ dependencies = [ "serde_derive", "solana-account", "solana-bincode", + "solana-fee-calculator", "solana-instruction", "solana-log-collector", "solana-nonce", @@ -5975,9 +6689,9 @@ dependencies = [ [[package]] name = "solana-sysvar" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf6b44740d7f0c9f375d045c165bc0aab4a90658f92d6835aeb0649afaeaff9a" +checksum = "b8c3595f95069f3d90f275bb9bd235a1973c4d059028b0a7f81baca2703815db" dependencies = [ "base64 0.22.1", "bincode", @@ -6028,9 +6742,9 @@ checksum = "6af261afb0e8c39252a04d026e3ea9c405342b08c871a2ad8aa5448e068c784c" [[package]] name = "solana-timings" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224f93327d9d3178a30cd6c057e1ac6ca85e95287dd7355064dfa6b9c49f5671" +checksum = "7c49b842dfc53c1bf9007eaa6730296dea93b4fce73f457ce1080af43375c0d6" dependencies = [ "eager", "enum-iterator", @@ -6039,9 +6753,9 @@ dependencies = [ [[package]] name = "solana-transaction" -version = "2.2.1" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "753b3e9afed170e4cfc0ea1e87b5dfdc6d4a50270869414edd24c6ea1f529b29" +checksum = "80657d6088f721148f5d889c828ca60c7daeedac9a8679f9ec215e0c42bcbf41" dependencies = [ "bincode", "serde", @@ -6054,7 +6768,6 @@ dependencies = [ "solana-message", "solana-precompiles", "solana-pubkey", - "solana-reserved-account-keys", "solana-sanitize", "solana-sdk-ids", "solana-short-vec", @@ -6067,18 +6780,19 @@ dependencies = [ [[package]] name = "solana-transaction-context" -version = "2.2.1" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5022de04cbba05377f68bf848c8c1322ead733f88a657bf792bb40f3257b8218" +checksum = "54a312304361987a85b2ef2293920558e6612876a639dd1309daf6d0d59ef2fe" dependencies = [ "bincode", "serde", "serde_derive", "solana-account", "solana-instruction", + "solana-instructions-sysvar", "solana-pubkey", "solana-rent", - "solana-signature", + "solana-sdk-ids", ] [[package]] @@ -6093,11 +6807,55 @@ dependencies = [ "solana-sanitize", ] +[[package]] +name = "solana-transaction-status" +version = "2.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135f92f4192cc68900c665becf97fc0a6500ae5a67ff347bf2cbc20ecfefa821" +dependencies = [ + "Inflector", + "agave-reserved-account-keys", + "base64 0.22.1", + "bincode", + "borsh 1.5.7", + "bs58", + "log", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-address-lookup-table-interface", + "solana-clock", + "solana-hash", + "solana-instruction", + "solana-loader-v2-interface", + "solana-loader-v3-interface", + "solana-message", + "solana-program-option", + "solana-pubkey", + "solana-reward-info", + "solana-sdk-ids", + "solana-signature", + "solana-stake-interface", + "solana-system-interface", + "solana-transaction", + "solana-transaction-error", + "solana-transaction-status-client-types", + "solana-vote-interface", + "spl-associated-token-account 7.0.0", + "spl-memo", + "spl-token 8.0.0", + "spl-token-2022 8.0.1", + "spl-token-group-interface 0.6.0", + "spl-token-metadata-interface 0.7.0", + "thiserror 2.0.17", +] + [[package]] name = "solana-transaction-status-client-types" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1458fc750d0df4439bb4c1b418a4fe61afbd2e83963e452256eca99dc0c1cf76" +checksum = "51f1d7c2387c35850848212244d2b225847666cb52d3bd59a5c409d2c300303d" dependencies = [ "base64 0.22.1", "bincode", @@ -6113,16 +6871,15 @@ dependencies = [ "solana-transaction", "solana-transaction-context", "solana-transaction-error", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] name = "solana-type-overrides" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26d927bf3ed2f2b6b06a0f409dd8d6b1ad1af73cbba337e9471d05d42f026c9" +checksum = "41d80c44761eb398a157d809a04840865c347e1831ae3859b6100c0ee457bc1a" dependencies = [ - "lazy_static", "rand 0.8.5", ] @@ -6134,23 +6891,24 @@ checksum = "7bbf6d7a3c0b28dd5335c52c0e9eae49d0ae489a8f324917faf0ded65a812c1d" [[package]] name = "solana-version" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374dea09855d46655c776256dda9cc3c854cc70fd923ef22ba0805bc83ca7bfd" +checksum = "3324d46c7f7b7f5d34bf7dc71a2883bdc072c7b28ca81d0b2167ecec4cf8da9f" dependencies = [ + "agave-feature-set", + "rand 0.8.5", "semver", "serde", "serde_derive", - "solana-feature-set", "solana-sanitize", "solana-serde-varint", ] [[package]] name = "solana-vote-interface" -version = "2.2.1" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4507bb9d071fb81cfcf676f12fba3db4098f764524ef0b5567d671a81d41f3e" +checksum = "b80d57478d6599d30acc31cc5ae7f93ec2361a06aefe8ea79bc81739a08af4c3" dependencies = [ "bincode", "num-derive", @@ -6172,10 +6930,11 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0289c18977992907d361ca94c86cf45fd24cb41169fa03eb84947779e22933f" +checksum = "908d0e72c8b83e48762eb3e8c9114497cf4b1d66e506e360c46aba9308e71299" dependencies = [ + "agave-feature-set", "bincode", "log", "num-derive", @@ -6186,7 +6945,6 @@ dependencies = [ "solana-bincode", "solana-clock", "solana-epoch-schedule", - "solana-feature-set", "solana-hash", "solana-instruction", "solana-keypair", @@ -6201,15 +6959,16 @@ dependencies = [ "solana-transaction", "solana-transaction-context", "solana-vote-interface", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] name = "solana-zk-elgamal-proof-program" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a96b0ad864cc4d2156dbf0c4d7cadac4140ae13ebf7e856241500f74eca46f4" +checksum = "70cea14481d8efede6b115a2581f27bc7c6fdfba0752c20398456c3ac1245fc4" dependencies = [ + "agave-feature-set", "bytemuck", "num-derive", "num-traits", @@ -6222,19 +6981,18 @@ dependencies = [ [[package]] name = "solana-zk-sdk" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71db02a2e496c58840077c96dd4ede61894a4e6053853cca6dcddbb73200fb77" +checksum = "97b9fc6ec37d16d0dccff708ed1dd6ea9ba61796700c3bb7c3b401973f10f63b" dependencies = [ "aes-gcm-siv", "base64 0.22.1", "bincode", "bytemuck", "bytemuck_derive", - "curve25519-dalek 4.2.0", + "curve25519-dalek 4.1.3", "itertools 0.12.1", "js-sys", - "lazy_static", "merlin", "num-derive", "num-traits", @@ -6252,21 +7010,21 @@ dependencies = [ "solana-signature", "solana-signer", "subtle", - "thiserror 2.0.12", + "thiserror 2.0.17", "wasm-bindgen", "zeroize", ] [[package]] name = "solana-zk-token-proof-program" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c540a4f7df1300dc6087f0cbb271b620dd55e131ea26075bb52ba999be3105f0" +checksum = "579752ad6ea2a671995f13c763bf28288c3c895cb857a518cc4ebab93c9a8dde" dependencies = [ + "agave-feature-set", "bytemuck", "num-derive", "num-traits", - "solana-feature-set", "solana-instruction", "solana-log-collector", "solana-program-runtime", @@ -6276,18 +7034,17 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "2.2.4" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4debebedfebfd4a188a7ac3dd0a56e86368417c35891d6f3c35550b46bfbc0" +checksum = "5055e5df94abd5badf4f947681c893375bdb6f8f543c05d2a7ab9647a6a9d205" dependencies = [ "aes-gcm-siv", "base64 0.22.1", "bincode", "bytemuck", "bytemuck_derive", - "curve25519-dalek 4.2.0", + "curve25519-dalek 4.1.3", "itertools 0.12.1", - "lazy_static", "merlin", "num-derive", "num-traits", @@ -6306,7 +7063,7 @@ dependencies = [ "solana-signature", "solana-signer", "subtle", - "thiserror 2.0.12", + "thiserror 2.0.17", "zeroize", ] @@ -6321,11 +7078,27 @@ dependencies = [ "num-traits", "solana-program", "spl-associated-token-account-client", - "spl-token", + "spl-token 7.0.0", "spl-token-2022 6.0.0", "thiserror 1.0.69", ] +[[package]] +name = "spl-associated-token-account" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae179d4a26b3c7a20c839898e6aed84cb4477adf108a366c95532f058aea041b" +dependencies = [ + "borsh 1.5.7", + "num-derive", + "num-traits", + "solana-program", + "spl-associated-token-account-client", + "spl-token 8.0.0", + "spl-token-2022 8.0.1", + "thiserror 2.0.17", +] + [[package]] name = "spl-associated-token-account-client" version = "2.0.0" @@ -6356,19 +7129,19 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "spl-discriminator-syn" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f05593b7ca9eac7caca309720f2eafb96355e037e6d373b909a80fe7b69b9" +checksum = "5d1dbc82ab91422345b6df40a79e2b78c7bce1ebb366da323572dd60b7076b67" dependencies = [ "proc-macro2", "quote", "sha2 0.10.9", - "syn 2.0.104", + "syn 2.0.107", "thiserror 1.0.69", ] @@ -6382,7 +7155,40 @@ dependencies = [ "solana-program", "solana-zk-sdk", "spl-pod", - "spl-token-confidential-transfer-proof-extraction", + "spl-token-confidential-transfer-proof-extraction 0.2.1", +] + +[[package]] +name = "spl-elgamal-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65edfeed09cd4231e595616aa96022214f9c9d2be02dea62c2b30d5695a6833a" +dependencies = [ + "bytemuck", + "solana-account-info", + "solana-cpi", + "solana-instruction", + "solana-msg", + "solana-program-entrypoint", + "solana-program-error", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-system-interface", + "solana-sysvar", + "solana-zk-sdk", + "spl-pod", + "spl-token-confidential-transfer-proof-extraction 0.3.0", +] + +[[package]] +name = "spl-generic-token" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "741a62a566d97c58d33f9ed32337ceedd4e35109a686e31b1866c5dfa56abddc" +dependencies = [ + "bytemuck", + "solana-pubkey", ] [[package]] @@ -6416,7 +7222,7 @@ dependencies = [ "solana-program-option", "solana-pubkey", "solana-zk-sdk", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] @@ -6428,10 +7234,25 @@ dependencies = [ "num-derive", "num-traits", "solana-program", - "spl-program-error-derive", + "spl-program-error-derive 0.4.1", "thiserror 1.0.69", ] +[[package]] +name = "spl-program-error" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdebc8b42553070b75aa5106f071fef2eb798c64a7ec63375da4b1f058688c6" +dependencies = [ + "num-derive", + "num-traits", + "solana-decode-error", + "solana-msg", + "solana-program-error", + "spl-program-error-derive 0.5.0", + "thiserror 2.0.17", +] + [[package]] name = "spl-program-error-derive" version = "0.4.1" @@ -6441,7 +7262,19 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.9", - "syn 2.0.104", + "syn 2.0.107", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2539e259c66910d78593475540e8072f0b10f0f61d7607bbf7593899ed52d0" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.9", + "syn 2.0.107", ] [[package]] @@ -6461,11 +7294,33 @@ dependencies = [ "solana-pubkey", "spl-discriminator", "spl-pod", - "spl-program-error", - "spl-type-length-value", + "spl-program-error 0.6.0", + "spl-type-length-value 0.7.0", "thiserror 1.0.69", ] +[[package]] +name = "spl-tlv-account-resolution" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1408e961215688715d5a1063cbdcf982de225c45f99c82b4f7d7e1dd22b998d7" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "solana-account-info", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator", + "spl-pod", + "spl-program-error 0.7.0", + "spl-type-length-value 0.8.0", + "thiserror 2.0.17", +] + [[package]] name = "spl-token" version = "7.0.0" @@ -6481,11 +7336,67 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "spl-token" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053067c6a82c705004f91dae058b11b4780407e9ccd6799dc9e7d0fab5f242da" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-account-info", + "solana-cpi", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-sysvar", + "thiserror 2.0.17", +] + +[[package]] +name = "spl-token-2022" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b27f7405010ef816587c944536b0eafbcc35206ab6ba0f2ca79f1d28e488f4f" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "solana-security-txt", + "solana-zk-sdk", + "spl-elgamal-registry 0.1.1", + "spl-memo", + "spl-pod", + "spl-token 7.0.0", + "spl-token-confidential-transfer-ciphertext-arithmetic 0.2.1", + "spl-token-confidential-transfer-proof-extraction 0.2.1", + "spl-token-confidential-transfer-proof-generation 0.2.0", + "spl-token-group-interface 0.5.0", + "spl-token-metadata-interface 0.6.0", + "spl-transfer-hook-interface 0.9.0", + "spl-type-length-value 0.7.0", + "thiserror 1.0.69", +] + [[package]] name = "spl-token-2022" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b27f7405010ef816587c944536b0eafbcc35206ab6ba0f2ca79f1d28e488f4f" +checksum = "9048b26b0df0290f929ff91317c83db28b3ef99af2b3493dd35baa146774924c" dependencies = [ "arrayref", "bytemuck", @@ -6495,46 +7406,62 @@ dependencies = [ "solana-program", "solana-security-txt", "solana-zk-sdk", - "spl-elgamal-registry", + "spl-elgamal-registry 0.1.1", "spl-memo", "spl-pod", - "spl-token", - "spl-token-confidential-transfer-ciphertext-arithmetic", - "spl-token-confidential-transfer-proof-extraction", - "spl-token-confidential-transfer-proof-generation 0.2.0", - "spl-token-group-interface", - "spl-token-metadata-interface", - "spl-transfer-hook-interface", - "spl-type-length-value", - "thiserror 1.0.69", + "spl-token 7.0.0", + "spl-token-confidential-transfer-ciphertext-arithmetic 0.2.1", + "spl-token-confidential-transfer-proof-extraction 0.2.1", + "spl-token-confidential-transfer-proof-generation 0.3.0", + "spl-token-group-interface 0.5.0", + "spl-token-metadata-interface 0.6.0", + "spl-transfer-hook-interface 0.9.0", + "spl-type-length-value 0.7.0", + "thiserror 2.0.17", ] [[package]] name = "spl-token-2022" -version = "7.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9048b26b0df0290f929ff91317c83db28b3ef99af2b3493dd35baa146774924c" +checksum = "31f0dfbb079eebaee55e793e92ca5f433744f4b71ee04880bfd6beefba5973e5" dependencies = [ "arrayref", "bytemuck", "num-derive", "num-traits", "num_enum", - "solana-program", + "solana-account-info", + "solana-clock", + "solana-cpi", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-native-token 2.3.0", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", "solana-security-txt", + "solana-system-interface", + "solana-sysvar", "solana-zk-sdk", - "spl-elgamal-registry", + "spl-elgamal-registry 0.2.0", "spl-memo", "spl-pod", - "spl-token", - "spl-token-confidential-transfer-ciphertext-arithmetic", - "spl-token-confidential-transfer-proof-extraction", - "spl-token-confidential-transfer-proof-generation 0.3.0", - "spl-token-group-interface", - "spl-token-metadata-interface", - "spl-transfer-hook-interface", - "spl-type-length-value", - "thiserror 2.0.12", + "spl-token 8.0.0", + "spl-token-confidential-transfer-ciphertext-arithmetic 0.3.1", + "spl-token-confidential-transfer-proof-extraction 0.3.0", + "spl-token-confidential-transfer-proof-generation 0.4.1", + "spl-token-group-interface 0.6.0", + "spl-token-metadata-interface 0.7.0", + "spl-transfer-hook-interface 0.10.0", + "spl-type-length-value 0.8.0", + "thiserror 2.0.17", ] [[package]] @@ -6549,6 +7476,18 @@ dependencies = [ "solana-zk-sdk", ] +[[package]] +name = "spl-token-confidential-transfer-ciphertext-arithmetic" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cddd52bfc0f1c677b41493dafa3f2dbbb4b47cf0990f08905429e19dc8289b35" +dependencies = [ + "base64 0.22.1", + "bytemuck", + "solana-curve25519", + "solana-zk-sdk", +] + [[package]] name = "spl-token-confidential-transfer-proof-extraction" version = "0.2.1" @@ -6560,7 +7499,27 @@ dependencies = [ "solana-program", "solana-zk-sdk", "spl-pod", - "thiserror 2.0.12", + "thiserror 2.0.17", +] + +[[package]] +name = "spl-token-confidential-transfer-proof-extraction" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe2629860ff04c17bafa9ba4bed8850a404ecac81074113e1f840dbd0ebb7bd6" +dependencies = [ + "bytemuck", + "solana-account-info", + "solana-curve25519", + "solana-instruction", + "solana-instructions-sysvar", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "solana-sdk-ids", + "solana-zk-sdk", + "spl-pod", + "thiserror 2.0.17", ] [[package]] @@ -6569,7 +7528,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8627184782eec1894de8ea26129c61303f1f0adeed65c20e0b10bc584f09356d" dependencies = [ - "curve25519-dalek 4.2.0", + "curve25519-dalek 4.1.3", "solana-zk-sdk", "thiserror 1.0.69", ] @@ -6580,9 +7539,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e3597628b0d2fe94e7900fd17cdb4cfbb31ee35c66f82809d27d86e44b2848b" dependencies = [ - "curve25519-dalek 4.2.0", + "curve25519-dalek 4.1.3", + "solana-zk-sdk", + "thiserror 2.0.17", +] + +[[package]] +name = "spl-token-confidential-transfer-proof-generation" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa27b9174bea869a7ebf31e0be6890bce90b1a4288bc2bbf24bd413f80ae3fde" +dependencies = [ + "curve25519-dalek 4.1.3", "solana-zk-sdk", - "thiserror 2.0.12", + "thiserror 2.0.17", ] [[package]] @@ -6604,6 +7574,25 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "spl-token-group-interface" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5597b4cd76f85ce7cd206045b7dc22da8c25516573d42d267c8d1fd128db5129" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator", + "spl-pod", + "thiserror 2.0.17", +] + [[package]] name = "spl-token-metadata-interface" version = "0.6.0" @@ -6621,10 +7610,31 @@ dependencies = [ "solana-pubkey", "spl-discriminator", "spl-pod", - "spl-type-length-value", + "spl-type-length-value 0.7.0", "thiserror 1.0.69", ] +[[package]] +name = "spl-token-metadata-interface" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "304d6e06f0de0c13a621464b1fd5d4b1bebf60d15ca71a44d3839958e0da16ee" +dependencies = [ + "borsh 1.5.7", + "num-derive", + "num-traits", + "solana-borsh", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator", + "spl-pod", + "spl-type-length-value 0.8.0", + "thiserror 2.0.17", +] + [[package]] name = "spl-transfer-hook-interface" version = "0.9.0" @@ -6644,12 +7654,37 @@ dependencies = [ "solana-pubkey", "spl-discriminator", "spl-pod", - "spl-program-error", - "spl-tlv-account-resolution", - "spl-type-length-value", + "spl-program-error 0.6.0", + "spl-tlv-account-resolution 0.9.0", + "spl-type-length-value 0.7.0", "thiserror 1.0.69", ] +[[package]] +name = "spl-transfer-hook-interface" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7e905b849b6aba63bde8c4badac944ebb6c8e6e14817029cbe1bc16829133bd" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "solana-account-info", + "solana-cpi", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator", + "spl-pod", + "spl-program-error 0.7.0", + "spl-tlv-account-resolution 0.10.0", + "spl-type-length-value 0.8.0", + "thiserror 2.0.17", +] + [[package]] name = "spl-type-length-value" version = "0.7.0" @@ -6668,11 +7703,29 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "spl-type-length-value" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d417eb548214fa822d93f84444024b4e57c13ed6719d4dcc68eec24fb481e9f5" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "solana-account-info", + "solana-decode-error", + "solana-msg", + "solana-program-error", + "spl-discriminator", + "spl-pod", + "thiserror 2.0.17", +] + [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "static_assertions" @@ -6705,9 +7758,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.104" +version = "2.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "2a26dbd934e5451d21ef060c018dae56fc073894c5a7896f882928a76e6d081b" dependencies = [ "proc-macro2", "quote", @@ -6737,7 +7790,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -6757,7 +7810,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "core-foundation", "system-configuration-sys 0.6.0", ] @@ -6782,6 +7835,30 @@ dependencies = [ "libc", ] +[[package]] +name = "tabled" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e39a2ee1fbcd360805a771e1b300f78cc88fec7b8d3e2f71cd37bbf23e725c7d" +dependencies = [ + "papergrid", + "tabled_derive", + "testing_table", +] + +[[package]] +name = "tabled_derive" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea5d1b13ca6cff1f9231ffd62f15eefd72543dab5e468735f1a456728a02846" +dependencies = [ + "heck 0.5.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.107", +] + [[package]] name = "tap" version = "1.0.1" @@ -6823,26 +7900,17 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "task-local-extensions" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba323866e5d033818e3240feeb9f7db2c4296674e4d9e16b97b7bf8f490434e8" -dependencies = [ - "pin-utils", -] - [[package]] name = "tempfile" -version = "3.20.0" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", - "getrandom 0.3.3", + "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -6854,6 +7922,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "testing_table" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f8daae29995a24f65619e19d8d31dea5b389f3d853d8bf297bbf607cd0014cc" +dependencies = [ + "unicode-width", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -6865,11 +7942,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.17", ] [[package]] @@ -6880,18 +7957,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -6905,9 +7982,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.41" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" dependencies = [ "deranged", "itoa", @@ -6920,15 +7997,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" [[package]] name = "time-macros" -version = "0.2.22" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" dependencies = [ "num-conv", "time-core", @@ -6946,9 +8023,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] @@ -6961,33 +8038,30 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.46.1" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "backtrace", "bytes", - "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "slab", - "socket2", + "socket2 0.6.1", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -7012,11 +8086,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.29", + "rustls 0.23.33", "tokio", ] @@ -7053,9 +8127,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -7081,8 +8155,8 @@ checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", - "toml_datetime", - "toml_edit", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", ] [[package]] @@ -7094,20 +8168,50 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +dependencies = [ + "serde_core", +] + [[package]] name = "toml_edit" version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.12.0", "serde", "serde_spanned", - "toml_datetime", + "toml_datetime 0.6.11", "toml_write", "winnow", ] +[[package]] +name = "toml_edit" +version = "0.23.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" +dependencies = [ + "indexmap 2.12.0", + "toml_datetime 0.7.3", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +dependencies = [ + "winnow", +] + [[package]] name = "toml_write" version = "0.1.2" @@ -7135,7 +8239,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.4", "bytes", "futures-util", "http 1.3.1", @@ -7179,7 +8283,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -7202,14 +8306,23 @@ dependencies = [ "opentelemetry", "tracing", "tracing-core", - "tracing-subscriber", + "tracing-subscriber 0.3.20", +] + +[[package]] +name = "tracing-subscriber" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" +dependencies = [ + "tracing-core", ] [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "sharded-slab", "thread_local", @@ -7224,9 +8337,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "unicase" @@ -7236,9 +8349,9 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" [[package]] name = "unicode-segmentation" @@ -7248,9 +8361,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "universal-hash" @@ -7289,13 +8402,14 @@ dependencies = [ [[package]] name = "url" -version = "2.5.4" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -7306,11 +8420,11 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.17.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", "js-sys", "serde", "wasm-bindgen", @@ -7340,6 +8454,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -7362,45 +8486,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" +name = "wasip2" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "wit-bindgen-rt", + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.100" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.50" +version = "0.4.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" dependencies = [ "cfg-if", "js-sys", @@ -7411,9 +8536,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7421,31 +8546,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.77" +version = "0.3.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" dependencies = [ "js-sys", "wasm-bindgen", @@ -7467,6 +8592,15 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "webpki-roots" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b130c0d2d49f8b6889abc456e795e82525204f27c42cf767cf0d7734e089b8" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "winapi" version = "0.3.9" @@ -7485,11 +8619,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -7500,37 +8634,37 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.2" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", - "windows-link", - "windows-result", - "windows-strings", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", ] [[package]] name = "windows-implement" -version = "0.60.0" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] name = "windows-interface" -version = "0.59.1" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -7539,15 +8673,21 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + [[package]] name = "windows-registry" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ - "windows-link", - "windows-result", - "windows-strings", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", ] [[package]] @@ -7556,7 +8696,16 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-link", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", ] [[package]] @@ -7565,7 +8714,16 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "windows-link", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", ] [[package]] @@ -7601,7 +8759,16 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.2", + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", ] [[package]] @@ -7637,18 +8804,19 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.2" +version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] [[package]] @@ -7665,9 +8833,9 @@ checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" [[package]] name = "windows_aarch64_msvc" @@ -7683,9 +8851,9 @@ checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_aarch64_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" @@ -7701,9 +8869,9 @@ checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnu" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" [[package]] name = "windows_i686_gnullvm" @@ -7713,9 +8881,9 @@ checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" @@ -7731,9 +8899,9 @@ checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_i686_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" [[package]] name = "windows_x86_64_gnu" @@ -7749,9 +8917,9 @@ checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnu" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" @@ -7767,9 +8935,9 @@ checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] name = "windows_x86_64_msvc" @@ -7785,15 +8953,15 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windows_x86_64_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winnow" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] @@ -7809,13 +8977,10 @@ dependencies = [ ] [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.1", -] +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" @@ -7852,28 +9017,28 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.26" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.26" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -7893,15 +9058,15 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", "synstructure", ] [[package]] name = "zeroize" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" dependencies = [ "zeroize_derive", ] @@ -7914,7 +9079,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -7930,9 +9095,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" dependencies = [ "yoke", "zerofrom", @@ -7947,7 +9112,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.107", ] [[package]] @@ -7970,9 +9135,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.15+zstd.1.5.7" +version = "2.0.16+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" dependencies = [ "cc", "pkg-config", diff --git a/lowlevel/Cargo.toml b/lowlevel/Cargo.toml index ed636ea..53933ea 100644 --- a/lowlevel/Cargo.toml +++ b/lowlevel/Cargo.toml @@ -14,16 +14,25 @@ test-sbf = [] [dependencies] anchor-lang = "0.31.1" borsh = "0.10.4" -light-sdk = { version = "0.13.0", features = ["anchor"] } -light-hasher = { version = "3.1.0", features = ["solana"] } -light-sdk-types = "0.13.0" -light-compressed-account = "0.3.0" +light-sdk = { version = "0.15.0", features = ["anchor", "v2"] } +light-hasher = { version = "4.0.0", features = ["solana"] } +light-sdk-types = "0.15.0" +light-compressed-account = {version = "0.5.0"} light-concurrent-merkle-tree = "2" # use cpi feature to avoid custom allocator conflict issues account-compression = { version = "2", features = ["cpi"] } [dev-dependencies] -light-program-test = "0.14.0" -light-client = "0.14.0" +light-program-test = "0.15.0" +light-client = "0.15.0" tokio = "1.40.0" solana-sdk = "2.2" +circom-prover = "0.1" +rust-witness = "0.1" +num-bigint = "0.4" +serde_json = "1.0" +light-merkle-tree-reference = "3.0.0" +light-compressed-account = {version = "0.5.0", features = ["new-unique"]} + +[build-dependencies] +rust-witness = "0.1" diff --git a/lowlevel/build.rs b/lowlevel/build.rs new file mode 100644 index 0000000..bb32f61 --- /dev/null +++ b/lowlevel/build.rs @@ -0,0 +1,5 @@ +fn main() { + // Transpile the WebAssembly witness generators for Circom circuits + // into a native library for use with circom-prover + rust_witness::transpile::transpile_wasm("./build/compressed_account_merkle_proof_js".to_string()); +} diff --git a/lowlevel/circuits/README.md b/lowlevel/circuits/README.md new file mode 100644 index 0000000..200be6f --- /dev/null +++ b/lowlevel/circuits/README.md @@ -0,0 +1,76 @@ +# ZK Circom Circuit for Compressed Account Merkle Proof + +This directory contains a circom circuit that verifies a Merkle proof of a compressed account on Solana. + +## Circuit Overview + +The `compressed_account_merkle_proof.circom` circuit combines two key components: + +1. **Compressed Account Hash**: Computes the hash of a compressed account using Poseidon hash + - Based on: https://github.com/ananas-block/compressed-account-circuit + - Inputs: owner_hashed, leaf_index, merkle_tree_hashed, discriminator, data_hash + +2. **Merkle Proof Verification**: Verifies the account exists in a Merkle tree + - Based on: /Users/ananas/dev/light-protocol2/circuit-lib/circuit-lib.circom + - Inputs: pathElements (26 levels), expectedRoot + +## Setup + +Run the setup script - it will handle dependencies, compilation, and key generation: + +```bash +./scripts/setup.sh +``` + +To clean up build artifacts: + +```bash +./scripts/clean.sh +``` + +## Testing + +### Rust Test with Mopro + +The circuit can be tested from Rust using the mopro library: + +```bash +cargo test test_compressed_account_merkle_proof_circuit +``` + +This test: +1. Loads the compiled circuit and zkey +2. Generates a proof with sample inputs +3. Verifies the proof is valid + +## Circuit Structure + +``` +CompressedAccountMerkleProof (main) +├── CompressedAccountHash +│ └── Poseidon(5) - Hashes account fields +└── MerkleProof(26) + ├── Num2Bits - Converts leaf index to bits + ├── Switcher[26] - Routes left/right based on path + └── Poseidon(2)[26] - Hashes up the tree +``` + +## Public Inputs + +The following inputs are public (visible in the proof): +- owner_hashed +- merkle_tree_hashed +- discriminator +- data_hash +- expectedRoot + +Private inputs: +- leaf_index +- pathElements + +## References + +- Compressed Account Circuit: https://github.com/ananas-block/compressed-account-circuit +- Merkle Proof Implementation: /Users/ananas/dev/light-protocol2/circuit-lib/circuit-lib.circom +- Mopro ZK Library: https://github.com/zkmopro/mopro +- SnarkJS: https://github.com/iden3/snarkjs diff --git a/lowlevel/circuits/compressed_account_merkle_proof.circom b/lowlevel/circuits/compressed_account_merkle_proof.circom new file mode 100644 index 0000000..fd0ddee --- /dev/null +++ b/lowlevel/circuits/compressed_account_merkle_proof.circom @@ -0,0 +1,100 @@ +pragma circom 2.0.0; + +include "../node_modules/circomlib/circuits/poseidon.circom"; +include "../node_modules/circomlib/circuits/bitify.circom"; +include "../node_modules/circomlib/circuits/switcher.circom"; +include "../node_modules/circomlib/circuits/comparators.circom"; + +// Compressed Account Hash Template +// Computes the hash of a compressed account +template CompressedAccountHash() { + signal input owner_hashed; + signal input leaf_index; + signal input merkle_tree_hashed; + signal input discriminator; + signal input data_hash; + + signal output hash; + + component poseidon = Poseidon(5); + + poseidon.inputs[0] <== owner_hashed; + poseidon.inputs[1] <== leaf_index; + poseidon.inputs[2] <== merkle_tree_hashed; + poseidon.inputs[3] <== discriminator + 36893488147419103232; // + discriminator domain + poseidon.inputs[4] <== data_hash; + + hash <== poseidon.out; +} + +// Merkle Proof Verification Template +// Verifies that a leaf is in a Merkle tree with a given root +template MerkleProof(levels) { + signal input leaf; + signal input pathElements[levels]; + signal input leafIndex; + signal output root; + + component switcher[levels]; + component hasher[levels]; + + component indexBits = Num2Bits(levels); + indexBits.in <== leafIndex; + + for (var i = 0; i < levels; i++) { + switcher[i] = Switcher(); + switcher[i].L <== i == 0 ? leaf : hasher[i - 1].out; + switcher[i].R <== pathElements[i]; + switcher[i].sel <== indexBits.out[i]; + + hasher[i] = Poseidon(2); + hasher[i].inputs[0] <== switcher[i].outL; + hasher[i].inputs[1] <== switcher[i].outR; + } + + root <== hasher[levels - 1].out; +} + +// Main Circuit: Compressed Account Merkle Proof Verification +// Computes compressed account hash and verifies it exists in a Merkle tree +template CompressedAccountMerkleProof(levels) { + // Compressed account inputs + signal input owner_hashed; + signal input leaf_index; + signal input merkle_tree_hashed; + signal input discriminator; + signal input data_hash; + + // Merkle proof inputs + signal input pathElements[levels]; + signal input expectedRoot; + + // Step 1: Compute compressed account hash + component accountHasher = CompressedAccountHash(); + accountHasher.owner_hashed <== owner_hashed; + accountHasher.leaf_index <== leaf_index; + accountHasher.merkle_tree_hashed <== merkle_tree_hashed; + accountHasher.discriminator <== discriminator; + accountHasher.data_hash <== data_hash; + + // Step 2: Verify Merkle proof + component merkleProof = MerkleProof(levels); + merkleProof.leaf <== accountHasher.hash; + merkleProof.pathElements <== pathElements; + merkleProof.leafIndex <== leaf_index; + + // Step 3: CRITICAL CONSTRAINT - Enforce that computed root MUST equal expected root + // This === operator adds a constraint that will fail witness generation if roots don't match + merkleProof.root === expectedRoot; +} + +// Main component with 26 levels (typical for Solana state trees) +component main { + public [ + owner_hashed, + merkle_tree_hashed, + discriminator, + data_hash, + expectedRoot + ] +} = CompressedAccountMerkleProof(26); diff --git a/lowlevel/package-lock.json b/lowlevel/package-lock.json new file mode 100644 index 0000000..beab94f --- /dev/null +++ b/lowlevel/package-lock.json @@ -0,0 +1,3086 @@ +{ + "name": "lowlevel-zk-circuits", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "lowlevel-zk-circuits", + "version": "1.0.0", + "dependencies": { + "circomlib": "2.0.5", + "circomlibjs": "0.1.7" + }, + "devDependencies": { + "@types/chai": "^4.3.4", + "@types/mocha": "^10.0.1", + "chai": "^4.3.7", + "circom_tester": "^0.0.19", + "mocha": "^10.8.2", + "snarkjs": "^0.7.0", + "typescript": "^5.0.4" + } + }, + "node_modules/@ethersproject/abi": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.8.0.tgz", + "integrity": "sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.8.0.tgz", + "integrity": "sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/networks": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/web": "^5.8.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.8.0.tgz", + "integrity": "sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.8.0.tgz", + "integrity": "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/rlp": "^5.8.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.8.0.tgz", + "integrity": "sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0" + } + }, + "node_modules/@ethersproject/basex": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.8.0.tgz", + "integrity": "sha512-PIgTszMlDRmNwW9nhS6iqtVfdTAKosA7llYXNmGPw4YAI1PUyMv28988wAb41/gHF/WqGdoLv0erHaRcHRKW2Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/properties": "^5.8.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.8.0.tgz", + "integrity": "sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz", + "integrity": "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.8.0.tgz", + "integrity": "sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0" + } + }, + "node_modules/@ethersproject/contracts": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.8.0.tgz", + "integrity": "sha512-0eFjGz9GtuAi6MZwhb4uvUM216F38xiuR0yYCjKJpNfSEy4HUM8hvqqBj9Jmm0IUz8l0xKEhWwLIhPgxNY0yvQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abi": "^5.8.0", + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/transactions": "^5.8.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.8.0.tgz", + "integrity": "sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/hdnode": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.8.0.tgz", + "integrity": "sha512-4bK1VF6E83/3/Im0ERnnUeWOY3P1BZml4ZD3wcH8Ys0/d1h1xaFt6Zc+Dh9zXf9TapGro0T4wvO71UTCp3/uoA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/basex": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/pbkdf2": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/sha2": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0", + "@ethersproject/strings": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/wordlists": "^5.8.0" + } + }, + "node_modules/@ethersproject/json-wallets": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.8.0.tgz", + "integrity": "sha512-HxblNck8FVUtNxS3VTEYJAcwiKYsBIF77W15HufqlBF9gGfhmYOJtYZp8fSDZtn9y5EaXTE87zDwzxRoTFk11w==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/hdnode": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/pbkdf2": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/random": "^5.8.0", + "@ethersproject/strings": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.8.0.tgz", + "integrity": "sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz", + "integrity": "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT" + }, + "node_modules/@ethersproject/networks": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.8.0.tgz", + "integrity": "sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/pbkdf2": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.8.0.tgz", + "integrity": "sha512-wuHiv97BrzCmfEaPbUFpMjlVg/IDkZThp9Ri88BpjRleg4iePJaj2SW8AIyE8cXn5V1tuAaMj6lzvsGJkGWskg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/sha2": "^5.8.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.8.0.tgz", + "integrity": "sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/providers": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.8.0.tgz", + "integrity": "sha512-3Il3oTzEx3o6kzcg9ZzbE+oCZYyY+3Zh83sKkn4s1DZfTUjIegHnN2Cm0kbn9YFy45FDVcuCLLONhU7ny0SsCw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/base64": "^5.8.0", + "@ethersproject/basex": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/networks": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/random": "^5.8.0", + "@ethersproject/rlp": "^5.8.0", + "@ethersproject/sha2": "^5.8.0", + "@ethersproject/strings": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/web": "^5.8.0", + "bech32": "1.1.4", + "ws": "8.18.0" + } + }, + "node_modules/@ethersproject/random": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.8.0.tgz", + "integrity": "sha512-E4I5TDl7SVqyg4/kkA/qTfuLWAQGXmSOgYyO01So8hLfwgKvYK5snIlzxJMk72IFdG/7oh8yuSqY2KX7MMwg+A==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.8.0.tgz", + "integrity": "sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/sha2": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.8.0.tgz", + "integrity": "sha512-dDOUrXr9wF/YFltgTBYS0tKslPEKr6AekjqDW2dbn1L1xmjGR+9GiKu4ajxovnrDbwxAKdHjW8jNcwfz8PAz4A==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.8.0.tgz", + "integrity": "sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "bn.js": "^5.2.1", + "elliptic": "6.6.1", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/solidity": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.8.0.tgz", + "integrity": "sha512-4CxFeCgmIWamOHwYN9d+QWGxye9qQLilpgTU0XhYs1OahkclF+ewO+3V1U0mvpiuQxm5EHHmv8f7ClVII8EHsA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/sha2": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz", + "integrity": "sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.8.0.tgz", + "integrity": "sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/rlp": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0" + } + }, + "node_modules/@ethersproject/units": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.8.0.tgz", + "integrity": "sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/wallet": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.8.0.tgz", + "integrity": "sha512-G+jnzmgg6UxurVKRKvw27h0kvG75YKXZKdlLYmAHeF32TGUzHkOFd7Zn6QHOTYRFWnfjtSSFjBowKo7vfrXzPA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/hdnode": "^5.8.0", + "@ethersproject/json-wallets": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/random": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/wordlists": "^5.8.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.8.0.tgz", + "integrity": "sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/wordlists": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.8.0.tgz", + "integrity": "sha512-2df9bbXicZws2Sb5S6ET493uJ0Z84Fjr3pC4tu/qlnZERibZCeUVuqdtt+7Tv9xxhUxHoIekIA7avrKUWHrezg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@iden3/bigarray": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@iden3/bigarray/-/bigarray-0.0.2.tgz", + "integrity": "sha512-Xzdyxqm1bOFF6pdIsiHLLl3HkSLjbhqJHVyqaTxXt3RqXBEnmsUmEW47H7VOi/ak7TdkRpNkxjyK5Zbkm+y52g==", + "dev": true, + "license": "GPL-3.0" + }, + "node_modules/@iden3/binfileutils": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/@iden3/binfileutils/-/binfileutils-0.0.11.tgz", + "integrity": "sha512-LylnJoZ0CTdgErnKY8OxohvW4K+p6UHD3sxt+3P9AmMyBQjYR4IpoqoYZZ+9aMj89cmCQ21UvdhndAx04er3NA==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "fastfile": "0.0.20", + "ffjavascript": "^0.2.48" + } + }, + "node_modules/@types/chai": { + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mocha": { + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", + "license": "MIT" + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/b4a": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz", + "integrity": "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q==", + "license": "Apache-2.0", + "peerDependencies": { + "react-native-b4a": "*" + }, + "peerDependenciesMeta": { + "react-native-b4a": { + "optional": true + } + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", + "license": "MIT" + }, + "node_modules/bfj": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/bfj/-/bfj-7.1.0.tgz", + "integrity": "sha512-I6MMLkn+anzNdCUp9hMRyui1HaNEUCco50lxbvNS4+EyXg8lN3nJ48PjPWtbH8UVS9CuMoaKE9U2V3l29DaRQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bluebird": "^3.7.2", + "check-types": "^11.2.3", + "hoopy": "^0.1.4", + "jsonpath": "^1.1.1", + "tryer": "^1.0.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/blake-hash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/blake-hash/-/blake-hash-2.0.0.tgz", + "integrity": "sha512-Igj8YowDu1PRkRsxZA7NVkdFNxH5rKv5cpLxQ0CVXSIA77pVYwCPRQJ2sMew/oneUpfuYRyjG6r8SmmmnbZb1w==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.2", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/blake2b": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.4.tgz", + "integrity": "sha512-AyBuuJNI64gIvwx13qiICz6H6hpmjvYS5DGkG6jbXMOT8Z3WUJ3V1X0FlhIoT1b/5JtHE3ki+xjtMvu1nn+t9A==", + "license": "ISC", + "dependencies": { + "blake2b-wasm": "^2.4.0", + "nanoassert": "^2.0.0" + } + }, + "node_modules/blake2b-wasm": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-2.4.0.tgz", + "integrity": "sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w==", + "license": "MIT", + "dependencies": { + "b4a": "^1.0.1", + "nanoassert": "^2.0.0" + } + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/bn.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", + "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "license": "MIT" + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/check-types": { + "version": "11.2.3", + "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.2.3.tgz", + "integrity": "sha512-+67P1GkJRaxQD6PKK0Et9DhwQB+vGg3PM5+aavopCpZT1lj9jeqfvpgTLAWErNj8qApkkmXlu/Ug74kmhagkXg==", + "dev": true, + "license": "MIT" + }, + "node_modules/child_process": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/child_process/-/child_process-1.0.2.tgz", + "integrity": "sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g==", + "dev": true, + "license": "ISC" + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/circom_runtime": { + "version": "0.1.28", + "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.28.tgz", + "integrity": "sha512-ACagpQ7zBRLKDl5xRZ4KpmYIcZDUjOiNRuxvXLqhnnlLSVY1Dbvh73TI853nqoR0oEbihtWmMSjgc5f+pXf/jQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "ffjavascript": "0.3.1" + }, + "bin": { + "calcwit": "calcwit.js" + } + }, + "node_modules/circom_runtime/node_modules/ffjavascript": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.1.tgz", + "integrity": "sha512-4PbK1WYodQtuF47D4pRI5KUg3Q392vuP5WjE1THSnceHdXwU3ijaoS0OqxTzLknCtz4Z2TtABzkBdBdMn3B/Aw==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.2", + "web-worker": "1.2.0" + } + }, + "node_modules/circom_tester": { + "version": "0.0.19", + "resolved": "https://registry.npmjs.org/circom_tester/-/circom_tester-0.0.19.tgz", + "integrity": "sha512-SNHaBsGxcBH6XsVWfsRbRPA7NF8m8AMKJI9dtJJCFGUtOTT2+zsoIqAwi50z6XCnO4TtjyXq7AeXa1PLHqT0tw==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "chai": "^4.3.6", + "child_process": "^1.0.2", + "ffjavascript": "^0.2.56", + "fnv-plus": "^1.3.1", + "r1csfile": "^0.0.41", + "snarkjs": "0.5.0", + "tmp-promise": "^3.0.3", + "util": "^0.12.4" + } + }, + "node_modules/circom_tester/node_modules/circom_runtime": { + "version": "0.1.21", + "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.21.tgz", + "integrity": "sha512-qTkud630B/GK8y76hnOaaS1aNuF6prfV0dTrkeRsiJKnlP1ryQbP2FWLgDOPqn6aKyaPlam+Z+DTbBhkEzh8dA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "ffjavascript": "0.2.56" + }, + "bin": { + "calcwit": "calcwit.js" + } + }, + "node_modules/circom_tester/node_modules/ffjavascript": { + "version": "0.2.56", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.56.tgz", + "integrity": "sha512-em6G5Lrj7ucIqj4TYEgyoHs/j99Urwwqa4+YxEVY2hggnpRimVj+noX5pZQTxI1pvtiekZI4rG65JBf0xraXrg==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.0", + "web-worker": "^1.2.0" + } + }, + "node_modules/circom_tester/node_modules/snarkjs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.5.0.tgz", + "integrity": "sha512-KWz8mZ2Y+6wvn6GGkQo6/ZlKwETdAGohd40Lzpwp5TUZCn6N6O4Az1SuX1rw/qREGL6Im+ycb19suCFE8/xaKA==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "@iden3/binfileutils": "0.0.11", + "bfj": "^7.0.2", + "blake2b-wasm": "^2.4.0", + "circom_runtime": "0.1.21", + "ejs": "^3.1.6", + "fastfile": "0.0.20", + "ffjavascript": "0.2.56", + "js-sha3": "^0.8.0", + "logplease": "^1.2.15", + "r1csfile": "0.0.41" + }, + "bin": { + "snarkjs": "build/cli.cjs" + } + }, + "node_modules/circom_tester/node_modules/wasmcurves": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.0.tgz", + "integrity": "sha512-3e2rbxdujOwaod657gxgmdhZNn+i1qKdHO3Y/bK+8E7bV8ttV/fu5FO4/WLBACF375cK0QDLOP+65Na63qYuWA==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16" + } + }, + "node_modules/circomlib": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/circomlib/-/circomlib-2.0.5.tgz", + "integrity": "sha512-O7NQ8OS+J4eshBuoy36z/TwQU0YHw8W3zxZcs4hVwpEll3e4hDm3mgkIPqItN8FDeLEKZFK3YeT/+k8TiLF3/A==", + "license": "GPL-3.0" + }, + "node_modules/circomlibjs": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/circomlibjs/-/circomlibjs-0.1.7.tgz", + "integrity": "sha512-GRAUoAlKAsiiTa+PA725G9RmEmJJRc8tRFxw/zKktUxlQISGznT4hH4ESvW8FNTsrGg/nNd06sGP/Wlx0LUHVg==", + "license": "GPL-3.0", + "dependencies": { + "blake-hash": "^2.0.0", + "blake2b": "^2.1.3", + "ethers": "^5.5.1", + "ffjavascript": "^0.2.45" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esprima": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", + "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ethers": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.8.0.tgz", + "integrity": "sha512-DUq+7fHrCg1aPDFCHx6UIPb3nmt2XMpM7Y/g2gLhsl3lIBqeAfOJIl1qEvRf2uq3BiKxmh6Fh5pfp2ieyek7Kg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abi": "5.8.0", + "@ethersproject/abstract-provider": "5.8.0", + "@ethersproject/abstract-signer": "5.8.0", + "@ethersproject/address": "5.8.0", + "@ethersproject/base64": "5.8.0", + "@ethersproject/basex": "5.8.0", + "@ethersproject/bignumber": "5.8.0", + "@ethersproject/bytes": "5.8.0", + "@ethersproject/constants": "5.8.0", + "@ethersproject/contracts": "5.8.0", + "@ethersproject/hash": "5.8.0", + "@ethersproject/hdnode": "5.8.0", + "@ethersproject/json-wallets": "5.8.0", + "@ethersproject/keccak256": "5.8.0", + "@ethersproject/logger": "5.8.0", + "@ethersproject/networks": "5.8.0", + "@ethersproject/pbkdf2": "5.8.0", + "@ethersproject/properties": "5.8.0", + "@ethersproject/providers": "5.8.0", + "@ethersproject/random": "5.8.0", + "@ethersproject/rlp": "5.8.0", + "@ethersproject/sha2": "5.8.0", + "@ethersproject/signing-key": "5.8.0", + "@ethersproject/solidity": "5.8.0", + "@ethersproject/strings": "5.8.0", + "@ethersproject/transactions": "5.8.0", + "@ethersproject/units": "5.8.0", + "@ethersproject/wallet": "5.8.0", + "@ethersproject/web": "5.8.0", + "@ethersproject/wordlists": "5.8.0" + } + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastfile": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/fastfile/-/fastfile-0.0.20.tgz", + "integrity": "sha512-r5ZDbgImvVWCP0lA/cGNgQcZqR+aYdFx3u+CtJqUE510pBUVGMn4ulL/iRTI4tACTYsNJ736uzFxEBXesPAktA==", + "dev": true, + "license": "GPL-3.0" + }, + "node_modules/ffjavascript": { + "version": "0.2.63", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.63.tgz", + "integrity": "sha512-dBgdsfGks58b66JnUZeZpGxdMIDQ4QsD3VYlRJyFVrKQHb2kJy4R2gufx5oetrTxXPT+aEjg0dOvOLg1N0on4A==", + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.2", + "web-worker": "1.2.0" + } + }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fnv-plus": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/fnv-plus/-/fnv-plus-1.3.1.tgz", + "integrity": "sha512-Gz1EvfOneuFfk4yG458dJ3TLJ7gV19q3OM/vVvvHf7eT02Hm1DleB4edsia6ahbKgAYxO9gvyQ1ioWZR+a00Yw==", + "dev": true, + "license": "MIT" + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/hoopy": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", + "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/is-arguments": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", + "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jake": { + "version": "10.9.4", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", + "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.6", + "filelist": "^1.0.4", + "picocolors": "^1.1.1" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsonpath": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz", + "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==", + "dev": true, + "license": "MIT", + "dependencies": { + "esprima": "1.2.2", + "static-eval": "2.0.2", + "underscore": "1.12.1" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/logplease": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/logplease/-/logplease-1.2.15.tgz", + "integrity": "sha512-jLlHnlsPSJjpwUfcNyUxXCl33AYg2cHhIf9QhGL2T4iPT0XPB+xP1LRKFPgIg1M/sg9kAJvy94w9CzBNrfnstA==", + "dev": true, + "license": "MIT" + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoassert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-2.0.0.tgz", + "integrity": "sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==", + "license": "ISC" + }, + "node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "license": "MIT" + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/r1csfile": { + "version": "0.0.41", + "resolved": "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.41.tgz", + "integrity": "sha512-Q1WDF3u1vYeAwjHo4YuddkA8Aq0TulbKjmGm99+Atn13Lf5fTsMZBnBV9T741w8iSyPFG6Uh6sapQby77sREqA==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "@iden3/bigarray": "0.0.2", + "@iden3/binfileutils": "0.0.11", + "fastfile": "0.0.20", + "ffjavascript": "0.2.56" + } + }, + "node_modules/r1csfile/node_modules/ffjavascript": { + "version": "0.2.56", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.56.tgz", + "integrity": "sha512-em6G5Lrj7ucIqj4TYEgyoHs/j99Urwwqa4+YxEVY2hggnpRimVj+noX5pZQTxI1pvtiekZI4rG65JBf0xraXrg==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.0", + "web-worker": "^1.2.0" + } + }, + "node_modules/r1csfile/node_modules/wasmcurves": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.0.tgz", + "integrity": "sha512-3e2rbxdujOwaod657gxgmdhZNn+i1qKdHO3Y/bK+8E7bV8ttV/fu5FO4/WLBACF375cK0QDLOP+65Na63qYuWA==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "license": "MIT" + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/snarkjs": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.7.5.tgz", + "integrity": "sha512-h+3c4rXZKLhLuHk4LHydZCk/h5GcNvk5GjVKRRkHmfb6Ntf8gHOA9zea3g656iclRuhqQ3iKDWFgiD9ypLrKiA==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "@iden3/binfileutils": "0.0.12", + "bfj": "^7.0.2", + "blake2b-wasm": "^2.4.0", + "circom_runtime": "0.1.28", + "ejs": "^3.1.6", + "fastfile": "0.0.20", + "ffjavascript": "0.3.1", + "js-sha3": "^0.8.0", + "logplease": "^1.2.15", + "r1csfile": "0.0.48" + }, + "bin": { + "snarkjs": "build/cli.cjs" + } + }, + "node_modules/snarkjs/node_modules/@iden3/binfileutils": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@iden3/binfileutils/-/binfileutils-0.0.12.tgz", + "integrity": "sha512-naAmzuDufRIcoNfQ1d99d7hGHufLA3wZSibtr4dMe6ZeiOPV1KwOZWTJ1YVz4HbaWlpDuzVU72dS4ATQS4PXBQ==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "fastfile": "0.0.20", + "ffjavascript": "^0.3.0" + } + }, + "node_modules/snarkjs/node_modules/ffjavascript": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.1.tgz", + "integrity": "sha512-4PbK1WYodQtuF47D4pRI5KUg3Q392vuP5WjE1THSnceHdXwU3ijaoS0OqxTzLknCtz4Z2TtABzkBdBdMn3B/Aw==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.2", + "web-worker": "1.2.0" + } + }, + "node_modules/snarkjs/node_modules/r1csfile": { + "version": "0.0.48", + "resolved": "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.48.tgz", + "integrity": "sha512-kHRkKUJNaor31l05f2+RFzvcH5XSa7OfEfd/l4hzjte6NL6fjRkSMfZ4BjySW9wmfdwPOtq3mXurzPvPGEf5Tw==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "@iden3/bigarray": "0.0.2", + "@iden3/binfileutils": "0.0.12", + "fastfile": "0.0.20", + "ffjavascript": "0.3.0" + } + }, + "node_modules/snarkjs/node_modules/r1csfile/node_modules/ffjavascript": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.0.tgz", + "integrity": "sha512-l7sR5kmU3gRwDy8g0Z2tYBXy5ttmafRPFOqY7S6af5cq51JqJWt5eQ/lSR/rs2wQNbDYaYlQr5O+OSUf/oMLoQ==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.2", + "web-worker": "1.2.0" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-eval": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", + "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escodegen": "^1.8.1" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/tmp": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", + "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.14" + } + }, + "node_modules/tmp-promise": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz", + "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tmp": "^0.2.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tryer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", + "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", + "dev": true, + "license": "MIT" + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==", + "dev": true, + "license": "MIT" + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/wasmbuilder": { + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/wasmbuilder/-/wasmbuilder-0.0.16.tgz", + "integrity": "sha512-Qx3lEFqaVvp1cEYW7Bfi+ebRJrOiwz2Ieu7ZG2l7YyeSJIok/reEQCQCuicj/Y32ITIJuGIM9xZQppGx5LrQdA==", + "license": "GPL-3.0" + }, + "node_modules/wasmcurves": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.2.tgz", + "integrity": "sha512-JRY908NkmKjFl4ytnTu5ED6AwPD+8VJ9oc94kdq7h5bIwbj0L4TDJ69mG+2aLs2SoCmGfqIesMWTEJjtYsoQXQ==", + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16" + } + }, + "node_modules/web-worker": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz", + "integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==", + "license": "Apache-2.0" + }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/workerpool": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/lowlevel/package.json b/lowlevel/package.json new file mode 100644 index 0000000..1b53fe0 --- /dev/null +++ b/lowlevel/package.json @@ -0,0 +1,28 @@ +{ + "name": "lowlevel-zk-circuits", + "version": "1.0.0", + "description": "ZK circuits for compressed account Merkle proof verification", + "main": "index.js", + "scripts": { + "setup": "./scripts/setup.sh", + "clean": "./scripts/clean.sh", + "compile": "circom circuits/compressed_account_merkle_proof.circom --r1cs --wasm --sym -o build", + "generate-zkey": "snarkjs groth16 setup build/compressed_account_merkle_proof.r1cs pot/powersOfTau28_hez_final_16.ptau build/circuit_0000.zkey", + "contribute": "snarkjs zkey contribute build/circuit_0000.zkey build/circuit_final.zkey --name='First contribution' -v", + "export-vkey": "snarkjs zkey export verificationkey build/circuit_final.zkey build/verification_key.json", + "test": "mocha test/**/*.test.js --timeout 100000" + }, + "dependencies": { + "circomlib": "2.0.5", + "circomlibjs": "0.1.7" + }, + "devDependencies": { + "@types/chai": "^4.3.4", + "@types/mocha": "^10.0.1", + "chai": "^4.3.7", + "circom_tester": "^0.0.19", + "mocha": "^10.8.2", + "snarkjs": "^0.7.0", + "typescript": "^5.0.4" + } +} diff --git a/lowlevel/scripts/clean.sh b/lowlevel/scripts/clean.sh new file mode 100755 index 0000000..ce9e7e2 --- /dev/null +++ b/lowlevel/scripts/clean.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +# Colors for output +GREEN='\033[0;32m' +BLUE='\033[0;34m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +# Get the directory where this script is located +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$(dirname "$SCRIPT_DIR")" + +cd "$PROJECT_DIR" + +echo -e "${BLUE}Cleaning ZK circuit build artifacts...${NC}" +echo "" + +# Remove build directory +if [ -d "build" ]; then + echo -e "${YELLOW}Removing build directory...${NC}" + rm -rf build + echo -e "${GREEN}✓${NC} build/ removed" +fi + +# Remove node_modules (optional, uncomment if needed) +# if [ -d "node_modules" ]; then +# echo -e "${YELLOW}Removing node_modules...${NC}" +# rm -rf node_modules +# echo -e "${GREEN}✓${NC} node_modules/ removed" +# fi + +# Remove Powers of Tau (optional, keeps by default since it's reusable) +# if [ -d "pot" ]; then +# echo -e "${YELLOW}Removing Powers of Tau...${NC}" +# rm -rf pot +# echo -e "${GREEN}✓${NC} pot/ removed" +# fi + +# Remove individual circuit artifacts if they exist +if [ -f "compressed_account_merkle_proof.r1cs" ]; then + rm compressed_account_merkle_proof.r1cs + echo -e "${GREEN}✓${NC} Removed .r1cs file" +fi + +if [ -f "compressed_account_merkle_proof.sym" ]; then + rm compressed_account_merkle_proof.sym + echo -e "${GREEN}✓${NC} Removed .sym file" +fi + +if [ -f "compressed_account_merkle_proof.wasm" ]; then + rm compressed_account_merkle_proof.wasm + echo -e "${GREEN}✓${NC} Removed .wasm file" +fi + +echo "" +echo -e "${GREEN}Cleanup complete!${NC}" +echo "" +echo "To rebuild the circuit, run: ${BLUE}./scripts/setup.sh${NC}" +echo "" diff --git a/lowlevel/scripts/setup.sh b/lowlevel/scripts/setup.sh new file mode 100755 index 0000000..0f986d3 --- /dev/null +++ b/lowlevel/scripts/setup.sh @@ -0,0 +1,170 @@ +#!/bin/bash +set -e + +# Colors for output +GREEN='\033[0;32m' +BLUE='\033[0;34m' +YELLOW='\033[1;33m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +echo -e "${BLUE}======================================${NC}" +echo -e "${BLUE}ZK Circuit Setup Script${NC}" +echo -e "${BLUE}======================================${NC}" +echo "" + +# Get the directory where this script is located +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$(dirname "$SCRIPT_DIR")" + +cd "$PROJECT_DIR" + +# Check if node and npm are installed +echo -e "${BLUE}[1/7]${NC} Checking dependencies..." +if ! command -v node &> /dev/null; then + echo -e "${RED}Error: Node.js is not installed${NC}" + echo "Please install Node.js from https://nodejs.org/" + exit 1 +fi + +if ! command -v npm &> /dev/null; then + echo -e "${RED}Error: npm is not installed${NC}" + exit 1 +fi + +if ! command -v circom &> /dev/null; then + echo -e "${YELLOW}Warning: circom is not installed${NC}" + echo "Installing circom..." + # Try to install circom via npm + npm install -g circom + if ! command -v circom &> /dev/null; then + echo -e "${RED}Error: Failed to install circom${NC}" + echo "Please install manually from https://docs.circom.io/getting-started/installation/" + exit 1 + fi +fi + +echo -e "${GREEN}✓${NC} All required tools are installed" +echo "" + +# Install npm dependencies +echo -e "${BLUE}[2/7]${NC} Installing npm dependencies..." +npm install +echo -e "${GREEN}✓${NC} Dependencies installed" +echo "" + +# Create necessary directories +echo -e "${BLUE}[3/7]${NC} Creating build directories..." +mkdir -p pot +mkdir -p build +echo -e "${GREEN}✓${NC} Directories created" +echo "" + +# Download Powers of Tau +echo -e "${BLUE}[4/7]${NC} Downloading Powers of Tau ceremony file..." +PTAU_FILE="pot/powersOfTau28_hez_final_16.ptau" + +if [ -f "$PTAU_FILE" ]; then + echo -e "${YELLOW}Powers of Tau file already exists, skipping download${NC}" +else + echo "Downloading from Hermez ceremony (this may take a few minutes)..." + curl -L -o "$PTAU_FILE" \ + https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final_16.ptau + + if [ $? -eq 0 ]; then + echo -e "${GREEN}✓${NC} Powers of Tau downloaded successfully" + else + echo -e "${RED}Error: Failed to download Powers of Tau${NC}" + echo "Please download manually from:" + echo "https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final_16.ptau" + exit 1 + fi +fi +echo "" + +# Compile the circuit +echo -e "${BLUE}[5/7]${NC} Compiling circom circuit..." +echo "This may take several minutes depending on circuit complexity..." +circom circuits/compressed_account_merkle_proof.circom \ + --r1cs \ + --wasm \ + --sym \ + --verbose \ + -o build + +if [ $? -eq 0 ]; then + echo -e "${GREEN}✓${NC} Circuit compiled successfully" + echo " - Generated: build/compressed_account_merkle_proof.r1cs" + echo " - Generated: build/compressed_account_merkle_proof.wasm" + echo " - Generated: build/compressed_account_merkle_proof.sym" +else + echo -e "${RED}Error: Circuit compilation failed${NC}" + exit 1 +fi +echo "" + +# Generate the initial zkey +echo -e "${BLUE}[6/7]${NC} Generating proving key (zkey)..." +echo "Running Groth16 setup (this may take several minutes)..." +npx snarkjs groth16 setup \ + build/compressed_account_merkle_proof.r1cs \ + "$PTAU_FILE" \ + build/circuit_0000.zkey + +if [ $? -eq 0 ]; then + echo -e "${GREEN}✓${NC} Initial zkey generated" +else + echo -e "${RED}Error: zkey generation failed${NC}" + exit 1 +fi + +# Contribute to the ceremony +echo "" +echo "Contributing to the ceremony..." +npx snarkjs zkey contribute \ + build/circuit_0000.zkey \ + build/compressed_account_merkle_proof_final.zkey \ + --name="First contribution" \ + -v \ + -e="$(date +%s)" + +if [ $? -eq 0 ]; then + echo -e "${GREEN}✓${NC} Contribution complete" +else + echo -e "${RED}Error: Contribution failed${NC}" + exit 1 +fi +echo "" + +# Export verification key +echo -e "${BLUE}[7/7]${NC} Exporting verification key..." +npx snarkjs zkey export verificationkey \ + build/compressed_account_merkle_proof_final.zkey \ + build/verification_key.json + +if [ $? -eq 0 ]; then + echo -e "${GREEN}✓${NC} Verification key exported to build/verification_key.json" +else + echo -e "${RED}Error: Verification key export failed${NC}" + exit 1 +fi +echo "" + +# Print summary +echo -e "${GREEN}======================================${NC}" +echo -e "${GREEN}Setup Complete!${NC}" +echo -e "${GREEN}======================================${NC}" +echo "" +echo "Generated files:" +echo " - build/compressed_account_merkle_proof.r1cs" +echo " - build/compressed_account_merkle_proof.wasm" +echo " - build/compressed_account_merkle_proof.sym" +echo " - build/compressed_account_merkle_proof_final.zkey" +echo " - build/verification_key.json" +echo "" +echo "Next steps:" +echo " 1. Run Rust tests: ${BLUE}cargo test test_compressed_account_merkle_proof_circuit${NC}" +echo " 2. Generate a proof: Use the circuit with mopro" +echo "" +echo "To clean up build artifacts, run: ${BLUE}./scripts/clean.sh${NC}" +echo "" diff --git a/lowlevel/src/lib.rs b/lowlevel/src/lib.rs index 53cf297..bbfb598 100644 --- a/lowlevel/src/lib.rs +++ b/lowlevel/src/lib.rs @@ -5,12 +5,15 @@ use anchor_lang::{prelude::*, AnchorDeserialize, AnchorSerialize}; use light_compressed_account::instruction_data::with_account_info::{ CompressedAccountInfo, OutAccountInfo, }; +use light_sdk::cpi::v1::CpiAccounts; use light_sdk::{ address::v1::derive_address, - cpi::{CpiAccounts, CpiInputs, CpiSigner}, + cpi::{v2::LightSystemProgramCpi, InvokeLightSystemProgram, LightCpiInstruction}, derive_light_cpi_signer, instruction::{PackedAddressTreeInfo, ValidityProof}, }; +use light_sdk_types::CpiSigner; + declare_id!("HNqStLMpNuNJqhBF1FbGTKHEFbBLJmq8RdJJmZKWz6jH"); pub const LIGHT_CPI_SIGNER: CpiSigner = @@ -53,15 +56,15 @@ pub mod lowlevel { &address_pubkey, &crate::ID, ); - // get root for input Merkle tree - let input_root = read_merkle_tree_root(&ctx.accounts.input_merkle_tree, input_root_index)?; - msg!("Input merkle tree root: {:?}", input_root); + // Get root from input Merkle tree (example of reading on-chain state) + let _input_root = read_merkle_tree_root(&ctx.accounts.input_merkle_tree, input_root_index)?; + // Create output compressed account using low-level CompressedAccountInfo let output_account = CompressedAccountInfo { address: None, input: None, output: Some(OutAccountInfo { - discriminator: 1u64.to_le_bytes(), // doesn't really matter as long as you only have one type of compressed account. + discriminator: 1u64.to_le_bytes(), output_merkle_tree_index: output_state_tree_index, lamports: 0, data: encrypted_utxo, @@ -69,17 +72,15 @@ pub mod lowlevel { }), }; - // Create 1 output compressed account without address - // Create 1 address without compressed account - let cpi_inputs = CpiInputs::new_with_address( - proof, - vec![output_account], - vec![address_tree_info.into_new_address_params_packed(address_seed)], - ); - - cpi_inputs - .invoke_light_system_program(light_cpi_accounts) - .map_err(ProgramError::from)?; + // Use new CPI builder pattern: + // - Creates 1 output compressed account without address + // - Creates 1 address without compressed account + LightSystemProgramCpi::new_cpi(LIGHT_CPI_SIGNER, proof) + .with_account_infos(&[output_account]) + .with_new_addresses(&[ + address_tree_info.into_new_address_params_assigned_packed(address_seed, None) + ]) + .invoke(light_cpi_accounts)?; Ok(()) } diff --git a/lowlevel/tests/circuit.rs b/lowlevel/tests/circuit.rs new file mode 100644 index 0000000..2aa974a --- /dev/null +++ b/lowlevel/tests/circuit.rs @@ -0,0 +1,203 @@ +use circom_prover::{prover::ProofLib, witness::WitnessFn, CircomProver}; +use light_compressed_account::compressed_account::{CompressedAccount, CompressedAccountData}; +use light_compressed_account::Pubkey; +use light_hasher::{hash_to_field_size::hash_to_bn254_field_size_be, Poseidon}; +use light_merkle_tree_reference::MerkleTree; +use num_bigint::BigUint; +use std::collections::HashMap; + +// Link the generated witness library +#[link(name = "circuit", kind = "static")] +extern "C" {} + +rust_witness::witness!(compressedaccountmerkleproof); + +/// Helper function to add compressed account inputs to the circuit inputs HashMap +/// +/// # Arguments +/// * `inputs` - Mutable reference to the HashMap that will be populated with circuit inputs +/// * `compressed_account` - The compressed account to convert to circuit inputs +/// * `merkle_tree_pubkey` - The public key of the Merkle tree +/// * `leaf_index` - The index of the leaf in the Merkle tree +fn add_compressed_account_to_circuit_inputs( + inputs: &mut HashMap>, + compressed_account: &CompressedAccount, + merkle_tree_pubkey: &Pubkey, + leaf_index: u32, +) { + // Extract data from compressed account + let owner = compressed_account.owner; + let (discriminator, data_hash) = if let Some(ref data) = compressed_account.data { + (data.discriminator, data.data_hash) + } else { + ([0u8; 8], [0u8; 32]) + }; + + // Hash owner and merkle tree pubkey for circuit - the circuit expects hashed values + let owner_hashed = hash_to_bn254_field_size_be(owner.as_ref()); + let merkle_tree_hashed = hash_to_bn254_field_size_be(merkle_tree_pubkey.as_ref()); + + // Add all compressed account inputs to the HashMap + inputs.insert( + "owner_hashed".to_string(), + vec![BigUint::from_bytes_be(&owner_hashed).to_string()], + ); + inputs.insert("leaf_index".to_string(), vec![leaf_index.to_string()]); + inputs.insert( + "merkle_tree_hashed".to_string(), + vec![BigUint::from_bytes_be(&merkle_tree_hashed).to_string()], + ); + inputs.insert( + "discriminator".to_string(), + vec![BigUint::from_bytes_be(&discriminator).to_string()], + ); + inputs.insert( + "data_hash".to_string(), + vec![BigUint::from_bytes_be(&data_hash).to_string()], + ); +} + +/// Helper function to add Merkle proof inputs to the circuit inputs HashMap +/// +/// # Arguments +/// * `inputs` - Mutable reference to the HashMap that will be populated with circuit inputs +/// * `merkle_proof_hashes` - Vector of Merkle proof path elements (32-byte hashes) +/// * `merkle_root` - The expected Merkle root (32-byte hash) +fn add_merkle_proof_to_circuit_inputs( + inputs: &mut HashMap>, + merkle_proof_hashes: &[[u8; 32]], + merkle_root: &[u8; 32], +) { + // Convert Merkle proof path elements to BigUint strings + let path_elements: Vec = merkle_proof_hashes + .iter() + .map(|hash| BigUint::from_bytes_be(hash).to_string()) + .collect(); + inputs.insert("pathElements".to_string(), path_elements); + + // Convert expected root to BigUint string + let expected_root_bigint = BigUint::from_bytes_be(merkle_root); + inputs.insert( + "expectedRoot".to_string(), + vec![expected_root_bigint.to_string()], + ); +} + +#[test] +fn test_compressed_account_merkle_proof_circuit() { + let zkey_path = "./build/compressed_account_merkle_proof_final.zkey".to_string(); + + // Create compressed account + let owner = Pubkey::new_from_array([1u8; 32]); + let merkle_tree_pubkey = Pubkey::new_from_array([2u8; 32]); + let leaf_index: u32 = 0; + + let compressed_account = CompressedAccount { + owner, + lamports: 0, + address: None, + data: Some(CompressedAccountData { + discriminator: [1u8; 8], + data: vec![], + data_hash: [3u8; 32], + }), + }; + + // Create Merkle tree and get proof + let compressed_account_hash = compressed_account + .hash(&merkle_tree_pubkey, &leaf_index, false) + .unwrap(); + + let mut merkle_tree = MerkleTree::::new(26, 0); + merkle_tree.append(&compressed_account_hash).unwrap(); + + let merkle_proof_hashes = merkle_tree + .get_proof_of_leaf(leaf_index as usize, false) + .unwrap(); + let merkle_root = merkle_tree.root(); + + // Build circuit inputs + let mut proof_inputs = HashMap::new(); + add_compressed_account_to_circuit_inputs( + &mut proof_inputs, + &compressed_account, + &merkle_tree_pubkey, + leaf_index, + ); + add_merkle_proof_to_circuit_inputs(&mut proof_inputs, &merkle_proof_hashes, &merkle_root); + + // Generate and verify proof + let circuit_inputs = serde_json::to_string(&proof_inputs).unwrap(); + let proof = CircomProver::prove( + ProofLib::Arkworks, + WitnessFn::RustWitness(compressedaccountmerkleproof_witness), + circuit_inputs, + zkey_path.clone(), + ) + .expect("Proof generation failed"); + + let is_valid = CircomProver::verify(ProofLib::Arkworks, proof, zkey_path) + .expect("Proof verification failed"); + + assert!(is_valid, "Proof should be valid"); +} + +#[test] +fn test_invalid_proof_rejected() { + let zkey_path = "./build/compressed_account_merkle_proof_final.zkey".to_string(); + + // Create compressed account + let owner = Pubkey::new_from_array([1u8; 32]); + let merkle_tree_pubkey = Pubkey::new_from_array([2u8; 32]); + let leaf_index: u32 = 0; + + let compressed_account = CompressedAccount { + owner, + lamports: 0, + address: None, + data: Some(CompressedAccountData { + discriminator: [1u8; 8], + data: vec![], + data_hash: [3u8; 32], + }), + }; + + // Create Merkle tree and get proof + let compressed_account_hash = compressed_account + .hash(&merkle_tree_pubkey, &leaf_index, false) + .unwrap(); + + let mut merkle_tree = MerkleTree::::new(26, 0); + merkle_tree.append(&compressed_account_hash).unwrap(); + let merkle_proof_hashes = merkle_tree + .get_proof_of_leaf(leaf_index as usize, false) + .unwrap(); + + // Build circuit inputs with INVALID root + let mut proof_inputs = HashMap::new(); + add_compressed_account_to_circuit_inputs( + &mut proof_inputs, + &compressed_account, + &merkle_tree_pubkey, + leaf_index, + ); + + let invalid_root = [0u8; 32]; + add_merkle_proof_to_circuit_inputs(&mut proof_inputs, &merkle_proof_hashes, &invalid_root); + + // Generate proof (succeeds even with wrong root) + let circuit_inputs = serde_json::to_string(&proof_inputs).unwrap(); + let proof = CircomProver::prove( + ProofLib::Arkworks, + WitnessFn::RustWitness(compressedaccountmerkleproof_witness), + circuit_inputs, + zkey_path.clone(), + ) + .expect("Proof generation should succeed"); + + // Verify proof (should fail due to constraint violation) + let is_valid = CircomProver::verify(ProofLib::Arkworks, proof, zkey_path) + .expect("Verification should return a result"); + + assert!(!is_valid, "Proof should be invalid with wrong root"); +} From e3d313b76ed279f73581f002f52e5c9ea3493aa5 Mon Sep 17 00:00:00 2001 From: ananas Date: Mon, 20 Oct 2025 00:09:21 +0100 Subject: [PATCH 06/14] groth16 solana --- .gitignore | 2 + lowlevel/build.rs | 5 -- {lowlevel => zk-id}/.gitignore | 0 {lowlevel => zk-id}/Cargo.lock | 68 ++++++++++------- {lowlevel => zk-id}/Cargo.toml | 7 +- {lowlevel => zk-id}/README.md | 0 {lowlevel => zk-id}/Xargo.toml | 0 zk-id/build.rs | 28 +++++++ {lowlevel => zk-id}/circuits/README.md | 0 .../compressed_account_merkle_proof.circom | 0 {lowlevel => zk-id}/package-lock.json | 0 {lowlevel => zk-id}/package.json | 0 {lowlevel => zk-id}/scripts/clean.sh | 0 {lowlevel => zk-id}/scripts/setup.sh | 0 {lowlevel => zk-id}/src/lib.rs | 9 ++- zk-id/src/verifying_key.rs | 22 ++++++ {lowlevel => zk-id}/tests/circuit.rs | 75 +++++++++++++++++++ {lowlevel => zk-id}/tests/test.rs | 4 +- 18 files changed, 183 insertions(+), 37 deletions(-) delete mode 100644 lowlevel/build.rs rename {lowlevel => zk-id}/.gitignore (100%) rename {lowlevel => zk-id}/Cargo.lock (99%) rename {lowlevel => zk-id}/Cargo.toml (76%) rename {lowlevel => zk-id}/README.md (100%) rename {lowlevel => zk-id}/Xargo.toml (100%) create mode 100644 zk-id/build.rs rename {lowlevel => zk-id}/circuits/README.md (100%) rename {lowlevel => zk-id}/circuits/compressed_account_merkle_proof.circom (100%) rename {lowlevel => zk-id}/package-lock.json (100%) rename {lowlevel => zk-id}/package.json (100%) rename {lowlevel => zk-id}/scripts/clean.sh (100%) rename {lowlevel => zk-id}/scripts/setup.sh (100%) rename {lowlevel => zk-id}/src/lib.rs (95%) create mode 100644 zk-id/src/verifying_key.rs rename {lowlevel => zk-id}/tests/circuit.rs (72%) rename {lowlevel => zk-id}/tests/test.rs (99%) diff --git a/.gitignore b/.gitignore index ec600c8..2285b20 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ node_modules test-ledger .yarn .claude +build +pot diff --git a/lowlevel/build.rs b/lowlevel/build.rs deleted file mode 100644 index bb32f61..0000000 --- a/lowlevel/build.rs +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - // Transpile the WebAssembly witness generators for Circom circuits - // into a native library for use with circom-prover - rust_witness::transpile::transpile_wasm("./build/compressed_account_merkle_proof_js".to_string()); -} diff --git a/lowlevel/.gitignore b/zk-id/.gitignore similarity index 100% rename from lowlevel/.gitignore rename to zk-id/.gitignore diff --git a/lowlevel/Cargo.lock b/zk-id/Cargo.lock similarity index 99% rename from lowlevel/Cargo.lock rename to zk-id/Cargo.lock index 0de24b5..3f23756 100644 --- a/lowlevel/Cargo.lock +++ b/zk-id/Cargo.lock @@ -1873,6 +1873,23 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "groth16-solana" +version = "0.2.0" +dependencies = [ + "ark-bn254 0.5.0", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-groth16", + "ark-serialize 0.5.0", + "circom-prover", + "num-bigint 0.4.6", + "serde", + "serde_json", + "solana-bn254", + "thiserror 1.0.69", +] + [[package]] name = "groth16-solana" version = "0.2.0" @@ -3253,7 +3270,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85fdf317ec3cfcd3a8e6556a5b5e7fbcc207a40264700f9a5271876838f26f58" dependencies = [ - "groth16-solana", + "groth16-solana 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "light-compressed-account 0.3.0", "thiserror 2.0.17", ] @@ -3264,7 +3281,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26398153a8c0fa61957a9ad046b3a433c401a37e0e0e9c8d42dee097fa76ce65" dependencies = [ - "groth16-solana", + "groth16-solana 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "light-compressed-account 0.5.0", "thiserror 2.0.17", ] @@ -3393,29 +3410,6 @@ version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" -[[package]] -name = "lowlevel" -version = "0.1.0" -dependencies = [ - "account-compression", - "anchor-lang", - "borsh 0.10.4", - "circom-prover", - "light-client", - "light-compressed-account 0.5.0", - "light-concurrent-merkle-tree 2.1.0", - "light-hasher 4.0.0", - "light-merkle-tree-reference 3.0.1", - "light-program-test", - "light-sdk", - "light-sdk-types", - "num-bigint 0.4.6", - "rust-witness", - "serde_json", - "solana-sdk", - "tokio", -] - [[package]] name = "lru-slab" version = "0.1.2" @@ -9115,6 +9109,30 @@ dependencies = [ "syn 2.0.107", ] +[[package]] +name = "zk-id" +version = "0.1.0" +dependencies = [ + "account-compression", + "anchor-lang", + "borsh 0.10.4", + "circom-prover", + "groth16-solana 0.2.0", + "light-client", + "light-compressed-account 0.5.0", + "light-concurrent-merkle-tree 2.1.0", + "light-hasher 4.0.0", + "light-merkle-tree-reference 3.0.1", + "light-program-test", + "light-sdk", + "light-sdk-types", + "num-bigint 0.4.6", + "rust-witness", + "serde_json", + "solana-sdk", + "tokio", +] + [[package]] name = "zstd" version = "0.13.3" diff --git a/lowlevel/Cargo.toml b/zk-id/Cargo.toml similarity index 76% rename from lowlevel/Cargo.toml rename to zk-id/Cargo.toml index 53933ea..abd0f6d 100644 --- a/lowlevel/Cargo.toml +++ b/zk-id/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "lowlevel" +name = "zk-id" version = "0.1.0" edition = "2021" [lib] crate-type = ["cdylib", "lib"] -name = "lowlevel" +name = "zk_id" [features] default = [] @@ -21,6 +21,7 @@ light-compressed-account = {version = "0.5.0"} light-concurrent-merkle-tree = "2" # use cpi feature to avoid custom allocator conflict issues account-compression = { version = "2", features = ["cpi"] } +groth16-solana = { path = "/Users/ananas/dev/groth16-solana" } [dev-dependencies] light-program-test = "0.15.0" @@ -33,6 +34,8 @@ num-bigint = "0.4" serde_json = "1.0" light-merkle-tree-reference = "3.0.0" light-compressed-account = {version = "0.5.0", features = ["new-unique"]} +groth16-solana = { path = "/Users/ananas/dev/groth16-solana", features = ["vk", "circom"] } [build-dependencies] rust-witness = "0.1" +groth16-solana = { path = "/Users/ananas/dev/groth16-solana", features = ["vk"] } diff --git a/lowlevel/README.md b/zk-id/README.md similarity index 100% rename from lowlevel/README.md rename to zk-id/README.md diff --git a/lowlevel/Xargo.toml b/zk-id/Xargo.toml similarity index 100% rename from lowlevel/Xargo.toml rename to zk-id/Xargo.toml diff --git a/zk-id/build.rs b/zk-id/build.rs new file mode 100644 index 0000000..c33643f --- /dev/null +++ b/zk-id/build.rs @@ -0,0 +1,28 @@ +use groth16_solana::vk_parser::generate_vk_file; + +fn main() { + println!("cargo:rerun-if-changed=build/verification_key.json"); + println!("cargo:rerun-if-changed=build/compressed_account_merkle_proof_js"); + + // Generate the verifying key Rust file from the JSON + let vk_json_path = "./build/verification_key.json"; + let output_dir = "./src"; + let output_file = "verifying_key.rs"; + + if std::path::Path::new(vk_json_path).exists() { + generate_vk_file(vk_json_path, output_dir, output_file) + .expect("Failed to generate verifying key Rust file"); + println!("cargo:warning=Generated verifying_key.rs from verification_key.json"); + } else { + println!("cargo:warning=Verification key JSON not found. Run './scripts/setup.sh' first."); + } + + // Transpile the WebAssembly witness generators for Circom circuits + let witness_wasm_dir = "./build/compressed_account_merkle_proof_js"; + if std::path::Path::new(witness_wasm_dir).exists() { + rust_witness::transpile::transpile_wasm(witness_wasm_dir.to_string()); + println!("cargo:warning=Transpiled witness generator"); + } else { + println!("cargo:warning=Witness WASM not found. Run './scripts/setup.sh' first."); + } +} diff --git a/lowlevel/circuits/README.md b/zk-id/circuits/README.md similarity index 100% rename from lowlevel/circuits/README.md rename to zk-id/circuits/README.md diff --git a/lowlevel/circuits/compressed_account_merkle_proof.circom b/zk-id/circuits/compressed_account_merkle_proof.circom similarity index 100% rename from lowlevel/circuits/compressed_account_merkle_proof.circom rename to zk-id/circuits/compressed_account_merkle_proof.circom diff --git a/lowlevel/package-lock.json b/zk-id/package-lock.json similarity index 100% rename from lowlevel/package-lock.json rename to zk-id/package-lock.json diff --git a/lowlevel/package.json b/zk-id/package.json similarity index 100% rename from lowlevel/package.json rename to zk-id/package.json diff --git a/lowlevel/scripts/clean.sh b/zk-id/scripts/clean.sh similarity index 100% rename from lowlevel/scripts/clean.sh rename to zk-id/scripts/clean.sh diff --git a/lowlevel/scripts/setup.sh b/zk-id/scripts/setup.sh similarity index 100% rename from lowlevel/scripts/setup.sh rename to zk-id/scripts/setup.sh diff --git a/lowlevel/src/lib.rs b/zk-id/src/lib.rs similarity index 95% rename from lowlevel/src/lib.rs rename to zk-id/src/lib.rs index bbfb598..bce6459 100644 --- a/lowlevel/src/lib.rs +++ b/zk-id/src/lib.rs @@ -22,8 +22,11 @@ pub const LIGHT_CPI_SIGNER: CpiSigner = pub const FIRST_SEED: &[u8] = b"first"; pub const SECOND_SEED: &[u8] = b"second"; +// Include the generated verifying key module +pub mod verifying_key; + #[program] -pub mod lowlevel { +pub mod zk_id { use super::*; @@ -34,7 +37,7 @@ pub mod lowlevel { address_tree_info: PackedAddressTreeInfo, output_state_tree_index: u8, input_root_index: u16, - encrypted_utxo: Vec, // must be checked by your zkp + encrypted_data: Vec, // must be checked by your zkp output_utxo_hash: [u8; 32], // must be checked by your zkp ) -> Result<()> { let light_cpi_accounts = CpiAccounts::new( @@ -67,7 +70,7 @@ pub mod lowlevel { discriminator: 1u64.to_le_bytes(), output_merkle_tree_index: output_state_tree_index, lamports: 0, - data: encrypted_utxo, + data: encrypted_data, data_hash: output_utxo_hash, }), }; diff --git a/zk-id/src/verifying_key.rs b/zk-id/src/verifying_key.rs new file mode 100644 index 0000000..1583541 --- /dev/null +++ b/zk-id/src/verifying_key.rs @@ -0,0 +1,22 @@ +use groth16_solana::groth16::Groth16Verifyingkey; + +pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey { + nr_pubinputs: 5, + + vk_alpha_g1: [45u8, 77u8, 154u8, 167u8, 227u8, 2u8, 217u8, 223u8, 65u8, 116u8, 157u8, 85u8, 7u8, 148u8, 157u8, 5u8, 219u8, 234u8, 51u8, 251u8, 177u8, 108u8, 100u8, 59u8, 34u8, 245u8, 153u8, 162u8, 190u8, 109u8, 242u8, 226u8, 20u8, 190u8, 221u8, 80u8, 60u8, 55u8, 206u8, 176u8, 97u8, 216u8, 236u8, 96u8, 32u8, 159u8, 227u8, 69u8, 206u8, 137u8, 131u8, 10u8, 25u8, 35u8, 3u8, 1u8, 240u8, 118u8, 202u8, 255u8, 0u8, 77u8, 25u8, 38u8], + + vk_beta_g2: [9u8, 103u8, 3u8, 47u8, 203u8, 247u8, 118u8, 209u8, 175u8, 201u8, 133u8, 248u8, 136u8, 119u8, 241u8, 130u8, 211u8, 132u8, 128u8, 166u8, 83u8, 242u8, 222u8, 202u8, 169u8, 121u8, 76u8, 188u8, 59u8, 243u8, 6u8, 12u8, 14u8, 24u8, 120u8, 71u8, 173u8, 76u8, 121u8, 131u8, 116u8, 208u8, 214u8, 115u8, 43u8, 245u8, 1u8, 132u8, 125u8, 214u8, 139u8, 192u8, 224u8, 113u8, 36u8, 30u8, 2u8, 19u8, 188u8, 127u8, 193u8, 61u8, 183u8, 171u8, 48u8, 76u8, 251u8, 209u8, 224u8, 138u8, 112u8, 74u8, 153u8, 245u8, 232u8, 71u8, 217u8, 63u8, 140u8, 60u8, 170u8, 253u8, 222u8, 196u8, 107u8, 122u8, 13u8, 55u8, 157u8, 166u8, 154u8, 77u8, 17u8, 35u8, 70u8, 167u8, 23u8, 57u8, 193u8, 177u8, 164u8, 87u8, 168u8, 199u8, 49u8, 49u8, 35u8, 210u8, 77u8, 47u8, 145u8, 146u8, 248u8, 150u8, 183u8, 198u8, 62u8, 234u8, 5u8, 169u8, 213u8, 127u8, 6u8, 84u8, 122u8, 208u8, 206u8, 200u8], + + vk_gamma_g2: [25u8, 142u8, 147u8, 147u8, 146u8, 13u8, 72u8, 58u8, 114u8, 96u8, 191u8, 183u8, 49u8, 251u8, 93u8, 37u8, 241u8, 170u8, 73u8, 51u8, 53u8, 169u8, 231u8, 18u8, 151u8, 228u8, 133u8, 183u8, 174u8, 243u8, 18u8, 194u8, 24u8, 0u8, 222u8, 239u8, 18u8, 31u8, 30u8, 118u8, 66u8, 106u8, 0u8, 102u8, 94u8, 92u8, 68u8, 121u8, 103u8, 67u8, 34u8, 212u8, 247u8, 94u8, 218u8, 221u8, 70u8, 222u8, 189u8, 92u8, 217u8, 146u8, 246u8, 237u8, 9u8, 6u8, 137u8, 208u8, 88u8, 95u8, 240u8, 117u8, 236u8, 158u8, 153u8, 173u8, 105u8, 12u8, 51u8, 149u8, 188u8, 75u8, 49u8, 51u8, 112u8, 179u8, 142u8, 243u8, 85u8, 172u8, 218u8, 220u8, 209u8, 34u8, 151u8, 91u8, 18u8, 200u8, 94u8, 165u8, 219u8, 140u8, 109u8, 235u8, 74u8, 171u8, 113u8, 128u8, 141u8, 203u8, 64u8, 143u8, 227u8, 209u8, 231u8, 105u8, 12u8, 67u8, 211u8, 123u8, 76u8, 230u8, 204u8, 1u8, 102u8, 250u8, 125u8, 170u8], + + vk_delta_g2: [21u8, 161u8, 226u8, 221u8, 72u8, 190u8, 228u8, 85u8, 167u8, 57u8, 40u8, 128u8, 233u8, 193u8, 56u8, 244u8, 90u8, 177u8, 76u8, 127u8, 110u8, 35u8, 192u8, 135u8, 248u8, 147u8, 123u8, 6u8, 82u8, 96u8, 152u8, 142u8, 5u8, 98u8, 80u8, 250u8, 68u8, 190u8, 236u8, 147u8, 117u8, 119u8, 6u8, 249u8, 231u8, 131u8, 151u8, 3u8, 124u8, 255u8, 52u8, 31u8, 214u8, 91u8, 122u8, 81u8, 9u8, 115u8, 1u8, 223u8, 246u8, 145u8, 39u8, 16u8, 41u8, 213u8, 50u8, 227u8, 149u8, 29u8, 90u8, 38u8, 20u8, 83u8, 126u8, 34u8, 163u8, 166u8, 38u8, 118u8, 51u8, 124u8, 246u8, 42u8, 84u8, 201u8, 143u8, 244u8, 248u8, 211u8, 159u8, 102u8, 121u8, 202u8, 46u8, 227u8, 29u8, 54u8, 160u8, 253u8, 118u8, 218u8, 40u8, 236u8, 47u8, 85u8, 49u8, 203u8, 185u8, 186u8, 146u8, 191u8, 175u8, 137u8, 235u8, 52u8, 151u8, 255u8, 224u8, 95u8, 96u8, 13u8, 224u8, 83u8, 157u8, 224u8, 66u8, 106u8], + + vk_ic: &[ + [12u8, 192u8, 31u8, 5u8, 252u8, 153u8, 69u8, 152u8, 16u8, 193u8, 229u8, 27u8, 107u8, 12u8, 131u8, 157u8, 181u8, 114u8, 177u8, 46u8, 213u8, 38u8, 159u8, 73u8, 102u8, 40u8, 81u8, 214u8, 58u8, 242u8, 73u8, 236u8, 0u8, 58u8, 182u8, 252u8, 156u8, 30u8, 52u8, 250u8, 147u8, 222u8, 206u8, 111u8, 25u8, 4u8, 107u8, 115u8, 113u8, 133u8, 43u8, 77u8, 19u8, 249u8, 34u8, 131u8, 134u8, 29u8, 211u8, 140u8, 237u8, 147u8, 30u8, 7u8], + [9u8, 110u8, 51u8, 213u8, 168u8, 169u8, 164u8, 244u8, 19u8, 76u8, 14u8, 226u8, 213u8, 125u8, 216u8, 90u8, 119u8, 166u8, 116u8, 61u8, 176u8, 65u8, 159u8, 48u8, 229u8, 17u8, 174u8, 208u8, 151u8, 239u8, 129u8, 240u8, 31u8, 23u8, 226u8, 142u8, 142u8, 189u8, 121u8, 137u8, 47u8, 204u8, 35u8, 136u8, 216u8, 198u8, 164u8, 12u8, 93u8, 183u8, 45u8, 207u8, 112u8, 240u8, 113u8, 41u8, 111u8, 19u8, 197u8, 177u8, 167u8, 71u8, 172u8, 125u8], + [42u8, 196u8, 14u8, 64u8, 95u8, 212u8, 162u8, 19u8, 5u8, 80u8, 227u8, 221u8, 1u8, 190u8, 42u8, 223u8, 97u8, 165u8, 33u8, 109u8, 138u8, 210u8, 40u8, 82u8, 231u8, 37u8, 29u8, 98u8, 180u8, 32u8, 101u8, 225u8, 38u8, 201u8, 17u8, 234u8, 168u8, 4u8, 165u8, 151u8, 1u8, 204u8, 196u8, 33u8, 147u8, 161u8, 210u8, 91u8, 200u8, 239u8, 230u8, 152u8, 163u8, 3u8, 232u8, 1u8, 33u8, 55u8, 28u8, 149u8, 241u8, 133u8, 25u8, 207u8], + [37u8, 193u8, 7u8, 139u8, 47u8, 18u8, 214u8, 151u8, 196u8, 40u8, 110u8, 111u8, 149u8, 1u8, 58u8, 190u8, 105u8, 197u8, 122u8, 12u8, 98u8, 38u8, 24u8, 5u8, 123u8, 31u8, 26u8, 50u8, 18u8, 175u8, 245u8, 140u8, 26u8, 182u8, 233u8, 126u8, 204u8, 44u8, 225u8, 78u8, 38u8, 138u8, 242u8, 127u8, 3u8, 31u8, 89u8, 84u8, 137u8, 139u8, 182u8, 94u8, 88u8, 190u8, 177u8, 253u8, 207u8, 84u8, 232u8, 115u8, 231u8, 205u8, 235u8, 186u8], + [21u8, 10u8, 233u8, 74u8, 135u8, 47u8, 118u8, 170u8, 135u8, 5u8, 211u8, 202u8, 125u8, 176u8, 78u8, 204u8, 7u8, 204u8, 181u8, 215u8, 166u8, 122u8, 3u8, 40u8, 49u8, 99u8, 115u8, 191u8, 83u8, 134u8, 58u8, 69u8, 3u8, 121u8, 255u8, 73u8, 110u8, 240u8, 240u8, 60u8, 219u8, 180u8, 124u8, 27u8, 165u8, 0u8, 88u8, 80u8, 217u8, 152u8, 34u8, 246u8, 34u8, 195u8, 148u8, 37u8, 207u8, 236u8, 0u8, 120u8, 154u8, 60u8, 152u8, 209u8], + [42u8, 66u8, 27u8, 187u8, 193u8, 14u8, 48u8, 193u8, 195u8, 71u8, 164u8, 58u8, 40u8, 58u8, 74u8, 151u8, 2u8, 132u8, 65u8, 86u8, 4u8, 102u8, 73u8, 22u8, 113u8, 71u8, 235u8, 55u8, 3u8, 121u8, 70u8, 184u8, 42u8, 243u8, 12u8, 20u8, 194u8, 124u8, 62u8, 60u8, 228u8, 53u8, 208u8, 43u8, 171u8, 182u8, 240u8, 3u8, 45u8, 105u8, 185u8, 34u8, 252u8, 46u8, 251u8, 217u8, 171u8, 226u8, 140u8, 124u8, 186u8, 183u8, 35u8, 194u8], + ] +}; diff --git a/lowlevel/tests/circuit.rs b/zk-id/tests/circuit.rs similarity index 72% rename from lowlevel/tests/circuit.rs rename to zk-id/tests/circuit.rs index 2aa974a..613f0c7 100644 --- a/lowlevel/tests/circuit.rs +++ b/zk-id/tests/circuit.rs @@ -1,4 +1,6 @@ use circom_prover::{prover::ProofLib, witness::WitnessFn, CircomProver}; +use groth16_solana::groth16::Groth16Verifier; +use groth16_solana::proof_parser::circom_prover::{convert_proof, convert_public_inputs}; use light_compressed_account::compressed_account::{CompressedAccount, CompressedAccountData}; use light_compressed_account::Pubkey; use light_hasher::{hash_to_field_size::hash_to_bn254_field_size_be, Poseidon}; @@ -12,6 +14,9 @@ extern "C" {} rust_witness::witness!(compressedaccountmerkleproof); +// Use the verifying key from the library +use zk_id::verifying_key::VERIFYINGKEY; + /// Helper function to add compressed account inputs to the circuit inputs HashMap /// /// # Arguments @@ -201,3 +206,73 @@ fn test_invalid_proof_rejected() { assert!(!is_valid, "Proof should be invalid with wrong root"); } + +#[test] +fn test_groth16_solana_verification() { + let zkey_path = "./build/compressed_account_merkle_proof_final.zkey".to_string(); + + // Create compressed account + let owner = Pubkey::new_from_array([1u8; 32]); + let merkle_tree_pubkey = Pubkey::new_from_array([2u8; 32]); + let leaf_index: u32 = 0; + + let compressed_account = CompressedAccount { + owner, + lamports: 0, + address: None, + data: Some(CompressedAccountData { + discriminator: [1u8; 8], + data: vec![], + data_hash: [3u8; 32], + }), + }; + + // Create Merkle tree and get proof + let compressed_account_hash = compressed_account + .hash(&merkle_tree_pubkey, &leaf_index, false) + .unwrap(); + + let mut merkle_tree = MerkleTree::::new(26, 0); + merkle_tree.append(&compressed_account_hash).unwrap(); + + let merkle_proof_hashes = merkle_tree + .get_proof_of_leaf(leaf_index as usize, false) + .unwrap(); + let merkle_root = merkle_tree.root(); + + // Build circuit inputs + let mut proof_inputs = HashMap::new(); + add_compressed_account_to_circuit_inputs( + &mut proof_inputs, + &compressed_account, + &merkle_tree_pubkey, + leaf_index, + ); + add_merkle_proof_to_circuit_inputs(&mut proof_inputs, &merkle_proof_hashes, &merkle_root); + + // Generate proof with circom-prover + let circuit_inputs = serde_json::to_string(&proof_inputs).unwrap(); + let proof = CircomProver::prove( + ProofLib::Arkworks, + WitnessFn::RustWitness(compressedaccountmerkleproof_witness), + circuit_inputs, + zkey_path.clone(), + ) + .expect("Proof generation failed"); + + // First verify with circom-prover + let is_valid_circom = CircomProver::verify(ProofLib::Arkworks, proof.clone(), zkey_path) + .expect("Circom verification failed"); + assert!(is_valid_circom, "Proof should be valid with circom-prover"); + + // Convert proof and public inputs to groth16-solana format + let (proof_a, proof_b, proof_c) = convert_proof(&proof.proof).expect("Failed to convert proof"); + let public_inputs: [[u8; 32]; 5] = convert_public_inputs(&proof.pub_inputs); + + // Verify with groth16-solana + let mut verifier = + Groth16Verifier::new(&proof_a, &proof_b, &proof_c, &public_inputs, &VERIFYINGKEY) + .expect("Failed to create verifier"); + + verifier.verify().expect("Groth16 verification failed"); +} diff --git a/lowlevel/tests/test.rs b/zk-id/tests/test.rs similarity index 99% rename from lowlevel/tests/test.rs rename to zk-id/tests/test.rs index 1fedc3a..3d0e08a 100644 --- a/lowlevel/tests/test.rs +++ b/zk-id/tests/test.rs @@ -12,11 +12,11 @@ use light_sdk::{ address::v1::derive_address, instruction::{PackedAccounts, SystemAccountMetaConfig}, }; -use lowlevel::FIRST_SEED; use solana_sdk::{ instruction::Instruction, signature::{Keypair, Signature, Signer}, }; +use zk_id::FIRST_SEED; #[tokio::test] async fn test_create_address_and_output_without_address() { @@ -129,7 +129,7 @@ where let output_state_tree_index = rpc .get_random_state_tree_info()? .pack_output_tree_index(&mut remaining_accounts)?; - + let input_state_tree_info = rpc.get_random_state_tree_info()?; let input_root_index = 0u16; From 32919f4ead6e4365d9517f29db9ef367893e56ae Mon Sep 17 00:00:00 2001 From: ananas Date: Mon, 20 Oct 2025 01:15:54 +0100 Subject: [PATCH 07/14] stash program impl --- .../compressed_account_merkle_proof.circom | 21 +- zk-id/src/lib.rs | 266 +++++++++++++++--- zk-id/tests/test.rs | 227 ++++++++++++++- 3 files changed, 475 insertions(+), 39 deletions(-) diff --git a/zk-id/circuits/compressed_account_merkle_proof.circom b/zk-id/circuits/compressed_account_merkle_proof.circom index fd0ddee..c1b90df 100644 --- a/zk-id/circuits/compressed_account_merkle_proof.circom +++ b/zk-id/circuits/compressed_account_merkle_proof.circom @@ -63,19 +63,28 @@ template CompressedAccountMerkleProof(levels) { signal input leaf_index; signal input merkle_tree_hashed; signal input discriminator; - signal input data_hash; + signal input issuer_hashed; + signal input credential_pubkey_hashed; + signal input encrypted_data_hash; + signal input public_encrypted_data_hash; + signal input public_data_hash; // Merkle proof inputs signal input pathElements[levels]; signal input expectedRoot; + component data_hasher = Poseidon(2); + data_hasher.inputs[0] <== issuer_hashed; + data_hasher.inputs[1] <== credential_pubkey_hashed; + data_hasher.out === public_data_hash; + // Step 1: Compute compressed account hash component accountHasher = CompressedAccountHash(); accountHasher.owner_hashed <== owner_hashed; accountHasher.leaf_index <== leaf_index; accountHasher.merkle_tree_hashed <== merkle_tree_hashed; accountHasher.discriminator <== discriminator; - accountHasher.data_hash <== data_hash; + accountHasher.data_hash <== data_hasher.out; // Step 2: Verify Merkle proof component merkleProof = MerkleProof(levels); @@ -86,6 +95,8 @@ template CompressedAccountMerkleProof(levels) { // Step 3: CRITICAL CONSTRAINT - Enforce that computed root MUST equal expected root // This === operator adds a constraint that will fail witness generation if roots don't match merkleProof.root === expectedRoot; + + public_encrypted_data_hash === encrypted_data_hash; } // Main component with 26 levels (typical for Solana state trees) @@ -94,7 +105,9 @@ component main { owner_hashed, merkle_tree_hashed, discriminator, - data_hash, - expectedRoot + issuer_hashed, + expectedRoot, + public_encrypted_data_hash, + public_data_hash ] } = CompressedAccountMerkleProof(26); diff --git a/zk-id/src/lib.rs b/zk-id/src/lib.rs index bce6459..5cb70c2 100644 --- a/zk-id/src/lib.rs +++ b/zk-id/src/lib.rs @@ -2,15 +2,17 @@ use account_compression::{state_merkle_tree_from_bytes_zero_copy, StateMerkleTreeAccount}; use anchor_lang::{prelude::*, AnchorDeserialize, AnchorSerialize}; -use light_compressed_account::instruction_data::with_account_info::{ - CompressedAccountInfo, OutAccountInfo, -}; +use borsh::{BorshDeserialize, BorshSerialize}; +use groth16_solana::groth16::Groth16Verifier; +use light_compressed_account::instruction_data::compressed_proof::CompressedProof; +use light_sdk::account::{poseidon::LightAccount as LightAccountPoseidon, LightAccount}; use light_sdk::cpi::v1::CpiAccounts; use light_sdk::{ address::v1::derive_address, cpi::{v2::LightSystemProgramCpi, InvokeLightSystemProgram, LightCpiInstruction}, derive_light_cpi_signer, - instruction::{PackedAddressTreeInfo, ValidityProof}, + instruction::{account_meta::CompressedAccountMeta, PackedAddressTreeInfo, ValidityProof}, + LightDiscriminator, LightHasher, }; use light_sdk_types::CpiSigner; @@ -19,8 +21,8 @@ declare_id!("HNqStLMpNuNJqhBF1FbGTKHEFbBLJmq8RdJJmZKWz6jH"); pub const LIGHT_CPI_SIGNER: CpiSigner = derive_light_cpi_signer!("HNqStLMpNuNJqhBF1FbGTKHEFbBLJmq8RdJJmZKWz6jH"); -pub const FIRST_SEED: &[u8] = b"first"; -pub const SECOND_SEED: &[u8] = b"second"; +pub const ISSUER: &[u8] = b"issuer"; +pub const ZK_ID_CHECK: &[u8] = b"ZK_ID_CHECK"; // Include the generated verifying key module pub mod verifying_key; @@ -28,17 +30,139 @@ pub mod verifying_key; #[program] pub mod zk_id { + use groth16_solana::decompression::{decompress_g1, decompress_g2}; + use light_hasher::hash_to_field_size::{ + hashv_to_bn254_field_size_be_array, hashv_to_bn254_field_size_be_const_array, + }; + use light_sdk::instruction::account_info::CompressedAccountInfoTrait; + use super::*; - /// Creates a new compressed account with initial data - pub fn create_address_and_output_without_address<'info>( + /// Creates a new issuer compressed account + pub fn create_issuer<'info>( + ctx: Context<'_, '_, '_, 'info, GenericAnchorAccounts<'info>>, + proof: ValidityProof, + address_tree_info: PackedAddressTreeInfo, + output_state_tree_index: u8, + ) -> Result<()> { + let light_cpi_accounts = CpiAccounts::new( + ctx.accounts.signer.as_ref(), + ctx.remaining_accounts, + crate::LIGHT_CPI_SIGNER, + ); + + let (address, address_seed) = derive_address( + &[ISSUER, ctx.accounts.signer.key().as_ref()], + &address_tree_info + .get_tree_pubkey(&light_cpi_accounts) + .map_err(|_| ErrorCode::AccountNotEnoughKeys)?, + &crate::ID, + ); + + let mut issuer_account = LightAccount::<'_, IssuerAccount>::new_init( + &crate::ID, + Some(address), + output_state_tree_index, + ); + + issuer_account.issuer_pubkey = ctx.accounts.signer.key(); + issuer_account.num_credentials_issued = 0; + + msg!( + "Created issuer account for pubkey: {}", + ctx.accounts.signer.key() + ); + + LightSystemProgramCpi::new_cpi(LIGHT_CPI_SIGNER, proof) + .with_light_account(issuer_account)? + .with_new_addresses(&[ + address_tree_info.into_new_address_params_assigned_packed(address_seed, Some(0)) + ]) + .invoke(light_cpi_accounts)?; + + Ok(()) + } + + /// Creates a new credential compressed account storing a pubkey + /// Requires a valid issuer account - only the issuer can create credentials + pub fn add_credential<'info>( + ctx: Context<'_, '_, '_, 'info, GenericAnchorAccounts<'info>>, + proof: ValidityProof, + address_tree_info: PackedAddressTreeInfo, + output_state_tree_index: u8, + issuer_account_meta: CompressedAccountMeta, + credential_pubkey: Pubkey, + num_credentials_issued: u64, + ) -> Result<()> { + let light_cpi_accounts = CpiAccounts::new( + ctx.accounts.signer.as_ref(), + ctx.remaining_accounts, + crate::LIGHT_CPI_SIGNER, + ); + + // Verify the issuer account - read it to ensure it exists and signer is the issuer + let mut issuer_account = LightAccount::<'_, IssuerAccount>::new_mut( + &crate::ID, + &issuer_account_meta, + IssuerAccount { + issuer_pubkey: ctx.accounts.signer.key(), + num_credentials_issued, + }, + )?; + + // Increment the credential counter + issuer_account.num_credentials_issued = issuer_account + .num_credentials_issued + .checked_add(1) + .ok_or(ProgramError::ArithmeticOverflow)?; + + let (address, address_seed) = derive_address( + &[ISSUER, ctx.accounts.signer.key().as_ref()], + &address_tree_info + .get_tree_pubkey(&light_cpi_accounts) + .map_err(|_| ErrorCode::AccountNotEnoughKeys)?, + &crate::ID, + ); + + let mut credential_account = LightAccountPoseidon::<'_, CredentialAccount>::new_init( + &crate::ID, + Some(address), + output_state_tree_index, + ); + + credential_account.issuer = ctx.accounts.signer.key(); + credential_account.credential_pubkey = credential_pubkey; + + msg!( + "Created credential account for pubkey: {} (issuer credential count: {})", + credential_pubkey, + issuer_account.num_credentials_issued + ); + + LightSystemProgramCpi::new_cpi(LIGHT_CPI_SIGNER, proof) + .with_light_account(issuer_account)? + .with_light_account_poseidon(credential_account)? + .with_new_addresses(&[ + address_tree_info.into_new_address_params_assigned_packed(address_seed, Some(0)) + ]) + .invoke(light_cpi_accounts)?; + + Ok(()) + } + + /// Verifies a ZK proof of credential ownership and creates an encrypted event account. + pub fn zk_verify_credential<'info>( ctx: Context<'_, '_, '_, 'info, GenericAnchorAccounts<'info>>, - proof: ValidityProof, // Required for the address create, it proves that the address does not exist yet in the light address tree. + proof: ValidityProof, address_tree_info: PackedAddressTreeInfo, output_state_tree_index: u8, input_root_index: u16, - encrypted_data: Vec, // must be checked by your zkp - output_utxo_hash: [u8; 32], // must be checked by your zkp + encrypted_data: Vec, + credential_proof: CompressedProof, + issuer: [u8; 32], + merkle_tree_hashed: [u8; 32], + data_hash: [u8; 32], + verification_id: [u8; 32], ) -> Result<()> { let light_cpi_accounts = CpiAccounts::new( ctx.accounts.signer.as_ref(), @@ -54,34 +178,81 @@ pub mod zk_id { return Err(ProgramError::InvalidAccountData.into()); } - let (_address, address_seed) = derive_address( - &[FIRST_SEED, ctx.accounts.signer.key().as_ref()], + let (address, address_seed) = derive_address( + &[ + ZK_ID_CHECK, + data_hash.as_slice(), + verification_id.as_slice(), + ], &address_pubkey, &crate::ID, ); + // Get root from input Merkle tree (example of reading on-chain state) - let _input_root = read_merkle_tree_root(&ctx.accounts.input_merkle_tree, input_root_index)?; - - // Create output compressed account using low-level CompressedAccountInfo - let output_account = CompressedAccountInfo { - address: None, - input: None, - output: Some(OutAccountInfo { - discriminator: 1u64.to_le_bytes(), - output_merkle_tree_index: output_state_tree_index, - lamports: 0, - data: encrypted_data, - data_hash: output_utxo_hash, - }), - }; - - // Use new CPI builder pattern: - // - Creates 1 output compressed account without address - // - Creates 1 address without compressed account + let expected_root = + read_merkle_tree_root(&ctx.accounts.input_merkle_tree, input_root_index)?; + let mut discriminator = [0u8; 32]; + discriminator[24..].copy_from_slice(CredentialAccount::LIGHT_DISCRIMINATOR_SLICE); + let issuer_hashed = hashv_to_bn254_field_size_be_const_array::<2>(&[&issuer]).unwrap(); + let account_owner_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[&crate::ID.to_bytes()]).unwrap(); + + let mut event_account = LightAccount::<'_, EncryptedEventAccount>::new_init( + &crate::ID, + Some(address), + output_state_tree_index, + ); + event_account.data = encrypted_data; + let event_account_info = event_account.to_account_info()?; + + // Construct public inputs array for the circuit + // Order must match the circuit: owner_hashed, merkle_tree_hashed, discriminator, issuer_hashed, expectedRoot + let public_inputs: [[u8; 32]; 7] = [ + account_owner_hashed, + merkle_tree_hashed, + discriminator, + issuer_hashed, + expected_root, + event_account_info.output.as_ref().unwrap().data_hash, + data_hash, + ]; + let proof_a = decompress_g1(&credential_proof.a).map_err(|e| { + let code: u32 = e.into(); + Error::from(ProgramError::Custom(code)) + })?; + let proof_b = decompress_g2(&credential_proof.b).map_err(|e| { + let code: u32 = e.into(); + Error::from(ProgramError::Custom(code)) + })?; + let proof_c = decompress_g1(&credential_proof.c).map_err(|e| { + let code: u32 = e.into(); + Error::from(ProgramError::Custom(code)) + })?; + + // Verify the Groth16 proof + let mut verifier = Groth16Verifier::new( + &proof_a, + &proof_b, + &proof_c, + &public_inputs, + &crate::verifying_key::VERIFYINGKEY, + ) + .map_err(|e| { + let code: u32 = e.into(); + Error::from(ProgramError::Custom(code)) + })?; + + verifier.verify().map_err(|e| { + let code: u32 = e.into(); + Error::from(ProgramError::Custom(code)) + })?; + + msg!("ZK proof verified successfully"); + LightSystemProgramCpi::new_cpi(LIGHT_CPI_SIGNER, proof) - .with_account_infos(&[output_account]) + .with_account_infos(&[event_account_info]) .with_new_addresses(&[ - address_tree_info.into_new_address_params_assigned_packed(address_seed, None) + address_tree_info.into_new_address_params_assigned_packed(address_seed, Some(0)) ]) .invoke(light_cpi_accounts)?; @@ -96,6 +267,27 @@ pub struct GenericAnchorAccounts<'info> { pub input_merkle_tree: AccountLoader<'info, StateMerkleTreeAccount>, } +#[derive( + Clone, Debug, Default, BorshSerialize, BorshDeserialize, LightDiscriminator, LightHasher, +)] +pub struct CredentialAccount { + #[hash] + pub issuer: Pubkey, + #[hash] + pub credential_pubkey: Pubkey, +} + +#[derive(Clone, Debug, Default, BorshSerialize, BorshDeserialize, LightDiscriminator)] +pub struct EncryptedEventAccount { + pub data: Vec, +} + +#[derive(Clone, Debug, Default, BorshSerialize, BorshDeserialize, LightDiscriminator)] +pub struct IssuerAccount { + pub issuer_pubkey: Pubkey, + pub num_credentials_issued: u64, +} + /// Reads a root from the concurrent state merkle tree by index pub fn read_merkle_tree_root( input_merkle_tree: &AccountLoader, @@ -113,3 +305,11 @@ pub fn read_merkle_tree_root( Ok(merkle_tree.roots[root_index as usize]) } + +#[error_code] +pub enum ErrorCode { + #[msg("Invalid issuer: signer is not the issuer of this account")] + InvalidIssuer, + #[msg("Not enough keys in remaining accounts")] + AccountNotEnoughKeys, +} diff --git a/zk-id/tests/test.rs b/zk-id/tests/test.rs index 3d0e08a..c5a2eda 100644 --- a/zk-id/tests/test.rs +++ b/zk-id/tests/test.rs @@ -1,6 +1,7 @@ // #![cfg(feature = "test-sbf")] use anchor_lang::{InstructionData, ToAccountMetas}; +use light_client::rpc::RpcConnection; use light_compressed_account::{ compressed_account::hash_with_hashed_values, hash_to_bn254_field_size_be, }; @@ -14,9 +15,10 @@ use light_sdk::{ }; use solana_sdk::{ instruction::Instruction, + pubkey::Pubkey, signature::{Keypair, Signature, Signer}, }; -use zk_id::FIRST_SEED; +use zk_id::ISSUER; #[tokio::test] async fn test_create_address_and_output_without_address() { @@ -27,7 +29,7 @@ async fn test_create_address_and_output_without_address() { let address_tree_info = rpc.get_address_tree_v1(); let (address, _) = derive_address( - &[FIRST_SEED, payer.pubkey().as_ref()], + &[ISSUER, payer.pubkey().as_ref()], &address_tree_info.tree, &lowlevel::ID, ); @@ -160,3 +162,224 @@ where rpc.create_and_send_transaction(&[instruction], &payer.pubkey(), &[payer]) .await } + +#[tokio::test] +async fn test_add_credential() { + let config = ProgramTestConfig::new(true, Some(vec![("zk_id", zk_id::ID)])); + let mut rpc = LightProgramTest::new(config).await.unwrap(); + let payer = rpc.get_payer().insecure_clone(); + + let address_tree_info = rpc.get_address_tree_v1(); + + let (issuer_address, _) = derive_address( + &[ISSUER, payer.pubkey().as_ref()], + &address_tree_info.tree, + &zk_id::ID, + ); + + // First, create the issuer account + create_issuer(&mut rpc, &payer, &issuer_address, address_tree_info.clone()) + .await + .unwrap(); + + // Get the issuer account + let issuer_accounts = rpc + .get_compressed_accounts_by_owner(&zk_id::ID, None, None) + .await + .unwrap(); + assert_eq!(issuer_accounts.value.items.len(), 1); + let issuer_account = &issuer_accounts.value.items[0]; + + // Create a test credential pubkey + let credential_pubkey = Pubkey::new_unique(); + + let (credential_address, _) = derive_address( + &[ISSUER, payer.pubkey().as_ref()], + &address_tree_info.tree, + &zk_id::ID, + ); + + // Create the credential account + add_credential( + &mut rpc, + &payer, + &credential_address, + address_tree_info, + issuer_account, + credential_pubkey, + ) + .await + .unwrap(); + + // Verify both accounts exist now (issuer + credential) + let program_compressed_accounts = rpc + .get_compressed_accounts_by_owner(&zk_id::ID, None, None) + .await + .unwrap(); + + assert_eq!(program_compressed_accounts.value.items.len(), 2); + + println!( + "Successfully created credential account for pubkey: {}", + credential_pubkey + ); +} + +async fn add_credential( + rpc: &mut R, + payer: &Keypair, + address: &[u8; 32], + address_tree_info: light_client::indexer::TreeInfo, + issuer_account: &light_client::rpc::RpcCompressedAccount, + credential_pubkey: Pubkey, +) -> Result +where + R: Rpc + Indexer, +{ + let mut remaining_accounts = PackedAccounts::default(); + let config = SystemAccountMetaConfig::new(zk_id::ID); + remaining_accounts.add_system_accounts(config); + + // Pack the issuer account for input + let issuer_account_meta = remaining_accounts.pack_compressed_account(issuer_account); + + let rpc_result = rpc + .get_validity_proof( + vec![issuer_account.hash], + vec![AddressWithTree { + address: *address, + tree: address_tree_info.tree, + }], + None, + ) + .await? + .value; + + let packed_address_tree_accounts = rpc_result + .pack_tree_infos(&mut remaining_accounts) + .address_trees; + let output_state_tree_index = rpc + .get_random_state_tree_info()? + .pack_output_tree_index(&mut remaining_accounts)?; + + let instruction_data = zk_id::instruction::AddCredential { + proof: rpc_result.proof, + address_tree_info: packed_address_tree_accounts[0], + output_state_tree_index, + issuer_account_meta, + credential_pubkey, + }; + + let accounts = zk_id::accounts::GenericAnchorAccounts { + signer: payer.pubkey(), + input_merkle_tree: rpc.get_random_state_tree_info()?.tree, + }; + + let instruction = Instruction { + program_id: zk_id::ID, + accounts: [ + accounts.to_account_metas(None), + remaining_accounts.to_account_metas().0, + ] + .concat(), + data: instruction_data.data(), + }; + + rpc.create_and_send_transaction(&[instruction], &payer.pubkey(), &[payer]) + .await +} + +#[tokio::test] +async fn test_create_issuer() { + let config = ProgramTestConfig::new(true, Some(vec![("zk_id", zk_id::ID)])); + let mut rpc = LightProgramTest::new(config).await.unwrap(); + let payer = rpc.get_payer().insecure_clone(); + + let address_tree_info = rpc.get_address_tree_v1(); + + let (address, _) = derive_address( + &[ISSUER, payer.pubkey().as_ref()], + &address_tree_info.tree, + &zk_id::ID, + ); + + // Create the issuer account + create_issuer(&mut rpc, &payer, &address, address_tree_info) + .await + .unwrap(); + + // Verify the issuer account was created + let program_compressed_accounts = rpc + .get_compressed_accounts_by_owner(&zk_id::ID, None, None) + .await + .unwrap(); + + assert_eq!(program_compressed_accounts.value.items.len(), 1); + let compressed_account = &program_compressed_accounts.value.items[0]; + + // Verify account has data and address + assert!(compressed_account.data.is_some()); + assert_eq!(compressed_account.address, Some(address)); + + println!( + "Successfully created issuer account for pubkey: {}", + payer.pubkey() + ); +} + +async fn create_issuer( + rpc: &mut R, + payer: &Keypair, + address: &[u8; 32], + address_tree_info: light_client::indexer::TreeInfo, +) -> Result +where + R: Rpc + Indexer, +{ + let mut remaining_accounts = PackedAccounts::default(); + let config = SystemAccountMetaConfig::new(zk_id::ID); + remaining_accounts.add_system_accounts(config); + + let rpc_result = rpc + .get_validity_proof( + vec![], + vec![AddressWithTree { + address: *address, + tree: address_tree_info.tree, + }], + None, + ) + .await? + .value; + + let packed_address_tree_accounts = rpc_result + .pack_tree_infos(&mut remaining_accounts) + .address_trees; + let output_state_tree_index = rpc + .get_random_state_tree_info()? + .pack_output_tree_index(&mut remaining_accounts)?; + + let instruction_data = zk_id::instruction::CreateIssuer { + proof: rpc_result.proof, + address_tree_info: packed_address_tree_accounts[0], + output_state_tree_index, + }; + + let accounts = zk_id::accounts::GenericAnchorAccounts { + signer: payer.pubkey(), + input_merkle_tree: rpc.get_random_state_tree_info()?.tree, + }; + + let instruction = Instruction { + program_id: zk_id::ID, + accounts: [ + accounts.to_account_metas(None), + remaining_accounts.to_account_metas().0, + ] + .concat(), + data: instruction_data.data(), + }; + + rpc.create_and_send_transaction(&[instruction], &payer.pubkey(), &[payer]) + .await +} From 6482ec6a15e35eb27f8b29e9149637906eef2ff3 Mon Sep 17 00:00:00 2001 From: ananas Date: Mon, 20 Oct 2025 01:22:36 +0100 Subject: [PATCH 08/14] circuit tests pass --- zk-id/src/lib.rs | 5 +- zk-id/src/verifying_key.rs | 18 +++--- zk-id/tests/circuit.rs | 110 ++++++++++++++++++++++++++++++++----- 3 files changed, 106 insertions(+), 27 deletions(-) diff --git a/zk-id/src/lib.rs b/zk-id/src/lib.rs index 5cb70c2..7cabd45 100644 --- a/zk-id/src/lib.rs +++ b/zk-id/src/lib.rs @@ -31,10 +31,7 @@ pub mod verifying_key; pub mod zk_id { use groth16_solana::decompression::{decompress_g1, decompress_g2}; - use light_hasher::hash_to_field_size::{ - hashv_to_bn254_field_size_be_array, hashv_to_bn254_field_size_be_const_array, - }; - use light_sdk::instruction::account_info::CompressedAccountInfoTrait; + use light_hasher::hash_to_field_size::hashv_to_bn254_field_size_be_const_array; use super::*; diff --git a/zk-id/src/verifying_key.rs b/zk-id/src/verifying_key.rs index 1583541..ca97164 100644 --- a/zk-id/src/verifying_key.rs +++ b/zk-id/src/verifying_key.rs @@ -1,7 +1,7 @@ use groth16_solana::groth16::Groth16Verifyingkey; pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey { - nr_pubinputs: 5, + nr_pubinputs: 7, vk_alpha_g1: [45u8, 77u8, 154u8, 167u8, 227u8, 2u8, 217u8, 223u8, 65u8, 116u8, 157u8, 85u8, 7u8, 148u8, 157u8, 5u8, 219u8, 234u8, 51u8, 251u8, 177u8, 108u8, 100u8, 59u8, 34u8, 245u8, 153u8, 162u8, 190u8, 109u8, 242u8, 226u8, 20u8, 190u8, 221u8, 80u8, 60u8, 55u8, 206u8, 176u8, 97u8, 216u8, 236u8, 96u8, 32u8, 159u8, 227u8, 69u8, 206u8, 137u8, 131u8, 10u8, 25u8, 35u8, 3u8, 1u8, 240u8, 118u8, 202u8, 255u8, 0u8, 77u8, 25u8, 38u8], @@ -9,14 +9,16 @@ pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey { vk_gamma_g2: [25u8, 142u8, 147u8, 147u8, 146u8, 13u8, 72u8, 58u8, 114u8, 96u8, 191u8, 183u8, 49u8, 251u8, 93u8, 37u8, 241u8, 170u8, 73u8, 51u8, 53u8, 169u8, 231u8, 18u8, 151u8, 228u8, 133u8, 183u8, 174u8, 243u8, 18u8, 194u8, 24u8, 0u8, 222u8, 239u8, 18u8, 31u8, 30u8, 118u8, 66u8, 106u8, 0u8, 102u8, 94u8, 92u8, 68u8, 121u8, 103u8, 67u8, 34u8, 212u8, 247u8, 94u8, 218u8, 221u8, 70u8, 222u8, 189u8, 92u8, 217u8, 146u8, 246u8, 237u8, 9u8, 6u8, 137u8, 208u8, 88u8, 95u8, 240u8, 117u8, 236u8, 158u8, 153u8, 173u8, 105u8, 12u8, 51u8, 149u8, 188u8, 75u8, 49u8, 51u8, 112u8, 179u8, 142u8, 243u8, 85u8, 172u8, 218u8, 220u8, 209u8, 34u8, 151u8, 91u8, 18u8, 200u8, 94u8, 165u8, 219u8, 140u8, 109u8, 235u8, 74u8, 171u8, 113u8, 128u8, 141u8, 203u8, 64u8, 143u8, 227u8, 209u8, 231u8, 105u8, 12u8, 67u8, 211u8, 123u8, 76u8, 230u8, 204u8, 1u8, 102u8, 250u8, 125u8, 170u8], - vk_delta_g2: [21u8, 161u8, 226u8, 221u8, 72u8, 190u8, 228u8, 85u8, 167u8, 57u8, 40u8, 128u8, 233u8, 193u8, 56u8, 244u8, 90u8, 177u8, 76u8, 127u8, 110u8, 35u8, 192u8, 135u8, 248u8, 147u8, 123u8, 6u8, 82u8, 96u8, 152u8, 142u8, 5u8, 98u8, 80u8, 250u8, 68u8, 190u8, 236u8, 147u8, 117u8, 119u8, 6u8, 249u8, 231u8, 131u8, 151u8, 3u8, 124u8, 255u8, 52u8, 31u8, 214u8, 91u8, 122u8, 81u8, 9u8, 115u8, 1u8, 223u8, 246u8, 145u8, 39u8, 16u8, 41u8, 213u8, 50u8, 227u8, 149u8, 29u8, 90u8, 38u8, 20u8, 83u8, 126u8, 34u8, 163u8, 166u8, 38u8, 118u8, 51u8, 124u8, 246u8, 42u8, 84u8, 201u8, 143u8, 244u8, 248u8, 211u8, 159u8, 102u8, 121u8, 202u8, 46u8, 227u8, 29u8, 54u8, 160u8, 253u8, 118u8, 218u8, 40u8, 236u8, 47u8, 85u8, 49u8, 203u8, 185u8, 186u8, 146u8, 191u8, 175u8, 137u8, 235u8, 52u8, 151u8, 255u8, 224u8, 95u8, 96u8, 13u8, 224u8, 83u8, 157u8, 224u8, 66u8, 106u8], + vk_delta_g2: [9u8, 182u8, 194u8, 239u8, 134u8, 104u8, 17u8, 202u8, 241u8, 205u8, 236u8, 6u8, 64u8, 221u8, 138u8, 78u8, 208u8, 85u8, 135u8, 216u8, 232u8, 200u8, 74u8, 214u8, 161u8, 211u8, 86u8, 224u8, 135u8, 47u8, 46u8, 240u8, 38u8, 202u8, 49u8, 185u8, 86u8, 166u8, 237u8, 191u8, 36u8, 87u8, 88u8, 80u8, 198u8, 160u8, 109u8, 103u8, 206u8, 197u8, 9u8, 85u8, 251u8, 84u8, 0u8, 84u8, 122u8, 107u8, 207u8, 52u8, 170u8, 159u8, 6u8, 177u8, 21u8, 151u8, 177u8, 91u8, 211u8, 112u8, 141u8, 188u8, 194u8, 178u8, 84u8, 152u8, 215u8, 15u8, 37u8, 232u8, 8u8, 128u8, 55u8, 244u8, 130u8, 210u8, 243u8, 190u8, 138u8, 238u8, 202u8, 71u8, 154u8, 54u8, 179u8, 121u8, 17u8, 162u8, 164u8, 61u8, 219u8, 107u8, 133u8, 200u8, 103u8, 133u8, 194u8, 207u8, 92u8, 76u8, 90u8, 59u8, 18u8, 156u8, 221u8, 232u8, 230u8, 81u8, 95u8, 123u8, 189u8, 63u8, 188u8, 156u8, 163u8, 5u8, 108u8, 75u8], vk_ic: &[ - [12u8, 192u8, 31u8, 5u8, 252u8, 153u8, 69u8, 152u8, 16u8, 193u8, 229u8, 27u8, 107u8, 12u8, 131u8, 157u8, 181u8, 114u8, 177u8, 46u8, 213u8, 38u8, 159u8, 73u8, 102u8, 40u8, 81u8, 214u8, 58u8, 242u8, 73u8, 236u8, 0u8, 58u8, 182u8, 252u8, 156u8, 30u8, 52u8, 250u8, 147u8, 222u8, 206u8, 111u8, 25u8, 4u8, 107u8, 115u8, 113u8, 133u8, 43u8, 77u8, 19u8, 249u8, 34u8, 131u8, 134u8, 29u8, 211u8, 140u8, 237u8, 147u8, 30u8, 7u8], - [9u8, 110u8, 51u8, 213u8, 168u8, 169u8, 164u8, 244u8, 19u8, 76u8, 14u8, 226u8, 213u8, 125u8, 216u8, 90u8, 119u8, 166u8, 116u8, 61u8, 176u8, 65u8, 159u8, 48u8, 229u8, 17u8, 174u8, 208u8, 151u8, 239u8, 129u8, 240u8, 31u8, 23u8, 226u8, 142u8, 142u8, 189u8, 121u8, 137u8, 47u8, 204u8, 35u8, 136u8, 216u8, 198u8, 164u8, 12u8, 93u8, 183u8, 45u8, 207u8, 112u8, 240u8, 113u8, 41u8, 111u8, 19u8, 197u8, 177u8, 167u8, 71u8, 172u8, 125u8], - [42u8, 196u8, 14u8, 64u8, 95u8, 212u8, 162u8, 19u8, 5u8, 80u8, 227u8, 221u8, 1u8, 190u8, 42u8, 223u8, 97u8, 165u8, 33u8, 109u8, 138u8, 210u8, 40u8, 82u8, 231u8, 37u8, 29u8, 98u8, 180u8, 32u8, 101u8, 225u8, 38u8, 201u8, 17u8, 234u8, 168u8, 4u8, 165u8, 151u8, 1u8, 204u8, 196u8, 33u8, 147u8, 161u8, 210u8, 91u8, 200u8, 239u8, 230u8, 152u8, 163u8, 3u8, 232u8, 1u8, 33u8, 55u8, 28u8, 149u8, 241u8, 133u8, 25u8, 207u8], - [37u8, 193u8, 7u8, 139u8, 47u8, 18u8, 214u8, 151u8, 196u8, 40u8, 110u8, 111u8, 149u8, 1u8, 58u8, 190u8, 105u8, 197u8, 122u8, 12u8, 98u8, 38u8, 24u8, 5u8, 123u8, 31u8, 26u8, 50u8, 18u8, 175u8, 245u8, 140u8, 26u8, 182u8, 233u8, 126u8, 204u8, 44u8, 225u8, 78u8, 38u8, 138u8, 242u8, 127u8, 3u8, 31u8, 89u8, 84u8, 137u8, 139u8, 182u8, 94u8, 88u8, 190u8, 177u8, 253u8, 207u8, 84u8, 232u8, 115u8, 231u8, 205u8, 235u8, 186u8], - [21u8, 10u8, 233u8, 74u8, 135u8, 47u8, 118u8, 170u8, 135u8, 5u8, 211u8, 202u8, 125u8, 176u8, 78u8, 204u8, 7u8, 204u8, 181u8, 215u8, 166u8, 122u8, 3u8, 40u8, 49u8, 99u8, 115u8, 191u8, 83u8, 134u8, 58u8, 69u8, 3u8, 121u8, 255u8, 73u8, 110u8, 240u8, 240u8, 60u8, 219u8, 180u8, 124u8, 27u8, 165u8, 0u8, 88u8, 80u8, 217u8, 152u8, 34u8, 246u8, 34u8, 195u8, 148u8, 37u8, 207u8, 236u8, 0u8, 120u8, 154u8, 60u8, 152u8, 209u8], - [42u8, 66u8, 27u8, 187u8, 193u8, 14u8, 48u8, 193u8, 195u8, 71u8, 164u8, 58u8, 40u8, 58u8, 74u8, 151u8, 2u8, 132u8, 65u8, 86u8, 4u8, 102u8, 73u8, 22u8, 113u8, 71u8, 235u8, 55u8, 3u8, 121u8, 70u8, 184u8, 42u8, 243u8, 12u8, 20u8, 194u8, 124u8, 62u8, 60u8, 228u8, 53u8, 208u8, 43u8, 171u8, 182u8, 240u8, 3u8, 45u8, 105u8, 185u8, 34u8, 252u8, 46u8, 251u8, 217u8, 171u8, 226u8, 140u8, 124u8, 186u8, 183u8, 35u8, 194u8], + [2u8, 213u8, 234u8, 85u8, 255u8, 94u8, 145u8, 236u8, 211u8, 126u8, 45u8, 113u8, 53u8, 28u8, 169u8, 222u8, 254u8, 238u8, 227u8, 69u8, 118u8, 236u8, 77u8, 184u8, 177u8, 242u8, 0u8, 87u8, 240u8, 214u8, 168u8, 108u8, 15u8, 117u8, 191u8, 251u8, 188u8, 229u8, 83u8, 158u8, 143u8, 140u8, 236u8, 84u8, 138u8, 209u8, 63u8, 101u8, 111u8, 19u8, 202u8, 166u8, 97u8, 60u8, 28u8, 244u8, 94u8, 107u8, 197u8, 219u8, 74u8, 146u8, 152u8, 91u8], + [8u8, 61u8, 65u8, 85u8, 235u8, 27u8, 35u8, 64u8, 236u8, 91u8, 75u8, 92u8, 8u8, 82u8, 188u8, 238u8, 125u8, 100u8, 229u8, 212u8, 54u8, 185u8, 60u8, 56u8, 216u8, 219u8, 191u8, 204u8, 74u8, 27u8, 71u8, 0u8, 44u8, 119u8, 216u8, 238u8, 16u8, 173u8, 201u8, 167u8, 194u8, 153u8, 61u8, 27u8, 100u8, 170u8, 141u8, 70u8, 94u8, 145u8, 102u8, 90u8, 190u8, 169u8, 66u8, 36u8, 187u8, 210u8, 141u8, 15u8, 70u8, 12u8, 124u8, 53u8], + [46u8, 59u8, 214u8, 149u8, 229u8, 106u8, 220u8, 117u8, 176u8, 122u8, 12u8, 141u8, 228u8, 61u8, 184u8, 178u8, 56u8, 57u8, 44u8, 123u8, 185u8, 7u8, 151u8, 229u8, 64u8, 106u8, 34u8, 206u8, 200u8, 14u8, 181u8, 121u8, 27u8, 221u8, 0u8, 168u8, 179u8, 57u8, 151u8, 89u8, 54u8, 16u8, 184u8, 66u8, 128u8, 120u8, 67u8, 62u8, 99u8, 83u8, 184u8, 198u8, 32u8, 238u8, 248u8, 48u8, 173u8, 255u8, 103u8, 33u8, 160u8, 20u8, 252u8, 87u8], + [12u8, 127u8, 161u8, 71u8, 193u8, 20u8, 52u8, 60u8, 7u8, 250u8, 171u8, 248u8, 102u8, 63u8, 89u8, 110u8, 161u8, 186u8, 178u8, 179u8, 81u8, 217u8, 123u8, 227u8, 83u8, 133u8, 35u8, 195u8, 117u8, 158u8, 192u8, 79u8, 27u8, 90u8, 101u8, 223u8, 238u8, 40u8, 146u8, 190u8, 102u8, 216u8, 219u8, 123u8, 133u8, 65u8, 21u8, 58u8, 139u8, 8u8, 238u8, 22u8, 31u8, 66u8, 244u8, 1u8, 150u8, 37u8, 149u8, 84u8, 119u8, 81u8, 97u8, 211u8], + [21u8, 196u8, 79u8, 77u8, 215u8, 114u8, 152u8, 50u8, 230u8, 160u8, 112u8, 202u8, 81u8, 63u8, 178u8, 166u8, 148u8, 234u8, 158u8, 71u8, 56u8, 255u8, 158u8, 243u8, 88u8, 249u8, 40u8, 216u8, 58u8, 176u8, 81u8, 235u8, 8u8, 95u8, 140u8, 190u8, 153u8, 233u8, 27u8, 211u8, 105u8, 60u8, 17u8, 104u8, 6u8, 67u8, 143u8, 18u8, 146u8, 81u8, 56u8, 231u8, 186u8, 65u8, 88u8, 203u8, 206u8, 18u8, 140u8, 253u8, 168u8, 156u8, 205u8, 202u8], + [1u8, 220u8, 136u8, 107u8, 234u8, 229u8, 110u8, 15u8, 19u8, 252u8, 101u8, 89u8, 145u8, 127u8, 168u8, 103u8, 114u8, 129u8, 21u8, 236u8, 105u8, 109u8, 250u8, 24u8, 8u8, 2u8, 76u8, 153u8, 72u8, 166u8, 62u8, 185u8, 26u8, 3u8, 76u8, 187u8, 122u8, 207u8, 21u8, 139u8, 1u8, 151u8, 175u8, 191u8, 85u8, 17u8, 49u8, 182u8, 107u8, 40u8, 235u8, 108u8, 152u8, 200u8, 245u8, 131u8, 109u8, 108u8, 241u8, 0u8, 123u8, 109u8, 233u8, 143u8], + [0u8, 55u8, 22u8, 247u8, 50u8, 139u8, 254u8, 255u8, 146u8, 25u8, 188u8, 212u8, 237u8, 18u8, 217u8, 137u8, 84u8, 169u8, 209u8, 87u8, 13u8, 54u8, 245u8, 13u8, 217u8, 140u8, 219u8, 23u8, 204u8, 190u8, 165u8, 104u8, 32u8, 148u8, 164u8, 101u8, 71u8, 148u8, 213u8, 70u8, 132u8, 211u8, 1u8, 24u8, 130u8, 190u8, 25u8, 120u8, 123u8, 194u8, 143u8, 55u8, 57u8, 246u8, 37u8, 241u8, 242u8, 106u8, 127u8, 11u8, 25u8, 65u8, 239u8, 71u8], + [36u8, 85u8, 179u8, 115u8, 28u8, 121u8, 35u8, 7u8, 122u8, 136u8, 2u8, 222u8, 97u8, 155u8, 55u8, 246u8, 113u8, 68u8, 9u8, 144u8, 30u8, 160u8, 67u8, 227u8, 242u8, 154u8, 225u8, 154u8, 130u8, 110u8, 168u8, 118u8, 5u8, 255u8, 233u8, 16u8, 202u8, 47u8, 192u8, 215u8, 35u8, 87u8, 34u8, 152u8, 237u8, 66u8, 240u8, 240u8, 146u8, 156u8, 150u8, 248u8, 140u8, 199u8, 65u8, 245u8, 147u8, 123u8, 110u8, 50u8, 25u8, 216u8, 44u8, 147u8], ] }; diff --git a/zk-id/tests/circuit.rs b/zk-id/tests/circuit.rs index 613f0c7..a939fff 100644 --- a/zk-id/tests/circuit.rs +++ b/zk-id/tests/circuit.rs @@ -3,7 +3,7 @@ use groth16_solana::groth16::Groth16Verifier; use groth16_solana::proof_parser::circom_prover::{convert_proof, convert_public_inputs}; use light_compressed_account::compressed_account::{CompressedAccount, CompressedAccountData}; use light_compressed_account::Pubkey; -use light_hasher::{hash_to_field_size::hash_to_bn254_field_size_be, Poseidon}; +use light_hasher::{hash_to_field_size::hash_to_bn254_field_size_be, Hasher, Poseidon, Sha256}; use light_merkle_tree_reference::MerkleTree; use num_bigint::BigUint; use std::collections::HashMap; @@ -24,25 +24,44 @@ use zk_id::verifying_key::VERIFYINGKEY; /// * `compressed_account` - The compressed account to convert to circuit inputs /// * `merkle_tree_pubkey` - The public key of the Merkle tree /// * `leaf_index` - The index of the leaf in the Merkle tree +/// * `issuer_pubkey` - The issuer's public key +/// * `credential_pubkey` - The credential public key (private input) +/// * `encrypted_data` - The encrypted data fn add_compressed_account_to_circuit_inputs( inputs: &mut HashMap>, compressed_account: &CompressedAccount, merkle_tree_pubkey: &Pubkey, leaf_index: u32, + issuer_pubkey: &Pubkey, + credential_pubkey: &Pubkey, + encrypted_data: &[u8], ) { // Extract data from compressed account let owner = compressed_account.owner; - let (discriminator, data_hash) = if let Some(ref data) = compressed_account.data { - (data.discriminator, data.data_hash) + let discriminator = if let Some(ref data) = compressed_account.data { + data.discriminator } else { - ([0u8; 8], [0u8; 32]) + [0u8; 8] }; - // Hash owner and merkle tree pubkey for circuit - the circuit expects hashed values + // Hash values for circuit let owner_hashed = hash_to_bn254_field_size_be(owner.as_ref()); let merkle_tree_hashed = hash_to_bn254_field_size_be(merkle_tree_pubkey.as_ref()); + let issuer_hashed = hash_to_bn254_field_size_be(issuer_pubkey.as_ref()); + let credential_pubkey_hashed = hash_to_bn254_field_size_be(credential_pubkey.as_ref()); - // Add all compressed account inputs to the HashMap + // Hash encrypted_data with SHA256 and truncate (set first byte to 0) + let mut encrypted_data_hash = Sha256::hash(encrypted_data).unwrap(); + encrypted_data_hash[0] = 0; + + // Compute public_data_hash (hash of issuer and credential pubkey) + let public_data_hash = Poseidon::hashv(&[ + issuer_hashed.as_slice(), + credential_pubkey_hashed.as_slice(), + ]) + .unwrap(); + + // Add all inputs to the HashMap inputs.insert( "owner_hashed".to_string(), vec![BigUint::from_bytes_be(&owner_hashed).to_string()], @@ -57,8 +76,24 @@ fn add_compressed_account_to_circuit_inputs( vec![BigUint::from_bytes_be(&discriminator).to_string()], ); inputs.insert( - "data_hash".to_string(), - vec![BigUint::from_bytes_be(&data_hash).to_string()], + "issuer_hashed".to_string(), + vec![BigUint::from_bytes_be(&issuer_hashed).to_string()], + ); + inputs.insert( + "credential_pubkey_hashed".to_string(), + vec![BigUint::from_bytes_be(&credential_pubkey_hashed).to_string()], + ); + inputs.insert( + "encrypted_data_hash".to_string(), + vec![BigUint::from_bytes_be(&encrypted_data_hash).to_string()], + ); + inputs.insert( + "public_encrypted_data_hash".to_string(), + vec![BigUint::from_bytes_be(&encrypted_data_hash).to_string()], + ); + inputs.insert( + "public_data_hash".to_string(), + vec![BigUint::from_bytes_be(&public_data_hash).to_string()], ); } @@ -92,10 +127,22 @@ fn add_merkle_proof_to_circuit_inputs( fn test_compressed_account_merkle_proof_circuit() { let zkey_path = "./build/compressed_account_merkle_proof_final.zkey".to_string(); - // Create compressed account + // Create test data let owner = Pubkey::new_from_array([1u8; 32]); let merkle_tree_pubkey = Pubkey::new_from_array([2u8; 32]); let leaf_index: u32 = 0; + let issuer_pubkey = Pubkey::new_from_array([4u8; 32]); + let credential_pubkey = Pubkey::new_from_array([5u8; 32]); + let encrypted_data = vec![6u8; 64]; + + // Compute data_hash as hash of issuer and credential + let issuer_hashed = hash_to_bn254_field_size_be(issuer_pubkey.as_ref()); + let credential_pubkey_hashed = hash_to_bn254_field_size_be(credential_pubkey.as_ref()); + let data_hash = Poseidon::hashv(&[ + issuer_hashed.as_slice(), + credential_pubkey_hashed.as_slice(), + ]) + .unwrap(); let compressed_account = CompressedAccount { owner, @@ -104,7 +151,7 @@ fn test_compressed_account_merkle_proof_circuit() { data: Some(CompressedAccountData { discriminator: [1u8; 8], data: vec![], - data_hash: [3u8; 32], + data_hash, }), }; @@ -128,6 +175,9 @@ fn test_compressed_account_merkle_proof_circuit() { &compressed_account, &merkle_tree_pubkey, leaf_index, + &issuer_pubkey, + &credential_pubkey, + &encrypted_data, ); add_merkle_proof_to_circuit_inputs(&mut proof_inputs, &merkle_proof_hashes, &merkle_root); @@ -151,10 +201,22 @@ fn test_compressed_account_merkle_proof_circuit() { fn test_invalid_proof_rejected() { let zkey_path = "./build/compressed_account_merkle_proof_final.zkey".to_string(); - // Create compressed account + // Create test data let owner = Pubkey::new_from_array([1u8; 32]); let merkle_tree_pubkey = Pubkey::new_from_array([2u8; 32]); let leaf_index: u32 = 0; + let issuer_pubkey = Pubkey::new_from_array([4u8; 32]); + let credential_pubkey = Pubkey::new_from_array([5u8; 32]); + let encrypted_data = vec![6u8; 64]; + + // Compute data_hash as hash of issuer and credential + let issuer_hashed = hash_to_bn254_field_size_be(issuer_pubkey.as_ref()); + let credential_pubkey_hashed = hash_to_bn254_field_size_be(credential_pubkey.as_ref()); + let data_hash = Poseidon::hashv(&[ + issuer_hashed.as_slice(), + credential_pubkey_hashed.as_slice(), + ]) + .unwrap(); let compressed_account = CompressedAccount { owner, @@ -163,7 +225,7 @@ fn test_invalid_proof_rejected() { data: Some(CompressedAccountData { discriminator: [1u8; 8], data: vec![], - data_hash: [3u8; 32], + data_hash, }), }; @@ -185,6 +247,9 @@ fn test_invalid_proof_rejected() { &compressed_account, &merkle_tree_pubkey, leaf_index, + &issuer_pubkey, + &credential_pubkey, + &encrypted_data, ); let invalid_root = [0u8; 32]; @@ -211,10 +276,22 @@ fn test_invalid_proof_rejected() { fn test_groth16_solana_verification() { let zkey_path = "./build/compressed_account_merkle_proof_final.zkey".to_string(); - // Create compressed account + // Create test data let owner = Pubkey::new_from_array([1u8; 32]); let merkle_tree_pubkey = Pubkey::new_from_array([2u8; 32]); let leaf_index: u32 = 0; + let issuer_pubkey = Pubkey::new_from_array([4u8; 32]); + let credential_pubkey = Pubkey::new_from_array([5u8; 32]); + let encrypted_data = vec![6u8; 64]; + + // Compute data_hash as hash of issuer and credential + let issuer_hashed = hash_to_bn254_field_size_be(issuer_pubkey.as_ref()); + let credential_pubkey_hashed = hash_to_bn254_field_size_be(credential_pubkey.as_ref()); + let data_hash = Poseidon::hashv(&[ + issuer_hashed.as_slice(), + credential_pubkey_hashed.as_slice(), + ]) + .unwrap(); let compressed_account = CompressedAccount { owner, @@ -223,7 +300,7 @@ fn test_groth16_solana_verification() { data: Some(CompressedAccountData { discriminator: [1u8; 8], data: vec![], - data_hash: [3u8; 32], + data_hash, }), }; @@ -247,6 +324,9 @@ fn test_groth16_solana_verification() { &compressed_account, &merkle_tree_pubkey, leaf_index, + &issuer_pubkey, + &credential_pubkey, + &encrypted_data, ); add_merkle_proof_to_circuit_inputs(&mut proof_inputs, &merkle_proof_hashes, &merkle_root); @@ -267,7 +347,7 @@ fn test_groth16_solana_verification() { // Convert proof and public inputs to groth16-solana format let (proof_a, proof_b, proof_c) = convert_proof(&proof.proof).expect("Failed to convert proof"); - let public_inputs: [[u8; 32]; 5] = convert_public_inputs(&proof.pub_inputs); + let public_inputs: [[u8; 32]; 7] = convert_public_inputs(&proof.pub_inputs); // Verify with groth16-solana let mut verifier = From d261f5dbd0d7b6afa21beb41858490a971d9519a Mon Sep 17 00:00:00 2001 From: ananas Date: Mon, 20 Oct 2025 03:51:20 +0100 Subject: [PATCH 09/14] fixed test --- zk-id/Cargo.lock | 397 +++++------- zk-id/Cargo.toml | 20 +- zk-id/build.rs | 20 +- .../compressed_account_merkle_proof.circom | 17 +- zk-id/src/lib.rs | 43 +- zk-id/src/verifying_key.rs | 18 +- zk-id/tests/circuit.rs | 71 ++- zk-id/tests/test.rs | 570 ++++++++++++------ 8 files changed, 666 insertions(+), 490 deletions(-) diff --git a/zk-id/Cargo.lock b/zk-id/Cargo.lock index 3f23756..46a0862 100644 --- a/zk-id/Cargo.lock +++ b/zk-id/Cargo.lock @@ -18,11 +18,11 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0133fd66fc7bc5f78e566ce55e507f4b66a63ae18a719de86628c1986c80bca8" dependencies = [ - "aligned-sized", + "aligned-sized 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "anchor-lang", "bytemuck", "light-account-checks 0.3.0", - "light-batched-merkle-tree 0.3.0", + "light-batched-merkle-tree", "light-bounded-vec", "light-compressed-account 0.3.0", "light-concurrent-merkle-tree 2.1.0", @@ -148,6 +148,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "aligned-sized" +version = "1.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.107", +] + [[package]] name = "aligned-sized" version = "1.1.0" @@ -340,21 +349,6 @@ dependencies = [ "serde", ] -[[package]] -name = "anchor-spl" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c08cb5d762c0694f74bd02c9a5b04ea53cefc496e2c27b3234acffca5cd076b" -dependencies = [ - "anchor-lang", - "spl-associated-token-account 6.0.0", - "spl-pod", - "spl-token 7.0.0", - "spl-token-2022 6.0.0", - "spl-token-group-interface 0.5.0", - "spl-token-metadata-interface 0.6.0", -] - [[package]] name = "anchor-syn" version = "0.31.1" @@ -2624,8 +2618,6 @@ dependencies = [ [[package]] name = "light-account-checks" version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6024d5fe8d30f940dbdaf64b8de62a0c5ed4b6d7920179f84925085f85ca3f8f" dependencies = [ "solana-account-info", "solana-msg", @@ -2635,21 +2627,28 @@ dependencies = [ "thiserror 2.0.17", ] +[[package]] +name = "light-array-map" +version = "0.1.0" +dependencies = [ + "tinyvec", +] + [[package]] name = "light-batched-merkle-tree" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81c7e179246468b09bf5c6882ef33043e178ff90eb6eab0c1c4c3623ef84b154" dependencies = [ - "aligned-sized", + "aligned-sized 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "borsh 0.10.4", "light-account-checks 0.3.0", - "light-bloom-filter 0.3.0", + "light-bloom-filter", "light-compressed-account 0.3.0", "light-hasher 3.1.0", - "light-macros", + "light-macros 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "light-merkle-tree-metadata 0.3.0", - "light-verifier 2.1.0", + "light-verifier", "light-zero-copy 0.2.0", "solana-account-info", "solana-msg", @@ -2660,31 +2659,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "light-batched-merkle-tree" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28657736ca8ad2d71d32015dc9dd85a111c4ed75ba6133ba6ba8c632f63d26ff" -dependencies = [ - "aligned-sized", - "borsh 0.10.4", - "light-account-checks 0.4.0", - "light-bloom-filter 0.4.0", - "light-compressed-account 0.5.0", - "light-hasher 4.0.0", - "light-macros", - "light-merkle-tree-metadata 0.5.0", - "light-verifier 4.0.0", - "light-zero-copy 0.4.0", - "solana-account-info", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "solana-sysvar", - "thiserror 2.0.17", - "zerocopy", -] - [[package]] name = "light-bloom-filter" version = "0.3.0" @@ -2698,19 +2672,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "light-bloom-filter" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd2f80682ff403477cfc6ee2f26b423e56e7f4d362543783825fe71bcf0f30cd" -dependencies = [ - "bitvec", - "num-bigint 0.4.6", - "solana-nostd-keccak", - "solana-program-error", - "thiserror 2.0.17", -] - [[package]] name = "light-bounded-vec" version = "2.0.0" @@ -2726,8 +2687,6 @@ dependencies = [ [[package]] name = "light-client" version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2420f5cabb1f8c4f26c4c50054ea51522507d2bada462e8c50cbff66d0f64b4" dependencies = [ "async-trait", "base64 0.13.1", @@ -2737,6 +2696,7 @@ dependencies = [ "lazy_static", "light-compressed-account 0.5.0", "light-concurrent-merkle-tree 3.0.0", + "light-event", "light-hasher 4.0.0", "light-indexed-merkle-tree 3.0.0", "light-merkle-tree-metadata 0.5.0", @@ -2781,7 +2741,7 @@ dependencies = [ "borsh 0.10.4", "bytemuck", "light-hasher 3.1.0", - "light-macros", + "light-macros 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "light-zero-copy 0.2.0", "solana-program-error", "solana-pubkey", @@ -2792,41 +2752,83 @@ dependencies = [ [[package]] name = "light-compressed-account" version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0985921012ffc149596eac90d1170399bb70dbebfa2212bb72b2da30a558ec6" dependencies = [ "anchor-lang", "borsh 0.10.4", "bytemuck", "light-hasher 4.0.0", - "light-macros", + "light-macros 2.1.0", + "light-poseidon 0.3.0", "light-program-profiler", "light-zero-copy 0.4.0", + "pinocchio", "solana-msg", "solana-program-error", "solana-pubkey", "thiserror 2.0.17", + "tinyvec", "zerocopy", ] [[package]] -name = "light-compressed-token" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9ea8f8e9fb7c69ed05ee7899361de7b9ea2dbd08252348871a4a631aabe451" +name = "light-compressed-token-sdk" +version = "0.1.0" dependencies = [ - "account-compression", - "anchor-lang", - "anchor-spl", - "light-compressed-account 0.3.0", - "light-hasher 3.1.0", - "light-heap", - "light-system-program-anchor", - "light-zero-copy 0.2.0", - "solana-sdk", - "solana-security-txt", - "spl-token 7.0.0", + "arrayvec", + "borsh 0.10.4", + "light-account-checks 0.4.0", + "light-compressed-account 0.5.0", + "light-compressed-token-types", + "light-ctoken-types", + "light-macros 2.1.0", + "light-program-profiler", + "light-sdk", + "light-sdk-types", + "light-zero-copy 0.4.0", + "solana-account-info", + "solana-cpi", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-pod", "spl-token-2022 7.0.0", + "thiserror 2.0.17", +] + +[[package]] +name = "light-compressed-token-types" +version = "0.1.0" +dependencies = [ + "borsh 0.10.4", + "light-account-checks 0.4.0", + "light-compressed-account 0.5.0", + "light-macros 2.1.0", + "light-sdk-types", + "solana-msg", + "thiserror 2.0.17", +] + +[[package]] +name = "light-compressible" +version = "0.1.0" +dependencies = [ + "aligned-sized 1.1.0", + "borsh 0.10.4", + "bytemuck", + "light-account-checks 0.4.0", + "light-compressed-account 0.5.0", + "light-hasher 4.0.0", + "light-macros 2.1.0", + "light-program-profiler", + "light-zero-copy 0.4.0", + "pinocchio", + "pinocchio-pubkey", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "solana-sysvar", + "thiserror 2.0.17", "zerocopy", ] @@ -2847,8 +2849,6 @@ dependencies = [ [[package]] name = "light-concurrent-merkle-tree" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d647f56701f1c634a70900484be6111cf661c8937785073471d489b05d868c" dependencies = [ "borsh 0.10.4", "light-bounded-vec", @@ -2858,6 +2858,43 @@ dependencies = [ "thiserror 2.0.17", ] +[[package]] +name = "light-ctoken-types" +version = "0.1.0" +dependencies = [ + "aligned-sized 1.1.0", + "borsh 0.10.4", + "bytemuck", + "light-array-map", + "light-compressed-account 0.5.0", + "light-compressible", + "light-hasher 4.0.0", + "light-macros 2.1.0", + "light-program-profiler", + "light-zero-copy 0.4.0", + "pinocchio", + "pinocchio-pubkey", + "solana-account-info", + "solana-msg", + "solana-pubkey", + "spl-pod", + "spl-token-2022 7.0.0", + "thiserror 2.0.17", + "tinyvec", + "zerocopy", +] + +[[package]] +name = "light-event" +version = "0.1.0" +dependencies = [ + "borsh 0.10.4", + "light-compressed-account 0.5.0", + "light-hasher 4.0.0", + "light-zero-copy 0.4.0", + "thiserror 2.0.17", +] + [[package]] name = "light-hash-set" version = "2.1.0" @@ -2894,30 +2931,17 @@ dependencies = [ [[package]] name = "light-hasher" version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7b8b99f626dbfe0e9731a214e2b2e8990341f5fdb249744661ab7f3029d9859" dependencies = [ "ark-bn254 0.5.0", "ark-ff 0.5.0", - "arrayvec", "borsh 0.10.4", "light-poseidon 0.3.0", "num-bigint 0.4.6", "sha2 0.10.9", "sha3", - "solana-nostd-keccak", "solana-program-error", - "solana-pubkey", "thiserror 2.0.17", -] - -[[package]] -name = "light-heap" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d28744e8876667e9ec8124c6b0fae425972a987648bd5e8de720dbe1323d5fe" -dependencies = [ - "anchor-lang", + "tinyvec", ] [[package]] @@ -2935,8 +2959,6 @@ dependencies = [ [[package]] name = "light-indexed-array" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271ba5b246a77e0d4797d6f1752ec3ca627b2359a669189c198f5e104951d928" dependencies = [ "light-hasher 4.0.0", "num-bigint 0.4.6", @@ -2963,8 +2985,6 @@ dependencies = [ [[package]] name = "light-indexed-merkle-tree" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2d75ca453b5f75de51384386cb719402609ba6225ca28d65ea5d071297a5138" dependencies = [ "light-bounded-vec", "light-concurrent-merkle-tree 3.0.0", @@ -2976,6 +2996,17 @@ dependencies = [ "thiserror 2.0.17", ] +[[package]] +name = "light-macros" +version = "2.1.0" +dependencies = [ + "bs58", + "proc-macro2", + "quote", + "solana-pubkey", + "syn 2.0.107", +] + [[package]] name = "light-macros" version = "2.1.0" @@ -3008,8 +3039,6 @@ dependencies = [ [[package]] name = "light-merkle-tree-metadata" version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cdc5dab70d1b821a3d77a7f6b074e83b8a5d966aa457487f49ab8b23cd84349" dependencies = [ "anchor-lang", "borsh 0.10.4", @@ -3038,8 +3067,6 @@ dependencies = [ [[package]] name = "light-merkle-tree-reference" version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93b3c707e7d506c1c0f1d94520c5d8d93eb59eb599ead658a7eb22416c04a590" dependencies = [ "light-hasher 4.0.0", "light-indexed-array 0.2.0", @@ -3095,30 +3122,29 @@ dependencies = [ [[package]] name = "light-program-test" version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527dc265e6151d89f4d4a2c2ddb52a164969c41bfb3a91296dcaadbc81635cd2" dependencies = [ - "account-compression", "anchor-lang", "async-trait", + "base64 0.22.1", "borsh 0.10.4", "bs58", "bytemuck", "chrono", - "light-batched-merkle-tree 0.5.0", "light-client", "light-compressed-account 0.5.0", - "light-compressed-token", - "light-concurrent-merkle-tree 3.0.0", + "light-compressed-token-sdk", + "light-compressible", + "light-ctoken-types", + "light-event", "light-hasher 4.0.0", "light-indexed-array 0.2.0", "light-indexed-merkle-tree 3.0.0", "light-merkle-tree-metadata 0.5.0", "light-merkle-tree-reference 3.0.1", "light-prover-client", - "light-registry", "light-sdk", "light-sdk-types", + "light-zero-copy 0.4.0", "litesvm", "log", "num-bigint 0.4.6", @@ -3138,6 +3164,7 @@ dependencies = [ "solana-transaction", "solana-transaction-status", "solana-transaction-status-client-types", + "spl-token-2022 7.0.0", "tabled", "tokio", ] @@ -3145,8 +3172,6 @@ dependencies = [ [[package]] name = "light-prover-client" version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9c91b395efa177040d8b156cba267bafa63b09b63b65c46444385a90c0e5684" dependencies = [ "ark-bn254 0.5.0", "ark-serialize 0.5.0", @@ -3165,34 +3190,16 @@ dependencies = [ "tracing", ] -[[package]] -name = "light-registry" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3e904173f6b8048e6fe4d25ddfe6a77586b284f8788e5141cd3486a09ce8a6" -dependencies = [ - "account-compression", - "aligned-sized", - "anchor-lang", - "light-batched-merkle-tree 0.3.0", - "light-merkle-tree-metadata 0.3.0", - "light-system-program-anchor", - "solana-sdk", - "solana-security-txt", -] - [[package]] name = "light-sdk" version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41a2dfba0f29b02c33831a1c61070610dcb53e5b3a9403a8b7a6bb4292ce6fb7" dependencies = [ "anchor-lang", "borsh 0.10.4", "light-account-checks 0.4.0", "light-compressed-account 0.5.0", "light-hasher 4.0.0", - "light-macros", + "light-macros 2.1.0", "light-sdk-macros", "light-sdk-types", "light-zero-copy 0.4.0", @@ -3209,11 +3216,8 @@ dependencies = [ [[package]] name = "light-sdk-macros" version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c98682c853cdfd979b7e7ccef5ee21ebba60c3fecf6741dfa71416026e9ad504" dependencies = [ "light-hasher 4.0.0", - "light-poseidon 0.3.0", "proc-macro2", "quote", "solana-pubkey", @@ -3223,16 +3227,13 @@ dependencies = [ [[package]] name = "light-sdk-types" version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d5536c1dd2a81459fef69286318bee7faf2d51ca24089249dceff21ec483829" dependencies = [ "anchor-lang", "borsh 0.10.4", "light-account-checks 0.4.0", "light-compressed-account 0.5.0", "light-hasher 4.0.0", - "light-macros", - "light-zero-copy 0.4.0", + "light-macros 2.1.0", "solana-msg", "thiserror 2.0.17", ] @@ -3240,8 +3241,6 @@ dependencies = [ [[package]] name = "light-sparse-merkle-tree" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721396404dbb3556b5c14102736ef840188ade960098ea3222c68945767ca030" dependencies = [ "light-hasher 4.0.0", "light-indexed-array 0.2.0", @@ -3250,20 +3249,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "light-system-program-anchor" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1214b57abe1d89139f7ca632b66d4a8fc0e89945e781291a5cb12eb16de49cf3" -dependencies = [ - "account-compression", - "aligned-sized", - "anchor-lang", - "light-compressed-account 0.3.0", - "light-zero-copy 0.2.0", - "zerocopy", -] - [[package]] name = "light-verifier" version = "2.1.0" @@ -3275,17 +3260,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "light-verifier" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26398153a8c0fa61957a9ad046b3a433c401a37e0e0e9c8d42dee097fa76ce65" -dependencies = [ - "groth16-solana 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "light-compressed-account 0.5.0", - "thiserror 2.0.17", -] - [[package]] name = "light-zero-copy" version = "0.2.0" @@ -3300,19 +3274,14 @@ dependencies = [ [[package]] name = "light-zero-copy" version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f4167c97f1291176414af783c01b647292d809ec14f991884c6d91b9ca2213e" dependencies = [ "light-zero-copy-derive", - "solana-program-error", "zerocopy", ] [[package]] name = "light-zero-copy-derive" version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552463371ee2a6383882b17f7ed1a6803dbc9cb3c0188e0c74a014c2eb22f29e" dependencies = [ "lazy_static", "proc-macro2", @@ -3825,8 +3794,6 @@ dependencies = [ [[package]] name = "photon-api" version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503b549aede7d9f35752046b9a32d8dfc1c7acec3c304a012c8b3134d5b98e37" dependencies = [ "reqwest 0.12.24", "serde", @@ -3869,6 +3836,23 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pinocchio" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b971851087bc3699b001954ad02389d50c41405ece3548cbcafc88b3e20017a" + +[[package]] +name = "pinocchio-pubkey" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0225638cadcbebae8932cb7f49cb5da7c15c21beb19f048f05a5ca7d93f065" +dependencies = [ + "five8_const", + "pinocchio", + "sha2-const-stable", +] + [[package]] name = "pkg-config" version = "0.3.32" @@ -4713,6 +4697,12 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha2-const-stable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f179d4e11094a893b82fff208f74d448a7512f99f5a0acbd5c679b705f83ed9" + [[package]] name = "sha3" version = "0.10.8" @@ -6836,7 +6826,7 @@ dependencies = [ "solana-transaction-error", "solana-transaction-status-client-types", "solana-vote-interface", - "spl-associated-token-account 7.0.0", + "spl-associated-token-account", "spl-memo", "spl-token 8.0.0", "spl-token-2022 8.0.1", @@ -7061,22 +7051,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "spl-associated-token-account" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76fee7d65013667032d499adc3c895e286197a35a0d3a4643c80e7fd3e9969e3" -dependencies = [ - "borsh 1.5.7", - "num-derive", - "num-traits", - "solana-program", - "spl-associated-token-account-client", - "spl-token 7.0.0", - "spl-token-2022 6.0.0", - "thiserror 1.0.69", -] - [[package]] name = "spl-associated-token-account" version = "7.0.0" @@ -7358,34 +7332,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "spl-token-2022" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b27f7405010ef816587c944536b0eafbcc35206ab6ba0f2ca79f1d28e488f4f" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive", - "num-traits", - "num_enum", - "solana-program", - "solana-security-txt", - "solana-zk-sdk", - "spl-elgamal-registry 0.1.1", - "spl-memo", - "spl-pod", - "spl-token 7.0.0", - "spl-token-confidential-transfer-ciphertext-arithmetic 0.2.1", - "spl-token-confidential-transfer-proof-extraction 0.2.1", - "spl-token-confidential-transfer-proof-generation 0.2.0", - "spl-token-group-interface 0.5.0", - "spl-token-metadata-interface 0.6.0", - "spl-transfer-hook-interface 0.9.0", - "spl-type-length-value 0.7.0", - "thiserror 1.0.69", -] - [[package]] name = "spl-token-2022" version = "7.0.0" @@ -7516,17 +7462,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "spl-token-confidential-transfer-proof-generation" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8627184782eec1894de8ea26129c61303f1f0adeed65c20e0b10bc584f09356d" -dependencies = [ - "curve25519-dalek 4.1.3", - "solana-zk-sdk", - "thiserror 1.0.69", -] - [[package]] name = "spl-token-confidential-transfer-proof-generation" version = "0.3.0" diff --git a/zk-id/Cargo.toml b/zk-id/Cargo.toml index abd0f6d..e48e7b6 100644 --- a/zk-id/Cargo.toml +++ b/zk-id/Cargo.toml @@ -14,28 +14,30 @@ test-sbf = [] [dependencies] anchor-lang = "0.31.1" borsh = "0.10.4" -light-sdk = { version = "0.15.0", features = ["anchor", "v2"] } -light-hasher = { version = "4.0.0", features = ["solana"] } -light-sdk-types = "0.15.0" -light-compressed-account = {version = "0.5.0"} -light-concurrent-merkle-tree = "2" +light-sdk = { path = "/Users/ananas/dev/light-protocol3/sdk-libs/sdk", features = ["anchor", "poseidon"] } +light-hasher = { path = "/Users/ananas/dev/light-protocol3/program-libs/hasher" } +light-sdk-types = { path = "/Users/ananas/dev/light-protocol3/sdk-libs/sdk-types" } +light-compressed-account = { path = "/Users/ananas/dev/light-protocol3/program-libs/compressed-account" } # use cpi feature to avoid custom allocator conflict issues account-compression = { version = "2", features = ["cpi"] } groth16-solana = { path = "/Users/ananas/dev/groth16-solana" } +light-concurrent-merkle-tree = "2" [dev-dependencies] -light-program-test = "0.15.0" -light-client = "0.15.0" +light-program-test = { path = "/Users/ananas/dev/light-protocol3/sdk-libs/program-test" } +light-client = { path = "/Users/ananas/dev/light-protocol3/sdk-libs/client" } tokio = "1.40.0" solana-sdk = "2.2" circom-prover = "0.1" rust-witness = "0.1" num-bigint = "0.4" serde_json = "1.0" -light-merkle-tree-reference = "3.0.0" -light-compressed-account = {version = "0.5.0", features = ["new-unique"]} +light-compressed-account = { path = "/Users/ananas/dev/light-protocol3/program-libs/compressed-account", features = ["new-unique"] } +light-merkle-tree-reference= { path = "/Users/ananas/dev/light-protocol3/program-tests/merkle-tree" } groth16-solana = { path = "/Users/ananas/dev/groth16-solana", features = ["vk", "circom"] } [build-dependencies] + +[target.'cfg(not(target_os = "solana"))'.build-dependencies] rust-witness = "0.1" groth16-solana = { path = "/Users/ananas/dev/groth16-solana", features = ["vk"] } diff --git a/zk-id/build.rs b/zk-id/build.rs index c33643f..65cdd88 100644 --- a/zk-id/build.rs +++ b/zk-id/build.rs @@ -12,17 +12,21 @@ fn main() { if std::path::Path::new(vk_json_path).exists() { generate_vk_file(vk_json_path, output_dir, output_file) .expect("Failed to generate verifying key Rust file"); - println!("cargo:warning=Generated verifying_key.rs from verification_key.json"); + // Successfully generated verifying_key.rs } else { println!("cargo:warning=Verification key JSON not found. Run './scripts/setup.sh' first."); } - // Transpile the WebAssembly witness generators for Circom circuits - let witness_wasm_dir = "./build/compressed_account_merkle_proof_js"; - if std::path::Path::new(witness_wasm_dir).exists() { - rust_witness::transpile::transpile_wasm(witness_wasm_dir.to_string()); - println!("cargo:warning=Transpiled witness generator"); - } else { - println!("cargo:warning=Witness WASM not found. Run './scripts/setup.sh' first."); + // Only transpile witness generators for non-Solana targets + // Check the TARGET environment variable since build scripts run on the host + let target = std::env::var("TARGET").unwrap_or_default(); + if !target.contains("sbf") && !target.contains("solana") { + let witness_wasm_dir = "./build/compressed_account_merkle_proof_js"; + if std::path::Path::new(witness_wasm_dir).exists() { + rust_witness::transpile::transpile_wasm(witness_wasm_dir.to_string()); + // Successfully transpiled witness generator + } else { + println!("cargo:warning=Witness WASM not found. Run './scripts/setup.sh' first."); + } } } diff --git a/zk-id/circuits/compressed_account_merkle_proof.circom b/zk-id/circuits/compressed_account_merkle_proof.circom index c1b90df..390d18a 100644 --- a/zk-id/circuits/compressed_account_merkle_proof.circom +++ b/zk-id/circuits/compressed_account_merkle_proof.circom @@ -11,18 +11,20 @@ template CompressedAccountHash() { signal input owner_hashed; signal input leaf_index; signal input merkle_tree_hashed; + signal input address; signal input discriminator; signal input data_hash; signal output hash; - component poseidon = Poseidon(5); + component poseidon = Poseidon(6); poseidon.inputs[0] <== owner_hashed; poseidon.inputs[1] <== leaf_index; poseidon.inputs[2] <== merkle_tree_hashed; - poseidon.inputs[3] <== discriminator + 36893488147419103232; // + discriminator domain - poseidon.inputs[4] <== data_hash; + poseidon.inputs[3] <== address; + poseidon.inputs[4] <== discriminator + 36893488147419103232; // + discriminator domain + poseidon.inputs[5] <== data_hash; hash <== poseidon.out; } @@ -61,6 +63,8 @@ template CompressedAccountMerkleProof(levels) { // Compressed account inputs signal input owner_hashed; signal input leaf_index; + signal input account_leaf_index; + signal input address; signal input merkle_tree_hashed; signal input discriminator; signal input issuer_hashed; @@ -81,7 +85,8 @@ template CompressedAccountMerkleProof(levels) { // Step 1: Compute compressed account hash component accountHasher = CompressedAccountHash(); accountHasher.owner_hashed <== owner_hashed; - accountHasher.leaf_index <== leaf_index; + accountHasher.leaf_index <== account_leaf_index; + accountHasher.address <== address; accountHasher.merkle_tree_hashed <== merkle_tree_hashed; accountHasher.discriminator <== discriminator; accountHasher.data_hash <== data_hasher.out; @@ -106,8 +111,8 @@ component main { merkle_tree_hashed, discriminator, issuer_hashed, - expectedRoot, public_encrypted_data_hash, - public_data_hash + public_data_hash, + expectedRoot ] } = CompressedAccountMerkleProof(26); diff --git a/zk-id/src/lib.rs b/zk-id/src/lib.rs index 7cabd45..42151d3 100644 --- a/zk-id/src/lib.rs +++ b/zk-id/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unexpected_cfgs)] +#![allow(deprecated)] use account_compression::{state_merkle_tree_from_bytes_zero_copy, StateMerkleTreeAccount}; use anchor_lang::{prelude::*, AnchorDeserialize, AnchorSerialize}; @@ -9,7 +10,7 @@ use light_sdk::account::{poseidon::LightAccount as LightAccountPoseidon, LightAc use light_sdk::cpi::v1::CpiAccounts; use light_sdk::{ address::v1::derive_address, - cpi::{v2::LightSystemProgramCpi, InvokeLightSystemProgram, LightCpiInstruction}, + cpi::{v1::LightSystemProgramCpi, InvokeLightSystemProgram, LightCpiInstruction}, derive_light_cpi_signer, instruction::{account_meta::CompressedAccountMeta, PackedAddressTreeInfo, ValidityProof}, LightDiscriminator, LightHasher, @@ -22,6 +23,7 @@ pub const LIGHT_CPI_SIGNER: CpiSigner = derive_light_cpi_signer!("HNqStLMpNuNJqhBF1FbGTKHEFbBLJmq8RdJJmZKWz6jH"); pub const ISSUER: &[u8] = b"issuer"; +pub const CREDENTIAL: &[u8] = b"credential"; pub const ZK_ID_CHECK: &[u8] = b"ZK_ID_CHECK"; // Include the generated verifying key module @@ -55,7 +57,7 @@ pub mod zk_id { .map_err(|_| ErrorCode::AccountNotEnoughKeys)?, &crate::ID, ); - + msg!("address {:?}", address); let mut issuer_account = LightAccount::<'_, IssuerAccount>::new_init( &crate::ID, Some(address), @@ -72,9 +74,7 @@ pub mod zk_id { LightSystemProgramCpi::new_cpi(LIGHT_CPI_SIGNER, proof) .with_light_account(issuer_account)? - .with_new_addresses(&[ - address_tree_info.into_new_address_params_assigned_packed(address_seed, Some(0)) - ]) + .with_new_addresses(&[address_tree_info.into_new_address_params_packed(address_seed)]) .invoke(light_cpi_accounts)?; Ok(()) @@ -114,7 +114,7 @@ pub mod zk_id { .ok_or(ProgramError::ArithmeticOverflow)?; let (address, address_seed) = derive_address( - &[ISSUER, ctx.accounts.signer.key().as_ref()], + &[CREDENTIAL, credential_pubkey.as_ref()], &address_tree_info .get_tree_pubkey(&light_cpi_accounts) .map_err(|_| ErrorCode::AccountNotEnoughKeys)?, @@ -139,9 +139,7 @@ pub mod zk_id { LightSystemProgramCpi::new_cpi(LIGHT_CPI_SIGNER, proof) .with_light_account(issuer_account)? .with_light_account_poseidon(credential_account)? - .with_new_addresses(&[ - address_tree_info.into_new_address_params_assigned_packed(address_seed, Some(0)) - ]) + .with_new_addresses(&[address_tree_info.into_new_address_params_packed(address_seed)]) .invoke(light_cpi_accounts)?; Ok(()) @@ -200,23 +198,34 @@ pub mod zk_id { output_state_tree_index, ); event_account.data = encrypted_data; - let event_account_info = event_account.to_account_info()?; + + let event_account_info = event_account + .to_output_compressed_account_with_packed_context(None)? + .unwrap(); // Construct public inputs array for the circuit - // Order must match the circuit: owner_hashed, merkle_tree_hashed, discriminator, issuer_hashed, expectedRoot + // Order MUST match the circuit's public declaration exactly: + // owner_hashed, merkle_tree_hashed, discriminator, issuer_hashed, expectedRoot, public_encrypted_data_hash, public_data_hash let public_inputs: [[u8; 32]; 7] = [ account_owner_hashed, merkle_tree_hashed, discriminator, issuer_hashed, + event_account_info + .compressed_account + .data + .as_ref() + .unwrap() + .data_hash, // This is public_encrypted_data_hash + data_hash, // This is public_data_hash expected_root, - event_account_info.output.as_ref().unwrap().data_hash, - data_hash, ]; + let proof_a = decompress_g1(&credential_proof.a).map_err(|e| { let code: u32 = e.into(); Error::from(ProgramError::Custom(code)) })?; + let proof_b = decompress_g2(&credential_proof.b).map_err(|e| { let code: u32 = e.into(); Error::from(ProgramError::Custom(code)) @@ -244,13 +253,9 @@ pub mod zk_id { Error::from(ProgramError::Custom(code)) })?; - msg!("ZK proof verified successfully"); - LightSystemProgramCpi::new_cpi(LIGHT_CPI_SIGNER, proof) - .with_account_infos(&[event_account_info]) - .with_new_addresses(&[ - address_tree_info.into_new_address_params_assigned_packed(address_seed, Some(0)) - ]) + .with_output_compressed_accounts(&[event_account_info]) + .with_new_addresses(&[address_tree_info.into_new_address_params_packed(address_seed)]) .invoke(light_cpi_accounts)?; Ok(()) diff --git a/zk-id/src/verifying_key.rs b/zk-id/src/verifying_key.rs index ca97164..effad18 100644 --- a/zk-id/src/verifying_key.rs +++ b/zk-id/src/verifying_key.rs @@ -9,16 +9,16 @@ pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey { vk_gamma_g2: [25u8, 142u8, 147u8, 147u8, 146u8, 13u8, 72u8, 58u8, 114u8, 96u8, 191u8, 183u8, 49u8, 251u8, 93u8, 37u8, 241u8, 170u8, 73u8, 51u8, 53u8, 169u8, 231u8, 18u8, 151u8, 228u8, 133u8, 183u8, 174u8, 243u8, 18u8, 194u8, 24u8, 0u8, 222u8, 239u8, 18u8, 31u8, 30u8, 118u8, 66u8, 106u8, 0u8, 102u8, 94u8, 92u8, 68u8, 121u8, 103u8, 67u8, 34u8, 212u8, 247u8, 94u8, 218u8, 221u8, 70u8, 222u8, 189u8, 92u8, 217u8, 146u8, 246u8, 237u8, 9u8, 6u8, 137u8, 208u8, 88u8, 95u8, 240u8, 117u8, 236u8, 158u8, 153u8, 173u8, 105u8, 12u8, 51u8, 149u8, 188u8, 75u8, 49u8, 51u8, 112u8, 179u8, 142u8, 243u8, 85u8, 172u8, 218u8, 220u8, 209u8, 34u8, 151u8, 91u8, 18u8, 200u8, 94u8, 165u8, 219u8, 140u8, 109u8, 235u8, 74u8, 171u8, 113u8, 128u8, 141u8, 203u8, 64u8, 143u8, 227u8, 209u8, 231u8, 105u8, 12u8, 67u8, 211u8, 123u8, 76u8, 230u8, 204u8, 1u8, 102u8, 250u8, 125u8, 170u8], - vk_delta_g2: [9u8, 182u8, 194u8, 239u8, 134u8, 104u8, 17u8, 202u8, 241u8, 205u8, 236u8, 6u8, 64u8, 221u8, 138u8, 78u8, 208u8, 85u8, 135u8, 216u8, 232u8, 200u8, 74u8, 214u8, 161u8, 211u8, 86u8, 224u8, 135u8, 47u8, 46u8, 240u8, 38u8, 202u8, 49u8, 185u8, 86u8, 166u8, 237u8, 191u8, 36u8, 87u8, 88u8, 80u8, 198u8, 160u8, 109u8, 103u8, 206u8, 197u8, 9u8, 85u8, 251u8, 84u8, 0u8, 84u8, 122u8, 107u8, 207u8, 52u8, 170u8, 159u8, 6u8, 177u8, 21u8, 151u8, 177u8, 91u8, 211u8, 112u8, 141u8, 188u8, 194u8, 178u8, 84u8, 152u8, 215u8, 15u8, 37u8, 232u8, 8u8, 128u8, 55u8, 244u8, 130u8, 210u8, 243u8, 190u8, 138u8, 238u8, 202u8, 71u8, 154u8, 54u8, 179u8, 121u8, 17u8, 162u8, 164u8, 61u8, 219u8, 107u8, 133u8, 200u8, 103u8, 133u8, 194u8, 207u8, 92u8, 76u8, 90u8, 59u8, 18u8, 156u8, 221u8, 232u8, 230u8, 81u8, 95u8, 123u8, 189u8, 63u8, 188u8, 156u8, 163u8, 5u8, 108u8, 75u8], + vk_delta_g2: [21u8, 72u8, 208u8, 181u8, 233u8, 215u8, 234u8, 232u8, 113u8, 68u8, 77u8, 114u8, 103u8, 162u8, 47u8, 11u8, 120u8, 77u8, 110u8, 19u8, 67u8, 254u8, 169u8, 8u8, 191u8, 75u8, 11u8, 227u8, 210u8, 6u8, 173u8, 116u8, 45u8, 185u8, 182u8, 83u8, 53u8, 212u8, 78u8, 213u8, 69u8, 211u8, 202u8, 5u8, 201u8, 183u8, 233u8, 109u8, 204u8, 118u8, 17u8, 183u8, 24u8, 152u8, 252u8, 216u8, 43u8, 181u8, 124u8, 88u8, 151u8, 223u8, 136u8, 89u8, 6u8, 22u8, 50u8, 253u8, 219u8, 31u8, 186u8, 76u8, 70u8, 153u8, 107u8, 169u8, 85u8, 202u8, 171u8, 74u8, 160u8, 61u8, 172u8, 104u8, 190u8, 41u8, 165u8, 192u8, 39u8, 17u8, 21u8, 78u8, 131u8, 223u8, 52u8, 147u8, 19u8, 186u8, 39u8, 3u8, 160u8, 232u8, 28u8, 85u8, 253u8, 159u8, 62u8, 190u8, 149u8, 21u8, 38u8, 33u8, 245u8, 201u8, 183u8, 80u8, 156u8, 157u8, 166u8, 239u8, 220u8, 76u8, 134u8, 209u8, 85u8, 64u8, 120u8, 130u8], vk_ic: &[ - [2u8, 213u8, 234u8, 85u8, 255u8, 94u8, 145u8, 236u8, 211u8, 126u8, 45u8, 113u8, 53u8, 28u8, 169u8, 222u8, 254u8, 238u8, 227u8, 69u8, 118u8, 236u8, 77u8, 184u8, 177u8, 242u8, 0u8, 87u8, 240u8, 214u8, 168u8, 108u8, 15u8, 117u8, 191u8, 251u8, 188u8, 229u8, 83u8, 158u8, 143u8, 140u8, 236u8, 84u8, 138u8, 209u8, 63u8, 101u8, 111u8, 19u8, 202u8, 166u8, 97u8, 60u8, 28u8, 244u8, 94u8, 107u8, 197u8, 219u8, 74u8, 146u8, 152u8, 91u8], - [8u8, 61u8, 65u8, 85u8, 235u8, 27u8, 35u8, 64u8, 236u8, 91u8, 75u8, 92u8, 8u8, 82u8, 188u8, 238u8, 125u8, 100u8, 229u8, 212u8, 54u8, 185u8, 60u8, 56u8, 216u8, 219u8, 191u8, 204u8, 74u8, 27u8, 71u8, 0u8, 44u8, 119u8, 216u8, 238u8, 16u8, 173u8, 201u8, 167u8, 194u8, 153u8, 61u8, 27u8, 100u8, 170u8, 141u8, 70u8, 94u8, 145u8, 102u8, 90u8, 190u8, 169u8, 66u8, 36u8, 187u8, 210u8, 141u8, 15u8, 70u8, 12u8, 124u8, 53u8], - [46u8, 59u8, 214u8, 149u8, 229u8, 106u8, 220u8, 117u8, 176u8, 122u8, 12u8, 141u8, 228u8, 61u8, 184u8, 178u8, 56u8, 57u8, 44u8, 123u8, 185u8, 7u8, 151u8, 229u8, 64u8, 106u8, 34u8, 206u8, 200u8, 14u8, 181u8, 121u8, 27u8, 221u8, 0u8, 168u8, 179u8, 57u8, 151u8, 89u8, 54u8, 16u8, 184u8, 66u8, 128u8, 120u8, 67u8, 62u8, 99u8, 83u8, 184u8, 198u8, 32u8, 238u8, 248u8, 48u8, 173u8, 255u8, 103u8, 33u8, 160u8, 20u8, 252u8, 87u8], - [12u8, 127u8, 161u8, 71u8, 193u8, 20u8, 52u8, 60u8, 7u8, 250u8, 171u8, 248u8, 102u8, 63u8, 89u8, 110u8, 161u8, 186u8, 178u8, 179u8, 81u8, 217u8, 123u8, 227u8, 83u8, 133u8, 35u8, 195u8, 117u8, 158u8, 192u8, 79u8, 27u8, 90u8, 101u8, 223u8, 238u8, 40u8, 146u8, 190u8, 102u8, 216u8, 219u8, 123u8, 133u8, 65u8, 21u8, 58u8, 139u8, 8u8, 238u8, 22u8, 31u8, 66u8, 244u8, 1u8, 150u8, 37u8, 149u8, 84u8, 119u8, 81u8, 97u8, 211u8], - [21u8, 196u8, 79u8, 77u8, 215u8, 114u8, 152u8, 50u8, 230u8, 160u8, 112u8, 202u8, 81u8, 63u8, 178u8, 166u8, 148u8, 234u8, 158u8, 71u8, 56u8, 255u8, 158u8, 243u8, 88u8, 249u8, 40u8, 216u8, 58u8, 176u8, 81u8, 235u8, 8u8, 95u8, 140u8, 190u8, 153u8, 233u8, 27u8, 211u8, 105u8, 60u8, 17u8, 104u8, 6u8, 67u8, 143u8, 18u8, 146u8, 81u8, 56u8, 231u8, 186u8, 65u8, 88u8, 203u8, 206u8, 18u8, 140u8, 253u8, 168u8, 156u8, 205u8, 202u8], - [1u8, 220u8, 136u8, 107u8, 234u8, 229u8, 110u8, 15u8, 19u8, 252u8, 101u8, 89u8, 145u8, 127u8, 168u8, 103u8, 114u8, 129u8, 21u8, 236u8, 105u8, 109u8, 250u8, 24u8, 8u8, 2u8, 76u8, 153u8, 72u8, 166u8, 62u8, 185u8, 26u8, 3u8, 76u8, 187u8, 122u8, 207u8, 21u8, 139u8, 1u8, 151u8, 175u8, 191u8, 85u8, 17u8, 49u8, 182u8, 107u8, 40u8, 235u8, 108u8, 152u8, 200u8, 245u8, 131u8, 109u8, 108u8, 241u8, 0u8, 123u8, 109u8, 233u8, 143u8], - [0u8, 55u8, 22u8, 247u8, 50u8, 139u8, 254u8, 255u8, 146u8, 25u8, 188u8, 212u8, 237u8, 18u8, 217u8, 137u8, 84u8, 169u8, 209u8, 87u8, 13u8, 54u8, 245u8, 13u8, 217u8, 140u8, 219u8, 23u8, 204u8, 190u8, 165u8, 104u8, 32u8, 148u8, 164u8, 101u8, 71u8, 148u8, 213u8, 70u8, 132u8, 211u8, 1u8, 24u8, 130u8, 190u8, 25u8, 120u8, 123u8, 194u8, 143u8, 55u8, 57u8, 246u8, 37u8, 241u8, 242u8, 106u8, 127u8, 11u8, 25u8, 65u8, 239u8, 71u8], - [36u8, 85u8, 179u8, 115u8, 28u8, 121u8, 35u8, 7u8, 122u8, 136u8, 2u8, 222u8, 97u8, 155u8, 55u8, 246u8, 113u8, 68u8, 9u8, 144u8, 30u8, 160u8, 67u8, 227u8, 242u8, 154u8, 225u8, 154u8, 130u8, 110u8, 168u8, 118u8, 5u8, 255u8, 233u8, 16u8, 202u8, 47u8, 192u8, 215u8, 35u8, 87u8, 34u8, 152u8, 237u8, 66u8, 240u8, 240u8, 146u8, 156u8, 150u8, 248u8, 140u8, 199u8, 65u8, 245u8, 147u8, 123u8, 110u8, 50u8, 25u8, 216u8, 44u8, 147u8], + [22u8, 24u8, 254u8, 206u8, 152u8, 246u8, 56u8, 167u8, 103u8, 120u8, 252u8, 140u8, 102u8, 72u8, 191u8, 241u8, 29u8, 106u8, 51u8, 197u8, 27u8, 159u8, 141u8, 78u8, 189u8, 160u8, 73u8, 24u8, 183u8, 155u8, 8u8, 91u8, 41u8, 139u8, 41u8, 97u8, 22u8, 78u8, 73u8, 136u8, 207u8, 61u8, 34u8, 70u8, 147u8, 59u8, 149u8, 33u8, 109u8, 142u8, 61u8, 247u8, 162u8, 228u8, 118u8, 62u8, 86u8, 245u8, 185u8, 137u8, 77u8, 166u8, 60u8, 84u8], + [32u8, 68u8, 146u8, 188u8, 23u8, 36u8, 153u8, 164u8, 137u8, 88u8, 42u8, 246u8, 90u8, 222u8, 1u8, 95u8, 44u8, 56u8, 144u8, 95u8, 67u8, 143u8, 25u8, 143u8, 2u8, 158u8, 40u8, 13u8, 51u8, 30u8, 246u8, 193u8, 17u8, 123u8, 112u8, 172u8, 250u8, 245u8, 110u8, 160u8, 8u8, 14u8, 62u8, 179u8, 73u8, 182u8, 148u8, 171u8, 138u8, 217u8, 7u8, 11u8, 3u8, 235u8, 100u8, 42u8, 106u8, 239u8, 117u8, 209u8, 72u8, 73u8, 33u8, 50u8], + [42u8, 181u8, 245u8, 200u8, 39u8, 109u8, 99u8, 82u8, 245u8, 76u8, 116u8, 172u8, 9u8, 90u8, 62u8, 240u8, 226u8, 195u8, 193u8, 164u8, 199u8, 40u8, 212u8, 203u8, 177u8, 33u8, 111u8, 84u8, 74u8, 11u8, 247u8, 201u8, 43u8, 52u8, 202u8, 231u8, 116u8, 47u8, 209u8, 168u8, 105u8, 194u8, 95u8, 200u8, 0u8, 204u8, 110u8, 236u8, 55u8, 43u8, 14u8, 81u8, 169u8, 68u8, 210u8, 93u8, 255u8, 193u8, 92u8, 24u8, 27u8, 79u8, 238u8, 3u8], + [10u8, 88u8, 243u8, 196u8, 106u8, 25u8, 70u8, 23u8, 141u8, 245u8, 210u8, 34u8, 0u8, 10u8, 89u8, 105u8, 1u8, 229u8, 192u8, 220u8, 19u8, 163u8, 24u8, 216u8, 188u8, 223u8, 128u8, 192u8, 31u8, 143u8, 50u8, 190u8, 30u8, 8u8, 96u8, 76u8, 79u8, 133u8, 163u8, 122u8, 22u8, 117u8, 25u8, 130u8, 18u8, 158u8, 186u8, 138u8, 183u8, 236u8, 186u8, 218u8, 138u8, 22u8, 219u8, 98u8, 244u8, 207u8, 131u8, 84u8, 9u8, 213u8, 123u8, 144u8], + [37u8, 30u8, 238u8, 175u8, 106u8, 133u8, 208u8, 28u8, 79u8, 89u8, 174u8, 238u8, 90u8, 198u8, 209u8, 220u8, 3u8, 179u8, 53u8, 0u8, 148u8, 251u8, 220u8, 240u8, 212u8, 142u8, 208u8, 243u8, 116u8, 220u8, 42u8, 237u8, 34u8, 169u8, 128u8, 36u8, 215u8, 197u8, 11u8, 238u8, 223u8, 190u8, 121u8, 65u8, 118u8, 173u8, 41u8, 220u8, 46u8, 219u8, 61u8, 146u8, 113u8, 225u8, 110u8, 35u8, 19u8, 25u8, 121u8, 149u8, 6u8, 83u8, 220u8, 145u8], + [17u8, 167u8, 78u8, 13u8, 150u8, 211u8, 217u8, 37u8, 109u8, 228u8, 186u8, 26u8, 234u8, 255u8, 14u8, 238u8, 106u8, 57u8, 88u8, 188u8, 119u8, 188u8, 53u8, 227u8, 180u8, 66u8, 159u8, 1u8, 85u8, 17u8, 37u8, 87u8, 8u8, 23u8, 148u8, 137u8, 217u8, 106u8, 247u8, 96u8, 22u8, 223u8, 15u8, 80u8, 14u8, 115u8, 57u8, 14u8, 226u8, 185u8, 81u8, 241u8, 156u8, 133u8, 83u8, 173u8, 179u8, 232u8, 79u8, 84u8, 190u8, 78u8, 137u8, 145u8], + [41u8, 166u8, 165u8, 235u8, 204u8, 121u8, 215u8, 74u8, 117u8, 54u8, 65u8, 201u8, 145u8, 187u8, 109u8, 145u8, 148u8, 238u8, 55u8, 191u8, 157u8, 33u8, 37u8, 109u8, 169u8, 111u8, 246u8, 23u8, 81u8, 104u8, 195u8, 161u8, 22u8, 168u8, 203u8, 78u8, 151u8, 68u8, 89u8, 49u8, 213u8, 133u8, 94u8, 139u8, 98u8, 246u8, 4u8, 189u8, 85u8, 219u8, 235u8, 230u8, 158u8, 23u8, 253u8, 211u8, 53u8, 137u8, 145u8, 241u8, 13u8, 218u8, 2u8, 120u8], + [45u8, 20u8, 183u8, 144u8, 118u8, 246u8, 157u8, 110u8, 8u8, 160u8, 76u8, 154u8, 70u8, 124u8, 221u8, 103u8, 151u8, 230u8, 135u8, 158u8, 183u8, 233u8, 225u8, 154u8, 244u8, 226u8, 227u8, 192u8, 114u8, 170u8, 44u8, 181u8, 17u8, 144u8, 36u8, 238u8, 190u8, 142u8, 125u8, 97u8, 222u8, 23u8, 59u8, 169u8, 12u8, 156u8, 76u8, 222u8, 170u8, 254u8, 57u8, 209u8, 51u8, 197u8, 50u8, 248u8, 182u8, 105u8, 212u8, 146u8, 127u8, 168u8, 111u8, 65u8], ] }; diff --git a/zk-id/tests/circuit.rs b/zk-id/tests/circuit.rs index a939fff..daf2e74 100644 --- a/zk-id/tests/circuit.rs +++ b/zk-id/tests/circuit.rs @@ -3,7 +3,10 @@ use groth16_solana::groth16::Groth16Verifier; use groth16_solana::proof_parser::circom_prover::{convert_proof, convert_public_inputs}; use light_compressed_account::compressed_account::{CompressedAccount, CompressedAccountData}; use light_compressed_account::Pubkey; -use light_hasher::{hash_to_field_size::hash_to_bn254_field_size_be, Hasher, Poseidon, Sha256}; +use light_hasher::{ + hash_to_field_size::{hash_to_bn254_field_size_be, hashv_to_bn254_field_size_be_const_array}, + Hasher, Poseidon, Sha256, +}; use light_merkle_tree_reference::MerkleTree; use num_bigint::BigUint; use std::collections::HashMap; @@ -44,14 +47,20 @@ fn add_compressed_account_to_circuit_inputs( [0u8; 8] }; - // Hash values for circuit + // Hash values for circuit - use 2-round hash like on-chain let owner_hashed = hash_to_bn254_field_size_be(owner.as_ref()); let merkle_tree_hashed = hash_to_bn254_field_size_be(merkle_tree_pubkey.as_ref()); - let issuer_hashed = hash_to_bn254_field_size_be(issuer_pubkey.as_ref()); - let credential_pubkey_hashed = hash_to_bn254_field_size_be(credential_pubkey.as_ref()); + let issuer_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[issuer_pubkey.as_ref()]).unwrap(); + let credential_pubkey_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[credential_pubkey.as_ref()]).unwrap(); // Hash encrypted_data with SHA256 and truncate (set first byte to 0) - let mut encrypted_data_hash = Sha256::hash(encrypted_data).unwrap(); + // Include length prefix like in the main test + let mut hash_input = Vec::new(); + hash_input.extend_from_slice((encrypted_data.len() as u32).to_le_bytes().as_ref()); + hash_input.extend_from_slice(encrypted_data); + let mut encrypted_data_hash = Sha256::hash(&hash_input).unwrap(); encrypted_data_hash[0] = 0; // Compute public_data_hash (hash of issuer and credential pubkey) @@ -67,6 +76,22 @@ fn add_compressed_account_to_circuit_inputs( vec![BigUint::from_bytes_be(&owner_hashed).to_string()], ); inputs.insert("leaf_index".to_string(), vec![leaf_index.to_string()]); + + // Add account_leaf_index (same format as SDK: 32-byte array with value at [28..32] in LE) + let mut account_leaf_index_bytes = [0u8; 32]; + account_leaf_index_bytes[28..32].copy_from_slice(&(leaf_index as u32).to_le_bytes()); + inputs.insert( + "account_leaf_index".to_string(), + vec![BigUint::from_bytes_be(&account_leaf_index_bytes).to_string()], + ); + + // Add address field - use the address from the compressed account + let address = compressed_account.address.unwrap_or([0u8; 32]); + inputs.insert( + "address".to_string(), + vec![BigUint::from_bytes_be(&address).to_string()], + ); + inputs.insert( "merkle_tree_hashed".to_string(), vec![BigUint::from_bytes_be(&merkle_tree_hashed).to_string()], @@ -134,10 +159,14 @@ fn test_compressed_account_merkle_proof_circuit() { let issuer_pubkey = Pubkey::new_from_array([4u8; 32]); let credential_pubkey = Pubkey::new_from_array([5u8; 32]); let encrypted_data = vec![6u8; 64]; - - // Compute data_hash as hash of issuer and credential - let issuer_hashed = hash_to_bn254_field_size_be(issuer_pubkey.as_ref()); - let credential_pubkey_hashed = hash_to_bn254_field_size_be(credential_pubkey.as_ref()); + let mut address = [3u8; 32]; + address[0] = 0; // Ensure first byte is 0 + + // Compute data_hash as hash of issuer and credential - use 2-round hash + let issuer_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[issuer_pubkey.as_ref()]).unwrap(); + let credential_pubkey_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[credential_pubkey.as_ref()]).unwrap(); let data_hash = Poseidon::hashv(&[ issuer_hashed.as_slice(), credential_pubkey_hashed.as_slice(), @@ -147,7 +176,7 @@ fn test_compressed_account_merkle_proof_circuit() { let compressed_account = CompressedAccount { owner, lamports: 0, - address: None, + address: Some(address), data: Some(CompressedAccountData { discriminator: [1u8; 8], data: vec![], @@ -209,9 +238,11 @@ fn test_invalid_proof_rejected() { let credential_pubkey = Pubkey::new_from_array([5u8; 32]); let encrypted_data = vec![6u8; 64]; - // Compute data_hash as hash of issuer and credential - let issuer_hashed = hash_to_bn254_field_size_be(issuer_pubkey.as_ref()); - let credential_pubkey_hashed = hash_to_bn254_field_size_be(credential_pubkey.as_ref()); + // Compute data_hash as hash of issuer and credential - use 2-round hash + let issuer_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[issuer_pubkey.as_ref()]).unwrap(); + let credential_pubkey_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[credential_pubkey.as_ref()]).unwrap(); let data_hash = Poseidon::hashv(&[ issuer_hashed.as_slice(), credential_pubkey_hashed.as_slice(), @@ -283,10 +314,14 @@ fn test_groth16_solana_verification() { let issuer_pubkey = Pubkey::new_from_array([4u8; 32]); let credential_pubkey = Pubkey::new_from_array([5u8; 32]); let encrypted_data = vec![6u8; 64]; - - // Compute data_hash as hash of issuer and credential - let issuer_hashed = hash_to_bn254_field_size_be(issuer_pubkey.as_ref()); - let credential_pubkey_hashed = hash_to_bn254_field_size_be(credential_pubkey.as_ref()); + let mut address = [3u8; 32]; + address[0] = 0; // Ensure first byte is 0 + + // Compute data_hash as hash of issuer and credential - use 2-round hash + let issuer_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[issuer_pubkey.as_ref()]).unwrap(); + let credential_pubkey_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[credential_pubkey.as_ref()]).unwrap(); let data_hash = Poseidon::hashv(&[ issuer_hashed.as_slice(), credential_pubkey_hashed.as_slice(), @@ -296,7 +331,7 @@ fn test_groth16_solana_verification() { let compressed_account = CompressedAccount { owner, lamports: 0, - address: None, + address: Some(address), data: Some(CompressedAccountData { discriminator: [1u8; 8], data: vec![], diff --git a/zk-id/tests/test.rs b/zk-id/tests/test.rs index c5a2eda..c28b336 100644 --- a/zk-id/tests/test.rs +++ b/zk-id/tests/test.rs @@ -1,11 +1,10 @@ // #![cfg(feature = "test-sbf")] use anchor_lang::{InstructionData, ToAccountMetas}; -use light_client::rpc::RpcConnection; -use light_compressed_account::{ - compressed_account::hash_with_hashed_values, hash_to_bn254_field_size_be, -}; -use light_hasher::{Hasher, Poseidon}; +use circom_prover::{prover::ProofLib, witness::WitnessFn, CircomProver}; +use groth16_solana::proof_parser::circom_prover::convert_proof; +use light_client::indexer::CompressedAccount; +use light_hasher::{hash_to_field_size::hash_to_bn254_field_size_be, Hasher, Poseidon, Sha256}; use light_program_test::{ program_test::LightProgramTest, AddressWithTree, Indexer, ProgramTestConfig, Rpc, RpcError, }; @@ -13,105 +12,121 @@ use light_sdk::{ address::v1::derive_address, instruction::{PackedAccounts, SystemAccountMetaConfig}, }; +use num_bigint::BigUint; use solana_sdk::{ instruction::Instruction, pubkey::Pubkey, signature::{Keypair, Signature, Signer}, }; -use zk_id::ISSUER; +use std::collections::HashMap; +use zk_id::{CREDENTIAL, ISSUER, ZK_ID_CHECK}; + +// Link the generated witness library +#[link(name = "circuit", kind = "static")] +extern "C" {} + +rust_witness::witness!(compressedaccountmerkleproof); #[tokio::test] -async fn test_create_address_and_output_without_address() { - let config = ProgramTestConfig::new(true, Some(vec![("lowlevel", lowlevel::ID)])); +async fn test_create_issuer_and_add_credential() { + let config = ProgramTestConfig::new(true, Some(vec![("zk_id", zk_id::ID)])); let mut rpc = LightProgramTest::new(config).await.unwrap(); let payer = rpc.get_payer().insecure_clone(); let address_tree_info = rpc.get_address_tree_v1(); - let (address, _) = derive_address( + let (issuer_address, _) = derive_address( &[ISSUER, payer.pubkey().as_ref()], &address_tree_info.tree, - &lowlevel::ID, + &zk_id::ID, + ); + println!("issuer_address {:?}", issuer_address); + // Step 1: Create the issuer account + create_issuer(&mut rpc, &payer, &issuer_address, address_tree_info.clone()) + .await + .unwrap(); + + // Verify the issuer account was created + let issuer_accounts = rpc + .get_compressed_accounts_by_owner(&zk_id::ID, None, None) + .await + .unwrap(); + assert_eq!(issuer_accounts.value.items.len(), 1); + let issuer_account = &issuer_accounts.value.items[0]; + + println!("Created issuer account for pubkey: {}", payer.pubkey()); + + // Step 2: Create a credential account + let credential_pubkey = Pubkey::new_unique(); + let (credential_address, _) = derive_address( + &[CREDENTIAL, credential_pubkey.as_ref()], + &address_tree_info.tree, + &zk_id::ID, ); - // Test data for the low-level instruction - let encrypted_utxo = vec![1; 256]; // Example encrypted UTXO data - let mut output_utxo_hash = [42u8; 32]; // Example hash - output_utxo_hash[0] = 0; - // Create the low-level account - create_address_and_output_without_address( + add_credential( &mut rpc, &payer, - &address, - address_tree_info, - encrypted_utxo, - output_utxo_hash, + &credential_address, + address_tree_info.clone(), + issuer_account, + credential_pubkey, ) .await .unwrap(); + // Verify both accounts exist now (issuer + credential) let program_compressed_accounts = rpc - .get_compressed_accounts_by_owner(&lowlevel::ID, None, None) + .get_compressed_accounts_by_owner(&zk_id::ID, None, None) .await .unwrap(); - let compressed_account = program_compressed_accounts.value.items[0].clone(); - println!("{:?}", compressed_account); - let data_hash = compressed_account.data.as_ref().unwrap().data_hash; - println!("data hash {:?}", data_hash); - let discriminator = compressed_account.data.as_ref().unwrap().discriminator; - println!("discriminator {:?}", discriminator); - let hashed_owner = hash_to_bn254_field_size_be(compressed_account.owner.as_ref()); + + assert_eq!(program_compressed_accounts.value.items.len(), 2); println!( - "hashed owner {:?}", - hash_to_bn254_field_size_be(compressed_account.owner.as_ref()) + "program_compressed_accounts.value.items {:?}", + program_compressed_accounts.value.items ); - let hashed_merkle_tree = - hash_to_bn254_field_size_be(compressed_account.tree_info.tree.as_ref()); - println!("hashed merkle_tree {:?}", hashed_merkle_tree); - let leaf_index = compressed_account.leaf_index; - println!("leaf index le {}", compressed_account.leaf_index); - let mut discriminator_bytes = [0u8; 32]; - discriminator_bytes[24..].copy_from_slice(discriminator.as_slice()); - discriminator_bytes[23] = 2; // Domain separator for discriminator. - let compressed_account_hash = Poseidon::hashv(&[ - hashed_owner.as_slice(), - leaf_index.to_le_bytes().as_slice(), // this is a footgun, we serialize leaf_index le but Poseidon::hashv expects be bytes. - // Ts poseidon hashers expect le input, to be consistent you need to provide the be number to the ts hasher. - // It is a mistake in our hashing, not dangerous because we just use it to make the hash unique which holds true since it is consistent, but difficult to change, we fixed it in V2 trees. - // For the circuit this means that you need to pass leaf index twice once in be and use it to compute the light leaf hash, once le to verify the merkle proof. - hashed_merkle_tree.as_slice(), - discriminator_bytes.as_slice(), - data_hash.as_slice(), - ]) - .unwrap(); - assert_eq!(compressed_account_hash, compressed_account.hash); - let compressed_account_hash = hash_with_hashed_values( - &0, - None, - Some((discriminator.as_slice(), data_hash.as_slice())), - &hashed_owner, - &hashed_merkle_tree, - &leaf_index, - false, - ) + + println!( + "Successfully created credential account for pubkey: {}", + credential_pubkey + ); + + // Step 3: Verify the credential with ZK proof + let credential_account = rpc + .get_compressed_account(credential_address, None) + .await + .unwrap() + .value + .expect("Credential account not found"); + println!("credential_account {:?}", credential_account); + verify_credential(&mut rpc, &payer, &credential_account, address_tree_info) + .await .unwrap(); - assert_eq!(compressed_account_hash, compressed_account.hash); + + println!("Successfully verified credential with ZK proof!"); + + // Verify event account was created + let final_compressed_accounts = rpc + .get_compressed_accounts_by_owner(&zk_id::ID, None, None) + .await + .unwrap(); + + assert_eq!(final_compressed_accounts.value.items.len(), 3); } -async fn create_address_and_output_without_address( +async fn create_issuer( rpc: &mut R, payer: &Keypair, address: &[u8; 32], address_tree_info: light_client::indexer::TreeInfo, - encrypted_utxo: Vec, - output_utxo_hash: [u8; 32], ) -> Result where R: Rpc + Indexer, { let mut remaining_accounts = PackedAccounts::default(); - let config = SystemAccountMetaConfig::new(lowlevel::ID); - remaining_accounts.add_system_accounts(config); + let config = SystemAccountMetaConfig::new(zk_id::ID); + remaining_accounts.add_system_accounts(config)?; let rpc_result = rpc .get_validity_proof( @@ -124,7 +139,6 @@ where ) .await? .value; - let packed_address_tree_accounts = rpc_result .pack_tree_infos(&mut remaining_accounts) .address_trees; @@ -132,25 +146,19 @@ where .get_random_state_tree_info()? .pack_output_tree_index(&mut remaining_accounts)?; - let input_state_tree_info = rpc.get_random_state_tree_info()?; - let input_root_index = 0u16; - - let instruction_data = lowlevel::instruction::CreateAddressAndOutputWithoutAddress { + let instruction_data = zk_id::instruction::CreateIssuer { proof: rpc_result.proof, address_tree_info: packed_address_tree_accounts[0], output_state_tree_index, - input_root_index, - encrypted_utxo, - output_utxo_hash, }; - let accounts = lowlevel::accounts::GenericAnchorAccounts { + let accounts = zk_id::accounts::GenericAnchorAccounts { signer: payer.pubkey(), - input_merkle_tree: input_state_tree_info.tree, + input_merkle_tree: rpc.get_random_state_tree_info()?.tree, }; let instruction = Instruction { - program_id: lowlevel::ID, + program_id: zk_id::ID, accounts: [ accounts.to_account_metas(None), remaining_accounts.to_account_metas().0, @@ -163,74 +171,12 @@ where .await } -#[tokio::test] -async fn test_add_credential() { - let config = ProgramTestConfig::new(true, Some(vec![("zk_id", zk_id::ID)])); - let mut rpc = LightProgramTest::new(config).await.unwrap(); - let payer = rpc.get_payer().insecure_clone(); - - let address_tree_info = rpc.get_address_tree_v1(); - - let (issuer_address, _) = derive_address( - &[ISSUER, payer.pubkey().as_ref()], - &address_tree_info.tree, - &zk_id::ID, - ); - - // First, create the issuer account - create_issuer(&mut rpc, &payer, &issuer_address, address_tree_info.clone()) - .await - .unwrap(); - - // Get the issuer account - let issuer_accounts = rpc - .get_compressed_accounts_by_owner(&zk_id::ID, None, None) - .await - .unwrap(); - assert_eq!(issuer_accounts.value.items.len(), 1); - let issuer_account = &issuer_accounts.value.items[0]; - - // Create a test credential pubkey - let credential_pubkey = Pubkey::new_unique(); - - let (credential_address, _) = derive_address( - &[ISSUER, payer.pubkey().as_ref()], - &address_tree_info.tree, - &zk_id::ID, - ); - - // Create the credential account - add_credential( - &mut rpc, - &payer, - &credential_address, - address_tree_info, - issuer_account, - credential_pubkey, - ) - .await - .unwrap(); - - // Verify both accounts exist now (issuer + credential) - let program_compressed_accounts = rpc - .get_compressed_accounts_by_owner(&zk_id::ID, None, None) - .await - .unwrap(); - - assert_eq!(program_compressed_accounts.value.items.len(), 2); - - println!( - "Successfully created credential account for pubkey: {}", - credential_pubkey - ); -} - async fn add_credential( rpc: &mut R, payer: &Keypair, address: &[u8; 32], address_tree_info: light_client::indexer::TreeInfo, - issuer_account: &light_client::rpc::RpcCompressedAccount, + issuer_account: &CompressedAccount, credential_pubkey: Pubkey, ) -> Result where @@ -238,10 +184,7 @@ where { let mut remaining_accounts = PackedAccounts::default(); let config = SystemAccountMetaConfig::new(zk_id::ID); - remaining_accounts.add_system_accounts(config); - - // Pack the issuer account for input - let issuer_account_meta = remaining_accounts.pack_compressed_account(issuer_account); + remaining_accounts.add_system_accounts(config)?; let rpc_result = rpc .get_validity_proof( @@ -255,19 +198,33 @@ where .await? .value; - let packed_address_tree_accounts = rpc_result - .pack_tree_infos(&mut remaining_accounts) - .address_trees; + let packed_tree_accounts = rpc_result.pack_tree_infos(&mut remaining_accounts); + let packed_state_tree_accounts = packed_tree_accounts.state_trees.unwrap(); + let packed_address_tree_accounts = packed_tree_accounts.address_trees; + + // Create the issuer account meta manually + let issuer_account_meta = light_sdk::instruction::account_meta::CompressedAccountMeta { + tree_info: packed_state_tree_accounts.packed_tree_infos[0], + address: issuer_account.address.unwrap(), + output_state_tree_index: packed_state_tree_accounts.output_tree_index, + }; + let output_state_tree_index = rpc .get_random_state_tree_info()? .pack_output_tree_index(&mut remaining_accounts)?; + // Parse the issuer account data to get num_credentials_issued + let issuer_data = issuer_account.data.as_ref().unwrap(); + let issuer_account_parsed: zk_id::IssuerAccount = + anchor_lang::AnchorDeserialize::deserialize(&mut issuer_data.data.as_slice()).unwrap(); + let instruction_data = zk_id::instruction::AddCredential { proof: rpc_result.proof, address_tree_info: packed_address_tree_accounts[0], output_state_tree_index, issuer_account_meta, credential_pubkey, + num_credentials_issued: issuer_account_parsed.num_credentials_issued, }; let accounts = zk_id::accounts::GenericAnchorAccounts { @@ -289,62 +246,79 @@ where .await } -#[tokio::test] -async fn test_create_issuer() { - let config = ProgramTestConfig::new(true, Some(vec![("zk_id", zk_id::ID)])); - let mut rpc = LightProgramTest::new(config).await.unwrap(); - let payer = rpc.get_payer().insecure_clone(); - - let address_tree_info = rpc.get_address_tree_v1(); - - let (address, _) = derive_address( - &[ISSUER, payer.pubkey().as_ref()], - &address_tree_info.tree, - &zk_id::ID, - ); - - // Create the issuer account - create_issuer(&mut rpc, &payer, &address, address_tree_info) - .await - .unwrap(); - - // Verify the issuer account was created - let program_compressed_accounts = rpc - .get_compressed_accounts_by_owner(&zk_id::ID, None, None) - .await - .unwrap(); - - assert_eq!(program_compressed_accounts.value.items.len(), 1); - let compressed_account = &program_compressed_accounts.value.items[0]; - - // Verify account has data and address - assert!(compressed_account.data.is_some()); - assert_eq!(compressed_account.address, Some(address)); - - println!( - "Successfully created issuer account for pubkey: {}", - payer.pubkey() - ); -} - -async fn create_issuer( +async fn verify_credential( rpc: &mut R, payer: &Keypair, - address: &[u8; 32], + credential_account: &CompressedAccount, address_tree_info: light_client::indexer::TreeInfo, ) -> Result where R: Rpc + Indexer, { + // Get the merkle proof for the credential account + let proofs = rpc + .get_multiple_compressed_account_proofs(vec![credential_account.hash], None) + .await? + .value + .items; + + let merkle_proof = &proofs[0]; + let leaf_index = merkle_proof.leaf_index as u32; + let merkle_proof_hashes = &merkle_proof.proof; + let merkle_root = merkle_proof.root; + let root_index = (merkle_proof.root_seq % 2400) as u16; + + let state_tree = merkle_proof.merkle_tree; + + // Parse the credential account data + let credential_data = credential_account.data.as_ref().unwrap(); + let credential_account_parsed: zk_id::CredentialAccount = + anchor_lang::AnchorDeserialize::deserialize(&mut credential_data.data.as_slice()).unwrap(); + + // Generate encrypted data (in a real scenario, this would be user-provided) + let encrypted_data = vec![42u8; 64]; + + // Generate the ZK proof using the actual merkle root + // Use the actual issuer and credential_pubkey from the parsed account + let (credential_proof, _computed_data_hash) = generate_credential_proof( + credential_account, + &state_tree, + leaf_index, + &merkle_proof_hashes, + &merkle_root, + &credential_account_parsed.issuer, + &credential_account_parsed.credential_pubkey, // Use actual credential_pubkey from account + &encrypted_data, + ); + + // Use the actual data_hash from the credential account + let public_data_hash = credential_data.data_hash; + + // The data_hash parameter should be the public_data_hash (hash of issuer + credential_pubkey) + let data_hash = public_data_hash; + + // Create the verification transaction let mut remaining_accounts = PackedAccounts::default(); let config = SystemAccountMetaConfig::new(zk_id::ID); - remaining_accounts.add_system_accounts(config); + remaining_accounts.add_system_accounts(config)?; + + let verification_id = Pubkey::new_unique().to_bytes(); + + let (event_address, _) = derive_address( + &[ + ZK_ID_CHECK, + data_hash.as_slice(), + verification_id.as_slice(), + ], + &address_tree_info.tree, + &zk_id::ID, + ); let rpc_result = rpc .get_validity_proof( vec![], vec![AddressWithTree { - address: *address, + address: event_address, tree: address_tree_info.tree, }], None, @@ -355,19 +329,29 @@ where let packed_address_tree_accounts = rpc_result .pack_tree_infos(&mut remaining_accounts) .address_trees; + let output_state_tree_index = rpc .get_random_state_tree_info()? .pack_output_tree_index(&mut remaining_accounts)?; - let instruction_data = zk_id::instruction::CreateIssuer { + let merkle_tree_hashed = hash_to_bn254_field_size_be(state_tree.as_ref()); + + let instruction_data = zk_id::instruction::ZkVerifyCredential { proof: rpc_result.proof, address_tree_info: packed_address_tree_accounts[0], output_state_tree_index, + input_root_index: root_index, + encrypted_data, + credential_proof, + issuer: credential_account_parsed.issuer.to_bytes(), + merkle_tree_hashed, + data_hash, + verification_id, }; let accounts = zk_id::accounts::GenericAnchorAccounts { signer: payer.pubkey(), - input_merkle_tree: rpc.get_random_state_tree_info()?.tree, + input_merkle_tree: state_tree, }; let instruction = Instruction { @@ -383,3 +367,209 @@ where rpc.create_and_send_transaction(&[instruction], &payer.pubkey(), &[payer]) .await } + +fn generate_credential_proof( + credential_account: &CompressedAccount, + merkle_tree_pubkey: &Pubkey, + leaf_index: u32, + merkle_proof_hashes: &[[u8; 32]], + merkle_root: &[u8; 32], + issuer_pubkey: &Pubkey, + credential_pubkey: &Pubkey, + encrypted_data: &[u8], +) -> ( + light_compressed_account::instruction_data::compressed_proof::CompressedProof, + [u8; 32], +) { + let zkey_path = "./build/compressed_account_merkle_proof_final.zkey".to_string(); + + // Build circuit inputs + let mut proof_inputs = HashMap::new(); + + // Add compressed account inputs + let discriminator = if let Some(ref data) = credential_account.data { + data.discriminator + } else { + [0u8; 8] + }; + + let owner_hashed = hash_to_bn254_field_size_be(zk_id::ID.as_ref()); + let merkle_tree_hashed = hash_to_bn254_field_size_be(merkle_tree_pubkey.as_ref()); + + // Use the same hashing as on-chain: hashv_to_bn254_field_size_be_const_array::<2> + use light_hasher::hash_to_field_size::hashv_to_bn254_field_size_be_const_array; + let issuer_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[issuer_pubkey.as_ref()]).unwrap(); + + // Use the same hashing as issuer - 2-round hash + let credential_pubkey_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[credential_pubkey.as_ref()]).unwrap(); + let mut hash_input = Vec::new(); + hash_input.extend_from_slice((encrypted_data.len() as u32).to_le_bytes().as_ref()); + hash_input.extend_from_slice(encrypted_data); + let mut encrypted_data_hash = Sha256::hash(hash_input.as_slice()).unwrap(); + encrypted_data_hash[0] = 0; + + let public_data_hash = Poseidon::hashv(&[ + issuer_hashed.as_slice(), + credential_pubkey_hashed.as_slice(), + ]) + .unwrap(); + + // Verify the data_hash matches + let expected_data_hash = credential_account.data.as_ref().unwrap().data_hash; + assert_eq!(public_data_hash, expected_data_hash, "Data hash mismatch"); + + // Compute what the circuit will compute for the leaf hash + // The circuit adds 36893488147419103232 (0x2000000000000000) to discriminator + // This effectively puts a 2 prefix at byte 23 (counting from right in BE) + + // SDK format: 32-byte array with leaf_index in LE at [28..32] + let mut leaf_index_bytes = [0u8; 32]; + leaf_index_bytes[28..32].copy_from_slice(&(leaf_index as u32).to_le_bytes()); + + // SDK format: 32-byte array with discriminator at [24..32] and prefix 2 at [23] + let mut discriminator_bytes = [0u8; 32]; + discriminator_bytes[24..32].copy_from_slice(&discriminator); + discriminator_bytes[23] = 2; + + let computed_leaf_hash = Poseidon::hashv(&[ + owner_hashed.as_slice(), + leaf_index_bytes.as_slice(), + merkle_tree_hashed.as_slice(), + credential_account.address.as_ref().unwrap().as_ref(), + discriminator_bytes.as_slice(), + public_data_hash.as_slice(), + ]) + .unwrap(); + + assert_eq!( + computed_leaf_hash, credential_account.hash, + "Leaf hash mismatch - circuit cannot recreate account hash" + ); + + proof_inputs.insert( + "owner_hashed".to_string(), + vec![BigUint::from_bytes_be(&owner_hashed).to_string()], + ); + proof_inputs.insert("leaf_index".to_string(), vec![leaf_index.to_string()]); + + // account_leaf_index needs to be in the same format as SDK: 32-byte array with value at [28..32] in LE + let mut account_leaf_index_bytes = [0u8; 32]; + account_leaf_index_bytes[28..32] + .copy_from_slice(&(credential_account.leaf_index as u32).to_le_bytes()); + proof_inputs.insert( + "account_leaf_index".to_string(), + vec![BigUint::from_bytes_be(&account_leaf_index_bytes).to_string()], + ); + + // Add address field - credential account has an address + let address = credential_account.address.unwrap_or([0u8; 32]); + proof_inputs.insert( + "address".to_string(), + vec![BigUint::from_bytes_be(&address).to_string()], + ); + + proof_inputs.insert( + "merkle_tree_hashed".to_string(), + vec![BigUint::from_bytes_be(&merkle_tree_hashed).to_string()], + ); + proof_inputs.insert( + "discriminator".to_string(), + vec![BigUint::from_bytes_be(&discriminator).to_string()], + ); + proof_inputs.insert( + "issuer_hashed".to_string(), + vec![BigUint::from_bytes_be(&issuer_hashed).to_string()], + ); + proof_inputs.insert( + "credential_pubkey_hashed".to_string(), + vec![BigUint::from_bytes_be(&credential_pubkey_hashed).to_string()], + ); + proof_inputs.insert( + "encrypted_data_hash".to_string(), + vec![BigUint::from_bytes_be(&encrypted_data_hash).to_string()], + ); + proof_inputs.insert( + "public_encrypted_data_hash".to_string(), + vec![BigUint::from_bytes_be(&encrypted_data_hash).to_string()], + ); + proof_inputs.insert( + "public_data_hash".to_string(), + vec![BigUint::from_bytes_be(&public_data_hash).to_string()], + ); + + // Add merkle proof inputs + let path_elements: Vec = merkle_proof_hashes + .iter() + .map(|hash| BigUint::from_bytes_be(hash).to_string()) + .collect(); + proof_inputs.insert("pathElements".to_string(), path_elements); + + // Use the actual merkle root from the indexer + let expected_root_bigint = BigUint::from_bytes_be(merkle_root); + proof_inputs.insert( + "expectedRoot".to_string(), + vec![expected_root_bigint.to_string()], + ); + + // Generate proof + let circuit_inputs = serde_json::to_string(&proof_inputs).unwrap(); + let proof = CircomProver::prove( + ProofLib::Arkworks, + WitnessFn::RustWitness(compressedaccountmerkleproof_witness), + circuit_inputs, + zkey_path.clone(), + ) + .expect("Proof generation failed"); + + // Verify proof locally + let is_valid = CircomProver::verify(ProofLib::Arkworks, proof.clone(), zkey_path.clone()) + .expect("Proof verification failed"); + assert!(is_valid, "Local circom proof verification should pass"); + + // Convert to groth16-solana format and compress + let (proof_a_uncompressed, proof_b_uncompressed, proof_c_uncompressed) = + convert_proof(&proof.proof).expect("Failed to convert proof"); + + use groth16_solana::proof_parser::circom_prover::convert_proof_to_compressed; + let (proof_a, proof_b, proof_c) = convert_proof_to_compressed( + &proof_a_uncompressed, + &proof_b_uncompressed, + &proof_c_uncompressed, + ) + .expect("Failed to compress proof"); + + // Verify with groth16-solana locally (same as on-chain) + { + use groth16_solana::groth16::Groth16Verifier; + use groth16_solana::proof_parser::circom_prover::convert_public_inputs; + + // Convert public inputs from the circom proof + let public_inputs_converted: [[u8; 32]; 7] = convert_public_inputs(&proof.pub_inputs); + + // Create verifier using the uncompressed proofs (which have proof_a negated) + let mut verifier = Groth16Verifier::new( + &proof_a_uncompressed, + &proof_b_uncompressed, + &proof_c_uncompressed, + &public_inputs_converted, + &zk_id::verifying_key::VERIFYINGKEY, + ) + .expect("Failed to create verifier"); + + // Verify + verifier + .verify() + .expect("Local groth16-solana verification failed"); + } + + let compressed_proof = + light_compressed_account::instruction_data::compressed_proof::CompressedProof { + a: proof_a, + b: proof_b, + c: proof_c, + }; + + (compressed_proof, public_data_hash) +} From 693f8db2429ae8daa1917ad0bc850bbd119998eb Mon Sep 17 00:00:00 2001 From: ananas Date: Mon, 20 Oct 2025 19:52:59 +0100 Subject: [PATCH 10/14] chore: add versions, add readme, add ci setup --- .github/actions/setup/action.yml | 33 +++ .github/workflows/rust-tests.yml | 7 + zk-id/Cargo.lock | 441 ++++++++++++++++++------------- zk-id/Cargo.toml | 24 +- zk-id/README.md | 84 +++++- zk-id/scripts/setup.sh | 66 ++++- zk-id/src/lib.rs | 145 +++++----- zk-id/tests/test.rs | 10 +- 8 files changed, 515 insertions(+), 295 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 3ceb16f..15b3c2a 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -29,6 +29,14 @@ inputs: description: "Install Photon indexer (required for TypeScript tests)" required: false default: "false" + circom-version: + description: "Circom version for ZK circuits" + required: false + default: "v2.2.2" + install-circom: + description: "Whether to install circom and snarkjs" + required: false + default: "false" runs: using: composite @@ -100,6 +108,27 @@ runs: shell: bash run: npm install -g @lightprotocol/zk-compression-cli + - name: Cache circom installation + if: inputs.install-circom == 'true' + id: cache-circom + uses: actions/cache@v4 + with: + path: ~/.cargo/bin/circom + key: circom-${{ runner.os }}-${{ inputs.circom-version }} + + - name: Install circom + if: inputs.install-circom == 'true' && steps.cache-circom.outputs.cache-hit != 'true' + shell: bash + run: | + wget -q https://github.com/iden3/circom/releases/download/${{ inputs.circom-version }}/circom-linux-amd64 + chmod +x circom-linux-amd64 + mv circom-linux-amd64 ~/.cargo/bin/circom + + - name: Install snarkjs + if: inputs.install-circom == 'true' + shell: bash + run: npm install -g snarkjs + - name: Install Photon indexer if: inputs.photon-indexer == 'true' shell: bash @@ -122,3 +151,7 @@ runs: node --version npm --version fi + if [ "${{ inputs.install-circom }}" == "true" ]; then + circom --version + snarkjs --help | head -1 || true + fi diff --git a/.github/workflows/rust-tests.yml b/.github/workflows/rust-tests.yml index d7f057a..ccfbd90 100644 --- a/.github/workflows/rust-tests.yml +++ b/.github/workflows/rust-tests.yml @@ -29,6 +29,7 @@ jobs: - counter/native - counter/pinocchio - account-comparison + - zk-id steps: - uses: actions/checkout@v4 @@ -38,6 +39,12 @@ jobs: example: ${{ matrix.example }} solana-cli-version: ${{ env.SOLANA_CLI_VERSION }} rust-toolchain: ${{ env.RUST_TOOLCHAIN }} + install-circom: ${{ matrix.example == 'zk-id' }} + + - name: Setup ZK circuits + if: matrix.example == 'zk-id' + working-directory: ${{ matrix.example }} + run: ./scripts/setup.sh - name: Build and test working-directory: ${{ matrix.example }} diff --git a/zk-id/Cargo.lock b/zk-id/Cargo.lock index 46a0862..3c98b48 100644 --- a/zk-id/Cargo.lock +++ b/zk-id/Cargo.lock @@ -18,11 +18,11 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0133fd66fc7bc5f78e566ce55e507f4b66a63ae18a719de86628c1986c80bca8" dependencies = [ - "aligned-sized 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "aligned-sized", "anchor-lang", "bytemuck", "light-account-checks 0.3.0", - "light-batched-merkle-tree", + "light-batched-merkle-tree 0.3.0", "light-bounded-vec", "light-compressed-account 0.3.0", "light-concurrent-merkle-tree 2.1.0", @@ -148,15 +148,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "aligned-sized" -version = "1.1.0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.107", -] - [[package]] name = "aligned-sized" version = "1.1.0" @@ -349,6 +340,21 @@ dependencies = [ "serde", ] +[[package]] +name = "anchor-spl" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c08cb5d762c0694f74bd02c9a5b04ea53cefc496e2c27b3234acffca5cd076b" +dependencies = [ + "anchor-lang", + "spl-associated-token-account 6.0.0", + "spl-pod", + "spl-token 7.0.0", + "spl-token-2022 6.0.0", + "spl-token-group-interface 0.5.0", + "spl-token-metadata-interface 0.6.0", +] + [[package]] name = "anchor-syn" version = "0.31.1" @@ -830,11 +836,11 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.4" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -1870,16 +1876,14 @@ dependencies = [ [[package]] name = "groth16-solana" version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a6d1ffb18dbf5cfc60b11bd7da88474c672870247c1e5b498619bcb6ba3d8f5" dependencies = [ "ark-bn254 0.5.0", "ark-ec 0.5.0", "ark-ff 0.5.0", - "ark-groth16", "ark-serialize 0.5.0", - "circom-prover", "num-bigint 0.4.6", - "serde", - "serde_json", "solana-bn254", "thiserror 1.0.69", ] @@ -1887,14 +1891,17 @@ dependencies = [ [[package]] name = "groth16-solana" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6d1ffb18dbf5cfc60b11bd7da88474c672870247c1e5b498619bcb6ba3d8f5" +source = "git+https://github.com/Lightprotocol/groth16-solana?rev=66c0dc87d0808c4d2aadb53c61435b6edb8ddfd9#66c0dc87d0808c4d2aadb53c61435b6edb8ddfd9" dependencies = [ "ark-bn254 0.5.0", "ark-ec 0.5.0", "ark-ff 0.5.0", + "ark-groth16", "ark-serialize 0.5.0", + "circom-prover", "num-bigint 0.4.6", + "serde", + "serde_json", "solana-bn254", "thiserror 1.0.69", ] @@ -2618,6 +2625,8 @@ dependencies = [ [[package]] name = "light-account-checks" version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6024d5fe8d30f940dbdaf64b8de62a0c5ed4b6d7920179f84925085f85ca3f8f" dependencies = [ "solana-account-info", "solana-msg", @@ -2627,28 +2636,21 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "light-array-map" -version = "0.1.0" -dependencies = [ - "tinyvec", -] - [[package]] name = "light-batched-merkle-tree" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81c7e179246468b09bf5c6882ef33043e178ff90eb6eab0c1c4c3623ef84b154" dependencies = [ - "aligned-sized 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "aligned-sized", "borsh 0.10.4", "light-account-checks 0.3.0", - "light-bloom-filter", + "light-bloom-filter 0.3.0", "light-compressed-account 0.3.0", "light-hasher 3.1.0", - "light-macros 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-macros", "light-merkle-tree-metadata 0.3.0", - "light-verifier", + "light-verifier 2.1.0", "light-zero-copy 0.2.0", "solana-account-info", "solana-msg", @@ -2659,6 +2661,31 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "light-batched-merkle-tree" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28657736ca8ad2d71d32015dc9dd85a111c4ed75ba6133ba6ba8c632f63d26ff" +dependencies = [ + "aligned-sized", + "borsh 0.10.4", + "light-account-checks 0.4.0", + "light-bloom-filter 0.4.0", + "light-compressed-account 0.5.0", + "light-hasher 4.0.0", + "light-macros", + "light-merkle-tree-metadata 0.5.0", + "light-verifier 4.0.0", + "light-zero-copy 0.4.0", + "solana-account-info", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "solana-sysvar", + "thiserror 2.0.17", + "zerocopy", +] + [[package]] name = "light-bloom-filter" version = "0.3.0" @@ -2672,6 +2699,19 @@ dependencies = [ "thiserror 2.0.17", ] +[[package]] +name = "light-bloom-filter" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd2f80682ff403477cfc6ee2f26b423e56e7f4d362543783825fe71bcf0f30cd" +dependencies = [ + "bitvec", + "num-bigint 0.4.6", + "solana-nostd-keccak", + "solana-program-error", + "thiserror 2.0.17", +] + [[package]] name = "light-bounded-vec" version = "2.0.0" @@ -2687,6 +2727,8 @@ dependencies = [ [[package]] name = "light-client" version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2420f5cabb1f8c4f26c4c50054ea51522507d2bada462e8c50cbff66d0f64b4" dependencies = [ "async-trait", "base64 0.13.1", @@ -2696,7 +2738,6 @@ dependencies = [ "lazy_static", "light-compressed-account 0.5.0", "light-concurrent-merkle-tree 3.0.0", - "light-event", "light-hasher 4.0.0", "light-indexed-merkle-tree 3.0.0", "light-merkle-tree-metadata 0.5.0", @@ -2741,7 +2782,7 @@ dependencies = [ "borsh 0.10.4", "bytemuck", "light-hasher 3.1.0", - "light-macros 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-macros", "light-zero-copy 0.2.0", "solana-program-error", "solana-pubkey", @@ -2752,83 +2793,41 @@ dependencies = [ [[package]] name = "light-compressed-account" version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0985921012ffc149596eac90d1170399bb70dbebfa2212bb72b2da30a558ec6" dependencies = [ "anchor-lang", "borsh 0.10.4", "bytemuck", "light-hasher 4.0.0", - "light-macros 2.1.0", - "light-poseidon 0.3.0", + "light-macros", "light-program-profiler", "light-zero-copy 0.4.0", - "pinocchio", "solana-msg", "solana-program-error", "solana-pubkey", "thiserror 2.0.17", - "tinyvec", "zerocopy", ] [[package]] -name = "light-compressed-token-sdk" -version = "0.1.0" +name = "light-compressed-token" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9ea8f8e9fb7c69ed05ee7899361de7b9ea2dbd08252348871a4a631aabe451" dependencies = [ - "arrayvec", - "borsh 0.10.4", - "light-account-checks 0.4.0", - "light-compressed-account 0.5.0", - "light-compressed-token-types", - "light-ctoken-types", - "light-macros 2.1.0", - "light-program-profiler", - "light-sdk", - "light-sdk-types", - "light-zero-copy 0.4.0", - "solana-account-info", - "solana-cpi", - "solana-instruction", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "spl-pod", + "account-compression", + "anchor-lang", + "anchor-spl", + "light-compressed-account 0.3.0", + "light-hasher 3.1.0", + "light-heap", + "light-system-program-anchor", + "light-zero-copy 0.2.0", + "solana-sdk", + "solana-security-txt", + "spl-token 7.0.0", "spl-token-2022 7.0.0", - "thiserror 2.0.17", -] - -[[package]] -name = "light-compressed-token-types" -version = "0.1.0" -dependencies = [ - "borsh 0.10.4", - "light-account-checks 0.4.0", - "light-compressed-account 0.5.0", - "light-macros 2.1.0", - "light-sdk-types", - "solana-msg", - "thiserror 2.0.17", -] - -[[package]] -name = "light-compressible" -version = "0.1.0" -dependencies = [ - "aligned-sized 1.1.0", - "borsh 0.10.4", - "bytemuck", - "light-account-checks 0.4.0", - "light-compressed-account 0.5.0", - "light-hasher 4.0.0", - "light-macros 2.1.0", - "light-program-profiler", - "light-zero-copy 0.4.0", - "pinocchio", - "pinocchio-pubkey", - "solana-msg", - "solana-program-error", - "solana-pubkey", - "solana-sysvar", - "thiserror 2.0.17", "zerocopy", ] @@ -2849,6 +2848,8 @@ dependencies = [ [[package]] name = "light-concurrent-merkle-tree" version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d647f56701f1c634a70900484be6111cf661c8937785073471d489b05d868c" dependencies = [ "borsh 0.10.4", "light-bounded-vec", @@ -2858,43 +2859,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "light-ctoken-types" -version = "0.1.0" -dependencies = [ - "aligned-sized 1.1.0", - "borsh 0.10.4", - "bytemuck", - "light-array-map", - "light-compressed-account 0.5.0", - "light-compressible", - "light-hasher 4.0.0", - "light-macros 2.1.0", - "light-program-profiler", - "light-zero-copy 0.4.0", - "pinocchio", - "pinocchio-pubkey", - "solana-account-info", - "solana-msg", - "solana-pubkey", - "spl-pod", - "spl-token-2022 7.0.0", - "thiserror 2.0.17", - "tinyvec", - "zerocopy", -] - -[[package]] -name = "light-event" -version = "0.1.0" -dependencies = [ - "borsh 0.10.4", - "light-compressed-account 0.5.0", - "light-hasher 4.0.0", - "light-zero-copy 0.4.0", - "thiserror 2.0.17", -] - [[package]] name = "light-hash-set" version = "2.1.0" @@ -2931,17 +2895,30 @@ dependencies = [ [[package]] name = "light-hasher" version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7b8b99f626dbfe0e9731a214e2b2e8990341f5fdb249744661ab7f3029d9859" dependencies = [ "ark-bn254 0.5.0", "ark-ff 0.5.0", + "arrayvec", "borsh 0.10.4", "light-poseidon 0.3.0", "num-bigint 0.4.6", "sha2 0.10.9", "sha3", + "solana-nostd-keccak", "solana-program-error", + "solana-pubkey", "thiserror 2.0.17", - "tinyvec", +] + +[[package]] +name = "light-heap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d28744e8876667e9ec8124c6b0fae425972a987648bd5e8de720dbe1323d5fe" +dependencies = [ + "anchor-lang", ] [[package]] @@ -2959,6 +2936,8 @@ dependencies = [ [[package]] name = "light-indexed-array" version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271ba5b246a77e0d4797d6f1752ec3ca627b2359a669189c198f5e104951d928" dependencies = [ "light-hasher 4.0.0", "num-bigint 0.4.6", @@ -2985,6 +2964,8 @@ dependencies = [ [[package]] name = "light-indexed-merkle-tree" version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2d75ca453b5f75de51384386cb719402609ba6225ca28d65ea5d071297a5138" dependencies = [ "light-bounded-vec", "light-concurrent-merkle-tree 3.0.0", @@ -2996,17 +2977,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "light-macros" -version = "2.1.0" -dependencies = [ - "bs58", - "proc-macro2", - "quote", - "solana-pubkey", - "syn 2.0.107", -] - [[package]] name = "light-macros" version = "2.1.0" @@ -3039,6 +3009,8 @@ dependencies = [ [[package]] name = "light-merkle-tree-metadata" version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cdc5dab70d1b821a3d77a7f6b074e83b8a5d966aa457487f49ab8b23cd84349" dependencies = [ "anchor-lang", "borsh 0.10.4", @@ -3067,6 +3039,8 @@ dependencies = [ [[package]] name = "light-merkle-tree-reference" version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93b3c707e7d506c1c0f1d94520c5d8d93eb59eb599ead658a7eb22416c04a590" dependencies = [ "light-hasher 4.0.0", "light-indexed-array 0.2.0", @@ -3121,30 +3095,31 @@ dependencies = [ [[package]] name = "light-program-test" -version = "0.15.0" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7255df6d3c59785200372c1a5560e4464d3b1c9647091d409a20b2a74ad00a8e" dependencies = [ + "account-compression", "anchor-lang", "async-trait", - "base64 0.22.1", "borsh 0.10.4", "bs58", "bytemuck", "chrono", + "light-batched-merkle-tree 0.5.0", "light-client", "light-compressed-account 0.5.0", - "light-compressed-token-sdk", - "light-compressible", - "light-ctoken-types", - "light-event", + "light-compressed-token", + "light-concurrent-merkle-tree 3.0.0", "light-hasher 4.0.0", "light-indexed-array 0.2.0", "light-indexed-merkle-tree 3.0.0", "light-merkle-tree-metadata 0.5.0", "light-merkle-tree-reference 3.0.1", "light-prover-client", + "light-registry", "light-sdk", "light-sdk-types", - "light-zero-copy 0.4.0", "litesvm", "log", "num-bigint 0.4.6", @@ -3164,7 +3139,6 @@ dependencies = [ "solana-transaction", "solana-transaction-status", "solana-transaction-status-client-types", - "spl-token-2022 7.0.0", "tabled", "tokio", ] @@ -3172,6 +3146,8 @@ dependencies = [ [[package]] name = "light-prover-client" version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9c91b395efa177040d8b156cba267bafa63b09b63b65c46444385a90c0e5684" dependencies = [ "ark-bn254 0.5.0", "ark-serialize 0.5.0", @@ -3190,16 +3166,35 @@ dependencies = [ "tracing", ] +[[package]] +name = "light-registry" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb3e904173f6b8048e6fe4d25ddfe6a77586b284f8788e5141cd3486a09ce8a6" +dependencies = [ + "account-compression", + "aligned-sized", + "anchor-lang", + "light-batched-merkle-tree 0.3.0", + "light-merkle-tree-metadata 0.3.0", + "light-system-program-anchor", + "solana-sdk", + "solana-security-txt", +] + [[package]] name = "light-sdk" -version = "0.15.0" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f36a1a313fe97c7f9e954e7399ab0cc7a35db0cf683532c1bbfacea625c50d" dependencies = [ "anchor-lang", "borsh 0.10.4", "light-account-checks 0.4.0", "light-compressed-account 0.5.0", + "light-concurrent-merkle-tree 3.0.0", "light-hasher 4.0.0", - "light-macros 2.1.0", + "light-macros", "light-sdk-macros", "light-sdk-types", "light-zero-copy 0.4.0", @@ -3216,8 +3211,11 @@ dependencies = [ [[package]] name = "light-sdk-macros" version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c98682c853cdfd979b7e7ccef5ee21ebba60c3fecf6741dfa71416026e9ad504" dependencies = [ "light-hasher 4.0.0", + "light-poseidon 0.3.0", "proc-macro2", "quote", "solana-pubkey", @@ -3227,13 +3225,16 @@ dependencies = [ [[package]] name = "light-sdk-types" version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d5536c1dd2a81459fef69286318bee7faf2d51ca24089249dceff21ec483829" dependencies = [ "anchor-lang", "borsh 0.10.4", "light-account-checks 0.4.0", "light-compressed-account 0.5.0", "light-hasher 4.0.0", - "light-macros 2.1.0", + "light-macros", + "light-zero-copy 0.4.0", "solana-msg", "thiserror 2.0.17", ] @@ -3241,6 +3242,8 @@ dependencies = [ [[package]] name = "light-sparse-merkle-tree" version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721396404dbb3556b5c14102736ef840188ade960098ea3222c68945767ca030" dependencies = [ "light-hasher 4.0.0", "light-indexed-array 0.2.0", @@ -3249,6 +3252,20 @@ dependencies = [ "thiserror 2.0.17", ] +[[package]] +name = "light-system-program-anchor" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1214b57abe1d89139f7ca632b66d4a8fc0e89945e781291a5cb12eb16de49cf3" +dependencies = [ + "account-compression", + "aligned-sized", + "anchor-lang", + "light-compressed-account 0.3.0", + "light-zero-copy 0.2.0", + "zerocopy", +] + [[package]] name = "light-verifier" version = "2.1.0" @@ -3260,6 +3277,17 @@ dependencies = [ "thiserror 2.0.17", ] +[[package]] +name = "light-verifier" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26398153a8c0fa61957a9ad046b3a433c401a37e0e0e9c8d42dee097fa76ce65" +dependencies = [ + "groth16-solana 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "light-compressed-account 0.5.0", + "thiserror 2.0.17", +] + [[package]] name = "light-zero-copy" version = "0.2.0" @@ -3274,14 +3302,19 @@ dependencies = [ [[package]] name = "light-zero-copy" version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f4167c97f1291176414af783c01b647292d809ec14f991884c6d91b9ca2213e" dependencies = [ "light-zero-copy-derive", + "solana-program-error", "zerocopy", ] [[package]] name = "light-zero-copy-derive" version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552463371ee2a6383882b17f7ed1a6803dbc9cb3c0188e0c74a014c2eb22f29e" dependencies = [ "lazy_static", "proc-macro2", @@ -3660,7 +3693,7 @@ version = "0.10.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "cfg-if", "foreign-types", "libc", @@ -3794,6 +3827,8 @@ dependencies = [ [[package]] name = "photon-api" version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "503b549aede7d9f35752046b9a32d8dfc1c7acec3c304a012c8b3134d5b98e37" dependencies = [ "reqwest 0.12.24", "serde", @@ -3836,23 +3871,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pinocchio" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b971851087bc3699b001954ad02389d50c41405ece3548cbcafc88b3e20017a" - -[[package]] -name = "pinocchio-pubkey" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0225638cadcbebae8932cb7f49cb5da7c15c21beb19f048f05a5ca7d93f065" -dependencies = [ - "five8_const", - "pinocchio", - "sha2-const-stable", -] - [[package]] name = "pkg-config" version = "0.3.32" @@ -4172,7 +4190,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", ] [[package]] @@ -4387,7 +4405,7 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "errno", "libc", "linux-raw-sys", @@ -4536,7 +4554,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "core-foundation", "core-foundation-sys", "libc", @@ -4697,12 +4715,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha2-const-stable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f179d4e11094a893b82fff208f74d448a7512f99f5a0acbd5c679b705f83ed9" - [[package]] name = "sha3" version = "0.10.8" @@ -5526,7 +5538,7 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0e85a6fad5c2d0c4f5b91d34b8ca47118fc593af706e523cdbedf846a954f57" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "solana-account-info", "solana-instruction", "solana-program-error", @@ -5796,7 +5808,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "004f2d2daf407b3ec1a1ca5ec34b3ccdfd6866dd2d3c7d0715004a96e4b6d127" dependencies = [ "bincode", - "bitflags 2.9.4", + "bitflags 2.10.0", "cfg_eval", "serde", "serde_derive", @@ -6826,7 +6838,7 @@ dependencies = [ "solana-transaction-error", "solana-transaction-status-client-types", "solana-vote-interface", - "spl-associated-token-account", + "spl-associated-token-account 7.0.0", "spl-memo", "spl-token 8.0.0", "spl-token-2022 8.0.1", @@ -7051,6 +7063,22 @@ dependencies = [ "zeroize", ] +[[package]] +name = "spl-associated-token-account" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76fee7d65013667032d499adc3c895e286197a35a0d3a4643c80e7fd3e9969e3" +dependencies = [ + "borsh 1.5.7", + "num-derive", + "num-traits", + "solana-program", + "spl-associated-token-account-client", + "spl-token 7.0.0", + "spl-token-2022 6.0.0", + "thiserror 1.0.69", +] + [[package]] name = "spl-associated-token-account" version = "7.0.0" @@ -7332,6 +7360,34 @@ dependencies = [ "thiserror 2.0.17", ] +[[package]] +name = "spl-token-2022" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b27f7405010ef816587c944536b0eafbcc35206ab6ba0f2ca79f1d28e488f4f" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "solana-security-txt", + "solana-zk-sdk", + "spl-elgamal-registry 0.1.1", + "spl-memo", + "spl-pod", + "spl-token 7.0.0", + "spl-token-confidential-transfer-ciphertext-arithmetic 0.2.1", + "spl-token-confidential-transfer-proof-extraction 0.2.1", + "spl-token-confidential-transfer-proof-generation 0.2.0", + "spl-token-group-interface 0.5.0", + "spl-token-metadata-interface 0.6.0", + "spl-transfer-hook-interface 0.9.0", + "spl-type-length-value 0.7.0", + "thiserror 1.0.69", +] + [[package]] name = "spl-token-2022" version = "7.0.0" @@ -7462,6 +7518,17 @@ dependencies = [ "thiserror 2.0.17", ] +[[package]] +name = "spl-token-confidential-transfer-proof-generation" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8627184782eec1894de8ea26129c61303f1f0adeed65c20e0b10bc584f09356d" +dependencies = [ + "curve25519-dalek 4.1.3", + "solana-zk-sdk", + "thiserror 1.0.69", +] + [[package]] name = "spl-token-confidential-transfer-proof-generation" version = "0.3.0" @@ -7739,7 +7806,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "core-foundation", "system-configuration-sys 0.6.0", ] @@ -8168,7 +8235,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "bytes", "futures-util", "http 1.3.1", @@ -9048,14 +9115,12 @@ dependencies = [ name = "zk-id" version = "0.1.0" dependencies = [ - "account-compression", "anchor-lang", "borsh 0.10.4", "circom-prover", - "groth16-solana 0.2.0", + "groth16-solana 0.2.0 (git+https://github.com/Lightprotocol/groth16-solana?rev=66c0dc87d0808c4d2aadb53c61435b6edb8ddfd9)", "light-client", "light-compressed-account 0.5.0", - "light-concurrent-merkle-tree 2.1.0", "light-hasher 4.0.0", "light-merkle-tree-reference 3.0.1", "light-program-test", diff --git a/zk-id/Cargo.toml b/zk-id/Cargo.toml index e48e7b6..94ea204 100644 --- a/zk-id/Cargo.toml +++ b/zk-id/Cargo.toml @@ -14,30 +14,26 @@ test-sbf = [] [dependencies] anchor-lang = "0.31.1" borsh = "0.10.4" -light-sdk = { path = "/Users/ananas/dev/light-protocol3/sdk-libs/sdk", features = ["anchor", "poseidon"] } -light-hasher = { path = "/Users/ananas/dev/light-protocol3/program-libs/hasher" } -light-sdk-types = { path = "/Users/ananas/dev/light-protocol3/sdk-libs/sdk-types" } -light-compressed-account = { path = "/Users/ananas/dev/light-protocol3/program-libs/compressed-account" } -# use cpi feature to avoid custom allocator conflict issues -account-compression = { version = "2", features = ["cpi"] } -groth16-solana = { path = "/Users/ananas/dev/groth16-solana" } -light-concurrent-merkle-tree = "2" +light-sdk = { version = "0.15.1", features = ["anchor", "poseidon", "merkle-tree"] } +light-hasher = "4" +light-sdk-types = "0.15.0" +groth16-solana = { git = "https://github.com/Lightprotocol/groth16-solana", rev = "66c0dc87d0808c4d2aadb53c61435b6edb8ddfd9" } [dev-dependencies] -light-program-test = { path = "/Users/ananas/dev/light-protocol3/sdk-libs/program-test" } -light-client = { path = "/Users/ananas/dev/light-protocol3/sdk-libs/client" } +light-program-test = "0.15.1" +light-client = "0.15.0" tokio = "1.40.0" solana-sdk = "2.2" circom-prover = "0.1" rust-witness = "0.1" num-bigint = "0.4" serde_json = "1.0" -light-compressed-account = { path = "/Users/ananas/dev/light-protocol3/program-libs/compressed-account", features = ["new-unique"] } -light-merkle-tree-reference= { path = "/Users/ananas/dev/light-protocol3/program-tests/merkle-tree" } -groth16-solana = { path = "/Users/ananas/dev/groth16-solana", features = ["vk", "circom"] } +light-compressed-account = { version = "0.5.0", features = ["new-unique"] } +light-merkle-tree-reference= "3" +groth16-solana = { git = "https://github.com/Lightprotocol/groth16-solana", features = ["vk", "circom"], rev = "66c0dc87d0808c4d2aadb53c61435b6edb8ddfd9" } [build-dependencies] [target.'cfg(not(target_os = "solana"))'.build-dependencies] rust-witness = "0.1" -groth16-solana = { path = "/Users/ananas/dev/groth16-solana", features = ["vk"] } +groth16-solana = { git = "https://github.com/Lightprotocol/groth16-solana", features = ["vk"], rev = "66c0dc87d0808c4d2aadb53c61435b6edb8ddfd9" } diff --git a/zk-id/README.md b/zk-id/README.md index 301be9b..b8b7b4b 100644 --- a/zk-id/README.md +++ b/zk-id/README.md @@ -1,6 +1,64 @@ +# ZK-ID Program + +A minimal zk id Solana program that uses zero-knowledge proofs for identity verification with compressed accounts. +(Note this is a proof of concept and not production-ready.) + +## Program Instructions + +### 1. `create_issuer` +Creates a compressed account for an issuer entity who can credential other users, storing their pubkey and initializing their credential issuance counter. + +### 2. `add_credential` +Issues a new credential by creating a compressed account that binds a user's pubkey to an issuer, incrementing the issuer's credential counter in the process. + +### 3. `zk_verify_credential` +Verifies a zero-knowledge proof of credential ownership using Groth16 verification and creates an encrypted event account to store the verification result on-chain. + +**Properties:** +- The credential is not exposed during zk proof verification. +- Each credential can only be used once per `verification_id`. + ## Requirements -- light-cli install with npm -g install @lightprotocol/zk-compression-cli + +### System Dependencies +- **Rust** (1.90.0 or later) +- **Node.js** (v22 or later) and npm +- **Solana CLI** (2.3.11 or later) +- **Light CLI**: Install with `npm install -g @lightprotocol/zk-compression-cli` + +### ZK Circuit Tools +- **Circom** (v2.2.2): Zero-knowledge circuit compiler +- **SnarkJS**: JavaScript library for generating and verifying ZK proofs + +To install circom and snarkjs: +```bash +# Install circom (Linux/macOS) +wget https://github.com/iden3/circom/releases/download/v2.2.2/circom-linux-amd64 +chmod +x circom-linux-amd64 +sudo mv circom-linux-amd64 /usr/local/bin/circom + +# For macOS, replace with circom-macos-amd64 + +# Install snarkjs globally +npm install -g snarkjs +``` + +## Setup + +Before building and testing, you need to compile the ZK circuits and generate the proving/verification keys: + +```bash +# Run the setup script to compile circuits and generate keys +./scripts/setup.sh +``` + +This script will: +1. Install npm dependencies +2. Download the Powers of Tau ceremony file +3. Compile the circom circuit +4. Generate the proving key (zkey) +5. Export the verification key ## Build and Test @@ -11,3 +69,27 @@ cargo build-sbf # Run tests and see tx RUST_BACKTRACE=1 cargo test-sbf -- --nocapture ``` + +## Structure + +``` +zk-id/ +├── circuits/ # Circom circuit definitions +│ └── compressed_account_merkle_proof.circom +├── build/ # Generated circuit artifacts (after setup) +│ ├── verification_key.json +│ └── *.zkey, *.wasm, etc. +├── scripts/ +│ └── setup.sh # Circuit compilation and setup script +├── src/ +│ └── lib.rs # Solana program implementation +└── tests/ + └── test.rs # Integration tests +``` + +## Cleaning Build Artifacts + +To clean generated circuit files: +```bash +./scripts/clean.sh +``` diff --git a/zk-id/scripts/setup.sh b/zk-id/scripts/setup.sh index 0f986d3..9f0ddef 100755 --- a/zk-id/scripts/setup.sh +++ b/zk-id/scripts/setup.sh @@ -67,16 +67,64 @@ PTAU_FILE="pot/powersOfTau28_hez_final_16.ptau" if [ -f "$PTAU_FILE" ]; then echo -e "${YELLOW}Powers of Tau file already exists, skipping download${NC}" else - echo "Downloading from Hermez ceremony (this may take a few minutes)..." - curl -L -o "$PTAU_FILE" \ - https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final_16.ptau - - if [ $? -eq 0 ]; then - echo -e "${GREEN}✓${NC} Powers of Tau downloaded successfully" - else - echo -e "${RED}Error: Failed to download Powers of Tau${NC}" + echo "Downloading Powers of Tau file (this may take a few minutes)..." + + # Try up to 3 times to download the file + MAX_RETRIES=3 + RETRY_COUNT=0 + DOWNLOAD_SUCCESS=false + + # Use the Google Cloud Storage URL which is more reliable + PTAU_URL="https://storage.googleapis.com/zkevm/ptau/powersOfTau28_hez_final_16.ptau" + + while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$DOWNLOAD_SUCCESS" = "false" ]; do + RETRY_COUNT=$((RETRY_COUNT + 1)) + + if [ $RETRY_COUNT -gt 1 ]; then + echo "Retry attempt $RETRY_COUNT of $MAX_RETRIES..." + fi + + # Download with curl (more universally available in CI) + curl -L --fail --retry 3 --retry-delay 5 \ + --output "$PTAU_FILE" \ + --progress-bar \ + "$PTAU_URL" + + if [ $? -eq 0 ] && [ -f "$PTAU_FILE" ]; then + # Check file size - powersOfTau28_hez_final_16.ptau should be around 72MB + FILE_SIZE=$(stat -f%z "$PTAU_FILE" 2>/dev/null || stat -c%s "$PTAU_FILE" 2>/dev/null || echo "0") + MIN_SIZE=$((70 * 1024 * 1024)) # 70 MB minimum + MAX_SIZE=$((80 * 1024 * 1024)) # 80 MB maximum + + if [ "$FILE_SIZE" -ge "$MIN_SIZE" ] && [ "$FILE_SIZE" -le "$MAX_SIZE" ]; then + echo -e "${GREEN}✓${NC} Powers of Tau downloaded successfully ($(( FILE_SIZE / 1024 / 1024 )) MB)" + DOWNLOAD_SUCCESS=true + else + echo -e "${YELLOW}Warning: Unexpected file size (got $(( FILE_SIZE / 1024 / 1024 )) MB)${NC}" + rm -f "$PTAU_FILE" + + if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then + echo "Retrying download..." + sleep 2 + fi + fi + else + echo -e "${YELLOW}Download attempt failed${NC}" + rm -f "$PTAU_FILE" + + if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then + sleep 2 + fi + fi + done + + if [ "$DOWNLOAD_SUCCESS" = "false" ]; then + echo -e "${RED}Error: Failed to download Powers of Tau after $MAX_RETRIES attempts${NC}" + echo "" echo "Please download manually from:" - echo "https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final_16.ptau" + echo "https://storage.googleapis.com/zkevm/ptau/powersOfTau28_hez_final_16.ptau" + echo "" + echo "Then place the file at: $PTAU_FILE" exit 1 fi fi diff --git a/zk-id/src/lib.rs b/zk-id/src/lib.rs index 42151d3..4cda04b 100644 --- a/zk-id/src/lib.rs +++ b/zk-id/src/lib.rs @@ -1,18 +1,19 @@ #![allow(unexpected_cfgs)] #![allow(deprecated)] -use account_compression::{state_merkle_tree_from_bytes_zero_copy, StateMerkleTreeAccount}; use anchor_lang::{prelude::*, AnchorDeserialize, AnchorSerialize}; use borsh::{BorshDeserialize, BorshSerialize}; use groth16_solana::groth16::Groth16Verifier; -use light_compressed_account::instruction_data::compressed_proof::CompressedProof; use light_sdk::account::{poseidon::LightAccount as LightAccountPoseidon, LightAccount}; use light_sdk::cpi::v1::CpiAccounts; use light_sdk::{ address::v1::derive_address, cpi::{v1::LightSystemProgramCpi, InvokeLightSystemProgram, LightCpiInstruction}, derive_light_cpi_signer, - instruction::{account_meta::CompressedAccountMeta, PackedAddressTreeInfo, ValidityProof}, + instruction::{ + account_meta::CompressedAccountMeta, CompressedProof, PackedAddressTreeInfo, ValidityProof, + }, + merkle_tree::v1::read_state_merkle_tree_root, LightDiscriminator, LightHasher, }; use light_sdk_types::CpiSigner; @@ -147,7 +148,7 @@ pub mod zk_id { /// Verifies a ZK proof of credential ownership and creates an encrypted event account. pub fn zk_verify_credential<'info>( - ctx: Context<'_, '_, '_, 'info, GenericAnchorAccounts<'info>>, + ctx: Context<'_, '_, '_, 'info, VerifyAccounts<'info>>, proof: ValidityProof, address_tree_info: PackedAddressTreeInfo, output_state_tree_index: u8, @@ -184,8 +185,11 @@ pub mod zk_id { ); // Get root from input Merkle tree (example of reading on-chain state) - let expected_root = - read_merkle_tree_root(&ctx.accounts.input_merkle_tree, input_root_index)?; + let expected_root = read_state_merkle_tree_root( + &ctx.accounts.input_merkle_tree.to_account_info(), + input_root_index, + ) + .map_err(|e| ProgramError::from(e))?; let mut discriminator = [0u8; 32]; discriminator[24..].copy_from_slice(CredentialAccount::LIGHT_DISCRIMINATOR_SLICE); let issuer_hashed = hashv_to_bn254_field_size_be_const_array::<2>(&[&issuer]).unwrap(); @@ -202,57 +206,57 @@ pub mod zk_id { let event_account_info = event_account .to_output_compressed_account_with_packed_context(None)? .unwrap(); - - // Construct public inputs array for the circuit - // Order MUST match the circuit's public declaration exactly: - // owner_hashed, merkle_tree_hashed, discriminator, issuer_hashed, expectedRoot, public_encrypted_data_hash, public_data_hash - let public_inputs: [[u8; 32]; 7] = [ - account_owner_hashed, - merkle_tree_hashed, - discriminator, - issuer_hashed, - event_account_info - .compressed_account - .data - .as_ref() - .unwrap() - .data_hash, // This is public_encrypted_data_hash - data_hash, // This is public_data_hash - expected_root, - ]; - - let proof_a = decompress_g1(&credential_proof.a).map_err(|e| { - let code: u32 = e.into(); - Error::from(ProgramError::Custom(code)) - })?; - - let proof_b = decompress_g2(&credential_proof.b).map_err(|e| { - let code: u32 = e.into(); - Error::from(ProgramError::Custom(code)) - })?; - let proof_c = decompress_g1(&credential_proof.c).map_err(|e| { - let code: u32 = e.into(); - Error::from(ProgramError::Custom(code)) - })?; - - // Verify the Groth16 proof - let mut verifier = Groth16Verifier::new( - &proof_a, - &proof_b, - &proof_c, - &public_inputs, - &crate::verifying_key::VERIFYINGKEY, - ) - .map_err(|e| { - let code: u32 = e.into(); - Error::from(ProgramError::Custom(code)) - })?; - - verifier.verify().map_err(|e| { - let code: u32 = e.into(); - Error::from(ProgramError::Custom(code)) - })?; - + { + // Construct public inputs array for the circuit + // Order MUST match the circuit's public declaration exactly: + // owner_hashed, merkle_tree_hashed, discriminator, issuer_hashed, expectedRoot, public_encrypted_data_hash, public_data_hash + let public_inputs: [[u8; 32]; 7] = [ + account_owner_hashed, + merkle_tree_hashed, + discriminator, + issuer_hashed, + event_account_info + .compressed_account + .data + .as_ref() + .unwrap() + .data_hash, // This is public_encrypted_data_hash + data_hash, // This is public_data_hash + expected_root, + ]; + + let proof_a = decompress_g1(&credential_proof.a).map_err(|e| { + let code: u32 = e.into(); + Error::from(ProgramError::Custom(code)) + })?; + + let proof_b = decompress_g2(&credential_proof.b).map_err(|e| { + let code: u32 = e.into(); + Error::from(ProgramError::Custom(code)) + })?; + let proof_c = decompress_g1(&credential_proof.c).map_err(|e| { + let code: u32 = e.into(); + Error::from(ProgramError::Custom(code)) + })?; + + // Verify the Groth16 proof + let mut verifier = Groth16Verifier::new( + &proof_a, + &proof_b, + &proof_c, + &public_inputs, + &crate::verifying_key::VERIFYINGKEY, + ) + .map_err(|e| { + let code: u32 = e.into(); + Error::from(ProgramError::Custom(code)) + })?; + + verifier.verify().map_err(|e| { + let code: u32 = e.into(); + Error::from(ProgramError::Custom(code)) + })?; + } LightSystemProgramCpi::new_cpi(LIGHT_CPI_SIGNER, proof) .with_output_compressed_accounts(&[event_account_info]) .with_new_addresses(&[address_tree_info.into_new_address_params_packed(address_seed)]) @@ -261,12 +265,17 @@ pub mod zk_id { Ok(()) } } - #[derive(Accounts)] pub struct GenericAnchorAccounts<'info> { #[account(mut)] pub signer: Signer<'info>, - pub input_merkle_tree: AccountLoader<'info, StateMerkleTreeAccount>, +} +#[derive(Accounts)] +pub struct VerifyAccounts<'info> { + #[account(mut)] + pub signer: Signer<'info>, + /// CHECK: read_state_merkle_tree_root checks account owner, and discriminator + pub input_merkle_tree: UncheckedAccount<'info>, } #[derive( @@ -290,24 +299,6 @@ pub struct IssuerAccount { pub num_credentials_issued: u64, } -/// Reads a root from the concurrent state merkle tree by index -pub fn read_merkle_tree_root( - input_merkle_tree: &AccountLoader, - root_index: u16, -) -> Result<[u8; 32]> { - let account_info = input_merkle_tree.to_account_info(); - let account_data = account_info.try_borrow_data()?; - - let merkle_tree = state_merkle_tree_from_bytes_zero_copy(&account_data) - .map_err(|_| ProgramError::InvalidAccountData)?; - - if root_index as usize >= merkle_tree.roots.len() { - return Err(ProgramError::InvalidArgument.into()); - } - - Ok(merkle_tree.roots[root_index as usize]) -} - #[error_code] pub enum ErrorCode { #[msg("Invalid issuer: signer is not the issuer of this account")] diff --git a/zk-id/tests/test.rs b/zk-id/tests/test.rs index c28b336..7569f24 100644 --- a/zk-id/tests/test.rs +++ b/zk-id/tests/test.rs @@ -1,4 +1,4 @@ -// #![cfg(feature = "test-sbf")] +#![cfg(feature = "test-sbf")] use anchor_lang::{InstructionData, ToAccountMetas}; use circom_prover::{prover::ProofLib, witness::WitnessFn, CircomProver}; @@ -101,8 +101,8 @@ async fn test_create_issuer_and_add_credential() { .expect("Credential account not found"); println!("credential_account {:?}", credential_account); verify_credential(&mut rpc, &payer, &credential_account, address_tree_info) - .await - .unwrap(); + .await + .unwrap(); println!("Successfully verified credential with ZK proof!"); @@ -154,7 +154,6 @@ where let accounts = zk_id::accounts::GenericAnchorAccounts { signer: payer.pubkey(), - input_merkle_tree: rpc.get_random_state_tree_info()?.tree, }; let instruction = Instruction { @@ -229,7 +228,6 @@ where let accounts = zk_id::accounts::GenericAnchorAccounts { signer: payer.pubkey(), - input_merkle_tree: rpc.get_random_state_tree_info()?.tree, }; let instruction = Instruction { @@ -349,7 +347,7 @@ where verification_id, }; - let accounts = zk_id::accounts::GenericAnchorAccounts { + let accounts = zk_id::accounts::VerifyAccounts { signer: payer.pubkey(), input_merkle_tree: state_tree, }; From 0a531fcb448e53963f7be413b7e5e28b34c9873d Mon Sep 17 00:00:00 2001 From: ananas Date: Mon, 20 Oct 2025 20:04:18 +0100 Subject: [PATCH 11/14] refactor: use randomness for trusted setup --- .github/actions/setup/action.yml | 7 +++++++ zk-id/circuits/README.md | 1 - zk-id/scripts/setup.sh | 8 +++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 15b3c2a..a46c062 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -108,6 +108,13 @@ runs: shell: bash run: npm install -g @lightprotocol/zk-compression-cli + - name: Cache Powers of Tau file + if: inputs.install-circom == 'true' + uses: actions/cache@v4 + with: + path: ${{ inputs.example }}/pot/powersOfTau28_hez_final_16.ptau + key: ptau-powersOfTau28_hez_final_16-v1 + - name: Cache circom installation if: inputs.install-circom == 'true' id: cache-circom diff --git a/zk-id/circuits/README.md b/zk-id/circuits/README.md index 200be6f..40ba6e7 100644 --- a/zk-id/circuits/README.md +++ b/zk-id/circuits/README.md @@ -71,6 +71,5 @@ Private inputs: ## References - Compressed Account Circuit: https://github.com/ananas-block/compressed-account-circuit -- Merkle Proof Implementation: /Users/ananas/dev/light-protocol2/circuit-lib/circuit-lib.circom - Mopro ZK Library: https://github.com/zkmopro/mopro - SnarkJS: https://github.com/iden3/snarkjs diff --git a/zk-id/scripts/setup.sh b/zk-id/scripts/setup.sh index 9f0ddef..39c762c 100755 --- a/zk-id/scripts/setup.sh +++ b/zk-id/scripts/setup.sh @@ -169,12 +169,18 @@ fi # Contribute to the ceremony echo "" echo "Contributing to the ceremony..." +# Generate real randomness from /dev/urandom combined with system entropy +# This creates 256 bits of entropy for the contribution +RANDOM_ENTROPY=$(head -c 32 /dev/urandom | xxd -p -c 256) +SYSTEM_ENTROPY="${RANDOM}${RANDOM}${RANDOM}$(date +%s%N)$(uname -a | sha256sum | cut -d' ' -f1)" +COMBINED_ENTROPY="${RANDOM_ENTROPY}${SYSTEM_ENTROPY}" + npx snarkjs zkey contribute \ build/circuit_0000.zkey \ build/compressed_account_merkle_proof_final.zkey \ --name="First contribution" \ -v \ - -e="$(date +%s)" + -e="$COMBINED_ENTROPY" if [ $? -eq 0 ]; then echo -e "${GREEN}✓${NC} Contribution complete" From 4e55253c78e9789a6a87041972f40575f2802715 Mon Sep 17 00:00:00 2001 From: ananas Date: Mon, 20 Oct 2025 20:15:44 +0100 Subject: [PATCH 12/14] refactor: hash merkle tree pubkey onchain, chore: update circuit readme --- zk-id/circuits/README.md | 82 +++++++++++--------------------------- zk-id/src/lib.rs | 7 +++- zk-id/src/verifying_key.rs | 2 +- zk-id/tests/test.rs | 3 -- 4 files changed, 31 insertions(+), 63 deletions(-) diff --git a/zk-id/circuits/README.md b/zk-id/circuits/README.md index 40ba6e7..dc4c50a 100644 --- a/zk-id/circuits/README.md +++ b/zk-id/circuits/README.md @@ -1,75 +1,41 @@ -# ZK Circom Circuit for Compressed Account Merkle Proof +# Compressed Account Merkle Proof Circuit -This directory contains a circom circuit that verifies a Merkle proof of a compressed account on Solana. +Zero-knowledge circuit that proves ownership of a compressed account in a Merkle tree without revealing the account details. -## Circuit Overview +## What It Does -The `compressed_account_merkle_proof.circom` circuit combines two key components: +The circuit verifies: +1. **Account Hash** - Computes Poseidon hash of account fields (owner, discriminator, data) +2. **Merkle Inclusion** - Proves the account exists at a specific leaf in a 26-level tree -1. **Compressed Account Hash**: Computes the hash of a compressed account using Poseidon hash - - Based on: https://github.com/ananas-block/compressed-account-circuit - - Inputs: owner_hashed, leaf_index, merkle_tree_hashed, discriminator, data_hash - -2. **Merkle Proof Verification**: Verifies the account exists in a Merkle tree - - Based on: /Users/ananas/dev/light-protocol2/circuit-lib/circuit-lib.circom - - Inputs: pathElements (26 levels), expectedRoot - -## Setup - -Run the setup script - it will handle dependencies, compilation, and key generation: +## Setup & Testing ```bash +# Compile circuit and generate keys ./scripts/setup.sh -``` -To clean up build artifacts: +# Run tests +cargo test-sbf -```bash +# Clean build artifacts ./scripts/clean.sh ``` -## Testing - -### Rust Test with Mopro +## Circuit I/O -The circuit can be tested from Rust using the mopro library: +**Public inputs** (visible in proof): +- `owner_hashed`, `merkle_tree_hashed`, `discriminator` - Account identifiers +- `issuer_hashed` - Credential issuer +- `expectedRoot` - Merkle tree root +- `public_encrypted_data_hash`, `public_data_hash` - Data commitments -```bash -cargo test test_compressed_account_merkle_proof_circuit -``` +**Private inputs** (hidden): +- `leaf_index` - Account position in tree +- `pathElements[26]` - Merkle proof path -This test: -1. Loads the compiled circuit and zkey -2. Generates a proof with sample inputs -3. Verifies the proof is valid +## Architecture -## Circuit Structure - -``` -CompressedAccountMerkleProof (main) -├── CompressedAccountHash -│ └── Poseidon(5) - Hashes account fields -└── MerkleProof(26) - ├── Num2Bits - Converts leaf index to bits - ├── Switcher[26] - Routes left/right based on path - └── Poseidon(2)[26] - Hashes up the tree ``` - -## Public Inputs - -The following inputs are public (visible in the proof): -- owner_hashed -- merkle_tree_hashed -- discriminator -- data_hash -- expectedRoot - -Private inputs: -- leaf_index -- pathElements - -## References - -- Compressed Account Circuit: https://github.com/ananas-block/compressed-account-circuit -- Mopro ZK Library: https://github.com/zkmopro/mopro -- SnarkJS: https://github.com/iden3/snarkjs +CompressedAccountMerkleProof +├── CompressedAccountHash (Poseidon hash of 5 fields) +└── MerkleProof (26-level binary tree verification) diff --git a/zk-id/src/lib.rs b/zk-id/src/lib.rs index 4cda04b..a8a8787 100644 --- a/zk-id/src/lib.rs +++ b/zk-id/src/lib.rs @@ -156,7 +156,6 @@ pub mod zk_id { encrypted_data: Vec, credential_proof: CompressedProof, issuer: [u8; 32], - merkle_tree_hashed: [u8; 32], data_hash: [u8; 32], verification_id: [u8; 32], ) -> Result<()> { @@ -190,6 +189,12 @@ pub mod zk_id { input_root_index, ) .map_err(|e| ProgramError::from(e))?; + + let merkle_tree_pubkey = ctx.accounts.input_merkle_tree.key(); + let merkle_tree_hashed = + hashv_to_bn254_field_size_be_const_array::<2>(&[&merkle_tree_pubkey.to_bytes()]) + .unwrap(); + let mut discriminator = [0u8; 32]; discriminator[24..].copy_from_slice(CredentialAccount::LIGHT_DISCRIMINATOR_SLICE); let issuer_hashed = hashv_to_bn254_field_size_be_const_array::<2>(&[&issuer]).unwrap(); diff --git a/zk-id/src/verifying_key.rs b/zk-id/src/verifying_key.rs index effad18..56211b1 100644 --- a/zk-id/src/verifying_key.rs +++ b/zk-id/src/verifying_key.rs @@ -9,7 +9,7 @@ pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey { vk_gamma_g2: [25u8, 142u8, 147u8, 147u8, 146u8, 13u8, 72u8, 58u8, 114u8, 96u8, 191u8, 183u8, 49u8, 251u8, 93u8, 37u8, 241u8, 170u8, 73u8, 51u8, 53u8, 169u8, 231u8, 18u8, 151u8, 228u8, 133u8, 183u8, 174u8, 243u8, 18u8, 194u8, 24u8, 0u8, 222u8, 239u8, 18u8, 31u8, 30u8, 118u8, 66u8, 106u8, 0u8, 102u8, 94u8, 92u8, 68u8, 121u8, 103u8, 67u8, 34u8, 212u8, 247u8, 94u8, 218u8, 221u8, 70u8, 222u8, 189u8, 92u8, 217u8, 146u8, 246u8, 237u8, 9u8, 6u8, 137u8, 208u8, 88u8, 95u8, 240u8, 117u8, 236u8, 158u8, 153u8, 173u8, 105u8, 12u8, 51u8, 149u8, 188u8, 75u8, 49u8, 51u8, 112u8, 179u8, 142u8, 243u8, 85u8, 172u8, 218u8, 220u8, 209u8, 34u8, 151u8, 91u8, 18u8, 200u8, 94u8, 165u8, 219u8, 140u8, 109u8, 235u8, 74u8, 171u8, 113u8, 128u8, 141u8, 203u8, 64u8, 143u8, 227u8, 209u8, 231u8, 105u8, 12u8, 67u8, 211u8, 123u8, 76u8, 230u8, 204u8, 1u8, 102u8, 250u8, 125u8, 170u8], - vk_delta_g2: [21u8, 72u8, 208u8, 181u8, 233u8, 215u8, 234u8, 232u8, 113u8, 68u8, 77u8, 114u8, 103u8, 162u8, 47u8, 11u8, 120u8, 77u8, 110u8, 19u8, 67u8, 254u8, 169u8, 8u8, 191u8, 75u8, 11u8, 227u8, 210u8, 6u8, 173u8, 116u8, 45u8, 185u8, 182u8, 83u8, 53u8, 212u8, 78u8, 213u8, 69u8, 211u8, 202u8, 5u8, 201u8, 183u8, 233u8, 109u8, 204u8, 118u8, 17u8, 183u8, 24u8, 152u8, 252u8, 216u8, 43u8, 181u8, 124u8, 88u8, 151u8, 223u8, 136u8, 89u8, 6u8, 22u8, 50u8, 253u8, 219u8, 31u8, 186u8, 76u8, 70u8, 153u8, 107u8, 169u8, 85u8, 202u8, 171u8, 74u8, 160u8, 61u8, 172u8, 104u8, 190u8, 41u8, 165u8, 192u8, 39u8, 17u8, 21u8, 78u8, 131u8, 223u8, 52u8, 147u8, 19u8, 186u8, 39u8, 3u8, 160u8, 232u8, 28u8, 85u8, 253u8, 159u8, 62u8, 190u8, 149u8, 21u8, 38u8, 33u8, 245u8, 201u8, 183u8, 80u8, 156u8, 157u8, 166u8, 239u8, 220u8, 76u8, 134u8, 209u8, 85u8, 64u8, 120u8, 130u8], + vk_delta_g2: [21u8, 95u8, 178u8, 184u8, 133u8, 102u8, 147u8, 146u8, 185u8, 207u8, 155u8, 169u8, 158u8, 231u8, 105u8, 245u8, 57u8, 139u8, 26u8, 255u8, 16u8, 86u8, 101u8, 167u8, 236u8, 145u8, 51u8, 165u8, 20u8, 243u8, 112u8, 130u8, 38u8, 60u8, 197u8, 144u8, 223u8, 87u8, 184u8, 6u8, 235u8, 119u8, 43u8, 252u8, 230u8, 206u8, 211u8, 215u8, 100u8, 176u8, 179u8, 120u8, 38u8, 106u8, 147u8, 215u8, 224u8, 190u8, 214u8, 137u8, 240u8, 14u8, 47u8, 193u8, 16u8, 27u8, 107u8, 220u8, 204u8, 166u8, 239u8, 13u8, 108u8, 46u8, 38u8, 131u8, 183u8, 51u8, 95u8, 158u8, 158u8, 190u8, 201u8, 191u8, 130u8, 253u8, 232u8, 240u8, 162u8, 198u8, 123u8, 165u8, 73u8, 239u8, 104u8, 173u8, 20u8, 105u8, 38u8, 204u8, 145u8, 51u8, 145u8, 114u8, 144u8, 104u8, 74u8, 34u8, 237u8, 28u8, 141u8, 184u8, 26u8, 194u8, 19u8, 233u8, 9u8, 172u8, 238u8, 107u8, 40u8, 113u8, 252u8, 18u8, 171u8, 199u8, 146u8, 213u8], vk_ic: &[ [22u8, 24u8, 254u8, 206u8, 152u8, 246u8, 56u8, 167u8, 103u8, 120u8, 252u8, 140u8, 102u8, 72u8, 191u8, 241u8, 29u8, 106u8, 51u8, 197u8, 27u8, 159u8, 141u8, 78u8, 189u8, 160u8, 73u8, 24u8, 183u8, 155u8, 8u8, 91u8, 41u8, 139u8, 41u8, 97u8, 22u8, 78u8, 73u8, 136u8, 207u8, 61u8, 34u8, 70u8, 147u8, 59u8, 149u8, 33u8, 109u8, 142u8, 61u8, 247u8, 162u8, 228u8, 118u8, 62u8, 86u8, 245u8, 185u8, 137u8, 77u8, 166u8, 60u8, 84u8], diff --git a/zk-id/tests/test.rs b/zk-id/tests/test.rs index 7569f24..0c88c4c 100644 --- a/zk-id/tests/test.rs +++ b/zk-id/tests/test.rs @@ -332,8 +332,6 @@ where .get_random_state_tree_info()? .pack_output_tree_index(&mut remaining_accounts)?; - let merkle_tree_hashed = hash_to_bn254_field_size_be(state_tree.as_ref()); - let instruction_data = zk_id::instruction::ZkVerifyCredential { proof: rpc_result.proof, address_tree_info: packed_address_tree_accounts[0], @@ -342,7 +340,6 @@ where encrypted_data, credential_proof, issuer: credential_account_parsed.issuer.to_bytes(), - merkle_tree_hashed, data_hash, verification_id, }; From 36a75e8bd3d4450a80e53cf8a310221efdc27201 Mon Sep 17 00:00:00 2001 From: ananas Date: Mon, 20 Oct 2025 22:12:44 +0100 Subject: [PATCH 13/14] refactor: add secret to credential --- zk-id/README.md | 10 +- zk-id/circuits/README.md | 26 ++- zk-id/circuits/compressed_account.circom | 27 +++ .../compressed_account_merkle_proof.circom | 121 ++++++-------- zk-id/circuits/credential.circom | 41 +++++ zk-id/circuits/merkle_proof.circom | 33 ++++ zk-id/src/lib.rs | 48 ++++-- zk-id/src/verifying_key.rs | 124 ++++++++++++-- zk-id/tests/circuit.rs | 154 +++++++++++++----- zk-id/tests/test.rs | 148 ++++++++++++----- 10 files changed, 541 insertions(+), 191 deletions(-) create mode 100644 zk-id/circuits/compressed_account.circom create mode 100644 zk-id/circuits/credential.circom create mode 100644 zk-id/circuits/merkle_proof.circom diff --git a/zk-id/README.md b/zk-id/README.md index b8b7b4b..e29ab0a 100644 --- a/zk-id/README.md +++ b/zk-id/README.md @@ -2,7 +2,10 @@ # ZK-ID Program A minimal zk id Solana program that uses zero-knowledge proofs for identity verification with compressed accounts. -(Note this is a proof of concept and not production-ready.) +Note this is an example how to verify a zk inclusion proof, not a full zk identity protocol and not production-ready. +For examples of zk identity protocols, see: +- [Iden3](https://github.com/iden3) - Full decentralized identity protocol with claims, revocation, and recovery +- [Semaphore](https://github.com/semaphore-protocol/semaphore) - Privacy-preserving group signaling with nullifiers ## Program Instructions @@ -16,8 +19,9 @@ Issues a new credential by creating a compressed account that binds a user's pub Verifies a zero-knowledge proof of credential ownership using Groth16 verification and creates an encrypted event account to store the verification result on-chain. **Properties:** -- The credential is not exposed during zk proof verification. -- Each credential can only be used once per `verification_id`. +- Credential verification is private. The credential is not exposed during zk proof verification. +- Each credential can only be used once per `verification_id`. (The event account address serves as a nullifier.) +- Only the credential owner can produce a valid proof. ## Requirements diff --git a/zk-id/circuits/README.md b/zk-id/circuits/README.md index dc4c50a..e367024 100644 --- a/zk-id/circuits/README.md +++ b/zk-id/circuits/README.md @@ -27,15 +27,31 @@ cargo test-sbf - `owner_hashed`, `merkle_tree_hashed`, `discriminator` - Account identifiers - `issuer_hashed` - Credential issuer - `expectedRoot` - Merkle tree root -- `public_encrypted_data_hash`, `public_data_hash` - Data commitments +- `verification_id` - Context for nullifier generation (prevents reuse in same context) +- `public_encrypted_data_hash` - Encrypted data commitment +- `nullifier` - Unique value preventing double-spending (Poseidon(verification_id, credential_secret)) **Private inputs** (hidden): -- `leaf_index` - Account position in tree +- `credentialPrivateKey` - Secret key proving credential ownership +- `leaf_index`, `account_leaf_index` - Account positions +- `address` - Account address - `pathElements[26]` - Merkle proof path +- `encrypted_data_hash` - Private data hash + +## Circuit Files + +- `compressed_account_merkle_proof.circom` - Main circuit that combines all components +- `credential.circom` - Keypair verification for credential ownership +- `compressed_account.circom` - Computes Poseidon hash of account fields +- `merkle_proof.circom` - Binary Merkle tree inclusion proof ## Architecture ``` -CompressedAccountMerkleProof -├── CompressedAccountHash (Poseidon hash of 5 fields) -└── MerkleProof (26-level binary tree verification) +CompressedAccountMerkleProof (main) +├── Keypair (credential.circom) +│ └── Proves knowledge of private key +├── CompressedAccountHash (compressed_account.circom) +│ └── Poseidon hash of 6 fields +└── MerkleProof (merkle_proof.circom) + └── 26-level binary tree verification diff --git a/zk-id/circuits/compressed_account.circom b/zk-id/circuits/compressed_account.circom new file mode 100644 index 0000000..e959890 --- /dev/null +++ b/zk-id/circuits/compressed_account.circom @@ -0,0 +1,27 @@ +pragma circom 2.0.0; + +include "../node_modules/circomlib/circuits/poseidon.circom"; + +// Compressed Account Hash Template +// Computes the hash of a compressed account +template CompressedAccountHash() { + signal input owner_hashed; + signal input leaf_index; + signal input merkle_tree_hashed; + signal input address; + signal input discriminator; + signal input data_hash; + + signal output hash; + + component poseidon = Poseidon(6); + + poseidon.inputs[0] <== owner_hashed; + poseidon.inputs[1] <== leaf_index; + poseidon.inputs[2] <== merkle_tree_hashed; + poseidon.inputs[3] <== address; + poseidon.inputs[4] <== discriminator + 36893488147419103232; // + discriminator domain + poseidon.inputs[5] <== data_hash; + + hash <== poseidon.out; +} \ No newline at end of file diff --git a/zk-id/circuits/compressed_account_merkle_proof.circom b/zk-id/circuits/compressed_account_merkle_proof.circom index 390d18a..b915b15 100644 --- a/zk-id/circuits/compressed_account_merkle_proof.circom +++ b/zk-id/circuits/compressed_account_merkle_proof.circom @@ -1,106 +1,86 @@ pragma circom 2.0.0; include "../node_modules/circomlib/circuits/poseidon.circom"; -include "../node_modules/circomlib/circuits/bitify.circom"; -include "../node_modules/circomlib/circuits/switcher.circom"; -include "../node_modules/circomlib/circuits/comparators.circom"; +include "./credential.circom"; +include "./compressed_account.circom"; +include "./merkle_proof.circom"; -// Compressed Account Hash Template -// Computes the hash of a compressed account -template CompressedAccountHash() { + + +// Main Circuit: Compressed Account Merkle Proof Verification +// Computes compressed account hash and verifies it exists in a Merkle tree +template CompressedAccountMerkleProof(levels) { + // ============ PUBLIC INPUTS ============ + // Account identifiers signal input owner_hashed; - signal input leaf_index; signal input merkle_tree_hashed; - signal input address; signal input discriminator; - signal input data_hash; - - signal output hash; - - component poseidon = Poseidon(6); - - poseidon.inputs[0] <== owner_hashed; - poseidon.inputs[1] <== leaf_index; - poseidon.inputs[2] <== merkle_tree_hashed; - poseidon.inputs[3] <== address; - poseidon.inputs[4] <== discriminator + 36893488147419103232; // + discriminator domain - poseidon.inputs[5] <== data_hash; - - hash <== poseidon.out; -} - -// Merkle Proof Verification Template -// Verifies that a leaf is in a Merkle tree with a given root -template MerkleProof(levels) { - signal input leaf; - signal input pathElements[levels]; - signal input leafIndex; - signal output root; + signal input issuer_hashed; - component switcher[levels]; - component hasher[levels]; + // Merkle tree root + signal input expectedRoot; - component indexBits = Num2Bits(levels); - indexBits.in <== leafIndex; + // Verification context (external nullifier) + signal input verification_id; - for (var i = 0; i < levels; i++) { - switcher[i] = Switcher(); - switcher[i].L <== i == 0 ? leaf : hasher[i - 1].out; - switcher[i].R <== pathElements[i]; - switcher[i].sel <== indexBits.out[i]; + // Data commitments + signal input public_encrypted_data_hash; - hasher[i] = Poseidon(2); - hasher[i].inputs[0] <== switcher[i].outL; - hasher[i].inputs[1] <== switcher[i].outR; - } + // Nullifier (prevents double-spending) + signal input nullifier; - root <== hasher[levels - 1].out; -} + // ============ PRIVATE INPUTS ============ + // Credential secret + signal input credentialPrivateKey; -// Main Circuit: Compressed Account Merkle Proof Verification -// Computes compressed account hash and verifies it exists in a Merkle tree -template CompressedAccountMerkleProof(levels) { - // Compressed account inputs - signal input owner_hashed; + // Account position signal input leaf_index; signal input account_leaf_index; signal input address; - signal input merkle_tree_hashed; - signal input discriminator; - signal input issuer_hashed; - signal input credential_pubkey_hashed; - signal input encrypted_data_hash; - signal input public_encrypted_data_hash; - signal input public_data_hash; - // Merkle proof inputs + // Merkle proof signal input pathElements[levels]; - signal input expectedRoot; + // Private data + signal input encrypted_data_hash; + + // Step 1: Verify credential ownership using private key + component keypair = Keypair(); + keypair.privateKey <== credentialPrivateKey; + signal credential_pubkey_commitment <== keypair.publicKey; + + // Step 2: Compute and verify nullifier + // Nullifier = Poseidon(verification_id, credentialPrivateKey) + // This ensures each credential can only be used once per verification_id + // without leaking information about the credential itself. + component nullifierHasher = Poseidon(2); + nullifierHasher.inputs[0] <== verification_id; + nullifierHasher.inputs[1] <== credentialPrivateKey; + nullifier === nullifierHasher.out; + + // Step 3: Compute the credential data hash (used internally for account hash) component data_hasher = Poseidon(2); data_hasher.inputs[0] <== issuer_hashed; - data_hasher.inputs[1] <== credential_pubkey_hashed; - data_hasher.out === public_data_hash; + data_hasher.inputs[1] <== credential_pubkey_commitment; + signal data_hash <== data_hasher.out; - // Step 1: Compute compressed account hash + // Step 4: Compute compressed account hash component accountHasher = CompressedAccountHash(); accountHasher.owner_hashed <== owner_hashed; accountHasher.leaf_index <== account_leaf_index; accountHasher.address <== address; accountHasher.merkle_tree_hashed <== merkle_tree_hashed; accountHasher.discriminator <== discriminator; - accountHasher.data_hash <== data_hasher.out; + accountHasher.data_hash <== data_hash; - // Step 2: Verify Merkle proof + // Step 5: Verify Merkle proof component merkleProof = MerkleProof(levels); merkleProof.leaf <== accountHasher.hash; merkleProof.pathElements <== pathElements; merkleProof.leafIndex <== leaf_index; - - // Step 3: CRITICAL CONSTRAINT - Enforce that computed root MUST equal expected root - // This === operator adds a constraint that will fail witness generation if roots don't match merkleProof.root === expectedRoot; + // Step 7: Verify encrypted data hash matches public_encrypted_data_hash === encrypted_data_hash; } @@ -111,8 +91,9 @@ component main { merkle_tree_hashed, discriminator, issuer_hashed, + expectedRoot, + verification_id, public_encrypted_data_hash, - public_data_hash, - expectedRoot + nullifier ] } = CompressedAccountMerkleProof(26); diff --git a/zk-id/circuits/credential.circom b/zk-id/circuits/credential.circom new file mode 100644 index 0000000..1416dc1 --- /dev/null +++ b/zk-id/circuits/credential.circom @@ -0,0 +1,41 @@ +pragma circom 2.0.0; + +include "../node_modules/circomlib/circuits/poseidon.circom"; + +// Based on Tornado Cash Nova's keypair design +// Proves knowledge of a private key that corresponds to a public key commitment +template Keypair() { + // Private inputs - only the credential holder knows these + signal input privateKey; + + // Public output - this is what gets stored on-chain + signal output publicKey; + + component hasher = Poseidon(1); + hasher.inputs[0] <== privateKey; + publicKey <== hasher.out; +} + +// Proves ownership of a credential by proving knowledge of the private key +template CredentialOwnership() { + // Private inputs + signal input credentialPrivateKey; + + // Public inputs + signal input credentialPublicKey; // This is stored on-chain (the commitment) + signal input issuer; + + // Verify the private key corresponds to the public key + component keypair = Keypair(); + keypair.privateKey <== credentialPrivateKey; + + // Ensure the computed public key matches the one stored on-chain + credentialPublicKey === keypair.publicKey; + + // Output the credential hash for further processing + signal output credentialHash; + component credHasher = Poseidon(2); + credHasher.inputs[0] <== issuer; + credHasher.inputs[1] <== credentialPublicKey; + credentialHash <== credHasher.out; +} \ No newline at end of file diff --git a/zk-id/circuits/merkle_proof.circom b/zk-id/circuits/merkle_proof.circom new file mode 100644 index 0000000..da0a024 --- /dev/null +++ b/zk-id/circuits/merkle_proof.circom @@ -0,0 +1,33 @@ +pragma circom 2.0.0; + +include "../node_modules/circomlib/circuits/poseidon.circom"; +include "../node_modules/circomlib/circuits/bitify.circom"; +include "../node_modules/circomlib/circuits/switcher.circom"; + +// Merkle Proof Verification Template +// Verifies that a leaf is in a Merkle tree with a given root +template MerkleProof(levels) { + signal input leaf; + signal input pathElements[levels]; + signal input leafIndex; + signal output root; + + component switcher[levels]; + component hasher[levels]; + + component indexBits = Num2Bits(levels); + indexBits.in <== leafIndex; + + for (var i = 0; i < levels; i++) { + switcher[i] = Switcher(); + switcher[i].L <== i == 0 ? leaf : hasher[i - 1].out; + switcher[i].R <== pathElements[i]; + switcher[i].sel <== indexBits.out[i]; + + hasher[i] = Poseidon(2); + hasher[i].inputs[0] <== switcher[i].outL; + hasher[i].inputs[1] <== switcher[i].outR; + } + + root <== hasher[levels - 1].out; +} \ No newline at end of file diff --git a/zk-id/src/lib.rs b/zk-id/src/lib.rs index a8a8787..ffa25ab 100644 --- a/zk-id/src/lib.rs +++ b/zk-id/src/lib.rs @@ -4,6 +4,8 @@ use anchor_lang::{prelude::*, AnchorDeserialize, AnchorSerialize}; use borsh::{BorshDeserialize, BorshSerialize}; use groth16_solana::groth16::Groth16Verifier; +use light_hasher::to_byte_array::ToByteArray; +use light_hasher::HasherError; use light_sdk::account::{poseidon::LightAccount as LightAccountPoseidon, LightAccount}; use light_sdk::cpi::v1::CpiAccounts; use light_sdk::{ @@ -129,7 +131,7 @@ pub mod zk_id { ); credential_account.issuer = ctx.accounts.signer.key(); - credential_account.credential_pubkey = credential_pubkey; + credential_account.credential_pubkey = CredentialPubkey::new(credential_pubkey); msg!( "Created credential account for pubkey: {} (issuer credential count: {})", @@ -153,11 +155,11 @@ pub mod zk_id { address_tree_info: PackedAddressTreeInfo, output_state_tree_index: u8, input_root_index: u16, - encrypted_data: Vec, + public_data: Vec, credential_proof: CompressedProof, issuer: [u8; 32], - data_hash: [u8; 32], - verification_id: [u8; 32], + nullifier: [u8; 32], + verification_id: [u8; 31], ) -> Result<()> { let light_cpi_accounts = CpiAccounts::new( ctx.accounts.signer.as_ref(), @@ -176,7 +178,7 @@ pub mod zk_id { let (address, address_seed) = derive_address( &[ ZK_ID_CHECK, - data_hash.as_slice(), + nullifier.as_slice(), verification_id.as_slice(), ], &address_pubkey, @@ -206,7 +208,7 @@ pub mod zk_id { Some(address), output_state_tree_index, ); - event_account.data = encrypted_data; + event_account.data = public_data; let event_account_info = event_account .to_output_compressed_account_with_packed_context(None)? @@ -215,20 +217,25 @@ pub mod zk_id { // Construct public inputs array for the circuit // Order MUST match the circuit's public declaration exactly: // owner_hashed, merkle_tree_hashed, discriminator, issuer_hashed, expectedRoot, public_encrypted_data_hash, public_data_hash - let public_inputs: [[u8; 32]; 7] = [ + let mut padded_verification_id = [0u8; 32]; + padded_verification_id[1..].copy_from_slice(&verification_id); + + let public_inputs: [[u8; 32]; 8] = [ account_owner_hashed, merkle_tree_hashed, discriminator, issuer_hashed, + expected_root, + padded_verification_id, event_account_info .compressed_account .data .as_ref() .unwrap() .data_hash, // This is public_encrypted_data_hash - data_hash, // This is public_data_hash - expected_root, + nullifier, ]; + msg!("public_inputs {:?}", public_inputs); let proof_a = decompress_g1(&credential_proof.a).map_err(|e| { let code: u32 = e.into(); @@ -270,6 +277,7 @@ pub mod zk_id { Ok(()) } } + #[derive(Accounts)] pub struct GenericAnchorAccounts<'info> { #[account(mut)] @@ -289,10 +297,30 @@ pub struct VerifyAccounts<'info> { pub struct CredentialAccount { #[hash] pub issuer: Pubkey, - #[hash] + /// CredentialPubkey (is a Poseidon hash -> no need to annotate with #[hash]) + pub credential_pubkey: CredentialPubkey, +} + +#[derive(Clone, Debug, Default, BorshSerialize, BorshDeserialize, LightDiscriminator)] +pub struct CredentialPubkey { pub credential_pubkey: Pubkey, } +impl CredentialPubkey { + pub fn new(credential_pubkey: Pubkey) -> Self { + Self { credential_pubkey } + } +} + +// ToByteArray is required by LightHasher and not implemented for Pubkey or [u8;32], +// so we implement it here for CredentialPubkey. +impl ToByteArray for CredentialPubkey { + const NUM_FIELDS: usize = 1; + fn to_byte_array(&self) -> std::result::Result<[u8; 32], HasherError> { + Ok(self.credential_pubkey.to_bytes()) + } +} + #[derive(Clone, Debug, Default, BorshSerialize, BorshDeserialize, LightDiscriminator)] pub struct EncryptedEventAccount { pub data: Vec, diff --git a/zk-id/src/verifying_key.rs b/zk-id/src/verifying_key.rs index 56211b1..9fcd5db 100644 --- a/zk-id/src/verifying_key.rs +++ b/zk-id/src/verifying_key.rs @@ -1,24 +1,118 @@ use groth16_solana::groth16::Groth16Verifyingkey; pub const VERIFYINGKEY: Groth16Verifyingkey = Groth16Verifyingkey { - nr_pubinputs: 7, + nr_pubinputs: 8, - vk_alpha_g1: [45u8, 77u8, 154u8, 167u8, 227u8, 2u8, 217u8, 223u8, 65u8, 116u8, 157u8, 85u8, 7u8, 148u8, 157u8, 5u8, 219u8, 234u8, 51u8, 251u8, 177u8, 108u8, 100u8, 59u8, 34u8, 245u8, 153u8, 162u8, 190u8, 109u8, 242u8, 226u8, 20u8, 190u8, 221u8, 80u8, 60u8, 55u8, 206u8, 176u8, 97u8, 216u8, 236u8, 96u8, 32u8, 159u8, 227u8, 69u8, 206u8, 137u8, 131u8, 10u8, 25u8, 35u8, 3u8, 1u8, 240u8, 118u8, 202u8, 255u8, 0u8, 77u8, 25u8, 38u8], + vk_alpha_g1: [ + 45u8, 77u8, 154u8, 167u8, 227u8, 2u8, 217u8, 223u8, 65u8, 116u8, 157u8, 85u8, 7u8, 148u8, + 157u8, 5u8, 219u8, 234u8, 51u8, 251u8, 177u8, 108u8, 100u8, 59u8, 34u8, 245u8, 153u8, + 162u8, 190u8, 109u8, 242u8, 226u8, 20u8, 190u8, 221u8, 80u8, 60u8, 55u8, 206u8, 176u8, + 97u8, 216u8, 236u8, 96u8, 32u8, 159u8, 227u8, 69u8, 206u8, 137u8, 131u8, 10u8, 25u8, 35u8, + 3u8, 1u8, 240u8, 118u8, 202u8, 255u8, 0u8, 77u8, 25u8, 38u8, + ], - vk_beta_g2: [9u8, 103u8, 3u8, 47u8, 203u8, 247u8, 118u8, 209u8, 175u8, 201u8, 133u8, 248u8, 136u8, 119u8, 241u8, 130u8, 211u8, 132u8, 128u8, 166u8, 83u8, 242u8, 222u8, 202u8, 169u8, 121u8, 76u8, 188u8, 59u8, 243u8, 6u8, 12u8, 14u8, 24u8, 120u8, 71u8, 173u8, 76u8, 121u8, 131u8, 116u8, 208u8, 214u8, 115u8, 43u8, 245u8, 1u8, 132u8, 125u8, 214u8, 139u8, 192u8, 224u8, 113u8, 36u8, 30u8, 2u8, 19u8, 188u8, 127u8, 193u8, 61u8, 183u8, 171u8, 48u8, 76u8, 251u8, 209u8, 224u8, 138u8, 112u8, 74u8, 153u8, 245u8, 232u8, 71u8, 217u8, 63u8, 140u8, 60u8, 170u8, 253u8, 222u8, 196u8, 107u8, 122u8, 13u8, 55u8, 157u8, 166u8, 154u8, 77u8, 17u8, 35u8, 70u8, 167u8, 23u8, 57u8, 193u8, 177u8, 164u8, 87u8, 168u8, 199u8, 49u8, 49u8, 35u8, 210u8, 77u8, 47u8, 145u8, 146u8, 248u8, 150u8, 183u8, 198u8, 62u8, 234u8, 5u8, 169u8, 213u8, 127u8, 6u8, 84u8, 122u8, 208u8, 206u8, 200u8], + vk_beta_g2: [ + 9u8, 103u8, 3u8, 47u8, 203u8, 247u8, 118u8, 209u8, 175u8, 201u8, 133u8, 248u8, 136u8, + 119u8, 241u8, 130u8, 211u8, 132u8, 128u8, 166u8, 83u8, 242u8, 222u8, 202u8, 169u8, 121u8, + 76u8, 188u8, 59u8, 243u8, 6u8, 12u8, 14u8, 24u8, 120u8, 71u8, 173u8, 76u8, 121u8, 131u8, + 116u8, 208u8, 214u8, 115u8, 43u8, 245u8, 1u8, 132u8, 125u8, 214u8, 139u8, 192u8, 224u8, + 113u8, 36u8, 30u8, 2u8, 19u8, 188u8, 127u8, 193u8, 61u8, 183u8, 171u8, 48u8, 76u8, 251u8, + 209u8, 224u8, 138u8, 112u8, 74u8, 153u8, 245u8, 232u8, 71u8, 217u8, 63u8, 140u8, 60u8, + 170u8, 253u8, 222u8, 196u8, 107u8, 122u8, 13u8, 55u8, 157u8, 166u8, 154u8, 77u8, 17u8, + 35u8, 70u8, 167u8, 23u8, 57u8, 193u8, 177u8, 164u8, 87u8, 168u8, 199u8, 49u8, 49u8, 35u8, + 210u8, 77u8, 47u8, 145u8, 146u8, 248u8, 150u8, 183u8, 198u8, 62u8, 234u8, 5u8, 169u8, + 213u8, 127u8, 6u8, 84u8, 122u8, 208u8, 206u8, 200u8, + ], - vk_gamma_g2: [25u8, 142u8, 147u8, 147u8, 146u8, 13u8, 72u8, 58u8, 114u8, 96u8, 191u8, 183u8, 49u8, 251u8, 93u8, 37u8, 241u8, 170u8, 73u8, 51u8, 53u8, 169u8, 231u8, 18u8, 151u8, 228u8, 133u8, 183u8, 174u8, 243u8, 18u8, 194u8, 24u8, 0u8, 222u8, 239u8, 18u8, 31u8, 30u8, 118u8, 66u8, 106u8, 0u8, 102u8, 94u8, 92u8, 68u8, 121u8, 103u8, 67u8, 34u8, 212u8, 247u8, 94u8, 218u8, 221u8, 70u8, 222u8, 189u8, 92u8, 217u8, 146u8, 246u8, 237u8, 9u8, 6u8, 137u8, 208u8, 88u8, 95u8, 240u8, 117u8, 236u8, 158u8, 153u8, 173u8, 105u8, 12u8, 51u8, 149u8, 188u8, 75u8, 49u8, 51u8, 112u8, 179u8, 142u8, 243u8, 85u8, 172u8, 218u8, 220u8, 209u8, 34u8, 151u8, 91u8, 18u8, 200u8, 94u8, 165u8, 219u8, 140u8, 109u8, 235u8, 74u8, 171u8, 113u8, 128u8, 141u8, 203u8, 64u8, 143u8, 227u8, 209u8, 231u8, 105u8, 12u8, 67u8, 211u8, 123u8, 76u8, 230u8, 204u8, 1u8, 102u8, 250u8, 125u8, 170u8], + vk_gamma_g2: [ + 25u8, 142u8, 147u8, 147u8, 146u8, 13u8, 72u8, 58u8, 114u8, 96u8, 191u8, 183u8, 49u8, 251u8, + 93u8, 37u8, 241u8, 170u8, 73u8, 51u8, 53u8, 169u8, 231u8, 18u8, 151u8, 228u8, 133u8, 183u8, + 174u8, 243u8, 18u8, 194u8, 24u8, 0u8, 222u8, 239u8, 18u8, 31u8, 30u8, 118u8, 66u8, 106u8, + 0u8, 102u8, 94u8, 92u8, 68u8, 121u8, 103u8, 67u8, 34u8, 212u8, 247u8, 94u8, 218u8, 221u8, + 70u8, 222u8, 189u8, 92u8, 217u8, 146u8, 246u8, 237u8, 9u8, 6u8, 137u8, 208u8, 88u8, 95u8, + 240u8, 117u8, 236u8, 158u8, 153u8, 173u8, 105u8, 12u8, 51u8, 149u8, 188u8, 75u8, 49u8, + 51u8, 112u8, 179u8, 142u8, 243u8, 85u8, 172u8, 218u8, 220u8, 209u8, 34u8, 151u8, 91u8, + 18u8, 200u8, 94u8, 165u8, 219u8, 140u8, 109u8, 235u8, 74u8, 171u8, 113u8, 128u8, 141u8, + 203u8, 64u8, 143u8, 227u8, 209u8, 231u8, 105u8, 12u8, 67u8, 211u8, 123u8, 76u8, 230u8, + 204u8, 1u8, 102u8, 250u8, 125u8, 170u8, + ], - vk_delta_g2: [21u8, 95u8, 178u8, 184u8, 133u8, 102u8, 147u8, 146u8, 185u8, 207u8, 155u8, 169u8, 158u8, 231u8, 105u8, 245u8, 57u8, 139u8, 26u8, 255u8, 16u8, 86u8, 101u8, 167u8, 236u8, 145u8, 51u8, 165u8, 20u8, 243u8, 112u8, 130u8, 38u8, 60u8, 197u8, 144u8, 223u8, 87u8, 184u8, 6u8, 235u8, 119u8, 43u8, 252u8, 230u8, 206u8, 211u8, 215u8, 100u8, 176u8, 179u8, 120u8, 38u8, 106u8, 147u8, 215u8, 224u8, 190u8, 214u8, 137u8, 240u8, 14u8, 47u8, 193u8, 16u8, 27u8, 107u8, 220u8, 204u8, 166u8, 239u8, 13u8, 108u8, 46u8, 38u8, 131u8, 183u8, 51u8, 95u8, 158u8, 158u8, 190u8, 201u8, 191u8, 130u8, 253u8, 232u8, 240u8, 162u8, 198u8, 123u8, 165u8, 73u8, 239u8, 104u8, 173u8, 20u8, 105u8, 38u8, 204u8, 145u8, 51u8, 145u8, 114u8, 144u8, 104u8, 74u8, 34u8, 237u8, 28u8, 141u8, 184u8, 26u8, 194u8, 19u8, 233u8, 9u8, 172u8, 238u8, 107u8, 40u8, 113u8, 252u8, 18u8, 171u8, 199u8, 146u8, 213u8], + vk_delta_g2: [ + 18u8, 121u8, 252u8, 116u8, 57u8, 146u8, 135u8, 55u8, 76u8, 216u8, 32u8, 99u8, 90u8, 190u8, + 47u8, 86u8, 142u8, 5u8, 0u8, 150u8, 64u8, 52u8, 8u8, 76u8, 81u8, 168u8, 167u8, 112u8, + 145u8, 30u8, 90u8, 193u8, 33u8, 29u8, 41u8, 76u8, 197u8, 99u8, 176u8, 15u8, 39u8, 64u8, + 99u8, 117u8, 126u8, 120u8, 150u8, 181u8, 64u8, 83u8, 210u8, 124u8, 166u8, 97u8, 207u8, + 179u8, 230u8, 88u8, 80u8, 31u8, 114u8, 91u8, 162u8, 233u8, 41u8, 141u8, 67u8, 185u8, 17u8, + 208u8, 78u8, 222u8, 30u8, 185u8, 44u8, 105u8, 219u8, 233u8, 28u8, 7u8, 115u8, 153u8, 29u8, + 218u8, 3u8, 35u8, 210u8, 31u8, 73u8, 35u8, 203u8, 187u8, 237u8, 243u8, 174u8, 70u8, 2u8, + 87u8, 122u8, 51u8, 171u8, 124u8, 39u8, 146u8, 1u8, 95u8, 128u8, 84u8, 35u8, 207u8, 132u8, + 170u8, 123u8, 176u8, 119u8, 218u8, 228u8, 128u8, 232u8, 94u8, 233u8, 58u8, 238u8, 63u8, + 45u8, 72u8, 214u8, 134u8, + ], - vk_ic: &[ - [22u8, 24u8, 254u8, 206u8, 152u8, 246u8, 56u8, 167u8, 103u8, 120u8, 252u8, 140u8, 102u8, 72u8, 191u8, 241u8, 29u8, 106u8, 51u8, 197u8, 27u8, 159u8, 141u8, 78u8, 189u8, 160u8, 73u8, 24u8, 183u8, 155u8, 8u8, 91u8, 41u8, 139u8, 41u8, 97u8, 22u8, 78u8, 73u8, 136u8, 207u8, 61u8, 34u8, 70u8, 147u8, 59u8, 149u8, 33u8, 109u8, 142u8, 61u8, 247u8, 162u8, 228u8, 118u8, 62u8, 86u8, 245u8, 185u8, 137u8, 77u8, 166u8, 60u8, 84u8], - [32u8, 68u8, 146u8, 188u8, 23u8, 36u8, 153u8, 164u8, 137u8, 88u8, 42u8, 246u8, 90u8, 222u8, 1u8, 95u8, 44u8, 56u8, 144u8, 95u8, 67u8, 143u8, 25u8, 143u8, 2u8, 158u8, 40u8, 13u8, 51u8, 30u8, 246u8, 193u8, 17u8, 123u8, 112u8, 172u8, 250u8, 245u8, 110u8, 160u8, 8u8, 14u8, 62u8, 179u8, 73u8, 182u8, 148u8, 171u8, 138u8, 217u8, 7u8, 11u8, 3u8, 235u8, 100u8, 42u8, 106u8, 239u8, 117u8, 209u8, 72u8, 73u8, 33u8, 50u8], - [42u8, 181u8, 245u8, 200u8, 39u8, 109u8, 99u8, 82u8, 245u8, 76u8, 116u8, 172u8, 9u8, 90u8, 62u8, 240u8, 226u8, 195u8, 193u8, 164u8, 199u8, 40u8, 212u8, 203u8, 177u8, 33u8, 111u8, 84u8, 74u8, 11u8, 247u8, 201u8, 43u8, 52u8, 202u8, 231u8, 116u8, 47u8, 209u8, 168u8, 105u8, 194u8, 95u8, 200u8, 0u8, 204u8, 110u8, 236u8, 55u8, 43u8, 14u8, 81u8, 169u8, 68u8, 210u8, 93u8, 255u8, 193u8, 92u8, 24u8, 27u8, 79u8, 238u8, 3u8], - [10u8, 88u8, 243u8, 196u8, 106u8, 25u8, 70u8, 23u8, 141u8, 245u8, 210u8, 34u8, 0u8, 10u8, 89u8, 105u8, 1u8, 229u8, 192u8, 220u8, 19u8, 163u8, 24u8, 216u8, 188u8, 223u8, 128u8, 192u8, 31u8, 143u8, 50u8, 190u8, 30u8, 8u8, 96u8, 76u8, 79u8, 133u8, 163u8, 122u8, 22u8, 117u8, 25u8, 130u8, 18u8, 158u8, 186u8, 138u8, 183u8, 236u8, 186u8, 218u8, 138u8, 22u8, 219u8, 98u8, 244u8, 207u8, 131u8, 84u8, 9u8, 213u8, 123u8, 144u8], - [37u8, 30u8, 238u8, 175u8, 106u8, 133u8, 208u8, 28u8, 79u8, 89u8, 174u8, 238u8, 90u8, 198u8, 209u8, 220u8, 3u8, 179u8, 53u8, 0u8, 148u8, 251u8, 220u8, 240u8, 212u8, 142u8, 208u8, 243u8, 116u8, 220u8, 42u8, 237u8, 34u8, 169u8, 128u8, 36u8, 215u8, 197u8, 11u8, 238u8, 223u8, 190u8, 121u8, 65u8, 118u8, 173u8, 41u8, 220u8, 46u8, 219u8, 61u8, 146u8, 113u8, 225u8, 110u8, 35u8, 19u8, 25u8, 121u8, 149u8, 6u8, 83u8, 220u8, 145u8], - [17u8, 167u8, 78u8, 13u8, 150u8, 211u8, 217u8, 37u8, 109u8, 228u8, 186u8, 26u8, 234u8, 255u8, 14u8, 238u8, 106u8, 57u8, 88u8, 188u8, 119u8, 188u8, 53u8, 227u8, 180u8, 66u8, 159u8, 1u8, 85u8, 17u8, 37u8, 87u8, 8u8, 23u8, 148u8, 137u8, 217u8, 106u8, 247u8, 96u8, 22u8, 223u8, 15u8, 80u8, 14u8, 115u8, 57u8, 14u8, 226u8, 185u8, 81u8, 241u8, 156u8, 133u8, 83u8, 173u8, 179u8, 232u8, 79u8, 84u8, 190u8, 78u8, 137u8, 145u8], - [41u8, 166u8, 165u8, 235u8, 204u8, 121u8, 215u8, 74u8, 117u8, 54u8, 65u8, 201u8, 145u8, 187u8, 109u8, 145u8, 148u8, 238u8, 55u8, 191u8, 157u8, 33u8, 37u8, 109u8, 169u8, 111u8, 246u8, 23u8, 81u8, 104u8, 195u8, 161u8, 22u8, 168u8, 203u8, 78u8, 151u8, 68u8, 89u8, 49u8, 213u8, 133u8, 94u8, 139u8, 98u8, 246u8, 4u8, 189u8, 85u8, 219u8, 235u8, 230u8, 158u8, 23u8, 253u8, 211u8, 53u8, 137u8, 145u8, 241u8, 13u8, 218u8, 2u8, 120u8], - [45u8, 20u8, 183u8, 144u8, 118u8, 246u8, 157u8, 110u8, 8u8, 160u8, 76u8, 154u8, 70u8, 124u8, 221u8, 103u8, 151u8, 230u8, 135u8, 158u8, 183u8, 233u8, 225u8, 154u8, 244u8, 226u8, 227u8, 192u8, 114u8, 170u8, 44u8, 181u8, 17u8, 144u8, 36u8, 238u8, 190u8, 142u8, 125u8, 97u8, 222u8, 23u8, 59u8, 169u8, 12u8, 156u8, 76u8, 222u8, 170u8, 254u8, 57u8, 209u8, 51u8, 197u8, 50u8, 248u8, 182u8, 105u8, 212u8, 146u8, 127u8, 168u8, 111u8, 65u8], - ] + vk_ic: &[ + [ + 4u8, 90u8, 11u8, 151u8, 69u8, 42u8, 114u8, 212u8, 111u8, 206u8, 148u8, 104u8, 65u8, + 166u8, 159u8, 137u8, 171u8, 77u8, 109u8, 234u8, 55u8, 135u8, 203u8, 77u8, 67u8, 182u8, + 227u8, 12u8, 202u8, 57u8, 113u8, 13u8, 31u8, 182u8, 157u8, 8u8, 213u8, 65u8, 49u8, + 36u8, 11u8, 76u8, 223u8, 18u8, 37u8, 52u8, 113u8, 212u8, 75u8, 181u8, 222u8, 133u8, + 170u8, 168u8, 234u8, 180u8, 8u8, 110u8, 4u8, 142u8, 160u8, 230u8, 138u8, 175u8, + ], + [ + 6u8, 192u8, 93u8, 129u8, 197u8, 162u8, 187u8, 150u8, 148u8, 208u8, 31u8, 46u8, 2u8, + 172u8, 162u8, 123u8, 81u8, 134u8, 38u8, 219u8, 60u8, 57u8, 111u8, 148u8, 4u8, 41u8, + 227u8, 248u8, 38u8, 44u8, 175u8, 139u8, 18u8, 142u8, 35u8, 202u8, 131u8, 3u8, 138u8, + 65u8, 62u8, 66u8, 141u8, 192u8, 137u8, 210u8, 64u8, 58u8, 168u8, 102u8, 162u8, 204u8, + 187u8, 123u8, 225u8, 235u8, 197u8, 167u8, 28u8, 220u8, 183u8, 101u8, 16u8, 186u8, + ], + [ + 8u8, 193u8, 155u8, 163u8, 55u8, 80u8, 175u8, 199u8, 139u8, 31u8, 49u8, 208u8, 96u8, + 144u8, 174u8, 203u8, 159u8, 203u8, 160u8, 63u8, 135u8, 45u8, 19u8, 133u8, 103u8, 80u8, + 186u8, 102u8, 152u8, 180u8, 149u8, 18u8, 4u8, 33u8, 182u8, 15u8, 44u8, 189u8, 0u8, + 113u8, 253u8, 12u8, 194u8, 38u8, 183u8, 95u8, 252u8, 215u8, 178u8, 46u8, 83u8, 195u8, + 153u8, 75u8, 202u8, 14u8, 111u8, 237u8, 198u8, 161u8, 107u8, 187u8, 4u8, 55u8, + ], + [ + 46u8, 10u8, 95u8, 159u8, 76u8, 32u8, 246u8, 107u8, 45u8, 235u8, 75u8, 185u8, 109u8, + 26u8, 24u8, 129u8, 208u8, 166u8, 64u8, 199u8, 252u8, 251u8, 193u8, 51u8, 19u8, 88u8, + 156u8, 129u8, 114u8, 120u8, 122u8, 32u8, 26u8, 83u8, 113u8, 210u8, 130u8, 243u8, 39u8, + 58u8, 142u8, 18u8, 194u8, 142u8, 184u8, 158u8, 199u8, 113u8, 196u8, 191u8, 215u8, 77u8, + 21u8, 66u8, 162u8, 25u8, 201u8, 70u8, 148u8, 247u8, 173u8, 199u8, 191u8, 131u8, + ], + [ + 16u8, 79u8, 230u8, 65u8, 92u8, 49u8, 63u8, 19u8, 215u8, 29u8, 92u8, 70u8, 81u8, 252u8, + 134u8, 116u8, 115u8, 66u8, 113u8, 76u8, 135u8, 44u8, 188u8, 236u8, 72u8, 218u8, 47u8, + 3u8, 70u8, 85u8, 130u8, 31u8, 40u8, 64u8, 154u8, 29u8, 126u8, 193u8, 234u8, 223u8, + 171u8, 140u8, 166u8, 217u8, 211u8, 241u8, 59u8, 3u8, 20u8, 217u8, 110u8, 174u8, 132u8, + 10u8, 42u8, 121u8, 87u8, 169u8, 37u8, 10u8, 59u8, 167u8, 194u8, 106u8, + ], + [ + 44u8, 136u8, 199u8, 234u8, 22u8, 38u8, 206u8, 40u8, 223u8, 162u8, 56u8, 216u8, 109u8, + 180u8, 5u8, 169u8, 225u8, 203u8, 204u8, 153u8, 140u8, 24u8, 116u8, 123u8, 68u8, 220u8, + 131u8, 114u8, 20u8, 137u8, 230u8, 148u8, 28u8, 10u8, 38u8, 24u8, 120u8, 216u8, 11u8, + 243u8, 26u8, 233u8, 114u8, 85u8, 0u8, 3u8, 27u8, 225u8, 6u8, 41u8, 85u8, 100u8, 148u8, + 97u8, 60u8, 23u8, 64u8, 255u8, 64u8, 34u8, 115u8, 81u8, 235u8, 103u8, + ], + [ + 12u8, 140u8, 197u8, 237u8, 220u8, 64u8, 41u8, 28u8, 134u8, 122u8, 249u8, 54u8, 127u8, + 114u8, 225u8, 243u8, 158u8, 245u8, 164u8, 146u8, 238u8, 253u8, 73u8, 44u8, 88u8, 253u8, + 220u8, 76u8, 231u8, 243u8, 190u8, 184u8, 36u8, 187u8, 51u8, 119u8, 254u8, 79u8, 21u8, + 186u8, 122u8, 154u8, 95u8, 191u8, 113u8, 194u8, 251u8, 85u8, 139u8, 247u8, 155u8, + 237u8, 48u8, 185u8, 216u8, 105u8, 206u8, 92u8, 120u8, 26u8, 188u8, 117u8, 69u8, 224u8, + ], + [ + 23u8, 119u8, 153u8, 159u8, 239u8, 111u8, 103u8, 220u8, 195u8, 184u8, 64u8, 255u8, + 239u8, 78u8, 188u8, 37u8, 193u8, 254u8, 226u8, 63u8, 140u8, 124u8, 70u8, 6u8, 188u8, + 113u8, 37u8, 98u8, 54u8, 10u8, 182u8, 37u8, 9u8, 31u8, 241u8, 30u8, 102u8, 7u8, 244u8, + 97u8, 153u8, 56u8, 35u8, 254u8, 73u8, 54u8, 161u8, 123u8, 61u8, 157u8, 48u8, 66u8, 4u8, + 31u8, 143u8, 142u8, 86u8, 58u8, 162u8, 156u8, 144u8, 116u8, 170u8, 85u8, + ], + [ + 6u8, 144u8, 191u8, 115u8, 83u8, 103u8, 157u8, 108u8, 167u8, 218u8, 159u8, 203u8, 111u8, + 63u8, 129u8, 144u8, 213u8, 133u8, 69u8, 22u8, 56u8, 228u8, 46u8, 147u8, 0u8, 70u8, + 96u8, 85u8, 157u8, 72u8, 158u8, 141u8, 33u8, 26u8, 152u8, 246u8, 49u8, 94u8, 88u8, + 145u8, 79u8, 194u8, 171u8, 203u8, 149u8, 178u8, 138u8, 241u8, 125u8, 228u8, 29u8, 39u8, + 74u8, 210u8, 195u8, 67u8, 43u8, 35u8, 149u8, 225u8, 94u8, 140u8, 224u8, 83u8, + ], + ], }; diff --git a/zk-id/tests/circuit.rs b/zk-id/tests/circuit.rs index daf2e74..380e0e5 100644 --- a/zk-id/tests/circuit.rs +++ b/zk-id/tests/circuit.rs @@ -9,6 +9,7 @@ use light_hasher::{ }; use light_merkle_tree_reference::MerkleTree; use num_bigint::BigUint; +use solana_sdk::signature::{Keypair, Signer}; use std::collections::HashMap; // Link the generated witness library @@ -20,6 +21,52 @@ rust_witness::witness!(compressedaccountmerkleproof); // Use the verifying key from the library use zk_id::verifying_key::VERIFYINGKEY; +/// Derives a credential keypair from a Solana keypair +/// The private key is derived by signing "CREDENTIAL" and truncating to 248 bits +/// The public key is Poseidon(private_key) +#[derive(Debug, Clone)] +struct CredentialKeypair { + pub private_key: [u8; 32], // 248 bits + pub public_key: [u8; 32], // Poseidon hash of private key +} + +impl CredentialKeypair { + pub fn new(solana_keypair: &Keypair) -> Self { + // Sign the message "CREDENTIAL" with the Solana keypair + let message = b"CREDENTIAL"; + let signature = solana_keypair.sign_message(message); + + // Hash the signature to get entropy + let hashed = Sha256::hash(signature.as_ref()).unwrap(); + + // Truncate to 248 bits (31 bytes) for BN254 field compatibility + let mut private_key = [0u8; 32]; + private_key[1..32].copy_from_slice(&hashed[0..31]); + + let public_key = Poseidon::hashv(&[&private_key]).unwrap(); + + Self { + private_key, + public_key, + } + } + + /// Get the private key as a BigUint for circuit input + pub fn private_key_biguint(&self) -> BigUint { + BigUint::from_bytes_be(&self.private_key) + } + + /// Compute nullifier for a given verification_id + pub fn compute_nullifier(&self, verification_id: &[u8; 31]) -> [u8; 32] { + // Nullifier = Poseidon(verification_id, private_key) + // Both need to be padded to 32 bytes for Poseidon + let mut padded_verification = [0u8; 32]; + padded_verification[1..32].copy_from_slice(verification_id); + + Poseidon::hashv(&[&padded_verification, &self.private_key]).unwrap() + } +} + /// Helper function to add compressed account inputs to the circuit inputs HashMap /// /// # Arguments @@ -28,7 +75,8 @@ use zk_id::verifying_key::VERIFYINGKEY; /// * `merkle_tree_pubkey` - The public key of the Merkle tree /// * `leaf_index` - The index of the leaf in the Merkle tree /// * `issuer_pubkey` - The issuer's public key -/// * `credential_pubkey` - The credential public key (private input) +/// * `credential` - The credential keypair (contains private key and public key commitment) +/// * `verification_id` - The verification context (31 bytes) /// * `encrypted_data` - The encrypted data fn add_compressed_account_to_circuit_inputs( inputs: &mut HashMap>, @@ -36,7 +84,8 @@ fn add_compressed_account_to_circuit_inputs( merkle_tree_pubkey: &Pubkey, leaf_index: u32, issuer_pubkey: &Pubkey, - credential_pubkey: &Pubkey, + credential: &CredentialKeypair, + verification_id: &[u8; 31], encrypted_data: &[u8], ) { // Extract data from compressed account @@ -52,8 +101,6 @@ fn add_compressed_account_to_circuit_inputs( let merkle_tree_hashed = hash_to_bn254_field_size_be(merkle_tree_pubkey.as_ref()); let issuer_hashed = hashv_to_bn254_field_size_be_const_array::<2>(&[issuer_pubkey.as_ref()]).unwrap(); - let credential_pubkey_hashed = - hashv_to_bn254_field_size_be_const_array::<2>(&[credential_pubkey.as_ref()]).unwrap(); // Hash encrypted_data with SHA256 and truncate (set first byte to 0) // Include length prefix like in the main test @@ -63,12 +110,8 @@ fn add_compressed_account_to_circuit_inputs( let mut encrypted_data_hash = Sha256::hash(&hash_input).unwrap(); encrypted_data_hash[0] = 0; - // Compute public_data_hash (hash of issuer and credential pubkey) - let public_data_hash = Poseidon::hashv(&[ - issuer_hashed.as_slice(), - credential_pubkey_hashed.as_slice(), - ]) - .unwrap(); + // Compute nullifier using credential private key and verification_id + let nullifier = credential.compute_nullifier(verification_id); // Add all inputs to the HashMap inputs.insert( @@ -104,10 +147,21 @@ fn add_compressed_account_to_circuit_inputs( "issuer_hashed".to_string(), vec![BigUint::from_bytes_be(&issuer_hashed).to_string()], ); + + // Add credential private key (private input) + inputs.insert( + "credentialPrivateKey".to_string(), + vec![credential.private_key_biguint().to_string()], + ); + + // Add verification_id (public input) - pad to 32 bytes + let mut padded_verification = [0u8; 32]; + padded_verification[1..32].copy_from_slice(verification_id); inputs.insert( - "credential_pubkey_hashed".to_string(), - vec![BigUint::from_bytes_be(&credential_pubkey_hashed).to_string()], + "verification_id".to_string(), + vec![BigUint::from_bytes_be(&padded_verification).to_string()], ); + inputs.insert( "encrypted_data_hash".to_string(), vec![BigUint::from_bytes_be(&encrypted_data_hash).to_string()], @@ -116,9 +170,11 @@ fn add_compressed_account_to_circuit_inputs( "public_encrypted_data_hash".to_string(), vec![BigUint::from_bytes_be(&encrypted_data_hash).to_string()], ); + + // Add nullifier (public output) inputs.insert( - "public_data_hash".to_string(), - vec![BigUint::from_bytes_be(&public_data_hash).to_string()], + "nullifier".to_string(), + vec![BigUint::from_bytes_be(&nullifier).to_string()], ); } @@ -157,21 +213,22 @@ fn test_compressed_account_merkle_proof_circuit() { let merkle_tree_pubkey = Pubkey::new_from_array([2u8; 32]); let leaf_index: u32 = 0; let issuer_pubkey = Pubkey::new_from_array([4u8; 32]); - let credential_pubkey = Pubkey::new_from_array([5u8; 32]); + + // Create credential keypair + let user_keypair = Keypair::new(); + let credential = CredentialKeypair::new(&user_keypair); + let encrypted_data = vec![6u8; 64]; let mut address = [3u8; 32]; address[0] = 0; // Ensure first byte is 0 - // Compute data_hash as hash of issuer and credential - use 2-round hash + // Create verification_id (31 bytes) + let verification_id = [7u8; 31]; + + // Compute data_hash as hash of issuer and credential commitment let issuer_hashed = hashv_to_bn254_field_size_be_const_array::<2>(&[issuer_pubkey.as_ref()]).unwrap(); - let credential_pubkey_hashed = - hashv_to_bn254_field_size_be_const_array::<2>(&[credential_pubkey.as_ref()]).unwrap(); - let data_hash = Poseidon::hashv(&[ - issuer_hashed.as_slice(), - credential_pubkey_hashed.as_slice(), - ]) - .unwrap(); + let data_hash = Poseidon::hashv(&[issuer_hashed.as_slice(), &credential.public_key]).unwrap(); let compressed_account = CompressedAccount { owner, @@ -205,7 +262,8 @@ fn test_compressed_account_merkle_proof_circuit() { &merkle_tree_pubkey, leaf_index, &issuer_pubkey, - &credential_pubkey, + &credential, + &verification_id, &encrypted_data, ); add_merkle_proof_to_circuit_inputs(&mut proof_inputs, &merkle_proof_hashes, &merkle_root); @@ -235,19 +293,21 @@ fn test_invalid_proof_rejected() { let merkle_tree_pubkey = Pubkey::new_from_array([2u8; 32]); let leaf_index: u32 = 0; let issuer_pubkey = Pubkey::new_from_array([4u8; 32]); - let credential_pubkey = Pubkey::new_from_array([5u8; 32]); + + // Create credential keypair + let user_keypair = Keypair::new(); + let credential = CredentialKeypair::new(&user_keypair); + let encrypted_data = vec![6u8; 64]; - // Compute data_hash as hash of issuer and credential - use 2-round hash + // Create verification_id (31 bytes) + let mut verification_id = [7u8; 31]; + verification_id[0] = 0x0F; + + // Compute data_hash as hash of issuer and credential commitment let issuer_hashed = hashv_to_bn254_field_size_be_const_array::<2>(&[issuer_pubkey.as_ref()]).unwrap(); - let credential_pubkey_hashed = - hashv_to_bn254_field_size_be_const_array::<2>(&[credential_pubkey.as_ref()]).unwrap(); - let data_hash = Poseidon::hashv(&[ - issuer_hashed.as_slice(), - credential_pubkey_hashed.as_slice(), - ]) - .unwrap(); + let data_hash = Poseidon::hashv(&[issuer_hashed.as_slice(), &credential.public_key]).unwrap(); let compressed_account = CompressedAccount { owner, @@ -279,7 +339,8 @@ fn test_invalid_proof_rejected() { &merkle_tree_pubkey, leaf_index, &issuer_pubkey, - &credential_pubkey, + &credential, + &verification_id, &encrypted_data, ); @@ -312,21 +373,22 @@ fn test_groth16_solana_verification() { let merkle_tree_pubkey = Pubkey::new_from_array([2u8; 32]); let leaf_index: u32 = 0; let issuer_pubkey = Pubkey::new_from_array([4u8; 32]); - let credential_pubkey = Pubkey::new_from_array([5u8; 32]); + + // Create credential keypair + let user_keypair = Keypair::new(); + let credential = CredentialKeypair::new(&user_keypair); + let encrypted_data = vec![6u8; 64]; let mut address = [3u8; 32]; address[0] = 0; // Ensure first byte is 0 - // Compute data_hash as hash of issuer and credential - use 2-round hash + // Create verification_id (31 bytes) + let verification_id = [7u8; 31]; + + // Compute data_hash as hash of issuer and credential commitment let issuer_hashed = hashv_to_bn254_field_size_be_const_array::<2>(&[issuer_pubkey.as_ref()]).unwrap(); - let credential_pubkey_hashed = - hashv_to_bn254_field_size_be_const_array::<2>(&[credential_pubkey.as_ref()]).unwrap(); - let data_hash = Poseidon::hashv(&[ - issuer_hashed.as_slice(), - credential_pubkey_hashed.as_slice(), - ]) - .unwrap(); + let data_hash = Poseidon::hashv(&[issuer_hashed.as_slice(), &credential.public_key]).unwrap(); let compressed_account = CompressedAccount { owner, @@ -360,13 +422,15 @@ fn test_groth16_solana_verification() { &merkle_tree_pubkey, leaf_index, &issuer_pubkey, - &credential_pubkey, + &credential, + &verification_id, &encrypted_data, ); add_merkle_proof_to_circuit_inputs(&mut proof_inputs, &merkle_proof_hashes, &merkle_root); // Generate proof with circom-prover let circuit_inputs = serde_json::to_string(&proof_inputs).unwrap(); + println!("circuit_inputs {:?}", circuit_inputs); let proof = CircomProver::prove( ProofLib::Arkworks, WitnessFn::RustWitness(compressedaccountmerkleproof_witness), @@ -382,7 +446,7 @@ fn test_groth16_solana_verification() { // Convert proof and public inputs to groth16-solana format let (proof_a, proof_b, proof_c) = convert_proof(&proof.proof).expect("Failed to convert proof"); - let public_inputs: [[u8; 32]; 7] = convert_public_inputs(&proof.pub_inputs); + let public_inputs: [[u8; 32]; 8] = convert_public_inputs(&proof.pub_inputs); // Verify with groth16-solana let mut verifier = diff --git a/zk-id/tests/test.rs b/zk-id/tests/test.rs index 0c88c4c..1d7f304 100644 --- a/zk-id/tests/test.rs +++ b/zk-id/tests/test.rs @@ -1,4 +1,4 @@ -#![cfg(feature = "test-sbf")] +// #![cfg(feature = "test-sbf")] use anchor_lang::{InstructionData, ToAccountMetas}; use circom_prover::{prover::ProofLib, witness::WitnessFn, CircomProver}; @@ -21,6 +21,47 @@ use solana_sdk::{ use std::collections::HashMap; use zk_id::{CREDENTIAL, ISSUER, ZK_ID_CHECK}; +/// Derives a credential keypair from a Solana keypair +/// The private key is derived by signing "CREDENTIAL" and truncating to 248 bits +/// The public key is Poseidon(private_key) +#[derive(Debug, Clone)] +struct CredentialKeypair { + pub private_key: [u8; 32], // 248 bits + pub public_key: [u8; 32], // Poseidon hash of private key +} + +impl CredentialKeypair { + pub fn new(solana_keypair: &Keypair) -> Self { + // Sign the message "CREDENTIAL" with the Solana keypair + let message = b"CREDENTIAL"; + let signature = solana_keypair.sign_message(message); + + // Hash the signature to get entropy + let hashed = Sha256::hash(signature.as_ref()).unwrap(); + + // Truncate to 248 bits (31 bytes) for BN254 field compatibility + let mut private_key = [0u8; 32]; + private_key[1..32].copy_from_slice(&hashed[0..31]); + + let public_key = Poseidon::hashv(&[&private_key]).unwrap(); + + Self { + private_key, + public_key, + } + } + + /// Compute nullifier for a given verification_id + pub fn compute_nullifier(&self, verification_id: &[u8; 31]) -> [u8; 32] { + // Nullifier = Poseidon(verification_id, private_key) + // Both need to be padded to 32 bytes for Poseidon + let mut padded_verification = [0u8; 32]; + padded_verification[1..32].copy_from_slice(verification_id); + + Poseidon::hashv(&[&padded_verification, &self.private_key]).unwrap() + } +} + // Link the generated witness library #[link(name = "circuit", kind = "static")] extern "C" {} @@ -57,9 +98,13 @@ async fn test_create_issuer_and_add_credential() { println!("Created issuer account for pubkey: {}", payer.pubkey()); // Step 2: Create a credential account - let credential_pubkey = Pubkey::new_unique(); + // Create a credential keypair for the user + let user_keypair = Keypair::new(); + let credential = CredentialKeypair::new(&user_keypair); + + // Use the credential commitment as the "pubkey" for address derivation let (credential_address, _) = derive_address( - &[CREDENTIAL, credential_pubkey.as_ref()], + &[CREDENTIAL, credential.public_key.as_ref()], &address_tree_info.tree, &zk_id::ID, ); @@ -70,7 +115,7 @@ async fn test_create_issuer_and_add_credential() { &credential_address, address_tree_info.clone(), issuer_account, - credential_pubkey, + credential.public_key, ) .await .unwrap(); @@ -88,8 +133,8 @@ async fn test_create_issuer_and_add_credential() { ); println!( - "Successfully created credential account for pubkey: {}", - credential_pubkey + "Successfully created credential account with public_key: {:?}", + credential.public_key ); // Step 3: Verify the credential with ZK proof @@ -100,9 +145,15 @@ async fn test_create_issuer_and_add_credential() { .value .expect("Credential account not found"); println!("credential_account {:?}", credential_account); - verify_credential(&mut rpc, &payer, &credential_account, address_tree_info) - .await - .unwrap(); + verify_credential( + &mut rpc, + &payer, + &credential_account, + address_tree_info, + &user_keypair, + ) + .await + .unwrap(); println!("Successfully verified credential with ZK proof!"); @@ -176,7 +227,7 @@ async fn add_credential( address: &[u8; 32], address_tree_info: light_client::indexer::TreeInfo, issuer_account: &CompressedAccount, - credential_pubkey: Pubkey, + credential_commitment: [u8; 32], ) -> Result where R: Rpc + Indexer, @@ -222,7 +273,7 @@ where address_tree_info: packed_address_tree_accounts[0], output_state_tree_index, issuer_account_meta, - credential_pubkey, + credential_pubkey: Pubkey::new_from_array(credential_commitment), num_credentials_issued: issuer_account_parsed.num_credentials_issued, }; @@ -249,6 +300,7 @@ async fn verify_credential( payer: &Keypair, credential_account: &CompressedAccount, address_tree_info: light_client::indexer::TreeInfo, + user_keypair: &Keypair, ) -> Result where R: Rpc + Indexer, @@ -276,36 +328,36 @@ where // Generate encrypted data (in a real scenario, this would be user-provided) let encrypted_data = vec![42u8; 64]; + // Create the credential keypair from the user keypair + let credential = CredentialKeypair::new(user_keypair); + + // Generate a verification_id (31 bytes) + let mut verification_id = [0u8; 31]; + let random_pubkey = Pubkey::new_unique(); + verification_id.copy_from_slice(&random_pubkey.to_bytes()[0..31]); + // Generate the ZK proof using the actual merkle root - // Use the actual issuer and credential_pubkey from the parsed account - let (credential_proof, _computed_data_hash) = generate_credential_proof( + let (credential_proof, nullifier) = generate_credential_proof( credential_account, &state_tree, leaf_index, &merkle_proof_hashes, &merkle_root, &credential_account_parsed.issuer, - &credential_account_parsed.credential_pubkey, // Use actual credential_pubkey from account + &credential, &encrypted_data, + &verification_id, ); - // Use the actual data_hash from the credential account - let public_data_hash = credential_data.data_hash; - - // The data_hash parameter should be the public_data_hash (hash of issuer + credential_pubkey) - let data_hash = public_data_hash; - // Create the verification transaction let mut remaining_accounts = PackedAccounts::default(); let config = SystemAccountMetaConfig::new(zk_id::ID); remaining_accounts.add_system_accounts(config)?; - let verification_id = Pubkey::new_unique().to_bytes(); - let (event_address, _) = derive_address( &[ ZK_ID_CHECK, - data_hash.as_slice(), + nullifier.as_slice(), verification_id.as_slice(), ], &address_tree_info.tree, @@ -337,10 +389,10 @@ where address_tree_info: packed_address_tree_accounts[0], output_state_tree_index, input_root_index: root_index, - encrypted_data, + public_data: encrypted_data, credential_proof, issuer: credential_account_parsed.issuer.to_bytes(), - data_hash, + nullifier, verification_id, }; @@ -370,11 +422,12 @@ fn generate_credential_proof( merkle_proof_hashes: &[[u8; 32]], merkle_root: &[u8; 32], issuer_pubkey: &Pubkey, - credential_pubkey: &Pubkey, + credential: &CredentialKeypair, encrypted_data: &[u8], + verification_id: &[u8; 31], ) -> ( light_compressed_account::instruction_data::compressed_proof::CompressedProof, - [u8; 32], + [u8; 32], // nullifier ) { let zkey_path = "./build/compressed_account_merkle_proof_final.zkey".to_string(); @@ -396,20 +449,15 @@ fn generate_credential_proof( let issuer_hashed = hashv_to_bn254_field_size_be_const_array::<2>(&[issuer_pubkey.as_ref()]).unwrap(); - // Use the same hashing as issuer - 2-round hash - let credential_pubkey_hashed = - hashv_to_bn254_field_size_be_const_array::<2>(&[credential_pubkey.as_ref()]).unwrap(); + // Compute data_hash as hash of issuer and credential commitment (public key is already a Poseidon hash) let mut hash_input = Vec::new(); hash_input.extend_from_slice((encrypted_data.len() as u32).to_le_bytes().as_ref()); hash_input.extend_from_slice(encrypted_data); let mut encrypted_data_hash = Sha256::hash(hash_input.as_slice()).unwrap(); encrypted_data_hash[0] = 0; - let public_data_hash = Poseidon::hashv(&[ - issuer_hashed.as_slice(), - credential_pubkey_hashed.as_slice(), - ]) - .unwrap(); + let public_data_hash = + Poseidon::hashv(&[issuer_hashed.as_slice(), &credential.public_key]).unwrap(); // Verify the data_hash matches let expected_data_hash = credential_account.data.as_ref().unwrap().data_hash; @@ -477,10 +525,13 @@ fn generate_credential_proof( "issuer_hashed".to_string(), vec![BigUint::from_bytes_be(&issuer_hashed).to_string()], ); + + // Add credential private key (private input) - already padded to 32 bytes proof_inputs.insert( - "credential_pubkey_hashed".to_string(), - vec![BigUint::from_bytes_be(&credential_pubkey_hashed).to_string()], + "credentialPrivateKey".to_string(), + vec![BigUint::from_bytes_be(&credential.private_key).to_string()], ); + proof_inputs.insert( "encrypted_data_hash".to_string(), vec![BigUint::from_bytes_be(&encrypted_data_hash).to_string()], @@ -489,9 +540,20 @@ fn generate_credential_proof( "public_encrypted_data_hash".to_string(), vec![BigUint::from_bytes_be(&encrypted_data_hash).to_string()], ); + + // Add verification_id (public input) - pad to 32 bytes + let mut padded_verification = [0u8; 32]; + padded_verification[1..32].copy_from_slice(verification_id); + proof_inputs.insert( + "verification_id".to_string(), + vec![BigUint::from_bytes_be(&padded_verification).to_string()], + ); + + // Compute nullifier + let nullifier = credential.compute_nullifier(verification_id); proof_inputs.insert( - "public_data_hash".to_string(), - vec![BigUint::from_bytes_be(&public_data_hash).to_string()], + "nullifier".to_string(), + vec![BigUint::from_bytes_be(&nullifier).to_string()], ); // Add merkle proof inputs @@ -540,9 +602,9 @@ fn generate_credential_proof( use groth16_solana::groth16::Groth16Verifier; use groth16_solana::proof_parser::circom_prover::convert_public_inputs; - // Convert public inputs from the circom proof - let public_inputs_converted: [[u8; 32]; 7] = convert_public_inputs(&proof.pub_inputs); - + // Convert public inputs from the circom proof (8 public inputs in circuit) + let public_inputs_converted: [[u8; 32]; 8] = convert_public_inputs(&proof.pub_inputs); + println!("public_inputs_converted {:?}", public_inputs_converted); // Create verifier using the uncompressed proofs (which have proof_a negated) let mut verifier = Groth16Verifier::new( &proof_a_uncompressed, @@ -566,5 +628,5 @@ fn generate_credential_proof( c: proof_c, }; - (compressed_proof, public_data_hash) + (compressed_proof, nullifier) } From 2692fc98890971fefb7cb1343e17a7ad91d3e3e8 Mon Sep 17 00:00:00 2001 From: ananas Date: Mon, 20 Oct 2025 22:23:27 +0100 Subject: [PATCH 14/14] update zk id readme --- zk-id/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/zk-id/README.md b/zk-id/README.md index e29ab0a..d9ed8a3 100644 --- a/zk-id/README.md +++ b/zk-id/README.md @@ -20,6 +20,7 @@ Verifies a zero-knowledge proof of credential ownership using Groth16 verificati **Properties:** - Credential verification is private. The credential is not exposed during zk proof verification. + (The transaction payer is not private, for full privacy a relayer or freshly funded keypair should be used.) - Each credential can only be used once per `verification_id`. (The event account address serves as a nullifier.) - Only the credential owner can produce a valid proof.