Skip to content

Commit

Permalink
Merge pull request #35 from zama-ai/docs/refactor
Browse files Browse the repository at this point in the history
docs() move docs pages and rewrite some parts
  • Loading branch information
immortal-tofu authored Sep 12, 2023
2 parents f9852d0 + 7964155 commit a205e1b
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 325 deletions.
28 changes: 13 additions & 15 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@

- [What is fhEVM ecosystem?](README.md)

## fhevmjs

- [Getting Started](sdk/getting_started.md)
- [Using the CLI](sdk/cli.md)
- [Instance](sdk/instance.md)
- [Parameters](sdk/parameters.md)
- [Reencryption](sdk/reencryption.md)
- ## [Examples](sdk/examples.md)
-

## Solidity
## Contract

- [Getting Started](solidity/getting_started.md)
- [TFHE Library](solidity/library.md)
- [Function specifications](solidity/functions.md)
- [Decryption and control structures](solidity/requires.md)

## Examples
## fhevmjs

- [Getting Started](sdk/getting_started.md)
- [Using the CLI](sdk/cli.md)
- [Setup an instance](sdk/instance.md)
- [Inputs](sdk/inputs.md)
- [Reencryption](sdk/reencryption.md)
- [Examples](sdk/examples.md)

## Resources

- [ERC-20](examples/erc20.md)
- [Blind auction](examples/blindauction.md)
- [Other examples](examples/other.md)
- [Tutorials](resources/tutorials.md)
- [Examples](resources/examples.md)
164 changes: 0 additions & 164 deletions docs/examples/blindauction.md

This file was deleted.

129 changes: 0 additions & 129 deletions docs/examples/erc20.md

This file was deleted.

7 changes: 5 additions & 2 deletions docs/examples/other.md → docs/resources/examples.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Other examples
# Examples

## Solidity
## Contracts

- [ERC-20](https://github.com/zama-ai/fhevm-solidity/blob/main/examples/EncryptedERC20.sol)
- [Blind Auction](https://github.com/zama-ai/fhevm-solidity/blob/main/examples/BlindAuction.sol)
- [Governor DAO](https://github.com/zama-ai/fhevm-solidity/tree/main/examples/Governor)
- [Mixnet](https://github.com/anonymousGifter/mixnet-core) by [Remi Gai](https://github.com/remi-gai)
- [Battleship](https://github.com/battleship-fhevm/battleship-hardhat) by [Owen Murovec](https://github.com/omurovec)
- [Darkpool](https://github.com/omurovec/fhe-darkpools) by [Owen Murovec](https://github.com/omurovec)
5 changes: 5 additions & 0 deletions docs/resources/tutorials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Tutorials

- [Workshop during ETHcc](https://www.youtube.com/watch?v=eivfVykPP8U) by Morten Dahl (Zama)
- [Confidential ERC-20 Tokens Using Homomorphic Encryption](https://www.zama.ai/post/confidential-erc-20-tokens-using-homomorphic-encryption) by Clément Danjou (Zama)
- [On-chain Blind Auctions Using Homomorphic Encryption](https://www.zama.ai/post/on-chain-blind-auctions-using-homomorphic-encryption) by Clément Danjou (Zama)
17 changes: 4 additions & 13 deletions docs/sdk/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ Welcome to the documentation for fhevmjs, a JavaScript library that enables inte

## Installation

To get started with fhevmjs, you need to install it as a dependency in your JavaScript project. You can do this using npm (Node Package Manager) or Yarn. Open your terminal and navigate to your project's directory, then run one of the following commands:
To get started with fhevmjs, you need to install it as a dependency in your JavaScript project. You can do this using npm, Yarn or pnpm. Open your terminal and navigate to your project's directory, then run one of the following commands:

```bash
# Using npm
npm install fhevmjs

# Using Yarn
yarn add fhevmjs

# Using pnpm
pnpm add fhevmjs
```

This will download and install the fhevmjs library and its dependencies into your project.
Expand Down Expand Up @@ -66,18 +69,6 @@ You can take a look at [this template](https://github.com/zama-ai/fhevmjs-react-

#### Troubleshooting

##### Module not found: Error: Can't resolve 'tfhe_bg.wasm'

In the codebase, there is a `new URL('tfhe_bg.wasm')` which triggers a resolve by Webpack. If you encounter an issue, you can add a fallback for this file by adding a resolve configuration in your `webpack.config.js`:

```javascript
resolve: {
fallback: {
'tfhe_bg.wasm': require.resolve('tfhe/tfhe_bg.wasm'),
},
},
```

##### Issue with importing ESM version

With a bundler such as Webpack or Rollup, imports will be replaced with the version mentioned in the `"browser"` field of the `package.json`.
Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/parameters.md → docs/sdk/inputs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Parameters
# Encrypted inputs

The library provides a set of functions to encrypt integers of various sizes (8, 16, and 32 bits) using the blockchain's public key. These encrypted integers can then be securely used as parameters for smart contract methods within the blockchain ecosystem.

Expand Down
Loading

0 comments on commit a205e1b

Please sign in to comment.