chore: update relayer-sdk to 0.4.1 and fix browser mock mode - #43
Merged
Conversation
- @zama-fhe/relayer-sdk → 0.4.1 (all packages) - @fhevm/solidity → ^0.11.1 - @fhevm/hardhat-plugin → ^0.4.2 - @fhevm/mock-utils → ^0.4.2 - ethers → ^6.16.0 (peer dep requirement) - @nomicfoundation/hardhat-ethers → ^3.1.3 (peer dep requirement) - Add turbopack resolveAlias for Node.js built-ins (fixes node-tkms fs error) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The wagmi config only included sepolia, so useSwitchChain had no hardhat chain to switch to. Now both chains and transports are always configured (hardhat transport is harmless in production). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update relayer-sdk CDN URL to 0.4.1 in layout.tsx and constants.ts - Replace empty-module.js with browser-compatible fs shim that loads WASM files via synchronous XHR from public/ - Copy node-tkms kms_lib_bg.wasm to public/ so the fs shim can serve it - This allows @fhevm/mock-utils to run in the browser, enabling local encrypt/decrypt on hardhat without routing through the remote relayer Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix synchronous XHR binary loading using overrideMimeType instead of
responseType (which is not supported for sync XHR)
- Add tfhe_bg.wasm to public/ for browser serving
- Patch node-tkms postinstall to use globalThis.TextEncoder/TextDecoder
instead of require('util') (avoids breaking Privy's isKeyObject)
- Use empty-module.js fs shim in webpack fallback for production builds
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@zama-fhe/relayer-sdkto v0.4.1,@fhevm/solidityto v0.11.1,@fhevm/hardhat-pluginand@fhevm/mock-utilsto v0.4.2fsmodule (synchronous XHR for WASM loading) and patchingnode-tkmsto useglobalThis.TextEncoder/TextDecoderinstead ofrequire('util')kms_lib_bg.wasmandtfhe_bg.wasmfrompublic/for browser-side WASM loadingTest plan
pnpm installruns cleanly (postinstall patches node-tkms)pnpm compileandpnpm hardhat:testpasspnpm next:buildsucceeds🤖 Generated with Claude Code