diff --git a/Cargo.lock b/Cargo.lock index c5bd4ab1..4203f00b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,6 +279,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" name = "cougr-core" version = "1.1.0" dependencies = [ + "cougr-core", "soroban-sdk", "wee_alloc", ] diff --git a/Cargo.toml b/Cargo.toml index ba4bc968..7aa7a6bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,7 @@ soroban-sdk = "25.1.0" wee_alloc = "0.4.5" [dev-dependencies] +cougr-core = { path = ".", features = ["testutils"] } soroban-sdk = { version = "25.1.0", features = ["testutils"] } [[bench]] diff --git a/examples/hidden_hand/Cargo.lock b/examples/hidden_hand/Cargo.lock index 16cda1d9..2357081d 100644 --- a/examples/hidden_hand/Cargo.lock +++ b/examples/hidden_hand/Cargo.lock @@ -287,8 +287,6 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cougr-core" version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc489e355664841b5fb4d0b19e014c3be1a9b81cd1cd9f7ad29f02fe54a4135" dependencies = [ "soroban-sdk", "wee_alloc", diff --git a/examples/hidden_hand/Cargo.toml b/examples/hidden_hand/Cargo.toml index 6dfe2c04..a3b980ed 100644 --- a/examples/hidden_hand/Cargo.toml +++ b/examples/hidden_hand/Cargo.toml @@ -11,11 +11,11 @@ crate-type = ["cdylib", "rlib"] [dependencies] soroban-sdk = "25.1.0" -cougr-core = "1.1.0" +cougr-core = { path = "../../" } [dev-dependencies] soroban-sdk = { version = "25.1.0", features = ["testutils"] } -cougr-core = { version = "1.1.0", features = ["testutils"] } +cougr-core = { path = "../../", features = ["testutils"] } [profile.release] opt-level = "z" diff --git a/internal/cougr-core-circuits/circom/lib/deck.circom b/internal/cougr-core-circuits/circom/lib/deck.circom index a3569661..b30cc412 100644 --- a/internal/cougr-core-circuits/circom/lib/deck.circom +++ b/internal/cougr-core-circuits/circom/lib/deck.circom @@ -68,53 +68,16 @@ template CardRange(maxCard) { template HandUnique(handSize) { signal input hand[handSize]; - component eq0 = IsEqual(); - eq0.in[0] <== hand[0]; - eq0.in[1] <== hand[1]; - eq0.out === 0; - - component eq1 = IsEqual(); - eq1.in[0] <== hand[0]; - eq1.in[1] <== hand[2]; - eq1.out === 0; - - component eq2 = IsEqual(); - eq2.in[0] <== hand[0]; - eq2.in[1] <== hand[3]; - eq2.out === 0; - - component eq3 = IsEqual(); - eq3.in[0] <== hand[0]; - eq3.in[1] <== hand[4]; - eq3.out === 0; - - component eq4 = IsEqual(); - eq4.in[0] <== hand[1]; - eq4.in[1] <== hand[2]; - eq4.out === 0; - - component eq5 = IsEqual(); - eq5.in[0] <== hand[1]; - eq5.in[1] <== hand[3]; - eq5.out === 0; - - component eq6 = IsEqual(); - eq6.in[0] <== hand[1]; - eq6.in[1] <== hand[4]; - eq6.out === 0; - - component eq7 = IsEqual(); - eq7.in[0] <== hand[2]; - eq7.in[1] <== hand[3]; - eq7.out === 0; - - component eq8 = IsEqual(); - eq8.in[0] <== hand[2]; - eq8.in[1] <== hand[4]; - eq8.out === 0; - - component eq9 = IsEqual(); - eq9.in[0] <== hand[3]; - eq9.in[1] <== hand[4]; - eq9.out === 0; + var pairs = handSize * (handSize - 1) / 2; + component eq[pairs]; + var idx = 0; + for (var i = 0; i < handSize; i++) { + for (var j = i + 1; j < handSize; j++) { + eq[idx] = IsEqual(); + eq[idx].in[0] <== hand[i]; + eq[idx].in[1] <== hand[j]; + eq[idx].out === 0; + idx++; + } + } } \ No newline at end of file diff --git a/internal/cougr-core-circuits/package-lock.json b/internal/cougr-core-circuits/package-lock.json new file mode 100644 index 00000000..0fa7f8c6 --- /dev/null +++ b/internal/cougr-core-circuits/package-lock.json @@ -0,0 +1,1499 @@ +{ + "name": "cougr-core-circuits-toolchain", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "cougr-core-circuits-toolchain", + "devDependencies": { + "circomlib": "2.0.5", + "circomlibjs": "0.1.7", + "snarkjs": "0.7.6" + } + }, + "node_modules/@ethersproject/abi": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.8.0.tgz", + "integrity": "sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.8.0.tgz", + "integrity": "sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/networks": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/web": "^5.8.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.8.0.tgz", + "integrity": "sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.8.0.tgz", + "integrity": "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/rlp": "^5.8.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.8.0.tgz", + "integrity": "sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0" + } + }, + "node_modules/@ethersproject/basex": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.8.0.tgz", + "integrity": "sha512-PIgTszMlDRmNwW9nhS6iqtVfdTAKosA7llYXNmGPw4YAI1PUyMv28988wAb41/gHF/WqGdoLv0erHaRcHRKW2Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/properties": "^5.8.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.8.0.tgz", + "integrity": "sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz", + "integrity": "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.8.0.tgz", + "integrity": "sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0" + } + }, + "node_modules/@ethersproject/contracts": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.8.0.tgz", + "integrity": "sha512-0eFjGz9GtuAi6MZwhb4uvUM216F38xiuR0yYCjKJpNfSEy4HUM8hvqqBj9Jmm0IUz8l0xKEhWwLIhPgxNY0yvQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abi": "^5.8.0", + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/transactions": "^5.8.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.8.0.tgz", + "integrity": "sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/hdnode": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.8.0.tgz", + "integrity": "sha512-4bK1VF6E83/3/Im0ERnnUeWOY3P1BZml4ZD3wcH8Ys0/d1h1xaFt6Zc+Dh9zXf9TapGro0T4wvO71UTCp3/uoA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/basex": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/pbkdf2": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/sha2": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0", + "@ethersproject/strings": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/wordlists": "^5.8.0" + } + }, + "node_modules/@ethersproject/json-wallets": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.8.0.tgz", + "integrity": "sha512-HxblNck8FVUtNxS3VTEYJAcwiKYsBIF77W15HufqlBF9gGfhmYOJtYZp8fSDZtn9y5EaXTE87zDwzxRoTFk11w==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/hdnode": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/pbkdf2": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/random": "^5.8.0", + "@ethersproject/strings": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.8.0.tgz", + "integrity": "sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz", + "integrity": "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT" + }, + "node_modules/@ethersproject/networks": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.8.0.tgz", + "integrity": "sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/pbkdf2": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.8.0.tgz", + "integrity": "sha512-wuHiv97BrzCmfEaPbUFpMjlVg/IDkZThp9Ri88BpjRleg4iePJaj2SW8AIyE8cXn5V1tuAaMj6lzvsGJkGWskg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/sha2": "^5.8.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.8.0.tgz", + "integrity": "sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/providers": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.8.0.tgz", + "integrity": "sha512-3Il3oTzEx3o6kzcg9ZzbE+oCZYyY+3Zh83sKkn4s1DZfTUjIegHnN2Cm0kbn9YFy45FDVcuCLLONhU7ny0SsCw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/base64": "^5.8.0", + "@ethersproject/basex": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/networks": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/random": "^5.8.0", + "@ethersproject/rlp": "^5.8.0", + "@ethersproject/sha2": "^5.8.0", + "@ethersproject/strings": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/web": "^5.8.0", + "bech32": "1.1.4", + "ws": "8.18.0" + } + }, + "node_modules/@ethersproject/random": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.8.0.tgz", + "integrity": "sha512-E4I5TDl7SVqyg4/kkA/qTfuLWAQGXmSOgYyO01So8hLfwgKvYK5snIlzxJMk72IFdG/7oh8yuSqY2KX7MMwg+A==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.8.0.tgz", + "integrity": "sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/sha2": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.8.0.tgz", + "integrity": "sha512-dDOUrXr9wF/YFltgTBYS0tKslPEKr6AekjqDW2dbn1L1xmjGR+9GiKu4ajxovnrDbwxAKdHjW8jNcwfz8PAz4A==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.8.0.tgz", + "integrity": "sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "bn.js": "^5.2.1", + "elliptic": "6.6.1", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/solidity": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.8.0.tgz", + "integrity": "sha512-4CxFeCgmIWamOHwYN9d+QWGxye9qQLilpgTU0XhYs1OahkclF+ewO+3V1U0mvpiuQxm5EHHmv8f7ClVII8EHsA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/sha2": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz", + "integrity": "sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.8.0.tgz", + "integrity": "sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/rlp": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0" + } + }, + "node_modules/@ethersproject/units": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.8.0.tgz", + "integrity": "sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/wallet": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.8.0.tgz", + "integrity": "sha512-G+jnzmgg6UxurVKRKvw27h0kvG75YKXZKdlLYmAHeF32TGUzHkOFd7Zn6QHOTYRFWnfjtSSFjBowKo7vfrXzPA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/hdnode": "^5.8.0", + "@ethersproject/json-wallets": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/random": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/wordlists": "^5.8.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.8.0.tgz", + "integrity": "sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/wordlists": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.8.0.tgz", + "integrity": "sha512-2df9bbXicZws2Sb5S6ET493uJ0Z84Fjr3pC4tu/qlnZERibZCeUVuqdtt+7Tv9xxhUxHoIekIA7avrKUWHrezg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@iden3/bigarray": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@iden3/bigarray/-/bigarray-0.0.2.tgz", + "integrity": "sha512-Xzdyxqm1bOFF6pdIsiHLLl3HkSLjbhqJHVyqaTxXt3RqXBEnmsUmEW47H7VOi/ak7TdkRpNkxjyK5Zbkm+y52g==", + "dev": true, + "license": "GPL-3.0" + }, + "node_modules/@iden3/binfileutils": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@iden3/binfileutils/-/binfileutils-0.0.12.tgz", + "integrity": "sha512-naAmzuDufRIcoNfQ1d99d7hGHufLA3wZSibtr4dMe6ZeiOPV1KwOZWTJ1YVz4HbaWlpDuzVU72dS4ATQS4PXBQ==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "fastfile": "0.0.20", + "ffjavascript": "^0.3.0" + } + }, + "node_modules/@iden3/binfileutils/node_modules/ffjavascript": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.1.tgz", + "integrity": "sha512-4PbK1WYodQtuF47D4pRI5KUg3Q392vuP5WjE1THSnceHdXwU3ijaoS0OqxTzLknCtz4Z2TtABzkBdBdMn3B/Aw==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.2", + "web-worker": "1.2.0" + } + }, + "node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, + "node_modules/b4a": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.8.1.tgz", + "integrity": "sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==", + "dev": true, + "license": "Apache-2.0", + "peerDependencies": { + "react-native-b4a": "*" + }, + "peerDependenciesMeta": { + "react-native-b4a": { + "optional": true + } + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/bfj": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/bfj/-/bfj-7.1.0.tgz", + "integrity": "sha512-I6MMLkn+anzNdCUp9hMRyui1HaNEUCco50lxbvNS4+EyXg8lN3nJ48PjPWtbH8UVS9CuMoaKE9U2V3l29DaRQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bluebird": "^3.7.2", + "check-types": "^11.2.3", + "hoopy": "^0.1.4", + "jsonpath": "^1.1.1", + "tryer": "^1.0.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/blake-hash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/blake-hash/-/blake-hash-2.0.0.tgz", + "integrity": "sha512-Igj8YowDu1PRkRsxZA7NVkdFNxH5rKv5cpLxQ0CVXSIA77pVYwCPRQJ2sMew/oneUpfuYRyjG6r8SmmmnbZb1w==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.2", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/blake2b": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.4.tgz", + "integrity": "sha512-AyBuuJNI64gIvwx13qiICz6H6hpmjvYS5DGkG6jbXMOT8Z3WUJ3V1X0FlhIoT1b/5JtHE3ki+xjtMvu1nn+t9A==", + "dev": true, + "license": "ISC", + "dependencies": { + "blake2b-wasm": "^2.4.0", + "nanoassert": "^2.0.0" + } + }, + "node_modules/blake2b-wasm": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-2.4.0.tgz", + "integrity": "sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "b4a": "^1.0.1", + "nanoassert": "^2.0.0" + } + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/bn.js": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.5.tgz", + "integrity": "sha512-Vq886eXykuP5E6HcKSSStP3bJgrE6In5WKxVUvJ8XGpWWYs2xZHWqUwzCtGgEtBcxyd57KBFDPFoUfNzdaHCNg==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.2.tgz", + "integrity": "sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/check-types": { + "version": "11.2.3", + "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.2.3.tgz", + "integrity": "sha512-+67P1GkJRaxQD6PKK0Et9DhwQB+vGg3PM5+aavopCpZT1lj9jeqfvpgTLAWErNj8qApkkmXlu/Ug74kmhagkXg==", + "dev": true, + "license": "MIT" + }, + "node_modules/circom_runtime": { + "version": "0.1.28", + "resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.28.tgz", + "integrity": "sha512-ACagpQ7zBRLKDl5xRZ4KpmYIcZDUjOiNRuxvXLqhnnlLSVY1Dbvh73TI853nqoR0oEbihtWmMSjgc5f+pXf/jQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "ffjavascript": "0.3.1" + }, + "bin": { + "calcwit": "calcwit.js" + } + }, + "node_modules/circom_runtime/node_modules/ffjavascript": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.1.tgz", + "integrity": "sha512-4PbK1WYodQtuF47D4pRI5KUg3Q392vuP5WjE1THSnceHdXwU3ijaoS0OqxTzLknCtz4Z2TtABzkBdBdMn3B/Aw==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.2", + "web-worker": "1.2.0" + } + }, + "node_modules/circomlib": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/circomlib/-/circomlib-2.0.5.tgz", + "integrity": "sha512-O7NQ8OS+J4eshBuoy36z/TwQU0YHw8W3zxZcs4hVwpEll3e4hDm3mgkIPqItN8FDeLEKZFK3YeT/+k8TiLF3/A==", + "dev": true, + "license": "GPL-3.0" + }, + "node_modules/circomlibjs": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/circomlibjs/-/circomlibjs-0.1.7.tgz", + "integrity": "sha512-GRAUoAlKAsiiTa+PA725G9RmEmJJRc8tRFxw/zKktUxlQISGznT4hH4ESvW8FNTsrGg/nNd06sGP/Wlx0LUHVg==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "blake-hash": "^2.0.0", + "blake2b": "^2.1.3", + "ethers": "^5.5.1", + "ffjavascript": "^0.2.45" + } + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.5", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.5.tgz", + "integrity": "sha512-3aRg6/JxfffFD+OlOjOFR3Vo79l39ooBTFucxx+MT3dhCtzn3EmiUPQo+6/OZuI2jbXi3YKgmiTFBgChQMwIRQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esprima": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz", + "integrity": "sha512-S9VbPDU0adFErpDai3qDkjq8+G05ONtKzcyNrPKg/ZKa+tf879nX2KexNU95b31UoTJjRLInNBHHHjFPoCd7lQ==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ethers": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.8.0.tgz", + "integrity": "sha512-DUq+7fHrCg1aPDFCHx6UIPb3nmt2XMpM7Y/g2gLhsl3lIBqeAfOJIl1qEvRf2uq3BiKxmh6Fh5pfp2ieyek7Kg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abi": "5.8.0", + "@ethersproject/abstract-provider": "5.8.0", + "@ethersproject/abstract-signer": "5.8.0", + "@ethersproject/address": "5.8.0", + "@ethersproject/base64": "5.8.0", + "@ethersproject/basex": "5.8.0", + "@ethersproject/bignumber": "5.8.0", + "@ethersproject/bytes": "5.8.0", + "@ethersproject/constants": "5.8.0", + "@ethersproject/contracts": "5.8.0", + "@ethersproject/hash": "5.8.0", + "@ethersproject/hdnode": "5.8.0", + "@ethersproject/json-wallets": "5.8.0", + "@ethersproject/keccak256": "5.8.0", + "@ethersproject/logger": "5.8.0", + "@ethersproject/networks": "5.8.0", + "@ethersproject/pbkdf2": "5.8.0", + "@ethersproject/properties": "5.8.0", + "@ethersproject/providers": "5.8.0", + "@ethersproject/random": "5.8.0", + "@ethersproject/rlp": "5.8.0", + "@ethersproject/sha2": "5.8.0", + "@ethersproject/signing-key": "5.8.0", + "@ethersproject/solidity": "5.8.0", + "@ethersproject/strings": "5.8.0", + "@ethersproject/transactions": "5.8.0", + "@ethersproject/units": "5.8.0", + "@ethersproject/wallet": "5.8.0", + "@ethersproject/web": "5.8.0", + "@ethersproject/wordlists": "5.8.0" + } + }, + "node_modules/fastfile": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/fastfile/-/fastfile-0.0.20.tgz", + "integrity": "sha512-r5ZDbgImvVWCP0lA/cGNgQcZqR+aYdFx3u+CtJqUE510pBUVGMn4ulL/iRTI4tACTYsNJ736uzFxEBXesPAktA==", + "dev": true, + "license": "GPL-3.0" + }, + "node_modules/ffjavascript": { + "version": "0.2.63", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.63.tgz", + "integrity": "sha512-dBgdsfGks58b66JnUZeZpGxdMIDQ4QsD3VYlRJyFVrKQHb2kJy4R2gufx5oetrTxXPT+aEjg0dOvOLg1N0on4A==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.2", + "web-worker": "1.2.0" + } + }, + "node_modules/filelist": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.6.tgz", + "integrity": "sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/hoopy": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", + "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/jake": { + "version": "10.9.4", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", + "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.6", + "filelist": "^1.0.4", + "picocolors": "^1.1.1" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonpath": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.3.0.tgz", + "integrity": "sha512-0kjkYHJBkAy50Z5QzArZ7udmvxrJzkpKYW27fiF//BrMY7TQibYLl+FYIXN2BiYmwMIVzSfD8aDRj6IzgBX2/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "esprima": "1.2.5", + "static-eval": "2.1.1", + "underscore": "1.13.6" + } + }, + "node_modules/logplease": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/logplease/-/logplease-1.2.15.tgz", + "integrity": "sha512-jLlHnlsPSJjpwUfcNyUxXCl33AYg2cHhIf9QhGL2T4iPT0XPB+xP1LRKFPgIg1M/sg9kAJvy94w9CzBNrfnstA==", + "dev": true, + "license": "MIT" + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "dev": true, + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/nanoassert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-2.0.0.tgz", + "integrity": "sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==", + "dev": true, + "license": "ISC" + }, + "node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "dev": true, + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/r1csfile": { + "version": "0.0.48", + "resolved": "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.48.tgz", + "integrity": "sha512-kHRkKUJNaor31l05f2+RFzvcH5XSa7OfEfd/l4hzjte6NL6fjRkSMfZ4BjySW9wmfdwPOtq3mXurzPvPGEf5Tw==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "@iden3/bigarray": "0.0.2", + "@iden3/binfileutils": "0.0.12", + "fastfile": "0.0.20", + "ffjavascript": "0.3.0" + } + }, + "node_modules/r1csfile/node_modules/ffjavascript": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.0.tgz", + "integrity": "sha512-l7sR5kmU3gRwDy8g0Z2tYBXy5ttmafRPFOqY7S6af5cq51JqJWt5eQ/lSR/rs2wQNbDYaYlQr5O+OSUf/oMLoQ==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.2", + "web-worker": "1.2.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true, + "license": "MIT" + }, + "node_modules/snarkjs": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.7.6.tgz", + "integrity": "sha512-4uH1xA5JzVU5jaaWS2fXej3+RC6L5Erhr6INTJtUA27du4Elbh4VXCeeRjB4QiwL6N6y7SNKePw5prTxyEf4Zg==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "@iden3/binfileutils": "0.0.12", + "@noble/hashes": "^1.7.1", + "bfj": "^7.0.2", + "circom_runtime": "0.1.28", + "ejs": "^3.1.6", + "fastfile": "0.0.20", + "ffjavascript": "0.3.1", + "logplease": "^1.2.15", + "r1csfile": "0.0.48" + }, + "bin": { + "snarkjs": "build/cli.cjs" + } + }, + "node_modules/snarkjs/node_modules/ffjavascript": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.1.tgz", + "integrity": "sha512-4PbK1WYodQtuF47D4pRI5KUg3Q392vuP5WjE1THSnceHdXwU3ijaoS0OqxTzLknCtz4Z2TtABzkBdBdMn3B/Aw==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16", + "wasmcurves": "0.2.2", + "web-worker": "1.2.0" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-eval": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.1.1.tgz", + "integrity": "sha512-MgWpQ/ZjGieSVB3eOJVs4OA2LT/q1vx98KPCTTQPzq/aLr0YUXTsgryTXr4SLfR0ZfUUCiedM9n/ABeDIyy4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "escodegen": "^2.1.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/tryer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", + "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", + "dev": true, + "license": "MIT" + }, + "node_modules/underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/wasmbuilder": { + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/wasmbuilder/-/wasmbuilder-0.0.16.tgz", + "integrity": "sha512-Qx3lEFqaVvp1cEYW7Bfi+ebRJrOiwz2Ieu7ZG2l7YyeSJIok/reEQCQCuicj/Y32ITIJuGIM9xZQppGx5LrQdA==", + "dev": true, + "license": "GPL-3.0" + }, + "node_modules/wasmcurves": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.2.tgz", + "integrity": "sha512-JRY908NkmKjFl4ytnTu5ED6AwPD+8VJ9oc94kdq7h5bIwbj0L4TDJ69mG+2aLs2SoCmGfqIesMWTEJjtYsoQXQ==", + "dev": true, + "license": "GPL-3.0", + "dependencies": { + "wasmbuilder": "0.0.16" + } + }, + "node_modules/web-worker": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz", + "integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/internal/cougr-core-circuits/scripts/compile.ps1 b/internal/cougr-core-circuits/scripts/compile.ps1 new file mode 100644 index 00000000..d96eaf91 --- /dev/null +++ b/internal/cougr-core-circuits/scripts/compile.ps1 @@ -0,0 +1,29 @@ +Param( + [string]$Circom = "circom" +) + +$Root = Split-Path -Parent $MyInvocation.MyCommand.Path +$CircomDir = Join-Path $Root "..\circom" | Resolve-Path -Relative +$OutDir = Join-Path $Root "..\artifacts" | Resolve-Path -Relative + +$DeckSize = if ($env:DECK_SIZE) { $env:DECK_SIZE } else { "52" } +$HandSize = if ($env:HAND_SIZE) { $env:HAND_SIZE } else { "5" } + +if (-not (Get-Command $Circom -ErrorAction SilentlyContinue)) { + Write-Error "circom not found - install circom and ensure it's on PATH" + exit 1 +} + +New-Item -ItemType Directory -Path $OutDir -Force | Out-Null + +$HiddenCardsFile = Join-Path $CircomDir "hidden_cards.circom" +(Get-Content $HiddenCardsFile) -replace 'HiddenCards\(\d+,\s*\d+\)', "HiddenCards($DeckSize, $HandSize)" | Set-Content $HiddenCardsFile + +${circuits} = @("hidden_cards","fog_of_war","fair_dice","sealed_bid") +foreach ($c in ${circuits}) { + Write-Host ("compiling {0}..." -f $c) + & $Circom (Join-Path $CircomDir ("{0}.circom" -f $c)) -l (Join-Path $Root "..\node_modules\circomlib\circuits") -l $CircomDir --r1cs --wasm --sym -o $OutDir + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } +} + +Write-Host "artifacts written to $OutDir" diff --git a/internal/cougr-core-circuits/scripts/compile.sh b/internal/cougr-core-circuits/scripts/compile.sh index 68dfbf7d..ebb84f1d 100755 --- a/internal/cougr-core-circuits/scripts/compile.sh +++ b/internal/cougr-core-circuits/scripts/compile.sh @@ -7,6 +7,9 @@ CIRCOM_DIR="$ROOT/circom" OUT_DIR="$ROOT/artifacts" CIRCOM_BIN="${CIRCOM:-circom}" +DECK_SIZE="${DECK_SIZE:-52}" +HAND_SIZE="${HAND_SIZE:-5}" + if ! command -v "$CIRCOM_BIN" >/dev/null 2>&1; then echo "circom not found — set CIRCOM or install from https://github.com/iden3/circom" >&2 exit 1 @@ -14,6 +17,9 @@ fi mkdir -p "$OUT_DIR" +# Parameterize hidden_cards.circom main component instantiation +sed -i.bak -E "s/HiddenCards\([0-9]+, *[0-9]+\)/HiddenCards(${DECK_SIZE}, ${HAND_SIZE})/g" "$CIRCOM_DIR/hidden_cards.circom" && rm -f "$CIRCOM_DIR/hidden_cards.circom.bak" + for circuit in hidden_cards fog_of_war fair_dice sealed_bid; do echo "compiling $circuit..." "$CIRCOM_BIN" "$CIRCOM_DIR/${circuit}.circom" \ diff --git a/internal/cougr-core-circuits/scripts/download-ptau.sh b/internal/cougr-core-circuits/scripts/download-ptau.sh index 860e9b32..bd7cde0a 100755 --- a/internal/cougr-core-circuits/scripts/download-ptau.sh +++ b/internal/cougr-core-circuits/scripts/download-ptau.sh @@ -4,7 +4,7 @@ set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" KEYS="$ROOT/keys" -POWER="${PTAU_POWER:-14}" +POWER="${PTAU_POWER:-16}" PTAU="$KEYS/pot${POWER}_final.ptau" mkdir -p "$KEYS" diff --git a/internal/cougr-core-circuits/scripts/generate-fixtures.mjs b/internal/cougr-core-circuits/scripts/generate-fixtures.mjs index d25daf50..fc2441d9 100644 --- a/internal/cougr-core-circuits/scripts/generate-fixtures.mjs +++ b/internal/cougr-core-circuits/scripts/generate-fixtures.mjs @@ -28,9 +28,11 @@ function deckRoot(salt, deck) { mkdirSync(FIXTURES, { recursive: true }); -// hidden_cards -const deck = Array.from({ length: 52 }, (_, i) => i + 1); -const hand = [1, 2, 3, 4, 5]; +// hidden_cards (deck and hand sizes can be customized via env vars DECK_SIZE and HAND_SIZE) +const DECK_SIZE = Number(process.env.DECK_SIZE || "52"); +const HAND_SIZE = Number(process.env.HAND_SIZE || "5"); +const deck = Array.from({ length: DECK_SIZE }, (_, i) => i + 1); +const hand = Array.from({ length: HAND_SIZE }, (_, i) => i + 1); const deckSalt = "12345"; const playerId = "2"; const handCommitment = hash([playerId, ...hand]); @@ -43,8 +45,8 @@ writeFileSync( deck_root: deckRootVal, hand_commitment: handCommitment, player_id: playerId, - deck_size: "52", - hand_size: "5", + deck_size: String(DECK_SIZE), + hand_size: String(HAND_SIZE), hand, deck, deck_salt: deckSalt, diff --git a/internal/cougr-core-circuits/scripts/lib.sh b/internal/cougr-core-circuits/scripts/lib.sh index a8d5c857..01dd6511 100644 --- a/internal/cougr-core-circuits/scripts/lib.sh +++ b/internal/cougr-core-circuits/scripts/lib.sh @@ -10,5 +10,7 @@ cougr_circuits_root() { cougr_circuits_export_path() { local root root="$(cougr_circuits_root)" - export PATH="$root/node_modules/.bin:$PATH" + local repo_root + repo_root="$(cd "$root/../.." && pwd)" + export PATH="$repo_root/target/circom_bin/bin:$root/node_modules/.bin:$PATH" } \ No newline at end of file diff --git a/internal/cougr-core-circuits/scripts/setup.sh b/internal/cougr-core-circuits/scripts/setup.sh index 6408f9ed..490329f6 100755 --- a/internal/cougr-core-circuits/scripts/setup.sh +++ b/internal/cougr-core-circuits/scripts/setup.sh @@ -11,7 +11,7 @@ KEYS="$ROOT/keys" mkdir -p "$KEYS" -POWER="${PTAU_POWER:-14}" +POWER="${PTAU_POWER:-16}" PTAU="$KEYS/pot${POWER}_final.ptau" if [[ ! -f "$PTAU" ]]; then "$(dirname "$0")/download-ptau.sh" diff --git a/src/circuits/embedded.rs b/src/circuits/embedded.rs index a8cdcf2f..6a1af968 100644 --- a/src/circuits/embedded.rs +++ b/src/circuits/embedded.rs @@ -2,9 +2,13 @@ //! //! Regenerate via `internal/cougr-core-circuits`: `bun run pipeline`. -use soroban_sdk::{BytesN, Env}; +#[cfg(any(test, feature = "testutils"))] +use soroban_sdk::BytesN; +use soroban_sdk::Env; -use crate::zk::types::{Groth16Proof, Scalar, VerificationKey}; +use crate::zk::types::VerificationKey; +#[cfg(any(test, feature = "testutils"))] +use crate::zk::types::{Groth16Proof, Scalar}; use super::generated; #[cfg(any(test, feature = "testutils"))] diff --git a/src/circuits/generated.rs b/src/circuits/generated.rs index 5b4fe5a1..abb37796 100644 --- a/src/circuits/generated.rs +++ b/src/circuits/generated.rs @@ -32,57 +32,57 @@ pub const HIDDEN_CARDS_VK_GAMMA: [u8; 128] = [ 0xe3, 0xd1, 0xe7, 0x69, 0x0c, 0x43, 0xd3, 0x7b, 0x4c, 0xe6, 0xcc, 0x01, 0x66, 0xfa, 0x7d, 0xaa, ]; pub const HIDDEN_CARDS_VK_DELTA: [u8; 128] = [ - 0x0f, 0x76, 0x9b, 0xc4, 0x50, 0x05, 0xb4, 0x75, 0x5c, 0x70, 0x3c, 0xf9, 0xdd, 0x3a, 0x01, 0x9b, - 0xd0, 0xe1, 0x70, 0x49, 0xc3, 0x7c, 0x7b, 0x50, 0x34, 0xf2, 0x19, 0xb5, 0x79, 0xaf, 0x15, 0x83, - 0x14, 0xec, 0x44, 0xce, 0x27, 0xb4, 0xc6, 0x14, 0x00, 0xcb, 0xf4, 0x4c, 0x1c, 0x36, 0x0b, 0x29, - 0xc0, 0xc8, 0x0a, 0xc5, 0xcf, 0x84, 0x11, 0x92, 0x9a, 0xc3, 0x9d, 0xa7, 0xd0, 0x29, 0xad, 0xa8, - 0x2b, 0xed, 0x7d, 0xd0, 0x8f, 0xe3, 0xfa, 0xc3, 0x0a, 0x84, 0x67, 0xc7, 0xed, 0x0a, 0xcc, 0x67, - 0x87, 0x29, 0x99, 0x9e, 0x96, 0xab, 0x6a, 0x99, 0xbb, 0x69, 0x84, 0x8b, 0xd6, 0xd0, 0x65, 0x5e, - 0x14, 0xe6, 0xf9, 0x51, 0xdd, 0xc1, 0x59, 0x27, 0xcb, 0xaf, 0x6d, 0x03, 0xf8, 0x42, 0x52, 0xf2, - 0xeb, 0x67, 0x1c, 0xf3, 0x76, 0xdd, 0x8f, 0x92, 0x53, 0xd7, 0xad, 0xfa, 0x2b, 0xee, 0x72, 0x0f, + 0x19, 0x2e, 0xf3, 0xae, 0x66, 0x0d, 0x05, 0xb6, 0x64, 0x75, 0xc0, 0xb8, 0xaa, 0x8c, 0x88, 0x06, + 0x88, 0x1c, 0x66, 0x5c, 0x22, 0x2b, 0xf7, 0xe3, 0x73, 0x2c, 0x85, 0xd5, 0x83, 0x59, 0xb5, 0x55, + 0x1c, 0xdf, 0x82, 0x0e, 0xa0, 0x30, 0x4a, 0xae, 0xff, 0x5e, 0xd2, 0x99, 0xc6, 0xdf, 0xfe, 0xf9, + 0x07, 0xd0, 0x97, 0xfc, 0x8a, 0xf8, 0x3b, 0x55, 0x2f, 0xf8, 0x7e, 0xe5, 0xac, 0x5e, 0x13, 0xb8, + 0x03, 0x55, 0xe3, 0x9e, 0x57, 0x70, 0x82, 0x68, 0xef, 0x15, 0x47, 0xc2, 0x25, 0xfa, 0xc2, 0x14, + 0x23, 0x3f, 0xcf, 0x98, 0xe1, 0xce, 0x5c, 0xc6, 0xc7, 0x18, 0x35, 0x3f, 0xe5, 0x1c, 0x8d, 0x67, + 0x21, 0x5b, 0x98, 0xc7, 0xfb, 0xe4, 0x66, 0x70, 0xbf, 0xf7, 0x3e, 0x08, 0x18, 0x0c, 0x65, 0x9c, + 0xc4, 0x62, 0xfe, 0x70, 0x1d, 0x5f, 0x0d, 0xe3, 0x28, 0x54, 0x6e, 0x6e, 0x79, 0x1b, 0x33, 0xad, ]; pub const HIDDEN_CARDS_VK_IC: [[u8; 64]; 6] = [ [ - 0x25, 0x36, 0x38, 0x78, 0xa8, 0x36, 0x03, 0x81, 0xd6, 0x68, 0xb4, 0xc3, 0xba, 0x5a, 0xef, - 0xc4, 0x9c, 0x84, 0x38, 0x56, 0x19, 0x1d, 0x78, 0xac, 0xe3, 0x8a, 0xf7, 0x2a, 0xc8, 0x98, - 0x6a, 0x53, 0x2b, 0x7f, 0xb2, 0xf9, 0x5e, 0x69, 0x1e, 0x6c, 0xfc, 0xb7, 0x36, 0x08, 0x7d, - 0x06, 0xde, 0x1f, 0x33, 0xc9, 0xb5, 0x71, 0x03, 0x8c, 0x6f, 0x92, 0x71, 0x2e, 0x4d, 0x3a, - 0x87, 0xe6, 0xfe, 0x7e, + 0x03, 0x9f, 0x88, 0xd7, 0x54, 0xc3, 0x7e, 0x04, 0xc7, 0x1f, 0x93, 0xf7, 0x35, 0x9e, 0xf8, + 0x02, 0x5d, 0x62, 0xe7, 0x3c, 0x4c, 0xeb, 0x9f, 0x7a, 0x15, 0x0f, 0x64, 0x2a, 0x46, 0x59, + 0xae, 0x44, 0x2c, 0x95, 0x98, 0x64, 0x1b, 0xa4, 0xd2, 0x78, 0xe0, 0xa8, 0x6f, 0x5f, 0x79, + 0x61, 0xe0, 0xc1, 0xca, 0x8a, 0x80, 0x10, 0xe6, 0xf9, 0xf6, 0x00, 0xdd, 0xe6, 0xf9, 0x70, + 0x0d, 0x50, 0x05, 0x83, ], // ic[0] [ - 0x07, 0x5e, 0x51, 0x73, 0x97, 0x3d, 0xdb, 0x3f, 0x60, 0x6d, 0x8d, 0xc4, 0x7f, 0x31, 0xee, - 0x65, 0x90, 0xf4, 0x96, 0x08, 0xe7, 0x55, 0x67, 0x2b, 0x5f, 0xce, 0xb9, 0x30, 0xd0, 0x17, - 0xde, 0xfa, 0x30, 0x23, 0xd4, 0xdf, 0x70, 0xed, 0xd1, 0xe6, 0x5e, 0x07, 0x28, 0xcc, 0xf5, - 0x56, 0x73, 0x42, 0x43, 0x9c, 0xc7, 0xe6, 0x97, 0x13, 0xe8, 0x79, 0x4f, 0x39, 0x40, 0x26, - 0x2e, 0x8c, 0x2f, 0x34, + 0x21, 0x52, 0xde, 0x13, 0x4e, 0x97, 0xb7, 0x88, 0x56, 0xf2, 0xbc, 0x17, 0x46, 0x3f, 0xf6, + 0x64, 0x79, 0xe0, 0x76, 0x3a, 0xab, 0x66, 0x02, 0xe5, 0xb3, 0xec, 0x70, 0xf3, 0x92, 0x37, + 0xdb, 0x02, 0x25, 0x05, 0x37, 0x08, 0x74, 0x9e, 0xe0, 0x75, 0x53, 0x83, 0xce, 0x9d, 0x0f, + 0xe5, 0x67, 0x84, 0xf2, 0x75, 0x26, 0x57, 0x4a, 0xe7, 0x13, 0x50, 0x4f, 0xa6, 0xb4, 0xd5, + 0x43, 0xcc, 0x0a, 0x97, ], // ic[1] [ - 0x01, 0xee, 0x0f, 0x94, 0x92, 0xeb, 0x64, 0xcf, 0xe6, 0x5f, 0x08, 0x1a, 0x99, 0x10, 0xb3, - 0xa2, 0xe5, 0x0b, 0x67, 0x2a, 0x21, 0x5c, 0x5f, 0xb7, 0x7a, 0x8c, 0xc0, 0xf5, 0x38, 0x0a, - 0x25, 0x3b, 0x26, 0xdb, 0x35, 0xee, 0xdc, 0x32, 0x8f, 0x34, 0x78, 0x20, 0xe7, 0xcd, 0x53, - 0x1a, 0x34, 0x4f, 0x63, 0xc8, 0x05, 0xb7, 0x64, 0xf9, 0x55, 0xf0, 0x8a, 0x1d, 0x36, 0xfc, - 0x90, 0x4c, 0xab, 0x1b, + 0x17, 0x88, 0x4b, 0x78, 0xc4, 0xc9, 0x00, 0x95, 0x9d, 0x0f, 0x5b, 0xa4, 0xe0, 0xaa, 0x95, + 0x32, 0x01, 0xb0, 0x59, 0xbd, 0x9d, 0x56, 0x85, 0xbd, 0x8e, 0x92, 0x4b, 0xaf, 0xa0, 0x9e, + 0x2f, 0x1c, 0x2a, 0x7f, 0x89, 0xd9, 0xa8, 0xa0, 0x1e, 0xfa, 0xe2, 0x66, 0x02, 0x84, 0xf4, + 0xc5, 0x48, 0x01, 0x7e, 0x59, 0x48, 0x50, 0x72, 0xb2, 0xb1, 0x46, 0x1d, 0x0b, 0x5a, 0x35, + 0x4d, 0xf8, 0x75, 0xfd, ], // ic[2] [ - 0x14, 0x5e, 0x34, 0x42, 0x29, 0x20, 0x61, 0x1e, 0x3d, 0x44, 0x9c, 0x2b, 0x42, 0x2c, 0xab, - 0xdd, 0x2f, 0x76, 0x18, 0x26, 0x91, 0x95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x04, 0x80, 0xe8, 0x6c, 0x23, 0x98, + 0x0b, 0x61, 0xb0, 0x1a, 0xfc, 0xee, 0x45, 0x02, 0x24, 0xdf, 0x71, 0xa5, 0x6d, 0xa2, 0x04, + 0x5d, 0xfb, 0x12, 0x35, 0x02, 0x0d, 0xcf, 0x02, 0x49, 0xc8, 0xff, 0x48, 0xa6, 0x8e, 0x7c, + 0x96, 0x7a, 0x04, 0x8e, 0x45, 0x97, 0x02, 0x6c, 0x25, 0x4b, 0x60, 0xe0, 0x37, 0x52, 0xb0, + 0x8e, 0x52, 0x64, 0x2b, ], // ic[4] [ - 0x29, 0x57, 0xb5, 0x8e, 0x6c, 0xc8, 0xd2, 0x29, 0xfe, 0x08, 0x21, 0x6e, 0x25, 0xbf, 0xd6, - 0xe3, 0x40, 0x2c, 0xde, 0x7e, 0x8e, 0x42, 0xca, 0xf9, 0x9b, 0x01, 0x2c, 0x3e, 0xee, 0xd7, - 0x82, 0xaa, 0x1a, 0x74, 0xbc, 0x19, 0x91, 0x98, 0x03, 0x7d, 0x4a, 0x3b, 0x1d, 0xd1, 0x4c, - 0x22, 0x27, 0x03, 0xf5, 0xf5, 0x3e, 0xb6, 0x5d, 0x9b, 0x33, 0x75, 0xa6, 0xfd, 0xbf, 0x51, - 0x02, 0x35, 0x4a, 0x41, + 0x27, 0x87, 0x13, 0x28, 0xab, 0x76, 0x9e, 0x21, 0x4a, 0xa7, 0xed, 0xb6, 0x15, 0x48, 0xb2, + 0xa5, 0x81, 0xee, 0x21, 0x0b, 0xdc, 0xab, 0x17, 0x36, 0xa5, 0x3b, 0xc5, 0x9d, 0xc3, 0xf6, + 0xed, 0xbc, 0x2c, 0xe2, 0xf1, 0x0b, 0xcd, 0xde, 0x73, 0x6d, 0x99, 0x2a, 0xab, 0xaf, 0x75, + 0x9a, 0x4a, 0xda, 0xdb, 0x0d, 0x31, 0xee, 0x0d, 0xe5, 0x94, 0x15, 0xc0, 0x20, 0xeb, 0xa9, + 0x4a, 0xff, 0x75, 0xcb, ], // ic[5] ]; pub const HIDDEN_CARDS_VK_N_PUBLIC: u32 = 5; @@ -115,78 +115,78 @@ pub const FOG_OF_WAR_VK_GAMMA: [u8; 128] = [ 0xe3, 0xd1, 0xe7, 0x69, 0x0c, 0x43, 0xd3, 0x7b, 0x4c, 0xe6, 0xcc, 0x01, 0x66, 0xfa, 0x7d, 0xaa, ]; pub const FOG_OF_WAR_VK_DELTA: [u8; 128] = [ - 0x0f, 0x41, 0xb2, 0x63, 0x88, 0x9c, 0xbd, 0x3a, 0x5b, 0x5f, 0x0d, 0xea, 0xbd, 0xe9, 0xcf, 0xf6, - 0xc5, 0xc8, 0xc9, 0xb3, 0xb7, 0xff, 0xd9, 0x2c, 0xa9, 0x8c, 0xc5, 0xb1, 0xba, 0xc7, 0xa8, 0x25, - 0x18, 0x34, 0xa2, 0xcd, 0x83, 0x7a, 0xab, 0x7a, 0xda, 0xc4, 0xca, 0x82, 0x1f, 0xd9, 0xe1, 0x4c, - 0x03, 0x6d, 0x6f, 0x6f, 0x6e, 0x37, 0xf3, 0x6c, 0x49, 0x76, 0x01, 0x2e, 0xe2, 0x7d, 0x79, 0x43, - 0x1b, 0xaa, 0x69, 0xdb, 0xb8, 0x48, 0x0a, 0xc7, 0x9e, 0xe4, 0xbf, 0x42, 0x43, 0x9c, 0xf1, 0x91, - 0xe1, 0x44, 0xda, 0xd0, 0xd4, 0xcd, 0x62, 0xe7, 0xc7, 0xc1, 0x97, 0x0b, 0x96, 0x90, 0x06, 0x47, - 0x11, 0x7d, 0xcb, 0xb7, 0x26, 0x91, 0xb5, 0xbd, 0xda, 0x26, 0x4e, 0xd4, 0xa9, 0x35, 0x78, 0x2f, - 0x9b, 0x4f, 0x6a, 0xf1, 0x85, 0xdd, 0xda, 0xd9, 0xb0, 0x23, 0x83, 0x5a, 0x75, 0xa4, 0x7e, 0x9d, + 0x2f, 0x77, 0x23, 0xcd, 0xc8, 0xf6, 0xec, 0x02, 0x0a, 0x96, 0xb3, 0x4a, 0x81, 0x4f, 0x76, 0xb1, + 0xad, 0x1f, 0xd8, 0x0f, 0x83, 0x0d, 0x33, 0x54, 0x40, 0x6e, 0x37, 0xb4, 0x03, 0x5c, 0x5f, 0xab, + 0x10, 0xd2, 0x5b, 0xb8, 0x83, 0x74, 0xe9, 0xe1, 0xab, 0x98, 0xfa, 0x77, 0xc7, 0x95, 0x11, 0x13, + 0xa7, 0x26, 0x85, 0x61, 0x55, 0x2b, 0x8c, 0xfb, 0xd9, 0xf8, 0x0c, 0xf6, 0x2f, 0x37, 0x23, 0x21, + 0x14, 0x79, 0xd5, 0xfc, 0x32, 0xc7, 0x23, 0xaa, 0x73, 0x1e, 0x3a, 0x43, 0x34, 0xbe, 0x2c, 0x35, + 0x55, 0x2a, 0xb4, 0x59, 0x2b, 0xa4, 0x69, 0x30, 0x29, 0xca, 0xf8, 0x7d, 0xcd, 0xf3, 0x2d, 0x99, + 0x0f, 0x78, 0x26, 0x5e, 0xe3, 0xc4, 0x91, 0xf7, 0xff, 0x4f, 0x16, 0xaa, 0x2c, 0x95, 0x1e, 0xb4, + 0xba, 0x82, 0x26, 0x42, 0x2e, 0xcb, 0xfd, 0x49, 0xb0, 0x84, 0x72, 0x22, 0x44, 0x1a, 0x5a, 0x4f, ]; pub const FOG_OF_WAR_VK_IC: [[u8; 64]; 9] = [ [ - 0x26, 0xb0, 0xdd, 0x95, 0x6c, 0xe8, 0x0f, 0xa1, 0x8f, 0x6e, 0x1a, 0x68, 0x18, 0x4e, 0x1b, - 0x62, 0x00, 0x7f, 0x59, 0xcb, 0xda, 0xa8, 0xe7, 0x5d, 0x2b, 0x09, 0x83, 0xcc, 0x8a, 0x90, - 0xf3, 0x07, 0x04, 0xe1, 0x13, 0x61, 0x03, 0x66, 0x62, 0x23, 0x69, 0x12, 0x2d, 0x12, 0xc9, - 0x73, 0xd5, 0xbf, 0x9b, 0x43, 0x2e, 0x2f, 0x84, 0xa5, 0x8d, 0x03, 0xe9, 0x00, 0x82, 0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 0x99, 0x68, 0x19, 0xeb, 0xc9, 0x2c, 0x65, 0x2e, + 0x2a, 0xbb, 0x14, 0x82, 0x23, 0x70, 0x8b, 0xff, 0xdb, 0x07, 0xd0, 0xf7, 0x35, 0x2c, 0xbd, + 0xcd, 0x12, 0xc2, 0x3c, 0x4c, 0xac, 0x49, 0x57, 0x42, 0x27, 0x8e, 0xc6, 0x60, 0x14, 0x68, + 0x45, 0x06, 0xa8, 0xb3, ], // ic[4] [ - 0x04, 0xa4, 0x4d, 0x01, 0x59, 0xf0, 0x5f, 0x9c, 0x22, 0xea, 0x4b, 0x81, 0x17, 0x84, 0xfe, - 0xe4, 0xd0, 0x35, 0xdf, 0xc1, 0xc8, 0x86, 0x62, 0xfd, 0x21, 0x21, 0x4e, 0x23, 0x79, 0x73, - 0xa0, 0x5c, 0x09, 0x40, 0xbd, 0x65, 0xe2, 0xbd, 0xe6, 0xda, 0x1c, 0x28, 0x51, 0x50, 0xfd, - 0x9b, 0x09, 0x84, 0x36, 0x85, 0x6b, 0x47, 0x9d, 0xf3, 0x3c, 0x41, 0xdd, 0xc8, 0x30, 0x08, - 0x6f, 0xb9, 0xd0, 0x86, + 0x15, 0x26, 0xe0, 0x5e, 0x2e, 0x4f, 0xd1, 0x0a, 0x33, 0x47, 0xe4, 0xe6, 0x89, 0xd4, 0x02, + 0xe9, 0x52, 0xcf, 0x70, 0x37, 0xd8, 0xde, 0xe4, 0x2d, 0x9c, 0x13, 0x0f, 0x64, 0x52, 0x90, + 0x10, 0x49, 0x22, 0x3c, 0xda, 0xc4, 0x3c, 0x46, 0x8a, 0xcf, 0xd4, 0xd3, 0xc3, 0xfc, 0x23, + 0x45, 0x59, 0x4d, 0x5c, 0xf1, 0xc1, 0xe7, 0x14, 0xb2, 0xa7, 0x6a, 0x70, 0x36, 0x3c, 0x15, + 0x12, 0x01, 0x43, 0x15, ], // ic[5] [ - 0x1f, 0x2f, 0xdc, 0x53, 0x12, 0xe2, 0x0d, 0xf5, 0x4d, 0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, 0xa6, 0x9d, 0x60, 0x9b, 0x29, 0xd3, 0xb9, 0xde, 0x1a, 0x10, + 0xce, 0xa0, 0xc6, 0xf4, ], // ic[8] ]; pub const FOG_OF_WAR_VK_N_PUBLIC: u32 = 8; @@ -219,50 +219,50 @@ pub const FAIR_DICE_VK_GAMMA: [u8; 128] = [ 0xe3, 0xd1, 0xe7, 0x69, 0x0c, 0x43, 0xd3, 0x7b, 0x4c, 0xe6, 0xcc, 0x01, 0x66, 0xfa, 0x7d, 0xaa, ]; pub const FAIR_DICE_VK_DELTA: [u8; 128] = [ - 0x1f, 0xaf, 0x3e, 0x4f, 0x74, 0xd5, 0x7f, 0xbf, 0xf6, 0x72, 0x89, 0x49, 0x29, 0xcb, 0x54, 0xe0, - 0xb7, 0x6f, 0x0b, 0x25, 0x8b, 0xb3, 0x1f, 0x68, 0x6b, 0x9f, 0x59, 0xd8, 0x7d, 0x3b, 0xb4, 0x20, - 0x10, 0x74, 0x8c, 0x77, 0x7e, 0xd1, 0x82, 0x0a, 0x25, 0x11, 0xed, 0x41, 0x18, 0x3f, 0x9b, 0x9d, - 0xab, 0x05, 0x8a, 0xaa, 0xc7, 0x61, 0xde, 0xd6, 0xbc, 0xe6, 0xf4, 0x54, 0xf5, 0xb5, 0xd2, 0xae, - 0x2e, 0xb8, 0xf9, 0x7e, 0x48, 0x7e, 0xfb, 0xa1, 0x34, 0x4a, 0xc6, 0x2e, 0xfd, 0x69, 0xd9, 0x14, - 0x55, 0x51, 0x91, 0xb9, 0x02, 0x71, 0x77, 0xfa, 0xb6, 0xc3, 0x19, 0x03, 0x93, 0x6c, 0xc7, 0x00, - 0x1f, 0x91, 0x10, 0xfd, 0xf5, 0xb4, 0x6f, 0xa7, 0x4e, 0x58, 0x6b, 0x87, 0x52, 0x5f, 0x80, 0xc7, - 0x9c, 0x2b, 0x5f, 0x3e, 0x37, 0x5f, 0x11, 0x43, 0x5d, 0xc2, 0x6a, 0x03, 0xad, 0x25, 0x4e, 0x2a, + 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 0x11, 0x15, 0x70, 0x94, 0x3c, 0x79, 0x08, 0xcf, 0xc8, 0xe3, 0xa4, 0xba, 0xcc, - 0x6c, 0xad, 0x7a, 0x64, + 0x01, 0x06, 0x09, 0x21, 0x6b, 0x75, 0x00, 0x5d, 0x59, 0x9c, 0x77, 0xe8, 0xe8, 0x8c, 0x4c, + 0x4d, 0xde, 0x77, 0x22, 0x18, 0x42, 0x1f, 0x5f, 0x22, 0x2b, 0x78, 0x6a, 0x28, 0x68, 0x96, + 0xb6, 0x65, 0x1b, 0x05, 0x53, 0x6b, 0x21, 0x86, 0xcd, 0xef, 0x3c, 0xeb, 0x55, 0x3d, 0xaa, + 0x40, 0x08, 0x56, 0x07, 0x3c, 0x7d, 0x04, 0x23, 0xb9, 0xd9, 0x65, 0x16, 0x6a, 0x2a, 0x5a, + 0x2d, 0xda, 0x9e, 0xde, ], // ic[0] [ - 0x13, 0x0c, 0x1b, 0x38, 0xde, 0xb3, 0xad, 0xf7, 0x22, 0x03, 0x65, 0x89, 0x49, 0xc1, 0x11, - 0xb7, 0xf8, 0xed, 0xc2, 0xff, 0xac, 0xad, 0xc5, 0x2a, 0xb4, 0x3c, 0x94, 0x39, 0xe7, 0x82, - 0x0e, 0xec, 0x13, 0x81, 0x48, 0x82, 0x1c, 0x60, 0x7d, 0x8d, 0x3e, 0x3f, 0x73, 0xc3, 0xbe, - 0x3c, 0xe9, 0x9a, 0x37, 0x67, 0x27, 0x17, 0x55, 0xa0, 0x9b, 0xd2, 0xc5, 0xcb, 0x85, 0x50, - 0x63, 0x2d, 0xc9, 0x00, + 0x2c, 0x3c, 0xf0, 0x45, 0x0d, 0x98, 0x2a, 0x58, 0xe1, 0xcc, 0x0d, 0xbc, 0xbb, 0x6b, 0xf3, + 0xea, 0x31, 0x6c, 0xb2, 0xe9, 0x0c, 0x8d, 0xcb, 0xc3, 0xff, 0xfa, 0x99, 0xd2, 0x8f, 0xbe, + 0x85, 0xd8, 0x1b, 0xb8, 0x1d, 0x5b, 0x20, 0xa7, 0x55, 0x07, 0x14, 0x0b, 0x66, 0xf8, 0xaa, + 0x55, 0xf2, 0x93, 0xca, 0xca, 0x34, 0xf8, 0x79, 0x1f, 0x05, 0x8d, 0xc9, 0x1a, 0x29, 0x5d, + 0x72, 0xf8, 0xe8, 0x2b, ], // ic[1] [ - 0x30, 0x35, 0x02, 0x01, 0xef, 0xbc, 0x95, 0x55, 0xf7, 0x25, 0x8e, 0x91, 0x97, 0x33, 0x39, - 0xc2, 0x24, 0x19, 0x15, 0x28, 0xb8, 0x12, 0xf0, 0x81, 0x33, 0x9f, 0xfb, 0x98, 0x0d, 0x58, - 0x6e, 0xac, 0x19, 0x18, 0xaa, 0x08, 0xf2, 0x35, 0xc2, 0x81, 0x03, 0xf0, 0x79, 0x10, 0xb1, - 0xc2, 0x25, 0xbd, 0x17, 0xa9, 0x9b, 0xe5, 0xb6, 0xe3, 0x09, 0x88, 0x90, 0xac, 0xba, 0xf7, - 0x75, 0x17, 0x63, 0xdc, + 0x25, 0x87, 0x72, 0xe6, 0x49, 0xe8, 0xe6, 0x40, 0x76, 0xd0, 0xee, 0x41, 0xad, 0x3f, 0x44, + 0x37, 0x05, 0x94, 0x30, 0xf6, 0xf9, 0xca, 0x18, 0x7c, 0xce, 0x8d, 0x7e, 0x33, 0x17, 0x34, + 0x03, 0xc8, 0x00, 0x6b, 0x1e, 0xe4, 0x13, 0xb3, 0xb6, 0xa6, 0xab, 0x14, 0x18, 0x9e, 0xbe, + 0xf9, 0x86, 0xd3, 0x48, 0xaa, 0x10, 0x9f, 0x21, 0x1b, 0x54, 0x50, 0x74, 0xdb, 0x82, 0x9d, + 0xef, 0xf2, 0x33, 0x3b, ], // ic[2] [ - 0x25, 0x8c, 0xb8, 0x50, 0x88, 0x57, 0x0e, 0xbf, 0xc4, 0xa4, 0x25, 0xdc, 0xf6, 0x9a, 0x8a, - 0xda, 0x53, 0x99, 0x71, 0x6a, 0x02, 0x75, 0xea, 0x25, 0xc6, 0x74, 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b5, 0x4f, + 0xd6, 0xb0, 0x3c, 0x9a, 0x6f, 0x38, 0xb7, 0x28, 0x2f, 0xed, 0x49, 0xd0, 0xb9, 0xce, 0xb5, + 0x0f, 0xa2, 0x00, 0x6a, 0x90, 0x8d, 0xf4, 0x00, 0xa7, 0x64, 0xb2, 0x9d, 0xb9, 0x49, 0xce, + 0x7e, 0x42, 0xd9, 0xb6, 0xcc, 0x5c, 0xcf, 0xa4, 0x1f, 0xbc, 0x7d, 0x68, 0x8a, 0x3f, 0x54, + 0x32, 0x48, 0x63, 0x97, ], // ic[4] ]; pub const FAIR_DICE_VK_N_PUBLIC: u32 = 4; @@ -295,50 +295,50 @@ pub const SEALED_BID_VK_GAMMA: [u8; 128] = [ 0xe3, 0xd1, 0xe7, 0x69, 0x0c, 0x43, 0xd3, 0x7b, 0x4c, 0xe6, 0xcc, 0x01, 0x66, 0xfa, 0x7d, 0xaa, ]; pub const SEALED_BID_VK_DELTA: [u8; 128] = [ - 0x05, 0xac, 0x4c, 0x2d, 0xe8, 0x7b, 0x5d, 0xa3, 0x79, 0xf9, 0x4c, 0xf8, 0x06, 0x8b, 0x12, 0xd8, - 0x00, 0x58, 0x29, 0x9a, 0x2b, 0x1e, 0x91, 0xa9, 0x04, 0xe3, 0x27, 0xfd, 0x72, 0xfe, 0xaf, 0x5e, - 0x09, 0xbd, 0x4c, 0xdf, 0xb5, 0x0d, 0x34, 0xdb, 0x41, 0xbf, 0xc1, 0x09, 0x33, 0xa7, 0xee, 0x25, - 0x6c, 0xec, 0xa8, 0xee, 0x27, 0xa4, 0x2a, 0xdd, 0x8d, 0xd1, 0x36, 0xbe, 0x84, 0x51, 0x00, 0xa4, - 0x30, 0x0a, 0x6c, 0x7a, 0x73, 0x0d, 0xea, 0xca, 0x04, 0x8c, 0x9e, 0xc2, 0x41, 0xf9, 0x68, 0x7f, - 0x1d, 0xf3, 0x6f, 0x53, 0x54, 0x61, 0xfc, 0x50, 0x11, 0x3e, 0x5e, 0x45, 0x5d, 0x12, 0x88, 0x42, - 0x03, 0xec, 0xdf, 0x0d, 0xf9, 0x81, 0x22, 0x82, 0x5a, 0xc0, 0x90, 0xc6, 0x94, 0xb3, 0x4f, 0xd4, - 0xd4, 0x7e, 0xff, 0x83, 0x76, 0xa7, 0x08, 0x7b, 0x58, 0x21, 0x12, 0xc7, 0xe3, 0xc6, 0xb6, 0x3f, + 0x19, 0xb3, 0xb1, 0xc5, 0x79, 0x57, 0x34, 0x8a, 0xbe, 0x78, 0xbb, 0x02, 0x65, 0xae, 0x68, 0xd7, + 0xc3, 0xb0, 0x55, 0x94, 0xe5, 0x49, 0x89, 0x52, 0xcd, 0x0b, 0x8a, 0x52, 0xa8, 0x2a, 0xd5, 0x9b, + 0x1e, 0xd8, 0x53, 0x8d, 0xa7, 0x3f, 0x95, 0xe6, 0x77, 0x09, 0x14, 0x4e, 0x43, 0xe7, 0xc5, 0x38, + 0x4b, 0x03, 0xf5, 0x50, 0xe7, 0xeb, 0xd7, 0x70, 0x01, 0x1e, 0x1c, 0x4a, 0x73, 0x36, 0xd4, 0xff, + 0x16, 0x5f, 0xbf, 0x2f, 0x91, 0x84, 0xb0, 0x0b, 0x25, 0x81, 0xb2, 0x72, 0x41, 0xdf, 0xa3, 0x52, + 0x1e, 0x40, 0x91, 0xd6, 0xb0, 0x35, 0x38, 0x1c, 0xea, 0x7c, 0xc7, 0x6d, 0x0e, 0x12, 0xfb, 0xf3, + 0x16, 0x88, 0x69, 0x08, 0xee, 0xb6, 0xf6, 0x7f, 0x81, 0xf3, 0xea, 0x93, 0x61, 0x78, 0xdd, 0x8e, + 0x1c, 0xaf, 0xa6, 0x00, 0xa1, 0xc5, 0x77, 0x96, 0xb6, 0x12, 0xc8, 0x02, 0xc2, 0xae, 0x93, 0x61, ]; pub const SEALED_BID_VK_IC: [[u8; 64]; 5] = [ [ - 0x0b, 0xff, 0x83, 0x97, 0x0c, 0xca, 0x1e, 0x03, 0x36, 0x04, 0xac, 0xce, 0x9f, 0x89, 0xa6, - 0xe8, 0xf5, 0x4b, 0x94, 0xf3, 0xc2, 0x4c, 0xef, 0xce, 0x87, 0x8d, 0x13, 0xdc, 0xe4, 0x3c, - 0x41, 0x21, 0x20, 0x9b, 0xbd, 0x81, 0x63, 0x90, 0x98, 0xee, 0x79, 0x73, 0xc9, 0x20, 0x35, - 0x69, 0x87, 0x59, 0xdf, 0xe0, 0x1b, 0x64, 0x22, 0xea, 0x76, 0x57, 0x56, 0x69, 0x98, 0x37, - 0x7f, 0x97, 0x7e, 0x3a, + 0x02, 0x8e, 0x63, 0x22, 0xd8, 0xb2, 0x59, 0x76, 0x0d, 0xc2, 0xae, 0xa0, 0x3c, 0x87, 0xc7, + 0xf0, 0x4e, 0x69, 0x46, 0x50, 0x39, 0xa8, 0x2b, 0x59, 0xd7, 0x7a, 0x4d, 0x1a, 0xac, 0x55, + 0x57, 0x16, 0x04, 0xcd, 0xfb, 0x0f, 0x32, 0x71, 0xfc, 0x08, 0xf4, 0x4b, 0xb0, 0x0c, 0x49, + 0x5e, 0x34, 0x5e, 0x17, 0xe9, 0x03, 0x94, 0x3a, 0x33, 0x70, 0xe9, 0xd1, 0x26, 0xe7, 0x17, + 0xa3, 0x7c, 0xaf, 0xe3, ], // ic[0] [ - 0x11, 0x1b, 0xbe, 0xe9, 0x6d, 0xa0, 0x37, 0xee, 0x4c, 0x7b, 0x81, 0x15, 0x72, 0x29, 0xc7, - 0x7e, 0x96, 0xf7, 0xbc, 0x05, 0x37, 0x75, 0x68, 0x8e, 0x8d, 0x6c, 0x45, 0xab, 0x74, 0x9b, - 0x55, 0x27, 0x22, 0xf1, 0x98, 0xff, 0xd1, 0x15, 0xe6, 0x2e, 0x21, 0x4e, 0x7b, 0x7c, 0x40, - 0xd2, 0x4d, 0xc2, 0x11, 0x20, 0xcd, 0x01, 0xa6, 0xd0, 0x8d, 0x42, 0xa4, 0xe3, 0x9d, 0x04, - 0x0b, 0x0b, 0xba, 0x3c, + 0x25, 0x7f, 0x10, 0x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 0xb1, 0xbe, 0xf5, 0x45, + 0x0c, 0xd1, 0x26, 0x9e, ], // ic[2] [ - 0x04, 0x3a, 0x3a, 0xd7, 0x70, 0x25, 0xac, 0xb9, 0x2e, 0x79, 0xe6, 0x55, 0x4c, 0x8f, 0x43, - 0x2f, 0xa2, 0xe6, 0xd8, 0x74, 0x5f, 0x2a, 0x28, 0x15, 0xe6, 0x01, 0x96, 0xed, 0x1b, 0xd4, - 0x7d, 0x60, 0x2a, 0xec, 0xae, 0xa8, 0xa7, 0x60, 0x02, 0xd2, 0xed, 0xab, 0x5a, 0xbf, 0x52, - 0x99, 0xef, 0x8c, 0xf7, 0x1d, 0x14, 0x36, 0x57, 0x35, 0xab, 0x6c, 0x90, 0xa4, 0xe4, 0xc3, - 0xd1, 0x84, 0xaf, 0x47, + 0x2d, 0x18, 0x5a, 0xb4, 0x1c, 0xe0, 0x04, 0x28, 0x29, 0x3c, 0xc9, 0xfe, 0x1c, 0x4f, 0x6a, + 0xab, 0x43, 0x39, 0x89, 0xd5, 0x5f, 0x53, 0xc1, 0xc1, 0x55, 0x75, 0x20, 0x71, 0x2a, 0x39, + 0xbc, 0x42, 0x19, 0x65, 0x0f, 0x68, 0x80, 0x0e, 0xd7, 0xa5, 0x07, 0xae, 0xd5, 0x30, 0xce, + 0x90, 0xc8, 0xac, 0x50, 0x78, 0x9f, 0xa8, 0xc2, 0x9a, 0x37, 0x18, 0xca, 0x61, 0x71, 0x22, + 0x61, 0x6b, 0x6a, 0x03, ], // ic[3] [ - 0x0c, 0x7c, 0x9f, 0xc2, 0x8c, 0xef, 0x60, 0xba, 0x24, 0x0e, 0xb7, 0xf5, 0x13, 0x8d, 0x40, - 0xb7, 0x6a, 0x8f, 0x0a, 0xdd, 0x33, 0xc0, 0x17, 0xb0, 0x33, 0x0b, 0xef, 0x9f, 0xb9, 0xd9, - 0xa2, 0x6c, 0x21, 0xcf, 0x6d, 0xf7, 0xe6, 0x43, 0x1c, 0x48, 0x1f, 0x10, 0xa1, 0xc4, 0xba, - 0x6b, 0xf6, 0x63, 0x91, 0x10, 0xbf, 0x34, 0x02, 0x53, 0x0e, 0xea, 0x66, 0xf6, 0x42, 0x2a, - 0x2b, 0xab, 0x7d, 0x3a, + 0x18, 0xba, 0xf4, 0x0c, 0x25, 0xcb, 0xba, 0x73, 0x6a, 0xe6, 0xb1, 0x95, 0x3b, 0xf9, 0x32, + 0x10, 0x87, 0x32, 0x90, 0x2e, 0xea, 0x7e, 0x60, 0x42, 0xe9, 0xf3, 0x73, 0x10, 0x85, 0xed, + 0x90, 0x48, 0x09, 0x1b, 0x52, 0x76, 0x8f, 0x50, 0xa0, 0xd5, 0xf1, 0x9d, 0xf7, 0x78, 0x21, + 0xe9, 0xd1, 0x42, 0x1f, 0x79, 0x90, 0x3b, 0x2f, 0x0b, 0x41, 0x54, 0xe3, 0x7c, 0xcb, 0x82, + 0xe5, 0x26, 0xc0, 0x5e, ], // ic[4] ]; pub const SEALED_BID_VK_N_PUBLIC: u32 = 4; diff --git a/src/circuits/generated_fixtures.rs b/src/circuits/generated_fixtures.rs index 42b1e0c6..fd341129 100644 --- a/src/circuits/generated_fixtures.rs +++ b/src/circuits/generated_fixtures.rs @@ -5,26 +5,26 @@ // ── hidden_cards ── pub const HIDDEN_CARDS_PROOF_A: [u8; 64] = [ - 0x1c, 0xbb, 0x5a, 0xe2, 0xc2, 0xf3, 0xf8, 0x18, 0xbb, 0x26, 0x35, 0xcc, 0x6d, 0xcd, 0x84, 0x40, - 0x28, 0xaa, 0x60, 0xe0, 0xe2, 0x72, 0x2c, 0xe6, 0xa2, 0xf0, 0x01, 0xa0, 0xd7, 0xb1, 0x40, 0xd4, - 0x04, 0xa0, 0x92, 0xf2, 0x9c, 0xaa, 0xc0, 0x9f, 0xc8, 0xba, 0x3e, 0xe5, 0x35, 0x3a, 0x81, 0x27, - 0x2c, 0x77, 0x2b, 0x2d, 0x9c, 0x31, 0x0b, 0x5c, 0xad, 0x8c, 0xf3, 0x97, 0x10, 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58, 0xe6, 0x9c, 0x4a, - 0x84, 0xe7, 0xb9, 0x5e, 0xec, 0x77, 0x20, 0x5f, 0xd6, 0x47, 0x40, 0xab, 0x08, 0xcb, 0xbd, 0x31, + 0x14, 0x4d, 0x80, 0x95, 0x00, 0x98, 0x05, 0x5b, 0xde, 0xa6, 0xd7, 0x65, 0x14, 0xef, 0xd4, 0x67, + 0x31, 0x66, 0xd1, 0x66, 0x7d, 0xc9, 0x8d, 0x3c, 0x66, 0x69, 0x78, 0x84, 0x6b, 0x75, 0x53, 0x2d, + 0x0d, 0xe1, 0x99, 0x01, 0x56, 0xa0, 0xe7, 0x6a, 0x85, 0xa5, 0xb5, 0xc8, 0x23, 0xfe, 0x55, 0x2b, + 0x26, 0x34, 0x0d, 0x50, 0xf1, 0x0b, 0x8b, 0x6f, 0x7a, 0x40, 0x8f, 0x0f, 0x4f, 0xab, 0x5f, 0xf3, + 0x27, 0x3a, 0x58, 0xeb, 0x06, 0x73, 0x78, 0xca, 0xdd, 0x92, 0x47, 0xc5, 0xb6, 0x5c, 0xc8, 0xe0, + 0x0e, 0x40, 0x5e, 0xab, 0x12, 0xda, 0x1b, 0x61, 0x6d, 0xff, 0x47, 0x9a, 0xe3, 0x09, 0x2e, 0x15, + 0x04, 0x39, 0x04, 0x30, 0x10, 0xe4, 0x85, 0xf6, 0x5a, 0xab, 0xd7, 0x76, 0x22, 0x85, 0x22, 0x8c, + 0xa6, 0xd3, 0x59, 0xab, 0x62, 0xf5, 0x5b, 0x1f, 0xa0, 0xcb, 0x21, 0xd8, 0xc8, 0x77, 0x71, 0xca, ]; pub const HIDDEN_CARDS_PROOF_C: [u8; 64] = [ - 0x1b, 0x33, 0xfe, 0x45, 0x73, 0x48, 0xc9, 0x36, 0x1c, 0x58, 0xbc, 0xee, 0x31, 0x83, 0xff, 0x65, - 0x4e, 0x84, 0xb8, 0x68, 0x4a, 0x52, 0x0d, 0x4c, 0x2d, 0x23, 0x18, 0xf7, 0x82, 0xaa, 0x2e, 0xa5, - 0x2a, 0x03, 0xc9, 0x61, 0x36, 0xd7, 0x73, 0x46, 0x8d, 0xfb, 0x36, 0x41, 0x4e, 0x52, 0x9b, 0xdd, - 0x4e, 0x57, 0x83, 0xdf, 0xaf, 0xe5, 0xcd, 0x4a, 0xec, 0x0f, 0xdf, 0xec, 0xd0, 0x24, 0xd3, 0x95, + 0x22, 0x37, 0x9f, 0x67, 0x6f, 0x1f, 0x66, 0x4a, 0x3c, 0x51, 0xd4, 0x15, 0xad, 0x6f, 0x3f, 0xcc, + 0x76, 0x26, 0x97, 0x64, 0xe9, 0x8a, 0x1f, 0x7c, 0x9c, 0x93, 0x24, 0xf0, 0x2e, 0x60, 0x90, 0xf6, + 0x15, 0x08, 0x38, 0x7e, 0x54, 0x0d, 0x3f, 0x10, 0x37, 0xb4, 0x70, 0xfa, 0xce, 0xb6, 0x8b, 0x5f, + 0x40, 0x98, 0x78, 0x51, 0x49, 0x2b, 0x03, 0xcf, 0x21, 0xf2, 0x4c, 0x97, 0x4a, 0x63, 0x22, 0x08, ]; pub const HIDDEN_CARDS_PUBLIC_INPUTS: [[u8; 32]; 5] = [ [ @@ -56,26 +56,26 @@ pub const HIDDEN_CARDS_PUBLIC_INPUTS: [[u8; 32]; 5] = [ // ── fog_of_war ── pub const FOG_OF_WAR_PROOF_A: [u8; 64] = [ - 0x1a, 0x9e, 0xbe, 0x07, 0xe4, 0xfd, 0x03, 0xf7, 0x70, 0xc7, 0x38, 0x48, 0xe3, 0x68, 0xae, 0xd0, - 0x50, 0x04, 0xd1, 0x21, 0x3c, 0x86, 0x6a, 0xc4, 0x38, 0x6c, 0x77, 0x4d, 0x0e, 0x89, 0xfe, 0xc0, - 0x0b, 0x30, 0x3a, 0x9f, 0x12, 0x66, 0x02, 0xbe, 0x6f, 0xf5, 0x0a, 0x7a, 0xcd, 0xcc, 0x6d, 0x70, - 0xca, 0x73, 0x10, 0xa9, 0xbd, 0xe2, 0xe0, 0xeb, 0xdb, 0x71, 0x8f,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 0xe7, 0x3b, 0xd0, 0x42, 0x98, - 0xa4, 0x7e, 0x31, 0xb2, 0x5a, 0xec, 0xc4, 0xd1, 0xbd, 0x38, 0x4b, 0x84, 0x08, 0x62, 0x6f, 0x33, + 0x23, 0x71, 0x52, 0x68, 0x4c, 0xb8, 0x13, 0xeb, 0x0c, 0x25, 0x4c, 0xe0, 0x1f, 0x4f, 0x67, 0x37, + 0x58, 0x59, 0x5e, 0x7b, 0xc1, 0x41, 0x64, 0xde, 0xe9, 0xd5, 0xec, 0xf0, 0xae, 0x1a, 0xe3, 0xf6, + 0x23, 0x5b, 0xd3, 0xbb, 0xea, 0x5e, 0xcb, 0xf4, 0xa7, 0xd1, 0xf7, 0x13, 0x68, 0x23, 0x6b, 0x84, + 0x80, 0x93, 0xdf, 0x49, 0x59, 0x74, 0x78, 0x2b, 0x27, 0xf2, 0x61, 0x7a, 0x97, 0x07, 0xa1, 0x2f, + 0x30, 0x07, 0x9e, 0x64, 0xd5, 0x7d, 0x9c, 0x39, 0x6b, 0x76, 0x5c, 0xec, 0x08, 0x6d, 0x17, 0xa5, + 0xef, 0x46, 0xba, 0x87, 0x73, 0x63, 0x30, 0xee, 0x02, 0xfd, 0x91, 0xbe, 0xbc, 0xb0, 0x79, 0xde, + 0x0e, 0x6f, 0x79, 0x54, 0xf1, 0xeb, 0xb1, 0xa5, 0xc8, 0xdf, 0xf1, 0x87, 0xd2, 0x5a, 0x6d, 0xaa, + 0xb5, 0xc1, 0xdf, 0x50, 0x4f, 0x49, 0x80, 0xd8, 0xf2, 0x23, 0xc9, 0x28, 0xdc, 0x81, 0x22, 0x02, ]; pub const FOG_OF_WAR_PROOF_C: [u8; 64] = [ - 0x22, 0x6a, 0x20, 0x3b, 0xb4, 0xe3, 0xbf, 0x23, 0x45, 0xc9, 0xfc, 0x15, 0xef, 0x84, 0x2c, 0x45, - 0x4f, 0x5d, 0xcb, 0x6b, 0x5b, 0xef, 0x7a, 0xa7, 0xe7, 0xf4, 0xfe, 0xd5, 0x40, 0x86, 0xf9, 0x64, - 0x0b, 0x05, 0x4e, 0xa4, 0x69, 0x55, 0xc5, 0x64, 0x8d, 0xec, 0x16, 0x58, 0xfc, 0x07, 0x29, 0xcc, - 0x45, 0xfa, 0xa8, 0x97, 0xeb, 0x33, 0xfb, 0x06, 0x2e, 0xb2, 0xc2, 0x5d, 0x91, 0xc0, 0xd7, 0xb6, + 0x16, 0xac, 0x67, 0xca, 0x93, 0xfd, 0x7b, 0x00, 0xd3, 0xdb, 0x04, 0x38, 0x3f, 0xad, 0xcb, 0xf9, + 0x1d, 0x78, 0x51, 0xf1, 0xc0, 0x2f, 0x9f, 0xee, 0xdf, 0x6e, 0x35, 0x57, 0xcc, 0xef, 0xbc, 0x80, + 0x10, 0xe1, 0x66, 0xe4, 0xec, 0xa8, 0xaf, 0xfc, 0x4a, 0x9a, 0x32, 0x5c, 0x47, 0x3c, 0x1e, 0x7f, + 0x7d, 0x2f, 0x9f, 0xa0, 0x8a, 0x64, 0x01, 0x71, 0xa8, 0xbf, 0x64, 0x1b, 0xb3, 0x0a, 0x29, 0x20, ]; pub const FOG_OF_WAR_PUBLIC_INPUTS: [[u8; 32]; 8] = [ [ @@ -122,26 +122,26 @@ pub const FOG_OF_WAR_PUBLIC_INPUTS: [[u8; 32]; 8] = [ // ── fair_dice ── pub const FAIR_DICE_PROOF_A: [u8; 64] = [ - 0x24, 0x9b, 0xfd, 0xee, 0xe7, 0xcd, 0x87, 0xef, 0x5b, 0x71, 0xc2, 0xba, 0x98, 0xd1, 0xd9, 0xae, - 0x2f, 0x59, 0x08, 0xc1, 0xdd, 0x15, 0xeb, 0x16, 0x53, 0xa5, 0xf0, 0xc4, 0x25, 0x0a, 0xce, 0x1f, - 0x20, 0xae, 0x2a, 0x73, 0x3c, 0x20, 0x47, 0x9f, 0x1a, 0xa8, 0xf2, 0x5c, 0xaf, 0x88, 0xca, 0xa5, - 0xad, 0x85, 0x4b, 0x15, 0xc6, 0x2c, 0x65, 0x0b, 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 0x42, 0x00, 0x1f, 0x71, 0xef, 0x49, 0x20, 0x4b, - 0x19, 0xcb, 0x29, 0x04, 0xe7, 0x51, 0xe8, 0x25, 0x59, 0x2f, 0x7d, 0x41, 0x04, 0x56, 0x89, 0x8b, + 0x1d, 0x8f, 0xb2, 0xf0, 0x34, 0xa7, 0x88, 0xcb, 0x7a, 0x38, 0x76, 0x83, 0x31, 0x0a, 0x11, 0x88, + 0x1e, 0x8e, 0x0f, 0x46, 0x80, 0x7e, 0x67, 0x1e, 0x96, 0xbe, 0x7b, 0xd0, 0x3a, 0x01, 0xc2, 0xb3, + 0x0c, 0x22, 0x88, 0x78, 0xae, 0x34, 0x37, 0x20, 0x4c, 0x47, 0x62, 0xce, 0x81, 0x62, 0xfa, 0x14, + 0x4a, 0x38, 0x47, 0x9f, 0x70, 0xaa, 0x10, 0x5c, 0xb8, 0xb2, 0x33, 0xc7, 0x4f, 0xba, 0x82, 0xb8, + 0x1d, 0xc8, 0xd4, 0xe0, 0x21, 0xbb, 0x07, 0xd5, 0xa1, 0x8a, 0xf9, 0xfb, 0x48, 0x01, 0x6c, 0xa7, + 0x3f, 0x5a, 0x32, 0x6e, 0x87, 0x31, 0x58, 0xc5, 0xfe, 0xe4, 0x0f, 0xc4, 0x4d, 0x05, 0x2d, 0xf5, + 0x14, 0xd7, 0xe1, 0x75, 0xb0, 0xaa, 0x59, 0x26, 0x14, 0xb8, 0x9a, 0xa1, 0x93, 0x1d, 0x4f, 0x1e, + 0x4d, 0xea, 0x8f, 0xf8, 0x4f, 0x92, 0x04, 0x9f, 0xa6, 0x15, 0x39, 0xfa, 0x8c, 0x23, 0x7e, 0xec, ]; pub const FAIR_DICE_PROOF_C: [u8; 64] = [ - 0x02, 0x04, 0x39, 0x86, 0x6d, 0x35, 0x18, 0x93, 0x66, 0xf9, 0x7a, 0xd0, 0xbe, 0x96, 0xd6, 0x74, - 0xf6, 0x3c, 0x5e, 0xbb, 0x6f, 0x8c, 0x2e, 0x29, 0x43, 0xe6, 0x06, 0x00, 0xb3, 0x24, 0x11, 0xa3, - 0x07, 0x36, 0x09, 0xbd, 0xab, 0xe4, 0x4a, 0xdd, 0xd1, 0x00, 0x83, 0x9a, 0x03, 0xa4, 0xcd, 0xaf, - 0x0e, 0x01, 0x84, 0xf4, 0xde, 0x8c, 0x54, 0x6a, 0x40, 0x94, 0x4d, 0xbe, 0x16, 0xc7, 0x53, 0xac, + 0x13, 0x4f, 0x94, 0x55, 0x8d, 0xbc, 0xd6, 0xe8, 0xe5, 0x83, 0x74, 0xa8, 0x3e, 0xe1, 0xff, 0x50, + 0x6b, 0x12, 0xb1, 0x22, 0xee, 0x83, 0xf1, 0x7a, 0xf4, 0x7a, 0x7d, 0xf7, 0x22, 0x52, 0x94, 0xe3, + 0x0c, 0x9d, 0xce, 0x45, 0xfe, 0xe5, 0x84, 0x4b, 0x55, 0x47, 0x6e, 0x26, 0xb6, 0x05, 0xa0, 0x54, + 0x6a, 0xd7, 0xad, 0x96, 0xe2, 0x0a, 0xa7, 0xa6, 0x14, 0x27, 0xe7, 0xd4, 0xd6, 0xda, 0xc0, 0xa4, ]; pub const FAIR_DICE_PUBLIC_INPUTS: [[u8; 32]; 4] = [ [ @@ -168,26 +168,26 @@ pub const FAIR_DICE_PUBLIC_INPUTS: [[u8; 32]; 4] = [ // ── sealed_bid ── pub const SEALED_BID_PROOF_A: [u8; 64] = [ - 0x19, 0xa1, 0xd0, 0x67, 0xfb, 0x5e, 0x55, 0xcf, 0x7c, 0x0e, 0xf8, 0x76, 0x45, 0x07, 0x7b, 0x5f, - 0x89, 0xf6, 0x4a, 0x1f, 0xd5, 0xc3, 0x9e, 0x5b, 0x30, 0x20, 0x3d, 0xc3, 0xe0, 0x27, 0xdb, 0x37, - 0x1c, 0x4a, 0x90, 0x1a, 0x19, 0x0e, 0x51, 0x83, 0x2c, 0x2b, 0x8e, 0xd1, 0x15, 0xca, 0xd2, 0x5e, - 0xa3, 0xd6, 0xcf, 0xf6, 0x94, 0x68, 0x1c, 0x4b, 0x2f, 0xda, 0xd3, 0x1d, 0x6e, 0x1f, 0x53, 0x5a, + 0x1f, 0x97, 0x68, 0x0a, 0x71, 0x7a, 0x64, 0x9b, 0x37, 0x95, 0x77, 0xbc, 0x70, 0x9a, 0x94, 0x0a, + 0x89, 0xf5, 0x5c, 0xfe, 0x19, 0xbd, 0x58, 0xc0, 0xc0, 0xb1, 0x1e, 0x57, 0x6c, 0xf2, 0xdd, 0x65, + 0x03, 0xe3, 0x76, 0x1d, 0x1f, 0x78, 0x75, 0x2a, 0xed, 0xa5, 0xe9, 0xe1, 0x0e, 0xd7, 0x19, 0xa2, + 0x79, 0x56, 0xfc, 0xf7, 0x6a, 0x2e, 0x10, 0x56, 0xdb, 0xb8, 0xa1, 0x71, 0xcb, 0x91, 0x9e, 0xaf, ]; pub const SEALED_BID_PROOF_B: [u8; 128] = [ - 0x25, 0x02, 0x27, 0xc7, 0xa7, 0xd1, 0x24, 0x89, 0x76, 0x9a, 0xd5, 0x23, 0x45, 0x18, 0x21, 0x1e, - 0x55, 0x39, 0x7d, 0x90, 0xab, 0xae, 0xb2, 0x3e, 0x6e, 0x93, 0x68, 0xc0, 0xdc, 0x71, 0x2a, 0x7d, - 0x21, 0xd8, 0xf1, 0xd4, 0xd4, 0xed, 0x77, 0x35, 0x0b, 0x00, 0x0e, 0x12, 0x1a, 0x03, 0x8e, 0xef, - 0xa8, 0xb8, 0xda, 0xb0, 0x20, 0x2e, 0x1c, 0xfe, 0xb8, 0x98, 0xa8, 0xec, 0x1f, 0x75, 0x60, 0x51, - 0x0e, 0xbd, 0x6c, 0x57, 0x99, 0xe2, 0xc2, 0xaa, 0x46, 0x8a, 0x04, 0x02, 0x35, 0xf6, 0xce, 0x63, - 0xd9, 0x90, 0xf4, 0xc9, 0xbe, 0x05, 0x2d, 0x7b, 0xb5, 0x6d, 0x32, 0x2c, 0x0b, 0x78, 0x09, 0x9d, - 0x09, 0xc7, 0x58, 0x3b, 0x9f, 0x62, 0xc5, 0xa0, 0x9d, 0xcc, 0x6a, 0x0c, 0x80, 0xdc, 0xcf, 0xa5, - 0x64, 0xc7, 0xd6, 0x80, 0xd7, 0x16, 0x4d, 0xcf, 0x4a, 0xe6, 0x4b, 0xd8, 0x4e, 0xc9, 0x5a, 0x69, + 0x29, 0xc5, 0xbf, 0xa1, 0x7a, 0x0c, 0xcb, 0xb8, 0x3d, 0x7c, 0xb6, 0x9c, 0xf2, 0xc8, 0x23, 0x39, + 0x28, 0x36, 0xe2, 0xf9, 0xc4, 0x14, 0x5a, 0x4a, 0xc6, 0x86, 0x2c, 0x8a, 0x23, 0x36, 0xca, 0x0f, + 0x1d, 0x2c, 0x0a, 0x2c, 0x8e, 0xe9, 0x8c, 0xef, 0x75, 0x12, 0x25, 0x5d, 0x68, 0x63, 0x84, 0xb1, + 0x2f, 0x86, 0xc3, 0xf1, 0x20, 0x68, 0x79, 0xc5, 0x95, 0x3f, 0x0e, 0x1b, 0xdd, 0x3a, 0x74, 0xa6, + 0x17, 0x9f, 0x00, 0x09, 0x9d, 0xf9, 0x95, 0x41, 0x88, 0x2a, 0xfb, 0x46, 0x18, 0x2e, 0xd2, 0x12, + 0x1a, 0x36, 0xf0, 0x94, 0x20, 0x3a, 0xf8, 0x41, 0xa0, 0xa2, 0xc4, 0x0a, 0x6a, 0x5a, 0x2a, 0x5d, + 0x28, 0xfa, 0x08, 0x35, 0x3f, 0x19, 0x81, 0xde, 0xba, 0x67, 0x96, 0x68, 0xed, 0x26, 0xef, 0x96, + 0x9d, 0x3a, 0x59, 0xf1, 0x18, 0xf6, 0x7f, 0x79, 0x7c, 0x87, 0x95, 0x28, 0x51, 0x33, 0x3a, 0x46, ]; pub const SEALED_BID_PROOF_C: [u8; 64] = [ - 0x12, 0x47, 0x80, 0x50, 0x12, 0x90, 0x2c, 0x88, 0xda, 0x96, 0x1e, 0x3a, 0x3d, 0xd0, 0x60, 0xa6, - 0xca, 0x49, 0xc7, 0x99, 0x30, 0x80, 0xa7, 0xe5, 0x81, 0x76, 0xc8, 0xf0, 0x80, 0xee, 0xfa, 0x1a, - 0x16, 0xb5, 0x78, 0x27, 0x05, 0xf3, 0x23, 0x1e, 0xf6, 0x3d, 0x51, 0x3e, 0x2b, 0xa8, 0x25, 0xe6, - 0xcf, 0x04, 0xb9, 0xcf, 0xb4, 0x43, 0x56, 0x94, 0x25, 0xe8, 0x84, 0xa8, 0x7a, 0xf3, 0x40, 0x2f, + 0x16, 0xe7, 0x71, 0x84, 0x83, 0x88, 0x64, 0x7e, 0x0f, 0x70, 0x3c, 0x00, 0xe7, 0xc3, 0x90, 0xff, + 0xc8, 0xf6, 0x4f, 0x83, 0xf7, 0xc5, 0x7e, 0x21, 0xfb, 0xe7, 0x3e, 0xa6, 0x8f, 0x7d, 0x19, 0xef, + 0x1d, 0x6b, 0x24, 0x1a, 0x0e, 0xde, 0xc3, 0x73, 0x15, 0x40, 0xe3, 0xc6, 0xed, 0x81, 0x9b, 0x19, + 0xd2, 0x4d, 0x93, 0x92, 0xe2, 0x10, 0x94, 0xd5, 0x10, 0xbe, 0x9a, 0x8d, 0x8b, 0xb4, 0xad, 0x7f, ]; pub const SEALED_BID_PUBLIC_INPUTS: [[u8; 32]; 4] = [ [ diff --git a/src/circuits/hidden_cards.rs b/src/circuits/hidden_cards.rs index 8ba50f4f..480cab7b 100644 --- a/src/circuits/hidden_cards.rs +++ b/src/circuits/hidden_cards.rs @@ -66,4 +66,28 @@ mod tests { // Encoding path smoke test (production uses VK from `bun run pipeline`). let _ = spec.verify_hidden_hand(&env, &proof, &deck, &hand, 1); } + + #[test] + fn hidden_cards_supports_non_default_hand_size() { + let env = Env::default(); + let spec = hidden_cards(&env, 52, 7).unwrap(); + assert_eq!(spec.circuit_id, CircuitId::HiddenCards); + assert_eq!(spec.params, CircuitParams::HiddenCards(52, 7)); + + let g1 = G1Point { + bytes: BytesN::from_array(&env, &[0u8; 64]), + }; + let g2 = G2Point { + bytes: BytesN::from_array(&env, &[0u8; 128]), + }; + let proof = Groth16Proof { + a: g1.clone(), + b: g2, + c: g1, + }; + + let deck = BytesN::from_array(&env, &[2u8; 32]); + let hand = BytesN::from_array(&env, &[3u8; 32]); + let _ = spec.verify_hidden_hand(&env, &proof, &deck, &hand, 1); + } }