@snapshot-labs/snapshot.js 0.12.3 → 0.12.5
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 +14 -4
- package/dist/snapshot.esm.js +14 -4
- package/dist/snapshot.min.js +2 -2
- package/dist/src/index.d.ts +9 -2
- package/dist/src/schemas/index.d.ts +8 -2
- package/dist/src/utils/delegation.d.ts +1 -0
- package/dist/src/utils.d.ts +1 -0
- package/package.json +1 -1
- package/src/delegationSubgraphs.json +1 -0
- package/src/schemas/proposal.json +4 -1
- package/src/schemas/update-proposal.json +4 -1
- package/src/utils.ts +4 -2
package/dist/snapshot.cjs.js
CHANGED
|
@@ -922,7 +922,10 @@ var definitions$1 = {
|
|
|
922
922
|
type: "array",
|
|
923
923
|
title: "choices",
|
|
924
924
|
minItems: 1,
|
|
925
|
-
|
|
925
|
+
maxLengthWithSpaceType: {
|
|
926
|
+
"default": 500,
|
|
927
|
+
turbo: 1000
|
|
928
|
+
}
|
|
926
929
|
},
|
|
927
930
|
type: {
|
|
928
931
|
type: "string",
|
|
@@ -1015,7 +1018,10 @@ var definitions$2 = {
|
|
|
1015
1018
|
type: "array",
|
|
1016
1019
|
title: "choices",
|
|
1017
1020
|
minItems: 1,
|
|
1018
|
-
|
|
1021
|
+
maxLengthWithSpaceType: {
|
|
1022
|
+
"default": 500,
|
|
1023
|
+
turbo: 1000
|
|
1024
|
+
}
|
|
1019
1025
|
},
|
|
1020
1026
|
type: {
|
|
1021
1027
|
"enum": [
|
|
@@ -3558,6 +3564,7 @@ var delegationSubgraphs = {
|
|
|
3558
3564
|
"100": "https://subgrapher.snapshot.org/delegation/100",
|
|
3559
3565
|
"137": "https://subgrapher.snapshot.org/delegation/137",
|
|
3560
3566
|
"250": "https://subgrapher.snapshot.org/delegation/250",
|
|
3567
|
+
"8453": "https://subgrapher.snapshot.org/delegation/8453",
|
|
3561
3568
|
"42161": "https://subgrapher.snapshot.org/delegation/42161",
|
|
3562
3569
|
"11155111": "https://subgrapher.snapshot.org/delegation/11155111"
|
|
3563
3570
|
};
|
|
@@ -3756,7 +3763,7 @@ ajv.addKeyword({
|
|
|
3756
3763
|
validate.errors = [
|
|
3757
3764
|
{
|
|
3758
3765
|
keyword: 'maxLengthWithSpaceType',
|
|
3759
|
-
message: `must
|
|
3766
|
+
message: `must not have more than ${schema[spaceType]}`,
|
|
3760
3767
|
params: { limit: schema[spaceType] }
|
|
3761
3768
|
}
|
|
3762
3769
|
];
|
|
@@ -3843,10 +3850,13 @@ function multicall(network, provider, abi$1, calls, options) {
|
|
|
3843
3850
|
}
|
|
3844
3851
|
function subgraphRequest(url_1, query_1) {
|
|
3845
3852
|
return __awaiter(this, arguments, void 0, function* (url, query, options = {}) {
|
|
3853
|
+
const body = { query: jsonToGraphqlQuery.jsonToGraphQLQuery({ query }) };
|
|
3854
|
+
if (options.variables)
|
|
3855
|
+
body.variables = options.variables;
|
|
3846
3856
|
const res = yield fetch__default['default'](url, {
|
|
3847
3857
|
method: 'POST',
|
|
3848
3858
|
headers: Object.assign({ Accept: 'application/json', 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers),
|
|
3849
|
-
body: JSON.stringify(
|
|
3859
|
+
body: JSON.stringify(body)
|
|
3850
3860
|
});
|
|
3851
3861
|
let responseData = yield res.text();
|
|
3852
3862
|
try {
|
package/dist/snapshot.esm.js
CHANGED
|
@@ -912,7 +912,10 @@ var definitions$1 = {
|
|
|
912
912
|
type: "array",
|
|
913
913
|
title: "choices",
|
|
914
914
|
minItems: 1,
|
|
915
|
-
|
|
915
|
+
maxLengthWithSpaceType: {
|
|
916
|
+
"default": 500,
|
|
917
|
+
turbo: 1000
|
|
918
|
+
}
|
|
916
919
|
},
|
|
917
920
|
type: {
|
|
918
921
|
type: "string",
|
|
@@ -1005,7 +1008,10 @@ var definitions$2 = {
|
|
|
1005
1008
|
type: "array",
|
|
1006
1009
|
title: "choices",
|
|
1007
1010
|
minItems: 1,
|
|
1008
|
-
|
|
1011
|
+
maxLengthWithSpaceType: {
|
|
1012
|
+
"default": 500,
|
|
1013
|
+
turbo: 1000
|
|
1014
|
+
}
|
|
1009
1015
|
},
|
|
1010
1016
|
type: {
|
|
1011
1017
|
"enum": [
|
|
@@ -3548,6 +3554,7 @@ var delegationSubgraphs = {
|
|
|
3548
3554
|
"100": "https://subgrapher.snapshot.org/delegation/100",
|
|
3549
3555
|
"137": "https://subgrapher.snapshot.org/delegation/137",
|
|
3550
3556
|
"250": "https://subgrapher.snapshot.org/delegation/250",
|
|
3557
|
+
"8453": "https://subgrapher.snapshot.org/delegation/8453",
|
|
3551
3558
|
"42161": "https://subgrapher.snapshot.org/delegation/42161",
|
|
3552
3559
|
"11155111": "https://subgrapher.snapshot.org/delegation/11155111"
|
|
3553
3560
|
};
|
|
@@ -3746,7 +3753,7 @@ ajv.addKeyword({
|
|
|
3746
3753
|
validate.errors = [
|
|
3747
3754
|
{
|
|
3748
3755
|
keyword: 'maxLengthWithSpaceType',
|
|
3749
|
-
message: `must
|
|
3756
|
+
message: `must not have more than ${schema[spaceType]}`,
|
|
3750
3757
|
params: { limit: schema[spaceType] }
|
|
3751
3758
|
}
|
|
3752
3759
|
];
|
|
@@ -3833,10 +3840,13 @@ function multicall(network, provider, abi, calls, options) {
|
|
|
3833
3840
|
}
|
|
3834
3841
|
function subgraphRequest(url_1, query_1) {
|
|
3835
3842
|
return __awaiter(this, arguments, void 0, function* (url, query, options = {}) {
|
|
3843
|
+
const body = { query: jsonToGraphQLQuery({ query }) };
|
|
3844
|
+
if (options.variables)
|
|
3845
|
+
body.variables = options.variables;
|
|
3836
3846
|
const res = yield fetch(url, {
|
|
3837
3847
|
method: 'POST',
|
|
3838
3848
|
headers: Object.assign({ Accept: 'application/json', 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers),
|
|
3839
|
-
body: JSON.stringify(
|
|
3849
|
+
body: JSON.stringify(body)
|
|
3840
3850
|
});
|
|
3841
3851
|
let responseData = yield res.text();
|
|
3842
3852
|
try {
|