diff --git a/README.md b/README.md index 4f538af..2a6c4ce 100644 --- a/README.md +++ b/README.md @@ -148,5 +148,5 @@ Read the full case study [here](https://case-studies.sismo.io/db/safe-drop). {% endhint %} {% hint style="info" %} -Learn how to build the Sybil-resistant airdrop [here](build-with-sismo-connect/tutorials/tuto.md). Alternatively, check out the [onchain boilerplate](build-with-sismo-connect/run-example-apps/onchain-sample-project.md). +Learn how to build the Sybil-resistant airdrop [here](build-with-sismo-connect/tutorials/tuto.md). Alternatively, check out the [onchain boilerplate](broken-reference). {% endhint %} diff --git a/SUMMARY.md b/SUMMARY.md index 80b0c6d..18a7219 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -7,11 +7,8 @@ ## Build with Sismo Connect * [Overview](build-with-sismo-connect/getting-started.md) -* [Quickstart](build-with-sismo-connect/getting-started-1.md) +* [Installation](build-with-sismo-connect/getting-started-1.md) * [Sismo Connect Cheatsheet](build-with-sismo-connect/sismo-connect-cheatsheet.md) -* [Boilerplates](build-with-sismo-connect/run-example-apps/README.md) - * [Onchain Boilerplate](build-with-sismo-connect/run-example-apps/onchain-sample-project.md) - * [Offchain Boilerplate](build-with-sismo-connect/run-example-apps/offchain-sample-project.md) * [Tutorials](build-with-sismo-connect/tutorials/README.md) * [Get Your appId - Create a Sismo Connect App](build-with-sismo-connect/tutorials/create-a-sismo-connect-app.md) * [Onchain Tutorial (1/2): Code Your Airdrop Contract With Privately-Aggregated Data](build-with-sismo-connect/tutorials/tuto.md) diff --git a/build-with-sismo-connect/faq.md b/build-with-sismo-connect/faq.md index 4bcc282..59bda9a 100644 --- a/build-with-sismo-connect/faq.md +++ b/build-with-sismo-connect/faq.md @@ -8,7 +8,7 @@ description: Frequently asked questions. What to do if I am stuck with pending transactions on a fork network? -You can end up in this situation if you are following the [onchain tutorial](tutorials/tuto.md) or the [onchain boilerplate](run-example-apps/onchain-sample-project.md). If it is the case, you are unable to make any transaction work on your local chain, and you surely view this type of message on your MetaMask: +You can end up in this situation if you are following the [onchain tutorial](tutorials/tuto.md) or the [onchain boilerplate](broken-reference). If it is the case, you are unable to make any transaction work on your local chain, and you surely view this type of message on your MetaMask: ![MetaMask connected to a locally forked Mumbai Testnet](<../.gitbook/assets/Capture d’écran 2023-05-12 à 01.10.06.png>) diff --git a/build-with-sismo-connect/getting-started-1.md b/build-with-sismo-connect/getting-started-1.md index a3b9b3f..e4514f3 100644 --- a/build-with-sismo-connect/getting-started-1.md +++ b/build-with-sismo-connect/getting-started-1.md @@ -1,18 +1,44 @@ -# Quickstart +# Installation -This section is intended for developers who have prior experience with incorporating new tools into their existing repositories. +## Get your appId - (30 secs) -{% hint style="info" %} -Having difficulties? Head over to the pre-configured [boilerplates](run-example-apps/) or [tutorials](tutorials/). Neither demand experience with Sismo's tech stack to get set up. +Before anything, go to the [Sismo Factory](https://https/factory.sismo.io/apps-explorer) and create your app. Once your app is created, make sure to get your appId. + +## Quick start - (1 min) + +Chose and install the starter of your choice in one unique command line. + +```bash +yarn create sismo-connect-app@latest +# or +npx create-sismo-connect-app@latest +# or +npm create sismo-connect-app@latest +``` + +### Available Starters + +1. **offchain: Sismo Connect +** [**Next.js**](https://nextjs.org/docs) \ + request ZK Proofs from users and verify them in a backend +2. **onchain: Sismo Connect +** [**Next.js**](https://nextjs.org/docs) **+** [**Foundry**](https://getfoundry.sh/) **+** [**wagmi**](https://wagmi.sh/)\ + request ZK Proofs from users and verify them in a smart contract +3. **\[Upcoming] onchain: Sismo Connect + Next.js + hardhat + ethers**\ + coming very soon, until then, head over the [Manual Installation](getting-started-1.md#manual-installation) if you want to use Sismo Connect with hardhat + +Feel free to check the [Sismo Connect Cheatsheet](sismo-connect-cheatsheet.md), a great companion when developing an app using Sismo Connect. + +{% hint style="success" %} +We are here to support you on our [builders telegram group](https://buidlers.sismo.io) {% endhint %} -## Step 1 - Setup: Create Your Sismo Connect App +## Manual Installation -You must create a Sismo Connect app in the [Sismo Factory](https://factory.sismo.io) ([tutorial](tutorials/create-a-sismo-connect-app.md)) and get your appId. This appId will be required both in your front end and smart contracts/back end. +This section is intended for developers who have prior experience with incorporating new tools into their existing repositories. -## Step 2 - Request: Integrate Sismo Connect in Your Front End +### Integrate Sismo Connect in Your Front End -Your front end must make a Sismo Connect request for users to be redirected to their Data Vault to generate a ZK proof and send your front end a Sismo Connect Response. This response, containing the ZK proof, will be verified on your back end/smart contract. +Make a Sismo Connect Request, users will be redirected to their Data Vault to generate a ZK proof and send your front end a Sismo Connect Response. \ +This response, containing the ZK proof, will be verified on your back end/smart contract. {% hint style="success" %} Check the [Sismo Connect Cheatsheet](sismo-connect-cheatsheet.md) to see examples of requests. @@ -111,7 +137,7 @@ Check the [Sismo Connect Cheatsheet ](sismo-connect-cheatsheet.md)to get a large [Learn more](technical-documentation/sismo-connect-configuration.md) about Sismo Connect config and impersonation mode. {% endhint %} -## Step 3 - Verify: Sismo Connect in Your Smart Contracts/Back Ends +### Sismo Connect in Your Smart Contracts/Back Ends Your back end/smart contract will receive a Sismo Connect Response forwarded from your front end that you must verify. diff --git a/build-with-sismo-connect/getting-started.md b/build-with-sismo-connect/getting-started.md index 1ad52aa..94d04f5 100644 --- a/build-with-sismo-connect/getting-started.md +++ b/build-with-sismo-connect/getting-started.md @@ -31,4 +31,4 @@ Integrating Sismo Connect has three main steps: -
#sismo-connect-the-crypto-native-ssoWhat is Sismo Connect (2).png
run-example-appsBoilerplates.png
tutorialsTutorials.png
+
#sismo-connect-the-crypto-native-ssoWhat is Sismo Connect (2).png
Broken linkBoilerplates.png
tutorialsTutorials.png
diff --git a/build-with-sismo-connect/run-example-apps/README.md b/build-with-sismo-connect/run-example-apps/README.md deleted file mode 100644 index 9196735..0000000 --- a/build-with-sismo-connect/run-example-apps/README.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -description: Get a feel for Sismo Connect. ---- - -# Boilerplates - -You can use two boilerplates to be set up with Sismo Connect in minutes. - -1. The[ **onchain** boilerplate ](onchain-sample-project.md)— implementation of a simple airdrop Contract using Sismo Connect: - * Next.js for front end, Foundry for smart contracts - * Sismo Connect React Button to request ZK proofs - * Sismo Connect Solidity library to verify ZK proofs onchain -2. The [**offchain** boilerplate](offchain-sample-project.md) — implementation of a simple authentication for a server using Sismo Connect: - * Next.js for front end and back end - * Sismo Connect React Button to request ZK proofs - * Sismo Connect TypeScript library to verify ZK proofs in a back end - -{% hint style="success" %} -Like Sismo Connect? Dive deep into the codebase or jump into this [hands-on tutorial](../tutorials/tuto.md) on integrating a Sybil-resistant gated airdrop for Sismo Community members. -{% endhint %} - -{% content-ref url="onchain-sample-project.md" %} -[onchain-sample-project.md](onchain-sample-project.md) -{% endcontent-ref %} - -{% content-ref url="offchain-sample-project.md" %} -[offchain-sample-project.md](offchain-sample-project.md) -{% endcontent-ref %} diff --git a/build-with-sismo-connect/run-example-apps/offchain-sample-project.md b/build-with-sismo-connect/run-example-apps/offchain-sample-project.md deleted file mode 100644 index c7bbff9..0000000 --- a/build-with-sismo-connect/run-example-apps/offchain-sample-project.md +++ /dev/null @@ -1,53 +0,0 @@ -# Offchain Boilerplate - -This boilerplate can be used as a base to start coding offchain applications that use Sismo Connect. It is using Next.js for front ends and back ends. - -You are invited to modify the following: - -* `front/src/app/page.tsx` , the code of the front end using the Sismo Connect React Button to request ZK proofs from users. -* `src/app/api/verify/route.ts` , the back-end code using the Sismo Connect TypeScript library to verify ZK proofs. - -This boilerplate implements a simple user authentication to a server. - -{% hint style="success" %} -Use the [Sismo Connect Cheatsheet](../sismo-connect-cheatsheet.md) to choose your own data requests -{% endhint %} - -## Prerequisites - -* [Node.js](https://nodejs.org/en/download/) >= 18.15.0 (Latest LTS version) -* [Yarn](https://classic.yarnpkg.com/en/docs/install) - -## Installation - -Repository: [https://github.com/sismo-core/sismo-connect-boilerplate-offchain](https://github.com/sismo-core/sismo-connect-boilerplate-offchain) - -In a first terminal: - -```bash -# clone the repository -git clone https://github.com/sismo-core/sismo-connect-boilerplate-offchain.git -cd sismo-connect-boilerplate-offchain - -# install front-end/back-end dependencies -yarn -``` - -## Start your local application - -In a new terminal: - -```bash -# this will start your Next.js app -# the front end is available on http://localhost:3000/ -# it also starts a local backend -yarn dev -``` - -After this command, you will have your local application running on [http://localhost:3000](http://localhost:3000). - -

Running app on http://localhost:3000

- -{% hint style="success" %} -By default, the boilerplate lets you impersonate accounts to be eligible for the airdrop. If you want to learn more about it, you can read about the [Sismo Connect Configuration](../technical-documentation/sismo-connect-configuration.md). -{% endhint %} diff --git a/build-with-sismo-connect/run-example-apps/onchain-sample-project.md b/build-with-sismo-connect/run-example-apps/onchain-sample-project.md deleted file mode 100644 index dbc778a..0000000 --- a/build-with-sismo-connect/run-example-apps/onchain-sample-project.md +++ /dev/null @@ -1,86 +0,0 @@ -# Onchain Boilerplate - -This boilerplate can be used as a base to start coding onchain applications that use Sismo Connect. It is using Next.js for front end and Foundry for smart contract development. - -You are invited to modify: - -* `front/src/app/page.tsx` , the code of the front end using the Sismo Connect React Button to request ZK proofs -* `src/Airdrop.Sol` , the code of the smart contract using Sismo Connect Solidity Library to verify ZK proofs - -{% hint style="success" %} -Use the [Sismo Connect Cheatsheet](../sismo-connect-cheatsheet.md) to choose your own data requests -{% endhint %} - -{% hint style="info" %} -This boilerplate implements SafeDrop, a Sybil-resistant airdrop from privately-aggregated data. Read the [full case study](https://case-studies.sismo.io) of SafeDrop or complete its [tutorial](../tutorials/tuto.md). -{% endhint %} - -## Prerequisites - -* [Node.js](https://nodejs.org/en/download/) >= 18.15.0 (Latest LTS version) -* [Yarn](https://classic.yarnpkg.com/en/docs/install) -* [Foundry](https://book.getfoundry.sh/) (see how to install it [here](https://book.getfoundry.sh/getting-started/installation)) -* MetaMask installed in your browser - -## Installation - -Repository: [https://github.com/sismo-core/sismo-connect-boilerplate-onchain](https://github.com/sismo-core/sismo-connect-boilerplate-onchain) - -In a first terminal: - -```bash -# clone the repository -git clone https://github.com/sismo-core/sismo-connect-boilerplate-onchain -cd sismo-connect-boilerplate-onchain - -# install contract dependencies with Forge -foundryup -forge install -``` - -## Launch a local fork chain of Mumbai - -In a new terminal: - -```bash -yarn anvil -``` - -## Start your local application - -In a new terminal: - -```bash -# install frontend dependencies -cd front -yarn - -# this will start your Next.js app -# the frontend is available on http://localhost:3000/ -# it deploys the contracts on the local blockchain -yarn dev -``` - -After this command, you will have your local application running on [http://localhost:3000](http://localhost:3000), and all the contracts have been deployed on your local blockchain. - -

Running app on http://localhost:3000

- -If you wish to see the front-end code, you can go to the `front/src/app/page.tsx` file. The contract code is in the `src` folder. - -{% hint style="success" %} -By default, the boilerplate lets you impersonate accounts to be eligible for the airdrop. If you want to learn more about it, you can read about the [Sismo Connect Configuration](../technical-documentation/sismo-connect-configuration.md). -{% endhint %} - -## Important note - -{% hint style="warning" %} -The interaction with the fork network can become quite unstable if you stop the `yarn anvil` command at some point or if you have already used the sample app before. - -If so: - -* keep the local anvil node running, -* make sure to delete your activity tab for the fork network in MetaMask by going to "Settings > Advanced > Clear activity tab data" when connected to the fork network. -* relaunch the anvil node and the application - -See [FAQ](../faq.md) for more information. -{% endhint %} diff --git a/build-with-sismo-connect/sismo-connect-cheatsheet.md b/build-with-sismo-connect/sismo-connect-cheatsheet.md index c0e8081..c698878 100644 --- a/build-with-sismo-connect/sismo-connect-cheatsheet.md +++ b/build-with-sismo-connect/sismo-connect-cheatsheet.md @@ -35,7 +35,7 @@ SIsmo Connect Response (with a ZK proof in it) ### Front End: Make a Sismo Connect Request with React Button {% hint style="info" %} -As an alternative to the React Button, you can use the [`@sismo-core/sismo-connect-client`](technical-documentation/packages/client.md) [library](technical-documentation/packages/client.md) +As an alternative to the React Button, you can use the [`@sismo-core/sismo-connect-client`](technical-documentation/packages/client.md) library {% endhint %} ```tsx @@ -542,4 +542,4 @@ contract MyContract is SismoConnect { } ``` -Refer to the [Sismo Connect Solidity Library](technical-documentation/packages/solidity.md), the [onchain app boilerplate](run-example-apps/onchain-sample-project.md) or the [onchain tutorial](tutorials/tuto.md) for more information. +Refer to the [Sismo Connect Solidity Library](technical-documentation/packages/solidity.md), the [onchain app boilerplate](broken-reference) or the [onchain tutorial](tutorials/tuto.md) for more information. diff --git a/build-with-sismo-connect/technical-documentation/packages/solidity.md b/build-with-sismo-connect/technical-documentation/packages/solidity.md index 2169ded..c81d8fb 100644 --- a/build-with-sismo-connect/technical-documentation/packages/solidity.md +++ b/build-with-sismo-connect/technical-documentation/packages/solidity.md @@ -4,7 +4,7 @@ description: Verify proofs from your users # Sismo Connect Solidity Library: Verify Onchain -The Sismo Connect Solidity Library is built on top of the [Hydra-S2 Verifier](../../../how-sismo-works/core-components/proving-schemes/hydra-s2.md) and allows to easily verify proofs from your users **onchain**. +The Sismo Connect Solidity Library allows to easily verify proofs from your users **onchain**.

Sismo Connect onchain Flow

diff --git a/build-with-sismo-connect/tutorials/tuto.md b/build-with-sismo-connect/tutorials/tuto.md index 65f3e72..c5d48f0 100644 --- a/build-with-sismo-connect/tutorials/tuto.md +++ b/build-with-sismo-connect/tutorials/tuto.md @@ -577,7 +577,7 @@ To see how to deploy your contracts, you can go to the [**associated tutorial**] ## Next steps -If you have any questions about integrating Sismo Connect, don’t hesitate to reach out. The team will be happy to answer any questions you may have. Any feedback is also welcomed! If you want to fork a repository with complex requests already set up, you can check our [**onchain boilerplate**](../run-example-apps/onchain-sample-project.md). +If you have any questions about integrating Sismo Connect, don’t hesitate to reach out. The team will be happy to answer any questions you may have. Any feedback is also welcomed! If you want to fork a repository with complex requests already set up, you can check our [**onchain boilerplate**](broken-reference). Get involved in the Sismo community! 🎭 diff --git a/data-groups/data-groups-and-creation/create-your-group-generator.md b/data-groups/data-groups-and-creation/create-your-group-generator.md index 682ddf9..4707ab1 100644 --- a/data-groups/data-groups-and-creation/create-your-group-generator.md +++ b/data-groups/data-groups-and-creation/create-your-group-generator.md @@ -464,7 +464,7 @@ Now that you have your Group, you can build the following with it: * [**Sismo Connect App**](../../#sismo-connect-the-crypto-native-sso): * using the [Factory](https://factory.sismo.io/apps-explorer) * creating by yourself using the [sismo-connect-packages](https://github.com/sismo-core/sismo-connect-packages/tree/main). - * You can find [**here**](../../build-with-sismo-connect/run-example-apps/) boilerplates to run on your computer. + * You can find [**here**](broken-reference) boilerplates to run on your computer. * And [**here**](../../build-with-sismo-connect/tutorials/) tutorials that shows how to build Sismo Connect apps. ### Contribute to the Sismo Hub