@semaphore-protocol/utils 4.0.0-beta.9 → 4.0.0

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.
@@ -1,2 +1,59 @@
1
1
  export declare const MIN_DEPTH = 1;
2
- export declare const MAX_DEPTH = 12;
2
+ export declare const MAX_DEPTH = 32;
3
+ export declare const SemaphoreABI: ({
4
+ inputs: {
5
+ internalType: string;
6
+ name: string;
7
+ type: string;
8
+ }[];
9
+ stateMutability: string;
10
+ type: string;
11
+ name?: undefined;
12
+ anonymous?: undefined;
13
+ outputs?: undefined;
14
+ } | {
15
+ inputs: never[];
16
+ name: string;
17
+ type: string;
18
+ stateMutability?: undefined;
19
+ anonymous?: undefined;
20
+ outputs?: undefined;
21
+ } | {
22
+ anonymous: boolean;
23
+ inputs: {
24
+ indexed: boolean;
25
+ internalType: string;
26
+ name: string;
27
+ type: string;
28
+ }[];
29
+ name: string;
30
+ type: string;
31
+ stateMutability?: undefined;
32
+ outputs?: undefined;
33
+ } | {
34
+ inputs: ({
35
+ internalType: string;
36
+ name: string;
37
+ type: string;
38
+ components?: undefined;
39
+ } | {
40
+ components: {
41
+ internalType: string;
42
+ name: string;
43
+ type: string;
44
+ }[];
45
+ internalType: string;
46
+ name: string;
47
+ type: string;
48
+ })[];
49
+ name: string;
50
+ outputs: {
51
+ internalType: string;
52
+ name: string;
53
+ type: string;
54
+ }[];
55
+ stateMutability: string;
56
+ type: string;
57
+ anonymous?: undefined;
58
+ })[];
59
+ export declare const SemaphoreBytecode: string;
@@ -17,7 +17,7 @@ declare const _default: {
17
17
  chainId: number;
18
18
  explorer: string;
19
19
  };
20
- "matic-mumbai": {
20
+ "matic-amoy": {
21
21
  name: string;
22
22
  url: string;
23
23
  chainId: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semaphore-protocol/utils",
3
- "version": "4.0.0-beta.9",
3
+ "version": "4.0.0",
4
4
  "description": "A library to provide utility functions to the other Semaphore packages.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/constants.ts CHANGED
@@ -1,5 +1,10 @@
1
- // TODO: Support all tree depths after trusted-setup. MAX_DEPTH would be 32.
1
+ import _interface from "./semaphore-interface.json"
2
2
 
3
+ // Minimum supported tree depth.
3
4
  export const MIN_DEPTH = 1
4
5
 
5
- export const MAX_DEPTH = 12
6
+ // Maximum supported tree depth.
7
+ export const MAX_DEPTH = 32
8
+
9
+ export const SemaphoreABI = _interface.abi
10
+ export const SemaphoreBytecode = _interface.bytecode
@@ -4,18 +4,18 @@
4
4
  "contracts": [
5
5
  {
6
6
  "name": "SemaphoreVerifier",
7
- "address": "0x58AD7a4389E0F5d814815E5D5A3Ab903dAE9284a",
8
- "startBlock": 5539276
7
+ "address": "0xe538f9DeeE04A397decb1E7dc5D16fD6f123c043",
8
+ "startBlock": 6333999
9
9
  },
10
10
  {
11
11
  "name": "PoseidonT3",
12
- "address": "0x4EFfF6a6a7BB31cdAd9Ee742b0faAA6Bb9BF096B",
13
- "startBlock": 5539276
12
+ "address": "0xB43122Ecb241DD50062641f089876679fd06599a",
13
+ "startBlock": 6333999
14
14
  },
15
15
  {
16
16
  "name": "Semaphore",
17
- "address": "0x0A09FB3f63c13F1C54F2fA41AFB1e7a98cffc774",
18
- "startBlock": 5539276
17
+ "address": "0x1e0d7FF1610e480fC93BdEC510811ea2Ba6d7c2f",
18
+ "startBlock": 6333999
19
19
  }
20
20
  ]
21
21
  },
@@ -24,18 +24,18 @@
24
24
  "contracts": [
25
25
  {
26
26
  "name": "SemaphoreVerifier",
27
- "address": "0x5f4edC58142f4395D1D536e793137A0252dA5a49",
28
- "startBlock": 25837653
27
+ "address": "0xe538f9DeeE04A397decb1E7dc5D16fD6f123c043",
28
+ "startBlock": 64798522
29
29
  },
30
30
  {
31
31
  "name": "PoseidonT3",
32
- "address": "0x181B7f34538cE3BceC68597d4A212aB3f7881648",
33
- "startBlock": 25837653
32
+ "address": "0xB43122Ecb241DD50062641f089876679fd06599a",
33
+ "startBlock": 64798522
34
34
  },
35
35
  {
36
36
  "name": "Semaphore",
37
- "address": "0x220fBdB6F996827b1Cf12f0C181E8d5e6de3a36F",
38
- "startBlock": 25837653
37
+ "address": "0x1e0d7FF1610e480fC93BdEC510811ea2Ba6d7c2f",
38
+ "startBlock": 64798522
39
39
  }
40
40
  ]
41
41
  },
