@snapshot-labs/snapshot.js 0.12.32 → 0.12.34

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.
@@ -108,6 +108,17 @@ declare const _default: {
108
108
  maxLength: number;
109
109
  format: string;
110
110
  };
111
+ discussions: {
112
+ type: string;
113
+ format: string;
114
+ title: string;
115
+ maxLength: number;
116
+ };
117
+ discourseCategory: {
118
+ type: string;
119
+ minimum: number;
120
+ title: string;
121
+ };
111
122
  strategies: {
112
123
  type: string;
113
124
  minItems: number;
@@ -528,6 +539,10 @@ declare const _default: {
528
539
  title: string;
529
540
  maxLength: number;
530
541
  };
542
+ privacy: {
543
+ type: string;
544
+ enum: string[];
545
+ };
531
546
  };
532
547
  required: string[];
533
548
  additionalProperties: boolean;
@@ -589,6 +604,10 @@ declare const _default: {
589
604
  type: string;
590
605
  title: string;
591
606
  };
607
+ privacy: {
608
+ type: string;
609
+ enum: string[];
610
+ };
592
611
  };
593
612
  required: string[];
594
613
  additionalProperties: boolean;
@@ -104,6 +104,17 @@ declare const _default: {
104
104
  maxLength: number;
105
105
  format: string;
106
106
  };
107
+ discussions: {
108
+ type: string;
109
+ format: string;
110
+ title: string;
111
+ maxLength: number;
112
+ };
113
+ discourseCategory: {
114
+ type: string;
115
+ minimum: number;
116
+ title: string;
117
+ };
107
118
  strategies: {
108
119
  type: string;
109
120
  minItems: number;
@@ -524,6 +535,10 @@ declare const _default: {
524
535
  title: string;
525
536
  maxLength: number;
526
537
  };
538
+ privacy: {
539
+ type: string;
540
+ enum: string[];
541
+ };
527
542
  };
528
543
  required: string[];
529
544
  additionalProperties: boolean;
@@ -585,6 +600,10 @@ declare const _default: {
585
600
  type: string;
586
601
  title: string;
587
602
  };
603
+ privacy: {
604
+ type: string;
605
+ enum: string[];
606
+ };
588
607
  };
589
608
  required: string[];
590
609
  additionalProperties: boolean;
@@ -13,6 +13,7 @@ export interface Proposal {
13
13
  title: string;
14
14
  body: string;
15
15
  discussion: string;
16
+ privacy?: string;
16
17
  choices: string[];
17
18
  labels?: string[];
18
19
  start: number;
@@ -30,6 +31,7 @@ export interface UpdateProposal {
30
31
  title: string;
31
32
  body: string;
32
33
  discussion: string;
34
+ privacy?: string;
33
35
  choices: string[];
34
36
  labels?: string[];
35
37
  plugins: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapshot-labs/snapshot.js",
3
- "version": "0.12.32",
3
+ "version": "0.12.34",
4
4
  "repository": "snapshot-labs/snapshot.js",
5
5
  "license": "MIT",
6
6
  "main": "dist/snapshot.cjs.js",
package/src/networks.json CHANGED
@@ -825,6 +825,20 @@
825
825
  "start": 79164574,
826
826
  "logo": "ipfs://bafkreiammyt7uztbztqbcqv4bydnczsh2fqmnjf6jxj4xnskzzl6sjrigq"
827
827
  },
828
+ "1480": {
829
+ "key": "1480",
830
+ "name": "Islander",
831
+ "shortName": "mainnet",
832
+ "chainId": 1480,
833
+ "network": "mainnet",
834
+ "multicall": "0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",
835
+ "rpc": [],
836
+ "explorer": {
837
+ "url": "https://islander.vanascan.io/"
838
+ },
839
+ "start": 716763,
840
+ "logo": "ipfs://bafkreibotel3dmc5og5rf3tpt7l74awkene7x6q3oxtwhptt4y4rpa7vsa"
841
+ },
828
842
  "1559": {
829
843
  "key": "1559",
830
844
  "name": "Tenet",
@@ -84,6 +84,10 @@
84
84
  "type": "string",
85
85
  "title": "app",
86
86
  "maxLength": 128
87
+ },
88
+ "privacy": {
89
+ "type": "string",
90
+ "enum": ["", "shutter"]
87
91
  }
88
92
  },
