3.1.0 • Published 2 years ago
@semaphore-protocol/subgraph v3.1.0
This library allows you to query the Semaphore.sol contract data (i.e. groups) using the Semaphore subgraph on Goerli and Arbitrum One. It can be used on Node.js and browsers. |
---|
🛠 Install
npm or yarn
Install the @semaphore-protocol/subgraph
package with npm:
npm i @semaphore-protocol/subgraph
or yarn:
yarn add @semaphore-protocol/subgraph
CDN
You can also load it using a script
tag using unpkg:
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://unpkg.com/@semaphore-protocol/subgraph/"></script>
or JSDelivr:
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@semaphore-protocol/subgraph/"></script>
📜 Usage
# new Subgraph(network: Network = "goerli" ): Subgraph
import { Subgraph } from "@semaphore-protocol/subgraph"
const subgraph = new Subgraph()
# getGroups(options?: GroupOptions)
const groups = subgraph.getGroups()
// or
const groups = subgraph.getGroups({ members: true, verifiedProofs: true })
# getGroup(groupId: string, options?: GroupOptions)
const group = subgraph.getGroup("1")
// or
const { members, verifiedProofs } = subgraph.getGroup("1", { members: true, verifiedProofs: true })
3.1.0
2 years ago
3.0.0
2 years ago
3.0.0-beta.5
2 years ago
3.0.0-beta.7
2 years ago
3.0.0-beta.6
2 years ago
3.0.0-beta.8
2 years ago
2.6.1
3 years ago
2.6.0
3 years ago
2.5.0
3 years ago
0.3.0
3 years ago
2.4.0
3 years ago
0.2.0
3 years ago
2.1.0
3 years ago
2.0.0
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago