@snapshot-labs/snapshot.js 0.12.24 → 0.12.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/snapshot.cjs.js +9 -10
- package/dist/snapshot.esm.js +9 -10
- package/dist/snapshot.min.js +2 -2
- package/dist/src/index.d.ts +1 -3
- package/dist/src/schemas/index.d.ts +1 -3
- package/package.json +1 -1
- package/src/schemas/space.json +3 -6
- package/src/utils.ts +7 -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
|
],
|
|
@@ -4081,6 +4073,13 @@ ajv.addFormat('customUrl', {
|
|
|
4081
4073
|
str.startsWith('snapshot://'));
|
|
4082
4074
|
}
|
|
4083
4075
|
});
|
|
4076
|
+
ajv.addFormat('domain', {
|
|
4077
|
+
validate: (value) => {
|
|
4078
|
+
if (!value)
|
|
4079
|
+
return false;
|
|
4080
|
+
return !!value.match(/^(https:\/\/)?([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/);
|
|
4081
|
+
}
|
|
4082
|
+
});
|
|
4084
4083
|
function call(provider, abi, call, options) {
|
|
4085
4084
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4086
4085
|
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
|
],
|
|
@@ -4071,6 +4063,13 @@ ajv.addFormat('customUrl', {
|
|
|
4071
4063
|
str.startsWith('snapshot://'));
|
|
4072
4064
|
}
|
|
4073
4065
|
});
|
|
4066
|
+
ajv.addFormat('domain', {
|
|
4067
|
+
validate: (value) => {
|
|
4068
|
+
if (!value)
|
|
4069
|
+
return false;
|
|
4070
|
+
return !!value.match(/^(https:\/\/)?([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/);
|
|
4071
|
+
}
|
|
4072
|
+
});
|
|
4074
4073
|
function call(provider, abi, call, options) {
|
|
4075
4074
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4076
4075
|
const contract = new Contract$1(call[0], abi, provider);
|