@snapshot-labs/snapshot.js 0.12.32 → 0.12.33
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/snapshot.cjs.js +38 -2
- package/dist/snapshot.esm.js +38 -2
- package/dist/snapshot.min.js +2 -2
- package/dist/src/index.d.ts +8 -0
- package/dist/src/schemas/index.d.ts +8 -0
- package/dist/src/sign/types.d.ts +2 -0
- package/package.json +1 -1
- package/src/networks.json +14 -0
- package/src/schemas/proposal.json +4 -0
- package/src/schemas/space.json +1 -1
- package/src/schemas/update-proposal.json +4 -0
- package/src/sign/hashedTypes.json +3 -1
- package/src/sign/index.ts +2 -0
- package/src/sign/types.ts +5 -1
package/dist/snapshot.cjs.js
CHANGED
|
@@ -85,6 +85,7 @@ const proposalTypes = {
|
|
|
85
85
|
{ name: 'end', type: 'uint64' },
|
|
86
86
|
{ name: 'snapshot', type: 'uint64' },
|
|
87
87
|
{ name: 'plugins', type: 'string' },
|
|
88
|
+
{ name: 'privacy', type: 'string' },
|
|
88
89
|
{ name: 'app', type: 'string' }
|
|
89
90
|
]
|
|
90
91
|
};
|
|
@@ -100,7 +101,8 @@ const updateProposalTypes = {
|
|
|
100
101
|
{ name: 'discussion', type: 'string' },
|
|
101
102
|
{ name: 'choices', type: 'string[]' },
|
|
102
103
|
{ name: 'labels', type: 'string[]' },
|
|
103
|
-
{ name: 'plugins', type: 'string' }
|
|
104
|
+
{ name: 'plugins', type: 'string' },
|
|
105
|
+
{ name: 'privacy', type: 'string' }
|
|
104
106
|
]
|
|
105
107
|
};
|
|
106
108
|
const flagProposalTypes = {
|
|
@@ -353,11 +355,15 @@ class Client {
|
|
|
353
355
|
message.discussion = '';
|
|
354
356
|
if (!message.app)
|
|
355
357
|
message.app = '';
|
|
358
|
+
if (!message.privacy)
|
|
359
|
+
message.privacy = '';
|
|
356
360
|
return yield this.sign(web3, address, message, proposalTypes);
|
|
357
361
|
});
|
|
358
362
|
}
|
|
359
363
|
updateProposal(web3, address, message) {
|
|
360
364
|
return __awaiter(this, void 0, void 0, function* () {
|
|
365
|
+
if (!message.privacy)
|
|
366
|
+
message.privacy = '';
|
|
361
367
|
return yield this.sign(web3, address, message, updateProposalTypes);
|
|
362
368
|
});
|
|
363
369
|
}
|
|
@@ -807,7 +813,8 @@ var definitions = {
|
|
|
807
813
|
type: "string",
|
|
808
814
|
"enum": [
|
|
809
815
|
"",
|
|
810
|
-
"shutter"
|
|
816
|
+
"shutter",
|
|
817
|
+
"any"
|
|
811
818
|
]
|
|
812
819
|
}
|
|
813
820
|
},
|
|
@@ -1052,6 +1059,13 @@ var definitions$1 = {
|
|
|
1052
1059
|
type: "string",
|
|
1053
1060
|
title: "app",
|
|
1054
1061
|
maxLength: 128
|
|
1062
|
+
},
|
|
1063
|
+
privacy: {
|
|
1064
|
+
type: "string",
|
|
1065
|
+
"enum": [
|
|
1066
|
+
"",
|
|
1067
|
+
"shutter"
|
|
1068
|
+
]
|
|
1055
1069
|
}
|
|
1056
1070
|
},
|
|
1057
1071
|
required: [
|
|
@@ -1138,6 +1152,13 @@ var definitions$2 = {
|
|
|
1138
1152
|
metadata: {
|
|
1139
1153
|
type: "object",
|
|
1140
1154
|
title: "metadata"
|
|
1155
|
+
},
|
|
1156
|
+
privacy: {
|
|
1157
|
+
type: "string",
|
|
1158
|
+
"enum": [
|
|
1159
|
+
"",
|
|
1160
|
+
"shutter"
|
|
1161
|
+
]
|
|
1141
1162
|
}
|
|
1142
1163
|
},
|
|
1143
1164
|
required: [
|
|
@@ -2518,6 +2539,21 @@ var networks = {
|
|
|
2518
2539
|
},
|
|
2519
2540
|
start: 79164574,
|
|
2520
2541
|
logo: "ipfs://bafkreiammyt7uztbztqbcqv4bydnczsh2fqmnjf6jxj4xnskzzl6sjrigq"
|
|
2542
|
+
},
|
|
2543
|
+
"1480": {
|
|
2544
|
+
key: "1480",
|
|
2545
|
+
name: "Islander",
|
|
2546
|
+
shortName: "mainnet",
|
|
2547
|
+
chainId: 1480,
|
|
2548
|
+
network: "mainnet",
|
|
2549
|
+
multicall: "0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",
|
|
2550
|
+
rpc: [
|
|
2551
|
+
],
|
|
2552
|
+
explorer: {
|
|
2553
|
+
url: "https://islander.vanascan.io/"
|
|
2554
|
+
},
|
|
2555
|
+
start: 716763,
|
|
2556
|
+
logo: "ipfs://bafkreibotel3dmc5og5rf3tpt7l74awkene7x6q3oxtwhptt4y4rpa7vsa"
|
|
2521
2557
|
},
|
|
2522
2558
|
"1559": {
|
|
2523
2559
|
key: "1559",
|
package/dist/snapshot.esm.js
CHANGED
|
@@ -75,6 +75,7 @@ const proposalTypes = {
|
|
|
75
75
|
{ name: 'end', type: 'uint64' },
|
|
76
76
|
{ name: 'snapshot', type: 'uint64' },
|
|
77
77
|
{ name: 'plugins', type: 'string' },
|
|
78
|
+
{ name: 'privacy', type: 'string' },
|
|
78
79
|
{ name: 'app', type: 'string' }
|
|
79
80
|
]
|
|
80
81
|
};
|
|
@@ -90,7 +91,8 @@ const updateProposalTypes = {
|
|
|
90
91
|
{ name: 'discussion', type: 'string' },
|
|
91
92
|
{ name: 'choices', type: 'string[]' },
|
|
92
93
|
{ name: 'labels', type: 'string[]' },
|
|
93
|
-
{ name: 'plugins', type: 'string' }
|
|
94
|
+
{ name: 'plugins', type: 'string' },
|
|
95
|
+
{ name: 'privacy', type: 'string' }
|
|
94
96
|
]
|
|
95
97
|
};
|
|
96
98
|
const flagProposalTypes = {
|
|
@@ -343,11 +345,15 @@ class Client {
|
|
|
343
345
|
message.discussion = '';
|
|
344
346
|
if (!message.app)
|
|
345
347
|
message.app = '';
|
|
348
|
+
if (!message.privacy)
|
|
349
|
+
message.privacy = '';
|
|
346
350
|
return yield this.sign(web3, address, message, proposalTypes);
|
|
347
351
|
});
|
|
348
352
|
}
|
|
349
353
|
updateProposal(web3, address, message) {
|
|
350
354
|
return __awaiter(this, void 0, void 0, function* () {
|
|
355
|
+
if (!message.privacy)
|
|
356
|
+
message.privacy = '';
|
|
351
357
|
return yield this.sign(web3, address, message, updateProposalTypes);
|
|
352
358
|
});
|
|
353
359
|
}
|
|
@@ -797,7 +803,8 @@ var definitions = {
|
|
|
797
803
|
type: "string",
|
|
798
804
|
"enum": [
|
|
799
805
|
"",
|
|
800
|
-
"shutter"
|
|
806
|
+
"shutter",
|
|
807
|
+
"any"
|
|
801
808
|
]
|
|
802
809
|
}
|
|
803
810
|
},
|
|
@@ -1042,6 +1049,13 @@ var definitions$1 = {
|
|
|
1042
1049
|
type: "string",
|
|
1043
1050
|
title: "app",
|
|
1044
1051
|
maxLength: 128
|
|
1052
|
+
},
|
|
1053
|
+
privacy: {
|
|
1054
|
+
type: "string",
|
|
1055
|
+
"enum": [
|
|
1056
|
+
"",
|
|
1057
|
+
"shutter"
|
|
1058
|
+
]
|
|
1045
1059
|
}
|
|
1046
1060
|
},
|
|
1047
1061
|
required: [
|
|
@@ -1128,6 +1142,13 @@ var definitions$2 = {
|
|
|
1128
1142
|
metadata: {
|
|
1129
1143
|
type: "object",
|
|
1130
1144
|
title: "metadata"
|
|
1145
|
+
},
|
|
1146
|
+
privacy: {
|
|
1147
|
+
type: "string",
|
|
1148
|
+
"enum": [
|
|
1149
|
+
"",
|
|
1150
|
+
"shutter"
|
|
1151
|
+
]
|
|
1131
1152
|
}
|
|
1132
1153
|
},
|
|
1133
1154
|
required: [
|
|
@@ -2508,6 +2529,21 @@ var networks = {
|
|
|
2508
2529
|
},
|
|
2509
2530
|
start: 79164574,
|
|
2510
2531
|
logo: "ipfs://bafkreiammyt7uztbztqbcqv4bydnczsh2fqmnjf6jxj4xnskzzl6sjrigq"
|
|
2532
|
+
},
|
|
2533
|
+
"1480": {
|
|
2534
|
+
key: "1480",
|
|
2535
|
+
name: "Islander",
|
|
2536
|
+
shortName: "mainnet",
|
|
2537
|
+
chainId: 1480,
|
|
2538
|
+
network: "mainnet",
|
|
2539
|
+
multicall: "0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",
|
|
2540
|
+
rpc: [
|
|
2541
|
+
],
|
|
2542
|
+
explorer: {
|
|
2543
|
+
url: "https://islander.vanascan.io/"
|
|
2544
|
+
},
|
|
2545
|
+
start: 716763,
|
|
2546
|
+
logo: "ipfs://bafkreibotel3dmc5og5rf3tpt7l74awkene7x6q3oxtwhptt4y4rpa7vsa"
|
|
2511
2547
|
},
|
|
2512
2548
|
"1559": {
|
|
2513
2549
|
key: "1559",
|