@snapshot-labs/snapshot.js 0.4.22 → 0.4.25

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",
@@ -1618,6 +1631,7 @@ var networks = {
1618
1631
  network: "goerli",
1619
1632
  testnet: true,
1620
1633
  multicall: "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e",
1634
+ ensResolver: "0x4B1488B7a6B320d2D721406204aBc3eeAa9AD329",
1621
1635
  rpc: [
1622
1636
  "https://eth-goerli.alchemyapi.io/v2/v4nqH_J-J3STit45Mm07TxuYexMHQsYZ"
1623
1637
  ],
@@ -3026,6 +3040,21 @@ var networks = {
3026
3040
  explorer: "https://explorer.palm.io",
3027
3041
  start: 1172267,
3028
3042
  logo: "ipfs://QmaYQfjLfQpyRWZZZU1BE8X352rXEjNaNeahjvf1aHZrKY"
3043
+ },
3044
+ "11297108099": {
3045
+ key: "11297108099",
3046
+ name: "Palm Testnet",
3047
+ shortName: "Palm",
3048
+ testnet: true,
3049
+ chainId: 11297108099,
3050
+ network: "testnet",
3051
+ multicall: "0x020D24E0b91Fa18Aade990dCEc7F21dcc8e5d174",
3052
+ rpc: [
3053
+ "https://palm-testnet.infura.io/v3/e504875614714d3aac7061d4a197b190"
3054
+ ],
3055
+ explorer: "https://explorer.palm-uat.xyz/",
3056
+ start: 7282345,
3057
+ logo: "ipfs://QmRHB9TqMdVHY392vYiv8sTJ7VHShkq5FT6nS9fPuUNBf1"
3029
3058
  }
3030
3059
  };
3031
3060
 
@@ -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",
@@ -1609,6 +1622,7 @@ var networks = {
1609
1622
  network: "goerli",
1610
1623
  testnet: true,
1611
1624
  multicall: "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e",
1625
+ ensResolver: "0x4B1488B7a6B320d2D721406204aBc3eeAa9AD329",
1612
1626
  rpc: [
1613
1627
  "https://eth-goerli.alchemyapi.io/v2/v4nqH_J-J3STit45Mm07TxuYexMHQsYZ"
1614
1628
  ],
@@ -3017,6 +3031,21 @@ var networks = {
3017
3031
  explorer: "https://explorer.palm.io",
3018
3032
  start: 1172267,
3019
3033
  logo: "ipfs://QmaYQfjLfQpyRWZZZU1BE8X352rXEjNaNeahjvf1aHZrKY"
3034
+ },
3035
+ "11297108099": {
3036
+ key: "11297108099",
3037
+ name: "Palm Testnet",
3038
+ shortName: "Palm",
3039
+ testnet: true,
3040
+ chainId: 11297108099,
3041
+ network: "testnet",
3042
+ multicall: "0x020D24E0b91Fa18Aade990dCEc7F21dcc8e5d174",
3043
+ rpc: [
3044
+ "https://palm-testnet.infura.io/v3/e504875614714d3aac7061d4a197b190"
3045
+ ],
3046
+ explorer: "https://explorer.palm-uat.xyz/",
3047
+ start: 7282345,
3048
+ logo: "ipfs://QmRHB9TqMdVHY392vYiv8sTJ7VHShkq5FT6nS9fPuUNBf1"
3020
3049
  }
3021
3050
  };
3022
3051