@semaphore-protocol/contracts 4.0.0-alpha.1 → 4.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  <img src="https://img.shields.io/badge/project-Semaphore-blue.svg?style=flat-square">
11
11
  </a>
12
12
  <a href="https://github.com/semaphore-protocol/semaphore/blob/main/LICENSE">
13
- <img alt="Github license" src="https://img.shields.io/github/license/semaphore-protocol/semaphore.svg?style=flat-square">
13
+ <img alt="NPM license" src="https://img.shields.io/npm/l/%40semaphore-protocol%2Fcontracts?style=flat-square">
14
14
  </a>
15
15
  <a href="https://www.npmjs.com/package/@semaphore-protocol/contracts">
16
16
  <img alt="NPM version" src="https://img.shields.io/npm/v/@semaphore-protocol/contracts?style=flat-square" />
@@ -123,6 +123,11 @@ abstract contract SemaphoreGroups is ISemaphoreGroups {
123
123
  emit MemberRemoved(groupId, index, identityCommitment, merkleTreeRoot);
124
124
  }
125
125
 
126
+ /// @dev See {ISemaphoreGroups-getGroupAdmin}.
127
+ function getGroupAdmin(uint256 groupId) public view virtual override returns (address) {
128
+ return admins[groupId];
129
+ }
130
+
126
131
  /// @dev See {ISemaphoreGroups-hasMember}.
127
132
  function hasMember(uint256 groupId, uint256 identityCommitment) public view virtual override returns (bool) {
128
133
  return merkleTrees[groupId]._has(identityCommitment);
@@ -57,6 +57,11 @@ interface ISemaphoreGroups {
57
57
  /// @param merkleTreeRoot: New root hash of the tree.
58
58
  event MemberRemoved(uint256 indexed groupId, uint256 index, uint256 identityCommitment, uint256 merkleTreeRoot);
59
59
 
60
+ /// @dev Returns the address of the group admin.
61
+ /// @param groupId: Id of the group.
62
+ /// @return Address of the group admin.
63
+ function getGroupAdmin(uint256 groupId) external view returns (address);
64
+
60
65
  /// @dev Returns true if a member exists in a group.
61
66
  /// @param groupId: Id of the group.
62
67
  /// @param identityCommitment: Identity commitment.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semaphore-protocol/contracts",
3
- "version": "4.0.0-alpha.1",
3
+ "version": "4.0.0-alpha.3",
4
4
  "description": "Semaphore contracts to manage groups and broadcast anonymous signals.",
5
5
  "license": "MIT",
6
6
  "files": [