@snapshot-labs/snapshot.js 0.12.13 → 0.12.14

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.
@@ -104,6 +104,9 @@ declare const _default: {
104
104
  };
105
105
  domain: {
106
106
  type: string;
107
+ allOf: {
108
+ format: string;
109
+ }[];
107
110
  title: string;
108
111
  maxLength: number;
109
112
  };
@@ -100,6 +100,9 @@ declare const _default: {
100
100
  };
101
101
  domain: {
102
102
  type: string;
103
+ allOf: {
104
+ format: string;
105
+ }[];
103
106
  title: string;
104
107
  maxLength: number;
105
108
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapshot-labs/snapshot.js",
3
- "version": "0.12.13",
3
+ "version": "0.12.14",
4
4
  "repository": "snapshot-labs/snapshot.js",
5
5
  "license": "MIT",
6
6
  "main": "dist/snapshot.cjs.js",
@@ -103,6 +103,10 @@
103
103
  },
104
104
  "domain": {
105
105
  "type": "string",
106
+ "allOf": [
107
+ { "format": "hostname" },
108
+ { "format": "lowercase" }
109
+ ],
106
110
  "title": "domain",
107
111
  "maxLength": 64
108
112
  },
package/src/utils.ts CHANGED
@@ -113,6 +113,10 @@ ajv.addFormat('long', {
113
113
  validate: () => true
114
114
  });
115
115
 
116
+ ajv.addFormat('lowercase', {
117
+ validate: (value: string) => value === value.toLowerCase()
118
+ });
119
+
116
120
  ajv.addFormat('ethValue', {
117
121
  validate: (value: string) => {
118
122
  if (!value.match(/^([0-9]|[1-9][0-9]+)(\.[0-9]+)?$/)) return false;