Constructs a new SemaphoreEthers instance, initializing it with a network or a custom Ethereum node URL, and optional configuration settings for the ethers provider and contract.
The Ethereum network name or a custom JSON-RPC URL to connect to.
Configuration options for the ethers provider and the Semaphore contract.
Private
_contractPrivate
_networkPrivate
_optionsRetrieves the ethers Contract instance used to interact with the Semaphore contract.
The Contract instance.
Retrieves the Ethereum network or custom URL currently used by this instance.
The network or URL as a string.
Retrieves the options used for configuring the ethers provider and the Semaphore contract.
The configuration options.
Retrieves detailed information about a specific group by its ID. This method queries the Semaphore contract to get the group's admin, Merkle tree root, depth, and size.
The unique identifier of the group.
A promise that resolves to a GroupResponse object.
Fetches a list of members from a specific group. This method queries the Semaphore contract for events related to member additions and updates, and constructs the list of current group members.
The unique identifier of the group.
A promise that resolves to an array of member identity commitments as strings.
Retrieves a list of validated proofs for a specific group. This method queries the Semaphore contract for "ProofValidated" events and returns details about each proof.
The unique identifier of the group.
A promise that resolves to an array of validated proofs.
Checks whether a specific member is part of a group. This method queries the Semaphore contract to determine if the provided identity commitment is a member of the specified group.
The unique identifier of the group.
The identity commitment of the member to check.
A promise that resolves to true if the member is part of the group, otherwise false.
The SemaphoreEthers class provides a high-level interface to interact with the Semaphore smart contract using the ethers.js library. It encapsulates all necessary functionalities to connect to Ethereum networks, manage contract instances, and perform operations such as retrieving group information or checking group memberships. This class simplifies the interaction with the Ethereum blockchain by abstracting the details of network connections and contract interactions.