@snapshot-labs/snapshot.js 0.12.15 → 0.12.17
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 +55 -0
- package/dist/snapshot.esm.js +55 -0
- package/dist/snapshot.min.js +2 -2
- package/dist/src/index.d.ts +43 -0
- package/dist/src/schemas/index.d.ts +43 -0
- package/package.json +1 -1
- package/src/schemas/space.json +43 -0
- package/src/utils.ts +7 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -269,6 +269,14 @@ declare const _default: {
|
|
|
269
269
|
description: string;
|
|
270
270
|
examples: string[];
|
|
271
271
|
};
|
|
272
|
+
delegationNetwork: {
|
|
273
|
+
type: string;
|
|
274
|
+
snapshotNetwork: boolean;
|
|
275
|
+
title: string;
|
|
276
|
+
minLength: number;
|
|
277
|
+
maxLength: number;
|
|
278
|
+
description: string;
|
|
279
|
+
};
|
|
272
280
|
delegationApi: {
|
|
273
281
|
type: string;
|
|
274
282
|
format: string;
|
|
@@ -374,6 +382,41 @@ declare const _default: {
|
|
|
374
382
|
additionalProperties: boolean;
|
|
375
383
|
};
|
|
376
384
|
};
|
|
385
|
+
labels: {
|
|
386
|
+
type: string;
|
|
387
|
+
maxItems: number;
|
|
388
|
+
uniqueItems: boolean;
|
|
389
|
+
items: {
|
|
390
|
+
type: string;
|
|
391
|
+
properties: {
|
|
392
|
+
id: {
|
|
393
|
+
type: string;
|
|
394
|
+
title: string;
|
|
395
|
+
minLength: number;
|
|
396
|
+
maxLength: number;
|
|
397
|
+
};
|
|
398
|
+
name: {
|
|
399
|
+
type: string;
|
|
400
|
+
title: string;
|
|
401
|
+
minLength: number;
|
|
402
|
+
maxLength: number;
|
|
403
|
+
};
|
|
404
|
+
description: {
|
|
405
|
+
type: string;
|
|
406
|
+
title: string;
|
|
407
|
+
minLength: number;
|
|
408
|
+
maxLength: number;
|
|
409
|
+
};
|
|
410
|
+
color: {
|
|
411
|
+
type: string;
|
|
412
|
+
title: string;
|
|
413
|
+
format: string;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
required: string[];
|
|
417
|
+
additionalProperties: boolean;
|
|
418
|
+
};
|
|
419
|
+
};
|
|
377
420
|
parent: {
|
|
378
421
|
type: string;
|
|
379
422
|
title: string;
|
|
@@ -265,6 +265,14 @@ declare const _default: {
|
|
|
265
265
|
description: string;
|
|
266
266
|
examples: string[];
|
|
267
267
|
};
|
|
268
|
+
delegationNetwork: {
|
|
269
|
+
type: string;
|
|
270
|
+
snapshotNetwork: boolean;
|
|
271
|
+
title: string;
|
|
272
|
+
minLength: number;
|
|
273
|
+
maxLength: number;
|
|
274
|
+
description: string;
|
|
275
|
+
};
|
|
268
276
|
delegationApi: {
|
|
269
277
|
type: string;
|
|
270
278
|
format: string;
|
|
@@ -370,6 +378,41 @@ declare const _default: {
|
|
|
370
378
|
additionalProperties: boolean;
|
|
371
379
|
};
|
|
372
380
|
};
|
|
381
|
+
labels: {
|
|
382
|
+
type: string;
|
|
383
|
+
maxItems: number;
|
|
384
|
+
uniqueItems: boolean;
|
|
385
|
+
items: {
|
|
386
|
+
type: string;
|
|
387
|
+
properties: {
|
|
388
|
+
id: {
|
|
389
|
+
type: string;
|
|
390
|
+
title: string;
|
|
391
|
+
minLength: number;
|
|
392
|
+
maxLength: number;
|
|
393
|
+
};
|
|
394
|
+
name: {
|
|
395
|
+
type: string;
|
|
396
|
+
title: string;
|
|
397
|
+
minLength: number;
|
|
398
|
+
maxLength: number;
|
|
399
|
+
};
|
|
400
|
+
description: {
|
|
401
|
+
type: string;
|
|
402
|
+
title: string;
|
|
403
|
+
minLength: number;
|
|
404
|
+
maxLength: number;
|
|
405
|
+
};
|
|
406
|
+
color: {
|
|
407
|
+
type: string;
|
|
408
|
+
title: string;
|
|
409
|
+
format: string;
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
required: string[];
|
|
413
|
+
additionalProperties: boolean;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
373
416
|
parent: {
|
|
374
417
|
type: string;
|
|
375
418
|
title: string;
|
package/package.json
CHANGED
package/src/schemas/space.json
CHANGED
|
@@ -269,6 +269,14 @@
|
|
|
269
269
|
"description": "The address of your delegation contract",
|
|
270
270
|
"examples": ["0x3901D0fDe202aF1427216b79f5243f8A022d68cf"]
|
|
271
271
|
},
|
|
272
|
+
"delegationNetwork": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"snapshotNetwork": true,
|
|
275
|
+
"title": "Delegation network",
|
|
276
|
+
"minLength": 1,
|
|
277
|
+
"maxLength": 32,
|
|
278
|
+
"description": "The network of your delegation contract"
|
|
279
|
+
},
|
|
272
280
|
"delegationApi": {
|
|
273
281
|
"type": "string",
|
|
274
282
|
"format": "uri",
|
|
@@ -385,6 +393,41 @@
|
|
|
385
393
|
"additionalProperties": false
|
|
386
394
|
}
|
|
387
395
|
},
|
|
396
|
+
"labels": {
|
|
397
|
+
"type": "array",
|
|
398
|
+
"maxItems": 100,
|
|
399
|
+
"uniqueItems": true,
|
|
400
|
+
"items":{
|
|
401
|
+
"type": "object",
|
|
402
|
+
"properties": {
|
|
403
|
+
"id":{
|
|
404
|
+
"type": "string",
|
|
405
|
+
"title": "Id",
|
|
406
|
+
"minLength": 1,
|
|
407
|
+
"maxLength": 8
|
|
408
|
+
},
|
|
409
|
+
"name": {
|
|
410
|
+
"type": "string",
|
|
411
|
+
"title": "Name",
|
|
412
|
+
"minLength": 1,
|
|
413
|
+
"maxLength": 32
|
|
414
|
+
},
|
|
415
|
+
"description": {
|
|
416
|
+
"type": "string",
|
|
417
|
+
"title": "Description",
|
|
418
|
+
"minLength": 1,
|
|
419
|
+
"maxLength": 100
|
|
420
|
+
},
|
|
421
|
+
"color": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"title": "Color",
|
|
424
|
+
"format": "color"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"required": ["id", "name", "description", "color"],
|
|
428
|
+
"additionalProperties": false
|
|
429
|
+
}
|
|
430
|
+
},
|
|
388
431
|
"parent": {
|
|
389
432
|
"type": "string",
|
|
390
433
|
"title": "parent"
|
package/src/utils.ts
CHANGED
|
@@ -117,6 +117,13 @@ ajv.addFormat('lowercase', {
|
|
|
117
117
|
validate: (value: string) => value === value.toLowerCase()
|
|
118
118
|
});
|
|
119
119
|
|
|
120
|
+
ajv.addFormat('color', {
|
|
121
|
+
validate: (value: string) => {
|
|
122
|
+
if (!value) return false;
|
|
123
|
+
return !!value.match(/^#[0-9A-F]{6}$/);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
120
127
|
ajv.addFormat('ethValue', {
|
|
121
128
|
validate: (value: string) => {
|
|
122
129
|
if (!value.match(/^([0-9]|[1-9][0-9]+)(\.[0-9]+)?$/)) return false;
|