Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

Commit a2a9f8c

Browse files
committed
docs: Include pnpm as a package manager in the docs
1 parent e811777 commit a2a9f8c

File tree

12 files changed

+221
-11
lines changed

12 files changed

+221
-11
lines changed

i18n/es/docusaurus-plugin-content-docs/version-V3/guides/fetching-data.mdx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import TabItem from "@theme/TabItem"
88

99
# Semaphore data
1010

11-
Para obtener datos on-chain del contrato [Semaphore.sol](https://github.com/semaphore-protocol/semaphore/blob/main/packages/contracts/contracts/Semaphore.sol), puedes usar la librería [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data).
11+
Para obtener datos on-chain del contrato [Semaphore.sol](https://github.com/semaphore-protocol/semaphore/blob/main/packages/contracts/contracts/Semaphore.sol), puedes usar la librería [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data).
1212

1313
Hay dos formas para hacer esto, usando [`SemaphoreSubgraph`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/subgraph.ts) o [`SemaphoreEthers`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/ethers.ts). La clase `SemaphoreSubgraph` usa el [subgrafo de Semaphore](https://github.com/semaphore-protocol/subgraph), el cual usa [The Graph Protocol](https://thegraph.com/) detrás del telón, y la clase `SemaphoreEthers` usa [Ethers](https://github.com/ethers-io/ethers.js/).
1414

@@ -23,6 +23,7 @@ groupId="package-managers"
2323
values={[
2424
{label: 'npm', value: 'npm'},
2525
{label: 'Yarn', value: 'yarn'},
26+
{label: 'pnpm', value: 'pnpm'}
2627
]}>
2728
<TabItem value="npm">
2829

@@ -37,12 +38,19 @@ npm install @semaphore-protocol/data
3738
yarn add @semaphore-protocol/data
3839
```
3940

41+
</TabItem>
42+
<TabItem value="pnpm">
43+
44+
```bash
45+
pnpm add @semaphore-protocol/data
46+
```
47+
4048
</TabItem>
4149
</Tabs>
4250

4351
## Obtener datos usando SemaphoreSubgraph
4452

45-
Para obtener datos usando el subgrafo de Semaphore puedes usar la clase [`SemaphoreSubgraph`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/subgraph.ts) del paquete [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data).
53+
Para obtener datos usando el subgrafo de Semaphore puedes usar la clase [`SemaphoreSubgraph`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/subgraph.ts) del paquete [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data).
4654

4755
```typescript
4856
import { SemaphoreSubgraph } from "@semaphore-protocol/data"
@@ -109,7 +117,7 @@ const group = new Group(groupId, 20, members)
109117

110118
## Obtener datos usando SemaphoreEthers
111119

112-
Para obtener datos usando Ethers puedes usar la clase [`SemaphoreEthers`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/ethers.ts) del paquete [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data).
120+
Para obtener datos usando Ethers puedes usar la clase [`SemaphoreEthers`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/ethers.ts) del paquete [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data).
113121

114122
```typescript
115123
import { SemaphoreEthers } from "@semaphore-protocol/data"
@@ -170,4 +178,4 @@ const semaphoreEthers = new SemaphoreEthers("sepolia")
170178
const members = await semaphoreEthers.getGroupMembers(groupId)
171179
const group = new Group(groupId, 20, members)
172180
```
173-
:::
181+
:::

i18n/es/docusaurus-plugin-content-docs/version-V3/guides/groups.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Utilice la clase `Group` de la librería [`@semaphore-protocol/group`](https://g
3939

4040
- `Group id`: un identificar único para el grupo;
4141
- `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`).
42-
- `Members`: (_default `[]`_) la lista de miembros para inicializar el grupo.
42+
- `Members`: (_default `[]`_) la lista de miembros para inicializar el grupo.
4343

4444
#### Instalar librería:
4545

@@ -49,6 +49,7 @@ groupId="package-managers"
4949
values={[
5050
{label: 'npm', value: 'npm'},
5151
{label: 'Yarn', value: 'yarn'},
52+
{label: 'pnpm', value: 'pnpm'}
5253
]}>
5354
<TabItem value="npm">
5455

@@ -63,6 +64,13 @@ npm install @semaphore-protocol/group
6364
yarn add @semaphore-protocol/group
6465
```
6566

67+
</TabItem>
68+
<TabItem value="pnpm">
69+
70+
```bash
71+
pnpm add @semaphore-protocol/group
72+
```
73+
6674
</TabItem>
6775
</Tabs>
6876

i18n/es/docusaurus-plugin-content-docs/version-V3/guides/identities.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ groupId="package-managers"
3232
values={[
3333
{label: 'npm', value: 'npm'},
3434
{label: 'Yarn', value: 'yarn'},
35+
{label: 'pnpm', value: 'pnpm'}
3536
]}>
3637
<TabItem value="npm">
3738

@@ -46,6 +47,13 @@ npm install @semaphore-protocol/identity
4647
yarn add @semaphore-protocol/identity
4748
```
4849

50+
</TabItem>
51+
<TabItem value="pnpm">
52+
53+
```bash
54+
pnpm add @semaphore-protocol/identity
55+
```
56+
4957
</TabItem>
5058
</Tabs>
5159

i18n/es/docusaurus-plugin-content-docs/version-V3/guides/proofs.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ groupId="package-managers"
3838
values={[
3939
{label: 'npm', value: 'npm'},
4040
{label: 'Yarn', value: 'yarn'},
41+
{label: 'pnpm', value: 'pnpm'}
4142
]}>
4243
<TabItem value="npm">
4344

@@ -52,6 +53,13 @@ npm install @semaphore-protocol/proof
5253
yarn add @semaphore-protocol/proof
5354
```
5455

56+
</TabItem>
57+
<TabItem value="pnpm">
58+
59+
```bash
60+
pnpm add @semaphore-protocol/proof
61+
```
62+
5563
</TabItem>
5664
</Tabs>
5765

i18n/es/docusaurus-plugin-content-docs/version-V3/quick-setup.mdx

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ groupId="package-managers"
3636
values={[
3737
{label: 'npm', value: 'npm'},
3838
{label: 'Yarn', value: 'yarn'},
39+
{label: 'pnpm', value: 'pnpm'}
3940
]}>
4041
<TabItem value="npm">
4142

@@ -51,6 +52,14 @@ npm i
5152
cd my-app
5253
yarn
5354
```
55+
</TabItem>
56+
57+
<TabItem value="pnpm">
58+
59+
```bash
60+
cd my-app
61+
pnpm install
62+
```
5463

5564
</TabItem>
5665
</Tabs>
@@ -112,6 +121,7 @@ groupId="package-managers"
112121
values={[
113122
{label: 'npm', value: 'npm'},
114123
{label: 'Yarn', value: 'yarn'},
124+
{label: 'pnpm', value: 'pnpm'}
115125
]}>
116126
<TabItem value="npm">
117127

@@ -126,6 +136,13 @@ npm run compile
126136
yarn compile
127137
```
128138

139+
</TabItem>
140+
<TabItem value="pnpm">
141+
142+
```bash
143+
pnpm compile
144+
```
145+
129146
</TabItem>
130147
</Tabs>
131148

@@ -139,6 +156,7 @@ groupId="package-managers"
139156
values={[
140157
{label: 'npm', value: 'npm'},
141158
{label: 'Yarn', value: 'yarn'},
159+
{label: 'pnpm', value: 'pnpm'}
142160
]}>
143161
<TabItem value="npm">
144162

@@ -153,6 +171,13 @@ npm test
153171
yarn test
154172
```
155173

174+
</TabItem>
175+
<TabItem value="pnpm">
176+
177+
```bash
178+
pnpm test
179+
```
180+
156181
</TabItem>
157182
</Tabs>
158183

@@ -164,6 +189,7 @@ groupId="package-managers"
164189
values={[
165190
{label: 'npm', value: 'npm'},
166191
{label: 'Yarn', value: 'yarn'},
192+
{label: 'pnpm', value: 'pnpm'}
167193
]}>
168194
<TabItem value="npm">
169195

@@ -178,6 +204,13 @@ npm run test:coverage
178204
yarn test:coverage
179205
```
180206

207+
</TabItem>
208+
<TabItem value="pnpm">
209+
210+
```bash
211+
pnpm test:coverage
212+
```
213+
181214
</TabItem>
182215
</Tabs>
183216

@@ -189,6 +222,7 @@ groupId="package-managers"
189222
values={[
190223
{label: 'npm', value: 'npm'},
191224
{label: 'Yarn', value: 'yarn'},
225+
{label: 'pnpm', value: 'pnpm'}
192226
]}>
193227
<TabItem value="npm">
194228

@@ -203,6 +237,13 @@ npm run test:report-gas
203237
yarn test:report-gas
204238
```
205239

240+
</TabItem>
241+
<TabItem value="pnpm">
242+
243+
```bash
244+
pnpm test:report-gas
245+
```
246+
206247
</TabItem>
207248
</Tabs>
208249

@@ -226,6 +267,7 @@ En la carpeta raíz del proyecto:
226267
values={[
227268
{label: 'npm', value: 'npm'},
228269
{label: 'Yarn', value: 'yarn'},
270+
{label: 'pnpm', value: 'pnpm'}
229271
]}>
230272
<TabItem value="npm">
231273

@@ -240,6 +282,13 @@ En la carpeta raíz del proyecto:
240282
yarn deploy --semaphore <semaphore-address> --group <group-id> --network goerli
241283
```
242284

285+
</TabItem>
286+
<TabItem value="pnpm">
287+
288+
```bash
289+
pnpm deploy --semaphore <semaphore-address> --group <group-id> --network goerli
290+
```
291+
243292
</TabItem>
244293
</Tabs>
245294

@@ -261,6 +310,7 @@ groupId="package-managers"
261310
values={[
262311
{label: 'npm', value: 'npm'},
263312
{label: 'Yarn', value: 'yarn'},
313+
{label: 'pnpm', value: 'pnpm'}
264314
]}>
265315
<TabItem value="npm">
266316

@@ -275,5 +325,12 @@ npm run dev
275325
yarn dev
276326
```
277327

328+
</TabItem>
329+
<TabItem value="pnpm">
330+
331+
```bash
332+
pnpm dev
333+
```
334+
278335
</TabItem>
279336
</Tabs>

i18n/es/docusaurus-plugin-content-docs/version-V3/troubleshooting.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ groupId="package-managers"
7575
values={[
7676
{label: 'npm', value: 'npm'},
7777
{label: 'Yarn', value: 'yarn'},
78+
{label: 'pnpm', value: 'pnpm'}
7879
]}>
7980
<TabItem value="npm">
8081

@@ -89,6 +90,13 @@ npm install @esbuild-plugins/node-globals-polyfill
8990
yarn add @esbuild-plugins/node-globals-polyfill
9091
```
9192

93+
</TabItem>
94+
<TabItem value="pnpm">
95+
96+
```bash
97+
pnpm add @esbuild-plugins/node-globals-polyfill
98+
```
99+
92100
</TabItem>
93101
</Tabs>
94102

@@ -98,6 +106,7 @@ groupId="package-managers"
98106
values={[
99107
{label: 'npm', value: 'npm'},
100108
{label: 'Yarn', value: 'yarn'},
109+
{label: 'pnpm', value: 'pnpm'}
101110
]}>
102111
<TabItem value="npm">
103112

@@ -112,6 +121,13 @@ npm install @esbuild-plugins/node-modules-polyfill
112121
yarn add @esbuild-plugins/node-modules-polyfill
113122
```
114123

124+
</TabItem>
125+
<TabItem value="pnpm">
126+
127+
```bash
128+
pnpm add @esbuild-plugins/node-modules-polyfill
129+
```
130+
115131
</TabItem>
116132
</Tabs>
117133

versioned_docs/version-V3/guides/fetching-data.mdx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import TabItem from "@theme/TabItem"
88

99
# Semaphore data
1010

11-
To fetch on-chain data from the [Semaphore.sol](https://github.com/semaphore-protocol/semaphore/blob/main/packages/contracts/contracts/Semaphore.sol) contract, you can use the [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data) library.
11+
To fetch on-chain data from the [Semaphore.sol](https://github.com/semaphore-protocol/semaphore/blob/main/packages/contracts/contracts/Semaphore.sol) contract, you can use the [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data) library.
1212

1313
There are two ways to do this, using [`SemaphoreSubgraph`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/subgraph.ts) or [`SemaphoreEthers`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/ethers.ts). The `SemaphoreSubgraph` class uses the [Semaphore subgraph](https://github.com/semaphore-protocol/subgraph), which uses [The Graph Protocol](https://thegraph.com/) under the hood, and the `SemaphoreEthers` class uses [Ethers](https://github.com/ethers-io/ethers.js/).
1414

@@ -23,6 +23,7 @@ groupId="package-managers"
2323
values={[
2424
{label: 'npm', value: 'npm'},
2525
{label: 'Yarn', value: 'yarn'},
26+
{label: 'pnpm', value: 'pnpm'}
2627
]}>
2728
<TabItem value="npm">
2829

@@ -37,12 +38,19 @@ npm install @semaphore-protocol/data
3738
yarn add @semaphore-protocol/data
3839
```
3940

41+
</TabItem>
42+
<TabItem value="pnpm">
43+
44+
```bash
45+
pnpm add @semaphore-protocol/data
46+
```
47+
4048
</TabItem>
4149
</Tabs>
4250

4351
## Fetch data using SemaphoreSubgraph
4452

45-
To fetch data using the Semaphore subgraph you can use the [`SemaphoreSubgraph`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/subgraph.ts) class from the [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data) package.
53+
To fetch data using the Semaphore subgraph you can use the [`SemaphoreSubgraph`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/subgraph.ts) class from the [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data) package.
4654

4755
```typescript
4856
import { SemaphoreSubgraph } from "@semaphore-protocol/data"
@@ -109,7 +117,7 @@ const group = new Group(groupId, 20, members)
109117

110118
## Fetch data using SemaphoreEthers
111119

112-
To fetch data using Ethers you can use the [`SemaphoreEthers`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/ethers.ts) class from the [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data) package.
120+
To fetch data using Ethers you can use the [`SemaphoreEthers`](https://github.com/semaphore-protocol/semaphore/blob/main/packages/data/src/ethers.ts) class from the [@semaphore-protocol/data](https://github.com/semaphore-protocol/semaphore/tree/main/packages/data) package.
113121

114122
```typescript
115123
import { SemaphoreEthers } from "@semaphore-protocol/data"
@@ -170,4 +178,4 @@ const semaphoreEthers = new SemaphoreEthers("sepolia")
170178
const members = await semaphoreEthers.getGroupMembers(groupId)
171179
const group = new Group(groupId, 20, members)
172180
```
173-
:::
181+
:::

0 commit comments

Comments
 (0)