89
93
  "required": ["name", "body", "choices", "snapshot", "start", "end"],
@@ -107,6 +107,17 @@
107
107
  "maxLength": 64,
108
108
  "format": "domain"
109
109
  },
110
+ "discussions": {
111
+ "type": "string",
112
+ "format": "uri",
113
+ "title": "Discussions link",
114
+ "maxLength": 256
115
+ },
116
+ "discourseCategory": {
117
+ "type": "integer",
118
+ "minimum": 1,
119
+ "title": "Discourse category"
120
+ },
110
121
  "strategies": {
111
122
  "type": "array",
112
123
  "minItems": 1,
@@ -335,7 +346,7 @@
335
346
  },
336
347
  "privacy": {
337
348
  "type": "string",
338
- "enum": ["", "shutter"]
349
+ "enum": ["", "shutter", "any"]
339
350
  }
340
351
  },
341
352
  "additionalProperties": false
@@ -66,6 +66,10 @@
66
66
  "metadata": {
67
67
  "type": "object",
68
68
  "title": "metadata"
69
+ },
70
+ "privacy": {
71
+ "type": "string",
72
+ "enum": ["", "shutter"]
69
73
  }
70
74
  },
71
75
  "required": ["proposal", "name", "body", "discussion", "choices", "type", "metadata"],
@@ -62,5 +62,7 @@
62
62
  "2ffbebcbd22ef48fd2f4a1182ff1feda7795b57689bd6f0dd73c89e925e7fefb": "profile",
63
63
  "4288d50b713081aae77d60d596d75864bff7acf7791a00183401e58658ee9da5": "statement",
64
64
  "d56782e3b50ac86c25ae292923da8c367e3c9e8e7ea9d8baa435051fe2f430fa": "proposal",
65
- "df10a7eeabe19301d6018be8b6c5d13231320d7ece64d021043fa172b64f3796": "update-proposal"
65
+ "df10a7eeabe19301d6018be8b6c5d13231320d7ece64d021043fa172b64f3796": "update-proposal",
66
+ "beda1f464a6112f9ed6335c4614e32a97f0e18ef4ac10b4b1c8239c475f2d8e8": "proposal",
67
+ "ff74674f39ca59b60056ecddaada0cb513c4729e634e99cb778f53ee404ac806": "update-proposal"
66
68
  }
package/src/sign/index.ts CHANGED
@@ -126,6 +126,7 @@ export default class Client {
126
126
  ) {
127
127
  if (!message.discussion) message.discussion = '';
128
128
  if (!message.app) message.app = '';
129
+ if (!message.privacy) message.privacy = '';
129
130
  return await this.sign(web3, address, message, proposalTypes);
130
131
  }
131
132
 
@@ -134,6 +135,7 @@ export default class Client {
134
135
  address: string,
135
136
  message: UpdateProposal
136
137
  ) {
138
+ if (!message.privacy) message.privacy = '';
137
139
  return await this.sign(web3, address, message, updateProposalTypes);
138
140
  }
139
141
 
package/src/sign/types.ts CHANGED
@@ -21,6 +21,7 @@ export interface Proposal {
21
21
  title: string;
22
22
  body: string;
23
23
  discussion: string;
24
+ privacy?: string;
24
25
  choices: string[];
25
26
  labels?: string[];
26
27
  start: number;
@@ -39,6 +40,7 @@ export interface UpdateProposal {
39
40
  title: string;
40
41
  body: string;
41
42
  discussion: string;
43
+ privacy?: string;
42
44
  choices: string[];
43
45
  labels?: string[];
44
46
  plugins: string;
@@ -150,6 +152,7 @@ export const proposalTypes = {
150
152
  { name: 'end', type: 'uint64' },
151
153
  { name: 'snapshot', type: 'uint64' },
152
154
  { name: 'plugins', type: 'string' },
155
+ { name: 'privacy', type: 'string' },
153
156
  { name: 'app', type: 'string' }
154
157
  ]
155
158
  };
@@ -166,7 +169,8 @@ export const updateProposalTypes = {
166
169
  { name: 'discussion', type: 'string' },
167
170
  { name: 'choices', type: 'string[]' },
168
171
  { name: 'labels', type: 'string[]' },
169
- { name: 'plugins', type: 'string' }
172
+ { name: 'plugins', type: 'string' },
173
+ { name: 'privacy', type: 'string' }
170
174
  ]
171
175
  };
172
176