@semaphore-protocol/utils 4.0.3 → 4.2.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.
- package/README.md +1 -1
- package/dist/index.cjs +131 -1
- package/dist/index.js +131 -1
- package/dist/lib.commonjs/constants.cjs +1 -1
- package/dist/lib.commonjs/decode-message.cjs +1 -1
- package/dist/lib.commonjs/index.cjs +1 -1
- package/dist/lib.commonjs/networks/deployed-contracts.json.cjs +101 -1
- package/dist/lib.commonjs/networks/index.cjs +1 -1
- package/dist/lib.commonjs/networks/supported-networks.cjs +31 -1
- package/dist/lib.commonjs/semaphore-interface.json.cjs +1 -1
- package/dist/lib.esm/constants.js +1 -1
- package/dist/lib.esm/decode-message.js +1 -1
- package/dist/lib.esm/index.js +1 -1
- package/dist/lib.esm/networks/deployed-contracts.json.js +101 -1
- package/dist/lib.esm/networks/index.js +1 -1
- package/dist/lib.esm/networks/supported-networks.js +31 -1
- package/dist/lib.esm/semaphore-interface.json.js +1 -1
- package/dist/types/networks/supported-networks.d.ts +30 -0
- package/package.json +1 -1
- package/src/networks/deployed-contracts.json +100 -0
- package/src/networks/supported-networks.ts +30 -0
- package/src/semaphore-abi.json +0 -884
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module @semaphore-protocol/utils
|
|
3
|
-
* @version 4.0
|
|
3
|
+
* @version 4.2.0
|
|
4
4
|
* @file A library to provide utility functions to the other Semaphore packages.
|
|
5
5
|
* @copyright Ethereum Foundation 2024
|
|
6
6
|
* @license MIT
|
|
@@ -19,17 +19,47 @@ var supportedNetworks = {
|
|
|
19
19
|
chainId: 421614,
|
|
20
20
|
explorer: "https://sepolia.arbiscan.io"
|
|
21
21
|
},
|
|
22
|
+
arbitrum: {
|
|
23
|
+
name: "Arbitrum",
|
|
24
|
+
url: "https://arb1.arbitrum.io/rpc",
|
|
25
|
+
chainId: 42161,
|
|
26
|
+
explorer: "https://arbiscan.io"
|
|
27
|
+
},
|
|
22
28
|
"optimism-sepolia": {
|
|
23
29
|
name: "Optimism Sepolia",
|
|
24
30
|
url: "https://sepolia.optimism.io",
|
|
25
31
|
chainId: 11155420,
|
|
26
32
|
explorer: "https://sepolia-optimism.etherscan.io"
|
|
27
33
|
},
|
|
34
|
+
optimism: {
|
|
35
|
+
name: "Optimism",
|
|
36
|
+
url: "https://mainnet.optimism.io ",
|
|
37
|
+
chainId: 10,
|
|
38
|
+
explorer: "https://optimistic.etherscan.io"
|
|
39
|
+
},
|
|
28
40
|
"matic-amoy": {
|
|
29
41
|
name: "Matic Amoy",
|
|
30
42
|
url: "https://rpc-amoy.polygon.technology",
|
|
31
43
|
chainId: 80002,
|
|
32
44
|
explorer: "https://amoy.polygonscan.com"
|
|
45
|
+
},
|
|
46
|
+
matic: {
|
|
47
|
+
name: "Matic",
|
|
48
|
+
url: "https://polygon-rpc.com",
|
|
49
|
+
chainId: 137,
|
|
50
|
+
explorer: "https://polygonscan.com"
|
|
51
|
+
},
|
|
52
|
+
"base-sepolia": {
|
|
53
|
+
name: "Base Sepolia",
|
|
54
|
+
url: "https://sepolia.base.org",
|
|
55
|
+
chainId: 84532,
|
|
56
|
+
explorer: "https://sepolia.basescan.org"
|
|
57
|
+
},
|
|
58
|
+
"linea-sepolia": {
|
|
59
|
+
name: "Linea Sepolia",
|
|
60
|
+
url: "https://rpc.sepolia.linea.build",
|
|
61
|
+
chainId: 59141,
|
|
62
|
+
explorer: "https://sepolia.lineascan.build"
|
|
33
63
|
}
|
|
34
64
|
};
|
|
35
65
|
|
|
@@ -11,17 +11,47 @@ declare const _default: {
|
|
|
11
11
|
chainId: number;
|
|
12
12
|
explorer: string;
|
|
13
13
|
};
|
|
14
|
+
arbitrum: {
|
|
15
|
+
name: string;
|
|
16
|
+
url: string;
|
|
17
|
+
chainId: number;
|
|
18
|
+
explorer: string;
|
|
19
|
+
};
|
|
14
20
|
"optimism-sepolia": {
|
|
15
21
|
name: string;
|
|
16
22
|
url: string;
|
|
17
23
|
chainId: number;
|
|
18
24
|
explorer: string;
|
|
19
25
|
};
|
|
26
|
+
optimism: {
|
|
27
|
+
name: string;
|
|
28
|
+
url: string;
|
|
29
|
+
chainId: number;
|
|
30
|
+
explorer: string;
|
|
31
|
+
};
|
|
20
32
|
"matic-amoy": {
|
|
21
33
|
name: string;
|
|
22
34
|
url: string;
|
|
23
35
|
chainId: number;
|
|
24
36
|
explorer: string;
|
|
25
37
|
};
|
|
38
|
+
matic: {
|
|
39
|
+
name: string;
|
|
40
|
+
url: string;
|
|
41
|
+
chainId: number;
|
|
42
|
+
explorer: string;
|
|
43
|
+
};
|
|
44
|
+
"base-sepolia": {
|
|
45
|
+
name: string;
|
|
46
|
+
url: string;
|
|
47
|
+
chainId: number;
|
|
48
|
+
explorer: string;
|
|
49
|
+
};
|
|
50
|
+
"linea-sepolia": {
|
|
51
|
+
name: string;
|
|
52
|
+
url: string;
|
|
53
|
+
chainId: number;
|
|
54
|
+
explorer: string;
|
|
55
|
+
};
|
|
26
56
|
};
|
|
27
57
|
export default _default;
|
package/package.json
CHANGED
|
@@ -78,5 +78,105 @@
|
|
|
78
78
|
"startBlock": 9636193
|
|
79
79
|
}
|
|
80
80
|
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"network": "arbitrum",
|
|
84
|
+
"contracts": [
|
|
85
|
+
{
|
|
86
|
+
"name": "SemaphoreVerifier",
|
|
87
|
+
"address": "0xe538f9DeeE04A397decb1E7dc5D16fD6f123c043",
|
|
88
|
+
"startBlock": 258951463
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "PoseidonT3",
|
|
92
|
+
"address": "0xB43122Ecb241DD50062641f089876679fd06599a",
|
|
93
|
+
"startBlock": 258951463
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "Semaphore",
|
|
97
|
+
"address": "0x1e0d7FF1610e480fC93BdEC510811ea2Ba6d7c2f",
|
|
98
|
+
"startBlock": 258951463
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"network": "matic",
|
|
104
|
+
"contracts": [
|
|
105
|
+
{
|
|
106
|
+
"name": "SemaphoreVerifier",
|
|
107
|
+
"address": "0xe538f9DeeE04A397decb1E7dc5D16fD6f123c043",
|
|
108
|
+
"startBlock": 62466952
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "PoseidonT3",
|
|
112
|
+
"address": "0xB43122Ecb241DD50062641f089876679fd06599a",
|
|
113
|
+
"startBlock": 62466952
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "Semaphore",
|
|
117
|
+
"address": "0x1e0d7FF1610e480fC93BdEC510811ea2Ba6d7c2f",
|
|
118
|
+
"startBlock": 62466952
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"network": "optimism",
|
|
124
|
+
"contracts": [
|
|
125
|
+
{
|
|
126
|
+
"name": "SemaphoreVerifier",
|
|
127
|
+
"address": "0xe538f9DeeE04A397decb1E7dc5D16fD6f123c043",
|
|
128
|
+
"startBlock": 126057798
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "PoseidonT3",
|
|
132
|
+
"address": "0xB43122Ecb241DD50062641f089876679fd06599a",
|
|
133
|
+
"startBlock": 126057798
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "Semaphore",
|
|
137
|
+
"address": "0x1e0d7FF1610e480fC93BdEC510811ea2Ba6d7c2f",
|
|
138
|
+
"startBlock": 126057798
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"network": "base-sepolia",
|
|
144
|
+
"contracts": [
|
|
145
|
+
{
|
|
146
|
+
"name": "SemaphoreVerifier",
|
|
147
|
+
"address": "0xe538f9DeeE04A397decb1E7dc5D16fD6f123c043",
|
|
148
|
+
"startBlock": 16008294
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "PoseidonT3",
|
|
152
|
+
"address": "0xB43122Ecb241DD50062641f089876679fd06599a",
|
|
153
|
+
"startBlock": 16008294
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "Semaphore",
|
|
157
|
+
"address": "0x1e0d7FF1610e480fC93BdEC510811ea2Ba6d7c2f",
|
|
158
|
+
"startBlock": 16008294
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"network": "linea-sepolia",
|
|
164
|
+
"contracts": [
|
|
165
|
+
{
|
|
166
|
+
"name": "SemaphoreVerifier",
|
|
167
|
+
"address": "0xe538f9DeeE04A397decb1E7dc5D16fD6f123c043",
|
|
168
|
+
"startBlock": 3928632
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "PoseidonT3",
|
|
172
|
+
"address": "0xB43122Ecb241DD50062641f089876679fd06599a",
|
|
173
|
+
"startBlock": 3928632
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "Semaphore",
|
|
177
|
+
"address": "0x1e0d7FF1610e480fC93BdEC510811ea2Ba6d7c2f",
|
|
178
|
+
"startBlock": 3928632
|
|
179
|
+
}
|
|
180
|
+
]
|
|
81
181
|
}
|
|
82
182
|
]
|
|
@@ -11,16 +11,46 @@ export default {
|
|
|
11
11
|
chainId: 421614,
|
|
12
12
|
explorer: "https://sepolia.arbiscan.io"
|
|
13
13
|
},
|
|
14
|
+
arbitrum: {
|
|
15
|
+
name: "Arbitrum",
|
|
16
|
+
url: "https://arb1.arbitrum.io/rpc",
|
|
17
|
+
chainId: 42161,
|
|
18
|
+
explorer: "https://arbiscan.io"
|
|
19
|
+
},
|
|
14
20
|
"optimism-sepolia": {
|
|
15
21
|
name: "Optimism Sepolia",
|
|
16
22
|
url: "https://sepolia.optimism.io",
|
|
17
23
|
chainId: 11155420,
|
|
18
24
|
explorer: "https://sepolia-optimism.etherscan.io"
|
|
19
25
|
},
|
|
26
|
+
optimism: {
|
|
27
|
+
name: "Optimism",
|
|
28
|
+
url: "https://mainnet.optimism.io ",
|
|
29
|
+
chainId: 10,
|
|
30
|
+
explorer: "https://optimistic.etherscan.io"
|
|
31
|
+
},
|
|
20
32
|
"matic-amoy": {
|
|
21
33
|
name: "Matic Amoy",
|
|
22
34
|
url: "https://rpc-amoy.polygon.technology",
|
|
23
35
|
chainId: 80002,
|
|
24
36
|
explorer: "https://amoy.polygonscan.com"
|
|
37
|
+
},
|
|
38
|
+
matic: {
|
|
39
|
+
name: "Matic",
|
|
40
|
+
url: "https://polygon-rpc.com",
|
|
41
|
+
chainId: 137,
|
|
42
|
+
explorer: "https://polygonscan.com"
|
|
43
|
+
},
|
|
44
|
+
"base-sepolia": {
|
|
45
|
+
name: "Base Sepolia",
|
|
46
|
+
url: "https://sepolia.base.org",
|
|
47
|
+
chainId: 84532,
|
|
48
|
+
explorer: "https://sepolia.basescan.org"
|
|
49
|
+
},
|
|
50
|
+
"linea-sepolia": {
|
|
51
|
+
name: "Linea Sepolia",
|
|
52
|
+
url: "https://rpc.sepolia.linea.build",
|
|
53
|
+
chainId: 59141,
|
|
54
|
+
explorer: "https://sepolia.lineascan.build"
|
|
25
55
|
}
|
|
26
56
|
}
|