diff --git a/.gitignore b/.gitignore index f82ed357..98e26cac 100644 --- a/.gitignore +++ b/.gitignore @@ -23,5 +23,6 @@ **/.circleci/ .env +.env.local wasm/ /node_modules diff --git a/contracts/zk-shuffle/.cargo/config b/contracts/zk-shuffle/.cargo/config new file mode 100644 index 00000000..87683bdd --- /dev/null +++ b/contracts/zk-shuffle/.cargo/config @@ -0,0 +1,7 @@ +[alias] +wasm = "build --release --lib --target wasm32-unknown-unknown" +unit-test = "test --lib" +schema = "run --bin schema" + +[net] +git-fetch-with-cli = true diff --git a/contracts/zk-shuffle/.env.example b/contracts/zk-shuffle/.env.example new file mode 100644 index 00000000..b2cc96e2 --- /dev/null +++ b/contracts/zk-shuffle/.env.example @@ -0,0 +1,8 @@ +RPC_URL="https://rpc.xion-testnet-2.burnt.com:443" +CHAIN_ID=xion-testnet-2 +WALLET1= +TX_HASH=5A9106DC97EB091C0E3A14E4AEF193548978FD44D5201C1FC6480207D6658FB7 +CODE_ID=1891 +DEPLOY_TXHASH=3E6BFA9DCDFA7D921E3F2D9FD5D37C8C39E84E4D40A027DC2CC4A06E6191E074 +CONTRACT_ADDRESS=xion12ecqx3jdr3pq0w7xl49lwuuz0n2uxpejf9ng4az0m2rrv9mwmf2sysh52w +MSG='{}' diff --git a/contracts/zk-shuffle/Cargo.lock b/contracts/zk-shuffle/Cargo.lock new file mode 100644 index 00000000..425e61f8 --- /dev/null +++ b/contracts/zk-shuffle/Cargo.lock @@ -0,0 +1,1848 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.17", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "rayon", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rayon", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", + "rayon", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[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 = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bech32" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32637268377fc7b10a8c6d51de3e7fba1ce5dd371a96e342b34e6078db558e7f" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[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 = "bnum" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56953345e39537a3e18bdaeba4cb0c58a78c1f61f361dc0fa7c5c7340ae87c5f" + +[[package]] +name = "bnum" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e31ea183f6ee62ac8b8a8cf7feddd766317adfb13ff469de57ce033efd6a790" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +dependencies = [ + "serde", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" +dependencies = [ + "num-traits", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "cosmos-sdk-proto" +version = "0.23.0-pre" +source = "git+https://github.com/burnt-labs/cosmos-rust?branch=feat%2Fxion-zk#c0fa9e3f6b99836228de38bb08358a1df0206343" +dependencies = [ + "pbjson", + "pbjson-types", + "prost 0.13.5", + "prost-types", + "serde", + "tendermint-proto", +] + +[[package]] +name = "cosmwasm-core" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63efd882086668c3bad621b5b897a0e058d0b5fae027c984e1a6230bf284ab85" + +[[package]] +name = "cosmwasm-crypto" +version = "1.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c82e56962f0f18c9a292aa59940e03a82ce15ef79b93679d5838bb8143f0df" +dependencies = [ + "digest 0.10.7", + "ed25519-zebra 3.1.0", + "k256", + "rand_core 0.6.4", + "thiserror", +] + +[[package]] +name = "cosmwasm-crypto" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0969e6f569f867725bf89e672058ae336e130c1fcf914def4f7c6c0380b2bc83" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "cosmwasm-core", + "curve25519-dalek 4.1.3", + "digest 0.10.7", + "ecdsa", + "ed25519-zebra 4.0.3", + "k256", + "num-traits", + "p256", + "rand_core 0.6.4", + "rayon", + "sha2 0.10.9", + "thiserror", +] + +[[package]] +name = "cosmwasm-derive" +version = "1.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b804ff15a0e059c88f85ae0e868cf8c7aba9d61221e46f1ad7250f270628c7" +dependencies = [ + "syn 1.0.109", +] + +[[package]] +name = "cosmwasm-derive" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0da0db99715fc86e6a5ad7be9c19d0d9e5a92179862b17cae7406b729a402c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "cosmwasm-schema" +version = "1.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5526ea839acb47bbf8fff031ed9aad86e74d43f77b089255417328c3664367d5" +dependencies = [ + "cosmwasm-schema-derive 1.5.11", + "schemars", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cosmwasm-schema" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76b20ffffff7d2c2ad50be66cfc298cc3244fd9c0643b6ce552972de363651cb" +dependencies = [ + "cosmwasm-schema-derive 2.3.0", + "schemars", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cosmwasm-schema-derive" +version = "1.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f41b99f41f840765d02ae858956bb52af910755976312082e90493c67db512" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "cosmwasm-schema-derive" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9fff4b28679c2e27d7537c06dd49e864a52e3351eb8b706ddfaf034cbed82b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "cosmwasm-std" +version = "1.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763340055b84e5482ed90fec8194ff7d59112267a09bbf5819c9e3edca8c052e" +dependencies = [ + "base64 0.21.7", + "bech32 0.9.1", + "bnum 0.10.0", + "cosmwasm-crypto 1.5.11", + "cosmwasm-derive 1.5.11", + "derivative", + "forward_ref", + "hex", + "schemars", + "serde", + "serde-json-wasm 0.5.2", + "sha2 0.10.9", + "static_assertions", + "thiserror", +] + +[[package]] +name = "cosmwasm-std" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7791cf4d35da8f731ae904d5397011cb5c86ea0ef3ac0779b626baeacdb84f2" +dependencies = [ + "base64 0.22.1", + "bech32 0.11.1", + "bnum 0.11.0", + "cosmwasm-core", + "cosmwasm-crypto 2.3.0", + "cosmwasm-derive 2.3.0", + "derive_more", + "hex", + "rand_core 0.6.4", + "rmp-serde", + "schemars", + "serde", + "serde-json-wasm 1.0.1", + "sha2 0.10.9", + "static_assertions", + "thiserror", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[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 = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version", + "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.114", +] + +[[package]] +name = "cw-multi-test" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d818f5323c80ed4890db7f89d65eda3f0261fe21878e628c27ea2d8de4b7ba4" +dependencies = [ + "anyhow", + "cosmwasm-std 1.5.11", + "cw-storage-plus 1.2.0", + "cw-utils", + "derivative", + "itertools 0.11.0", + "prost 0.12.6", + "schemars", + "serde", + "sha2 0.10.9", + "thiserror", +] + +[[package]] +name = "cw-storage-plus" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" +dependencies = [ + "cosmwasm-std 1.5.11", + "schemars", + "serde", +] + +[[package]] +name = "cw-storage-plus" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f13360e9007f51998d42b1bc6b7fa0141f74feae61ed5fd1e5b0a89eec7b5de1" +dependencies = [ + "cosmwasm-std 2.3.0", + "schemars", + "serde", +] + +[[package]] +name = "cw-utils" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" +dependencies = [ + "cosmwasm-schema 1.5.11", + "cosmwasm-std 1.5.11", + "cw2 1.1.2", + "schemars", + "semver", + "serde", + "thiserror", +] + +[[package]] +name = "cw2" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa" +dependencies = [ + "cosmwasm-schema 1.5.11", + "cosmwasm-std 1.5.11", + "cw-storage-plus 1.2.0", + "schemars", + "semver", + "serde", + "thiserror", +] + +[[package]] +name = "cw2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b04852cd38f044c0751259d5f78255d07590d136b8a86d4e09efdd7666bd6d27" +dependencies = [ + "cosmwasm-schema 2.3.0", + "cosmwasm-std 2.3.0", + "cw-storage-plus 2.0.0", + "schemars", + "semver", + "serde", + "thiserror", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +dependencies = [ + "powerfmt", +] + +[[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 = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", + "unicode-xid", +] + +[[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", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-zebra" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +dependencies = [ + "curve25519-dalek 3.2.0", + "hashbrown 0.12.3", + "hex", + "rand_core 0.6.4", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek 4.1.3", + "ed25519", + "hashbrown 0.14.5", + "hex", + "rand_core 0.6.4", + "sha2 0.10.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + +[[package]] +name = "flex-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "paste", +] + +[[package]] +name = "forward_ref" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.12", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash 0.8.12", + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[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 = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", +] + +[[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.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +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 = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.9", + "signature", +] + +[[package]] +name = "libc" +version = "0.2.180" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "multimap" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" + +[[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", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[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-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[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 = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.9", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbjson" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e6349fa080353f4a597daffd05cb81572a9c031a6d4fff7e504947496fcc68" +dependencies = [ + "base64 0.21.7", + "serde", +] + +[[package]] +name = "pbjson-build" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eea3058763d6e656105d1403cb04e0a41b7bbac6362d413e7c33be0c32279c9" +dependencies = [ + "heck", + "itertools 0.13.0", + "prost 0.13.5", + "prost-types", +] + +[[package]] +name = "pbjson-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e54e5e7bfb1652f95bc361d76f3c780d8e526b134b85417e774166ee941f0887" +dependencies = [ + "bytes", + "chrono", + "pbjson", + "pbjson-build", + "prost 0.13.5", + "prost-build", + "serde", +] + +[[package]] +name = "petgraph" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[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 = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.114", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "proc-macro2" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +dependencies = [ + "bytes", + "prost-derive 0.12.6", +] + +[[package]] +name = "prost" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +dependencies = [ + "bytes", + "prost-derive 0.13.5", +] + +[[package]] +name = "prost-build" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" +dependencies = [ + "heck", + "itertools 0.13.0", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost 0.13.5", + "prost-types", + "regex", + "syn 2.0.114", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "prost-derive" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +dependencies = [ + "anyhow", + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "prost-types" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +dependencies = [ + "prost 0.13.5", +] + +[[package]] +name = "quote" +version = "1.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" +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 = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "rand_chacha", + "rand_core 0.6.4", +] + +[[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" + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rayon" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "regex" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "rmp" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ba8be72d372b2c9b35542551678538b562e7cf86c3315773cae48dfbfe7790c" +dependencies = [ + "num-traits", +] + +[[package]] +name = "rmp-serde" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f81bee8c8ef9b577d1681a70ebbc962c232461e397b22c208c43c04b67a155" +dependencies = [ + "rmp", + "serde", +] + +[[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.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.114", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-json-wasm" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" +dependencies = [ + "serde", +] + +[[package]] +name = "serde-json-wasm" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05da0d153dd4595bdffd5099dc0e9ce425b205ee648eb93437ff7302af8c9a5" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[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 = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[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.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" +dependencies = [ + "fastrand", + "getrandom 0.3.4", + "once_cell", + "rustix", + "windows-sys", +] + +[[package]] +name = "tendermint-proto" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed14abe3b0502a3afe21ca74ca5cdd6c7e8d326d982c26f98a394445eb31d6e" +dependencies = [ + "bytes", + "flex-error", + "prost 0.13.5", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[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.114", +] + +[[package]] +name = "time" +version = "0.3.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" + +[[package]] +name = "time-macros" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" + +[[package]] +name = "zerocopy" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "zkshuffle-cw" +version = "0.1.1" +dependencies = [ + "cosmos-sdk-proto", + "cosmwasm-schema 2.3.0", + "cosmwasm-std 2.3.0", + "cw-multi-test", + "cw-storage-plus 2.0.0", + "cw2 2.0.0", + "once_cell", + "schemars", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "zmij" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f63c051f4fe3c1509da62131a678643c5b6fbdc9273b2b79d4378ebda003d2" diff --git a/contracts/zk-shuffle/Cargo.toml b/contracts/zk-shuffle/Cargo.toml new file mode 100644 index 00000000..d351f790 --- /dev/null +++ b/contracts/zk-shuffle/Cargo.toml @@ -0,0 +1,55 @@ +[package] +name = "zkshuffle-cw" +version = "0.1.1" +authors = ["zkShuffle Contributors"] +edition = "2021" + +exclude = [ + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "artifacts/*", +] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +crate-type = ["cdylib", "rlib"] + +[profile.release] +codegen-units = 1 +debug = false +debug-assertions = false +incremental = false +lto = true +opt-level = 3 +overflow-checks = true +panic = 'abort' +rpath = false + +[features] +# use library feature to disable all instantiate/execute/query exports +library = [] + +[package.metadata.scripts] +optimize = """docker run --rm -v "$(pwd)":/code \ + --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ + --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ + cosmwasm/optimizer:0.16.0 +""" + +[dependencies] +cosmwasm-schema = "2.2.2" +cosmwasm-std = { version = "2.2.2", features = ["stargate", "cosmwasm_2_1"] } +cw-storage-plus = "2.0.0" +cw2 = "2.0.0" +once_cell = "1.18.0" +schemars = "0.8.10" +serde = { version = "1.0.203", default-features = false, features = ["derive"] } +serde_json = "1.0.87" +thiserror = "1.0.50" +cosmos-sdk-proto = { package = "cosmos-sdk-proto", git = "https://github.com/burnt-labs/cosmos-rust", branch = "feat/xion-zk", default-features = false, features = [ + "cosmwasm", + "xion", +] } + +[dev-dependencies] +cw-multi-test = "0.17.0" diff --git a/contracts/zk-shuffle/Dockerfile b/contracts/zk-shuffle/Dockerfile new file mode 100644 index 00000000..a3124565 --- /dev/null +++ b/contracts/zk-shuffle/Dockerfile @@ -0,0 +1,18 @@ +FROM cosmwasm/optimizer:0.17.0 AS base + +RUN echo "https://dl-cdn.alpinelinux.org/alpine/v3.21/main" > /etc/apk/repositories && \ + echo "https://dl-cdn.alpinelinux.org/alpine/v3.21/community" >> /etc/apk/repositories && \ + apk add --no-cache git openssh-client + +RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh && \ + ssh-keyscan github.com >> /root/.ssh/known_hosts + +# Ensure cargo always uses CLI git for submodules and dependencies +ENV CARGO_NET_GIT_FETCH_WITH_CLI=true +RUN echo 'export CARGO_NET_GIT_FETCH_WITH_CLI=true' >> /etc/profile \ + && echo 'export CARGO_NET_GIT_FETCH_WITH_CLI=true' >> /root/.bashrc + +# Optional: set git config to use SSH instead of HTTPS (for submodules) +RUN git config --global url."ssh://git@github.com/".insteadOf "https://github.com/" + +ENTRYPOINT ["/usr/local/bin/optimize.sh"] diff --git a/contracts/zk-shuffle/LICENSE b/contracts/zk-shuffle/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/contracts/zk-shuffle/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/contracts/zk-shuffle/NOTICE b/contracts/zk-shuffle/NOTICE new file mode 100644 index 00000000..a9730633 --- /dev/null +++ b/contracts/zk-shuffle/NOTICE @@ -0,0 +1,13 @@ +Copyright 2022 arcayne + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/contracts/zk-shuffle/README.md b/contracts/zk-shuffle/README.md new file mode 100644 index 00000000..def08a42 --- /dev/null +++ b/contracts/zk-shuffle/README.md @@ -0,0 +1,118 @@ +# ZK Shuffle Contract + +CosmWasm contract that verifies shuffle-encrypt and decrypt zero-knowledge proofs for card shuffling. Use the provided testnet artifacts to try it quickly, or build and deploy your own optimized binary. + +## Prerequisites + +- XION daemon (`xiond`). Install via the official guide: [Setup XION Daemon](https://docs.burnt.com/xion/developers/featured-guides/setup-local-environment/interact-with-xion-chain-setup-xion-daemon) +- Docker (required to build the custom optimizer image) +- `jq` (used by the helper scripts) + +## Environment Setup + +Create a local env file and set your wallet address: + +```bash +cp .env.example .env.local +$EDITOR .env.local # set WALLET1 to your wallet +source .env.local +``` + +- `testnet.json` contains a live CODE_ID and CONTRACT_ADDRESS you can use immediately on XION testnet if you just want to interact without deploying. +- `MSG` defaults to `{}`; adjust if you need a custom instantiate message. + +## Build (custom optimizer) + +The standard CosmWasm optimizer image does not work for this contract, so use the local Dockerfile: + +1) Build the optimizer image + +```bash +docker build -t wasm_optimizer . +``` + +2) Produce the optimized wasm artifact + +```bash +docker run --rm -v "$(pwd)":/code -v ~/.ssh:/root/.ssh:ro -e SSH_AUTH_SOCK=/ssh-agent \ + --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ + --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ + wasm_optimizer ./ +``` + +The optimized binary is written to `artifacts/zkshuffle_cw.wasm`. + +## Deploy to XION + +All commands assume the variables from `.env.local` have been loaded. + +1) **Store the contract bytecode** + +```bash +RES=$(xiond tx wasm store ./artifacts/zkshuffle_cw.wasm \ + --chain-id "$CHAIN_ID" \ + --gas-adjustment 1.3 \ + --gas-prices 0.1uxion \ + --gas auto \ + -y --output json \ + --node "$RPC_URL" \ + --from "$WALLET1") + +echo "$RES" +``` + +Copy the `txhash` from the output into `TX_HASH` in `.env.local`, then reload it. + +2) **Retrieve the Code ID** + +```bash +CODE_ID=$(xiond query tx "$TX_HASH" --node "$RPC_URL" --output json | jq -r '.events[-1].attributes[1].value') +echo "$CODE_ID" +``` + +Save the value to `CODE_ID` in `.env.local` and reload it. + +3) **Instantiate the contract** + +```bash +xiond tx wasm instantiate "$CODE_ID" "$MSG" \ + --from "$WALLET1" \ + --label "zkshuffle" \ + --gas-prices 0.025uxion \ + --gas auto \ + --gas-adjustment 1.3 \ + -y --no-admin \ + --chain-id "$CHAIN_ID" \ + --node "$RPC_URL" +``` + +Copy the response `txhash` into `DEPLOY_TXHASH`, reload, and fetch the contract address: + +```bash +CONTRACT_ADDRESS=$(xiond query tx "$DEPLOY_TXHASH" \ + --node "$RPC_URL" \ + --output json | jq -r '.events[] | select(.type == "instantiate") | .attributes[] | select(.key == "_contract_address") | .value') + +echo "$CONTRACT_ADDRESS" +``` + +Save `CONTRACT_ADDRESS` in `.env.local` for later use. + +## Test proof verification + +The scripts read configuration from `.env.local` and require `jq`. + +```bash +cd scripts +./test_all_proofs.sh # runs both execute methods +# or individually: +./test_verify_shuffle_proof.sh +./test_verify_decrypt_proof.sh +``` + +## Circuit and verification keys + +- Shuffle encrypt circuit: `vkey name: shuffle_encrypt`, `vkey id: 3` +- Decrypt circuit: `vkey name: decrypt`, `vkey id: 2` + +Verification keys and artifacts are stored under `vkeys/` and `artifacts/` respectively. diff --git a/contracts/zk-shuffle/scripts/data/decrypt.json b/contracts/zk-shuffle/scripts/data/decrypt.json new file mode 100644 index 00000000..6ef2737f --- /dev/null +++ b/contracts/zk-shuffle/scripts/data/decrypt.json @@ -0,0 +1,157 @@ +{ + "decryptVkey": { + "protocol": "groth16", + "curve": "bn128", + "nPublic": 8, + "vk_alpha_1": [ + "14378794661994809316668936077887579852844330409586136188493910229510707683568", + "19007180918058273234125706522281291487787880146734549337345180962710738215208", + "1" + ], + "vk_beta_2": [ + [ + "12055325713222300848813253111985210672218263044214498326157766255150057128762", + "5920706861016946300912146506670818945013737603659177373891149557636543490740" + ], + [ + "14277278647337675353039880797101698215986155900184787257566473040310971051502", + "9700420230412290932994502491200547761155381189822684608735830492099336040170" + ], + ["1", "0"] + ], + "vk_gamma_2": [ + [ + "10857046999023057135944570762232829481370756359578518086990519993285655852781", + "11559732032986387107991004021392285783925812861821192530917403151452391805634" + ], + [ + "8495653923123431417604973247489272438418190587263600148770280649306958101930", + "4082367875863433681332203403145435568316851327593401208105741076214120093531" + ], + ["1", "0"] + ], + "vk_delta_2": [ + [ + "12594050201927194728935013198382868710096766024870573161837432117376274142958", + "19133256127707975950691487792451177362565994283806060741327347032806959261921" + ], + [ + "17174637232039909600979373933534686019562408911886417431413256310520620233064", + "5020265124747710802123789284081723412845598094160521887960172071062583109047" + ], + ["1", "0"] + ], + "vk_alphabeta_12": [ + [ + [ + "2552340398560037553466474334090684122239527938678075120685238892210140286734", + "21103567520735181525962881223829473150964899590725643730870360165680654169821" + ], + [ + "17418358945522398631235978744064871659729272245932523041719658073201063889547", + "12780865215547052197001378227425221956514050662134427990972566538059532319392" + ], + [ + "3101120494865128027437311952527045792832484453316657117057089254057743545356", + "13276054897685369681716779310142237353869839733892907342519192250312681998635" + ] + ], + [ + [ + "12060095829229916424462012554449507497737260384521108585857034955753024275809", + "4186390213203745233792740144907090174162444102454343802205404423496051058966" + ], + [ + "21194213978609667410351384442332026901277069323933037611098337364518057338726", + "12340070885078667797645127498544657281686947867858979354578727773053815409164" + ], + [ + "17244726363072569657630996237856400482385700697899371994592682207921269901256", + "723363160021531292090447266088967357211629759196476148452063353646061859464" + ] + ] + ], + "IC": [ + [ + "5932026459382860604309440879316683197022918149003360191294155741233703232289", + "10190564836545696514491179333959855931734797168140754412925505292086287456157", + "1" + ], + [ + "18867335583493634013472831141177954825293424828688421198228525342030670068104", + "15381268465466397414659863328587624695240059970282915771760871594047824107403", + "1" + ], + [ + "11286506025338942578952255893420408569906554872704554862467620266108132264197", + "2491405715760472509167562261482717498704059700756396771077313263264637414832", + "1" + ], + [ + "3287473577425372258045407890427028857264800329136703662219819676329065521491", + "8621055055780158700687294516025314839109090879823278356759396109602531212398", + "1" + ], + [ + "13486231092071464017060066625879173946215137105871834475708368644662546379148", + "21121436964731053158654352717071962384336756797046584661227286306159111031971", + "1" + ], + [ + "14109275663321771783314980339181158967602422131270775459802129831737860909306", + "16924660254912023791796764707642347850615242421495467769065197379355986460351", + "1" + ], + [ + "3419883549205188749055793320564337243174009629574444717611782109291182659583", + "4382834526475882549762033295157581547532804093976887401310358307095345650082", + "1" + ], + [ + "3223962897746138668639029759885991824463607401137866309854517055540083501524", + "16082885970618257756451494366838606402295679026944717495804110892597399020825", + "1" + ], + [ + "8913096594893157129832389718939680598171595295898154761061549479290918885343", + "743871532215761266358119443417771343521019768458421024672232959183096442227", + "1" + ] + ] + }, + "publicSignals": [ + "1221735693315130515504516682279070738473264770555991883646603207606819041079", + "21525056786895980289563343078607916294133669848975762741737546950414891283541", + "7458153424772312615997399500518813067497533478347331843053517179259909954441", + "0", + "11393356614877405198783044711998043631351342484007264997044462092350229714918", + "17098317960392129931849978214866212932499663990196173911675563142403085297402", + "4036829315359488489401802972974393944147859432288167036774066900726959836735", + "6244625204286882342998239082654443606122935938440944298415305586625081506702" + ], + "proof": { + "pi_a": [ + "8386688762131326866815784690875564035443386037761133075042960329761480247821", + "12530570042088379815098456425756951858107893833790426391117706659536825398095", + "1" + ], + "pi_b": [ + [ + "11535065410766732518707946566384124888541862355666943594205512446488176140678", + "7140161334993409459121735946492388552971714095942082895298891441058904208961" + ], + [ + "7890158981416229297960113503664293235298441013890249591097038348063448541831", + "16903783398105452799399469018564968412144134452033391666355407363004210952407" + ], + ["1", "0"] + ], + "pi_c": [ + "21180421439040556086625018180264090963943766817245780792410400531122369668018", + "9146815313761555792885083925119246979756467908711981519427652558012220959155", + "1" + ], + "protocol": "groth16", + "curve": "bn128" + } +} diff --git a/contracts/zk-shuffle/scripts/data/shuffle_encrypt.json b/contracts/zk-shuffle/scripts/data/shuffle_encrypt.json new file mode 100644 index 00000000..5ef82d78 --- /dev/null +++ b/contracts/zk-shuffle/scripts/data/shuffle_encrypt.json @@ -0,0 +1,1400 @@ +{ + "encryptVkey": { + "protocol": "groth16", + "curve": "bn128", + "nPublic": 215, + "vk_alpha_1": [ + "14378794661994809316668936077887579852844330409586136188493910229510707683568", + "19007180918058273234125706522281291487787880146734549337345180962710738215208", + "1" + ], + "vk_beta_2": [ + [ + "12055325713222300848813253111985210672218263044214498326157766255150057128762", + "5920706861016946300912146506670818945013737603659177373891149557636543490740" + ], + [ + "14277278647337675353039880797101698215986155900184787257566473040310971051502", + "9700420230412290932994502491200547761155381189822684608735830492099336040170" + ], + ["1", "0"] + ], + "vk_gamma_2": [ + [ + "10857046999023057135944570762232829481370756359578518086990519993285655852781", + "11559732032986387107991004021392285783925812861821192530917403151452391805634" + ], + [ + "8495653923123431417604973247489272438418190587263600148770280649306958101930", + "4082367875863433681332203403145435568316851327593401208105741076214120093531" + ], + ["1", "0"] + ], + "vk_delta_2": [ + [ + "4749829685018394265759166642612538661956358501586333301117677597065071307926", + "15804720237715868904774198384823876758005645387467920325598801085788769080458" + ], + [ + "17825137562998211765453733883587501412475900254697329097023879297167891750509", + "20902351206911412272267116072032507955937033537640638451684518277053070440214" + ], + ["1", "0"] + ], + "vk_alphabeta_12": [ + [ + [ + "2552340398560037553466474334090684122239527938678075120685238892210140286734", + "21103567520735181525962881223829473150964899590725643730870360165680654169821" + ], + [ + "17418358945522398631235978744064871659729272245932523041719658073201063889547", + "12780865215547052197001378227425221956514050662134427990972566538059532319392" + ], + [ + "3101120494865128027437311952527045792832484453316657117057089254057743545356", + "13276054897685369681716779310142237353869839733892907342519192250312681998635" + ] + ], + [ + [ + "12060095829229916424462012554449507497737260384521108585857034955753024275809", + "4186390213203745233792740144907090174162444102454343802205404423496051058966" + ], + [ + "21194213978609667410351384442332026901277069323933037611098337364518057338726", + "12340070885078667797645127498544657281686947867858979354578727773053815409164" + ], + [ + "17244726363072569657630996237856400482385700697899371994592682207921269901256", + "723363160021531292090447266088967357211629759196476148452063353646061859464" + ] + ] + ], + "IC": [ + [ + "452987554829437481229946320777014200489823354620417299261008144880501532245", + "20588611611633716068717973072126950304472046696263395535824873728340460492870", + "1" + ], + [ + "6126369430870011783898934313173628831869220754713760114240402157400350132910", + "4225470032729069326506087575082120700076142098168844838071648223636876879262", + "1" + ], + [ + "50479399711007998946374472570799911197543352622925801117841793184196870141", + "6660715107116978597654608280731609126766789580894753485097172688965554680346", + "1" + ], + [ + "10645881551741033904162074869683205934680250437205330136681200260809757191238", + "10564704444086989525221646723767207913615488805442243599327818666414025363108", + "1" + ], + [ + "5328466716976026957002457909888397138536453544531916991876534405442662975657", + "12940879501493515153665647259593131624222444893552424756329668432949401550511", + "1" + ], + [ + "20621973199298281600941465795290150562537052751025030113306960715467792941764", + "20422802931522695914359510694885504614417305973665488819881684816712591573582", + "1" + ], + [ + "1764283856582817963552052865427272364537522956314493348594242094072646114757", + "12432746687543590387095921614554528597628627315166579696768400087372688435102", + "1" + ], + [ + "13390976395853137306786979579844899017171373492308361561981011511517761248385", + "6714946143107216347907357561871576757271968337330750339329063007116347761586", + "1" + ], + [ + "3101554795368135523452882365118260859564178589971314623229778897304568457214", + "15596346270876469233310635536187885136525329054720448406679536705573317802972", + "1" + ], + [ + "11007336989145996130789044651897953394561365486407189135080781499165496058544", + "19996442538518941007039558555557397076531404569806590635921056185511030305220", + "1" + ], + [ + "10905096413227544111061097063180112134296876490375651960481421442588255864375", + "11783370234777013392717331178288130160893090490713725282286599472099040913133", + "1" + ], + [ + "19128514327328933493721952285959725925996454789798013319125037068164767060083", + "5428049426951372838522234466772658641883235607159118773728022016916185188399", + "1" + ], + [ + "18706404340525899852936562780319551173123858883796240764060751687856903973445", + "20604796686248985275326686425042133427466113409155566772706621358991867302350", + "1" + ], + [ + "19848481362546350494066121463820778608148785727361260138659341902812019929916", + "21867229820410363636459395174367757791884820439067831467959916325421711976669", + "1" + ], + [ + "12351852068222618849602292315937958852818457763197147613635273740678497634435", + "20048803870581863938352468970552153898483212167188115862517479912098297592243", + "1" + ], + [ + "15379808828479104711527790850726385007735497039619578940884699387870922254531", + "10168227167055259148062300077780945765214842142626533292756349045614073684733", + "1" + ], + [ + "11331990375532492790427763037069010879885673443827351354562212991733945370831", + "21586236632840665135167888358664402923772789915388030512495879630116346499550", + "1" + ], + [ + "7054222070294618571724642157384661847125276157456823035211633466323806627903", + "9231118965985692191583541505569554833200207720441196952001685967691851992288", + "1" + ], + [ + "16704009658286049419111930436135116246496240941835645935328418064761033164185", + "10043802721428886139114123451833876311868052224040108157653262366988023787645", + "1" + ], + [ + "2656886722929079249881394958945544884853385497104572496379378343111810470188", + "10364218707906830216477563130483985035252147998470574490827252732695559236531", + "1" + ], + [ + "9558348933648571468299830182104904180170501445361297098430680332648817283347", + "2273940470913772551291402972330942466309826531457566144465448663117296452763", + "1" + ], + [ + "20336207658852767624402404767405586947225969574174141912812109265080056019811", + "2963880459083175891412153109478614209938396612497396264159259557008191798317", + "1" + ], + [ + "11878044374868207030085573421592066583217091526945525428099690354756867723799", + "7063516920001485334175271837288685127069551074579723794937589878466479164883", + "1" + ], + [ + "21648559892486881055159871377524698698952261266323448506734745144778090437303", + "13416645216305323412337404474733651797168660322656724772201346958100515837785", + "1" + ], + [ + "10584861656881708777110775747692047096815755326949921957340568014180808723050", + "15996479741960630643953776888340825819934697249463232786473395814016021500836", + "1" + ], + [ + "21286180561863119370386463912691348361504240647053702651932936265058893129492", + "1105491093279551124225141554725567845208603976533430046757201312046791772821", + "1" + ], + [ + "15313655766904868225829975194569056983308232820914150832919464130461126177757", + "6227368225994678468053381123064307984458604240959228922327584912841875249855", + "1" + ], + [ + "21443340353392977072094986286878878312342171274204355764850791121944494254877", + "16696138049126985531185706832292819144326810370832946685372049988709797606246", + "1" + ], + [ + "13001941544234457940845015753225563947709404785152566328706086140499801796219", + "6899350556086910097340816219046754474155952427017308221633449731482897673416", + "1" + ], + [ + "14251426002892795099293500450341533162993218015270489386569324163101517528193", + "3991495684065216474361977727160864407270857790205361554486941224146730640205", + "1" + ], + [ + "19543118808372428107388952488780421074362659789161084540928610122351730229873", + "92550720200846021176593882520255598347978536788537192953630249889247716411", + "1" + ], + [ + "5432324113206826419052660407212086991839135188591904507277232723429091012321", + "11467978453887233360343515545860893124052154619877379915678624300372943438222", + "1" + ], + [ + "20969315257936142534989039576716550425798085158034809224402015659531463933363", + "18764794657165313485283779801385834648238385455594639839173743930560328690726", + "1" + ], + [ + "10947765444249494726119500093732190113650014954452467461220409979030417506187", + "9578768902173291851910706722331916952034848815612122648574285390030392409456", + "1" + ], + [ + "3079704637914380354184296307747461302231522314796415531991237401866757634208", + "12424712540041715669019160747610601864097297252810461312941390683136552470803", + "1" + ], + [ + "17004561612458535924238993285209307950077220691016025354465243743530429541135", + "8018367730084444226625178308476605659816398346930286542133352972267524027131", + "1" + ], + [ + "4683873821324794382612092298974038457535199227051019180466735709843819208246", + "1538456770134395251525076284352681561311928298891034992019070087281991580820", + "1" + ], + [ + "5227791591558443831416670880131485177384905050838002458594694252673745590331", + "21180384934024153548394577620762421807714292848474568207573088776243969784034", + "1" + ], + [ + "17562482600119071884682739464040428897888895575611303834868500221073376189834", + "1867393151725347743855630327958330327341700462697090633836618909475405863034", + "1" + ], + [ + "10678994881195170949782788493895414488654592319353987441046737745441640118668", + "7930950662540518562653020629143072217831724960065756378273826226558816427432", + "1" + ], + [ + "7027457874291921809379323126702389276073321145892713829911461028839047899436", + "9677077819758341155141989676969046591388076871318794473804491442710260069666", + "1" + ], + [ + "20719078579588124221495339462305579267992137692699971129576778036287640218599", + "20451120309324107407506527228304953468163509954137440191952154322658275289955", + "1" + ], + [ + "13679107044664048649899812766462819300763178649996675006431745445902550032154", + "9222889857880975045895570254878175569001189342060660751952967157619747710178", + "1" + ], + [ + "13563509352876866209387751403010327795382054252450863868857301609952660267097", + "4107333481832477524920317593711990114014667410489763008070869111494085329442", + "1" + ], + [ + "885789169390329294619874940833751880490855727879747547876615435372263424423", + "1775078248664753744544780363210308428990387360741189122864426314361027278016", + "1" + ], + [ + "14695369349133728489990130703814415305064250231828117017459199020778072594736", + "16566602047767557614950810141865611752985610977390817978630024213702179640502", + "1" + ], + [ + "3917504453495221156268180428760176085004007052090851843584283383265218543569", + "13968795499269201034635964537695810406703037244384932127886892380995550953536", + "1" + ], + [ + "1168035972860135435344138424391854251712036437888863404324968990010363229789", + "6203100166531660730756264481842760327439447959795515139189754790364141553423", + "1" + ], + [ + "6011503913203282648232325956336024145116029811015410887727235939794791182321", + "19064243944633879663635425319603100455668076152986530869952108114530337731557", + "1" + ], + [ + "17555819367486770413240961167318183407205525718841386705694027901212000996565", + "17454264707343667309504025459459355094981651711453614978158109001401528160297", + "1" + ], + [ + "4824699235268764024556627253498557621115200830627766760654831900325246019003", + "17312003454275192642340451830724935540804838754930809815642355714976414994253", + "1" + ], + [ + "9333089741411141264644404641347504544810414116257972222175716806978000132331", + "18725687348736768386854114453932433927333581080637146300294352957900736587463", + "1" + ], + [ + "21774964624705660467735130632072036550648278330539894823272979435719667297069", + "10428365881182552473120214016431558216037018603089842360255436597227528983987", + "1" + ], + [ + "16144689706154564793490842148088265643309395009353095634356335327292913561850", + "13604013990605877878221446710986569710840175352995801600650374421686561134599", + "1" + ], + [ + "21807079438300550379757698556990224927312510559558706942833849986012450013638", + "6728249490725054732236901132200962304523900250165202642491319185040994927733", + "1" + ], + [ + "20379715507466960566868726908408815258432051658701840711708615997884817954310", + "14130642783273589985101232768532484819331666122620317024659565639717137092762", + "1" + ], + [ + "15295083391178420166967070133861436007895352690149084727771431831459964427017", + "10681826183969024618404916550624054959101583969372902023709687826575573343131", + "1" + ], + [ + "8059610141493125181067545941017599107224102076516797741138493241413206887537", + "15468407131091161388366464952841796216514652993035165820259107226606686582219", + "1" + ], + [ + "14059042112719502599450911022747679384060598254743945538472409354625814594572", + "38518076542593066660746695442933146537392203174992539396083782800912758908", + "1" + ], + [ + "14092028957597392891730827882742574081717605904024593431118092129868411666124", + "18869809128962397577950321487645294554425160222314035627536223839311475972222", + "1" + ], + [ + "9183025336303473127339179263012548399806355509893176604106152146450997713580", + "2773152783109797908591055753548465661785062780694941405290295118388318168987", + "1" + ], + [ + "20761230760115273527160834182251981967957586529934027372372428341625808039691", + "10596871548967029862429823274003014824674218207948302839748548666705482908010", + "1" + ], + [ + "1209973529233982162131797482357731198515499215085382183805796912668174195844", + "9321088649619916462580628561811567105914122739114521832348583754106225410176", + "1" + ], + [ + "21869749798293567312520491048015123535575669604111777996848968874201190469282", + "16761133094701937591992828757557699450843068870822295097614115310129137252907", + "1" + ], + [ + "18548858544949725689037597377289844940200196983979251609291262273090449127046", + "1008459005555762877861212717580563943646519563711418478872366995374217116713", + "1" + ], + [ + "17609032551846702359978149019578358421367513583579623209644305360780943365321", + "4204975348605972348678935396216286456832836283485338924763035867850059776169", + "1" + ], + [ + "1753932744414724585154841303718745290957803012920974086493397327521144796762", + "1683695898741002734696860909446865253597542984386584674978409153328682863529", + "1" + ], + [ + "14199332382881375671276825981171035584510020456043442236826221713953845458753", + "20484254846464807434947750829112468237775796558938655017114556815274832993994", + "1" + ], + [ + "16334726862963458724896357664408131695356807715674434934567889994796384247255", + "9211488826931978671235855903628189827577438486231198304829464449818951791260", + "1" + ], + [ + "17482366026711985074102984248270548366844796378999981782059935151196984195067", + "5367575761607467623511465005894460598079195574008115056228189634080256918191", + "1" + ], + [ + "2017081431057134477843607152528975061165081425689278391865885278233467511227", + "6539080273179444171033564196389305563261483012815322778994807860824858257486", + "1" + ], + [ + "19632931395712471704590165645783536457134890249520801449306777058656698232386", + "4094391571201699120652719954061449228645891638772729268832582916784926479119", + "1" + ], + [ + "11490666708142682017958378097512940205332248616511569078975345789694945225569", + "19526086463445226767579712927576558866312139770291151393527207779241033699967", + "1" + ], + [ + "12682886174263590610982424936639633123752656814885742584209589756036170331905", + "15883016965245835425672435941556533466780735731933863427331294860427200753640", + "1" + ], + [ + "18891379702153872823491570928525122097283493942587079172296634257353775538957", + "6090592970237124414517940228702919587450542377431440073265432137996624618007", + "1" + ], + [ + "18474034503952795150614596559813405947139901852955523487426189145536435555332", + "14738655886877759788429763182943070437197259186934051052313599074706289697211", + "1" + ], + [ + "13894783221288209808679467408511502299053003404779724533858345984957201300263", + "5040175413718054108536381814782180358019719508135219811608860203272979596786", + "1" + ], + [ + "10880052555248934698620631974023880919809366462699784031523227085707751556117", + "11356453660264193248494471532392362151689275196752000792150348790221322863449", + "1" + ], + [ + "11640681998678672574784280982993478331299513270547476522326908485436975671930", + "2954423156528883085989084613922781223815593664422338059020222308170112791955", + "1" + ], + [ + "11291693286990316491064085501735638543403082163315360472043665305405670377473", + "17438688265204106568413268530497876473907544039765495213847044420411814318156", + "1" + ], + [ + "14943594624175503204203632744650644645945984632803966726231897900797592248624", + "15902574245838336656052682656458123905460582263718535669274757144641099560343", + "1" + ], + [ + "12098385596360167918961280801438160120086879419903340653182675471082854736896", + "14863584102872187983358917586275777172802954675420947104402569363472203235616", + "1" + ], + [ + "11602354982392575076379892597743923587246578664013455820292832504707281954976", + "4641425354044445790832711439944642261698747349549539370194300791560917590380", + "1" + ], + [ + "14382427808542708908539010293898586219861726572527740205006069924608331574694", + "15087792687025742937293300211507148213026795487922483830645082826203626699889", + "1" + ], + [ + "14361002678380468161205137444398972748308152534313031773002118810671182803556", + "6258747919849270520987585820150835222186581555468746420460415794200284831282", + "1" + ], + [ + "20211912835886133679120400453253441749773848732489602698990810102567475713793", + "7208541552267603399614055730710757458332909110854616719478508650234821690435", + "1" + ], + [ + "5658659821864447582470683978437318384940339819576249104925467422243942102462", + "3286896671033162665856002821157136578689192034227669965430656483607741558023", + "1" + ], + [ + "1144656847512744289557080915721868573837621516520720197463693074322948818529", + "1647022321862283100580243964646789439914568543663872857593726073449836320791", + "1" + ], + [ + "1344532008253636668178013864788433868087117795471215921394276558957764343013", + "7687179027074195851537500465215292671682971914489184578463327534186538322566", + "1" + ], + [ + "16563584910876814815065156635258885081131972207953306144264746720454222345828", + "5800307607854453278758171463976847858384787424571821914083927385939851055258", + "1" + ], + [ + "10033809278188554663774468409353984742740216156968850494525903372362547677182", + "17862684449533638262002756557990367640337282816391636361801398184101068909353", + "1" + ], + [ + "5213244948797297588008404750127298006860218555892434121974076969189741051378", + "21476729206532562683108887848389658065726382388857297511188663664024282193942", + "1" + ], + [ + "18522951819225297888574896023503954191694182969085930253841428621252901622251", + "8925552714702138270432174615681456281207395138648675923805088673576248128554", + "1" + ], + [ + "17888898527740658764022594001864800844538090035873511576233959798427453362794", + "4449542211158129469651423470185378712174194398767928858921019856583223647213", + "1" + ], + [ + "20045125277699696266846838941366419796387023598416158243616434547289594952548", + "4661259934614559518933217558073284269306432739915234318880253258262842506218", + "1" + ], + [ + "19154909735852037119163540897097565494560798157939351124537201596153864792416", + "17732452714941833062987442980719677544934685540478985408939605624275465328677", + "1" + ], + [ + "17751232779768423792888022901987142003023040220845510980132892776503165095996", + "4260923995425364157620360553936020876180238612981181207420145068748974552256", + "1" + ], + [ + "7302887048260639199846134898046558105470692866320472420800549751501367548274", + "12630360085931835927534554531573725955099307079491343313230810193884163820210", + "1" + ], + [ + "4875332498272585441963803581595820868905741158761540955417932851454587933117", + "6211439615231052354153942724966175200320931109735020458108992557732011618484", + "1" + ], + [ + "16089763203753964644426458115814863493533959735145987495394797577660371779720", + "3274857298322295483280602688349252113754159231301518128324889278219143393663", + "1" + ], + [ + "3124700224850015232083191858816829016910466628216369302447011595548237258802", + "6211545510850411799289679129315184082256966531070929064302041985348315781852", + "1" + ], + [ + "9100256133373142600522970945170827300024895368365385952410598820311659854079", + "18931472625744312105267749284139214444738247977241778358567257121234031949890", + "1" + ], + [ + "4820865921572139486584017706337039037032942317781714667446537405456709928031", + "20984312689634782522639931755742814589830831766102678240227594720710939992951", + "1" + ], + [ + "17826729265314130559815673607120669259461033375723859562216591957362172701767", + "9656450386303477582008999738591642900182491260288824022635294015541372887452", + "1" + ], + [ + "4456800013196131522909077566754296829875674053977812233976410533681425295613", + "3617386484384864696589682441482141599176490177544180426955178986570806788396", + "1" + ], + [ + "8316065484758118537296493108328649728700892751559468976402290280101490385437", + "13008930648944145203365144791067477806462683881612830156742470482084975500486", + "1" + ], + [ + "13937763847022024014541489429469083825209246571816482110056051253987980879476", + "11249900962255192056153704520323821400430004362438562670009070378021595605944", + "1" + ], + [ + "961291012917931271971794869739902112966519374624650586935304387301317702705", + "13349888783927927466442403904812987069093423830202583731066070811863033687526", + "1" + ], + [ + "16364087689026751720771602138791637120362829080404696140942877816377965003813", + "2192360571699289581848819998361554142714257753573107526161395541615337679030", + "1" + ], + [ + "19591172000594208781214868889142170019164304217955921920158611358020631903399", + "2253001156575716518162806927072031328458328285656897177505902711488581444021", + "1" + ], + [ + "10061466828278257879940361290216783962552587469381995496504138157136699459619", + "2084654502251231158623389108427596301104410727318658755886485404232265711982", + "1" + ], + [ + "5047358973148378475587152882863946529002727435047293143520502313447860667454", + "4952060746057681841993157379165890143617330651779698944343330359819957302296", + "1" + ], + [ + "11780024181637587712156123131660746967372907787195815446123008021030216990110", + "1724613473875111255233244223782287991056072511766758806549939533259538558045", + "1" + ], + [ + "1361907449707758004430456723094953981409384618036880333726173557019775643123", + "1396307300194695204560153775792215169475712217101611935571551073367694531648", + "1" + ], + [ + "11623342184306533112780079170570912918230864247909273789617899324474502187447", + "10888838535689466717983783465844383570701660389226337994275162849716129999664", + "1" + ], + [ + "6124783859307595499636222170266461198066236620256318858241418939512690846210", + "11654418425708266811153155440004903940468493436695057573773222233855590160231", + "1" + ], + [ + "11976417498514914912750414175456702306843413646040221039062851247088509217878", + "16555983317326734322100010817445636022281238681182715698078945752735647300082", + "1" + ], + [ + "2132125313190147327663404604428015937967047155851912765512275238424484618117", + "21746968555622091392044707814331772598114481548815781646306899891364029178430", + "1" + ], + [ + "12935207606620261789628604340498957543368225283200775348265519430484862923793", + "15626703104241434387356621988285708223335267637606857186773174684307705451642", + "1" + ], + [ + "17010033523085371141858786798982360516022860077151037452736191587131050128276", + "10773475930960370976671258275485863540716938004536607798474086138371887800439", + "1" + ], + [ + "11953520675141112861456601737014076292697795937785251540873001131285555641733", + "15281160025214167048777438284446542765985636029715530693096512672181400583657", + "1" + ], + [ + "16191611928372768299576339789378804174936430974202255667438542462412039935317", + "10355806009882081203497567560039478641028371740146166771772540085951272517633", + "1" + ], + [ + "13799184837682491431697050623208976672331620471264961433710772593685879490265", + "13359020907184889891156731713792728430546725199295472877205419019516125060096", + "1" + ], + [ + "15166675180695060656671114192931173135204014172727306515377989962882871893452", + "21469495051764234787689047584062952852856872883086109009603715799720503193452", + "1" + ], + [ + "3651765441416287945242103931370844520138339909966493423413480413467015123888", + "7789270080491911416202812116444065162144180412391910879286863365872016235583", + "1" + ], + [ + "9600202049493185131597107207545083691083297113245371118516611632160919442458", + "21264894863483302212261067128728119962842029613323286102120857532075491389212", + "1" + ], + [ + "19558450196167284702394446749076871284947618845505633615571339824567490949328", + "15003091635350863434975137286003691251614451433178331490457282250858806379236", + "1" + ], + [ + "7974080208038921702505620890159450010496958876424222220856909763755349899499", + "1490993733172674133484484532886822537582786211388003546436994567905033961902", + "1" + ], + [ + "10635719247768214841315695362439142790482997232412125978040405684710712312400", + "2225569268301799464379696667445579148029329257087947754954366162001566375239", + "1" + ], + [ + "8835545015819348787491111586606461636755408196452145204886190876371477782402", + "14580548763782393071951816523691657226064900482319424809042316763218135644855", + "1" + ], + [ + "6424254513133546301512429464976612945093178636194485487844064189026729666889", + "12849292875964890977495285257163556554043109884182961840889874663936800130466", + "1" + ], + [ + "15525499786586004569901570021307444828439109711657257647726086328147099449431", + "12770594875705854579005867871824286945145011691329082036049263133179917794803", + "1" + ], + [ + "3896247763457437935464890907249105544282402713712968003301876351939786784823", + "19643638561262224847942111729275254325534251894703689644539659166080739661499", + "1" + ], + [ + "18354132189987467714578302656668192579350691639624993566431450159961623264054", + "6293000185060651278673868417589876590883295756250366222554111875335207159973", + "1" + ], + [ + "5589699283237403670721182977967951939878445976017576245404026296832369256552", + "12494647520484999828497808984449357310307875851032425623192077895325795974448", + "1" + ], + [ + "6388379047285030901905705039441268258166525962622990688883635049293616997462", + "15447864842469611723999436313564614057071800245057264003997571804863915634366", + "1" + ], + [ + "8814616582178744295319058691296049438996324760892120615036241919501844537295", + "3374160408836466585827998258035249305307810651635917079919223865560096386646", + "1" + ], + [ + "7604287612196893171677551068979464932837868245229819833423361353136300094264", + "13775885269528921571678193491000591231304961261785105527398627779653659704915", + "1" + ], + [ + "19948639476938281718506786480076898198356207066093853203242510428245812689811", + "9426056835487540894127034608306746577816794810647620352539984396070002226536", + "1" + ], + [ + "10143093369789834877912029466914067131591661377113369331319696217437592083336", + "9968277411034720956194877222804249341905703687110141257703691917617731103583", + "1" + ], + [ + "17992039382193877213326595696208530364369833167341524706992503176643448188232", + "18136499695102421380679057624077607076834318902231369108244751555699125633666", + "1" + ], + [ + "13232047845375834953989655162682827644394585840580566526293075973171593466715", + "2015754000429281072793684822774000652413387514911611871210541282304129770558", + "1" + ], + [ + "166100570821078282370343704430299601262430150499860458071579568572464281209", + "19086852127486564029973662613890947947713600402924609840579680001985748926638", + "1" + ], + [ + "6513669260004143824036564753979062367806481422616596802570283128562187362934", + "10736456432529299366779568971552159399152675321254004827384573912415937895217", + "1" + ], + [ + "13155400753621227950931113657654721391233748466177297217639885025304912434087", + "444344396478820853542987743359220940065401968420184252853371130343799014519", + "1" + ], + [ + "12131655806582516081066449464759929376840771653605274087031207636738251463577", + "12266779625530438157794330297514101634174912354857165363078637505619583810455", + "1" + ], + [ + "6764986963672950835323808001069553024465111331950890365410523298159297335639", + "16220937330960945204787201819238794493105276523102877463807577721995767417537", + "1" + ], + [ + "8063990216773789833512912791991455630597861006168623867000832131275458402261", + "8351035125845670915110620764051882694934177668068329101643061480200604907717", + "1" + ], + [ + "6789512153393624451869226206442608880307144029961476384323548122818220258381", + "9043229831555588707239192803985529489265328620174685834418545584073234981889", + "1" + ], + [ + "21491583690268259335781222616698604845689614783378463668793423699580073388471", + "15703094010019503992721159210223968288467875778774531512984149825855756962585", + "1" + ], + [ + "20827123246869799548408416955014407889526648394485443516613943631081109274048", + "17173207941503994597107244766567415411027390421945245867691218724161106682376", + "1" + ], + [ + "9320748993719286019448174601396836779704852183162977138730187957853927348020", + "20424756982187516845636544614561606329577478841867978692299402905735489709348", + "1" + ], + [ + "10012982625064082254040469110809541544633028062107765794802560244720346048514", + "18558301311946030745640592155701455748932134115506966458088913396337554799324", + "1" + ], + [ + "10913743175234292073765904343402756686355364528643883911330404635018026715819", + "11290133208450880064856811213033875436811615524327032890939067197509649668451", + "1" + ], + [ + "6198115563835388408803809263083583344839892978937261064733866047186745366252", + "16306797999182958223339246724764982676247747592615248702199064066446117003029", + "1" + ], + [ + "15609692914543574488525605840645746677300817734786221483276225148951969144559", + "13537805642029017397787750172030608376639279609956698657405351578866062007258", + "1" + ], + [ + "17070739525940965283226404081715954080473965307087097956690629517178573489062", + "11298123213296432217846683876467583704158108436066356508195201337960691475535", + "1" + ], + [ + "16600455355041582004072389377644758065196764223637201641330820983693795861005", + "1126740767306709865005190677203491503268139482522544594435132252689235491717", + "1" + ], + [ + "1753116852265107094903632058327229006683815666794761835433697948098769262864", + "8256002018709783797080311060726663592396439888158850536409663334392119398521", + "1" + ], + [ + "14884657965467110308388972144424487934644255232428892242266913497559286808507", + "622738664344181694133305021045492345400993764170107699146080161400811806157", + "1" + ], + [ + "17989943802590919009931091079099464407912150301053449713009289191112395717859", + "13041282420842447357244840764204590485504533920831879183594333844589642891977", + "1" + ], + [ + "192442491003421872227827929977546574266233914787330130660879117029033646320", + "21670167474788252545152820163011398118902991779087624805079331156782939512952", + "1" + ], + [ + "10041422758315244736300696757085118391082895778387086584507368456521719238026", + "21222310210641179118127742148444784061602509140181096766819395043330602028596", + "1" + ], + [ + "5543851875217390096510469381047765994901563396923042072330862252406073663794", + "1476090747748713541801698843207451031405834033650082003133878187044190887203", + "1" + ], + [ + "8291694446160146373897488528112129379506832112711958956291496996325621884775", + "14467919249569267794226680266310976624398890567892525364189871054925109182876", + "1" + ], + [ + "21812063088766438062093846739761935933075574048275894010962027164038229757473", + "18033837946878174480681694750679359492742568245307460157094714992707404457074", + "1" + ], + [ + "19216712417020373550036662271959470171068302231304530582343012376954299743330", + "1349718155686218490749306906063347180661384712885015162181225502380770629330", + "1" + ], + [ + "10873927746009381382071960426786537596867668927994136292426029546810096130857", + "9984158610505438655332527797436159506095733282505334473879258094051819908065", + "1" + ], + [ + "7734035772382422048084546768304515004280825164579584807649905656269463976542", + "19708950177200088364210694360551721955995436664446994564732756318074241318137", + "1" + ], + [ + "6091441466259084096630439140497407069926503821696729272150946977033178576290", + "5602307861975531013204189771771176314461875861616031945485501446216898591446", + "1" + ], + [ + "5160463707044082965211712978781139804378530736798569495276722629336717464756", + "12130749952607123014452991731594848635114423945296843348497515314813439921518", + "1" + ], + [ + "17844693616384903614334120596398230344025962402268135306900133104722031267918", + "21405237546258878679957182026232138597306677887831330487539515165118891885313", + "1" + ], + [ + "16880116716587826864491787213636353955669742328738978673088482463797683488683", + "9994023020122347086011351906179677888180649000546896391497932655425200544548", + "1" + ], + [ + "10887060399845665234804945437093859708158958924477759879743547812266346654867", + "8872197666381389952754020856574052992422935928769394416607756770262168860600", + "1" + ], + [ + "8787158013866073513265370590115853255524183486627363368513715174737227446549", + "14766990747206105613587316265931797763703720589561415306451896743302868703337", + "1" + ], + [ + "19046998539840728977643535798111806454043492483481502565256297532294412167331", + "21819132389878454937730783906734651252978027538453753388167102949980850007818", + "1" + ], + [ + "16386119208794143074146095638665725804532756232596350082723530720224992635509", + "15049646259148967654023202479422987538760460166622676104149972419928969221743", + "1" + ], + [ + "4405219439943921001936311283365570462051160270864162862248583572823141798026", + "2307310495650296105801894054497065943783087219339752197458386681627692781852", + "1" + ], + [ + "12516285429529712416736171240914804324337849995166333588105303946756011524553", + "10491517343523507175361072694285643080873509677002365804425144206890972986556", + "1" + ], + [ + "10804801657529282177404662005721720471858331554786904429928102991084092949055", + "2878934095415065761042878308773519179285676976664555056962906347209697544577", + "1" + ], + [ + "793946410887828456261718651135538537091971673386269848897485488386603314157", + "12640244773392023120926435401505718602205726327138739021023234508538502320425", + "1" + ], + [ + "19796634717690831324248254227891456618450693302142547641556738226535938857049", + "13250507115426036046310740781307677517424194019086901246555543131670205866283", + "1" + ], + [ + "13158394955882213600346976629573719101985539784033654160525637213737629373019", + "16351396987993152749566984066234994161032191146991558180912663633632317829206", + "1" + ], + [ + "11800252928443455101045874699471759083826372774272745281380501042174888216442", + "18737298545038323901534166034165597641707734616382286031720201245261274691664", + "1" + ], + [ + "5169741056728483301678774385984576396335900042063534011216726845691515123665", + "10155145243544375314210200906998660002555600232374249664954714854555749308589", + "1" + ], + [ + "949114234514474137609363255485184390664758798525174775376592515281870517381", + "15104863141771812933925053693749650312092271121851484203429739671350017244619", + "1" + ], + [ + "18896730392199816153037288349588671870764112523417216028707915561378869666527", + "1461652854098383653033425669221338224322852733079313162141110039031626371702", + "1" + ], + [ + "17461609855496243591519345398329931796112959472673485623758621395248213545649", + "17283952975077071908227705279911306040333872642639590847336703810020586460672", + "1" + ], + [ + "9903420335405489966303944366339257806188129945542765141639941829192465755600", + "12485676561151323355101974037985693538201905512749185613388970871752551563658", + "1" + ], + [ + "21703984820475630784994316067613878776704672152015114577280252842319383946726", + "10202892030908602947311406416343399100950272115937605568002456744733887200596", + "1" + ], + [ + "4717396269233922610240547576493176976901514357024109652960007971524573901736", + "21656221997648835362457183264089219788998905139985285395013774568995585724550", + "1" + ], + [ + "18475588975787547477978611779015701560296990569369446780243805573132658883231", + "5946343085539193794016728738612360506842769725423206953337530847912724400526", + "1" + ], + [ + "10109751107248895621935203038866936712567700350234523821155507782803834749468", + "135867846373614596069212436384597637465654446853794096345118573603515744887", + "1" + ], + [ + "11692961022466079276684019763802604772837013596214732525187851900744414836249", + "8474537230995430034090208533999568892885554623720166476836254857913034059436", + "1" + ], + [ + "8949451304612201020278088099542419688862030850624656647313723627299210043218", + "7519652086785579500262355022669773682693476241488534968185815002336580322133", + "1" + ], + [ + "1522878117977465501066909740618460740230420075854228282330022812735129664501", + "13614768540955582419869033333700959506325932089993566802856552444443766633894", + "1" + ], + [ + "10513256870547524959651538888055695947794595617156157588817269704813878646613", + "7933370671900304034138414410150999140951607335759189615092555403342633584632", + "1" + ], + [ + "18402528191003124997289671802467121587797622388278484442930799062034855181640", + "5479031030983595329986484425620540485443985898848179006500343618431234021696", + "1" + ], + [ + "18994009937673271752676539245293680611975857778763298443472438910446939875398", + "1186369819572816892720072783889668786132162564092425841234079962714324377511", + "1" + ], + [ + "10475261601786086141743094882282038459195520456658013748446022224794526943460", + "4039165332370131766956365844007145304220949165212574797185904571864826244468", + "1" + ], + [ + "3181963759730463855447182974839334930355592039773276780394041148885395013682", + "2804164191303155869302803539263379597162539835939449566864048257905131330809", + "1" + ], + [ + "6965616643471013864325632719616512563889749904752398162885579523982135399401", + "3338613590412668798704951515461112813003786395122344597128522297013716600552", + "1" + ], + [ + "15599912565238481476126846175853253860988398831044353312007707714142644243825", + "192449097993064609257421284750280394529944423391598406365700556148530563824", + "1" + ], + [ + "6573231078591069461095486773621588452233651399968689014270121413571906607534", + "6532713266750244002000664158100569653260006505663962938387546488058215079310", + "1" + ], + [ + "5518040253128519807312612015748219729945985747863396394664312356202584697696", + "21327345629482707767129884621093463694872920818096153103334653117815063032714", + "1" + ], + [ + "17033866652152067415093413157258059594232599100110374664544055420485823092129", + "199565913900409246908098651556038782567937672219336405664551366775295514345", + "1" + ], + [ + "3668053752916024046516206465843524732960940858690296618068466685812308192065", + "8769686692328802611687831076313275687899219807172291065634037573271872477074", + "1" + ], + [ + "2577963977516712974613516995689959794423472748833991929923741030401699283972", + "370793764845782020152081293482807096972256662288113048776682330253549322582", + "1" + ], + [ + "20441867360187522214009765205537429684193241611136764547280540393558428180819", + "19508296066366561217719382906978518667720813825368979614551906017658533524739", + "1" + ], + [ + "15846185247263489650047261024909253946543903046129162561522851357239661283138", + "12980716163693821551483520709688781841577125867021537632547157893421007230035", + "1" + ], + [ + "6175636684474006093352375161340649232701606809069087990786721048502271842998", + "21339728590386072352316913074373412795763178904729008925382269521979603309117", + "1" + ], + [ + "17313174633822395887507643347447763686631913265768594034035976077818265967461", + "6249942114028217668449411164382819253202970898934684184757125104639479662464", + "1" + ], + [ + "12807476885679045137426042558739216961912084155391140549198953173361259664742", + "10859597670065873316032077577760708084318795319104692569119441085266914696661", + "1" + ], + [ + "5554308491520084573769146584175194543995615417451200011045647070779058502636", + "2471440486399629587302183373227599443866455136483254907577625326648989545393", + "1" + ], + [ + "13977911877043849979990613457991088709770369104434083974800189429284674744693", + "2454383579725594281354695885880954082133619410929877773600260501635363991687", + "1" + ], + [ + "12356606381388573644095672728363883749284120766073280555303746053144143199501", + "2397977491492258591243782271884368509388038882649945071355074823337269057931", + "1" + ] + ] + }, + "publicSignals": [ + "4921885917342660843738002621937112793015940690426645586772639296826111401983", + "21261607642507108522447592138204520525139460375283053938336463536684467328373", + "17599947460442229616341982623735488140117813100856773555040605538491646725702", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "5299619240641551281634865583518297030282874472190772894086521144482721001553", + "10031262171927540148667355526369034398030886437092045105752248699557385197826", + "2763488322167937039616325905516046217694264098671987087929565332380420898366", + "12252886604826192316928789929706397349846234911198931249025449955069330867144", + "11480966271046430430613841218147196773252373073876138147006741179837832100836", + "10483991165196995731760716870725509190315033255344071753161464961897900552628", + "20092560661213339045022877747484245238324772779820628739268223482659246842641", + "7582035475627193640797276505418002166691739036475590846121162698650004832581", + "4705897243203718691035604313913899717760209962238015362153877735592901317263", + "153240920024090527149238595127650983736082984617707450012091413752625486998", + "21605515851820432880964235241069234202284600780825340516808373216881770219365", + "13745444942333935831105476262872495530232646590228527111681360848540626474828", + "2645068156583085050795409844793952496341966587935372213947442411891928926825", + "6271573312546148160329629673815240458676221818610765478794395550121752710497", + "5958787406588418500595239545974275039455545059833263445973445578199987122248", + "20535751008137662458650892643857854177364093782887716696778361156345824450120", + "13563836234767289570509776815239138700227815546336980653685219619269419222465", + "4275129684793209100908617629232873490659349646726316579174764020734442970715", + "3580683066894261344342868744595701371983032382764484483883828834921866692509", + "18524760469487540272086982072248352918977679699605098074565248706868593560314", + "2154427024935329939176171989152776024124432978019445096214692532430076957041", + "1816241298058861911502288220962217652587610581887494755882131860274208736174", + "3639172054127297921474498814936207970655189294143443965871382146718894049550", + "18153584759852955321993060909315686508515263790058719796143606868729795593935", + "5176949692172562547530994773011440485202239217591064534480919561343940681001", + "11782448596564923920273443067279224661023825032511758933679941945201390953176", + "15115414180166661582657433168409397583403678199440414913931998371087153331677", + "16103312053732777198770385592612569441925896554538398460782269366791789650450", + "15634573854256261552526691928934487981718036067957117047207941471691510256035", + "13522014300368527857124448028007017231620180728959917395934408529470498717410", + "8849597151384761754662432349647792181832839105149516511288109154560963346222", + "17637772869292411350162712206160621391799277598172371975548617963057997942415", + "17865442088336706777255824955874511043418354156735081989302076911109600783679", + "9625567289404330771610619170659567384620399410607101202415837683782273761636", + "19373814649267709158886884269995697909895888146244662021464982318704042596931", + "7390138716282455928406931122298680964008854655730225979945397780138931089133", + "15569307001644077118414951158570484655582938985123060674676216828593082531204", + "5574029269435346901610253460831153754705524733306961972891617297155450271275", + "19413618616187267723274700502268217266196958882113475472385469940329254284367", + "4150841881477820062321117353525461148695942145446006780376429869296310489891", + "13006218950937475527552755960714370451146844872354184015492231133933291271706", + "2756817265436308373152970980469407708639447434621224209076647801443201833641", + "20753332016692298037070725519498706856018536650957009186217190802393636394798", + "18677353525295848510782679969108302659301585542508993181681541803916576179951", + "14183023947711168902945925525637889799656706942453336661550553836881551350544", + "9918129980499720075312297335985446199040718987227835782934042132813716932162", + "13387158171306569181335774436711419178064369889548869994718755907103728849628", + "6746289764529063117757275978151137209280572017166985325039920625187571527186", + "17386594504742987867709199123940407114622143705013582123660965311449576087929", + "11393356614877405198783044711998043631351342484007264997044462092350229714918", + "16257260290674454725761605597495173678803471245971702030005143987297548407836", + "3673082978401597800140653084819666873666278094336864183112751111018951461681", + "736212446986704331278146362657650247202907660782947885814291844133340411032", + "16517824248241472072944092138332623410108049872601405416057412251943805743785", + "4518711524764360485856980110407164729020529135999972186406243993984322181650", + "9962511482817190501788313233925153558480477216987652852088868718857440943808", + "14733459904409984890142093046366571715192696030936965303296988249646704423036", + "6316621038469642350637344139396449458809920881019020744748964454899905482402", + "9669291980969953353228280197481625009130594510833410900641074102101637637687", + "5759874799612631305793264054291594090925072893659148667434776061141219373463", + "13781489195776262609847752098489873768735779321537143304177896980328523728727", + "19251785832639747302837563946788072505826237755778909101872469824466460652125", + "16076385235130849955106507177006197736526030983655568136098598444575210032293", + "12966754235999024568250038155685110676946956068632613302007416209510689996368", + "4087720003135030019578551832213142664205437348054220908165501608652893203979", + "2639705258769841387500316071789582442516093953549666491677448239807115345904", + "7876544534348234631577982941150227398127474451148224334784708302592498648067", + "12503791120251273156517545596775599551671142679049101821748967355956348442178", + "15745445936440833412179415041667093407924630987684285407153935156639198278926", + "9739093732388709916589489792217921002087097661374674818009112541100089632202", + "12300567166916988913766938314694134970994160906803643544290130496666571616575", + "13910718128967827014198878465284349248346073258647078624728553015724892653080", + "7818992888484880911960558083526482519880212812645471605791184232854701540071", + "19986531483458480386188403442914604037265507729781492247191146158834242493241", + "14671685299934679193080624450255679273257531227048240815133744130364292410882", + "13079202030995344615983563938626311951825588790663801846260800748997240981548", + "21412344756517506752458018137757739493841079291913811532995331080522918750697", + "835300315915541799691587507314797107331158925062791001122307545346611716027", + "13876519117656826605168649063180116302013229921197296304244276026090993559105", + "13012346028411252896886768382578227901580694179572550563124737113439527723539", + "3911591956829347176332497391052069201935520703734949746530610585546460403791", + "1341331118831793344636179882213517748807345935172389091142507177194119169638", + "4238051128878512055748542846020677237175344837374977629642958575060268018657", + "13447765684101984389017194669670199698893322475944278991563521146295005844401", + "14451447395639692225666032484733806111369892158400851928444890809767279809701", + "17363143602043227364396312161967266195859999417422874660381001574415802463441", + "709842473706995854971302691542052092414527307493601142155262747358406487546", + "14867610441396873299709093847871148164473951626100884744446363440872373540386", + "13800678139747086334987215419950007676145062517588605672251337891718922565746", + "19170975915637119738360472641452332211430612468235090053160529874388865727159", + "6369309439422024668127254023176422403756078474323347398789299262434345555970", + "18904689901772143239694131967115602596655151684695735626886803772832096194451", + "12572584449637279590381427087333110761131014821758764028091301456403196779796", + "3943055358030372806804159541025485475458617840431086042361916627207407336196", + "15959325165161554274918719465981393095761852818369817088121171342531131821532", + "9204576893316418520100836506242153815455084664197611125163419260276964657176", + "9346940928046552656302150890730326328656445688809876804482434215043133131366", + "8885515852535215557821886912615911914053382334176846761946930599432443141395", + "1832759868929470091935632315312402374458732607216986662795216574868045553039", + "18528277189415683915588814874921535695403668438699664532865973903424429567710", + "3482826982195121662382819726961028097938427071340726960223945841259048957962", + "15215534137208561134049778977638104262625437005687061992395173919709770121915", + "12338332598539284701875187257923823600067367466058826069253040235999676234767", + "5307504943687751939606483737914734720729393479269615740448421659407140902990", + "4745734913896348052936157090898521344745736387310715004573242115449775272600", + "19906849623299475177757790767976408256539345041070138261274370206863410146621", + "3359666491897522255593284845357629481601338337350109887398117759337760795741", + "19701887863158509224799544661554048307485853374029260027373168824034106023475", + "13899676625482977718396179117054057592829621646488700805495649140637652258522", + "19960527545677733378247437102781451102938224576727390214366264564133210921147", + "18572303892543172978834159272580170204433143439021770546548165345100868429356", + "16207191776796282289999328912784762739346621052131751509813325662097576616433", + "13431003344744468738215574280722288377980835601614693584079191720494517875860", + "13873435958363880374315404713191169188615794421152931155250288810301059329844", + "11941692286571729548033968928628043030899156233971184355573655323945855818236", + "12485806210539760744006391011797865860653761766948359304784245575108782808874", + "17870099873917713685920726876947275648713535623357451551086154746349625815037", + "15012351417145301858784357460406375271644941285571488282651937474154300393147", + "12104871144053937484288412957763034456721357334887153328111060504649885302652", + "5741710080131459899851721385228924984866211443664310842543531382203684476918", + "2525822650242653327525172273883266657723710261250241739219562957779998177732", + "6545038722710516192810027734753392394876824370947659734738744657692974883398", + "9702167690056675275351992870629536109180248623870464663458579168709618933841", + "13855877630293324794742111122139641078112021737801601605317066189193864958261", + "1373619324314354576445907502675139023485303067377750828836770718558907363139", + "18341835927639062326292794183231332541934285209047555142866072337927280513979", + "6331110056691185560276602946789639332190180720392686843499567497185118883541", + "11565465868896302736306270972734466080126050282058501499331983957917973669379", + "12347981137004546678484061094269369580638050134692913457863113148782069296249", + "19973635860690570294856963932213698576564047975964979169206216376815878412307", + "11715391159936532437327165702589281070533741897431890913407410088276959884038", + "13390150248960875109784047600009614824305145071701585189816938194674004179543", + "9822722315394636763580572671404092108221961343151980779987204458932171932250", + "1189003413989017685779701838436444347761772722322864790087101835471528375115", + "15848025688573934671122177617050432855123862210076390461061474032558835428464", + "10271981257801891400060427103267589745651586256949111020178391531081788167110", + "1806486740721525460645333901450151845413092931175234502404802743661995952252", + "17394701214719432675827759524213165416325746036526383554675148317840849760658", + "7124558020580034164221673177996616184359144157998182430880484627603671417711", + "5277722644780556109765146177077739620209154000801294528222139679354341850050", + "6892451065878164268748152647690594018284819468205113465431132854397220161099", + "19509741189806631426129567283932592782581853298922001829710592591503536583450", + "12706631626170693731338588923858301027351480188503556995876160693653831379868", + "6179481752557416358401368319302646110356623544832665771673666099707327731683", + "12292394862503195136554299003525389396788760822597355390260672285850779594351", + "8017480453004738578100023027636565536467660790875289072222590151791248509395", + "4614138675526542100153049475403217791213731874290358255744057061096271645362", + "2405486323482170810616170412277735220680890910435194950554611276044464446865", + "3308948109692115297784467638031317997083224370848547477294331048057734692120", + "17667776535408020394240908323979607617089679564647230448239283238832455141942", + "5832439657203003677705453645586539331277791359365582068364394335773333793849", + "21465646073344952243839181111918746834952026006506674060902870289145015222015", + "17080647097287375394360612291134419871059071687397652649993803150814872567123", + "1284237451193591964091161346675088584144841939228489902430096594147337990027", + "15467964021109597766346059169561005392229366287008846337198439440089334015600", + "21495834026372483998420493206728432168630345430840942830099522710524554484739", + "4503599627370495", + "3075935501959818", + "1075738651225283", + "4171051977253004" + ], + "proof": { + "pi_a": [ + "11146830427774146572768907612957090615437997839228955028597419408343305460577", + "15850672614844376315606799952482055015454025562151945191926779571308416700204", + "1" + ], + "pi_b": [ + [ + "13878892046703756257879567971628268849178012664006221711426768258997798617042", + "9354103251172981718697227720075114809407541840827776697457923882938352451325" + ], + [ + "10224816615626181889929512083643324761346325021157165680749005861879228387618", + "18601125435911478633065562524073661606318249795337044934546868445780548633312" + ], + ["1", "0"] + ], + "pi_c": [ + "8876062712271494796929184354102192626564811635625707723375484748518334185067", + "21441746192318950366545515644630971664057074184137968406404588700594644489949", + "1" + ], + "protocol": "groth16", + "curve": "bn128" + }, + "compressedDeck": "{\"X0\":[\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\"],\"X1\":[\"5299619240641551281634865583518297030282874472190772894086521144482721001553\",\"10031262171927540148667355526369034398030886437092045105752248699557385197826\",\"2763488322167937039616325905516046217694264098671987087929565332380420898366\",\"12252886604826192316928789929706397349846234911198931249025449955069330867144\",\"11480966271046430430613841218147196773252373073876138147006741179837832100836\",\"10483991165196995731760716870725509190315033255344071753161464961897900552628\",\"20092560661213339045022877747484245238324772779820628739268223482659246842641\",\"7582035475627193640797276505418002166691739036475590846121162698650004832581\",\"4705897243203718691035604313913899717760209962238015362153877735592901317263\",\"153240920024090527149238595127650983736082984617707450012091413752625486998\",\"21605515851820432880964235241069234202284600780825340516808373216881770219365\",\"13745444942333935831105476262872495530232646590228527111681360848540626474828\",\"2645068156583085050795409844793952496341966587935372213947442411891928926825\",\"6271573312546148160329629673815240458676221818610765478794395550121752710497\",\"5958787406588418500595239545974275039455545059833263445973445578199987122248\",\"20535751008137662458650892643857854177364093782887716696778361156345824450120\",\"13563836234767289570509776815239138700227815546336980653685219619269419222465\",\"4275129684793209100908617629232873490659349646726316579174764020734442970715\",\"3580683066894261344342868744595701371983032382764484483883828834921866692509\",\"18524760469487540272086982072248352918977679699605098074565248706868593560314\",\"2154427024935329939176171989152776024124432978019445096214692532430076957041\",\"1816241298058861911502288220962217652587610581887494755882131860274208736174\",\"3639172054127297921474498814936207970655189294143443965871382146718894049550\",\"18153584759852955321993060909315686508515263790058719796143606868729795593935\",\"5176949692172562547530994773011440485202239217591064534480919561343940681001\",\"11782448596564923920273443067279224661023825032511758933679941945201390953176\",\"15115414180166661582657433168409397583403678199440414913931998371087153331677\",\"16103312053732777198770385592612569441925896554538398460782269366791789650450\",\"15634573854256261552526691928934487981718036067957117047207941471691510256035\",\"13522014300368527857124448028007017231620180728959917395934408529470498717410\",\"8849597151384761754662432349647792181832839105149516511288109154560963346222\",\"17637772869292411350162712206160621391799277598172371975548617963057997942415\",\"17865442088336706777255824955874511043418354156735081989302076911109600783679\",\"9625567289404330771610619170659567384620399410607101202415837683782273761636\",\"19373814649267709158886884269995697909895888146244662021464982318704042596931\",\"7390138716282455928406931122298680964008854655730225979945397780138931089133\",\"15569307001644077118414951158570484655582938985123060674676216828593082531204\",\"5574029269435346901610253460831153754705524733306961972891617297155450271275\",\"19413618616187267723274700502268217266196958882113475472385469940329254284367\",\"4150841881477820062321117353525461148695942145446006780376429869296310489891\",\"13006218950937475527552755960714370451146844872354184015492231133933291271706\",\"2756817265436308373152970980469407708639447434621224209076647801443201833641\",\"20753332016692298037070725519498706856018536650957009186217190802393636394798\",\"18677353525295848510782679969108302659301585542508993181681541803916576179951\",\"14183023947711168902945925525637889799656706942453336661550553836881551350544\",\"9918129980499720075312297335985446199040718987227835782934042132813716932162\",\"13387158171306569181335774436711419178064369889548869994718755907103728849628\",\"6746289764529063117757275978151137209280572017166985325039920625187571527186\",\"17386594504742987867709199123940407114622143705013582123660965311449576087929\",\"11393356614877405198783044711998043631351342484007264997044462092350229714918\",\"16257260290674454725761605597495173678803471245971702030005143987297548407836\",\"3673082978401597800140653084819666873666278094336864183112751111018951461681\"],\"delta0\":[\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\"],\"delta1\":[\"4938092073378617504287780177435440538246701238791326556475388250393169527414\",\"633281375905621697187330766174974863687049529291089048651929454608812697683\",\"6583047121802969561025880096295961778067318139601536671455007094277257986924\",\"1286140751908834028607023759717162073146610688084909004843365841635476459484\",\"6740006823707320504443610344832188720541587539556261644919615011258442802071\",\"5065343680376018450432681522542267582550559652310349265802212799859034137386\",\"9775792829712081776056828193249571248730121672513596551862789671728011407584\",\"7801528930831391612913542953849263092120765287178679640990215688947513841260\",\"10354333870838979644427548704574780595112240348520470723721790627015824137913\",\"4020276081434545615309760015178511782232038136121596626881988383789905359767\",\"3031782010307333101386697696579671337254133210226810186414764311613397686912\",\"9295007403424306472004319856786240047486234807746621332889450269586287287386\",\"3167219386551830601710531912158200788416092396057521996747320092416885283728\",\"1159109009398293366325834025851435536976160917502780725078241639933756395400\",\"6291453822075498887551694851992571215511219854100590306020486222643399599966\",\"429053640460579713930242286896918559326163145795709298973224211241160425466\",\"2629575910813408086153002675063923434793310744376651062446262826088575970512\",\"2901984426527978511938092449840343247205863744551873848575162156827816429865\",\"6918212584205576958059261645271816567382587777713550581071466583524878654686\",\"63209685112844884226498616707315168409908190543259286911096979264249986403\",\"8780053014893496925889135599970964835695395582986088975519092855075897103419\",\"5771669854730376088576991256573818902508309562815446919078291249820193739791\",\"2416637591957458718430134631388075202491702765087076870228856838292966232349\",\"6508671331239705069506722850208743045976028031090591091395110337207569614260\",\"5803031851969795418782275831922003499027246088319476839321135880221559389654\",\"2949749340888887698435542271981693653388638616771028158148296305791338631044\",\"4842818600754654798472481299147591971849857464336012261446671762244489168840\",\"328909361979136960440078492852035602938498378804431818112406700974297398558\",\"10538923696728517507941174768824759320449361863603445720556444774508628562401\",\"4099351870054658681185193597290436890752521720312351723907857017264375601146\",\"2978060325513750693467720525275156200415154982086443933398150094661971741561\",\"2246916146795399422343001757913296934857415216075532253085710349182362883316\",\"5875978578285824973052620679253637942275403728008896081217906963013632419755\",\"6104922349389051232116167368956854133643674807359877281630583273469243896267\",\"984473751802547681194080132362959982724208070239598152833290798336191216788\",\"2985072679650251421973196604842749325662294145169461442003248656128424029972\",\"10649025338311527522250571473756680507496817734556109453122679172923443655926\",\"1827072411321850197835791987640419160256677297994013443180707903572007121044\",\"7686444298039946719410178523269761710834905042807089802561702174930997566735\",\"5763705637872337439352710805259164635969226977379597043443481576350787387174\",\"6280879501036083272351902290737274476372607549014969018565544091415385462750\",\"5473453713133129187908727798537135912918781956208379257953252723823815404389\",\"7870889370474934069210756140130118230952037969542869026332032190368575018928\",\"7911170882463838966016769159686625190699034088894092943403755305413242814577\",\"7011598426151794260136708291777745591601616496310244173266671768799023563701\",\"3891025713248420418653430550140713094878447409505062217795007971789182391292\",\"381287055196763548850501773322925176584037385176401011880552333807742959064\",\"1131369846817699207467818622880768934338418324444440514270575019143804497556\",\"3774655706895745473532998563215522571342165183379444102894279165055818681698\",\"1631837355907549512185575692623734065168076198409170995312890152453556756195\",\"2563802426344836917443213550331186529439687262555190320288266791215691048406\",\"10697893536345518169195506678379072491856429121764117391188549778575809310354\"],\"selector\":[\"4503599627370495\",\"3075935501959818\"]}" +} diff --git a/contracts/zk-shuffle/scripts/test_all_proofs.sh b/contracts/zk-shuffle/scripts/test_all_proofs.sh new file mode 100755 index 00000000..39fc3a9d --- /dev/null +++ b/contracts/zk-shuffle/scripts/test_all_proofs.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# zkShuffle Contract - Test All Execute Methods +# This script runs all proof verification tests in sequence + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +echo "========================================" +echo " zkShuffle Contract - Execute Methods Test Suite" +echo "========================================" +echo "" + +# Test 1: VerifyShuffleProof +echo ">>> Test 1: VerifyShuffleProof" +echo "========================================" +if bash "$SCRIPT_DIR/test_verify_shuffle_proof.sh"; then + echo "" + echo "✓ VerifyShuffleProof test PASSED" + echo "" +else + echo "" + echo "✗ VerifyShuffleProof test FAILED" + echo "" + exit 1 +fi + +# Wait between tests +sleep 3 + +# Test 2: VerifyDecryptProof +echo ">>> Test 2: VerifyDecryptProof" +echo "========================================" +if bash "$SCRIPT_DIR/test_verify_decrypt_proof.sh"; then + echo "" + echo "✓ VerifyDecryptProof test PASSED" + echo "" +else + echo "" + echo "✗ VerifyDecryptProof test FAILED" + echo "" + exit 1 +fi + +# Summary +echo "========================================" +echo " All Tests PASSED!" +echo "========================================" +echo "" +echo "Summary:" +echo " ✓ VerifyShuffleProof - Shuffle encryption proof verification" +echo " ✓ VerifyDecryptProof - Card decryption proof verification" +echo "" diff --git a/contracts/zk-shuffle/scripts/test_verify_decrypt_proof.sh b/contracts/zk-shuffle/scripts/test_verify_decrypt_proof.sh new file mode 100755 index 00000000..fbde91f5 --- /dev/null +++ b/contracts/zk-shuffle/scripts/test_verify_decrypt_proof.sh @@ -0,0 +1,146 @@ +#!/bin/bash + +# zkShuffle Contract - Test VerifyDecryptProof Execute Method +# This script tests the VerifyDecryptProof execute method with proof data from data/decrypt.json + +set -e + +# Source environment variables +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" + +if [ -f "$PROJECT_ROOT/.env.local" ]; then + source "$PROJECT_ROOT/.env.local" +else + echo "Error: .env.local file not found at $PROJECT_ROOT/.env.local" + exit 1 +fi + +# Configuration +CONTRACT_ADDRESS="${CONTRACT_ADDRESS:-$NEXT_PUBLIC_CONTRACT_ADDRESS}" +RPC_URL="${RPC_URL:-$NEXT_PUBLIC_RPC_URL}" +CHAIN_ID="${CHAIN_ID:-xion-testnet-2}" +FROM_ACCOUNT="${FROM_ACCOUNT:-$WALLET1}" + +# Validate required environment variables +required_vars=("CONTRACT_ADDRESS" "RPC_URL" "CHAIN_ID" "FROM_ACCOUNT") +for var in "${required_vars[@]}"; do + if [ -z "${!var}" ]; then + echo "Error: Required environment variable $var is not set" + exit 1 + fi +done + +echo "=== zkShuffle VerifyDecryptProof Test ===" +echo "Contract: $CONTRACT_ADDRESS" +echo "RPC: $RPC_URL" +echo "Chain ID: $CHAIN_ID" +echo "From: $FROM_ACCOUNT" +echo "" + +# Check if jq is installed +if ! command -v jq &> /dev/null; then + echo "Error: jq is required but not installed. Please install jq." + exit 1 +fi + +# Check if proof data file exists +PROOF_FILE="$SCRIPT_DIR/data/decrypt.json" +if [ ! -f "$PROOF_FILE" ]; then + echo "Error: Proof data file not found at $PROOF_FILE" + exit 1 +fi + +echo "Loading proof data from $PROOF_FILE..." + +# Parse proof data from decrypt.json +# The proof structure has: +# - pi_a: [x, y, "1"] +# - pi_b: [[x0, y0], [x1, y1], ["1", "0"]] +# - pi_c: [x, y, "1"] + +# Read the file and extract values +PROOF_DATA=$(cat "$PROOF_FILE") + +# Extract pi_a (first 2 elements, skip the "1") +PI_A_0=$(echo "$PROOF_DATA" | jq -r '.proof.pi_a[0]') +PI_A_1=$(echo "$PROOF_DATA" | jq -r '.proof.pi_a[1]') + +# Extract pi_b (2x2 array, skip the last ["1", "0"]) +PI_B_0_0=$(echo "$PROOF_DATA" | jq -r '.proof.pi_b[0][0]') +PI_B_0_1=$(echo "$PROOF_DATA" | jq -r '.proof.pi_b[0][1]') +PI_B_1_0=$(echo "$PROOF_DATA" | jq -r '.proof.pi_b[1][0]') +PI_B_1_1=$(echo "$PROOF_DATA" | jq -r '.proof.pi_b[1][1]') + +# Extract pi_c (first 2 elements, skip the "1") +PI_C_0=$(echo "$PROOF_DATA" | jq -r '.proof.pi_c[0]') +PI_C_1=$(echo "$PROOF_DATA" | jq -r '.proof.pi_c[1]') + +# Extract public signals +PUBLIC_INPUTS_COUNT=$(echo "$PROOF_DATA" | jq -r '.publicSignals | length') +echo "Found $PUBLIC_INPUTS_COUNT public inputs" + +# Build public inputs array as JSON string +PUBLIC_INPUTS=$(echo "$PROOF_DATA" | jq -c '.publicSignals | map(tostring)') + +echo "Proof data loaded successfully" +echo "Building execute message..." +echo "" + +# Build the verify_decrypt_proof message +# Format: {"verify_decrypt_proof": {"proof": {...}, "public_inputs": [...]}} +EXECUTE_MSG=$(jq -n \ + --argjson pi_a "[\"$PI_A_0\", \"$PI_A_1\"]" \ + --argjson pi_b "[[\"$PI_B_0_0\", \"$PI_B_0_1\"], [\"$PI_B_1_0\", \"$PI_B_1_1\"]]" \ + --argjson pi_c "[\"$PI_C_0\", \"$PI_C_1\"]" \ + --argjson public_inputs "$PUBLIC_INPUTS" \ + '{ + verify_decrypt_proof: { + proof: { + a: $pi_a, + b: $pi_b, + c: $pi_c + }, + public_inputs: $public_inputs + } + }') + +echo "Execute Message:" +echo "$EXECUTE_MSG" | jq '.' +echo "" + +# Execute the transaction +echo "Executing VerifyDecryptProof transaction..." +echo "---" + +xiond tx wasm execute "$CONTRACT_ADDRESS" "$EXECUTE_MSG" \ + --from "$FROM_ACCOUNT" \ + --gas-prices 0.025uxion \ + --gas auto \ + --gas-adjustment 1.3 \ + -y \ + --node "$RPC_URL" \ + --chain-id "$CHAIN_ID" + +TX_RESULT=$? + +echo "" +echo "---" + +if [ $TX_RESULT -eq 0 ]; then + echo "✓ VerifyDecryptProof transaction executed successfully!" + echo "Sleeping for 10 seconds before querying contract state" + sleep 10 + # Query verification count + echo "" + echo "Querying verification count..." + QUERY_MSG='{"verification_count": {}}' + + xiond query wasm contract-state smart "$CONTRACT_ADDRESS" "$QUERY_MSG" \ + --node "$RPC_URL" \ + --output json | jq '.' +else + echo "✗ VerifyDecryptProof transaction failed" + echo "Please check the error messages above" + exit 1 +fi diff --git a/contracts/zk-shuffle/scripts/test_verify_shuffle_proof.sh b/contracts/zk-shuffle/scripts/test_verify_shuffle_proof.sh new file mode 100755 index 00000000..83d1ee12 --- /dev/null +++ b/contracts/zk-shuffle/scripts/test_verify_shuffle_proof.sh @@ -0,0 +1,147 @@ +#!/bin/bash + +# zkShuffle Contract - Test VerifyShuffleProof Execute Method +# This script tests the VerifyShuffleProof execute method with proof data from data/shuffle_encrypt.json + +set -e + +# Source environment variables +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" + +if [ -f "$PROJECT_ROOT/.env.local" ]; then + source "$PROJECT_ROOT/.env.local" +else + echo "Error: .env.local file not found at $PROJECT_ROOT/.env.local" + exit 1 +fi + +# Configuration +CONTRACT_ADDRESS="${CONTRACT_ADDRESS:-$NEXT_PUBLIC_CONTRACT_ADDRESS}" +RPC_URL="${RPC_URL:-$NEXT_PUBLIC_RPC_URL}" +CHAIN_ID="${CHAIN_ID:-xion-testnet-2}" +FROM_ACCOUNT="${FROM_ACCOUNT:-$WALLET1}" + +# Validate required environment variables +required_vars=("CONTRACT_ADDRESS" "RPC_URL" "CHAIN_ID" "FROM_ACCOUNT") +for var in "${required_vars[@]}"; do + if [ -z "${!var}" ]; then + echo "Error: Required environment variable $var is not set" + exit 1 + fi +done + +echo "=== zkShuffle VerifyShuffleProof Test ===" +echo "Contract: $CONTRACT_ADDRESS" +echo "RPC: $RPC_URL" +echo "Chain ID: $CHAIN_ID" +echo "From: $FROM_ACCOUNT" +echo "" + +# Check if jq is installed +if ! command -v jq &> /dev/null; then + echo "Error: jq is required but not installed. Please install jq." + exit 1 +fi + +# Check if proof data file exists +PROOF_FILE="$SCRIPT_DIR/data/shuffle_encrypt.json" +if [ ! -f "$PROOF_FILE" ]; then + echo "Error: Proof data file not found at $PROOF_FILE" + exit 1 +fi + +echo "Loading proof data from $PROOF_FILE..." + +# Parse proof data from shuffle_encrypt.json +# The proof structure has: +# - pi_a: [x, y, "1"] +# - pi_b: [[x0, y0], [x1, y1], ["1", "0"]] +# - pi_c: [x, y, "1"] + +# Read the file and extract values +PROOF_DATA=$(cat "$PROOF_FILE") + +# Extract pi_a (first 2 elements, skip the "1") +PI_A_0=$(echo "$PROOF_DATA" | jq -r '.proof.pi_a[0]') +PI_A_1=$(echo "$PROOF_DATA" | jq -r '.proof.pi_a[1]') + +# Extract pi_b (2x2 array, skip the last ["1", "0"]) +PI_B_0_0=$(echo "$PROOF_DATA" | jq -r '.proof.pi_b[0][0]') +PI_B_0_1=$(echo "$PROOF_DATA" | jq -r '.proof.pi_b[0][1]') +PI_B_1_0=$(echo "$PROOF_DATA" | jq -r '.proof.pi_b[1][0]') +PI_B_1_1=$(echo "$PROOF_DATA" | jq -r '.proof.pi_b[1][1]') + +# Extract pi_c (first 2 elements, skip the "1") +PI_C_0=$(echo "$PROOF_DATA" | jq -r '.proof.pi_c[0]') +PI_C_1=$(echo "$PROOF_DATA" | jq -r '.proof.pi_c[1]') + +# Extract public signals +PUBLIC_INPUTS_COUNT=$(echo "$PROOF_DATA" | jq -r '.publicSignals | length') +echo "Found $PUBLIC_INPUTS_COUNT public inputs" + +# Build public inputs array as JSON string +PUBLIC_INPUTS=$(echo "$PROOF_DATA" | jq -c '.publicSignals | map(tostring)') + +echo "Proof data loaded successfully" +echo "Building execute message..." +echo "" + +# Build the verify_shuffle_proof message +# Format: {"verify_shuffle_proof": {"proof": {...}, "public_inputs": [...]}} +EXECUTE_MSG=$(jq -n \ + --argjson pi_a "[\"$PI_A_0\", \"$PI_A_1\"]" \ + --argjson pi_b "[[\"$PI_B_0_0\", \"$PI_B_0_1\"], [\"$PI_B_1_0\", \"$PI_B_1_1\"]]" \ + --argjson pi_c "[\"$PI_C_0\", \"$PI_C_1\"]" \ + --argjson public_inputs "$PUBLIC_INPUTS" \ + '{ + verify_shuffle_proof: { + proof: { + a: $pi_a, + b: $pi_b, + c: $pi_c + }, + public_inputs: $public_inputs + } + }') + +echo "Execute Message:" +echo "$EXECUTE_MSG" | jq '.' +echo "" + +# Execute the transaction +echo "Executing VerifyShuffleProof transaction..." +echo "---" + +xiond tx wasm execute "$CONTRACT_ADDRESS" "$EXECUTE_MSG" \ + --from "$FROM_ACCOUNT" \ + --gas-prices 0.025uxion \ + --gas auto \ + --gas-adjustment 1.3 \ + -y \ + --node "$RPC_URL" \ + --chain-id "$CHAIN_ID" + +TX_RESULT=$? + +echo "" +echo "---" + +if [ $TX_RESULT -eq 0 ]; then + echo "✓ VerifyShuffleProof transaction executed successfully!" + echo "Sleeping for 10 seconds before querying" + sleep 10 + # Query verification count + echo "" + echo "Querying verification count..." + QUERY_MSG='{"verification_count": {}}' + + + xiond query wasm contract-state smart "$CONTRACT_ADDRESS" "$QUERY_MSG" \ + --node "$RPC_URL" \ + --output json | jq '.' +else + echo "✗ VerifyShuffleProof transaction failed" + echo "Please check the error messages above" + exit 1 +fi diff --git a/contracts/zk-shuffle/src/contract.rs b/contracts/zk-shuffle/src/contract.rs new file mode 100644 index 00000000..4026b7f5 --- /dev/null +++ b/contracts/zk-shuffle/src/contract.rs @@ -0,0 +1,115 @@ +//! Minimal zkShuffle contract for testing proof verification at XION module level + +#[cfg(not(feature = "library"))] +use cosmwasm_std::entry_point; +use cosmwasm_std::{ + to_json_binary, Addr, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, +}; + +use crate::error::ContractError; +use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg, VerificationCountResponse}; +use crate::state::{VerificationState, VERIFICATION_STATE}; +use crate::types::Groth16Proof; +use crate::zkshuffle::{verify_decrypt_proof, verify_shuffle_proof}; + +const CONTRACT_NAME: &str = "crates.io:zk-shuffle"; +const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn instantiate( + deps: DepsMut, + _env: Env, + _info: MessageInfo, + _msg: InstantiateMsg, +) -> Result { + let state = VerificationState::new(); + VERIFICATION_STATE.save(deps.storage, &state)?; + + Ok(Response::new().add_attribute("action", "instantiate")) +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn execute( + deps: DepsMut, + _env: Env, + _info: MessageInfo, + msg: ExecuteMsg, +) -> Result { + match msg { + ExecuteMsg::VerifyShuffleProof { + proof, + public_inputs, + } => execute_verify_shuffle_proof(deps, proof, public_inputs), + ExecuteMsg::VerifyDecryptProof { + proof, + public_inputs, + } => execute_verify_decrypt_proof(deps, proof, public_inputs), + } +} + +fn execute_verify_shuffle_proof( + deps: DepsMut, + proof: Groth16Proof, + public_inputs: Vec, +) -> Result { + let proof_tuple = (proof.a, proof.b, proof.c); + let verifier_name = "shuffle_encrypt"; + let verified = + verify_shuffle_proof(deps.as_ref(), &proof_tuple, &public_inputs, verifier_name)?; + + if !verified { + return Err(ContractError::InvalidProof); + } + let mut state = VERIFICATION_STATE.load(deps.storage)?; + state.shuffle_verifications += 1; + VERIFICATION_STATE.save(deps.storage, &state)?; + + Ok(Response::new() + .add_attribute("action", "verify_shuffle_proof") + .add_attribute("result", "success") + .add_attribute( + "total_shuffle_verifications", + state.shuffle_verifications.to_string(), + )) +} + +fn execute_verify_decrypt_proof( + deps: DepsMut, + proof: Groth16Proof, + public_inputs: Vec, +) -> Result { + let proof_tuple = (proof.a, proof.b, proof.c); + let verifier_name = "decrypt"; + let verified = + verify_decrypt_proof(deps.as_ref(), &proof_tuple, &public_inputs, verifier_name)?; + + if !verified { + return Err(ContractError::InvalidProof); + } + let mut state = VERIFICATION_STATE.load(deps.storage)?; + state.decrypt_verifications += 1; + VERIFICATION_STATE.save(deps.storage, &state)?; + + Ok(Response::new() + .add_attribute("action", "verify_decrypt_proof") + .add_attribute("result", "success") + .add_attribute( + "total_decrypt_verifications", + state.decrypt_verifications.to_string(), + )) +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { + match msg { + QueryMsg::VerificationCount {} => to_json_binary(&query_verification_count(deps)?), + } +} + +fn query_verification_count(deps: Deps) -> StdResult { + let state = VERIFICATION_STATE.load(deps.storage)?; + Ok(VerificationCountResponse { + shuffle_verifications: state.shuffle_verifications, + decrypt_verifications: state.decrypt_verifications, + }) +} diff --git a/contracts/zk-shuffle/src/error.rs b/contracts/zk-shuffle/src/error.rs new file mode 100644 index 00000000..92f55e26 --- /dev/null +++ b/contracts/zk-shuffle/src/error.rs @@ -0,0 +1,23 @@ +use cosmwasm_std::StdError; +use thiserror::Error; + +#[derive(Error, Debug, PartialEq)] +pub enum ContractError { + #[error("{0}")] + Std(#[from] StdError), + + #[error("unauthorized")] + Unauthorized, + + #[error("card already decrypted by this player")] + AlreadyDecrypted, + + #[error("callback message missing")] + MissingCallback, + + #[error("operation not supported")] + NotSupported, + + #[error("proof verification failed")] + InvalidProof, +} diff --git a/contracts/zk-shuffle/src/lib.rs b/contracts/zk-shuffle/src/lib.rs new file mode 100644 index 00000000..fe4e04d6 --- /dev/null +++ b/contracts/zk-shuffle/src/lib.rs @@ -0,0 +1,8 @@ +pub mod contract; +mod error; +pub mod msg; +pub mod state; +pub mod types; +pub mod zkshuffle; + +pub use crate::error::ContractError; diff --git a/contracts/zk-shuffle/src/msg.rs b/contracts/zk-shuffle/src/msg.rs new file mode 100644 index 00000000..e251e99c --- /dev/null +++ b/contracts/zk-shuffle/src/msg.rs @@ -0,0 +1,34 @@ +//! Minimal zkShuffle contract for testing proof verification at XION module level + +use cosmwasm_schema::{cw_serde, QueryResponses}; +use cosmwasm_std::Uint256; + +use crate::types::Groth16Proof; + +#[cw_serde] +pub struct InstantiateMsg {} + +#[cw_serde] +pub enum ExecuteMsg { + VerifyShuffleProof { + proof: Groth16Proof, + public_inputs: Vec, + }, + VerifyDecryptProof { + proof: Groth16Proof, + public_inputs: Vec, + }, +} + +#[cw_serde] +#[derive(QueryResponses)] +pub enum QueryMsg { + #[returns(VerificationCountResponse)] + VerificationCount {}, +} + +#[cw_serde] +pub struct VerificationCountResponse { + pub shuffle_verifications: u64, + pub decrypt_verifications: u64, +} diff --git a/contracts/zk-shuffle/src/state.rs b/contracts/zk-shuffle/src/state.rs new file mode 100644 index 00000000..e41e3360 --- /dev/null +++ b/contracts/zk-shuffle/src/state.rs @@ -0,0 +1,19 @@ +use cosmwasm_schema::cw_serde; +use cw_storage_plus::Item; + +#[cw_serde] +pub struct VerificationState { + pub shuffle_verifications: u64, + pub decrypt_verifications: u64, +} + +impl VerificationState { + pub fn new() -> Self { + Self { + shuffle_verifications: 0, + decrypt_verifications: 0, + } + } +} + +pub const VERIFICATION_STATE: Item = Item::new("verification_state"); diff --git a/contracts/zk-shuffle/src/types.rs b/contracts/zk-shuffle/src/types.rs new file mode 100644 index 00000000..f1391be6 --- /dev/null +++ b/contracts/zk-shuffle/src/types.rs @@ -0,0 +1,9 @@ +use cosmwasm_schema::cw_serde; +use cosmwasm_std::Uint256; + +#[cw_serde] +pub struct Groth16Proof { + pub a: [Uint256; 2], + pub b: [[Uint256; 2]; 2], + pub c: [Uint256; 2], +} diff --git a/contracts/zk-shuffle/src/zkshuffle.rs b/contracts/zk-shuffle/src/zkshuffle.rs new file mode 100644 index 00000000..8125e7c4 --- /dev/null +++ b/contracts/zk-shuffle/src/zkshuffle.rs @@ -0,0 +1,275 @@ +//! ZK proof verification module for zkShuffle using XION's module-level zk API. +//! +//! This module provides functions to verify Groth16 proofs for shuffle and decryption operations +//! by querying the XION blockchain's zk module through the Cosmos SDK protobuf interface. + +use crate::error::ContractError; +use cosmos_sdk_proto::{ + prost::Message, + traits::MessageExt, + xion::v1::zk::{ProofVerifyResponse, QueryVerifyRequest}, +}; +use cosmwasm_std::{Binary, Deps, QuerierWrapper, Uint256}; +use serde::{Deserialize, Serialize}; +use serde_json as _; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SnarkJsProof { + #[serde(rename = "pi_a")] + pub pi_a: [String; 3], + #[serde(rename = "pi_b")] + pub pi_b: [[String; 2]; 3], + #[serde(rename = "pi_c")] + pub pi_c: [String; 3], + pub protocol: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub curve: Option, +} + +fn uint256_to_string(val: &Uint256) -> String { + val.to_string() +} + +pub fn groth16_proof_to_snarkjs( + a: &[Uint256; 2], + b: &[[Uint256; 2]; 2], + c: &[Uint256; 2], +) -> SnarkJsProof { + SnarkJsProof { + pi_a: [ + uint256_to_string(&a[0]), + uint256_to_string(&a[1]), + "1".to_string(), // Groth16 proofs have a third component set to 1 + ], + pi_b: [ + [uint256_to_string(&b[0][0]), uint256_to_string(&b[0][1])], + [uint256_to_string(&b[1][0]), uint256_to_string(&b[1][1])], + ["1".to_string(), "0".to_string()], // Groth16 has a third row [1, 0] + ], + pi_c: [ + uint256_to_string(&c[0]), + uint256_to_string(&c[1]), + "1".to_string(), // Groth16 proofs have a third component set to 1 + ], + protocol: "groth16".to_string(), + curve: Some("bn128".to_string()), + } +} + +/// Convert Uint256 public inputs to string format +pub fn public_inputs_to_string(inputs: &[Uint256]) -> Vec { + inputs.iter().map(uint256_to_string).collect() +} + +/// Verify a shuffle proof using the XION zk module +/// +/// # Arguments +/// * `deps` - Deps for querier access +/// * `proof` - Groth16 proof (a, b, c components) +/// * `public_inputs` - Public inputs for the proof circuit +/// * `verifier_name` - Name of the verifier key stored in the zk module +/// +/// # Returns +/// * `Ok(true)` if proof is valid +/// * `Ok(false)` if proof is invalid +/// * `Err(ContractError)` if verification fails due to other errors +pub fn verify_shuffle_proof( + deps: Deps, + proof: &([Uint256; 2], [[Uint256; 2]; 2], [Uint256; 2]), + public_inputs: &[Uint256], + verifier_name: &str, +) -> Result { + let snarkjs_proof = groth16_proof_to_snarkjs(&proof.0, &proof.1, &proof.2); + let public_inputs_str = public_inputs_to_string(public_inputs); + + let verify_request = QueryVerifyRequest { + proof: serde_json::to_vec(&snarkjs_proof).map_err(|e| { + ContractError::Std(cosmwasm_std::StdError::generic_err(format!( + "Failed to serialize proof: {}", + e + ))) + })?, + public_inputs: public_inputs_str, + vkey_name: verifier_name.to_string(), + vkey_id: 3, + }; + + let request_bytes = verify_request.to_bytes().map_err(|e| { + ContractError::Std(cosmwasm_std::StdError::generic_err(format!( + "Failed to encode verify request: {}", + e + ))) + })?; + + let response: cosmwasm_std::Binary = deps + .querier + .query_grpc( + "/xion.zk.v1.Query/ProofVerify".to_string(), + cosmwasm_std::Binary::from(request_bytes), + ) + .map_err(|e| { + ContractError::Std(cosmwasm_std::StdError::generic_err(format!( + "Failed to query zk module: {}", + e + ))) + })?; + + let verify_response: ProofVerifyResponse = ProofVerifyResponse::decode(response.as_slice()) + .map_err(|e| { + ContractError::Std(cosmwasm_std::StdError::generic_err(format!( + "Failed to decode verify response: {}", + e + ))) + })?; + + Ok(verify_response.verified) +} + +/// Verify a decryption proof using the XION zk module +/// +/// # Arguments +/// * `deps` - Deps for querier access +/// * `proof` - Groth16 proof (a, b, c components) +/// * `public_inputs` - Public inputs for the proof circuit +/// * `verifier_name` - Name of the verifier key stored in the zk module +/// +/// # Returns +/// * `Ok(true)` if proof is valid +/// * `Ok(false)` if proof is invalid +/// * `Err(ContractError)` if verification fails due to other errors +pub fn verify_decrypt_proof( + deps: Deps, + proof: &([Uint256; 2], [[Uint256; 2]; 2], [Uint256; 2]), + public_inputs: &[Uint256], + verifier_name: &str, +) -> Result { + let snarkjs_proof = groth16_proof_to_snarkjs(&proof.0, &proof.1, &proof.2); + let public_inputs_str = public_inputs_to_string(public_inputs); + + let verify_request = QueryVerifyRequest { + proof: serde_json::to_vec(&snarkjs_proof).map_err(|e| { + ContractError::Std(cosmwasm_std::StdError::generic_err(format!( + "Failed to serialize proof: {}", + e + ))) + })?, + public_inputs: public_inputs_str, + vkey_name: verifier_name.to_string(), + vkey_id: 2, + }; + + let request_bytes = verify_request.to_bytes().map_err(|e| { + ContractError::Std(cosmwasm_std::StdError::generic_err(format!( + "Failed to encode verify request: {}", + e + ))) + })?; + + let response: cosmwasm_std::Binary = deps + .querier + .query_grpc( + "/xion.zk.v1.Query/ProofVerify".to_string(), + cosmwasm_std::Binary::from(request_bytes), + ) + .map_err(|e| { + ContractError::Std(cosmwasm_std::StdError::generic_err(format!( + "Failed to query zk module: {}", + e + ))) + })?; + + let verify_response: ProofVerifyResponse = ProofVerifyResponse::decode(response.as_slice()) + .map_err(|e| { + ContractError::Std(cosmwasm_std::StdError::generic_err(format!( + "Failed to decode verify response: {}", + e + ))) + })?; + + Ok(verify_response.verified) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_groth16_proof_conversion() { + use std::str::FromStr; + + let a = [ + Uint256::from_str("123456").unwrap(), + Uint256::from_str("789012").unwrap(), + ]; + let b = [ + [ + Uint256::from_str("345678").unwrap(), + Uint256::from_str("901234").unwrap(), + ], + [ + Uint256::from_str("567890").unwrap(), + Uint256::from_str("123456").unwrap(), + ], + ]; + let c = [ + Uint256::from_str("234567").unwrap(), + Uint256::from_str("890123").unwrap(), + ]; + + let snarkjs = groth16_proof_to_snarkjs(&a, &b, &c); + + assert_eq!(snarkjs.pi_a[0], "123456"); + assert_eq!(snarkjs.pi_a[1], "789012"); + assert_eq!(snarkjs.pi_a[2], "1"); + assert_eq!(snarkjs.pi_b[0][0], "345678"); + assert_eq!(snarkjs.pi_b[0][1], "901234"); + assert_eq!(snarkjs.pi_b[1][0], "567890"); + assert_eq!(snarkjs.pi_b[1][1], "123456"); + assert_eq!(snarkjs.pi_b[2][0], "1"); + assert_eq!(snarkjs.pi_b[2][1], "0"); + assert_eq!(snarkjs.pi_c[0], "234567"); + assert_eq!(snarkjs.pi_c[1], "890123"); + assert_eq!(snarkjs.pi_c[2], "1"); + assert_eq!(snarkjs.protocol, "groth16"); + assert_eq!(snarkjs.curve, Some("bn128".to_string())); + } + + #[test] + fn test_snarkjs_proof_serialization() { + let proof = SnarkJsProof { + pi_a: ["1".to_string(), "2".to_string(), "3".to_string()], + pi_b: [ + ["4".to_string(), "5".to_string()], + ["6".to_string(), "7".to_string()], + ["8".to_string(), "9".to_string()], + ], + pi_c: ["10".to_string(), "11".to_string(), "12".to_string()], + protocol: "groth16".to_string(), + curve: Some("bn128".to_string()), + }; + + let serialized = serde_json::to_string(&proof).unwrap(); + let deserialized: SnarkJsProof = serde_json::from_str(&serialized).unwrap(); + + assert_eq!(proof.pi_a, deserialized.pi_a); + assert_eq!(proof.pi_b, deserialized.pi_b); + assert_eq!(proof.pi_c, deserialized.pi_c); + assert_eq!(proof.protocol, deserialized.protocol); + assert_eq!(proof.curve, deserialized.curve); + } + + #[test] + fn test_public_inputs_to_string() { + use std::str::FromStr; + + let inputs = vec![ + Uint256::from_str("123").unwrap(), + Uint256::from_str("456").unwrap(), + Uint256::from_str("789").unwrap(), + ]; + + let strings = public_inputs_to_string(&inputs); + + assert_eq!(strings, vec!["123", "456", "789"]); + } +} diff --git a/contracts/zk-shuffle/testnet.json b/contracts/zk-shuffle/testnet.json new file mode 100644 index 00000000..aca2196d --- /dev/null +++ b/contracts/zk-shuffle/testnet.json @@ -0,0 +1,6 @@ +{ + "v1": { + "CODE_ID": "1892", + "CONTRACT_ADDRESS": "xion13ehemhmxg8sfzpze4u2ll6sr3tekjetl2tee4utg5zgyw94c8spskuuv5f" + } +} diff --git a/contracts/zk-shuffle/vkeys/decrypt.json b/contracts/zk-shuffle/vkeys/decrypt.json new file mode 100644 index 00000000..994f0b03 --- /dev/null +++ b/contracts/zk-shuffle/vkeys/decrypt.json @@ -0,0 +1,120 @@ +{ + "protocol": "groth16", + "curve": "bn128", + "nPublic": 8, + "vk_alpha_1": [ + "14378794661994809316668936077887579852844330409586136188493910229510707683568", + "19007180918058273234125706522281291487787880146734549337345180962710738215208", + "1" + ], + "vk_beta_2": [ + [ + "12055325713222300848813253111985210672218263044214498326157766255150057128762", + "5920706861016946300912146506670818945013737603659177373891149557636543490740" + ], + [ + "14277278647337675353039880797101698215986155900184787257566473040310971051502", + "9700420230412290932994502491200547761155381189822684608735830492099336040170" + ], + ["1", "0"] + ], + "vk_gamma_2": [ + [ + "10857046999023057135944570762232829481370756359578518086990519993285655852781", + "11559732032986387107991004021392285783925812861821192530917403151452391805634" + ], + [ + "8495653923123431417604973247489272438418190587263600148770280649306958101930", + "4082367875863433681332203403145435568316851327593401208105741076214120093531" + ], + ["1", "0"] + ], + "vk_delta_2": [ + [ + "12594050201927194728935013198382868710096766024870573161837432117376274142958", + "19133256127707975950691487792451177362565994283806060741327347032806959261921" + ], + [ + "17174637232039909600979373933534686019562408911886417431413256310520620233064", + "5020265124747710802123789284081723412845598094160521887960172071062583109047" + ], + ["1", "0"] + ], + "vk_alphabeta_12": [ + [ + [ + "2552340398560037553466474334090684122239527938678075120685238892210140286734", + "21103567520735181525962881223829473150964899590725643730870360165680654169821" + ], + [ + "17418358945522398631235978744064871659729272245932523041719658073201063889547", + "12780865215547052197001378227425221956514050662134427990972566538059532319392" + ], + [ + "3101120494865128027437311952527045792832484453316657117057089254057743545356", + "13276054897685369681716779310142237353869839733892907342519192250312681998635" + ] + ], + [ + [ + "12060095829229916424462012554449507497737260384521108585857034955753024275809", + "4186390213203745233792740144907090174162444102454343802205404423496051058966" + ], + [ + "21194213978609667410351384442332026901277069323933037611098337364518057338726", + "12340070885078667797645127498544657281686947867858979354578727773053815409164" + ], + [ + "17244726363072569657630996237856400482385700697899371994592682207921269901256", + "723363160021531292090447266088967357211629759196476148452063353646061859464" + ] + ] + ], + "IC": [ + [ + "5932026459382860604309440879316683197022918149003360191294155741233703232289", + "10190564836545696514491179333959855931734797168140754412925505292086287456157", + "1" + ], + [ + "18867335583493634013472831141177954825293424828688421198228525342030670068104", + "15381268465466397414659863328587624695240059970282915771760871594047824107403", + "1" + ], + [ + "11286506025338942578952255893420408569906554872704554862467620266108132264197", + "2491405715760472509167562261482717498704059700756396771077313263264637414832", + "1" + ], + [ + "3287473577425372258045407890427028857264800329136703662219819676329065521491", + "8621055055780158700687294516025314839109090879823278356759396109602531212398", + "1" + ], + [ + "13486231092071464017060066625879173946215137105871834475708368644662546379148", + "21121436964731053158654352717071962384336756797046584661227286306159111031971", + "1" + ], + [ + "14109275663321771783314980339181158967602422131270775459802129831737860909306", + "16924660254912023791796764707642347850615242421495467769065197379355986460351", + "1" + ], + [ + "3419883549205188749055793320564337243174009629574444717611782109291182659583", + "4382834526475882549762033295157581547532804093976887401310358307095345650082", + "1" + ], + [ + "3223962897746138668639029759885991824463607401137866309854517055540083501524", + "16082885970618257756451494366838606402295679026944717495804110892597399020825", + "1" + ], + [ + "8913096594893157129832389718939680598171595295898154761061549479290918885343", + "743871532215761266358119443417771343521019768458421024672232959183096442227", + "1" + ] + ] +} diff --git a/contracts/zk-shuffle/vkeys/shuffle_encrupt.json b/contracts/zk-shuffle/vkeys/shuffle_encrupt.json new file mode 100644 index 00000000..0c0ec998 --- /dev/null +++ b/contracts/zk-shuffle/vkeys/shuffle_encrupt.json @@ -0,0 +1,1155 @@ +{ + "protocol": "groth16", + "curve": "bn128", + "nPublic": 215, + "vk_alpha_1": [ + "14378794661994809316668936077887579852844330409586136188493910229510707683568", + "19007180918058273234125706522281291487787880146734549337345180962710738215208", + "1" + ], + "vk_beta_2": [ + [ + "12055325713222300848813253111985210672218263044214498326157766255150057128762", + "5920706861016946300912146506670818945013737603659177373891149557636543490740" + ], + [ + "14277278647337675353039880797101698215986155900184787257566473040310971051502", + "9700420230412290932994502491200547761155381189822684608735830492099336040170" + ], + ["1", "0"] + ], + "vk_gamma_2": [ + [ + "10857046999023057135944570762232829481370756359578518086990519993285655852781", + "11559732032986387107991004021392285783925812861821192530917403151452391805634" + ], + [ + "8495653923123431417604973247489272438418190587263600148770280649306958101930", + "4082367875863433681332203403145435568316851327593401208105741076214120093531" + ], + ["1", "0"] + ], + "vk_delta_2": [ + [ + "4749829685018394265759166642612538661956358501586333301117677597065071307926", + "15804720237715868904774198384823876758005645387467920325598801085788769080458" + ], + [ + "17825137562998211765453733883587501412475900254697329097023879297167891750509", + "20902351206911412272267116072032507955937033537640638451684518277053070440214" + ], + ["1", "0"] + ], + "vk_alphabeta_12": [ + [ + [ + "2552340398560037553466474334090684122239527938678075120685238892210140286734", + "21103567520735181525962881223829473150964899590725643730870360165680654169821" + ], + [ + "17418358945522398631235978744064871659729272245932523041719658073201063889547", + "12780865215547052197001378227425221956514050662134427990972566538059532319392" + ], + [ + "3101120494865128027437311952527045792832484453316657117057089254057743545356", + "13276054897685369681716779310142237353869839733892907342519192250312681998635" + ] + ], + [ + [ + "12060095829229916424462012554449507497737260384521108585857034955753024275809", + "4186390213203745233792740144907090174162444102454343802205404423496051058966" + ], + [ + "21194213978609667410351384442332026901277069323933037611098337364518057338726", + "12340070885078667797645127498544657281686947867858979354578727773053815409164" + ], + [ + "17244726363072569657630996237856400482385700697899371994592682207921269901256", + "723363160021531292090447266088967357211629759196476148452063353646061859464" + ] + ] + ], + "IC": [ + [ + "452987554829437481229946320777014200489823354620417299261008144880501532245", + "20588611611633716068717973072126950304472046696263395535824873728340460492870", + "1" + ], + [ + "6126369430870011783898934313173628831869220754713760114240402157400350132910", + "4225470032729069326506087575082120700076142098168844838071648223636876879262", + "1" + ], + [ + "50479399711007998946374472570799911197543352622925801117841793184196870141", + "6660715107116978597654608280731609126766789580894753485097172688965554680346", + "1" + ], + [ + "10645881551741033904162074869683205934680250437205330136681200260809757191238", + "10564704444086989525221646723767207913615488805442243599327818666414025363108", + "1" + ], + [ + "5328466716976026957002457909888397138536453544531916991876534405442662975657", + "12940879501493515153665647259593131624222444893552424756329668432949401550511", + "1" + ], + [ + "20621973199298281600941465795290150562537052751025030113306960715467792941764", + "20422802931522695914359510694885504614417305973665488819881684816712591573582", + "1" + ], + [ + "1764283856582817963552052865427272364537522956314493348594242094072646114757", + "12432746687543590387095921614554528597628627315166579696768400087372688435102", + "1" + ], + [ + "13390976395853137306786979579844899017171373492308361561981011511517761248385", + "6714946143107216347907357561871576757271968337330750339329063007116347761586", + "1" + ], + [ + "3101554795368135523452882365118260859564178589971314623229778897304568457214", + "15596346270876469233310635536187885136525329054720448406679536705573317802972", + "1" + ], + [ + "11007336989145996130789044651897953394561365486407189135080781499165496058544", + "19996442538518941007039558555557397076531404569806590635921056185511030305220", + "1" + ], + [ + "10905096413227544111061097063180112134296876490375651960481421442588255864375", + "11783370234777013392717331178288130160893090490713725282286599472099040913133", + "1" + ], + [ + "19128514327328933493721952285959725925996454789798013319125037068164767060083", + "5428049426951372838522234466772658641883235607159118773728022016916185188399", + "1" + ], + [ + "18706404340525899852936562780319551173123858883796240764060751687856903973445", + "20604796686248985275326686425042133427466113409155566772706621358991867302350", + "1" + ], + [ + "19848481362546350494066121463820778608148785727361260138659341902812019929916", + "21867229820410363636459395174367757791884820439067831467959916325421711976669", + "1" + ], + [ + "12351852068222618849602292315937958852818457763197147613635273740678497634435", + "20048803870581863938352468970552153898483212167188115862517479912098297592243", + "1" + ], + [ + "15379808828479104711527790850726385007735497039619578940884699387870922254531", + "10168227167055259148062300077780945765214842142626533292756349045614073684733", + "1" + ], + [ + "11331990375532492790427763037069010879885673443827351354562212991733945370831", + "21586236632840665135167888358664402923772789915388030512495879630116346499550", + "1" + ], + [ + "7054222070294618571724642157384661847125276157456823035211633466323806627903", + "9231118965985692191583541505569554833200207720441196952001685967691851992288", + "1" + ], + [ + "16704009658286049419111930436135116246496240941835645935328418064761033164185", + "10043802721428886139114123451833876311868052224040108157653262366988023787645", + "1" + ], + [ + "2656886722929079249881394958945544884853385497104572496379378343111810470188", + "10364218707906830216477563130483985035252147998470574490827252732695559236531", + "1" + ], + [ + "9558348933648571468299830182104904180170501445361297098430680332648817283347", + "2273940470913772551291402972330942466309826531457566144465448663117296452763", + "1" + ], + [ + "20336207658852767624402404767405586947225969574174141912812109265080056019811", + "2963880459083175891412153109478614209938396612497396264159259557008191798317", + "1" + ], + [ + "11878044374868207030085573421592066583217091526945525428099690354756867723799", + "7063516920001485334175271837288685127069551074579723794937589878466479164883", + "1" + ], + [ + "21648559892486881055159871377524698698952261266323448506734745144778090437303", + "13416645216305323412337404474733651797168660322656724772201346958100515837785", + "1" + ], + [ + "10584861656881708777110775747692047096815755326949921957340568014180808723050", + "15996479741960630643953776888340825819934697249463232786473395814016021500836", + "1" + ], + [ + "21286180561863119370386463912691348361504240647053702651932936265058893129492", + "1105491093279551124225141554725567845208603976533430046757201312046791772821", + "1" + ], + [ + "15313655766904868225829975194569056983308232820914150832919464130461126177757", + "6227368225994678468053381123064307984458604240959228922327584912841875249855", + "1" + ], + [ + "21443340353392977072094986286878878312342171274204355764850791121944494254877", + "16696138049126985531185706832292819144326810370832946685372049988709797606246", + "1" + ], + [ + "13001941544234457940845015753225563947709404785152566328706086140499801796219", + "6899350556086910097340816219046754474155952427017308221633449731482897673416", + "1" + ], + [ + "14251426002892795099293500450341533162993218015270489386569324163101517528193", + "3991495684065216474361977727160864407270857790205361554486941224146730640205", + "1" + ], + [ + "19543118808372428107388952488780421074362659789161084540928610122351730229873", + "92550720200846021176593882520255598347978536788537192953630249889247716411", + "1" + ], + [ + "5432324113206826419052660407212086991839135188591904507277232723429091012321", + "11467978453887233360343515545860893124052154619877379915678624300372943438222", + "1" + ], + [ + "20969315257936142534989039576716550425798085158034809224402015659531463933363", + "18764794657165313485283779801385834648238385455594639839173743930560328690726", + "1" + ], + [ + "10947765444249494726119500093732190113650014954452467461220409979030417506187", + "9578768902173291851910706722331916952034848815612122648574285390030392409456", + "1" + ], + [ + "3079704637914380354184296307747461302231522314796415531991237401866757634208", + "12424712540041715669019160747610601864097297252810461312941390683136552470803", + "1" + ], + [ + "17004561612458535924238993285209307950077220691016025354465243743530429541135", + "8018367730084444226625178308476605659816398346930286542133352972267524027131", + "1" + ], + [ + "4683873821324794382612092298974038457535199227051019180466735709843819208246", + "1538456770134395251525076284352681561311928298891034992019070087281991580820", + "1" + ], + [ + "5227791591558443831416670880131485177384905050838002458594694252673745590331", + "21180384934024153548394577620762421807714292848474568207573088776243969784034", + "1" + ], + [ + "17562482600119071884682739464040428897888895575611303834868500221073376189834", + "1867393151725347743855630327958330327341700462697090633836618909475405863034", + "1" + ], + [ + "10678994881195170949782788493895414488654592319353987441046737745441640118668", + "7930950662540518562653020629143072217831724960065756378273826226558816427432", + "1" + ], + [ + "7027457874291921809379323126702389276073321145892713829911461028839047899436", + "9677077819758341155141989676969046591388076871318794473804491442710260069666", + "1" + ], + [ + "20719078579588124221495339462305579267992137692699971129576778036287640218599", + "20451120309324107407506527228304953468163509954137440191952154322658275289955", + "1" + ], + [ + "13679107044664048649899812766462819300763178649996675006431745445902550032154", + "9222889857880975045895570254878175569001189342060660751952967157619747710178", + "1" + ], + [ + "13563509352876866209387751403010327795382054252450863868857301609952660267097", + "4107333481832477524920317593711990114014667410489763008070869111494085329442", + "1" + ], + [ + "885789169390329294619874940833751880490855727879747547876615435372263424423", + "1775078248664753744544780363210308428990387360741189122864426314361027278016", + "1" + ], + [ + "14695369349133728489990130703814415305064250231828117017459199020778072594736", + "16566602047767557614950810141865611752985610977390817978630024213702179640502", + "1" + ], + [ + "3917504453495221156268180428760176085004007052090851843584283383265218543569", + "13968795499269201034635964537695810406703037244384932127886892380995550953536", + "1" + ], + [ + "1168035972860135435344138424391854251712036437888863404324968990010363229789", + "6203100166531660730756264481842760327439447959795515139189754790364141553423", + "1" + ], + [ + "6011503913203282648232325956336024145116029811015410887727235939794791182321", + "19064243944633879663635425319603100455668076152986530869952108114530337731557", + "1" + ], + [ + "17555819367486770413240961167318183407205525718841386705694027901212000996565", + "17454264707343667309504025459459355094981651711453614978158109001401528160297", + "1" + ], + [ + "4824699235268764024556627253498557621115200830627766760654831900325246019003", + "17312003454275192642340451830724935540804838754930809815642355714976414994253", + "1" + ], + [ + "9333089741411141264644404641347504544810414116257972222175716806978000132331", + "18725687348736768386854114453932433927333581080637146300294352957900736587463", + "1" + ], + [ + "21774964624705660467735130632072036550648278330539894823272979435719667297069", + "10428365881182552473120214016431558216037018603089842360255436597227528983987", + "1" + ], + [ + "16144689706154564793490842148088265643309395009353095634356335327292913561850", + "13604013990605877878221446710986569710840175352995801600650374421686561134599", + "1" + ], + [ + "21807079438300550379757698556990224927312510559558706942833849986012450013638", + "6728249490725054732236901132200962304523900250165202642491319185040994927733", + "1" + ], + [ + "20379715507466960566868726908408815258432051658701840711708615997884817954310", + "14130642783273589985101232768532484819331666122620317024659565639717137092762", + "1" + ], + [ + "15295083391178420166967070133861436007895352690149084727771431831459964427017", + "10681826183969024618404916550624054959101583969372902023709687826575573343131", + "1" + ], + [ + "8059610141493125181067545941017599107224102076516797741138493241413206887537", + "15468407131091161388366464952841796216514652993035165820259107226606686582219", + "1" + ], + [ + "14059042112719502599450911022747679384060598254743945538472409354625814594572", + "38518076542593066660746695442933146537392203174992539396083782800912758908", + "1" + ], + [ + "14092028957597392891730827882742574081717605904024593431118092129868411666124", + "18869809128962397577950321487645294554425160222314035627536223839311475972222", + "1" + ], + [ + "9183025336303473127339179263012548399806355509893176604106152146450997713580", + "2773152783109797908591055753548465661785062780694941405290295118388318168987", + "1" + ], + [ + "20761230760115273527160834182251981967957586529934027372372428341625808039691", + "10596871548967029862429823274003014824674218207948302839748548666705482908010", + "1" + ], + [ + "1209973529233982162131797482357731198515499215085382183805796912668174195844", + "9321088649619916462580628561811567105914122739114521832348583754106225410176", + "1" + ], + [ + "21869749798293567312520491048015123535575669604111777996848968874201190469282", + "16761133094701937591992828757557699450843068870822295097614115310129137252907", + "1" + ], + [ + "18548858544949725689037597377289844940200196983979251609291262273090449127046", + "1008459005555762877861212717580563943646519563711418478872366995374217116713", + "1" + ], + [ + "17609032551846702359978149019578358421367513583579623209644305360780943365321", + "4204975348605972348678935396216286456832836283485338924763035867850059776169", + "1" + ], + [ + "1753932744414724585154841303718745290957803012920974086493397327521144796762", + "1683695898741002734696860909446865253597542984386584674978409153328682863529", + "1" + ], + [ + "14199332382881375671276825981171035584510020456043442236826221713953845458753", + "20484254846464807434947750829112468237775796558938655017114556815274832993994", + "1" + ], + [ + "16334726862963458724896357664408131695356807715674434934567889994796384247255", + "9211488826931978671235855903628189827577438486231198304829464449818951791260", + "1" + ], + [ + "17482366026711985074102984248270548366844796378999981782059935151196984195067", + "5367575761607467623511465005894460598079195574008115056228189634080256918191", + "1" + ], + [ + "2017081431057134477843607152528975061165081425689278391865885278233467511227", + "6539080273179444171033564196389305563261483012815322778994807860824858257486", + "1" + ], + [ + "19632931395712471704590165645783536457134890249520801449306777058656698232386", + "4094391571201699120652719954061449228645891638772729268832582916784926479119", + "1" + ], + [ + "11490666708142682017958378097512940205332248616511569078975345789694945225569", + "19526086463445226767579712927576558866312139770291151393527207779241033699967", + "1" + ], + [ + "12682886174263590610982424936639633123752656814885742584209589756036170331905", + "15883016965245835425672435941556533466780735731933863427331294860427200753640", + "1" + ], + [ + "18891379702153872823491570928525122097283493942587079172296634257353775538957", + "6090592970237124414517940228702919587450542377431440073265432137996624618007", + "1" + ], + [ + "18474034503952795150614596559813405947139901852955523487426189145536435555332", + "14738655886877759788429763182943070437197259186934051052313599074706289697211", + "1" + ], + [ + "13894783221288209808679467408511502299053003404779724533858345984957201300263", + "5040175413718054108536381814782180358019719508135219811608860203272979596786", + "1" + ], + [ + "10880052555248934698620631974023880919809366462699784031523227085707751556117", + "11356453660264193248494471532392362151689275196752000792150348790221322863449", + "1" + ], + [ + "11640681998678672574784280982993478331299513270547476522326908485436975671930", + "2954423156528883085989084613922781223815593664422338059020222308170112791955", + "1" + ], + [ + "11291693286990316491064085501735638543403082163315360472043665305405670377473", + "17438688265204106568413268530497876473907544039765495213847044420411814318156", + "1" + ], + [ + "14943594624175503204203632744650644645945984632803966726231897900797592248624", + "15902574245838336656052682656458123905460582263718535669274757144641099560343", + "1" + ], + [ + "12098385596360167918961280801438160120086879419903340653182675471082854736896", + "14863584102872187983358917586275777172802954675420947104402569363472203235616", + "1" + ], + [ + "11602354982392575076379892597743923587246578664013455820292832504707281954976", + "4641425354044445790832711439944642261698747349549539370194300791560917590380", + "1" + ], + [ + "14382427808542708908539010293898586219861726572527740205006069924608331574694", + "15087792687025742937293300211507148213026795487922483830645082826203626699889", + "1" + ], + [ + "14361002678380468161205137444398972748308152534313031773002118810671182803556", + "6258747919849270520987585820150835222186581555468746420460415794200284831282", + "1" + ], + [ + "20211912835886133679120400453253441749773848732489602698990810102567475713793", + "7208541552267603399614055730710757458332909110854616719478508650234821690435", + "1" + ], + [ + "5658659821864447582470683978437318384940339819576249104925467422243942102462", + "3286896671033162665856002821157136578689192034227669965430656483607741558023", + "1" + ], + [ + "1144656847512744289557080915721868573837621516520720197463693074322948818529", + "1647022321862283100580243964646789439914568543663872857593726073449836320791", + "1" + ], + [ + "1344532008253636668178013864788433868087117795471215921394276558957764343013", + "7687179027074195851537500465215292671682971914489184578463327534186538322566", + "1" + ], + [ + "16563584910876814815065156635258885081131972207953306144264746720454222345828", + "5800307607854453278758171463976847858384787424571821914083927385939851055258", + "1" + ], + [ + "10033809278188554663774468409353984742740216156968850494525903372362547677182", + "17862684449533638262002756557990367640337282816391636361801398184101068909353", + "1" + ], + [ + "5213244948797297588008404750127298006860218555892434121974076969189741051378", + "21476729206532562683108887848389658065726382388857297511188663664024282193942", + "1" + ], + [ + "18522951819225297888574896023503954191694182969085930253841428621252901622251", + "8925552714702138270432174615681456281207395138648675923805088673576248128554", + "1" + ], + [ + "17888898527740658764022594001864800844538090035873511576233959798427453362794", + "4449542211158129469651423470185378712174194398767928858921019856583223647213", + "1" + ], + [ + "20045125277699696266846838941366419796387023598416158243616434547289594952548", + "4661259934614559518933217558073284269306432739915234318880253258262842506218", + "1" + ], + [ + "19154909735852037119163540897097565494560798157939351124537201596153864792416", + "17732452714941833062987442980719677544934685540478985408939605624275465328677", + "1" + ], + [ + "17751232779768423792888022901987142003023040220845510980132892776503165095996", + "4260923995425364157620360553936020876180238612981181207420145068748974552256", + "1" + ], + [ + "7302887048260639199846134898046558105470692866320472420800549751501367548274", + "12630360085931835927534554531573725955099307079491343313230810193884163820210", + "1" + ], + [ + "4875332498272585441963803581595820868905741158761540955417932851454587933117", + "6211439615231052354153942724966175200320931109735020458108992557732011618484", + "1" + ], + [ + "16089763203753964644426458115814863493533959735145987495394797577660371779720", + "3274857298322295483280602688349252113754159231301518128324889278219143393663", + "1" + ], + [ + "3124700224850015232083191858816829016910466628216369302447011595548237258802", + "6211545510850411799289679129315184082256966531070929064302041985348315781852", + "1" + ], + [ + "9100256133373142600522970945170827300024895368365385952410598820311659854079", + "18931472625744312105267749284139214444738247977241778358567257121234031949890", + "1" + ], + [ + "4820865921572139486584017706337039037032942317781714667446537405456709928031", + "20984312689634782522639931755742814589830831766102678240227594720710939992951", + "1" + ], + [ + "17826729265314130559815673607120669259461033375723859562216591957362172701767", + "9656450386303477582008999738591642900182491260288824022635294015541372887452", + "1" + ], + [ + "4456800013196131522909077566754296829875674053977812233976410533681425295613", + "3617386484384864696589682441482141599176490177544180426955178986570806788396", + "1" + ], + [ + "8316065484758118537296493108328649728700892751559468976402290280101490385437", + "13008930648944145203365144791067477806462683881612830156742470482084975500486", + "1" + ], + [ + "13937763847022024014541489429469083825209246571816482110056051253987980879476", + "11249900962255192056153704520323821400430004362438562670009070378021595605944", + "1" + ], + [ + "961291012917931271971794869739902112966519374624650586935304387301317702705", + "13349888783927927466442403904812987069093423830202583731066070811863033687526", + "1" + ], + [ + "16364087689026751720771602138791637120362829080404696140942877816377965003813", + "2192360571699289581848819998361554142714257753573107526161395541615337679030", + "1" + ], + [ + "19591172000594208781214868889142170019164304217955921920158611358020631903399", + "2253001156575716518162806927072031328458328285656897177505902711488581444021", + "1" + ], + [ + "10061466828278257879940361290216783962552587469381995496504138157136699459619", + "2084654502251231158623389108427596301104410727318658755886485404232265711982", + "1" + ], + [ + "5047358973148378475587152882863946529002727435047293143520502313447860667454", + "4952060746057681841993157379165890143617330651779698944343330359819957302296", + "1" + ], + [ + "11780024181637587712156123131660746967372907787195815446123008021030216990110", + "1724613473875111255233244223782287991056072511766758806549939533259538558045", + "1" + ], + [ + "1361907449707758004430456723094953981409384618036880333726173557019775643123", + "1396307300194695204560153775792215169475712217101611935571551073367694531648", + "1" + ], + [ + "11623342184306533112780079170570912918230864247909273789617899324474502187447", + "10888838535689466717983783465844383570701660389226337994275162849716129999664", + "1" + ], + [ + "6124783859307595499636222170266461198066236620256318858241418939512690846210", + "11654418425708266811153155440004903940468493436695057573773222233855590160231", + "1" + ], + [ + "11976417498514914912750414175456702306843413646040221039062851247088509217878", + "16555983317326734322100010817445636022281238681182715698078945752735647300082", + "1" + ], + [ + "2132125313190147327663404604428015937967047155851912765512275238424484618117", + "21746968555622091392044707814331772598114481548815781646306899891364029178430", + "1" + ], + [ + "12935207606620261789628604340498957543368225283200775348265519430484862923793", + "15626703104241434387356621988285708223335267637606857186773174684307705451642", + "1" + ], + [ + "17010033523085371141858786798982360516022860077151037452736191587131050128276", + "10773475930960370976671258275485863540716938004536607798474086138371887800439", + "1" + ], + [ + "11953520675141112861456601737014076292697795937785251540873001131285555641733", + "15281160025214167048777438284446542765985636029715530693096512672181400583657", + "1" + ], + [ + "16191611928372768299576339789378804174936430974202255667438542462412039935317", + "10355806009882081203497567560039478641028371740146166771772540085951272517633", + "1" + ], + [ + "13799184837682491431697050623208976672331620471264961433710772593685879490265", + "13359020907184889891156731713792728430546725199295472877205419019516125060096", + "1" + ], + [ + "15166675180695060656671114192931173135204014172727306515377989962882871893452", + "21469495051764234787689047584062952852856872883086109009603715799720503193452", + "1" + ], + [ + "3651765441416287945242103931370844520138339909966493423413480413467015123888", + "7789270080491911416202812116444065162144180412391910879286863365872016235583", + "1" + ], + [ + "9600202049493185131597107207545083691083297113245371118516611632160919442458", + "21264894863483302212261067128728119962842029613323286102120857532075491389212", + "1" + ], + [ + "19558450196167284702394446749076871284947618845505633615571339824567490949328", + "15003091635350863434975137286003691251614451433178331490457282250858806379236", + "1" + ], + [ + "7974080208038921702505620890159450010496958876424222220856909763755349899499", + "1490993733172674133484484532886822537582786211388003546436994567905033961902", + "1" + ], + [ + "10635719247768214841315695362439142790482997232412125978040405684710712312400", + "2225569268301799464379696667445579148029329257087947754954366162001566375239", + "1" + ], + [ + "8835545015819348787491111586606461636755408196452145204886190876371477782402", + "14580548763782393071951816523691657226064900482319424809042316763218135644855", + "1" + ], + [ + "6424254513133546301512429464976612945093178636194485487844064189026729666889", + "12849292875964890977495285257163556554043109884182961840889874663936800130466", + "1" + ], + [ + "15525499786586004569901570021307444828439109711657257647726086328147099449431", + "12770594875705854579005867871824286945145011691329082036049263133179917794803", + "1" + ], + [ + "3896247763457437935464890907249105544282402713712968003301876351939786784823", + "19643638561262224847942111729275254325534251894703689644539659166080739661499", + "1" + ], + [ + "18354132189987467714578302656668192579350691639624993566431450159961623264054", + "6293000185060651278673868417589876590883295756250366222554111875335207159973", + "1" + ], + [ + "5589699283237403670721182977967951939878445976017576245404026296832369256552", + "12494647520484999828497808984449357310307875851032425623192077895325795974448", + "1" + ], + [ + "6388379047285030901905705039441268258166525962622990688883635049293616997462", + "15447864842469611723999436313564614057071800245057264003997571804863915634366", + "1" + ], + [ + "8814616582178744295319058691296049438996324760892120615036241919501844537295", + "3374160408836466585827998258035249305307810651635917079919223865560096386646", + "1" + ], + [ + "7604287612196893171677551068979464932837868245229819833423361353136300094264", + "13775885269528921571678193491000591231304961261785105527398627779653659704915", + "1" + ], + [ + "19948639476938281718506786480076898198356207066093853203242510428245812689811", + "9426056835487540894127034608306746577816794810647620352539984396070002226536", + "1" + ], + [ + "10143093369789834877912029466914067131591661377113369331319696217437592083336", + "9968277411034720956194877222804249341905703687110141257703691917617731103583", + "1" + ], + [ + "17992039382193877213326595696208530364369833167341524706992503176643448188232", + "18136499695102421380679057624077607076834318902231369108244751555699125633666", + "1" + ], + [ + "13232047845375834953989655162682827644394585840580566526293075973171593466715", + "2015754000429281072793684822774000652413387514911611871210541282304129770558", + "1" + ], + [ + "166100570821078282370343704430299601262430150499860458071579568572464281209", + "19086852127486564029973662613890947947713600402924609840579680001985748926638", + "1" + ], + [ + "6513669260004143824036564753979062367806481422616596802570283128562187362934", + "10736456432529299366779568971552159399152675321254004827384573912415937895217", + "1" + ], + [ + "13155400753621227950931113657654721391233748466177297217639885025304912434087", + "444344396478820853542987743359220940065401968420184252853371130343799014519", + "1" + ], + [ + "12131655806582516081066449464759929376840771653605274087031207636738251463577", + "12266779625530438157794330297514101634174912354857165363078637505619583810455", + "1" + ], + [ + "6764986963672950835323808001069553024465111331950890365410523298159297335639", + "16220937330960945204787201819238794493105276523102877463807577721995767417537", + "1" + ], + [ + "8063990216773789833512912791991455630597861006168623867000832131275458402261", + "8351035125845670915110620764051882694934177668068329101643061480200604907717", + "1" + ], + [ + "6789512153393624451869226206442608880307144029961476384323548122818220258381", + "9043229831555588707239192803985529489265328620174685834418545584073234981889", + "1" + ], + [ + "21491583690268259335781222616698604845689614783378463668793423699580073388471", + "15703094010019503992721159210223968288467875778774531512984149825855756962585", + "1" + ], + [ + "20827123246869799548408416955014407889526648394485443516613943631081109274048", + "17173207941503994597107244766567415411027390421945245867691218724161106682376", + "1" + ], + [ + "9320748993719286019448174601396836779704852183162977138730187957853927348020", + "20424756982187516845636544614561606329577478841867978692299402905735489709348", + "1" + ], + [ + "10012982625064082254040469110809541544633028062107765794802560244720346048514", + "18558301311946030745640592155701455748932134115506966458088913396337554799324", + "1" + ], + [ + "10913743175234292073765904343402756686355364528643883911330404635018026715819", + "11290133208450880064856811213033875436811615524327032890939067197509649668451", + "1" + ], + [ + "6198115563835388408803809263083583344839892978937261064733866047186745366252", + "16306797999182958223339246724764982676247747592615248702199064066446117003029", + "1" + ], + [ + "15609692914543574488525605840645746677300817734786221483276225148951969144559", + "13537805642029017397787750172030608376639279609956698657405351578866062007258", + "1" + ], + [ + "17070739525940965283226404081715954080473965307087097956690629517178573489062", + "11298123213296432217846683876467583704158108436066356508195201337960691475535", + "1" + ], + [ + "16600455355041582004072389377644758065196764223637201641330820983693795861005", + "1126740767306709865005190677203491503268139482522544594435132252689235491717", + "1" + ], + [ + "1753116852265107094903632058327229006683815666794761835433697948098769262864", + "8256002018709783797080311060726663592396439888158850536409663334392119398521", + "1" + ], + [ + "14884657965467110308388972144424487934644255232428892242266913497559286808507", + "622738664344181694133305021045492345400993764170107699146080161400811806157", + "1" + ], + [ + "17989943802590919009931091079099464407912150301053449713009289191112395717859", + "13041282420842447357244840764204590485504533920831879183594333844589642891977", + "1" + ], + [ + "192442491003421872227827929977546574266233914787330130660879117029033646320", + "21670167474788252545152820163011398118902991779087624805079331156782939512952", + "1" + ], + [ + "10041422758315244736300696757085118391082895778387086584507368456521719238026", + "21222310210641179118127742148444784061602509140181096766819395043330602028596", + "1" + ], + [ + "5543851875217390096510469381047765994901563396923042072330862252406073663794", + "1476090747748713541801698843207451031405834033650082003133878187044190887203", + "1" + ], + [ + "8291694446160146373897488528112129379506832112711958956291496996325621884775", + "14467919249569267794226680266310976624398890567892525364189871054925109182876", + "1" + ], + [ + "21812063088766438062093846739761935933075574048275894010962027164038229757473", + "18033837946878174480681694750679359492742568245307460157094714992707404457074", + "1" + ], + [ + "19216712417020373550036662271959470171068302231304530582343012376954299743330", + "1349718155686218490749306906063347180661384712885015162181225502380770629330", + "1" + ], + [ + "10873927746009381382071960426786537596867668927994136292426029546810096130857", + "9984158610505438655332527797436159506095733282505334473879258094051819908065", + "1" + ], + [ + "7734035772382422048084546768304515004280825164579584807649905656269463976542", + "19708950177200088364210694360551721955995436664446994564732756318074241318137", + "1" + ], + [ + "6091441466259084096630439140497407069926503821696729272150946977033178576290", + "5602307861975531013204189771771176314461875861616031945485501446216898591446", + "1" + ], + [ + "5160463707044082965211712978781139804378530736798569495276722629336717464756", + "12130749952607123014452991731594848635114423945296843348497515314813439921518", + "1" + ], + [ + "17844693616384903614334120596398230344025962402268135306900133104722031267918", + "21405237546258878679957182026232138597306677887831330487539515165118891885313", + "1" + ], + [ + "16880116716587826864491787213636353955669742328738978673088482463797683488683", + "9994023020122347086011351906179677888180649000546896391497932655425200544548", + "1" + ], + [ + "10887060399845665234804945437093859708158958924477759879743547812266346654867", + "8872197666381389952754020856574052992422935928769394416607756770262168860600", + "1" + ], + [ + "8787158013866073513265370590115853255524183486627363368513715174737227446549", + "14766990747206105613587316265931797763703720589561415306451896743302868703337", + "1" + ], + [ + "19046998539840728977643535798111806454043492483481502565256297532294412167331", + "21819132389878454937730783906734651252978027538453753388167102949980850007818", + "1" + ], + [ + "16386119208794143074146095638665725804532756232596350082723530720224992635509", + "15049646259148967654023202479422987538760460166622676104149972419928969221743", + "1" + ], + [ + "4405219439943921001936311283365570462051160270864162862248583572823141798026", + "2307310495650296105801894054497065943783087219339752197458386681627692781852", + "1" + ], + [ + "12516285429529712416736171240914804324337849995166333588105303946756011524553", + "10491517343523507175361072694285643080873509677002365804425144206890972986556", + "1" + ], + [ + "10804801657529282177404662005721720471858331554786904429928102991084092949055", + "2878934095415065761042878308773519179285676976664555056962906347209697544577", + "1" + ], + [ + "793946410887828456261718651135538537091971673386269848897485488386603314157", + "12640244773392023120926435401505718602205726327138739021023234508538502320425", + "1" + ], + [ + "19796634717690831324248254227891456618450693302142547641556738226535938857049", + "13250507115426036046310740781307677517424194019086901246555543131670205866283", + "1" + ], + [ + "13158394955882213600346976629573719101985539784033654160525637213737629373019", + "16351396987993152749566984066234994161032191146991558180912663633632317829206", + "1" + ], + [ + "11800252928443455101045874699471759083826372774272745281380501042174888216442", + "18737298545038323901534166034165597641707734616382286031720201245261274691664", + "1" + ], + [ + "5169741056728483301678774385984576396335900042063534011216726845691515123665", + "10155145243544375314210200906998660002555600232374249664954714854555749308589", + "1" + ], + [ + "949114234514474137609363255485184390664758798525174775376592515281870517381", + "15104863141771812933925053693749650312092271121851484203429739671350017244619", + "1" + ], + [ + "18896730392199816153037288349588671870764112523417216028707915561378869666527", + "1461652854098383653033425669221338224322852733079313162141110039031626371702", + "1" + ], + [ + "17461609855496243591519345398329931796112959472673485623758621395248213545649", + "17283952975077071908227705279911306040333872642639590847336703810020586460672", + "1" + ], + [ + "9903420335405489966303944366339257806188129945542765141639941829192465755600", + "12485676561151323355101974037985693538201905512749185613388970871752551563658", + "1" + ], + [ + "21703984820475630784994316067613878776704672152015114577280252842319383946726", + "10202892030908602947311406416343399100950272115937605568002456744733887200596", + "1" + ], + [ + "4717396269233922610240547576493176976901514357024109652960007971524573901736", + "21656221997648835362457183264089219788998905139985285395013774568995585724550", + "1" + ], + [ + "18475588975787547477978611779015701560296990569369446780243805573132658883231", + "5946343085539193794016728738612360506842769725423206953337530847912724400526", + "1" + ], + [ + "10109751107248895621935203038866936712567700350234523821155507782803834749468", + "135867846373614596069212436384597637465654446853794096345118573603515744887", + "1" + ], + [ + "11692961022466079276684019763802604772837013596214732525187851900744414836249", + "8474537230995430034090208533999568892885554623720166476836254857913034059436", + "1" + ], + [ + "8949451304612201020278088099542419688862030850624656647313723627299210043218", + "7519652086785579500262355022669773682693476241488534968185815002336580322133", + "1" + ], + [ + "1522878117977465501066909740618460740230420075854228282330022812735129664501", + "13614768540955582419869033333700959506325932089993566802856552444443766633894", + "1" + ], + [ + "10513256870547524959651538888055695947794595617156157588817269704813878646613", + "7933370671900304034138414410150999140951607335759189615092555403342633584632", + "1" + ], + [ + "18402528191003124997289671802467121587797622388278484442930799062034855181640", + "5479031030983595329986484425620540485443985898848179006500343618431234021696", + "1" + ], + [ + "18994009937673271752676539245293680611975857778763298443472438910446939875398", + "1186369819572816892720072783889668786132162564092425841234079962714324377511", + "1" + ], + [ + "10475261601786086141743094882282038459195520456658013748446022224794526943460", + "4039165332370131766956365844007145304220949165212574797185904571864826244468", + "1" + ], + [ + "3181963759730463855447182974839334930355592039773276780394041148885395013682", + "2804164191303155869302803539263379597162539835939449566864048257905131330809", + "1" + ], + [ + "6965616643471013864325632719616512563889749904752398162885579523982135399401", + "3338613590412668798704951515461112813003786395122344597128522297013716600552", + "1" + ], + [ + "15599912565238481476126846175853253860988398831044353312007707714142644243825", + "192449097993064609257421284750280394529944423391598406365700556148530563824", + "1" + ], + [ + "6573231078591069461095486773621588452233651399968689014270121413571906607534", + "6532713266750244002000664158100569653260006505663962938387546488058215079310", + "1" + ], + [ + "5518040253128519807312612015748219729945985747863396394664312356202584697696", + "21327345629482707767129884621093463694872920818096153103334653117815063032714", + "1" + ], + [ + "17033866652152067415093413157258059594232599100110374664544055420485823092129", + "199565913900409246908098651556038782567937672219336405664551366775295514345", + "1" + ], + [ + "3668053752916024046516206465843524732960940858690296618068466685812308192065", + "8769686692328802611687831076313275687899219807172291065634037573271872477074", + "1" + ], + [ + "2577963977516712974613516995689959794423472748833991929923741030401699283972", + "370793764845782020152081293482807096972256662288113048776682330253549322582", + "1" + ], + [ + "20441867360187522214009765205537429684193241611136764547280540393558428180819", + "19508296066366561217719382906978518667720813825368979614551906017658533524739", + "1" + ], + [ + "15846185247263489650047261024909253946543903046129162561522851357239661283138", + "12980716163693821551483520709688781841577125867021537632547157893421007230035", + "1" + ], + [ + "6175636684474006093352375161340649232701606809069087990786721048502271842998", + "21339728590386072352316913074373412795763178904729008925382269521979603309117", + "1" + ], + [ + "17313174633822395887507643347447763686631913265768594034035976077818265967461", + "6249942114028217668449411164382819253202970898934684184757125104639479662464", + "1" + ], + [ + "12807476885679045137426042558739216961912084155391140549198953173361259664742", + "10859597670065873316032077577760708084318795319104692569119441085266914696661", + "1" + ], + [ + "5554308491520084573769146584175194543995615417451200011045647070779058502636", + "2471440486399629587302183373227599443866455136483254907577625326648989545393", + "1" + ], + [ + "13977911877043849979990613457991088709770369104434083974800189429284674744693", + "2454383579725594281354695885880954082133619410929877773600260501635363991687", + "1" + ], + [ + "12356606381388573644095672728363883749284120766073280555303746053144143199501", + "2397977491492258591243782271884368509388038882649945071355074823337269057931", + "1" + ] + ] +}