@snapshot-labs/snapshot.js 0.4.23 → 0.4.26

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/index.d.ts CHANGED
@@ -388,6 +388,11 @@ declare const _default: {
388
388
  type: string;
389
389
  title: string;
390
390
  };
391
+ reason: {
392
+ type: string;
393
+ title: string;
394
+ maxLength: number;
395
+ };
391
396
  app: {
392
397
  type: string;
393
398
  title: string;
@@ -383,6 +383,11 @@ declare const _default: {
383
383
  type: string;
384
384
  title: string;
385
385
  };
386
+ reason: {
387
+ type: string;
388
+ title: string;
389
+ maxLength: number;
390
+ };
386
391
  app: {
387
392
  type: string;
388
393
  title: string;
@@ -34,6 +34,7 @@ export interface Vote {
34
34
  type: ProposalType;
35
35
  choice: number | number[] | string;
36
36
  privacy?: string;
37
+ reason?: string;
37
38
  app?: string;
38
39
  }
39
40
  export interface Follow {
@@ -155,6 +155,7 @@ var voteTypes = {
155
155
  { name: 'timestamp', type: 'uint64' },
156
156
  { name: 'proposal', type: 'string' },
157
157
  { name: 'choice', type: 'uint32' },
158
+ { name: 'reason', type: 'string' },
158
159
  { name: 'app', type: 'string' }
159
160
  ]
160
161
  };
@@ -165,6 +166,7 @@ var voteArrayTypes = {
165
166
  { name: 'timestamp', type: 'uint64' },
166
167
  { name: 'proposal', type: 'string' },
167
168
  { name: 'choice', type: 'uint32[]' },
169
+ { name: 'reason', type: 'string' },
168
170
  { name: 'app', type: 'string' }
169
171
  ]
170
172
  };
@@ -175,6 +177,7 @@ var voteStringTypes = {
175
177
  { name: 'timestamp', type: 'uint64' },
176
178
  { name: 'proposal', type: 'string' },
177
179
  { name: 'choice', type: 'string' },
180
+ { name: 'reason', type: 'string' },
178
181
  { name: 'app', type: 'string' }
179
182
  ]
180
183
  };
@@ -185,6 +188,7 @@ var vote2Types = {
185
188
  { name: 'timestamp', type: 'uint64' },
186
189
  { name: 'proposal', type: 'bytes32' },
187
190
  { name: 'choice', type: 'uint32' },
191
+ { name: 'reason', type: 'string' },
188
192
  { name: 'app', type: 'string' }
189
193
  ]
190
194
  };
@@ -195,6 +199,7 @@ var voteArray2Types = {
195
199
  { name: 'timestamp', type: 'uint64' },
196
200
  { name: 'proposal', type: 'bytes32' },
197
201
  { name: 'choice', type: 'uint32[]' },
202
+ { name: 'reason', type: 'string' },
198
203
  { name: 'app', type: 'string' }
199
204
  ]
200
205
  };
@@ -205,6 +210,7 @@ var voteString2Types = {
205
210
  { name: 'timestamp', type: 'uint64' },
206
211
  { name: 'proposal', type: 'bytes32' },
207
212
  { name: 'choice', type: 'string' },
213
+ { name: 'reason', type: 'string' },
208
214
  { name: 'app', type: 'string' }
209
215
  ]
210
216
  };
