{"id":25633055,"url":"https://github.com/zkemail/sdk-images","last_synced_at":"2026-06-11T20:31:50.491Z","repository":{"id":259362596,"uuid":"876963327","full_name":"zkemail/sdk-images","owner":"zkemail","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-08T08:46:37.000Z","size":1290,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-08T10:32:03.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zkemail.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-22T21:09:34.000Z","updated_at":"2026-05-05T04:22:16.000Z","dependencies_parsed_at":"2024-12-10T22:23:50.547Z","dependency_job_id":"1aad765a-a06d-419f-8c83-aa55102cd808","html_url":"https://github.com/zkemail/sdk-images","commit_stats":null,"previous_names":["zkemail/sdk-images"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zkemail/sdk-images","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkemail%2Fsdk-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkemail%2Fsdk-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkemail%2Fsdk-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkemail%2Fsdk-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkemail","download_url":"https://codeload.github.com/zkemail/sdk-images/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkemail%2Fsdk-images/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34217312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-22T21:27:50.262Z","updated_at":"2026-06-11T20:31:50.486Z","avatar_url":"https://github.com/zkemail.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SDK Images\n\nThis project automates the process of generating and deploying a zk-SNARK circuit for email validation. It takes a blueprint configuration file that specifies regex patterns and circuit parameters, generates Circom circuits for each regex pattern, and combines them with a DKIM verification circuit. The project then compiles the circuit, generates proving and verification keys, and deploys smart contracts for on-chain proof verification and DKIM registry integration.\n\n## Key Features\n\n- Automates the generation of Circom circuits for email validation based on regex patterns.\n- Determines optimal power-of-tau parameters based on constraint count.\n- Compiles the circuit using the `circom` compiler and generates a witness calculator.\n- Generates proving and verification keys using the Groth16 ZK proof system.\n- Creates a Solidity verifier contract for on-chain ZK proof verification.\n- Deploys smart contracts for DKIM registry integration and proof validation.\n\n## How it works\n\nIt consists of several steps:\n\n1. **Configuration and Setup**:\n   - Loads a configuration payload and establishes a database connection.\n   - Sets up a temporary directory (`tmp`) and removes any existing contents.\n\n2. **Circuit Generation**:\n   - Generates regex circuits based on the provided blueprint.\n   - Generates a main circuit template using the blueprint and writes it to a file.\n\n3. **Circuit Compilation**:\n   - Compiles the circuit using the `circom` compiler.\n   - Determines the required power of tau (ptau) based on the number of constraints and wires.\n   - Compiles the circuit binary using a witness generator.\n\n4. **Key Generation**:\n   - Downloads the ptau file and generates a zkey.\n   - Contributes to the zkey and exports the verification key.\n\n5. **Smart Contract Deployment**:\n   - Prepares the contract data and creates a contract.\n   - Generates and deploys a verifier contract.\n\n6. **Cleanup and File Upload**:\n   - Cleans up the temporary files and compresses the zkey chunks.\n   - Zips various files (circuit, circuit_cpp, zkey, verification key, witness calculator, etc.).\n   - Uploads the generated files to specified upload URLs.\n\n7. **Database Update**:\n   - Updates the verifier contract address in the database.\n\n## Directory Structure\n\n```\n.\n├── Cargo.toml          # Workspace configuration file for the Rust project.\n├── LICENSE             # License file for the project.\n├── README.md           # Main README file providing an overview of the project.\n│\n├── circom\n│   ├── Cargo.toml      # Cargo configuration file for the Circom project.\n│   ├── src             # Main Rust code for compiling and deploying circuits.\n│   └── templates       # Tera templates for generating Circom and Solidity code.\n│\n└── sdk-utils\n    ├── Cargo.toml      # Cargo configuration file for the SDK utils.\n    └── src             # Utility code used by the Circom project.\n```\n\n## Building and Running\n\nTo build and run the application, follow these steps:\n\n1. Install the necessary dependencies, including Rust and required external tools (`circom`, `snarkjs`, `bazel`, `curl`, `gzip`, `zip`).\n2. Clone the repository and navigate to the project directory.\n3. Build the project using `cargo build`.\n4. Run the application using `cargo run`.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkemail%2Fsdk-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkemail%2Fsdk-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkemail%2Fsdk-images/lists"}