From c4cb471853dd9bff5d6cac6c63adf20709f45f86 Mon Sep 17 00:00:00 2001 From: sripwoud Date: Fri, 26 Apr 2024 16:17:19 +0200 Subject: [PATCH] chore(docs): format `mdx` files with `remark` `prettier` doesn't not have proper support for MDX v3. Docusaurus recommends using `remark` instead. https://docusaurus.io/docs/markdown-features/react re #503 --- .github/pull_request_template.md | 2 +- .github/workflows/pull-requests.yml | 4 +- README.md | 4 +- .../version-V3/guides/fetching-data.mdx | 49 +- .../version-V3/guides/groups.mdx | 79 ++- .../version-V3/guides/identities.mdx | 61 ++- .../version-V3/guides/proofs.mdx | 83 ++-- .../version-V3/quick-setup.mdx | 337 ++++++------- .../version-V3/troubleshooting.mdx | 96 ++-- apps/docs/package.json | 22 +- .../version-V3/guides/fetching-data.mdx | 49 +- .../version-V3/guides/groups.mdx | 79 ++- .../version-V3/guides/identities.mdx | 63 ++- .../version-V3/guides/proofs.mdx | 84 ++-- .../versioned_docs/version-V3/quick-setup.mdx | 337 ++++++------- .../version-V3/troubleshooting.mdx | 94 ++-- .../version-V4-beta/getting-started.mdx | 24 +- .../version-V4-beta/guides/groups.mdx | 101 ++-- .../version-V4-beta/guides/identities.mdx | 55 +-- .../version-V4-beta/guides/proofs.mdx | 51 +- .../version-V4-beta/subgraph.mdx | 5 +- package.json | 6 +- yarn.lock | 462 ++++++++++++++++-- 23 files changed, 1222 insertions(+), 925 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 27687e3ea..9b5d56139 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -34,7 +34,7 @@ - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings -- [ ] I have run `yarn prettier` and `yarn lint` without getting any errors +- [ ] I have run `yarn format` and `yarn lint` without getting any errors - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 8cc2488a9..e95e3bd88 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -31,8 +31,8 @@ jobs: - name: Build subgraph run: yarn build:subgraph - - name: Run Prettier - run: yarn prettier + - name: Format + run: yarn format - name: Run Eslint run: yarn lint diff --git a/README.md b/README.md index 54a707c94..42b20dafb 100644 --- a/README.md +++ b/README.md @@ -295,13 +295,13 @@ yarn lint Run [Prettier](https://prettier.io/) to check formatting rules: ```bash -yarn prettier +yarn format ``` Or to automatically format the code: ```bash -yarn prettier:write +yarn format:write ``` ### Conventional commits diff --git a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/fetching-data.mdx b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/fetching-data.mdx index 05cea105c..804e70e38 100644 --- a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/fetching-data.mdx +++ b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/fetching-data.mdx @@ -18,34 +18,31 @@ Hay dos formas para hacer esto, usando [`SemaphoreSubgraph`](https://github.com/ ## Instalar librería - - -```bash -npm install @semaphore-protocol/data@^3 -``` - - - - -```bash -yarn add @semaphore-protocol/data@^3 -``` - - - - -```bash -pnpm add @semaphore-protocol/data@^3 -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/data@^3 + ``` + + + + ```bash + yarn add @semaphore-protocol/data@^3 + ``` + + + + ```bash + pnpm add @semaphore-protocol/data@^3 + ``` + ## Obtener datos usando SemaphoreSubgraph @@ -113,6 +110,7 @@ const semaphoreSubgraph = new SemaphoreSubgraph("sepolia") const { members } = await semaphoreSubgraph.getGroup(groupId, { members: true }) const group = new Group(groupId, 20, members) ``` + ::: ## Obtener datos usando SemaphoreEthers @@ -178,4 +176,5 @@ const semaphoreEthers = new SemaphoreEthers("sepolia") const members = await semaphoreEthers.getGroupMembers(groupId) const group = new Group(groupId, 20, members) ``` + ::: diff --git a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/groups.mdx b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/groups.mdx index 6a3813850..caf222cc7 100644 --- a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/groups.mdx +++ b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/groups.mdx @@ -11,70 +11,67 @@ import TabItem from "@theme/TabItem" Un [grupo Semaphore](/V3/glossary/#grupo-semaphore) contiene los [identity commitments](/V3/glossary/#compromiso-de-identidad-identity-commitment) (compromisos de identidad) de miembros del grupo. Estos son algunos ejemplos de uso de los grupos: -- Encuesta con preguntas a la que se unen las personas que acudieron a un evento para calificarlo, -- votación a la que se unen los miembros para votar por una propuesta, -- Denunciantes que están verificados como empleados de una organización. +- Encuesta con preguntas a la que se unen las personas que acudieron a un evento para calificarlo, +- votación a la que se unen los miembros para votar por una propuesta, +- Denunciantes que están verificados como empleados de una organización. Un grupo Semaphore es un [árbol de Merkle incremental](/V3/glossary/#árbol-de-merkle-merkle-tree), y los miembros del grupo (por ejemplo, [identity commitments](/V3/glossary/#compromiso-de-identidad-identity-commitment)) son las hojas del árbol. Los grupos Semaphore determinan los siguientes tres parámetro: -- **Group id**: un identificador único para el grupo; -- **Tree depth**: el número máximo de miembros que puede contener un grupo (`max size = 2 ^ tree depth`); -- **Members** la lista de miembros para inicializar el grupo. +- **Group id**: un identificador único para el grupo; +- **Tree depth**: el número máximo de miembros que puede contener un grupo (`max size = 2 ^ tree depth`); +- **Members** la lista de miembros para inicializar el grupo. Aprenda cómo trabajar con grupos. -- [**Grupos off-chain**](#grupos-off-chain-externos-a-la-cadena) -- [**Grupos on-chain**](#grupos-on-chain) +- [**Grupos off-chain**](#grupos-off-chain-externos-a-la-cadena) +- [**Grupos on-chain**](#grupos-on-chain) ## Grupos off-chain (externos a la cadena) -- [Crear un grupo](#crear-un-grupo) -- [Añadir miembros](#añadir-miembros) -- [Remover o actualizar miembros](#remover-o-actualizar-miembros) +- [Crear un grupo](#crear-un-grupo) +- [Añadir miembros](#añadir-miembros) +- [Remover o actualizar miembros](#remover-o-actualizar-miembros) ### Crear un grupo Utilice la clase `Group` de la librería [`@semaphore-protocol/group`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/group) para crear un grupo off-chain con los siguientes parámetros: -- `Group id`: un identificar único para el grupo; -- `Tree depth`: (_default `20`_) el número máximo de usuarios que puede contener un grupo, el valor por defecto es 20 (`max size = 2 ^ tree depth`). -- `Members`: (_default `[]`_) la lista de miembros para inicializar el grupo. +- `Group id`: un identificar único para el grupo; +- `Tree depth`: (*default `20`*) el número máximo de usuarios que puede contener un grupo, el valor por defecto es 20 (`max size = 2 ^ tree depth`). +- `Members`: (*default `[]`*) la lista de miembros para inicializar el grupo. #### Instalar librería: - - -```bash -npm install @semaphore-protocol/group@^3 -``` - - - - -```bash -yarn add @semaphore-protocol/group@^3 -``` - - - - -```bash -pnpm add @semaphore-protocol/group@^3 -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/group@^3 + ``` + + + + ```bash + yarn add @semaphore-protocol/group@^3 + ``` + + + + ```bash + pnpm add @semaphore-protocol/group@^3 + ``` + -Para crear un grupo con el número de usuarios que aparece por defecto (20) _`treeDepth`_, llame la función para construir un `Group` sin el segundo parámetro. Por ejemplo: +Para crear un grupo con el número de usuarios que aparece por defecto (20) *`treeDepth`*, llame la función para construir un `Group` sin el segundo parámetro. Por ejemplo: ```ts import { Group } from "@semaphore-protocol/group" @@ -82,7 +79,7 @@ import { Group } from "@semaphore-protocol/group" const group = new Group(1) ``` -El siguiente código de ejemplo pasa por _`treeDepth`_ para crear un grupo para `2 ^ 30 = 1073741824` miembros: +El siguiente código de ejemplo pasa por *`treeDepth`* para crear un grupo para `2 ^ 30 = 1073741824` miembros: ```ts import { Group } from "@semaphore-protocol/group" diff --git a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/identities.mdx b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/identities.mdx index 1d0545319..84bb3f87f 100644 --- a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/identities.mdx +++ b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/identities.mdx @@ -11,48 +11,47 @@ import TabItem from "@theme/TabItem" Para unirse a un [grupo Semaphore](/V3/glossary#grupo-semaphore), un usuario primero deberá crear una [identidad Semaphore](/V3/glossary#identidad-semaphore). Una identidad Semaphore contiene dos valores generados junto con la identidad: -- Identity trapdoor (Identidad trampilla) -- Identity nullifier (Anulador de identidad) +- Identity trapdoor (Identidad trampilla) +- Identity nullifier (Anulador de identidad) Para utilizar y verificar su identidad, la persona dueña de la identidad (usuario) debe conocer los valores trapdoor y nullifier. Para prevenir fraudes, la persona dueña debe conservar de forma secreta ambos valores. ## Crear identidades -En su código, utilice la librería [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity) para crear una identidad Semaphore _de forma determinística_ (del hash de un mensaje) o _de forma aleatoria_. +En su código, utilice la librería [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity) para crear una identidad Semaphore *de forma determinística* (del hash de un mensaje) o *de forma aleatoria*. -- [**Crear identidades aleatorias**](#crear-identidades-aleatorias) -- [**Crear identidades determinísticas**](#crear-identidades-determinísticas) +- [**Crear identidades aleatorias**](#crear-identidades-aleatorias) +- [**Crear identidades determinísticas**](#crear-identidades-determinísticas) ### Instalar librería: - - -```bash -npm install @semaphore-protocol/identity@^3 -``` - - -```bash -yarn add @semaphore-protocol/identity@^3 -``` - - - - -```bash -pnpm add @semaphore-protocol/identity@^3 -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/identity@^3 + ``` + + + + ```bash + yarn add @semaphore-protocol/identity@^3 + ``` + + + + ```bash + pnpm add @semaphore-protocol/identity@^3 + ``` + ### Crear identidades aleatorias @@ -67,8 +66,8 @@ const { trapdoor, nullifier, commitment } = new Identity() La nueva identidad contiene dos valores aleatorios secretos: `trapdoor` y `nullifier`, y un valor público: `commitment`. -El hash Poseidon del identity nullifier y trapdoor se conoce como _identity secret_ (el secreto de identidad), -y su hash es el _identity commitment_ (compromiso de identidad). +El hash Poseidon del identity nullifier y trapdoor se conoce como *identity secret* (el secreto de identidad), +y su hash es el *identity commitment* (compromiso de identidad). Un identity commitment (compromiso de identidad), de forma similar a las direcciones Ethereum, es un valor público que se utiliza en los grupos Semaphore para representar la identidad de un miembro del grupo. Los valores secretos son similares a las llaves privadas @@ -77,7 +76,7 @@ Ethereum y se utilizan para generar pruebas de conocimiento cero (ZKP) Semaphore ### Crear identidades determinísticas Si transmite un mensaje como un parámetro, Semaphore genera `trapdoor` y `nullifier` -del hash _SHA256_ del mensaje. +del hash *SHA256* del mensaje. El mensaje puede ser una contraseña o un mensaje que el usuario firma de forma criptográfica con una llave privada. Al utilizar identidades determinísticas siempre deberá mantener secreto el mensaje. diff --git a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/proofs.mdx b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/proofs.mdx index 0847dae28..a115ebed0 100644 --- a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/proofs.mdx +++ b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/guides/proofs.mdx @@ -10,56 +10,54 @@ import TabItem from "@theme/TabItem" Una vez que un usuario liga su [identidad Semaphore](/V3/glossary#identidad-semaphore) a un [grupo Semaphore](/V3/glossary#grupo-semaphore), el usuario puede emitir una señal anónima con una prueba de conocimiento cero (ZKP) que demuestre lo siguiente: -- el usuario es un miembro del grupo, -- el mismo usuario creo tanto la señal como la prueba. +- el usuario es un miembro del grupo, +- el mismo usuario creo tanto la señal como la prueba. Las y los desarrolladores pueden utilizar Semaphore para realizar las siguientes acciones: -- [**Generar una prueba externa a la cadena (off-chain)**](#generar-una-prueba-off-chain) -- [**Verificar una prueba externa a la cadena (off-chain)**](#verificar-una-prueba-off-chain) -- [**Verificar una prueba interna a la cadena (on-chain)**](#verificar-una-prueba-on-chain) +- [**Generar una prueba externa a la cadena (off-chain)**](#generar-una-prueba-off-chain) +- [**Verificar una prueba externa a la cadena (off-chain)**](#verificar-una-prueba-off-chain) +- [**Verificar una prueba interna a la cadena (on-chain)**](#verificar-una-prueba-on-chain) ## Generar una prueba off-chain Utilice la librería [`@semaphore-protocol/proof`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/proof) para generar una prueba off-chain. Para generar una prueba, transforme los siguientes parámetros con la función `generateProof`: -- `identity`: la identidad Semaphore del usuario emitiendo la señal y generando la prueba; -- `group`: el grupo al cual pertenece el usuario; -- `externalNullifier`: el valor que impide la emisión de dos señales por el mismo usuario; -- `signal`: la señal que el usuario quiere enviar de forma anónima; -- `snarkArtifacts`: la `zkey` y `wasm` de los [archivos confiables de configuración](/V3/glossary/#archivos-confiables-de-configuración-trusted-setup-files). +- `identity`: la identidad Semaphore del usuario emitiendo la señal y generando la prueba; +- `group`: el grupo al cual pertenece el usuario; +- `externalNullifier`: el valor que impide la emisión de dos señales por el mismo usuario; +- `signal`: la señal que el usuario quiere enviar de forma anónima; +- `snarkArtifacts`: la `zkey` y `wasm` de los [archivos confiables de configuración](/V3/glossary/#archivos-confiables-de-configuración-trusted-setup-files). #### Instalar librería: - - -```bash -npm install @semaphore-protocol/proof@^3 -``` - - - - -```bash -yarn add @semaphore-protocol/proof@^3 -``` - - - -```bash -pnpm add @semaphore-protocol/proof@^3 -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/proof@^3 + ``` + + + + ```bash + yarn add @semaphore-protocol/proof@^3 + ``` + + + + ```bash + pnpm add @semaphore-protocol/proof@^3 + ``` + En el caso de uso de un sistema de votación, una vez que todos los votantes hayan ligado sus [identidades](/V3/guides/identities#crear-identidades) al [grupo](/V3/guides/groups) de la votación, @@ -86,6 +84,7 @@ Si estás generando la prueba en el lado del cliente, puedes evitar agregar los ```ts const fullProof = await generateProof(identity, group, externalNullifier, signal) ``` + ::: ## Verificar una prueba off-chain @@ -93,8 +92,8 @@ const fullProof = await generateProof(identity, group, externalNullifier, signal Utilice la librería [`@semaphore-protocol/proof`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/proof) para verificar una prueba Semaphore off-chain. Para verificar una prueba, transforme los siguientes parámetros con la función `verifyProof`: -- `fullProof`: la prueba Semaphore; -- `treeDepth`: la profundidad del árbol de Merkle. +- `fullProof`: la prueba Semaphore; +- `treeDepth`: la profundidad del árbol de Merkle. La siguiente muestra de código demuestra cómo verificar la prueba generada previamente: @@ -116,12 +115,12 @@ Vea nuestros [contratos desplegados](/V3/deployed-contracts) para encontrar las Para verificar las pruebas Semaphore en su contrato, importe `ISemaphore.sol`, transfórmelo a la dirección `Semaphore.sol` y llame el método `verifyProof` con los siguientes parámetros: -- `groupId`: el identificador del grupo; -- `merkleTreeRoot`: la raíz del árbol de Merkle; -- `signal`: la señal que el usuario quiere enviar de forma anónima ; -- `nullifierHash`: un nullifier hash (hash anulador); -- `externalNullifier`: el valor que impide la emisión de dos señales por el mismo usuario; -- `proof`: una prueba Semaphore que es compatible con Solidity. +- `groupId`: el identificador del grupo; +- `merkleTreeRoot`: la raíz del árbol de Merkle; +- `signal`: la señal que el usuario quiere enviar de forma anónima ; +- `nullifierHash`: un nullifier hash (hash anulador); +- `externalNullifier`: el valor que impide la emisión de dos señales por el mismo usuario; +- `proof`: una prueba Semaphore que es compatible con Solidity. :::info Puede importar `ISemaphore.sol` y otros contratos Semaphore del módulo NPM [`@semaphore-protocol/contracts`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/contracts). diff --git a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/quick-setup.mdx b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/quick-setup.mdx index b453366c4..c7cf2efd7 100644 --- a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/quick-setup.mdx +++ b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/quick-setup.mdx @@ -31,37 +31,34 @@ El CLI [`semaphore`](https://github.com/semaphore-protocol/semaphore/tree/main/p Para comenzar a trabajar en su proyecto, instale las siguientes dependencias: - - -```bash -cd my-app -npm i -``` - - - - -```bash -cd my-app -yarn -``` - - - +]} +> + + ```bash + cd my-app + npm i + ``` + -```bash -cd my-app -pnpm install -``` + + ```bash + cd my-app + yarn + ``` + - + + ```bash + cd my-app + pnpm install + ``` + ## Output @@ -116,34 +113,31 @@ cd apps/contracts Y compile sus contratos al correr: - - -```bash -npm run compile -``` - - - - -```bash -yarn compile -``` - - - +]} +> + + ```bash + npm run compile + ``` + -```bash -pnpm compile -``` + + ```bash + yarn compile + ``` + - + + ```bash + pnpm compile + ``` + ### Pruebe los contratos @@ -151,100 +145,91 @@ pnpm compile Pruebe sus contratos al correr: - - -```bash -npm test -``` - - - - -```bash -yarn test -``` - - - +]} +> + + ```bash + npm test + ``` + -```bash -pnpm test -``` + + ```bash + yarn test + ``` + - + + ```bash + pnpm test + ``` + Genere un reporte de la prueba de cobertura: - - -```bash -npm run test:coverage -``` - - - - -```bash -yarn test:coverage -``` - - - +]} +> + + ```bash + npm run test:coverage + ``` + -```bash -pnpm test:coverage -``` + + ```bash + yarn test:coverage + ``` + - + + ```bash + pnpm test:coverage + ``` + O un reporte de la prueba de gas: - - -```bash -npm run test:report-gas -``` - - - - -```bash -yarn test:report-gas -``` - - - +]} +> + + ```bash + npm run test:report-gas + ``` + -```bash -pnpm test:report-gas -``` + + ```bash + yarn test:report-gas + ``` + - + + ```bash + pnpm test:report-gas + ``` + ### Desplegar contratos @@ -255,82 +240,76 @@ En la carpeta raíz del proyecto: 1. Agregue sus variables de entorno en el archivo `.env`. - :::note - Deberá por lo menos configurar un URL válido en Ethereum (ejemplo: Infura) y una llave privada con algunos ethers. - ::: + :::note + Deberá por lo menos configurar un URL válido en Ethereum (ejemplo: Infura) y una llave privada con algunos ethers. + ::: 2. Vaya a la carpeta `apps/contracts` y desplegue su contrato. - - - - ```bash - npm run deploy -- --semaphore --group --network goerli - ``` - - - - - ```bash - yarn deploy --semaphore --group --network goerli - ``` - - - - - ```bash - pnpm deploy --semaphore --group --network goerli - ``` - - - - - :::note - Revise las direcciones de los contratos de Semaphore [aquí](/V3/deployed-contracts). - ::: - - :::caution - El group id (id del grupo) es un número. - ::: + ]} + > + + ```bash + npm run deploy -- --semaphore --group --network goerli + ``` + + + + ```bash + yarn deploy --semaphore --group --network goerli + ``` + + + + ```bash + pnpm deploy --semaphore --group --network goerli + ``` + + + + :::note + Revise las direcciones de los contratos de Semaphore [aquí](/V3/deployed-contracts). + ::: + + :::caution + El group id (id del grupo) es un número. + ::: ### Inicie la app Inicie la aplicación: - - -```bash -npm run dev -``` - - - - -```bash -yarn dev -``` - - - +]} +> + + ```bash + npm run dev + ``` + -```bash -pnpm dev -``` + + ```bash + yarn dev + ``` + - + + ```bash + pnpm dev + ``` + diff --git a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/troubleshooting.mdx b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/troubleshooting.mdx index 1b0139433..e7cfe3e58 100644 --- a/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/troubleshooting.mdx +++ b/apps/docs/i18n/es/docusaurus-plugin-content-docs/version-V3/troubleshooting.mdx @@ -70,65 +70,59 @@ Para resolver eso: 1- Instale `@esbuild-plugins/node-globals-polyfill` y `@esbuild-plugins/node-modules-polyfill` - - -```bash -npm install @esbuild-plugins/node-globals-polyfill -``` - - - - -```bash -yarn add @esbuild-plugins/node-globals-polyfill -``` - - - - -```bash -pnpm add @esbuild-plugins/node-globals-polyfill -``` - - +]} +> + + ```bash + npm install @esbuild-plugins/node-globals-polyfill + ``` + + + + ```bash + yarn add @esbuild-plugins/node-globals-polyfill + ``` + + + + ```bash + pnpm add @esbuild-plugins/node-globals-polyfill + ``` + - - -```bash -npm install @esbuild-plugins/node-modules-polyfill -``` - - - - -```bash -yarn add @esbuild-plugins/node-modules-polyfill -``` - - - - -```bash -pnpm add @esbuild-plugins/node-modules-polyfill -``` - - +]} +> + + ```bash + npm install @esbuild-plugins/node-modules-polyfill + ``` + + + + ```bash + yarn add @esbuild-plugins/node-modules-polyfill + ``` + + + + ```bash + pnpm add @esbuild-plugins/node-modules-polyfill + ``` + 2- Modifique `vite.config.ts` para añadirlos: @@ -236,4 +230,4 @@ Para comprobarlo, puede utilizar la [Semaphore CLI](https://github.com/semaphore ### Transacción revertida al usar el mismo external nullifier -Cuando genera una prueba usando el mismo external nullifier que usó para verificar una prueba antes, la transacción se revertirá porque ese external nullifier ya se usó. Si desea enviar y verificar varias pruebas de la misma identidad, debe usar un external nullifier diferente cada vez que genere una prueba. \ No newline at end of file +Cuando genera una prueba usando el mismo external nullifier que usó para verificar una prueba antes, la transacción se revertirá porque ese external nullifier ya se usó. Si desea enviar y verificar varias pruebas de la misma identidad, debe usar un external nullifier diferente cada vez que genere una prueba. diff --git a/apps/docs/package.json b/apps/docs/package.json index 62dd8839d..d93c9e414 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -11,7 +11,9 @@ "clear": "docusaurus clear", "serve": "docusaurus serve", "write-translations": "docusaurus write-translations", - "write-heading-ids": "docusaurus write-heading-ids" + "write-heading-ids": "docusaurus write-heading-ids", + "format": "remark ./**/*.mdx", + "format:write": "remark ./**/*.mdx --output" }, "dependencies": { "@docusaurus/core": "3.1.1", @@ -32,6 +34,9 @@ "@docusaurus/module-type-aliases": "3.1.1", "@docusaurus/tsconfig": "3.1.1", "@types/react": "^18.2.29", + "remark-cli": "^12.0.0", + "remark-frontmatter": "^5.0.0", + "remark-mdx": "^3.0.1", "typescript": "~5.2.2" }, "browserslist": { @@ -48,5 +53,20 @@ }, "engines": { "node": ">=18.0" + }, + "remarkConfig": { + "settings": { + "bullet": "-" + }, + "plugins": [ + "remark-mdx", + [ + "remark-frontmatter", + { + "type": "yaml", + "marker": "-" + } + ] + ] } } diff --git a/apps/docs/versioned_docs/version-V3/guides/fetching-data.mdx b/apps/docs/versioned_docs/version-V3/guides/fetching-data.mdx index 12f2b59cf..6febc06a5 100644 --- a/apps/docs/versioned_docs/version-V3/guides/fetching-data.mdx +++ b/apps/docs/versioned_docs/version-V3/guides/fetching-data.mdx @@ -18,34 +18,31 @@ There are two ways to do this, using [`SemaphoreSubgraph`](https://github.com/se ## Install library - - -```bash -npm install @semaphore-protocol/data@^3 -``` - - - - -```bash -yarn add @semaphore-protocol/data@^3 -``` - - - - -```bash -pnpm add @semaphore-protocol/data@^3 -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/data@^3 + ``` + + + + ```bash + yarn add @semaphore-protocol/data@^3 + ``` + + + + ```bash + pnpm add @semaphore-protocol/data@^3 + ``` + ## Fetch data using SemaphoreSubgraph @@ -113,6 +110,7 @@ const semaphoreSubgraph = new SemaphoreSubgraph("sepolia") const { members } = await semaphoreSubgraph.getGroup(groupId, { members: true }) const group = new Group(groupId, 20, members) ``` + ::: ## Fetch data using SemaphoreEthers @@ -178,4 +176,5 @@ const semaphoreEthers = new SemaphoreEthers("sepolia") const members = await semaphoreEthers.getGroupMembers(groupId) const group = new Group(groupId, 20, members) ``` + ::: diff --git a/apps/docs/versioned_docs/version-V3/guides/groups.mdx b/apps/docs/versioned_docs/version-V3/guides/groups.mdx index c23b54641..15f94f278 100644 --- a/apps/docs/versioned_docs/version-V3/guides/groups.mdx +++ b/apps/docs/versioned_docs/version-V3/guides/groups.mdx @@ -11,70 +11,67 @@ import TabItem from "@theme/TabItem" A [Semaphore group](/V3/glossary/#semaphore-group) contains [identity commitments](/V3/glossary/#identity-commitment) of group members. Example uses of groups include the following: -- poll question that attendees join to rate an event, -- ballot that members join to vote on a proposal, -- whistleblowers who are verified employees of an organization. +- poll question that attendees join to rate an event, +- ballot that members join to vote on a proposal, +- whistleblowers who are verified employees of an organization. A Semaphore group is an [incremental Merkle tree](/V3/glossary/#merkle-tree), and group members (i.e., [identity commitments](/V3/glossary/#identity-commitment)) are tree leaves. Semaphore groups set the following three parameters: -- **Group id**: a unique identifier for the group; -- **Tree depth**: the maximum number of members a group can contain (`max size = 2 ^ tree depth`); -- **Members**: the list of members to initialize the group. +- **Group id**: a unique identifier for the group; +- **Tree depth**: the maximum number of members a group can contain (`max size = 2 ^ tree depth`); +- **Members**: the list of members to initialize the group. Learn how to work with groups. -- [**Off-chain groups**](#off-chain-groups) -- [**On-chain groups**](#on-chain-groups) +- [**Off-chain groups**](#off-chain-groups) +- [**On-chain groups**](#on-chain-groups) ## Off-chain groups -- [Create a group](#create-a-group) -- [Add members](#add-members) -- [Remove or update members](#remove-or-update-members) +- [Create a group](#create-a-group) +- [Add members](#add-members) +- [Remove or update members](#remove-or-update-members) ### Create a group Use the [`@semaphore-protocol/group`](https://github.com/semaphore-protocol/semaphore/blob/v3.15.2/packages/group) library `Group` class to create an off-chain group with the following parameters: -- `Group id`: a unique identifier for the group; -- `Tree depth`: (_default `20`_) the maximum number of members a group can contain (`max size = 2 ^ tree depth`). -- `Members`: (_default `[]`_) the list of members to initialize the group. +- `Group id`: a unique identifier for the group; +- `Tree depth`: (*default `20`*) the maximum number of members a group can contain (`max size = 2 ^ tree depth`). +- `Members`: (*default `[]`*) the list of members to initialize the group. #### Install library: - - -```bash -npm install @semaphore-protocol/group@^3 -``` - - - - -```bash -yarn add @semaphore-protocol/group@^3 -``` - - - - -```bash -pnpm add @semaphore-protocol/group@^3 -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/group@^3 + ``` + + + + ```bash + yarn add @semaphore-protocol/group@^3 + ``` + + + + ```bash + pnpm add @semaphore-protocol/group@^3 + ``` + -To create a group with default _`treeDepth`_, call the `Group` constructor without the second parameter. For example: +To create a group with default *`treeDepth`*, call the `Group` constructor without the second parameter. For example: ```ts import { Group } from "@semaphore-protocol/group" @@ -82,7 +79,7 @@ import { Group } from "@semaphore-protocol/group" const group = new Group(1) ``` -The following example code passes _`treeDepth`_ to create a group for `2 ^ 30 = 1073741824` members: +The following example code passes *`treeDepth`* to create a group for `2 ^ 30 = 1073741824` members: ```ts import { Group } from "@semaphore-protocol/group" diff --git a/apps/docs/versioned_docs/version-V3/guides/identities.mdx b/apps/docs/versioned_docs/version-V3/guides/identities.mdx index 32cf29f7c..ce2f9f852 100644 --- a/apps/docs/versioned_docs/version-V3/guides/identities.mdx +++ b/apps/docs/versioned_docs/version-V3/guides/identities.mdx @@ -11,50 +11,47 @@ import TabItem from "@theme/TabItem" In order to join a [Semaphore group](/V3/glossary#semaphore-group), a user must first create a [Semaphore identity](/V3/glossary#semaphore-identity). A Semaphore identity contains two values generated with the identity: -- Identity trapdoor -- identity nullifier +- Identity trapdoor +- identity nullifier To use and verify the identity, the identity owner (user) must know the trapdoor and nullifier values. To prevent fraud, the owner should keep both values secret. ## Create identities -In your code, use the [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/v3.15.2/packages/identity) library to create a Semaphore identity _deterministically_ (from the hash of a message) or _randomly_. +In your code, use the [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/v3.15.2/packages/identity) library to create a Semaphore identity *deterministically* (from the hash of a message) or *randomly*. -- [**Create random identities**](#create-random-identities) -- [**Create deterministic identities**](#create-deterministic-identities) +- [**Create random identities**](#create-random-identities) +- [**Create deterministic identities**](#create-deterministic-identities) ### Install library: - - -```bash -npm install @semaphore-protocol/identity@^3 -``` - - - - -```bash -yarn add @semaphore-protocol/identity@^3 -``` - - - - -```bash -pnpm add @semaphore-protocol/identity@^3 -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/identity@^3 + ``` + + + + ```bash + yarn add @semaphore-protocol/identity@^3 + ``` + + + + ```bash + pnpm add @semaphore-protocol/identity@^3 + ``` + ### Create random identities @@ -69,8 +66,8 @@ const { trapdoor, nullifier, commitment } = new Identity() The new identity contains two random secret values: `trapdoor` and `nullifier`, and one public value: `commitment`. -The Poseidon hash of the identity nullifier and trapdoor is called the _identity secret_, -and its hash is the _identity commitment_. +The Poseidon hash of the identity nullifier and trapdoor is called the *identity secret*, +and its hash is the *identity commitment*. An identity commitment, similarly to Ethereum addresses, is a public value used in Semaphore groups to represent the identity of a group member. The secret values are similar to @@ -79,7 +76,7 @@ Ethereum private keys and are used to generate Semaphore zero-knowledge proofs a ### Create deterministic identities If you pass a message as a parameter, Semaphore generates `trapdoor` and `nullifier` -from the _SHA256_ hash of the message. +from the *SHA256* hash of the message. The message might be a password or a message that the user cryptographically signs with a private key. When using deterministic identities, you should always keep the message secret. diff --git a/apps/docs/versioned_docs/version-V3/guides/proofs.mdx b/apps/docs/versioned_docs/version-V3/guides/proofs.mdx index aca9336a1..db8f4f2b0 100644 --- a/apps/docs/versioned_docs/version-V3/guides/proofs.mdx +++ b/apps/docs/versioned_docs/version-V3/guides/proofs.mdx @@ -10,57 +10,54 @@ import TabItem from "@theme/TabItem" Once a user joins their [Semaphore identity](/V3/glossary#semaphore-identity) to a [Semaphore group](/V3/glossary#semaphore-group), the user can signal anonymously with a zero-knowledge proof that proves the following: -- the user is a member of the group, -- the same user created the signal and the proof. +- the user is a member of the group, +- the same user created the signal and the proof. Developers can use Semaphore for the following: -- [**Generate a proof off-chain**](#generate-a-proof-off-chain) -- [**Verify a proof off-chain**](#verify-a-proof-off-chain) -- [**Verify a proof on-chain**](#verify-a-proof-on-chain) +- [**Generate a proof off-chain**](#generate-a-proof-off-chain) +- [**Verify a proof off-chain**](#verify-a-proof-off-chain) +- [**Verify a proof on-chain**](#verify-a-proof-on-chain) ## Generate a proof off-chain Use the [`@semaphore-protocol/proof`](https://github.com/semaphore-protocol/semaphore/tree/v3.15.2/packages/proof) library to generate an off-chain proof. To generate a proof, pass the following parameters to the `generateProof` function: -- `identity`: the Semaphore identity of the user broadcasting the signal and generating the proof; -- `group`: the group to which the user belongs; -- `externalNullifier`: the value that prevents double-signaling; -- `signal`: the signal the user wants to send anonymously; -- `snarkArtifacts`: the `zkey` and `wasm` [trusted setup files](/V3/glossary/#trusted-setup-files). +- `identity`: the Semaphore identity of the user broadcasting the signal and generating the proof; +- `group`: the group to which the user belongs; +- `externalNullifier`: the value that prevents double-signaling; +- `signal`: the signal the user wants to send anonymously; +- `snarkArtifacts`: the `zkey` and `wasm` [trusted setup files](/V3/glossary/#trusted-setup-files). #### Install library: - - -```bash -npm install @semaphore-protocol/proof@^3 -``` - - - - -```bash -yarn add @semaphore-protocol/proof@^3 -``` - - - - -```bash -pnpm add @semaphore-protocol/proof@^3 -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/proof@^3 + ``` + + + + ```bash + yarn add @semaphore-protocol/proof@^3 + ``` + + + + ```bash + pnpm add @semaphore-protocol/proof@^3 + ``` + In the voting system use case, once all the voters have joined their [identities](/V3/guides/identities#create-identities) to the ballot [group](/V3/guides/groups), @@ -87,6 +84,7 @@ If you are generating the proof on the client side, you can avoid adding the sna ```ts const fullProof = await generateProof(identity, group, externalNullifier, signal) ``` + ::: ## Verify a proof off-chain @@ -94,8 +92,8 @@ const fullProof = await generateProof(identity, group, externalNullifier, signal Use the [`@semaphore-protocol/proof`](https://github.com/semaphore-protocol/semaphore/tree/v3.15.2/packages/proof) library to verify a Semaphore proof off-chain. To verify a proof, pass the following to the `verifyProof` function: -- `fullProof`: the Semaphore proof; -- `treeDepth`: the Merkle tree depth. +- `fullProof`: the Semaphore proof; +- `treeDepth`: the Merkle tree depth. The following code sample shows how to verify the previously generated proof: @@ -117,12 +115,12 @@ See our [deployed contracts](/V3/deployed-contracts) to find the addresses for y To verify Semaphore proofs in your contract, import `ISemaphore.sol`, pass it the `Semaphore.sol` address and call the `verifyProof` method with following parameters: -- `groupId`: the identifier of the group; -- `merkleTreeRoot`: the root of the Merkle tree; -- `signal`: the signal the user wants to send anonymously; -- `nullifierHash`: a nullifier hash; -- `externalNullifier`: the value that prevents double-signaling; -- `proof`: a Solidity-compatible Semaphore proof. +- `groupId`: the identifier of the group; +- `merkleTreeRoot`: the root of the Merkle tree; +- `signal`: the signal the user wants to send anonymously; +- `nullifierHash`: a nullifier hash; +- `externalNullifier`: the value that prevents double-signaling; +- `proof`: a Solidity-compatible Semaphore proof. :::info You can import `ISemaphore.sol` and other Semaphore contracts from the [`@semaphore-protocol/contracts`](https://github.com/semaphore-protocol/semaphore/tree/v3.15.2/packages/contracts) NPM module. diff --git a/apps/docs/versioned_docs/version-V3/quick-setup.mdx b/apps/docs/versioned_docs/version-V3/quick-setup.mdx index 5a96e5d80..c44955f9d 100644 --- a/apps/docs/versioned_docs/version-V3/quick-setup.mdx +++ b/apps/docs/versioned_docs/version-V3/quick-setup.mdx @@ -31,37 +31,34 @@ The [`semaphore CLI`](https://github.com/semaphore-protocol/semaphore/tree/v3.15 To start working on your project, install the dependencies: - - -```bash -cd my-app -npm i -``` - - - - -```bash -cd my-app -yarn -``` - - - +]} +> + + ```bash + cd my-app + npm i + ``` + -```bash -cd my-app -pnpm install -``` + + ```bash + cd my-app + yarn + ``` + - + + ```bash + cd my-app + pnpm install + ``` + ## Output @@ -116,34 +113,31 @@ cd apps/contracts And compile your contracts: - - -```bash -npm run compile -``` - - - - -```bash -yarn compile -``` - - - +]} +> + + ```bash + npm run compile + ``` + -```bash -pnpm compile -``` + + ```bash + yarn compile + ``` + - + + ```bash + pnpm compile + ``` + ### Test contracts @@ -151,100 +145,91 @@ pnpm compile Test your contracts: - - -```bash -npm test -``` - - - - -```bash -yarn test -``` - - - +]} +> + + ```bash + npm test + ``` + -```bash -pnpm test -``` + + ```bash + yarn test + ``` + - + + ```bash + pnpm test + ``` + Generate a test coverage report: - - -```bash -npm run test:coverage -``` - - - - -```bash -yarn test:coverage -``` - - - +]} +> + + ```bash + npm run test:coverage + ``` + -```bash -pnpm test:coverage -``` + + ```bash + yarn test:coverage + ``` + - + + ```bash + pnpm test:coverage + ``` + Or a test gas report: - - -```bash -npm run test:report-gas -``` - - - - -```bash -yarn test:report-gas -``` - - - +]} +> + + ```bash + npm run test:report-gas + ``` + -```bash -pnpm test:report-gas -``` + + ```bash + yarn test:report-gas + ``` + - + + ```bash + pnpm test:report-gas + ``` + ### Deploy contracts @@ -255,82 +240,76 @@ In the project root folder: 1. Add your environment variables in the `.env` file. - :::note - You should at least set a valid Infura API Key (you could use Alchemy as well) and a private key with some ethers. - ::: + :::note + You should at least set a valid Infura API Key (you could use Alchemy as well) and a private key with some ethers. + ::: 2. Go to the `apps/contracts` folder and deploy your contract. - - - - ```bash - npm run deploy -- --semaphore --group --network arbitrum-goerli - ``` - - - - - ```bash - yarn deploy --semaphore --group --network arbitrum-goerli - ``` - - - - - ```bash - pnpm deploy --semaphore --group --network arbitrum-goerli - ``` - - - - - :::note - Check the Semaphore contract addresses [here](/V3/deployed-contracts). - ::: - - :::caution - The group id is a number. - ::: + ]} + > + + ```bash + npm run deploy -- --semaphore --group --network arbitrum-goerli + ``` + + + + ```bash + yarn deploy --semaphore --group --network arbitrum-goerli + ``` + + + + ```bash + pnpm deploy --semaphore --group --network arbitrum-goerli + ``` + + + + :::note + Check the Semaphore contract addresses [here](/V3/deployed-contracts). + ::: + + :::caution + The group id is a number. + ::: ### Start app Start the application: - - -```bash -npm run dev -``` - - - - -```bash -yarn dev -``` - - - +]} +> + + ```bash + npm run dev + ``` + -```bash -pnpm dev -``` + + ```bash + yarn dev + ``` + - + + ```bash + pnpm dev + ``` + diff --git a/apps/docs/versioned_docs/version-V3/troubleshooting.mdx b/apps/docs/versioned_docs/version-V3/troubleshooting.mdx index 26aa734ac..fe5cc6027 100644 --- a/apps/docs/versioned_docs/version-V3/troubleshooting.mdx +++ b/apps/docs/versioned_docs/version-V3/troubleshooting.mdx @@ -70,65 +70,59 @@ To solve that: 1- Install `@esbuild-plugins/node-globals-polyfill` and `@esbuild-plugins/node-modules-polyfill` - - -```bash -npm install @esbuild-plugins/node-globals-polyfill -``` - - - - -```bash -yarn add @esbuild-plugins/node-globals-polyfill -``` - - - - -```bash -pnpm add @esbuild-plugins/node-globals-polyfill -``` - - +]} +> + + ```bash + npm install @esbuild-plugins/node-globals-polyfill + ``` + + + + ```bash + yarn add @esbuild-plugins/node-globals-polyfill + ``` + + + + ```bash + pnpm add @esbuild-plugins/node-globals-polyfill + ``` + - - -```bash -npm install @esbuild-plugins/node-modules-polyfill -``` - - - - -```bash -yarn add @esbuild-plugins/node-modules-polyfill -``` - - - - -```bash -pnpm add @esbuild-plugins/node-modules-polyfill -``` - - +]} +> + + ```bash + npm install @esbuild-plugins/node-modules-polyfill + ``` + + + + ```bash + yarn add @esbuild-plugins/node-modules-polyfill + ``` + + + + ```bash + pnpm add @esbuild-plugins/node-modules-polyfill + ``` + 2- Modify the `vite.config.ts` to add them: diff --git a/apps/docs/versioned_docs/version-V4-beta/getting-started.mdx b/apps/docs/versioned_docs/version-V4-beta/getting-started.mdx index 83e704b7e..06ca1455f 100644 --- a/apps/docs/versioned_docs/version-V4-beta/getting-started.mdx +++ b/apps/docs/versioned_docs/version-V4-beta/getting-started.mdx @@ -111,23 +111,23 @@ In the project root folder: 1. Add your environment variables in the `.env` file. - :::note - You should at least set a valid Infura API Key (you could use Alchemy as well) and a private key with some ethers. - ::: + :::note + You should at least set a valid Infura API Key (you could use Alchemy as well) and a private key with some ethers. + ::: 2. Go to the `apps/contracts` folder and deploy your contract. - ```bash - yarn deploy --semaphore --group --network sepolia - ``` + ```bash + yarn deploy --semaphore --group --network sepolia + ``` - :::note - Check the Semaphore contract addresses [here](/deployed-contracts). - ::: + :::note + Check the Semaphore contract addresses [here](/deployed-contracts). + ::: - :::caution - The group id is a number. - ::: + :::caution + The group id is a number. + ::: ### Start app diff --git a/apps/docs/versioned_docs/version-V4-beta/guides/groups.mdx b/apps/docs/versioned_docs/version-V4-beta/guides/groups.mdx index 4c73a05b1..4a2ab358e 100644 --- a/apps/docs/versioned_docs/version-V4-beta/guides/groups.mdx +++ b/apps/docs/versioned_docs/version-V4-beta/guides/groups.mdx @@ -11,9 +11,9 @@ import TabItem from "@theme/TabItem" A [Semaphore group](/glossary/#group) contains [identity commitments](/glossary/#identity-commitment) of group members. Example uses of groups include the following: -- poll question that attendees join to rate an event, -- ballot that members join to vote on a proposal, -- whistleblowers who are verified employees of an organization. +- poll question that attendees join to rate an event, +- ballot that members join to vote on a proposal, +- whistleblowers who are verified employees of an organization. :::info Semaphore V4 uses the [ZK-Kit](https://github.com/privacy-scaling-explorations/zk-kit) LeanIMT (i.e., Lean Incremental @@ -28,34 +28,31 @@ Use the [`@semaphore-protocol/group`](https://github.com/semaphore-protocol/sema ### Install package - - -```bash -npm install @semaphore-protocol/group -``` - - - - -```bash -yarn add @semaphore-protocol/group -``` - - - - -```bash -pnpm add @semaphore-protocol/group -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/group + ``` + + + + ```bash + yarn add @semaphore-protocol/group + ``` + + + + ```bash + pnpm add @semaphore-protocol/group + ``` + :::info @@ -142,34 +139,31 @@ Use the [`@semaphore-protocol/contracts`](https://github.com/semaphore-protocol/ ### Install package - - -```bash -npm install @semaphore-protocol/contracts -``` - - - - -```bash -yarn add @semaphore-protocol/contracts -``` - - - - -```bash -pnpm add @semaphore-protocol/contracts -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/contracts + ``` + + + + ```bash + yarn add @semaphore-protocol/contracts + ``` + + + + ```bash + pnpm add @semaphore-protocol/contracts + ``` + ### Create a group @@ -240,4 +234,3 @@ function removeMember(uint256 identityCommitment, uint256[] calldata merkleProof :::info If you want to see an example of a working contract, have a look at the [`contracts-hardhat`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/cli-template-contracts-hardhat) CLI template. You can also create a project with that template by running `semaphore create my-app --template contracts-hardhat`. ::: - diff --git a/apps/docs/versioned_docs/version-V4-beta/guides/identities.mdx b/apps/docs/versioned_docs/version-V4-beta/guides/identities.mdx index a03b952d3..b68f4fe1a 100644 --- a/apps/docs/versioned_docs/version-V4-beta/guides/identities.mdx +++ b/apps/docs/versioned_docs/version-V4-beta/guides/identities.mdx @@ -11,9 +11,9 @@ import TabItem from "@theme/TabItem" In order to join a [Semaphore group](/glossary#group), a user must first create a [Semaphore identity](/glossary#identity). A Semaphore identity contains three values generated with the identity: -- Private key -- Public key -- Commitment +- Private key +- Public key +- Commitment To use and verify the identity, the identity owner (user) must know its private key. To prevent fraud, the owner should keep their private key secret. @@ -23,34 +23,31 @@ To prevent fraud, the owner should keep their private key secret. In your code, use the [`@semaphore-protocol/identity`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity) package to manage Semaphore identites. - - -```bash -npm install @semaphore-protocol/identity -``` - - - - -```bash -yarn add @semaphore-protocol/identity -``` - - - - -```bash -pnpm add @semaphore-protocol/identity -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/identity + ``` + + + + ```bash + yarn add @semaphore-protocol/identity + ``` + + + + ```bash + pnpm add @semaphore-protocol/identity + ``` + :::info @@ -88,7 +85,7 @@ You may choose to delegate such functionality to existing wallets such as Metama 1. In Metamask, a user signs a message with the private key of their Ethereum account. 2. In your application, the user creates a deterministic identity with the signed message that acts as your Semaphore private key. 3. The user can now recreate their Semaphore identity whenever they want by signing the same message with their Ethereum account in Metamask. -::: + ::: ## Sign and verify messages diff --git a/apps/docs/versioned_docs/version-V4-beta/guides/proofs.mdx b/apps/docs/versioned_docs/version-V4-beta/guides/proofs.mdx index bd9f64d95..f7441dd47 100644 --- a/apps/docs/versioned_docs/version-V4-beta/guides/proofs.mdx +++ b/apps/docs/versioned_docs/version-V4-beta/guides/proofs.mdx @@ -10,8 +10,8 @@ import TabItem from "@theme/TabItem" Once a user joins a [Semaphore group](/glossary#group) with their [Semaphore identity](/glossary#identity), the user can send their anonymous [message](/glossary#message) with a zero-knowledge proof that proves the following: -- the user is a member of the group, -- the same user created the message and the proof. +- the user is a member of the group, +- the same user created the message and the proof. A unique [nullifier](/glossary#nullifier) is also generated for each proof that can be used to check whether that proof has already been validated. @@ -20,34 +20,31 @@ A unique [nullifier](/glossary#nullifier) is also generated for each proof that In your code, use the [`@semaphore-protocol/proof`](https://github.com/semaphore-protocol/semaphore/tree/main/packages/proof) package to generate and verify a proof. - - -```bash -npm install @semaphore-protocol/proof -``` - - - - -```bash -yarn add @semaphore-protocol/proof -``` - - - - -```bash -pnpm add @semaphore-protocol/proof -``` - - +]} +> + + ```bash + npm install @semaphore-protocol/proof + ``` + + + + ```bash + yarn add @semaphore-protocol/proof + ``` + + + + ```bash + pnpm add @semaphore-protocol/proof + ``` + :::info diff --git a/apps/docs/versioned_docs/version-V4-beta/subgraph.mdx b/apps/docs/versioned_docs/version-V4-beta/subgraph.mdx index ba8a66e1c..19ba351b0 100644 --- a/apps/docs/versioned_docs/version-V4-beta/subgraph.mdx +++ b/apps/docs/versioned_docs/version-V4-beta/subgraph.mdx @@ -7,7 +7,7 @@ import RemoteCode from '@site/src/components/RemoteCode'; # Subgraph [The Graph](https://thegraph.com/) is a protocol for indexing networks like Ethereum and IPFS. -Site owners publish _subgraphs_ that expose site data for anyone to query. +Site owners publish *subgraphs* that expose site data for anyone to query. Semaphore's subgraph allows you to retrieve data from the [`Semaphore.sol`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/contracts/contracts/Semaphore.sol) smart contract. :::tip @@ -16,5 +16,4 @@ The Graph protocol uses the [GraphQL](https://graphql.org/) query language. For ## Schema - + diff --git a/package.json b/package.json index 7b91689e1..bd8df4cf4 100644 --- a/package.json +++ b/package.json @@ -18,15 +18,15 @@ "test:contracts": "yarn workspace semaphore-contracts test:coverage", "test:circuits": "yarn workspace @semaphore-protocol/circuits test", "lint": "eslint . --ext .js,.ts,.tsx && yarn workspace semaphore-contracts lint", - "prettier": "prettier -c .", - "prettier:write": "prettier -w .", + "format": "prettier -c . && yarn workspace semaphore-docs format", + "format:write": "prettier -w . && yarn workspace semaphore-docs format:write", "docs": "typedoc --cname js.semaphore.pse.dev --githubPages true", "version:bump": "yarn workspaces foreach -A --no-private version -d ${0} && yarn version apply --all && yarn remove:stable-version-field && NO_HOOK=1 git commit -am \"chore: v${0}\" && git tag v${0}", "version:publish": "yarn build:libraries && yarn clean:cli-templates && yarn workspaces foreach -A --no-private npm publish --tolerate-republish --access public", "version:release": "changelogithub", "clean": "ts-node scripts/clean-apps.ts && ts-node scripts/clean-packages.ts && yarn clean:cli-templates && rimraf node_modules", "clean:cli-templates": "ts-node scripts/clean-cli-templates.ts", - "remove:stable-version-field": "ts-node scripts/remove-stable-version-field.ts && yarn prettier:write", + "remove:stable-version-field": "ts-node scripts/remove-stable-version-field.ts && yarn format:write", "precommit": "lint-staged", "postinstall": "husky install" }, diff --git a/yarn.lock b/yarn.lock index e733a26b9..b14271f1f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -257,7 +257,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.1, @babel/code-frame@npm:^7.24.2, @babel/code-frame@npm:^7.8.3": +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.21.4, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.1, @babel/code-frame@npm:^7.24.2, @babel/code-frame@npm:^7.8.3": version: 7.24.2 resolution: "@babel/code-frame@npm:7.24.2" dependencies: @@ -4589,6 +4589,16 @@ __metadata: languageName: node linkType: hard +"@iden3/binfileutils@npm:0.0.12": + version: 0.0.12 + resolution: "@iden3/binfileutils@npm:0.0.12" + dependencies: + fastfile: "npm:0.0.20" + ffjavascript: "npm:^0.3.0" + checksum: 10/2cf82488a5efbb97bb853860bd8f1697da859ba22e0d7f980fc80694d722f7c8da7d8803be21ebcbb9c01a9bdcedce0ba6b209357163a631877fa08415ba08fe + languageName: node + linkType: hard + "@inquirer/figures@npm:^1.0.1": version: 1.0.1 resolution: "@inquirer/figures@npm:1.0.1" @@ -5588,6 +5598,22 @@ __metadata: languageName: node linkType: hard +"@npmcli/config@npm:^8.0.0": + version: 8.3.0 + resolution: "@npmcli/config@npm:8.3.0" + dependencies: + "@npmcli/map-workspaces": "npm:^3.0.2" + ci-info: "npm:^4.0.0" + ini: "npm:^4.1.2" + nopt: "npm:^7.0.0" + proc-log: "npm:^4.2.0" + read-package-json-fast: "npm:^3.0.2" + semver: "npm:^7.3.5" + walk-up-path: "npm:^3.0.1" + checksum: 10/51562bca7c120cce0c681f20c466b1bb5fdeba695a8e8d85c4132f98d7374162509c83b914b0d16bac768deb707d5d8bd963312f74e20ca37722cf54e7fa1ef8 + languageName: node + linkType: hard + "@npmcli/fs@npm:^3.1.0": version: 3.1.0 resolution: "@npmcli/fs@npm:3.1.0" @@ -5625,6 +5651,25 @@ __metadata: languageName: node linkType: hard +"@npmcli/map-workspaces@npm:^3.0.2": + version: 3.0.6 + resolution: "@npmcli/map-workspaces@npm:3.0.6" + dependencies: + "@npmcli/name-from-folder": "npm:^2.0.0" + glob: "npm:^10.2.2" + minimatch: "npm:^9.0.0" + read-package-json-fast: "npm:^3.0.0" + checksum: 10/b364b155991a4ff85db5ea5b9f809ab65936350fc36fe1e51d5ab8cd479bba57e69f02e17215c0e2126e383074c2987c268d8e589aacd26c9962e028f4da98f2 + languageName: node + linkType: hard + +"@npmcli/name-from-folder@npm:^2.0.0": + version: 2.0.0 + resolution: "@npmcli/name-from-folder@npm:2.0.0" + checksum: 10/75beb40373f916cfcf7327958b3ab920ab4e32d24217197927dd1c76a325c7645695011fce9cb2a8f93616f8b74946e84eebe3830303e11ed9d400dae623a99b + languageName: node + linkType: hard + "@npmcli/node-gyp@npm:^3.0.0": version: 3.0.0 resolution: "@npmcli/node-gyp@npm:3.0.0" @@ -7262,6 +7307,15 @@ __metadata: languageName: node linkType: hard +"@types/concat-stream@npm:^2.0.0": + version: 2.0.3 + resolution: "@types/concat-stream@npm:2.0.3" + dependencies: + "@types/node": "npm:*" + checksum: 10/e829fde246528665b31a9b8f64c369ffc66aa2a1337d2bab1d38f4d4145701480af7c67e877dd09a7fa97fcbaa0f3baa816ed1b3e71c3ad430930acd37f4eb1f + languageName: node + linkType: hard + "@types/connect-history-api-fallback@npm:^1.3.5": version: 1.5.4 resolution: "@types/connect-history-api-fallback@npm:1.5.4" @@ -7473,6 +7527,13 @@ __metadata: languageName: node linkType: hard +"@types/is-empty@npm:^1.0.0": + version: 1.2.3 + resolution: "@types/is-empty@npm:1.2.3" + checksum: 10/b22065de5978dacacb6b7401df03e94b9688a3ce07c7faab1bab5e943adbdd6455b190963079bb0aae12c8e56980e54c49bc6902a5805741b82fb4f7335b0c44 + languageName: node + linkType: hard + "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.6 resolution: "@types/istanbul-lib-coverage@npm:2.0.6" @@ -7635,7 +7696,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:>=13.7.0, @types/node@npm:^20, @types/node@npm:^20.10.7, @types/node@npm:^20.11.20": +"@types/node@npm:*, @types/node@npm:>=13.7.0, @types/node@npm:^20, @types/node@npm:^20.0.0, @types/node@npm:^20.10.7, @types/node@npm:^20.11.20": version: 20.12.7 resolution: "@types/node@npm:20.12.7" dependencies: @@ -7786,11 +7847,11 @@ __metadata: linkType: hard "@types/react-dom@npm:^18": - version: 18.2.25 - resolution: "@types/react-dom@npm:18.2.25" + version: 18.3.0 + resolution: "@types/react-dom@npm:18.3.0" dependencies: "@types/react": "npm:*" - checksum: 10/0e45856a2fdbf09e74632b132b3af773c6b18fc2ab0bd04595c9f2bcc0bb04d5e732ac8156d145b712dedab7484a8fe9dce5cf720a5437b5d26099c7060c7ba4 + checksum: 10/6ff53f5a7b7fba952a68e114d3b542ebdc1e87a794234785ebab0bcd9bde7fb4885f21ebaf93d26dc0a1b5b93287f42cad68b78ae04dddf6b20da7aceff0beaf languageName: node linkType: hard @@ -7827,12 +7888,12 @@ __metadata: linkType: hard "@types/react@npm:*, @types/react@npm:^18, @types/react@npm:^18.2.29": - version: 18.2.79 - resolution: "@types/react@npm:18.2.79" + version: 18.3.0 + resolution: "@types/react@npm:18.3.0" dependencies: "@types/prop-types": "npm:*" csstype: "npm:^3.0.2" - checksum: 10/2ef833e7d0a5c226beddbbe090811582371f6ae5e2f092a3d9f47cc6087c8bce0b96ee33e351de6d1d470f0a0ec5892d971933f841ef31538c1821681fc6569e + checksum: 10/2444294740016d61721df9adeb8635658c660c13b0782df9f067260ac6b0a4b71e68245089814ab53264843eb75f81d90f770253b94a13955cc1ddccf3593301 languageName: node linkType: hard @@ -7953,6 +8014,20 @@ __metadata: languageName: node linkType: hard +"@types/supports-color@npm:^8.0.0": + version: 8.1.3 + resolution: "@types/supports-color@npm:8.1.3" + checksum: 10/f5a3ca4aa94ac9d45beae8aa06dcba45e6d56b77999707a2708b54a9b042f84c68e619b10ef6e4b6f447f801824adebb9ed4d7a82c0b5d5d7bf29d5ff34d53a9 + languageName: node + linkType: hard + +"@types/text-table@npm:^0.2.0": + version: 0.2.5 + resolution: "@types/text-table@npm:0.2.5" + checksum: 10/4e96313dc25983868d84b75921c6159de569509921234c2c3bc8e2aac7963323f326b07d485d2c38342d5c1e7d2a0a39c2f3996b5f00f57af4b554b5d710f59d + languageName: node + linkType: hard + "@types/through@npm:*": version: 0.0.33 resolution: "@types/through@npm:0.0.33" @@ -10386,7 +10461,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:5.3.0, chalk@npm:^5.0.1, chalk@npm:^5.2.0, chalk@npm:^5.3.0": +"chalk@npm:5.3.0, chalk@npm:^5.0.0, chalk@npm:^5.0.1, chalk@npm:^5.2.0, chalk@npm:^5.3.0": version: 5.3.0 resolution: "chalk@npm:5.3.0" checksum: 10/6373caaab21bd64c405bfc4bd9672b145647fc9482657b5ea1d549b3b2765054e9d3d928870cdf764fb4aad67555f5061538ff247b8310f110c5c888d92397ea @@ -10610,7 +10685,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.4.0, chokidar@npm:^3.4.2, chokidar@npm:^3.5.3, chokidar@npm:^3.6.0": +"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.0.0, chokidar@npm:^3.4.0, chokidar@npm:^3.4.2, chokidar@npm:^3.5.3, chokidar@npm:^3.6.0": version: 3.6.0 resolution: "chokidar@npm:3.6.0" dependencies: @@ -10664,6 +10739,13 @@ __metadata: languageName: node linkType: hard +"ci-info@npm:^4.0.0": + version: 4.0.0 + resolution: "ci-info@npm:4.0.0" + checksum: 10/c983bb7ff1b06648f4a47432201abbd58291147d8ab5043dbb5c03e1a0e3fb2347f40d29b66a3044f28ffeb5dade01ac35aa6bd4e7464a44d9a49a3d7532415a + languageName: node + linkType: hard + "cipher-base@npm:^1.0.0, cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": version: 1.0.4 resolution: "cipher-base@npm:1.0.4" @@ -10696,6 +10778,17 @@ __metadata: languageName: node linkType: hard +"circom_runtime@npm:0.1.25": + version: 0.1.25 + resolution: "circom_runtime@npm:0.1.25" + dependencies: + ffjavascript: "npm:0.3.0" + bin: + calcwit: calcwit.js + checksum: 10/aebb1398df621524a84b4c067661943d8d42894856f4947f61f4768954f1143c9fbba76c3a7e9d805175b94e1ac997accbe46fbf67d08ff618062dfcec2737b1 + languageName: node + linkType: hard + "circom_tester@npm:^0.0.19": version: 0.0.19 resolution: "circom_tester@npm:0.0.19" @@ -11275,6 +11368,18 @@ __metadata: languageName: node linkType: hard +"concat-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "concat-stream@npm:2.0.0" + dependencies: + buffer-from: "npm:^1.0.0" + inherits: "npm:^2.0.3" + readable-stream: "npm:^3.0.2" + typedarray: "npm:^0.0.6" + checksum: 10/250e576d0617e7c58e1c4b2dd6fe69560f316d2c962a409f9f3aac794018499ddb31948b1e4296f217008e124cd5d526432097745157fe504b5d9f3dc469eadb + languageName: node + linkType: hard + "confbox@npm:^0.1.3, confbox@npm:^0.1.7": version: 0.1.7 resolution: "confbox@npm:0.1.7" @@ -12789,9 +12894,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.668": - version: 1.4.747 - resolution: "electron-to-chromium@npm:1.4.747" - checksum: 10/8588acc427ccb7169eb17d741a538b635574f779e8150292eab080adc893e23d1544c8f77533d663c6c4b1bc234498c1d096027a4e353ca997126aaecd41b7b4 + version: 1.4.749 + resolution: "electron-to-chromium@npm:1.4.749" + checksum: 10/59867792303f0b91216074aafe247b738a6e4a1eae2f3cba5e06394f733d4fe806263ebe4ab643e2ac837bfb7103835a4a8228928d2007af46decb509fb480bc languageName: node linkType: hard @@ -12832,7 +12937,7 @@ __metadata: languageName: node linkType: hard -"emoji-regex@npm:^10.3.0": +"emoji-regex@npm:^10.2.1, emoji-regex@npm:^10.3.0": version: 10.3.0 resolution: "emoji-regex@npm:10.3.0" checksum: 10/b9b084ebe904f13bb4b66ee4c29fb41a7a4a1165adcc33c1ce8056c0194b882cc91ebdc782f1a779b5d7ea7375c5064643a7734893d7c657b44c5c6b9d7bf1e7 @@ -12963,7 +13068,7 @@ __metadata: languageName: node linkType: hard -"error-ex@npm:^1.3.1": +"error-ex@npm:^1.3.1, error-ex@npm:^1.3.2": version: 1.3.2 resolution: "error-ex@npm:1.3.2" dependencies: @@ -12972,7 +13077,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.2, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.2": +"es-abstract@npm:^1.17.2, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3": version: 1.23.3 resolution: "es-abstract@npm:1.23.3" dependencies: @@ -13050,12 +13155,12 @@ __metadata: linkType: hard "es-iterator-helpers@npm:^1.0.15, es-iterator-helpers@npm:^1.0.17": - version: 1.0.18 - resolution: "es-iterator-helpers@npm:1.0.18" + version: 1.0.19 + resolution: "es-iterator-helpers@npm:1.0.19" dependencies: call-bind: "npm:^1.0.7" define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.0" + es-abstract: "npm:^1.23.3" es-errors: "npm:^1.3.0" es-set-tostringtag: "npm:^2.0.3" function-bind: "npm:^1.1.2" @@ -13067,7 +13172,7 @@ __metadata: internal-slot: "npm:^1.0.7" iterator.prototype: "npm:^1.1.2" safe-array-concat: "npm:^1.1.2" - checksum: 10/a4fd067e148736fbe6a9883f449e0de88be14a4dff9065c457572ede10ba02a4a15c4ae18b9b7baa5c868860d2be9a6764906c3308135e57ec5bfd386bbd2836 + checksum: 10/980a8081cf6798fe17fcea193b0448d784d72d76aca7240b10813207c67e3dc0d8a23992263870c4fc291da5a946935b0c56dec4fa1a9de8fee0165e4fa1fc58 languageName: node linkType: hard @@ -13423,11 +13528,11 @@ __metadata: linkType: hard "eslint-plugin-react-hooks@npm:^4.6.0": - version: 4.6.0 - resolution: "eslint-plugin-react-hooks@npm:4.6.0" + version: 4.6.1 + resolution: "eslint-plugin-react-hooks@npm:4.6.1" peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - checksum: 10/3c63134e056a6d98d66e2c475c81f904169db817e89316d14e36269919e31f4876a2588aa0e466ec8ef160465169c627fe823bfdaae7e213946584e4a165a3ac + checksum: 10/4ee9d00a5e7ed0257db07508e4ac5161377ceefc0180eb2924fe0e7c8bbbfb422a274ab017a68e5c1f4ae1f1cb3c8a04c6748bba5891f0e97b8953435578ef36 languageName: node linkType: hard @@ -14372,6 +14477,17 @@ __metadata: languageName: node linkType: hard +"ffjavascript@npm:0.3.0, ffjavascript@npm:^0.3.0": + version: 0.3.0 + resolution: "ffjavascript@npm:0.3.0" + dependencies: + wasmbuilder: "npm:0.0.16" + wasmcurves: "npm:0.2.2" + web-worker: "npm:1.2.0" + checksum: 10/8478f3f3380b6195cf4994f9998e40a05780caa10b31bf67ba87ed294811ada6cb376deb58ce63d7fa124a828350a4c3530a6550545231872d7bd4e5e9f09f2f + languageName: node + linkType: hard + "figlet@npm:^1.7.0": version: 1.7.0 resolution: "figlet@npm:1.7.0" @@ -15276,7 +15392,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": +"glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": version: 10.3.12 resolution: "glob@npm:10.3.12" dependencies: @@ -16419,7 +16535,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1": +"ignore@npm:^5.0.0, ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1": version: 5.3.1 resolution: "ignore@npm:5.3.1" checksum: 10/0a884c2fbc8c316f0b9f92beaf84464253b73230a4d4d286697be45fca081199191ca33e1c2e82d9e5f851f5e9a48a78e25a35c951e7eb41e59f150db3530065 @@ -16487,6 +16603,13 @@ __metadata: languageName: node linkType: hard +"import-meta-resolve@npm:^3.0.0": + version: 3.1.1 + resolution: "import-meta-resolve@npm:3.1.1" + checksum: 10/ae1bd4910eba2a6e15d373a934b5200e8145d63eb7f83639dde1dc1da0c9ad9d960a17c0f09d45118df5c8f63b64492d3bf7039bc3da81544700fb2dad78b84b + languageName: node + linkType: hard + "import-meta-resolve@npm:^4.0.0": version: 4.0.0 resolution: "import-meta-resolve@npm:4.0.0" @@ -16560,6 +16683,13 @@ __metadata: languageName: node linkType: hard +"ini@npm:^4.1.2": + version: 4.1.2 + resolution: "ini@npm:4.1.2" + checksum: 10/383396e45965bdd32ac18d405db1726d51e43e5c792325b4247736c4a402cdc0b448cc9e85960f0c13f1ab603a14a11ed4c9c796a385aced6d9045756a19a469 + languageName: node + linkType: hard + "inline-style-parser@npm:0.1.1": version: 0.1.1 resolution: "inline-style-parser@npm:0.1.1" @@ -16987,6 +17117,13 @@ __metadata: languageName: node linkType: hard +"is-empty@npm:^1.0.0": + version: 1.2.0 + resolution: "is-empty@npm:1.2.0" + checksum: 10/dc80e0a8ad5439d98d128d126fe69e5dcd6b474e29753107bcfe82fc7d628c9da618d48bb24878a7891f231696405ad0a854dfe3cfc955c23d24e80d9e252e62 + languageName: node + linkType: hard + "is-extendable@npm:^0.1.0": version: 0.1.1 resolution: "is-extendable@npm:0.1.1" @@ -18340,7 +18477,7 @@ __metadata: languageName: node linkType: hard -"json5@npm:^2.1.2, json5@npm:^2.2.0, json5@npm:^2.2.3": +"json5@npm:^2.0.0, json5@npm:^2.1.2, json5@npm:^2.2.0, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" bin: @@ -18593,6 +18730,13 @@ __metadata: languageName: node linkType: hard +"lines-and-columns@npm:^2.0.3": + version: 2.0.4 + resolution: "lines-and-columns@npm:2.0.4" + checksum: 10/81ac2f943f5428a46bd4ea2561c74ba674a107d8e6cc70cd317d16892a36ff3ba0dc6e599aca8b6f8668d26c85288394c6edf7a40e985ca843acab3701b80d4c + languageName: node + linkType: hard + "lint-staged@npm:^15.2.2": version: 15.2.2 resolution: "lint-staged@npm:15.2.2" @@ -18627,6 +18771,16 @@ __metadata: languageName: node linkType: hard +"load-plugin@npm:^6.0.0": + version: 6.0.3 + resolution: "load-plugin@npm:6.0.3" + dependencies: + "@npmcli/config": "npm:^8.0.0" + import-meta-resolve: "npm:^4.0.0" + checksum: 10/b348f8751508020e9344b29178f7032647f1a1c9614356d6b993c06589cfb08306deb76f560cfe3fce21c976b2378f0206d581b6d1d2563abf550e4468608adc + languageName: node + linkType: hard + "loader-runner@npm:^4.2.0": version: 4.3.0 resolution: "loader-runner@npm:4.3.0" @@ -19026,9 +19180,9 @@ __metadata: linkType: hard "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": - version: 10.2.0 - resolution: "lru-cache@npm:10.2.0" - checksum: 10/502ec42c3309c0eae1ce41afca471f831c278566d45a5273a0c51102dee31e0e250a62fa9029c3370988df33a14188a38e682c16143b794de78668de3643e302 + version: 10.2.1 + resolution: "lru-cache@npm:10.2.1" + checksum: 10/65639bf4534c00b7a420be001d7f0485d6147fe0fdc68b9a67d0ef94dca6dace27d87cfa345e817c62bc6e000393379ac744f40870c285bb7c13949c1cc87209 languageName: node linkType: hard @@ -20259,7 +20413,7 @@ __metadata: languageName: node linkType: hard -"minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6": +"minimist@npm:^1.0.0, minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6": version: 1.2.8 resolution: "minimist@npm:1.2.8" checksum: 10/908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f @@ -21822,6 +21976,19 @@ __metadata: languageName: node linkType: hard +"parse-json@npm:^7.0.0": + version: 7.1.1 + resolution: "parse-json@npm:7.1.1" + dependencies: + "@babel/code-frame": "npm:^7.21.4" + error-ex: "npm:^1.3.2" + json-parse-even-better-errors: "npm:^3.0.0" + lines-and-columns: "npm:^2.0.3" + type-fest: "npm:^3.8.0" + checksum: 10/187275c7ac097dcfb3c7420bca2399caa4da33bcd5d5aac3604bda0e2b8eee4df61cc26aa0d79fab97f0d67bf42d41d332baa9f9f56ad27636ad785f1ae639e5 + languageName: node + linkType: hard + "parse-numeric-range@npm:^1.3.0": version: 1.3.0 resolution: "parse-numeric-range@npm:1.3.0" @@ -22782,7 +22949,7 @@ __metadata: languageName: node linkType: hard -"proc-log@npm:^4.0.0": +"proc-log@npm:^4.0.0, proc-log@npm:^4.2.0": version: 4.2.0 resolution: "proc-log@npm:4.2.0" checksum: 10/4e1394491b717f6c1ade15c570ecd4c2b681698474d3ae2d303c1e4b6ab9455bd5a81566211e82890d5a5ae9859718cc6954d5150bb18b09b72ecb297beae90a @@ -23056,6 +23223,18 @@ __metadata: languageName: node linkType: hard +"r1csfile@npm:0.0.48": + version: 0.0.48 + resolution: "r1csfile@npm:0.0.48" + dependencies: + "@iden3/bigarray": "npm:0.0.2" + "@iden3/binfileutils": "npm:0.0.12" + fastfile: "npm:0.0.20" + ffjavascript: "npm:0.3.0" + checksum: 10/d851f801cec9722ea6b5164fb9f62a1e3381422c00bb17c9244f5a99228146831fd8302e4c0df2563cd385562483ef37222221ea6125517bc8a0596c3e822cd6 + languageName: node + linkType: hard + "randombytes@npm:^2.1.0": version: 2.1.0 resolution: "randombytes@npm:2.1.0" @@ -23184,14 +23363,14 @@ __metadata: linkType: hard "react-dom@npm:^18, react-dom@npm:^18.2.0": - version: 18.2.0 - resolution: "react-dom@npm:18.2.0" + version: 18.3.0 + resolution: "react-dom@npm:18.3.0" dependencies: loose-envify: "npm:^1.1.0" - scheduler: "npm:^0.23.0" + scheduler: "npm:^0.23.1" peerDependencies: - react: ^18.2.0 - checksum: 10/ca5e7762ec8c17a472a3605b6f111895c9f87ac7d43a610ab7024f68cd833d08eda0625ce02ec7178cc1f3c957cf0b9273cdc17aa2cd02da87544331c43b1d21 + react: ^18.3.0 + checksum: 10/08d6a351fb4032c1b8cd6fc159b4d2d9f1e7ec967f3365f2585d808b381c9e83466dab9b15b72c2162c1a578776044fde641279a55af016473719be66c415408 languageName: node linkType: hard @@ -23267,9 +23446,9 @@ __metadata: linkType: hard "react-is@npm:^18.0.0": - version: 18.2.0 - resolution: "react-is@npm:18.2.0" - checksum: 10/200cd65bf2e0be7ba6055f647091b725a45dd2a6abef03bf2380ce701fd5edccee40b49b9d15edab7ac08a762bf83cb4081e31ec2673a5bfb549a36ba21570df + version: 18.3.0 + resolution: "react-is@npm:18.3.0" + checksum: 10/1593796b4bde2ce1196f151d926de01054f4345a14a38a8eeb154aed075c2f78658570352cffc71a0a8602cd135b369e604dfa1300ccc85a622ce2073578d160 languageName: node linkType: hard @@ -23419,15 +23598,15 @@ __metadata: linkType: hard "react@npm:^18, react@npm:^18.2.0": - version: 18.2.0 - resolution: "react@npm:18.2.0" + version: 18.3.0 + resolution: "react@npm:18.3.0" dependencies: loose-envify: "npm:^1.1.0" - checksum: 10/b9214a9bd79e99d08de55f8bef2b7fc8c39630be97c4e29d7be173d14a9a10670b5325e94485f74cd8bff4966ef3c78ee53c79a7b0b9b70cba20aa8973acc694 + checksum: 10/17112377dad4e5c868b608be57c8e970a3f6ee6eb6269a5c4c23b11b8b4f393c42a8a046be0c9ddbc5f182b909330ddbecab905bcdea5051b05ec3914491fd79 languageName: node linkType: hard -"read-package-json-fast@npm:^3.0.0": +"read-package-json-fast@npm:^3.0.0, read-package-json-fast@npm:^3.0.2": version: 3.0.2 resolution: "read-package-json-fast@npm:3.0.2" dependencies: @@ -23472,7 +23651,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.0.6, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": +"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.0.2, readable-stream@npm:^3.0.6, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -23710,6 +23889,20 @@ __metadata: languageName: node linkType: hard +"remark-cli@npm:^12.0.0": + version: 12.0.0 + resolution: "remark-cli@npm:12.0.0" + dependencies: + import-meta-resolve: "npm:^3.0.0" + markdown-extensions: "npm:^2.0.0" + remark: "npm:^15.0.0" + unified-args: "npm:^11.0.0" + bin: + remark: cli.js + checksum: 10/51f23dd6c1ded066f5f9436aa791e326bd7096b9046e1f6856dd24b0bf2ec190d2d1252951363c100cdbe171db5bafcff6f7fc5dc173fe7f8e633b838d12e041 + languageName: node + linkType: hard + "remark-directive@npm:^3.0.0": version: 3.0.0 resolution: "remark-directive@npm:3.0.0" @@ -23761,7 +23954,7 @@ __metadata: languageName: node linkType: hard -"remark-mdx@npm:^3.0.0": +"remark-mdx@npm:^3.0.0, remark-mdx@npm:^3.0.1": version: 3.0.1 resolution: "remark-mdx@npm:3.0.1" dependencies: @@ -23807,6 +24000,18 @@ __metadata: languageName: node linkType: hard +"remark@npm:^15.0.0": + version: 15.0.1 + resolution: "remark@npm:15.0.1" + dependencies: + "@types/mdast": "npm:^4.0.0" + remark-parse: "npm:^11.0.0" + remark-stringify: "npm:^11.0.0" + unified: "npm:^11.0.0" + checksum: 10/671eae3a4482377373cbbae956e2dbc0f8c40df1c3e5e2e1e82efa248b310ef5989340e1a5a8ebe94ff14fcf9c72612f40a29d002ffc0a465e3d6d50de973839 + languageName: node + linkType: hard + "renderkid@npm:^3.0.0": version: 3.0.0 resolution: "renderkid@npm:3.0.0" @@ -24458,12 +24663,12 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.23.0": - version: 0.23.0 - resolution: "scheduler@npm:0.23.0" +"scheduler@npm:^0.23.1": + version: 0.23.1 + resolution: "scheduler@npm:0.23.1" dependencies: loose-envify: "npm:^1.1.0" - checksum: 10/0c4557aa37bafca44ff21dc0ea7c92e2dbcb298bc62eae92b29a39b029134f02fb23917d6ebc8b1fa536b4184934314c20d8864d156a9f6357f3398aaf7bfda8 + checksum: 10/6e194e726210c2d619cbf69a73fdb068cb0c9b0c99222de429ec5fc562c2f28e59a8cb3526e9104e16521e7e57c785a82bc44dd3f78fd0de86aea719a218f3c3 languageName: node linkType: hard @@ -24626,6 +24831,9 @@ __metadata: prism-react-renderer: "npm:^2.1.0" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" + remark-cli: "npm:^12.0.0" + remark-frontmatter: "npm:^5.0.0" + remark-mdx: "npm:^3.0.1" sass: "npm:^1.52.3" typescript: "npm:~5.2.2" url-loader: "npm:^4.1.1" @@ -25150,7 +25358,7 @@ __metadata: languageName: node linkType: hard -"snarkjs@npm:0.7.3, snarkjs@npm:^0.7.0, snarkjs@npm:^0.7.2": +"snarkjs@npm:0.7.3": version: 0.7.3 resolution: "snarkjs@npm:0.7.3" dependencies: @@ -25170,6 +25378,26 @@ __metadata: languageName: node linkType: hard +"snarkjs@npm:^0.7.0, snarkjs@npm:^0.7.2": + version: 0.7.4 + resolution: "snarkjs@npm:0.7.4" + dependencies: + "@iden3/binfileutils": "npm:0.0.12" + bfj: "npm:^7.0.2" + blake2b-wasm: "npm:^2.4.0" + circom_runtime: "npm:0.1.25" + ejs: "npm:^3.1.6" + fastfile: "npm:0.0.20" + ffjavascript: "npm:0.3.0" + js-sha3: "npm:^0.8.0" + logplease: "npm:^1.2.15" + r1csfile: "npm:0.0.48" + bin: + snarkjs: build/cli.cjs + checksum: 10/aaebcf57e11a36dc1ea77742a5062d67fcaa24bad37bc6532d9aaefc71ad302c4a65bd05cabb6ac893f3329e09f193d9cbd2a20053f8d5074e3864d933323e05 + languageName: node + linkType: hard + "sockjs@npm:^0.3.24": version: 0.3.24 resolution: "sockjs@npm:0.3.24" @@ -25705,6 +25933,17 @@ __metadata: languageName: node linkType: hard +"string-width@npm:^6.0.0": + version: 6.1.0 + resolution: "string-width@npm:6.1.0" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^10.2.1" + strip-ansi: "npm:^7.0.1" + checksum: 10/8aefb456a230c8d7fe254049b1b2d62603da1a3b6c7fc9f3332f6779583cc1c72653f9b6e4cd0c1c92befee1565d4a0a7542d09ba4ceb6d96af02fbd8425bb03 + languageName: node + linkType: hard + "string-width@npm:^7.0.0": version: 7.1.0 resolution: "string-width@npm:7.1.0" @@ -25843,7 +26082,7 @@ __metadata: languageName: node linkType: hard -"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": +"strip-ansi@npm:^7.0.0, strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": version: 7.1.0 resolution: "strip-ansi@npm:7.1.0" dependencies: @@ -26051,6 +26290,13 @@ __metadata: languageName: node linkType: hard +"supports-color@npm:^9.0.0": + version: 9.4.0 + resolution: "supports-color@npm:9.4.0" + checksum: 10/cb8ff8daeaf1db642156f69a9aa545b6c01dd9c4def4f90a49f46cbf24be0c245d392fcf37acd119cd1819b99dad2cc9b7e3260813f64bcfd7f5b18b5a1eefb8 + languageName: node + linkType: hard + "supports-hyperlinks@npm:^2.2.0": version: 2.3.0 resolution: "supports-hyperlinks@npm:2.3.0" @@ -26797,6 +27043,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^3.8.0": + version: 3.13.1 + resolution: "type-fest@npm:3.13.1" + checksum: 10/9a8a2359ada34c9b3affcaf3a8f73ee14c52779e89950db337ce66fb74c3399776c697c99f2532e9b16e10e61cfdba3b1c19daffb93b338b742f0acd0117ce12 + languageName: node + linkType: hard + "type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" @@ -27082,6 +27335,52 @@ __metadata: languageName: node linkType: hard +"unified-args@npm:^11.0.0": + version: 11.0.1 + resolution: "unified-args@npm:11.0.1" + dependencies: + "@types/text-table": "npm:^0.2.0" + chalk: "npm:^5.0.0" + chokidar: "npm:^3.0.0" + comma-separated-tokens: "npm:^2.0.0" + json5: "npm:^2.0.0" + minimist: "npm:^1.0.0" + strip-ansi: "npm:^7.0.0" + text-table: "npm:^0.2.0" + unified-engine: "npm:^11.0.0" + checksum: 10/6b93410bd83be54a49fa8ae97f3054443951c8aa91c83b79bf01c81bde96fd106567738cd53b9ba40b59b5420e81c9464516b5802b1e1eebbf77a1bb3b8a21d6 + languageName: node + linkType: hard + +"unified-engine@npm:^11.0.0": + version: 11.2.1 + resolution: "unified-engine@npm:11.2.1" + dependencies: + "@types/concat-stream": "npm:^2.0.0" + "@types/debug": "npm:^4.0.0" + "@types/is-empty": "npm:^1.0.0" + "@types/node": "npm:^20.0.0" + "@types/unist": "npm:^3.0.0" + concat-stream: "npm:^2.0.0" + debug: "npm:^4.0.0" + extend: "npm:^3.0.0" + glob: "npm:^10.0.0" + ignore: "npm:^5.0.0" + is-empty: "npm:^1.0.0" + is-plain-obj: "npm:^4.0.0" + load-plugin: "npm:^6.0.0" + parse-json: "npm:^7.0.0" + trough: "npm:^2.0.0" + unist-util-inspect: "npm:^8.0.0" + vfile: "npm:^6.0.0" + vfile-message: "npm:^4.0.0" + vfile-reporter: "npm:^8.0.0" + vfile-statistics: "npm:^3.0.0" + yaml: "npm:^2.0.0" + checksum: 10/9428a5673d30cf81a45c32fa3909f1529d81214b6bcf0ab56f8205ee00a5481320f50e926935eaa5e1dcb9e36b3c8d797a665fe05b2a98f388fdaa07dcb7714f + languageName: node + linkType: hard + "unified@npm:^11.0.0, unified@npm:^11.0.3, unified@npm:^11.0.4": version: 11.0.4 resolution: "unified@npm:11.0.4" @@ -27133,6 +27432,15 @@ __metadata: languageName: node linkType: hard +"unist-util-inspect@npm:^8.0.0": + version: 8.0.0 + resolution: "unist-util-inspect@npm:8.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/6d49bbda767a44e28f55de472fd05368e7916fc534484364d59f6c403ed0911789cdd70936098f6a45d5ac55a21a96ac302c8bd1cb909bec50d56703e33cf0a5 + languageName: node + linkType: hard + "unist-util-is@npm:^6.0.0": version: 6.0.0 resolution: "unist-util-is@npm:6.0.0" @@ -27502,6 +27810,42 @@ __metadata: languageName: node linkType: hard +"vfile-reporter@npm:^8.0.0": + version: 8.1.1 + resolution: "vfile-reporter@npm:8.1.1" + dependencies: + "@types/supports-color": "npm:^8.0.0" + string-width: "npm:^6.0.0" + supports-color: "npm:^9.0.0" + unist-util-stringify-position: "npm:^4.0.0" + vfile: "npm:^6.0.0" + vfile-message: "npm:^4.0.0" + vfile-sort: "npm:^4.0.0" + vfile-statistics: "npm:^3.0.0" + checksum: 10/caeb1b59d3798d9c098d84da68047e8fa5fb3a245c66dc4a653d16ac1cec5bc8023ef5c529d426a21fed8dafab902ede6adea22958fbcbdc1cb999f44b783f50 + languageName: node + linkType: hard + +"vfile-sort@npm:^4.0.0": + version: 4.0.0 + resolution: "vfile-sort@npm:4.0.0" + dependencies: + vfile: "npm:^6.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/2d60298ccf30b6f1068560660985670ad3345cfa1f85f1feb66f0d9b74b847a81af94db26fc798e98a09eed58ea4502c7bbd69c969e26848f5badcdb90d28bc8 + languageName: node + linkType: hard + +"vfile-statistics@npm:^3.0.0": + version: 3.0.0 + resolution: "vfile-statistics@npm:3.0.0" + dependencies: + vfile: "npm:^6.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/0dbbc8adeb73bb24b5f723e947122e1ae7b6bd0c5ff3fd1ae0ef4a3066f74be00425102c95aa4eaa0f529ba05237255fe8342af76661b0ba6aee3f4c16ca135f + languageName: node + linkType: hard + "vfile@npm:^6.0.0, vfile@npm:^6.0.1": version: 6.0.1 resolution: "vfile@npm:6.0.1" @@ -27544,6 +27888,13 @@ __metadata: languageName: node linkType: hard +"walk-up-path@npm:^3.0.1": + version: 3.0.1 + resolution: "walk-up-path@npm:3.0.1" + checksum: 10/9ffca02fe30fb65f6db531260582988c5e766f4c739cf86a6109380a7f791236b5d0b92b1dce37a6f73e22dca6bc9d93bf3700413e16251b2bd6bbd1ca2be316 + languageName: node + linkType: hard + "walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -28459,6 +28810,15 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^2.0.0": + version: 2.4.1 + resolution: "yaml@npm:2.4.1" + bin: + yaml: bin.mjs + checksum: 10/2c54fd69ef59126758ae710f9756405a7d41abcbb61aca894250d0e81e76057c14dc9bb00a9528f72f99b8f24077f694a6f7fd09cdd6711fcec2eebfbb5df409 + languageName: node + linkType: hard + "yargs-parser@npm:20.2.4": version: 20.2.4 resolution: "yargs-parser@npm:20.2.4"