{"id":47906366,"url":"https://github.com/zama-ai/sdk","last_synced_at":"2026-04-18T08:09:05.876Z","repository":{"id":348510968,"uuid":"1162546777","full_name":"zama-ai/sdk","owner":"zama-ai","description":"TypeScript SDK for confidential FHE smart contracts on Zama Protocol","archived":false,"fork":false,"pushed_at":"2026-04-03T21:08:40.000Z","size":4940,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-04T04:52:42.284Z","etag":null,"topics":["blockchain","fully-homomorphic-encryption","privacy","sdk"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zama-ai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2026-02-20T11:52:56.000Z","updated_at":"2026-04-01T11:47:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zama-ai/sdk","commit_stats":null,"previous_names":["zama-ai/sdk"],"tags_count":62,"template":false,"template_full_name":null,"purl":"pkg:github/zama-ai/sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Fsdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Fsdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Fsdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Fsdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zama-ai","download_url":"https://codeload.github.com/zama-ai/sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Fsdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31518668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["blockchain","fully-homomorphic-encryption","privacy","sdk"],"created_at":"2026-04-04T04:52:36.928Z","updated_at":"2026-04-18T08:09:05.869Z","avatar_url":"https://github.com/zama-ai.png","language":"TypeScript","funding_links":[],"categories":["Protocol \u0026 Product"],"sub_categories":["Repositories"],"readme":"\u003cp align=\"center\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"docs/gitbook/.gitbook/assets/SDK-header-dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"docs/gitbook/.gitbook/assets/SDK-header-light.png\"\u003e\n  \u003cimg width=500 alt=\"Zama SDK\" src=\"docs/gitbook/.gitbook/assets/SDK-header-light.png\"\u003e\n\u003c/picture\u003e\n\u003c/p\u003e\n\n\u003chr/\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://docs.zama.org/protocol\"\u003e 📒 Documentation\u003c/a\u003e | \u003ca href=\"https://zama.ai/community\"\u003e 💛 Community support\u003c/a\u003e | \u003ca href=\"https://github.com/zama-ai/awesome-zama\"\u003e 📚 FHE resources by Zama\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@zama-fhe/sdk\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/%40zama-fhe%2Fsdk?label=latest%20release\u0026style=flat-square\" alt=\"Latest release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@zama-fhe/sdk\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/last-update/%40zama-fhe%2Fsdk/latest?style=flat-square\" alt=\"Latest release last updated\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/zama-ai/sdk/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-BSD--3--Clause--Clear-%23ffb243?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/zama-ai/bounty-program\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Contribute-Zama%20Bounty%20Program-%23ffd208?style=flat-square\" alt=\"Zama Bounty Program\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@zama-fhe/sdk\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/%40zama-fhe%2Fsdk/alpha?label=dev%20release\u0026style=flat-square\" alt=\"Dev release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@zama-fhe/sdk\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/last-update/%40zama-fhe%2Fsdk/alpha?style=flat-square\" alt=\"Dev release last updated\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/zama-ai/sdk/actions/workflows/vitest.yml\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/zama-ai/sdk/vitest.yml?style=flat-square\u0026label=unit%20tests\" alt=\"Unit tests\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/zama-ai/sdk/actions/workflows/playwright.yml\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/zama-ai/sdk/playwright.yml?style=flat-square\u0026label=e2e%20tests\" alt=\"E2E tests\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## About\n\n### What is Zama SDK?\n\n**Zama SDK** is a suite of TypeScript libraries for building privacy-preserving dApps on EVM-compatible blockchains powered by the _Zama Confidential Blockchain Protocol_. It provides everything you need to interact with confidential smart contracts using [Fully Homomorphic Encryption (FHE)](https://docs.zama.org/protocol/protocol/overview) — from encrypting inputs and decrypting results to managing access control — all from familiar TypeScript and React environments.\n\nZama SDK is designed for developers who want to integrate confidential operations into their applications without learning cryptography:\n\n- **End-to-end encryption:** Transaction data and on-chain state remain encrypted at all times.\n- **Framework-agnostic core:** Works with viem, ethers, or any EVM library.\n- **React-ready:** First-class React hooks powered by `@tanstack/react-query`.\n\n### Table of contents\n\n- [About](#about)\n  - [What is Zama SDK?](#what-is-zama-sdk)\n  - [Table of contents](#table-of-contents)\n  - [Packages](#packages)\n  - [Main features](#main-features)\n- [Working with Zama SDK](#working-with-zama-sdk)\n  - [Install](#install)\n  - [Development](#development)\n  - [Claude Code Setup](#claude-code-setup)\n  - [Contributing](#contributing)\n  - [License](#license)\n- [Resources](#resources)\n- [Support](#support)\n\n### Packages\n\n| Package                                        | Description                                                                                                                |\n| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |\n| [`@zama-fhe/sdk`](./packages/sdk/)             | Core SDK — confidential contract operations, FHE relayer, contract call builders, viem/ethers adapters, Web Worker support |\n| [`@zama-fhe/react-sdk`](./packages/react-sdk/) | React hooks wrapping the core SDK via `@tanstack/react-query`, with wagmi sub-path                                         |\n\n### Main features\n\n- **TypeScript-first:** Fully typed APIs with tree-shakeable ESM builds for minimal bundle size.\n- **Privacy by design:** Encrypt inputs, decrypt outputs, and manage access control for confidential smart contracts.\n- **Multi-library support:** Adapters for both viem and ethers, so you can use whichever EVM library your project already depends on.\n- **React hooks:** Dedicated React package with hooks for encrypting, decrypting, reencrypting, and querying confidential state — all backed by `@tanstack/react-query` for caching and suspense.\n- **Workers:** Offload heavy FHE operations to workers in Web and Node.js environments for non-blocking performance.\n- **Wagmi integration:** Drop-in wagmi connector support for seamless wallet and provider management in React apps.\n\n\u003cp align=\"right\"\u003e\n  \u003ca href=\"#about\" \u003e ↑ Back to top \u003c/a\u003e\n\u003c/p\u003e\n\n## Working with Zama SDK\n\n### Install\n\n```bash\n# Core SDK (vanilla TypeScript)\npnpm add @zama-fhe/sdk\n# or: npm install @zama-fhe/sdk / yarn add @zama-fhe/sdk\n\n# React hooks\npnpm add @zama-fhe/react-sdk @tanstack/react-query\n# or: npm install @zama-fhe/react-sdk @tanstack/react-query / yarn add @zama-fhe/react-sdk @tanstack/react-query\n```\n\n### Development\n\n**Prerequisites:** Node.js \u003e= 22, pnpm \u003e= 10\n\n```bash\npnpm install                # Install dependencies\npnpm build                  # Build all (sdk first, then react-sdk)\npnpm test                   # Watch mode\npnpm test:run               # Single run\npnpm typecheck              # Type checking\npnpm lint                   # Linting\npnpm format:check           # Formatting check\n```\n\n**E2E tests:**\n\n```bash\npnpm e2e:test               # Run Playwright E2E tests\npnpm e2e:test:ui            # Playwright UI mode\n```\n\n\u003e **Note:** The `forge-fhevm` submodule and its soldeer dependencies are installed automatically by `pnpm install`.\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for the full contributor guide (branching, PRs, code style, architecture).\n\n### Claude Code Setup\n\nThis repository includes an opt-in [Claude Code](https://docs.anthropic.com/en/docs/claude-code) configuration in `claude-setup/settings.json`. It provides:\n\n- **Auto-allowed commands** — `pnpm build`, `pnpm test`, `pnpm lint`, `pnpm typecheck`, `pnpm format`, and git diff variants run without prompting.\n- **Denied reads** — `.env` files and `.next/` are blocked to prevent accidental secret exposure.\n- **Ask-before-running** — destructive commands (`rm`), remote pushes (`git push`), and release commands require explicit approval.\n- **Post-edit hooks** — every file write/edit automatically triggers `pnpm typecheck`, `pnpm lint`, and `pnpm format`.\n- **Custom skills** — custom skills required for good development practices to contribute to this repo.\n\nTo use it, install [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and run `pnpm setup:claude`.\n\n### Contributing\n\nThere are two ways to contribute to Zama SDK:\n\n- [Open issues](https://github.com/zama-ai/sdk/issues/new/choose) to report bugs and typos, or to suggest new ideas\n- Request to become an official contributor by emailing hello@zama.ai.\n\nBecoming an approved contributor involves signing our Contributor License Agreement (CLA). Only approved contributors can send pull requests, so please make sure to get in touch before you do!\n\n### License\n\nThis software is distributed under the **BSD-3-Clause-Clear** license. Read [this](LICENSE) for more details.\n\n## Resources\n\n- [Documentation](https://docs.zama.org/protocol) — Official documentation of the Zama Confidential Blockchain Protocol.\n- [Awesome Zama – FHEVM](https://github.com/zama-ai/awesome-zama?tab=readme-ov-file#fhevm) — Curated articles, talks, and ecosystem projects.\n\n## Support\n\n🌟 If you find this project helpful or interesting, please consider giving it a star on GitHub! Your support helps to grow the community and motivates further development.\n\n\u003ca target=\"_blank\" href=\"https://community.zama.ai\"\u003e\n  💛 Community forum on Discourse\n\u003c/a\u003e\n\n\u003cp align=\"right\"\u003e\n  \u003ca href=\"#about\" \u003e ↑ Back to top \u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzama-ai%2Fsdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzama-ai%2Fsdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzama-ai%2Fsdk/lists"}