@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/src/index.d.ts
CHANGED
|
@@ -104,11 +104,9 @@ declare const _default: {
|
|
|
104
104
|
};
|
|
105
105
|
domain: {
|
|
106
106
|
type: string;
|
|
107
|
-
allOf: {
|
|
108
|
-
format: string;
|
|
109
|
-
}[];
|
|
110
107
|
title: string;
|
|
111
108
|
maxLength: number;
|
|
109
|
+
format: string;
|
|
112
110
|
};
|
|
113
111
|
strategies: {
|
|
114
112
|
type: string;
|
|
@@ -811,6 +809,7 @@ declare const _default: {
|
|
|
811
809
|
"8453": string;
|
|
812
810
|
"42161": string;
|
|
813
811
|
"59144": string;
|
|
812
|
+
"81457": string;
|
|
814
813
|
"11155111": string;
|
|
815
814
|
};
|
|
816
815
|
};
|
package/dist/src/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -8,5 +8,6 @@
|
|
|
8
8
|
"8453": "https://subgrapher.snapshot.org/delegation/8453",
|
|
9
9
|
"42161": "https://subgrapher.snapshot.org/delegation/42161",
|
|
10
10
|
"59144": "https://subgrapher.snapshot.org/delegation/59144",
|
|
11
|
+
"81457": "https://subgrapher.snapshot.org/delegation/81457",
|
|
11
12
|
"11155111": "https://subgrapher.snapshot.org/delegation/11155111"
|
|
12
13
|
}
|
package/src/schemas/space.json
CHANGED
|
@@ -103,12 +103,9 @@
|
|
|
103
103
|
},
|
|
104
104
|
"domain": {
|
|
105
105
|
"type": "string",
|
|
106
|
-
"allOf": [
|
|
107
|
-
{ "format": "hostname" },
|
|
108
|
-
{ "format": "lowercase" }
|
|
109
|
-
],
|
|
110
106
|
"title": "domain",
|
|
111
|
-
"maxLength": 64
|
|
107
|
+
"maxLength": 64,
|
|
108
|
+
"format": "domain"
|
|
112
109
|
},
|
|
113
110
|
"strategies": {
|
|
114
111
|
"type": "array",
|
|
@@ -287,7 +284,7 @@
|
|
|
287
284
|
]
|
|
288
285
|
}
|
|
289
286
|
},
|
|
290
|
-
"required": ["delegationType", "
|
|
287
|
+
"required": ["delegationType", "delegationApi", "delegationContract"],
|
|
291
288
|
"additionalProperties": false
|
|
292
289
|
},
|
|
293
290
|
"allowAlias": {
|
package/src/utils.ts
CHANGED
|
@@ -252,6 +252,15 @@ ajv.addFormat('customUrl', {
|
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
254
|
|
|
255
|
+
ajv.addFormat('domain', {
|
|
256
|
+
validate: (value: string) => {
|
|
257
|
+
if (!value) return false;
|
|
258
|
+
return !!value.match(
|
|
259
|
+
/^(https:\/\/)?([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}(\/)?$/
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
|
|
255
264
|
export async function call(provider, abi: any[], call: any[], options?) {
|
|
256
265
|
const contract = new Contract(call[0], abi, provider);
|
|
257
266
|
try {
|