open-index/open-npm huggingface dataset:
npm package: @fhevm-sdk/setup-react-native
Description: Automated setup script for FHEVM SDK in React Native (beta)
Latest version: 0.1.0-beta.1

# @fhevm-sdk/setup-react-native

Automated setup script for using FHEVM SDK in React Native projects.

## What It Does

This script automatically:
- ✅ Installs required dependencies (@callstack/polygen, polyfills)
- ✅ Initializes Polygen configuration
- ✅ Scans WASM modules from Zama SDK
- ✅ Generates native code for iOS/Android
- ✅ Sets up iOS pods
- ✅ Provides clear next steps

## Usage

In your React Native project, run:

```bash
npx @fhevm-sdk/setup-react-native
```

That's it! The script will handle everything.

## What You'll See

```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  🚀 FHEVM SDK - React Native Setup
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✔ React Native project detected
✔ Prerequisites OK
✔ Dependencies installed
✔ Polygen initialized
✔ Polygen config created
✔ WASM modules scanned
✔ Native code generated
✔ iOS pods installed

✅ Setup Complete!
```

## Prerequisites

### macOS
```bash
brew install wabt
```

### Linux
```bash
sudo apt install wabt
```

### Windows
Download from: https://github.com/WebAssembly/wabt/releases

## After Setup

Add these imports to the **very top** of your `index.js`:

```javascript
import '@callstack/polygen/polyfill';
import 'react-native-get-random-values';
import '@ethersproject/shims';
import { Buffer } from 'buffer';
global.Buffer = Buffer;
```

Then use the FHEVM SDK normally:

```javascript
import { initFHEVM, encryptInput } from '@fhevm-sdk/core';

await initFHEVM({ network: 'sepolia' });

const encrypted = await encryptInput({
  contract: '0x...',
  user: '0x...',
  schema: { value: 'uint32' },
  values: { value: 42 },
});
```

## Troubleshooting

### "wabt not found"

Install wabt first (see Prerequisites above), then run the script again.

### "Not a React Native project"

Make sure you're running this in a React Native project directory (one with `react-native` in package.json).

### Build errors after setup

Try:

**iOS:**
```bash
cd ios && pod install && cd ..
npx react-native run-ios
```

**Android:**
```bash
cd android && ./gradlew clean && cd ..
npx react-native run-android
```

## What Gets Installed

- `@callstack/polygen` - Converts WASM to native code
- `react-native-get-random-values` - Crypto polyfill
- `buffer` - Buffer polyfill
- `@ethersproject/shims` - Ethereum utilities polyfill

## Manual Setup

If you prefer to set up manually, see the [core package README](https://www.npmjs.com/package/@fhevm-sdk/core#react-native-support).

## License

BSD-3-Clause-Clear
npm package: @fhevm/mock-utils
Description: FHEVM mock library
Latest version: 0.4.2

# FHEVM Mock Utils

The core utility tools and classes of
[FHEVM Hardhat Plugin](https://github.com/zama-ai/fhevm-mocks/tree/main/packages/hardhat-plugin).

## Installation

```sh
npm install --save-dev @fhevm/mock-utils
```

## List of peer dependencies

The FHEVM Mock Utils package relies on the following peer dependencies to function correctly.

- `@zama-fhe/relayer-sdk`
- `ethers`
- `typescript` (optional)
npm package: @fhevm/solidity
Description: A Solidity library for interacting with fhevm protocol
Latest version: 0.11.1

## Introduction

**FHEVM Solidity** is a Solidity library that allows developers to write confidential smart contracts with the standard Solidity development workflow.

## Main features

The FHEVM Solidity library offers the following core features:

- **Encrypted types**: Use encrypted integers like `euint8`, `euint16`, ..., `euint256` directly in Solidity contracts.
- **Encrypted operations**: Perform operations on encrypted data using FHE-compatible functions like `add`, `sub`, `eq`, `lt`, `ternary`, etc.
- **Access control**: Restrict which accounts can decrypt or update values with programmable access logic.
- **Symbolic execution**: All encrypted operations are executed symbolically on the chain, with actual computation performed off-chain by the [coprocessor](../coprocessor/).

_See full details in the [Key concepts](https://docs.zama.ai/fhevm/smart-contract/key_concepts) section of the documentation._

## Get started

To start writing confidential smart contracts using FHEVM Solidity, follow the Hardhat setup guide here: [Getting Started with Hardhat](https://docs.zama.ai/fhevm/getting-started/overview-1/hardhat).

run

```
npm install
```

To run forge tests:

```
npm run forge:soldeer
npm run test:forge
```

## Resources

- [Documentation](https://docs.zama.ai/fhevm/)
- [Contract examples](./examples/)

## Support

<a target="_blank" href="https://community.zama.ai">
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="../docs/.gitbook/assets/support-banner-dark.png">
  <source media="(prefers-color-scheme: light)" srcset="../docs/.gitbook/assets/support-banner-light.png">
  <img alt="Support">
</picture>
</a>

🌟 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.

[![GitHub stars](https://img.shields.io/github/stars/zama-ai/fhevm?style=social)](https://github.com/zama-ai/fhevm/)