@dcl/content-validator 2.0.1-20220610154219.commit-81cc697 → 2.0.1-20220614191517.commit-d08a851
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/content-validator.api.json +9 -205
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -25
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/validations/access-checker/profiles.d.ts.map +1 -1
- package/dist/validations/access-checker/profiles.js +1 -44
- package/dist/validations/access-checker/profiles.js.map +1 -1
- package/dist/validations/index.d.ts +1 -6
- package/dist/validations/index.d.ts.map +1 -1
- package/dist/validations/index.js +2 -9
- package/dist/validations/index.js.map +1 -1
- package/dist/validations/profile.d.ts +0 -2
- package/dist/validations/profile.d.ts.map +1 -1
- package/dist/validations/profile.js +2 -42
- package/dist/validations/profile.js.map +1 -1
- package/dist/validations/wearable.js +1 -1
- package/package.json +2 -2
- package/dist/the-graph-client/the-graph-client.d.ts +0 -6
- package/dist/the-graph-client/the-graph-client.d.ts.map +0 -1
- package/dist/the-graph-client/the-graph-client.js +0 -167
- package/dist/the-graph-client/the-graph-client.js.map +0 -1
|
@@ -191,27 +191,6 @@
|
|
|
191
191
|
"endIndex": 2
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
|
-
{
|
|
195
|
-
"kind": "Variable",
|
|
196
|
-
"canonicalReference": "@dcl/content-validator!ADR_XXX_TIMESTAMP:var",
|
|
197
|
-
"docComment": "/**\n * 1655294400000 = 2022-06-15T12:00:00Z\n *\n * @public\n */\n",
|
|
198
|
-
"excerptTokens": [
|
|
199
|
-
{
|
|
200
|
-
"kind": "Content",
|
|
201
|
-
"text": "ADR_XXX_TIMESTAMP: "
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"kind": "Content",
|
|
205
|
-
"text": "number"
|
|
206
|
-
}
|
|
207
|
-
],
|
|
208
|
-
"releaseTag": "Public",
|
|
209
|
-
"name": "ADR_XXX_TIMESTAMP",
|
|
210
|
-
"variableTypeTokenRange": {
|
|
211
|
-
"startIndex": 1,
|
|
212
|
-
"endIndex": 2
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
194
|
{
|
|
216
195
|
"kind": "Variable",
|
|
217
196
|
"canonicalReference": "@dcl/content-validator!calculateDeploymentSize:var",
|
|
@@ -383,15 +362,6 @@
|
|
|
383
362
|
"text": "ILoggerComponent",
|
|
384
363
|
"canonicalReference": "@well-known-components/interfaces!ILoggerComponent:type"
|
|
385
364
|
},
|
|
386
|
-
{
|
|
387
|
-
"kind": "Content",
|
|
388
|
-
"text": ";\n theGraphClient: "
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
"kind": "Reference",
|
|
392
|
-
"text": "TheGraphClient",
|
|
393
|
-
"canonicalReference": "@dcl/content-validator!TheGraphClient:type"
|
|
394
|
-
},
|
|
395
365
|
{
|
|
396
366
|
"kind": "Content",
|
|
397
367
|
"text": ";\n externalCalls: "
|
|
@@ -414,51 +384,7 @@
|
|
|
414
384
|
"name": "ContentValidatorComponents",
|
|
415
385
|
"typeTokenRange": {
|
|
416
386
|
"startIndex": 1,
|
|
417
|
-
"endIndex":
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
"kind": "Variable",
|
|
422
|
-
"canonicalReference": "@dcl/content-validator!createTheGraphClient:var",
|
|
423
|
-
"docComment": "/**\n * @public\n */\n",
|
|
424
|
-
"excerptTokens": [
|
|
425
|
-
{
|
|
426
|
-
"kind": "Content",
|
|
427
|
-
"text": "createTheGraphClient: "
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
"kind": "Content",
|
|
431
|
-
"text": "(components: "
|
|
432
|
-
},
|
|
433
|
-
{
|
|
434
|
-
"kind": "Reference",
|
|
435
|
-
"text": "Pick",
|
|
436
|
-
"canonicalReference": "!Pick:type"
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
"kind": "Content",
|
|
440
|
-
"text": "<"
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
"kind": "Reference",
|
|
444
|
-
"text": "ContentValidatorComponents",
|
|
445
|
-
"canonicalReference": "@dcl/content-validator!ContentValidatorComponents:type"
|
|
446
|
-
},
|
|
447
|
-
{
|
|
448
|
-
"kind": "Content",
|
|
449
|
-
"text": ", 'logs' | 'externalCalls'>) => "
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
"kind": "Reference",
|
|
453
|
-
"text": "TheGraphClient",
|
|
454
|
-
"canonicalReference": "@dcl/content-validator!TheGraphClient:type"
|
|
455
|
-
}
|
|
456
|
-
],
|
|
457
|
-
"releaseTag": "Public",
|
|
458
|
-
"name": "createTheGraphClient",
|
|
459
|
-
"variableTypeTokenRange": {
|
|
460
|
-
"startIndex": 1,
|
|
461
|
-
"endIndex": 7
|
|
387
|
+
"endIndex": 6
|
|
462
388
|
}
|
|
463
389
|
},
|
|
464
390
|
{
|
|
@@ -490,7 +416,7 @@
|
|
|
490
416
|
},
|
|
491
417
|
{
|
|
492
418
|
"kind": "Content",
|
|
493
|
-
"text": ", 'externalCalls' | 'logs'
|
|
419
|
+
"text": ", 'externalCalls' | 'logs'>) => "
|
|
494
420
|
},
|
|
495
421
|
{
|
|
496
422
|
"kind": "Reference",
|
|
@@ -695,7 +621,7 @@
|
|
|
695
621
|
},
|
|
696
622
|
{
|
|
697
623
|
"kind": "Content",
|
|
698
|
-
"text": ";\n subgraphs: {\n L1: {\n landManager: string;\n blocks: string;\n collections: string;\n
|
|
624
|
+
"text": ";\n subgraphs: {\n L1: {\n landManager: string;\n blocks: string;\n collections: string;\n };\n L2: {\n blocks: string;\n collections: string;\n thirdPartyRegistry: string;\n };\n };\n}"
|
|
699
625
|
},
|
|
700
626
|
{
|
|
701
627
|
"kind": "Content",
|
|
@@ -983,128 +909,6 @@
|
|
|
983
909
|
"endIndex": 8
|
|
984
910
|
}
|
|
985
911
|
},
|
|
986
|
-
{
|
|
987
|
-
"kind": "TypeAlias",
|
|
988
|
-
"canonicalReference": "@dcl/content-validator!TheGraphClient:type",
|
|
989
|
-
"docComment": "/**\n * @public\n */\n",
|
|
990
|
-
"excerptTokens": [
|
|
991
|
-
{
|
|
992
|
-
"kind": "Content",
|
|
993
|
-
"text": "export declare type TheGraphClient = "
|
|
994
|
-
},
|
|
995
|
-
{
|
|
996
|
-
"kind": "Content",
|
|
997
|
-
"text": "{\n checkForNamesOwnershipWithTimestamp: (ethAddress: "
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
"kind": "Reference",
|
|
1001
|
-
"text": "EthAddress",
|
|
1002
|
-
"canonicalReference": "@dcl/schemas!EthAddress:type"
|
|
1003
|
-
},
|
|
1004
|
-
{
|
|
1005
|
-
"kind": "Content",
|
|
1006
|
-
"text": ", namesToCheck: string[], timestamp: number) => "
|
|
1007
|
-
},
|
|
1008
|
-
{
|
|
1009
|
-
"kind": "Reference",
|
|
1010
|
-
"text": "Promise",
|
|
1011
|
-
"canonicalReference": "!Promise:interface"
|
|
1012
|
-
},
|
|
1013
|
-
{
|
|
1014
|
-
"kind": "Content",
|
|
1015
|
-
"text": "<"
|
|
1016
|
-
},
|
|
1017
|
-
{
|
|
1018
|
-
"kind": "Reference",
|
|
1019
|
-
"text": "Set",
|
|
1020
|
-
"canonicalReference": "!Set:interface"
|
|
1021
|
-
},
|
|
1022
|
-
{
|
|
1023
|
-
"kind": "Content",
|
|
1024
|
-
"text": "<string>>;\n checkForWearablesOwnershipWithTimestamp: (ethAddress: "
|
|
1025
|
-
},
|
|
1026
|
-
{
|
|
1027
|
-
"kind": "Reference",
|
|
1028
|
-
"text": "EthAddress",
|
|
1029
|
-
"canonicalReference": "@dcl/schemas!EthAddress:type"
|
|
1030
|
-
},
|
|
1031
|
-
{
|
|
1032
|
-
"kind": "Content",
|
|
1033
|
-
"text": ", wearableIdsToCheck: string[], timestamp: number) => "
|
|
1034
|
-
},
|
|
1035
|
-
{
|
|
1036
|
-
"kind": "Reference",
|
|
1037
|
-
"text": "Promise",
|
|
1038
|
-
"canonicalReference": "!Promise:interface"
|
|
1039
|
-
},
|
|
1040
|
-
{
|
|
1041
|
-
"kind": "Content",
|
|
1042
|
-
"text": "<"
|
|
1043
|
-
},
|
|
1044
|
-
{
|
|
1045
|
-
"kind": "Reference",
|
|
1046
|
-
"text": "Set",
|
|
1047
|
-
"canonicalReference": "!Set:interface"
|
|
1048
|
-
},
|
|
1049
|
-
{
|
|
1050
|
-
"kind": "Content",
|
|
1051
|
-
"text": "<string>>;\n findBlocksForTimestamp: (subgraph: keyof "
|
|
1052
|
-
},
|
|
1053
|
-
{
|
|
1054
|
-
"kind": "Reference",
|
|
1055
|
-
"text": "URLs",
|
|
1056
|
-
"canonicalReference": "@dcl/content-validator!URLs:type"
|
|
1057
|
-
},
|
|
1058
|
-
{
|
|
1059
|
-
"kind": "Content",
|
|
1060
|
-
"text": ", timestamp: number) => "
|
|
1061
|
-
},
|
|
1062
|
-
{
|
|
1063
|
-
"kind": "Reference",
|
|
1064
|
-
"text": "Promise",
|
|
1065
|
-
"canonicalReference": "!Promise:interface"
|
|
1066
|
-
},
|
|
1067
|
-
{
|
|
1068
|
-
"kind": "Content",
|
|
1069
|
-
"text": "<{\n blockNumberAtDeployment: number | undefined;\n blockNumberFiveMinBeforeDeployment: number | undefined;\n }>;\n}"
|
|
1070
|
-
},
|
|
1071
|
-
{
|
|
1072
|
-
"kind": "Content",
|
|
1073
|
-
"text": ";"
|
|
1074
|
-
}
|
|
1075
|
-
],
|
|
1076
|
-
"releaseTag": "Public",
|
|
1077
|
-
"name": "TheGraphClient",
|
|
1078
|
-
"typeTokenRange": {
|
|
1079
|
-
"startIndex": 1,
|
|
1080
|
-
"endIndex": 18
|
|
1081
|
-
}
|
|
1082
|
-
},
|
|
1083
|
-
{
|
|
1084
|
-
"kind": "TypeAlias",
|
|
1085
|
-
"canonicalReference": "@dcl/content-validator!URLs:type",
|
|
1086
|
-
"docComment": "/**\n * @public\n */\n",
|
|
1087
|
-
"excerptTokens": [
|
|
1088
|
-
{
|
|
1089
|
-
"kind": "Content",
|
|
1090
|
-
"text": "export declare type URLs = "
|
|
1091
|
-
},
|
|
1092
|
-
{
|
|
1093
|
-
"kind": "Content",
|
|
1094
|
-
"text": "{\n ensSubgraph: string;\n blocksSubgraph: string;\n maticBlocksSubgraph: string;\n collectionsSubgraph: string;\n maticCollectionsSubgraph: string;\n thirdPartyRegistrySubgraph: string;\n}"
|
|
1095
|
-
},
|
|
1096
|
-
{
|
|
1097
|
-
"kind": "Content",
|
|
1098
|
-
"text": ";"
|
|
1099
|
-
}
|
|
1100
|
-
],
|
|
1101
|
-
"releaseTag": "Public",
|
|
1102
|
-
"name": "URLs",
|
|
1103
|
-
"typeTokenRange": {
|
|
1104
|
-
"startIndex": 1,
|
|
1105
|
-
"endIndex": 2
|
|
1106
|
-
}
|
|
1107
|
-
},
|
|
1108
912
|
{
|
|
1109
913
|
"kind": "Variable",
|
|
1110
914
|
"canonicalReference": "@dcl/content-validator!validateInRow:var",
|
|
@@ -1116,21 +920,21 @@
|
|
|
1116
920
|
},
|
|
1117
921
|
{
|
|
1118
922
|
"kind": "Content",
|
|
1119
|
-
"text": "(
|
|
923
|
+
"text": "(deployment: "
|
|
1120
924
|
},
|
|
1121
925
|
{
|
|
1122
926
|
"kind": "Reference",
|
|
1123
|
-
"text": "
|
|
1124
|
-
"canonicalReference": "@dcl/content-validator!
|
|
927
|
+
"text": "DeploymentToValidate",
|
|
928
|
+
"canonicalReference": "@dcl/content-validator!DeploymentToValidate:type"
|
|
1125
929
|
},
|
|
1126
930
|
{
|
|
1127
931
|
"kind": "Content",
|
|
1128
|
-
"text": ",
|
|
932
|
+
"text": ", components: "
|
|
1129
933
|
},
|
|
1130
934
|
{
|
|
1131
935
|
"kind": "Reference",
|
|
1132
|
-
"text": "
|
|
1133
|
-
"canonicalReference": "@dcl/content-validator!
|
|
936
|
+
"text": "ContentValidatorComponents",
|
|
937
|
+
"canonicalReference": "@dcl/content-validator!ContentValidatorComponents:type"
|
|
1134
938
|
},
|
|
1135
939
|
{
|
|
1136
940
|
"kind": "Content",
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,5 @@ export * from './validations';
|
|
|
5
5
|
* Creates a validator instance with given external calls.
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
export declare const createValidator: (components: Pick<ContentValidatorComponents, 'externalCalls' | 'logs'
|
|
9
|
-
export { createTheGraphClient } from './the-graph-client/the-graph-client';
|
|
8
|
+
export declare const createValidator: (components: Pick<ContentValidatorComponents, 'externalCalls' | 'logs'>) => Validator;
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAM,SAAS,EAAE,MAAM,SAAS,CAAA;AAGnE,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAE7B;;;GAGG;AACH,eAAO,MAAM,eAAe,eACd,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAM,SAAS,EAAE,MAAM,SAAS,CAAA;AAGnE,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAE7B;;;GAGG;AACH,eAAO,MAAM,eAAe,eACd,KAAK,0BAA0B,EAAE,eAAe,GAAG,MAAM,CAAC,KACrE,SAeF,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.createValidator = void 0;
|
|
18
18
|
const types_1 = require("./types");
|
|
19
19
|
const validations_1 = require("./validations");
|
|
20
20
|
__exportStar(require("./types"), exports);
|
|
@@ -39,6 +39,4 @@ const createValidator = (components) => {
|
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
exports.createValidator = createValidator;
|
|
42
|
-
var the_graph_client_1 = require("./the-graph-client/the-graph-client");
|
|
43
|
-
Object.defineProperty(exports, "createTheGraphClient", { enumerable: true, get: function () { return the_graph_client_1.createTheGraphClient; } });
|
|
44
42
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mCAAmE;AACnE,+CAA2C;AAE3C,0CAAuB;AACvB,gDAA6B;AAE7B;;;GAGG;AACI,MAAM,eAAe,GAAG,CAC7B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mCAAmE;AACnE,+CAA2C;AAE3C,0CAAuB;AACvB,gDAA6B;AAE7B;;;GAGG;AACI,MAAM,eAAe,GAAG,CAC7B,UAAsE,EAC3D,EAAE;IACb,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAA;IAE1D,OAAO;QACL,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;YAC7B,KAAK,MAAM,UAAU,IAAI,yBAAW,EAAE;gBACpC,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;gBAChE,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;oBACd,IAAI,CAAC,KAAK,CAAC,uBAAuB,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;oBAC9D,OAAO,MAAM,CAAA;iBACd;aACF;YACD,OAAO,UAAE,CAAA;QACX,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AAjBY,QAAA,eAAe,mBAiB3B"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthChain, Entity
|
|
1
|
+
import { AuthChain, Entity } from '@dcl/schemas';
|
|
2
2
|
import { ILoggerComponent } from '@well-known-components/interfaces';
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
@@ -53,7 +53,6 @@ export declare type ExternalCalls = {
|
|
|
53
53
|
landManager: string;
|
|
54
54
|
blocks: string;
|
|
55
55
|
collections: string;
|
|
56
|
-
ensOwner: string;
|
|
57
56
|
};
|
|
58
57
|
L2: {
|
|
59
58
|
blocks: string;
|
|
@@ -110,35 +109,12 @@ export declare const conditionalValidation: (condition: ConditionalValidation) =
|
|
|
110
109
|
* @public
|
|
111
110
|
*/
|
|
112
111
|
export declare const fromErrors: (...errors: Errors) => ValidationResponse;
|
|
113
|
-
/**
|
|
114
|
-
* @public
|
|
115
|
-
*/
|
|
116
|
-
export declare type URLs = {
|
|
117
|
-
ensSubgraph: string;
|
|
118
|
-
blocksSubgraph: string;
|
|
119
|
-
maticBlocksSubgraph: string;
|
|
120
|
-
collectionsSubgraph: string;
|
|
121
|
-
maticCollectionsSubgraph: string;
|
|
122
|
-
thirdPartyRegistrySubgraph: string;
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* @public
|
|
126
|
-
*/
|
|
127
|
-
export declare type TheGraphClient = {
|
|
128
|
-
checkForNamesOwnershipWithTimestamp: (ethAddress: EthAddress, namesToCheck: string[], timestamp: number) => Promise<Set<string>>;
|
|
129
|
-
checkForWearablesOwnershipWithTimestamp: (ethAddress: EthAddress, wearableIdsToCheck: string[], timestamp: number) => Promise<Set<string>>;
|
|
130
|
-
findBlocksForTimestamp: (subgraph: keyof URLs, timestamp: number) => Promise<{
|
|
131
|
-
blockNumberAtDeployment: number | undefined;
|
|
132
|
-
blockNumberFiveMinBeforeDeployment: number | undefined;
|
|
133
|
-
}>;
|
|
134
|
-
};
|
|
135
112
|
/**
|
|
136
113
|
* Components that can be used to validate deployments.
|
|
137
114
|
* @public
|
|
138
115
|
*/
|
|
139
116
|
export declare type ContentValidatorComponents = {
|
|
140
117
|
logs: ILoggerComponent;
|
|
141
|
-
theGraphClient: TheGraphClient;
|
|
142
118
|
externalCalls: ExternalCalls;
|
|
143
119
|
};
|
|
144
120
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AAEpE;;GAEG;AACH,oBAAY,wBAAwB,GAAG;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,CAAA;AAE/D;;GAEG;AACH,oBAAY,MAAM,GAAG,MAAM,EAAE,CAAA;AAE7B;;GAEG;AACH,oBAAY,QAAQ,GAAG,MAAM,EAAE,CAAA;AAE/B;;GAEG;AACH,oBAAY,oBAAoB,GAAG,MAAM,GAAG;IAC1C,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;GAGG;AACH,oBAAY,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAC9B,SAAS,EAAE,wBAAwB,CAAA;CACpC,CAAA;AAED;;;GAGG;AACH,oBAAY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E,oBAAoB,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,oBAAY,kBAAkB,GAAG;IAC/B,EAAE,EAAE,OAAO,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED;;GAEG;AACH,oBAAY,UAAU,GAAG;IACvB,QAAQ,EAAE,CACR,UAAU,EAAE,0BAA0B,EACtC,UAAU,EAAE,oBAAoB,KAC7B,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;CACtD,CAAA;AAED;;GAEG;AACH,oBAAY,qBAAqB,GAAG;IAClC,SAAS,EAAE,CACT,UAAU,EAAE,0BAA0B,EACtC,UAAU,EAAE,oBAAoB,KAC7B,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;CACtD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,EAAE,EAAE,kBAAiC,CAAA;AAElD;;GAEG;AACH,eAAO,MAAM,gBAAgB,aAAc,MAAM,EAAE,KAAG,kBAGpD,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,cACrB,qBAAqB,KAC/B,UAYD,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,yBAAwB,kBAG7C,CAAA;AAEF;;;GAGG;AACH,oBAAY,0BAA0B,GAAG;IACvC,IAAI,EAAE,gBAAgB,CAAA;IACtB,aAAa,EAAE,aAAa,CAAA;CAC7B,CAAA"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAqHA;;GAEG;AACU,QAAA,EAAE,GAAuB,EAAE,EAAE,EAAE,IAAI,EAAE,CAAA;AAElD;;GAEG;AACI,MAAM,gBAAgB,GAAG,CAAC,GAAG,KAAe,EAAsB,EAAE,CAAC,CAAC;IAC3E,EAAE,EAAE,KAAK;IACT,MAAM,EAAE,KAAK;CACd,CAAC,CAAA;AAHW,QAAA,gBAAgB,oBAG3B;AAEF;;GAEG;AACI,MAAM,qBAAqB,GAAG,CACnC,SAAgC,EACpB,EAAE,CAAC,CAAC;IAChB,QAAQ,EAAE,KAAK,EACb,UAAsC,EACtC,UAAgC,EAChC,EAAE;QACF,IAAI;YACF,OAAO,MAAM,SAAS,CAAC,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;YACxD,sEAAsE;SACvE;QAAC,OAAO,GAAQ,EAAE;YACjB,OAAO,IAAA,wBAAgB,EAAC,sBAAsB,GAAG,EAAE,CAAC,CAAA;SACrD;IACH,CAAC;CACF,CAAC,CAAA;AAdW,QAAA,qBAAqB,yBAchC;AAEF;;GAEG;AACI,MAAM,UAAU,GAAG,CAAC,GAAG,MAAc,EAAsB,EAAE,CAAC,CAAC;IACpE,EAAE,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;CAC/C,CAAC,CAAA;AAHW,QAAA,UAAU,cAGrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../../src/validations/access-checker/profiles.ts"],"names":[],"mappings":"AACA,OAAO,EAAM,UAAU,EAAoB,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../../src/validations/access-checker/profiles.ts"],"names":[],"mappings":"AACA,OAAO,EAAM,UAAU,EAAoB,MAAM,aAAa,CAAA;AAE9D;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,UA6BtB,CAAA"}
|
|
@@ -3,15 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.profiles = void 0;
|
|
4
4
|
const schemas_1 = require("@dcl/schemas");
|
|
5
5
|
const types_1 = require("../../types");
|
|
6
|
-
const urn_resolver_1 = require("@dcl/urn-resolver");
|
|
7
|
-
const index_1 = require("../index");
|
|
8
|
-
const profile_1 = require("../profile");
|
|
9
6
|
/**
|
|
10
7
|
* Validate that the pointers are valid, and that the Ethereum address has write access to them
|
|
11
8
|
* @public
|
|
12
9
|
*/
|
|
13
10
|
exports.profiles = {
|
|
14
|
-
validate: async ({ externalCalls
|
|
11
|
+
validate: async ({ externalCalls }, deployment) => {
|
|
15
12
|
const pointers = deployment.entity.pointers;
|
|
16
13
|
const ethAddress = externalCalls.ownerAddress(deployment.auditInfo);
|
|
17
14
|
if (pointers.length !== 1)
|
|
@@ -27,47 +24,7 @@ exports.profiles = {
|
|
|
27
24
|
else if (pointer !== ethAddress.toLowerCase()) {
|
|
28
25
|
return (0, types_1.validationFailed)(`You can only alter your own profile. The pointer address and the signer address are different (pointer:${pointer} signer: ${ethAddress.toLowerCase()}).`);
|
|
29
26
|
}
|
|
30
|
-
if (deployment.entity.timestamp < index_1.ADR_XXX_TIMESTAMP)
|
|
31
|
-
return types_1.OK;
|
|
32
|
-
const names = allClaimedNames(deployment.entity);
|
|
33
|
-
if (names.length > 0) {
|
|
34
|
-
const ownedNames = await theGraphClient.checkForNamesOwnershipWithTimestamp(ethAddress, names, deployment.entity.timestamp);
|
|
35
|
-
const notOwnedNames = names.filter((name) => !ownedNames.has(name));
|
|
36
|
-
if (notOwnedNames.length > 0)
|
|
37
|
-
return (0, types_1.validationFailed)(`The following names (${notOwnedNames}) are not owned by the address ${ethAddress.toLowerCase()}).`);
|
|
38
|
-
}
|
|
39
|
-
const wearableUrns = await allWearablesUrns(deployment.entity);
|
|
40
|
-
if (wearableUrns.length > 0) {
|
|
41
|
-
const ownedWearables = await theGraphClient.checkForWearablesOwnershipWithTimestamp(ethAddress, wearableUrns, deployment.entity.timestamp);
|
|
42
|
-
const notOwned = wearableUrns.filter((wearable) => !ownedWearables.has(wearable));
|
|
43
|
-
if (notOwned.length > 0)
|
|
44
|
-
return (0, types_1.validationFailed)(`The following wearables (${notOwned}) are not owned by the address ${ethAddress.toLowerCase()}).`);
|
|
45
|
-
}
|
|
46
27
|
return types_1.OK;
|
|
47
28
|
}
|
|
48
29
|
};
|
|
49
|
-
const allClaimedNames = (entity) => entity.metadata.avatars
|
|
50
|
-
.filter((avatar) => avatar.hasClaimedName)
|
|
51
|
-
.map((avatar) => avatar.name)
|
|
52
|
-
.filter((name) => name && name.trim().length > 0);
|
|
53
|
-
const isBaseAvatar = (wearable) => wearable.includes('base-avatars');
|
|
54
|
-
const isOldEmote = (wearable) => profile_1.allowList.has(wearable);
|
|
55
|
-
const translateWearablesIdFormat = async (wearableId) => {
|
|
56
|
-
if (!wearableId.startsWith('dcl://')) {
|
|
57
|
-
return wearableId;
|
|
58
|
-
}
|
|
59
|
-
const parsed = await (0, urn_resolver_1.parseUrn)(wearableId);
|
|
60
|
-
return parsed?.uri?.toString();
|
|
61
|
-
};
|
|
62
|
-
const allWearablesUrns = async (entity) => {
|
|
63
|
-
const allWearablesInProfilePromises = [];
|
|
64
|
-
for (const avatar of entity.metadata.avatars) {
|
|
65
|
-
for (const wearableId of avatar.avatar.wearables) {
|
|
66
|
-
if (!isBaseAvatar(wearableId) && !isOldEmote(wearableId)) {
|
|
67
|
-
allWearablesInProfilePromises.push(translateWearablesIdFormat(wearableId));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return (await Promise.all(allWearablesInProfilePromises)).filter((wearableId) => !!wearableId);
|
|
72
|
-
};
|
|
73
30
|
//# sourceMappingURL=profiles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../../src/validations/access-checker/profiles.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../../src/validations/access-checker/profiles.ts"],"names":[],"mappings":";;;AAAA,0CAAyC;AACzC,uCAA8D;AAE9D;;;GAGG;AACU,QAAA,QAAQ,GAAe;IAClC,QAAQ,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,EAAE;QAChD,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAA;QAC3C,MAAM,UAAU,GAAG,aAAa,CAAC,YAAY,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;QAEnE,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;YACvB,OAAO,IAAA,wBAAgB,EACrB,oEAAoE,QAAQ,EAAE,CAC/E,CAAA;QAEH,MAAM,OAAO,GAAW,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;QAEjD,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YACjC,IAAI,CAAC,aAAa,CAAC,4BAA4B,CAAC,UAAU,CAAC;gBACzD,OAAO,IAAA,wBAAgB,EACrB,sDAAsD,CACvD,CAAA;SACJ;aAAM,IAAI,CAAC,oBAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YACxC,OAAO,IAAA,wBAAgB,EACrB,oDAAoD,CACrD,CAAA;SACF;aAAM,IAAI,OAAO,KAAK,UAAU,CAAC,WAAW,EAAE,EAAE;YAC/C,OAAO,IAAA,wBAAgB,EACrB,0GAA0G,OAAO,YAAY,UAAU,CAAC,WAAW,EAAE,IAAI,CAC1J,CAAA;SACF;QAED,OAAO,UAAE,CAAA;IACX,CAAC;CACF,CAAA"}
|
|
@@ -2,17 +2,12 @@ import { ContentValidatorComponents, DeploymentToValidate, ExternalCalls, Valida
|
|
|
2
2
|
/**
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
|
-
export declare const validateInRow: (
|
|
5
|
+
export declare const validateInRow: (deployment: DeploymentToValidate, components: ContentValidatorComponents, ...validations: Validation[]) => Promise<ValidationResponse>;
|
|
6
6
|
/**
|
|
7
7
|
* 1652191200000 = 2022-05-10T14:00:00Z
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
10
|
export declare const ADR_45_TIMESTAMP: number;
|
|
11
|
-
/**
|
|
12
|
-
* 1655294400000 = 2022-06-15T12:00:00Z
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export declare const ADR_XXX_TIMESTAMP: number;
|
|
16
11
|
/**
|
|
17
12
|
* DCL Launch Day
|
|
18
13
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,aAAa,EAEb,UAAU,EACV,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAWjB;;GAEG;AACH,eAAO,MAAM,aAAa,eACZ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,aAAa,EAEb,UAAU,EACV,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAWjB;;GAEG;AACH,eAAO,MAAM,aAAa,eACZ,oBAAoB,cACpB,0BAA0B,kBACtB,UAAU,EAAE,KAC3B,QAAQ,kBAAkB,CAM5B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAEZ,CAAA;AAEjB;;;GAGG;AACH,eAAO,MAAM,kCAAkC,gBAAgB,CAAA;AAE/D;;GAEG;AACH,eAAO,MAAM,uBAAuB,eACtB,oBAAoB,iBACjB,aAAa,KAC3B,QAAQ,MAAM,GAAG,MAAM,CAgBzB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,mFAOtB,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,oBAAoB,+CAIvB,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,WAAW,uHAGd,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validations = exports.statelessValidations = exports.statefulValidations = exports.calculateDeploymentSize = exports.LEGACY_CONTENT_MIGRATION_TIMESTAMP = exports.
|
|
3
|
+
exports.validations = exports.statelessValidations = exports.statefulValidations = exports.calculateDeploymentSize = exports.LEGACY_CONTENT_MIGRATION_TIMESTAMP = exports.ADR_45_TIMESTAMP = exports.validateInRow = void 0;
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
const access_1 = require("./access-checker/access");
|
|
6
6
|
const content_1 = require("./content");
|
|
@@ -14,7 +14,7 @@ const wearable_1 = require("./wearable");
|
|
|
14
14
|
/**
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
|
-
const validateInRow = async (
|
|
17
|
+
const validateInRow = async (deployment, components, ...validations) => {
|
|
18
18
|
for (const validation of validations) {
|
|
19
19
|
const response = await validation.validate(components, deployment);
|
|
20
20
|
if (!response.ok)
|
|
@@ -30,13 +30,6 @@ exports.validateInRow = validateInRow;
|
|
|
30
30
|
exports.ADR_45_TIMESTAMP = process.env.ADR_45_TIMESTAMP
|
|
31
31
|
? parseInt(process.env.ADR_45_TIMESTAMP)
|
|
32
32
|
: 1652191200000;
|
|
33
|
-
/**
|
|
34
|
-
* 1655294400000 = 2022-06-15T12:00:00Z
|
|
35
|
-
* @public
|
|
36
|
-
*/
|
|
37
|
-
exports.ADR_XXX_TIMESTAMP = process.env.ADR_XXX_TIMESTAMP
|
|
38
|
-
? parseInt(process.env.ADR_XXX_TIMESTAMP)
|
|
39
|
-
: 1655294400000;
|
|
40
33
|
/**
|
|
41
34
|
* DCL Launch Day
|
|
42
35
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validations/index.ts"],"names":[],"mappings":";;;AAAA,oCAOiB;AACjB,oDAAgD;AAChD,uCAAmC;AACnC,yDAAoD;AACpD,iDAA4C;AAC5C,uDAA4C;AAC5C,uCAAmC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Y,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QAC/C,IAAI,YAAY,EAAE;YAChB,SAAS,IAAI,YAAY,CAAC,UAAU,CAAA;SACrC;aAAM;YACL,MAAM,WAAW,GAAG,MAAM,aAAa,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;YAClE,IAAI,WAAW,KAAK,SAAS;gBAC3B,OAAO,0CAA0C,IAAI,EAAE,CAAA;YACzD,SAAS,IAAI,WAAW,CAAA;SACzB;KACF;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAnBY,QAAA,uBAAuB,2BAmBnC;AAED;;;GAGG;AACU,QAAA,mBAAmB,GAAG;IACjC,qBAAS;IACT,eAAM;IACN,WAAI;IACJ,mBAAQ;IACR,iBAAO;IACP,iBAAO;CACC,CAAA;AAEV;;;GAGG;AACU,QAAA,oBAAoB,GAAG;IAClC,kCAAe;IACf,0BAAW;IACX,0BAAQ;CACA,CAAA;AAEV;;;GAGG;AACU,QAAA,WAAW,GAAG;IACzB,GAAG,4BAAoB;IACvB,GAAG,2BAAmB;CACd,CAAA"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Validation } from '../types';
|
|
2
|
-
export declare const allowList: Set<string>;
|
|
3
2
|
export declare const faceThumbnail: Validation;
|
|
4
|
-
export declare const wearableUrns: Validation;
|
|
5
3
|
/**
|
|
6
4
|
* Validate that given profile deployment includes the face256 file with the correct size
|
|
7
5
|
* * @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/validations/profile.ts"],"names":[],"mappings":"AAGA,OAAO,EAAM,UAAU,EAAoB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/validations/profile.ts"],"names":[],"mappings":"AAGA,OAAO,EAAM,UAAU,EAAoB,MAAM,UAAU,CAAA;AAI3D,eAAO,MAAM,aAAa,EAAE,UAmD3B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,UAMrB,CAAA"}
|
|
@@ -3,35 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.profile = exports.
|
|
6
|
+
exports.profile = exports.faceThumbnail = void 0;
|
|
7
7
|
const schemas_1 = require("@dcl/schemas");
|
|
8
8
|
const sharp_1 = __importDefault(require("sharp"));
|
|
9
9
|
const _1 = require(".");
|
|
10
10
|
const types_1 = require("../types");
|
|
11
|
-
const urn_resolver_1 = require("@dcl/urn-resolver");
|
|
12
11
|
/** Validate that given profile deployment includes a face256 thumbnail with valid size */
|
|
13
12
|
const defaultThumbnailSize = 256;
|
|
14
|
-
exports.allowList = new Set([
|
|
15
|
-
'clap',
|
|
16
|
-
'dab',
|
|
17
|
-
'dance',
|
|
18
|
-
'disco',
|
|
19
|
-
'dontsee',
|
|
20
|
-
'fistpump',
|
|
21
|
-
'hammer',
|
|
22
|
-
'handsair',
|
|
23
|
-
'headexplode',
|
|
24
|
-
'hohoho',
|
|
25
|
-
'kiss',
|
|
26
|
-
'money',
|
|
27
|
-
'raiseHand',
|
|
28
|
-
'robot',
|
|
29
|
-
'shrug',
|
|
30
|
-
'snowfall',
|
|
31
|
-
'tektonik',
|
|
32
|
-
'tik',
|
|
33
|
-
'wave'
|
|
34
|
-
]);
|
|
35
13
|
exports.faceThumbnail = {
|
|
36
14
|
validate: async ({ externalCalls }, deployment) => {
|
|
37
15
|
if (deployment.entity.timestamp < _1.ADR_45_TIMESTAMP)
|
|
@@ -69,24 +47,6 @@ exports.faceThumbnail = {
|
|
|
69
47
|
return errors.length > 0 ? (0, types_1.validationFailed)(...errors) : types_1.OK;
|
|
70
48
|
}
|
|
71
49
|
};
|
|
72
|
-
exports.wearableUrns = {
|
|
73
|
-
validate: async (components, deployment) => {
|
|
74
|
-
if (deployment.entity.timestamp < _1.ADR_XXX_TIMESTAMP)
|
|
75
|
-
return types_1.OK;
|
|
76
|
-
const allAvatars = deployment.entity.metadata?.avatars ?? [];
|
|
77
|
-
for (const avatar of allAvatars) {
|
|
78
|
-
for (const pointer of avatar.avatar.wearables) {
|
|
79
|
-
if (exports.allowList.has(pointer)) {
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
const parsed = await (0, urn_resolver_1.parseUrn)(pointer);
|
|
83
|
-
if (!parsed)
|
|
84
|
-
return (0, types_1.validationFailed)(`Wearable pointers should be a urn, for example (urn:decentraland:{protocol}:collections-v2:{contract(0x[a-fA-F0-9]+)}:{name}). Invalid pointer: (${pointer})`);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return types_1.OK;
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
50
|
/**
|
|
91
51
|
* Validate that given profile deployment includes the face256 file with the correct size
|
|
92
52
|
* * @public
|
|
@@ -95,7 +55,7 @@ exports.profile = {
|
|
|
95
55
|
validate: async (components, deployment) => {
|
|
96
56
|
if (deployment.entity.type !== schemas_1.EntityType.PROFILE)
|
|
97
57
|
return types_1.OK;
|
|
98
|
-
return
|
|
58
|
+
return exports.faceThumbnail.validate(components, deployment);
|
|
99
59
|
}
|
|
100
60
|
};
|
|
101
61
|
//# sourceMappingURL=profile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/validations/profile.ts"],"names":[],"mappings":";;;;;;AAAA,0CAAyC;AACzC,kDAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/validations/profile.ts"],"names":[],"mappings":";;;;;;AAAA,0CAAyC;AACzC,kDAAyB;AACzB,wBAAoC;AACpC,oCAA2D;AAE3D,0FAA0F;AAC1F,MAAM,oBAAoB,GAAG,GAAG,CAAA;AACnB,QAAA,aAAa,GAAe;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M,KAAK,oBAAoB,EAC/B;oBACA,MAAM,CAAC,IAAI,CACT,iDAAiD,KAAK,eAAe,MAAM,GAAG,CAC/E,CAAA;iBACF;aACF;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,IAAI,CACT,8DAA8D,CAC/D,CAAA;aACF;SACF;QACD,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAA,wBAAgB,EAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,UAAE,CAAA;IAC7D,CAAC;CACF,CAAA;AAED;;;GAGG;AACU,QAAA,OAAO,GAAe;IACjC,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE;QACzC,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,KAAK,oBAAU,CAAC,OAAO;YAAE,OAAO,UAAE,CAAA;QAE5D,OAAO,qBAAa,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;IACvD,CAAC;CACF,CAAA"}
|
|
@@ -104,7 +104,7 @@ exports.wearable = {
|
|
|
104
104
|
validate: async (components, deployment) => {
|
|
105
105
|
if (deployment.entity.type !== schemas_1.EntityType.WEARABLE)
|
|
106
106
|
return types_1.OK;
|
|
107
|
-
return (0, _1.validateInRow)(
|
|
107
|
+
return (0, _1.validateInRow)(deployment, components, exports.wearableRepresentationContent, exports.wearableThumbnail, exports.wearableSize);
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
110
|
//# sourceMappingURL=wearable.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/content-validator",
|
|
3
|
-
"version": "2.0.1-
|
|
3
|
+
"version": "2.0.1-20220614191517.commit-d08a851",
|
|
4
4
|
"description": "Catalyst content validations",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"files": [
|
|
60
60
|
"dist"
|
|
61
61
|
],
|
|
62
|
-
"commit": "
|
|
62
|
+
"commit": "d08a851c4744cc64e2274d6fcfe655186694a42b"
|
|
63
63
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ContentValidatorComponents, TheGraphClient } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
export declare const createTheGraphClient: (components: Pick<ContentValidatorComponents, 'logs' | 'externalCalls'>) => TheGraphClient;
|
|
6
|
-
//# sourceMappingURL=the-graph-client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"the-graph-client.d.ts","sourceRoot":"","sources":["../../src/the-graph-client/the-graph-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,cAAc,EAAQ,MAAM,UAAU,CAAA;AAG3E;;GAEG;AACH,eAAO,MAAM,oBAAoB,eACnB,KAAK,0BAA0B,EAAE,MAAM,GAAG,eAAe,CAAC,KACrE,cAgPF,CAAA"}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTheGraphClient = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
const createTheGraphClient = (components) => {
|
|
8
|
-
const logger = components.logs.getLogger('TheGraphClient');
|
|
9
|
-
const urls = {
|
|
10
|
-
collectionsSubgraph: components.externalCalls.subgraphs.L1.collections,
|
|
11
|
-
blocksSubgraph: components.externalCalls.subgraphs.L1.blocks,
|
|
12
|
-
maticBlocksSubgraph: components.externalCalls.subgraphs.L2.blocks,
|
|
13
|
-
ensSubgraph: components.externalCalls.subgraphs.L1.ensOwner,
|
|
14
|
-
maticCollectionsSubgraph: components.externalCalls.subgraphs.L2.collections,
|
|
15
|
-
thirdPartyRegistrySubgraph: components.externalCalls.subgraphs.L2.thirdPartyRegistry
|
|
16
|
-
};
|
|
17
|
-
const checkForNamesOwnershipWithTimestamp = async (ethAddress, namesToCheck, timestamp) => {
|
|
18
|
-
const blocks = await findBlocksForTimestamp('blocksSubgraph', timestamp);
|
|
19
|
-
const blocksToCheck = [
|
|
20
|
-
blocks.blockNumberAtDeployment ?? -1,
|
|
21
|
-
blocks.blockNumberFiveMinBeforeDeployment ?? -1
|
|
22
|
-
].filter((block) => block !== -1);
|
|
23
|
-
const namesQuery = `{` +
|
|
24
|
-
blocksToCheck
|
|
25
|
-
.map((block) => getNamesForBlockFragment(block, ethAddress, namesToCheck))
|
|
26
|
-
.join('\n') +
|
|
27
|
-
`}`;
|
|
28
|
-
const mapper = (response) => Object.entries(response).reduce((set, [, names]) => {
|
|
29
|
-
names.forEach(({ name }) => set.add(name));
|
|
30
|
-
return set;
|
|
31
|
-
}, new Set());
|
|
32
|
-
const query = {
|
|
33
|
-
description: 'check for names ownership',
|
|
34
|
-
subgraph: 'ensSubgraph',
|
|
35
|
-
query: namesQuery,
|
|
36
|
-
mapper
|
|
37
|
-
};
|
|
38
|
-
return runQuery(query, {});
|
|
39
|
-
};
|
|
40
|
-
const getNamesForBlockFragment = (block, ethAddress, names) => {
|
|
41
|
-
const nameList = names.map((name) => `"${name}"`).join(',');
|
|
42
|
-
return `
|
|
43
|
-
B${block}: nfts(
|
|
44
|
-
block: { number: ${block} }
|
|
45
|
-
where: { owner: "${ethAddress}", category: ens, name_in: [${nameList}] }
|
|
46
|
-
first: 1000
|
|
47
|
-
) {
|
|
48
|
-
name
|
|
49
|
-
}`;
|
|
50
|
-
};
|
|
51
|
-
const checkForWearablesOwnershipWithTimestamp = async (ethAddress, wearableIdsToCheck, timestamp) => {
|
|
52
|
-
const ethereumWearablesOwnersPromise = getOwnersByWearableWithTimestamp(ethAddress, wearableIdsToCheck, timestamp, 'blocksSubgraph', 'collectionsSubgraph');
|
|
53
|
-
const maticWearablesOwnersPromise = getOwnersByWearableWithTimestamp(ethAddress, wearableIdsToCheck, timestamp, 'maticBlocksSubgraph', 'maticCollectionsSubgraph');
|
|
54
|
-
const [ethereumWearablesOwners, maticWearablesOwners] = await Promise.all([
|
|
55
|
-
ethereumWearablesOwnersPromise,
|
|
56
|
-
maticWearablesOwnersPromise
|
|
57
|
-
]);
|
|
58
|
-
return new Set([...ethereumWearablesOwners, ...maticWearablesOwners]);
|
|
59
|
-
};
|
|
60
|
-
const getOwnersByWearableWithTimestamp = async (ethAddress, wearableIdsToCheck, timestamp, blocksSubgraph, collectionsSubgraph) => {
|
|
61
|
-
const blocks = await findBlocksForTimestamp(blocksSubgraph, timestamp);
|
|
62
|
-
const blocksToCheck = [
|
|
63
|
-
blocks.blockNumberAtDeployment ?? -1,
|
|
64
|
-
blocks.blockNumberFiveMinBeforeDeployment ?? -1
|
|
65
|
-
].filter((block) => block !== -1);
|
|
66
|
-
const subgraphQuery = `{` +
|
|
67
|
-
blocksToCheck
|
|
68
|
-
.map((block) => getWearablesForBlockFragment(block, ethAddress, wearableIdsToCheck))
|
|
69
|
-
.join('\n') +
|
|
70
|
-
`}`;
|
|
71
|
-
const mapper = (response) => Object.entries(response).reduce((set, [, names]) => {
|
|
72
|
-
names.forEach(({ urn }) => set.add(urn));
|
|
73
|
-
return set;
|
|
74
|
-
}, new Set());
|
|
75
|
-
const query = {
|
|
76
|
-
description: 'check for wearables ownership',
|
|
77
|
-
subgraph: collectionsSubgraph,
|
|
78
|
-
query: subgraphQuery,
|
|
79
|
-
mapper
|
|
80
|
-
};
|
|
81
|
-
return runQuery(query, {});
|
|
82
|
-
};
|
|
83
|
-
const getWearablesForBlockFragment = (block, ethAddress, wearableIds) => {
|
|
84
|
-
const urnList = wearableIds.map((wearableId) => `"${wearableId}"`).join(',');
|
|
85
|
-
return `
|
|
86
|
-
B${block}: nfts(
|
|
87
|
-
block: {number: ${block}}
|
|
88
|
-
where: {
|
|
89
|
-
owner: "${ethAddress}",
|
|
90
|
-
searchItemType_in: ["wearable_v1", "wearable_v2", "smart_wearable_v1", "emote_v1"],
|
|
91
|
-
urn_in: [${urnList}]
|
|
92
|
-
}
|
|
93
|
-
first: 1000
|
|
94
|
-
) {
|
|
95
|
-
urn
|
|
96
|
-
}`;
|
|
97
|
-
};
|
|
98
|
-
const runQuery = async (query, variables) => {
|
|
99
|
-
try {
|
|
100
|
-
const response = await components.externalCalls.queryGraph(urls[query.subgraph], query.query, variables);
|
|
101
|
-
return query.mapper(response);
|
|
102
|
-
}
|
|
103
|
-
catch (error) {
|
|
104
|
-
console.log(error);
|
|
105
|
-
logger.error(`Failed to execute the following query to the subgraph ${urls[query.subgraph]} ${query.description}'.`, {
|
|
106
|
-
query: query.query,
|
|
107
|
-
variables: JSON.stringify(variables)
|
|
108
|
-
});
|
|
109
|
-
throw new Error('Internal server error');
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
const findBlocksForTimestamp = async (subgraph, timestamp) => {
|
|
113
|
-
const query = {
|
|
114
|
-
description: 'fetch blocks for timestamp',
|
|
115
|
-
subgraph: subgraph,
|
|
116
|
-
query: QUERY_BLOCKS_FOR_TIMESTAMP,
|
|
117
|
-
mapper: (response) => {
|
|
118
|
-
const blockNumberAtDeployment = response.max[0].number;
|
|
119
|
-
const blockNumberFiveMinBeforeDeployment = response.min[0].number;
|
|
120
|
-
if (blockNumberAtDeployment === undefined &&
|
|
121
|
-
blockNumberFiveMinBeforeDeployment === undefined) {
|
|
122
|
-
throw new Error(`Failed to find blocks for the specific timestamp`);
|
|
123
|
-
}
|
|
124
|
-
return {
|
|
125
|
-
blockNumberAtDeployment: !!blockNumberAtDeployment
|
|
126
|
-
? parseInt(blockNumberAtDeployment)
|
|
127
|
-
: undefined,
|
|
128
|
-
blockNumberFiveMinBeforeDeployment: !!blockNumberFiveMinBeforeDeployment
|
|
129
|
-
? parseInt(blockNumberFiveMinBeforeDeployment)
|
|
130
|
-
: undefined
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
const timestampSec = Math.ceil(timestamp / 1000);
|
|
135
|
-
const timestamp5MinAgo = timestampSec - 60 * 5;
|
|
136
|
-
return await runQuery(query, {
|
|
137
|
-
timestamp: timestampSec,
|
|
138
|
-
timestamp5Min: timestamp5MinAgo
|
|
139
|
-
});
|
|
140
|
-
};
|
|
141
|
-
return {
|
|
142
|
-
checkForNamesOwnershipWithTimestamp,
|
|
143
|
-
checkForWearablesOwnershipWithTimestamp,
|
|
144
|
-
findBlocksForTimestamp
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
exports.createTheGraphClient = createTheGraphClient;
|
|
148
|
-
const QUERY_BLOCKS_FOR_TIMESTAMP = `
|
|
149
|
-
query getBlockForTimestampRange($timestamp: Int!, $timestamp5Min: Int!) {
|
|
150
|
-
min: blocks(
|
|
151
|
-
where: {timestamp_gte: $timestamp5Min, timestamp_lte: $timestamp}
|
|
152
|
-
first: 1
|
|
153
|
-
orderBy: timestamp
|
|
154
|
-
orderDirection: desc
|
|
155
|
-
) {
|
|
156
|
-
number
|
|
157
|
-
}
|
|
158
|
-
max: blocks(
|
|
159
|
-
where: {timestamp_gte: $timestamp5Min, timestamp_lte: $timestamp}
|
|
160
|
-
first: 1
|
|
161
|
-
orderBy: timestamp
|
|
162
|
-
orderDirection: asc
|
|
163
|
-
) {
|
|
164
|
-
number
|
|
165
|
-
}
|
|
166
|
-
}`;
|
|
167
|
-
//# sourceMappingURL=the-graph-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"the-graph-client.js","sourceRoot":"","sources":["../../src/the-graph-client/the-graph-client.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACI,MAAM,oBAAoB,GAAG,CAClC,UAAsE,EACtD,EAAE;IAClB,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;IAE1D,MAAM,IAAI,GAAS;QACjB,mBAAmB,EAAE,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC,WAAW;QACtE,cA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