{"id":34595716,"url":"https://github.com/timjp87/kzg-elixir","last_synced_at":"2026-04-09T04:31:02.664Z","repository":{"id":329581500,"uuid":"1120100125","full_name":"timjp87/kzg-elixir","owner":"timjp87","description":"Elixir bindings to implementation of the Polynomial Commitments API for EIP-4844 and EIP-7594, written in C","archived":false,"fork":false,"pushed_at":"2025-12-24T09:55:15.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-05T12:54:02.578Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/timjp87.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-12-20T13:44:10.000Z","updated_at":"2025-12-20T15:35:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/timjp87/kzg-elixir","commit_stats":null,"previous_names":["timjp87/kzg-elixir"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/timjp87/kzg-elixir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timjp87%2Fkzg-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timjp87%2Fkzg-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timjp87%2Fkzg-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timjp87%2Fkzg-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timjp87","download_url":"https://codeload.github.com/timjp87/kzg-elixir/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timjp87%2Fkzg-elixir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31586403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"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-12-24T11:35:35.070Z","updated_at":"2026-04-09T04:31:02.656Z","avatar_url":"https://github.com/timjp87.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KzgElixir\n\nElixir NIF bindings for the [c-kzg-4844](https://github.com/ethereum/c-kzg-4844) library, providing KZG trusted setup verification for Ethereum EIP-4844 (Proto-Danksharding).\n\n## Prerequisites\n\nYou need a C compiler (`gcc` or `clang`) and `make` installed on your system to build the NIF.\n- **macOS**: `xcode-select --install`\n- **Linux**: `apt-get install build-essential` or equivalent\n\n### Submodules\n\nThis library relies on `c-kzg-4844` and `blst` as git submodules. You must initialize them:\n\n```bash\ngit submodule update --init --recursive\n```\n\n## Installation\n\nAdd `kzg_elixir` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:kzg_elixir, \"~\u003e 2.1.5\"}\n  ]\nend\n```\n\n## Usage\n\n### 1. Load Trusted Setup\n\nBefore performing any KZG operations, you must load the trusted setup configuration. This is usually provided as a file (e.g., `trusted_setup_4096.txt`).\n\n```elixir\npath = \"path/to/trusted_setup.txt\"\n:ok = KzgElixir.load_trusted_setup(path)\n```\n\n### 2. Verify Blob KZG Proof\n\nVerify that a blob matches a given KZG commitment and proof.\n\n```elixir\nblob = \u003c\u003c...\u003e\u003e       # 131072 bytes\ncommitment = \u003c\u003c...\u003e\u003e # 48 bytes\nproof = \u003c\u003c...\u003e\u003e      # 48 bytes\n\ncase KzgElixir.verify_blob_kzg_proof(blob, commitment, proof) do\n  {:ok, true} -\u003e IO.puts(\"Valid!\")\n  {:ok, false} -\u003e IO.puts(\"Invalid!\")\n  {:error, reason} -\u003e IO.puts(\"Error: #{inspect(reason)}\")\nend\n```\n\n## Development\n\nThe C sources for `c-kzg-4844` and `blst` are bundled in `c_src`. The `Makefile` handles the compilation of the static libraries and links them into the NIF.\n\n```bash\nmix deps.get\nmix compile\nmix test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimjp87%2Fkzg-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimjp87%2Fkzg-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimjp87%2Fkzg-elixir/lists"}