@@ -360,6 +366,8 @@ var Client = /** @class */ (function () {
360
366
  return __generator(this, function (_a) {
361
367
  switch (_a.label) {
362
368
  case 0:
369
+ if (!message.reason)
370
+ message.reason = '';
363
371
  if (!message.app)
364
372
  message.app = '';
365
373
  type2 = message.proposal.startsWith('0x');
@@ -1087,6 +1095,11 @@ var definitions$2 = {
1087
1095
  type: "object",
1088
1096
  title: "metadata"
1089
1097
  },
1098
+ reason: {
1099
+ type: "string",
1100
+ title: "reason",
1101
+ maxLength: 140
1102
+ },
1090
1103
  app: {
1091
1104
  type: "string",
1092
1105
  title: "app",
@@ -2555,6 +2568,20 @@ var networks = {
2555
2568
  explorer: "https://testnet.cubescan.network",
2556
2569
  start: 0,
2557
2570
  logo: "ipfs://QmbENgHTymTUUArX5MZ2XXH69WGenirU3oamkRD448hYdz"
2571
+ },
2572
+ "2000": {
2573
+ key: "2000",
2574
+ name: "Doge Chain",
2575
+ shortName: "dogechain",
2576
+ chainId: 2000,
2577
+ network: "mainnet",
2578
+ multicall: "0x6f9D3f3932B417bd4957585D236Cbc32b32C0BDc",
2579
+ rpc: [
2580
+ "https://rpc.dogechain.dog"
2581
+ ],
2582
+ explorer: "https://explorer.dogechain.dog",
2583
+ start: 877115,
2584
+ logo: "ipfs://bafkreigovfh3pinsdih777issfgaflwu2yjzroljs2642gbvwikcd3nm4i"
2558
2585
  },
2559
2586
  "4689": {
2560
2587
  key: "4689",
@@ -3027,6 +3054,21 @@ var networks = {
3027
3054
  explorer: "https://explorer.palm.io",
3028
3055
  start: 1172267,
3029
3056
  logo: "ipfs://QmaYQfjLfQpyRWZZZU1BE8X352rXEjNaNeahjvf1aHZrKY"
3057
+ },
3058
+ "11297108099": {
3059
+ key: "11297108099",
3060
+ name: "Palm Testnet",
3061
+ shortName: "Palm",
3062
+ testnet: true,
3063
+ chainId: 11297108099,
3064
+ network: "testnet",
3065
+ multicall: "0x020D24E0b91Fa18Aade990dCEc7F21dcc8e5d174",
3066
+ rpc: [
3067
+ "https://palm-testnet.infura.io/v3/e504875614714d3aac7061d4a197b190"
3068
+ ],
3069
+ explorer: "https://explorer.palm-uat.xyz/",
3070
+ start: 7282345,
3071
+ logo: "ipfs://QmRHB9TqMdVHY392vYiv8sTJ7VHShkq5FT6nS9fPuUNBf1"
3030
3072
  }
3031
3073
  };
3032
3074
 
@@ -146,6 +146,7 @@ var voteTypes = {
146
146
  { name: 'timestamp', type: 'uint64' },
147
147
  { name: 'proposal', type: 'string' },
148
148
  { name: 'choice', type: 'uint32' },
149
+ { name: 'reason', type: 'string' },
149
150
  { name: 'app', type: 'string' }
150
151
  ]
151
152
  };
@@ -156,6 +157,7 @@ var voteArrayTypes = {
156
157
  { name: 'timestamp', type: 'uint64' },
157
158
  { name: 'proposal', type: 'string' },
158
159
  { name: 'choice', type: 'uint32[]' },
160
+ { name: 'reason', type: 'string' },
159
161
  { name: 'app', type: 'string' }
160
162
  ]
161
163
  };
@@ -166,6 +168,7 @@ var voteStringTypes = {
166
168
  { name: 'timestamp', type: 'uint64' },
167
169
  { name: 'proposal', type: 'string' },
168
170
  { name: 'choice', type: 'string' },
171
+ { name: 'reason', type: 'string' },
169
172
  { name: 'app', type: 'string' }
170
173
  ]
171
174
  };
@@ -176,6 +179,7 @@ var vote2Types = {
176
179
  { name: 'timestamp', type: 'uint64' },
177
180
  { name: 'proposal', type: 'bytes32' },
178
181
  { name: 'choice', type: 'uint32' },
182
+ { name: 'reason', type: 'string' },
179
183
  { name: 'app', type: 'string' }
180
184
  ]
181
185
  };
@@ -186,6 +190,7 @@ var voteArray2Types = {
186
190
  { name: 'timestamp', type: 'uint64' },
187
191
  { name: 'proposal', type: 'bytes32' },
188
192
  { name: 'choice', type: 'uint32[]' },
193
+ { name: 'reason', type: 'string' },
189
194
  { name: 'app', type: 'string' }
190
195
  ]
191
196
  };
@@ -196,6 +201,7 @@ var voteString2Types = {
196
201
  { name: 'timestamp', type: 'uint64' },
197
202
  { name: 'proposal', type: 'bytes32' },
198
203
  { name: 'choice', type: 'string' },
204
+ { name: 'reason', type: 'string' },
199
205
  { name: 'app', type: 'string' }
200
206
  ]
201
207
  };
