Prerequisites
- Node.js 18+
- TypeScript 5+
- viem 2.38.6+
Install packages
@cofhe/sdk 0.7.x pairs with @fhenixprotocol/cofhe-contracts 0.2.0. Keep every @cofhe/* package on the same version. They are released together and pin each other exactly. The compatibility page carries the full table.For Hardhat projects
If you are using Hardhat for development and testing, also install the plugin:
See the Hardhat Plugin Getting Started guide for configuration details.
For Foundry projects
If you are using Foundry for development and testing, install the Foundry plugin and its peer packages as dev dependencies:The Foundry plugin uses Solidity-only abstractions, so tests need no
@cofhe/sdk (JS).foundry.toml and remappings.txt setup.
Runtime entrypoints
Import from the entrypoint that matches your runtime:Next steps
- Quick start: write your first FHE contract and test.
- Client setup: configure and connect the SDK client.