@snapshot-labs/snapshot.js 0.12.16 → 0.12.18
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 +50 -2
- package/dist/snapshot.esm.js +50 -2
- package/dist/snapshot.min.js +2 -2
- package/dist/src/index.d.ts +35 -0
- package/dist/src/schemas/index.d.ts +35 -0
- package/package.json +1 -1
- package/src/networks.json +3 -2
- package/src/schemas/space.json +35 -0
- package/src/utils.ts +7 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -382,6 +382,41 @@ declare const _default: {
|
|
|
382
382
|
additionalProperties: boolean;
|
|
383
383
|
};
|
|
384
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
|
+
};
|
|
385
420
|
parent: {
|
|
386
421
|
type: string;
|
|
387
422
|
title: string;
|
|
@@ -378,6 +378,41 @@ declare const _default: {
|
|
|
378
378
|
additionalProperties: boolean;
|
|
379
379
|
};
|
|
380
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
|
+
};
|
|
381
416
|
parent: {
|
|
382
417
|
type: string;
|
|
383
418
|
title: string;
|
package/package.json
CHANGED
package/src/networks.json
CHANGED
|
@@ -1280,14 +1280,15 @@
|
|
|
1280
1280
|
"name": "Curtis",
|
|
1281
1281
|
"shortName": "apechain",
|
|
1282
1282
|
"chainId": 33111,
|
|
1283
|
-
"network": "
|
|
1283
|
+
"network": "testnet",
|
|
1284
1284
|
"multicall": "0xc454132B017b55b427f45078E335549A7124f5f7",
|
|
1285
1285
|
"rpc": [],
|
|
1286
1286
|
"explorer": {
|
|
1287
1287
|
"url": "https://explorer.curtis.apechain.com"
|
|
1288
1288
|
},
|
|
1289
1289
|
"start": 6661339,
|
|
1290
|
-
"logo": "ipfs://bafkreicljxttjq2xkgfwwpii5xegirgq2ctrnsjnzelxudjj33qzq65apu"
|
|
1290
|
+
"logo": "ipfs://bafkreicljxttjq2xkgfwwpii5xegirgq2ctrnsjnzelxudjj33qzq65apu",
|
|
1291
|
+
"testnet": true
|
|
1291
1292
|
},
|
|
1292
1293
|
"33139": {
|
|
1293
1294
|
"key": "33139",
|
package/src/schemas/space.json
CHANGED
|
@@ -393,6 +393,41 @@
|
|
|
393
393
|
"additionalProperties": false
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
|
+
"labels": {
|
|
397
|
+
"type": "array",
|
|
398
|
+
"maxItems": 10,
|
|
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
|
+
},
|
|
396
431
|
"parent": {
|
|
397
432
|
"type": "string",
|
|
398
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;
|