@@ -351,6 +357,8 @@ var Client = /** @class */ (function () {
351
357
  return __generator(this, function (_a) {
352
358
  switch (_a.label) {
353
359
  case 0:
360
+ if (!message.reason)
361
+ message.reason = '';
354
362
  if (!message.app)
355
363
  message.app = '';
356
364
  type2 = message.proposal.startsWith('0x');
@@ -1078,6 +1086,11 @@ var definitions$2 = {
1078
1086
  type: "object",
1079
1087
  title: "metadata"
1080
1088
  },
1089
+ reason: {
1090
+ type: "string",
1091
+ title: "reason",
1092
+ maxLength: 140
1093
+ },
1081
1094
  app: {
1082
1095
  type: "string",
1083
1096
  title: "app",
@@ -2546,6 +2559,20 @@ var networks = {
2546
2559
  explorer: "https://testnet.cubescan.network",
2547
2560
  start: 0,
2548
2561
  logo: "ipfs://QmbENgHTymTUUArX5MZ2XXH69WGenirU3oamkRD448hYdz"
2562
+ },
2563
+ "2000": {
2564
+ key: "2000",
2565
+ name: "Doge Chain",
2566
+ shortName: "dogechain",
2567
+ chainId: 2000,
2568
+ network: "mainnet",
2569
+ multicall: "0x6f9D3f3932B417bd4957585D236Cbc32b32C0BDc",
2570
+ rpc: [
2571
+ "https://rpc.dogechain.dog"
2572
+ ],
2573
+ explorer: "https://explorer.dogechain.dog",
2574
+ start: 877115,
2575
+ logo: "ipfs://bafkreigovfh3pinsdih777issfgaflwu2yjzroljs2642gbvwikcd3nm4i"
2549
2576
  },
2550
2577
  "4689": {
2551
2578
  key: "4689",
@@ -3018,6 +3045,21 @@ var networks = {
3018
3045
  explorer: "https://explorer.palm.io",
3019
3046
  start: 1172267,
3020
3047
  logo: "ipfs://QmaYQfjLfQpyRWZZZU1BE8X352rXEjNaNeahjvf1aHZrKY"
3048
+ },
3049
+ "11297108099": {
3050
+ key: "11297108099",
3051
+ name: "Palm Testnet",
3052
+ shortName: "Palm",
3053
+ testnet: true,
3054
+ chainId: 11297108099,
3055
+ network: "testnet",
3056
+ multicall: "0x020D24E0b91Fa18Aade990dCEc7F21dcc8e5d174",
3057
+ rpc: [
3058
+ "https://palm-testnet.infura.io/v3/e504875614714d3aac7061d4a197b190"
3059
+ ],
3060
+ explorer: "https://explorer.palm-uat.xyz/",
3061
+ start: 7282345,
3062
+ logo: "ipfs://QmRHB9TqMdVHY392vYiv8sTJ7VHShkq5FT6nS9fPuUNBf1"
3021
3063
  }
3022
3064
  };
3023
3065