@snapshot-labs/snapshot.js 0.12.24 → 0.12.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/snapshot.cjs.js +10 -10
- package/dist/snapshot.esm.js +10 -10
- package/dist/snapshot.min.js +2 -2
- package/dist/src/index.d.ts +2 -3
- package/dist/src/schemas/index.d.ts +1 -3
- 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/space.json +3 -6
- package/src/utils.ts +9 -0
package/dist/snapshot.cjs.js
CHANGED
|
@@ -543,16 +543,9 @@ var definitions = {
|
|
|
543
543
|
},
|
|
544
544
|
domain: {
|
|
545
545
|
type: "string",
|
|
546
|
-
allOf: [
|
|
547
|
-
{
|
|
548
|
-
format: "hostname"
|
|
549
|
-
},
|
|
550
|
-
{
|
|
551
|
-
format: "lowercase"
|
|
552
|
-
}
|
|
553
|
-
],
|
|
554
546
|
title: "domain",
|
|
555
|
-
maxLength: 64
|
|
547
|
+
maxLength: 64,
|
|
548
|
+
format: "domain"
|
|
556
549
|
},
|
|
557
550
|
strategies: {
|
|
558
551
|
type: "array",
|
|
@@ -757,7 +750,6 @@ var definitions = {
|
|
|
757
750
|
},
|
|
758
751
|
required: [
|
|
759
752
|
"delegationType",
|
|
760
|
-
"delegationNetwork",
|
|
761
753
|
"delegationApi",
|
|
762
754
|
"delegationContract"
|
|
763
755
|
],
|
|
@@ -3792,6 +3784,7 @@ var delegationSubgraphs = {
|
|
|
3792
3784
|
"8453": "https://subgrapher.snapshot.org/delegation/8453",
|
|
3793
3785
|
"42161": "https://subgrapher.snapshot.org/delegation/42161",
|
|
3794
3786
|
"59144": "https://subgrapher.snapshot.org/delegation/59144",
|
|
3787
|
+
"81457": "https://subgrapher.snapshot.org/delegation/81457",
|
|
3795
3788
|
"11155111": "https://subgrapher.snapshot.org/delegation/11155111"
|
|
3796
3789
|
};
|
|
3797
3790
|
|
|
@@ -4081,6 +4074,13 @@ ajv.addFormat('customUrl', {
|
|
|
4081
4074
|
str.startsWith('snapshot://'));
|
|
4082
4075
|
}
|
|
4083
4076
|
});
|
|
4077
|
+
ajv.addFormat('domain', {
|
|
4078
|
+
validate: (value) => {
|
|
4079
|
+
if (!value)
|
|
4080
|
+
return false;
|
|
4081
|
+
return !!value.match(/^(https:\/\/)?([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}(\/)?$/);
|
|
4082
|
+
}
|
|
4083
|
+
});
|
|
4084
4084
|
function call(provider, abi, call, options) {
|
|
4085
4085
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4086
4086
|
const contract = new contracts.Contract(call[0], abi, provider);
|
package/dist/snapshot.esm.js
CHANGED
|
@@ -533,16 +533,9 @@ var definitions = {
|
|
|
533
533
|
},
|
|
534
534
|
domain: {
|
|
535
535
|
type: "string",
|
|
536
|
-
allOf: [
|
|
537
|
-
{
|
|
538
|
-
format: "hostname"
|
|
539
|
-
},
|
|
540
|
-
{
|
|
541
|
-
format: "lowercase"
|
|
542
|
-
}
|
|
543
|
-
],
|
|
544
536
|
title: "domain",
|
|
545
|
-
maxLength: 64
|
|
537
|
+
maxLength: 64,
|
|
538
|
+
format: "domain"
|
|
546
539
|
},
|
|
547
540
|
strategies: {
|
|
548
541
|
type: "array",
|
|
@@ -747,7 +740,6 @@ var definitions = {
|
|
|
747
740
|
},
|
|
748
741
|
required: [
|
|
749
742
|
"delegationType",
|
|
750
|
-
"delegationNetwork",
|
|
751
743
|
"delegationApi",
|
|
752
744
|
"delegationContract"
|
|
753
745
|
],
|
|
@@ -3782,6 +3774,7 @@ var delegationSubgraphs = {
|
|
|
3782
3774
|
"8453": "https://subgrapher.snapshot.org/delegation/8453",
|
|
3783
3775
|
"42161": "https://subgrapher.snapshot.org/delegation/42161",
|
|
3784
3776
|
"59144": "https://subgrapher.snapshot.org/delegation/59144",
|
|
3777
|
+
"81457": "https://subgrapher.snapshot.org/delegation/81457",
|
|
3785
3778
|
"11155111": "https://subgrapher.snapshot.org/delegation/11155111"
|
|
3786
3779
|
};
|
|
3787
3780
|
|
|
@@ -4071,6 +4064,13 @@ ajv.addFormat('customUrl', {
|
|
|
4071
4064
|
str.startsWith('snapshot://'));
|
|
4072
4065
|
}
|
|
4073
4066
|
});
|
|
4067
|
+
ajv.addFormat('domain', {
|
|
4068
|
+
validate: (value) => {
|
|
4069
|
+
if (!value)
|
|
4070
|
+
return false;
|
|
4071
|
+
return !!value.match(/^(https:\/\/)?([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}(\/)?$/);
|
|
4072
|
+
}
|
|
4073
|
+
});
|
|
4074
4074
|
function call(provider, abi, call, options) {
|
|
4075
4075
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4076
4076
|
const contract = new Contract$1(call[0], abi, provider);
|