@snapshot-labs/snapshot.js 0.3.90 → 0.3.93

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/dist/client.d.ts CHANGED
@@ -7,10 +7,9 @@ export default class Client {
7
7
  getSpaces(): Promise<unknown>;
8
8
  broadcast(web3: Web3Provider, account: string, space: string, type: string, payload: any): Promise<unknown>;
9
9
  sign(web3: Web3Provider, account: string, space: string, type: string, payload: any): Promise<any>;
10
- vote(web3: Web3Provider, address: string, space: any, { proposal, choice, metadata }: {
10
+ vote(web3: Web3Provider, address: string, space: any, { proposal, choice }: {
11
11
  proposal: any;
12
12
  choice: any;
13
- metadata?: {} | undefined;
14
13
  }): Promise<unknown>;
15
14
  proposal(web3: Web3Provider, address: string, space: string, { name, body, discussion, choices, start, end, snapshot, type, metadata }: {
16
15
  name: any;
@@ -17,9 +17,7 @@ export interface Proposal {
17
17
  end: number;
18
18
  snapshot: number;
19
19
  network: string;
20
- strategies: string;
21
20
  plugins: string;
22
- metadata: string;
23
21
  }
24
22
  export interface CancelProposal {
25
23
  from?: string;
@@ -34,7 +32,6 @@ export interface Vote {
34
32
  proposal: string;
35
33
  type: string;
36
34
  choice: number | number[] | string;
37
- metadata: string;
38
35
  }
39
36
  export interface Follow {
40
37
  from?: string;
@@ -129,9 +129,7 @@ var proposalTypes = {
129
129
  { name: 'end', type: 'uint64' },
130
130
  { name: 'snapshot', type: 'uint64' },
131
131
  { name: 'network', type: 'string' },
132
- { name: 'strategies', type: 'string' },
133
- { name: 'plugins', type: 'string' },
134
- { name: 'metadata', type: 'string' }
132
+ { name: 'plugins', type: 'string' }
135
133
  ]
136
134
  };
137
135
  var cancelProposalTypes = {
@@ -156,8 +154,7 @@ var voteTypes = {
156
154
  { name: 'space', type: 'string' },
157
155
  { name: 'timestamp', type: 'uint64' },
158
156
  { name: 'proposal', type: 'string' },
159
- { name: 'choice', type: 'uint32' },
160
- { name: 'metadata', type: 'string' }
157
+ { name: 'choice', type: 'uint32' }
161
158
  ]
162
159
  };
163
160
  var voteArrayTypes = {
@@ -166,8 +163,7 @@ var voteArrayTypes = {
166
163
  { name: 'space', type: 'string' },
167
164
  { name: 'timestamp', type: 'uint64' },
168
165
  { name: 'proposal', type: 'string' },
169
- { name: 'choice', type: 'uint32[]' },
170
- { name: 'metadata', type: 'string' }
166
+ { name: 'choice', type: 'uint32[]' }
171
167
  ]
172
168
  };
173
169
  var voteStringTypes = {
@@ -176,8 +172,7 @@ var voteStringTypes = {
176
172
  { name: 'space', type: 'string' },
177
173
  { name: 'timestamp', type: 'uint64' },
178
174
  { name: 'proposal', type: 'string' },
179
- { name: 'choice', type: 'string' },
180
- { name: 'metadata', type: 'string' }
175
+ { name: 'choice', type: 'string' }
181
176
  ]
182
177
  };
183
178
  var vote2Types = {
@@ -186,8 +181,7 @@ var vote2Types = {
186
181
  { name: 'space', type: 'string' },
187
182
  { name: 'timestamp', type: 'uint64' },
188
183
  { name: 'proposal', type: 'bytes32' },
189
- { name: 'choice', type: 'uint32' },
190
- { name: 'metadata', type: 'string' }
184
+ { name: 'choice', type: 'uint32' }
191
185
  ]
192
186
  };
193
187
  var voteArray2Types = {
@@ -196,8 +190,7 @@ var voteArray2Types = {
196
190
  { name: 'space', type: 'string' },
197
191
  { name: 'timestamp', type: 'uint64' },
198
192
  { name: 'proposal', type: 'bytes32' },
199
- { name: 'choice', type: 'uint32[]' },
200
- { name: 'metadata', type: 'string' }
193
+ { name: 'choice', type: 'uint32[]' }
201
194
  ]
202
195
  };
203
196
  var voteString2Types = {
@@ -206,8 +199,7 @@ var voteString2Types = {
206
199
  { name: 'space', type: 'string' },
207
200
  { name: 'timestamp', type: 'uint64' },
208
201
  { name: 'proposal', type: 'bytes32' },
209
- { name: 'choice', type: 'string' },
210
- { name: 'metadata', type: 'string' }
202
+ { name: 'choice', type: 'string' }
211
203
  ]
212
204
  };
213
205
  var followTypes = {
@@ -558,13 +550,12 @@ var Client$1 = /** @class */ (function () {
558
550
  });
559
551
  };
560
552
  Client.prototype.vote = function (web3, address, space, _a) {
561
- var proposal = _a.proposal, choice = _a.choice, _b = _a.metadata, metadata = _b === void 0 ? {} : _b;
553
+ var proposal = _a.proposal, choice = _a.choice;
562
554
  return __awaiter(this, void 0, void 0, function () {
563
- return __generator(this, function (_c) {
555
+ return __generator(this, function (_b) {
564
556
  return [2 /*return*/, this.broadcast(web3, address, space, 'vote', {
565
557
  proposal: proposal,
566
- choice: choice,
567
- metadata: metadata
558
+ choice: choice
568
559
  })];
569
560
  });
570
561
  });
@@ -1816,6 +1807,21 @@ var networks = {
1816
1807
  explorer: "http://scan.rupx.io",
1817
1808
  start: 2762929,
1818
1809
  logo: "ipfs://QmXLZyAr6UNFQ4tkNwSyeNByFvzwYpwiNgV5vHuoxn74Rg"
1810
+ },
1811
+ "534": {
1812
+ key: "534",
1813
+ name: "Candle",
1814
+ shortName: "CNDL",
1815
+ chainId: 534,
1816
+ network: "mainnet",
1817
+ multicall: "0x4A21871491adC2C429F9903918C306c97dd295A3",
1818
+ rpc: [
1819
+ "https://rpc.cndlchain.com",
1820
+ "https://candle-rpc.com"
1821
+ ],
1822
+ explorer: "http://candleexplorer.com",
1823
+ start: 800000,
1824
+ logo: "ipfs://Qmbe3ChumXNRfHcLsNBY2APRrGxkFWP68Nb35MaKMRfPye"
1819
1825
  },
1820
1826
  "592": {
1821
1827
  key: "592",
@@ -1967,6 +1973,21 @@ var networks = {
1967
1973
  explorer: "https://moonbase-blockscout.testnet.moonbeam.network",
1968
1974
  start: 859041,
1969
1975
  logo: "ipfs://QmeGbNTU2Jqwg8qLTMGW8n8HSi2VdgCncAaeGzLx6gYnD7"
1976
+ },
1977
+ "1818": {
1978
+ key: "1818",
1979
+ name: "Cubechain mainnet",
1980
+ shortName: "cube",
1981
+ chainId: 1818,
1982
+ network: "mainnet",
1983
+ testnet: false,
1984
+ multicall: "0x28d2ebdb36369db1c51355cdc0898754d1a1c3c5",
1985
+ rpc: [
1986
+ "https://http-mainnet-archive.cube.network"
1987
+ ],
1988
+ explorer: "https://www.cubescan.network",
1989
+ start: 0,
1990
+ logo: "ipfs://QmbENgHTymTUUArX5MZ2XXH69WGenirU3oamkRD448hYdz"
1970
1991
  },
1971
1992
  "1819": {
1972
1993
  key: "1819",
@@ -2072,6 +2093,22 @@ var networks = {
2072
2093
  explorer: "https://bx.shyft.network",
2073
2094
  start: 3673983,
2074
2095
  logo: "ipfs://QmUkFZC2ZmoYPTKf7AHdjwRPZoV2h1MCuHaGM4iu8SNFpi"
2096
+ },
2097
+ "8217": {
2098
+ key: "8217",
2099
+ name: "Klaytn Mainnet Cypress",
2100
+ shortName: "Cypress",
2101
+ chainId: 8217,
2102
+ network: "mainnet",
2103
+ multicall: "0x5f5f0d1b9ff8b3dcace308e39b13b203354906e9",
2104
+ rpc: [
2105
+ "https://cypress.fandom.finance/archive"
2106
+ ],
2107
+ ws: [
2108
+ "wss://cypress.fandom.finance/archive/ws"
2109
+ ],
2110
+ explorer: "https://scope.klaytn.com/",
2111
+ logo: "ipfs://QmYACyZcidcFtMo4Uf9H6ZKUxTP2TQPjGzNjcUjqYa64dt"
2075
2112
  },
2076
2113
  "10000": {
2077
2114
  key: "10000",
@@ -2175,6 +2212,20 @@ var networks = {
2175
2212
  explorer: "https://explorer.emerald.oasis.dev",
2176
2213
  start: 176517,
2177
2214
  logo: "ipfs://QmQrZjZZyAcQmPXJM2cUh1KaaDeM8Sfcg3HnvZpBj8wTnG"
2215
+ },
2216
+ "43113": {
2217
+ key: "43113",
2218
+ name: "Avalanche FUJI Testnet",
2219
+ chainId: 43113,
2220
+ network: "testnet",
2221
+ testnet: true,
2222
+ multicall: "0x984476ea55e32e785A9D8FF14329f99D74E3d2A2",
2223
+ rpc: [
2224
+ "https://api.avax-test.network/ext/bc/C/rpc"
2225
+ ],
2226
+ explorer: "https://testnet.snowtrace.io",
2227
+ start: 10528153,
2228
+ logo: "ipfs://QmeS75uS7XLR8o8uUzhLRVYPX9vMFf4DXgKxQeCzyy7vM2"
2178
2229
  },
2179
2230
  "43114": {
2180
2231
  key: "43114",
@@ -120,9 +120,7 @@ var proposalTypes = {
120
120
  { name: 'end', type: 'uint64' },
121
121
  { name: 'snapshot', type: 'uint64' },
122
122
  { name: 'network', type: 'string' },
123
- { name: 'strategies', type: 'string' },
124
- { name: 'plugins', type: 'string' },
125
- { name: 'metadata', type: 'string' }
123
+ { name: 'plugins', type: 'string' }
126
124
  ]
127
125
  };
128
126
  var cancelProposalTypes = {
@@ -147,8 +145,7 @@ var voteTypes = {
147
145
  { name: 'space', type: 'string' },
148
146
  { name: 'timestamp', type: 'uint64' },
149
147
  { name: 'proposal', type: 'string' },
150
- { name: 'choice', type: 'uint32' },
151
- { name: 'metadata', type: 'string' }
148
+ { name: 'choice', type: 'uint32' }
152
149
  ]
153
150
  };
154
151
  var voteArrayTypes = {
@@ -157,8 +154,7 @@ var voteArrayTypes = {
157
154
  { name: 'space', type: 'string' },
158
155
  { name: 'timestamp', type: 'uint64' },
159
156
  { name: 'proposal', type: 'string' },
160
- { name: 'choice', type: 'uint32[]' },
161
- { name: 'metadata', type: 'string' }
157
+ { name: 'choice', type: 'uint32[]' }
162
158
  ]
163
159
  };
164
160
  var voteStringTypes = {
@@ -167,8 +163,7 @@ var voteStringTypes = {
167
163
  { name: 'space', type: 'string' },
168
164
  { name: 'timestamp', type: 'uint64' },
169
165
  { name: 'proposal', type: 'string' },
170
- { name: 'choice', type: 'string' },
171
- { name: 'metadata', type: 'string' }
166
+ { name: 'choice', type: 'string' }
172
167
  ]
173
168
  };
174
169
  var vote2Types = {
@@ -177,8 +172,7 @@ var vote2Types = {
177
172
  { name: 'space', type: 'string' },
178
173
  { name: 'timestamp', type: 'uint64' },
179
174
  { name: 'proposal', type: 'bytes32' },
180
- { name: 'choice', type: 'uint32' },
181
- { name: 'metadata', type: 'string' }
175
+ { name: 'choice', type: 'uint32' }
182
176
  ]
183
177
  };
184
178
  var voteArray2Types = {
@@ -187,8 +181,7 @@ var voteArray2Types = {
187
181
  { name: 'space', type: 'string' },
188
182
  { name: 'timestamp', type: 'uint64' },
189
183
  { name: 'proposal', type: 'bytes32' },
190
- { name: 'choice', type: 'uint32[]' },
191
- { name: 'metadata', type: 'string' }
184
+ { name: 'choice', type: 'uint32[]' }
192
185
  ]
193
186
  };
194
187
  var voteString2Types = {
@@ -197,8 +190,7 @@ var voteString2Types = {
197
190
  { name: 'space', type: 'string' },
198
191
  { name: 'timestamp', type: 'uint64' },
199
192
  { name: 'proposal', type: 'bytes32' },
200
- { name: 'choice', type: 'string' },
201
- { name: 'metadata', type: 'string' }
193
+ { name: 'choice', type: 'string' }
202
194
  ]
203
195
  };
204
196
  var followTypes = {
@@ -549,13 +541,12 @@ var Client$1 = /** @class */ (function () {
549
541
  });
550
542
  };
551
543
  Client.prototype.vote = function (web3, address, space, _a) {
552
- var proposal = _a.proposal, choice = _a.choice, _b = _a.metadata, metadata = _b === void 0 ? {} : _b;
544
+ var proposal = _a.proposal, choice = _a.choice;
553
545
  return __awaiter(this, void 0, void 0, function () {
554
- return __generator(this, function (_c) {
546
+ return __generator(this, function (_b) {
555
547
  return [2 /*return*/, this.broadcast(web3, address, space, 'vote', {
556
548
  proposal: proposal,
557
- choice: choice,
558
- metadata: metadata
549
+ choice: choice
559
550
  })];
560
551
  });
561
552
  });
@@ -1807,6 +1798,21 @@ var networks = {
1807
1798
  explorer: "http://scan.rupx.io",
1808
1799
  start: 2762929,
1809
1800
  logo: "ipfs://QmXLZyAr6UNFQ4tkNwSyeNByFvzwYpwiNgV5vHuoxn74Rg"
1801
+ },
1802
+ "534": {
1803
+ key: "534",
1804
+ name: "Candle",
1805
+ shortName: "CNDL",
1806
+ chainId: 534,
1807
+ network: "mainnet",
1808
+ multicall: "0x4A21871491adC2C429F9903918C306c97dd295A3",
1809
+ rpc: [
1810
+ "https://rpc.cndlchain.com",
1811
+ "https://candle-rpc.com"
1812
+ ],
1813
+ explorer: "http://candleexplorer.com",
1814
+ start: 800000,
1815
+ logo: "ipfs://Qmbe3ChumXNRfHcLsNBY2APRrGxkFWP68Nb35MaKMRfPye"
1810
1816
  },
1811
1817
  "592": {
1812
1818
  key: "592",
@@ -1958,6 +1964,21 @@ var networks = {
1958
1964
  explorer: "https://moonbase-blockscout.testnet.moonbeam.network",
1959
1965
  start: 859041,
1960
1966
  logo: "ipfs://QmeGbNTU2Jqwg8qLTMGW8n8HSi2VdgCncAaeGzLx6gYnD7"
1967
+ },
1968
+ "1818": {
1969
+ key: "1818",
1970
+ name: "Cubechain mainnet",
1971
+ shortName: "cube",
1972
+ chainId: 1818,
1973
+ network: "mainnet",
1974
+ testnet: false,
1975
+ multicall: "0x28d2ebdb36369db1c51355cdc0898754d1a1c3c5",
1976
+ rpc: [
1977
+ "https://http-mainnet-archive.cube.network"
1978
+ ],
1979
+ explorer: "https://www.cubescan.network",
1980
+ start: 0,
1981
+ logo: "ipfs://QmbENgHTymTUUArX5MZ2XXH69WGenirU3oamkRD448hYdz"
1961
1982
  },
1962
1983
  "1819": {
1963
1984
  key: "1819",
@@ -2063,6 +2084,22 @@ var networks = {
2063
2084
  explorer: "https://bx.shyft.network",
2064
2085
  start: 3673983,
2065
2086
  logo: "ipfs://QmUkFZC2ZmoYPTKf7AHdjwRPZoV2h1MCuHaGM4iu8SNFpi"
2087
+ },
2088
+ "8217": {
2089
+ key: "8217",
2090
+ name: "Klaytn Mainnet Cypress",
2091
+ shortName: "Cypress",
2092
+ chainId: 8217,
2093
+ network: "mainnet",
2094
+ multicall: "0x5f5f0d1b9ff8b3dcace308e39b13b203354906e9",
2095
+ rpc: [
2096
+ "https://cypress.fandom.finance/archive"
2097
+ ],
2098
+ ws: [
2099
+ "wss://cypress.fandom.finance/archive/ws"
2100
+ ],
2101
+ explorer: "https://scope.klaytn.com/",
2102
+ logo: "ipfs://QmYACyZcidcFtMo4Uf9H6ZKUxTP2TQPjGzNjcUjqYa64dt"
2066
2103
  },
2067
2104
  "10000": {
2068
2105
  key: "10000",
@@ -2166,6 +2203,20 @@ var networks = {
2166
2203
  explorer: "https://explorer.emerald.oasis.dev",
2167
2204
  start: 176517,
2168
2205
  logo: "ipfs://QmQrZjZZyAcQmPXJM2cUh1KaaDeM8Sfcg3HnvZpBj8wTnG"
2206
+ },
2207
+ "43113": {
2208
+ key: "43113",
2209
+ name: "Avalanche FUJI Testnet",
2210
+ chainId: 43113,
2211
+ network: "testnet",
2212
+ testnet: true,
2213
+ multicall: "0x984476ea55e32e785A9D8FF14329f99D74E3d2A2",
2214
+ rpc: [
2215
+ "https://api.avax-test.network/ext/bc/C/rpc"
2216
+ ],
2217
+ explorer: "https://testnet.snowtrace.io",
2218
+ start: 10528153,
2219
+ logo: "ipfs://QmeS75uS7XLR8o8uUzhLRVYPX9vMFf4DXgKxQeCzyy7vM2"
2169
2220
  },
2170
2221
  "43114": {
2171
2222
  key: "43114",