Local development
How to use the cleartext relayer for local Hardhat nodes and custom chain deployments without a KMS or gateway.
SDK setup
1. Install packages
npm install @zama-fhe/sdk viem2. Use the cleartext() relayer with createConfig
cleartext() relayer with createConfigimport { createConfig } from "@zama-fhe/sdk/viem";
import { cleartext, ZamaSDK, memoryStorage } from "@zama-fhe/sdk";
import { hardhat } from "@zama-fhe/sdk/chains";3. Create the config with a Hardhat chain
const config = createConfig({
chains: [{ ...hardhat, executorAddress: "0xYourExecutorAddress" }],
publicClient,
walletClient,
storage: memoryStorage,
relayers: { [hardhat.id]: cleartext() },
});
const sdk = new ZamaSDK(config);4. Use the SDK normally
5. (Optional) Create a custom config for your own chain
Field
Source
Next steps
Last updated