@@ -44,38 +44,38 @@
44
44
  "contracts": [
45
45
  {
46
46
  "name": "SemaphoreVerifier",
47
- "address": "0x3d3df6CFc6BFf68d9693e097F32bF4a9903E77a5",
48
- "startBlock": 9663266
47
+ "address": "0xe538f9DeeE04A397decb1E7dc5D16fD6f123c043",
48
+ "startBlock": 14757931
49
49
  },
50
50
  {
51
51
  "name": "PoseidonT3",
52
- "address": "0x5f4edC58142f4395D1D536e793137A0252dA5a49",
53
- "startBlock": 9663266
52
+ "address": "0xB43122Ecb241DD50062641f089876679fd06599a",
53
+ "startBlock": 14757931
54
54
  },
55
55
  {
56
56
  "name": "Semaphore",
57
- "address": "0x181B7f34538cE3BceC68597d4A212aB3f7881648",
58
- "startBlock": 9663266
57
+ "address": "0x1e0d7FF1610e480fC93BdEC510811ea2Ba6d7c2f",
58
+ "startBlock": 14757931
59
59
  }
60
60
  ]
61
61
  },
62
62
  {
63
- "network": "matic-mumbai",
63
+ "network": "matic-amoy",
64
64
  "contracts": [
65
65
  {
66
66
  "name": "SemaphoreVerifier",
67
- "address": "0xE5269ae1E996C6FEEf6E832c7032401E73087568",
68
- "startBlock": 47356015
67
+ "address": "0xe538f9DeeE04A397decb1E7dc5D16fD6f123c043",
68
+ "startBlock": 9636193
69
69
  },
70
70
  {
71
71
  "name": "PoseidonT3",
72
- "address": "0xC0ae1a8D3505B2bE9DCe0e826abd722Afd13F1c9",
73
- "startBlock": 47356015
72
+ "address": "0xB43122Ecb241DD50062641f089876679fd06599a",
73
+ "startBlock": 9636193
74
74
  },
75
75
  {
76
76
  "name": "Semaphore",
77
- "address": "0x346a936b19071b2f619200848B8ADbb938D72250",
78
- "startBlock": 47356015
77
+ "address": "0x1e0d7FF1610e480fC93BdEC510811ea2Ba6d7c2f",
78
+ "startBlock": 9636193
79
79
  }
80
80
  ]
81
81
  }
@@ -17,10 +17,10 @@ export default {
17
17
  chainId: 11155420,
18
18
  explorer: "https://sepolia-optimism.etherscan.io"
19
19
  },
20
- "matic-mumbai": {
21
- name: "Matic Mumbai",
22
- url: "https://rpc-mumbai.polygon.technology",
23
- chainId: 80001,
24
- explorer: "https://mumbai.polygonscan.com"
20
+ "matic-amoy": {
21
+ name: "Matic Amoy",
22
+ url: "https://rpc-amoy.polygon.technology",
23
+ chainId: 80002,
24
+ explorer: "https://amoy.polygonscan.com"
25
25
  }
26
26
  }