@seedprotocol/eas 0.5.1

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.
Files changed (57) hide show
  1. package/dist/EasClient/BaseEasClient.d.ts +16 -0
  2. package/dist/EasClient/BaseEasClient.d.ts.map +1 -0
  3. package/dist/EasClient/IEasClient.d.ts +5 -0
  4. package/dist/EasClient/IEasClient.d.ts.map +1 -0
  5. package/dist/QueryClient/BaseQueryClient.d.ts +9 -0
  6. package/dist/QueryClient/BaseQueryClient.d.ts.map +1 -0
  7. package/dist/QueryClient/IQueryClient.d.ts +15 -0
  8. package/dist/QueryClient/IQueryClient.d.ts.map +1 -0
  9. package/dist/QueryClient/IQueryClientFactory.d.ts +5 -0
  10. package/dist/QueryClient/IQueryClientFactory.d.ts.map +1 -0
  11. package/dist/api.d.ts +25 -0
  12. package/dist/api.d.ts.map +1 -0
  13. package/dist/constants-Ch1B4W2F.js +35 -0
  14. package/dist/constants-Ch1B4W2F.js.map +1 -0
  15. package/dist/constants.d.ts +5 -0
  16. package/dist/constants.d.ts.map +1 -0
  17. package/dist/easPropertyCanonical.d.ts +15 -0
  18. package/dist/easPropertyCanonical.d.ts.map +1 -0
  19. package/dist/easRevokedFilter.d.ts +10 -0
  20. package/dist/easRevokedFilter.d.ts.map +1 -0
  21. package/dist/easUid.d.ts +13 -0
  22. package/dist/easUid.d.ts.map +1 -0
  23. package/dist/graphql/fragments/Attestation.d.ts +2 -0
  24. package/dist/graphql/fragments/Attestation.d.ts.map +1 -0
  25. package/dist/graphql/fragments/Schema.d.ts +2 -0
  26. package/dist/graphql/fragments/Schema.d.ts.map +1 -0
  27. package/dist/graphql/fragments/index.d.ts +3 -0
  28. package/dist/graphql/fragments/index.d.ts.map +1 -0
  29. package/dist/graphql/gql/fragment-masking.d.ts +20 -0
  30. package/dist/graphql/gql/fragment-masking.d.ts.map +1 -0
  31. package/dist/graphql/gql/gql.d.ts +97 -0
  32. package/dist/graphql/gql/gql.d.ts.map +1 -0
  33. package/dist/graphql/gql/graphql.d.ts +2683 -0
  34. package/dist/graphql/gql/graphql.d.ts.map +1 -0
  35. package/dist/graphql/gql/index.d.ts +3 -0
  36. package/dist/graphql/gql/index.d.ts.map +1 -0
  37. package/dist/index.d.ts +16 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.js +2210 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/node/EasClient.d.ts +9 -0
  42. package/dist/node/EasClient.d.ts.map +1 -0
  43. package/dist/node/QueryClient.d.ts +8 -0
  44. package/dist/node/QueryClient.d.ts.map +1 -0
  45. package/dist/node/index.d.ts +5 -0
  46. package/dist/node/index.d.ts.map +1 -0
  47. package/dist/node.js +31 -0
  48. package/dist/node.js.map +1 -0
  49. package/dist/queries.d.ts +36 -0
  50. package/dist/queries.d.ts.map +1 -0
  51. package/dist/shims/typed-document-node.d.ts +5 -0
  52. package/dist/shims/typed-document-node.d.ts.map +1 -0
  53. package/dist/stores/schemaUidCache.d.ts +13 -0
  54. package/dist/stores/schemaUidCache.d.ts.map +1 -0
  55. package/dist/utils.d.ts +4 -0
  56. package/dist/utils.d.ts.map +1 -0
  57. package/package.json +57 -0
package/dist/index.js ADDED
@@ -0,0 +1,2210 @@
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./constants-Ch1B4W2F.js";
2
+ import { keccak256 as o } from "js-sha3";
3
+ import "graphql";
4
+ //#region src/utils.ts
5
+ var s = (e) => e.replace(/([a-z])([A-Z])/g, "$1_$2").toLowerCase();
6
+ function c(e) {
7
+ let t = e.toLowerCase().replace(/^0x/, "");
8
+ if (t.length !== 40 || !/^[0-9a-f]+$/.test(t)) return e;
9
+ let n = o(t), r = "0x";
10
+ for (let e = 0; e < 40; e++) r += parseInt(n[e], 16) >= 8 ? t[e].toUpperCase() : t[e];
11
+ return r;
12
+ }
13
+ //#endregion
14
+ //#region src/easPropertyCanonical.ts
15
+ function l(e) {
16
+ let t = /* @__PURE__ */ new Map();
17
+ for (let n of e) {
18
+ let e = n.schemaId;
19
+ if (!e) continue;
20
+ let r = `${n.refUID ?? ""}:${e}`, i = t.get(r), a = n.timeCreated ?? 0, o = i?.timeCreated ?? 0;
21
+ (!i || a > o) && t.set(r, n);
22
+ }
23
+ return [...t.values()];
24
+ }
25
+ //#endregion
26
+ //#region src/easRevokedFilter.ts
27
+ function u(e) {
28
+ let t = { revoked: { equals: !1 } }, n = Array.isArray(e.AND) ? e.AND : [];
29
+ return {
30
+ ...e,
31
+ AND: [...n, t]
32
+ };
33
+ }
34
+ //#endregion
35
+ //#region src/graphql/gql/gql.ts
36
+ var d = {
37
+ "\n fragment attestationFields on Attestation {\n id\n decodedDataJson\n attester\n schema {\n schemaNames {\n name\n }\n }\n refUID\n revoked\n schemaId\n txid\n timeCreated\n time\n isOffchain\n }\n": {
38
+ kind: "Document",
39
+ definitions: [{
40
+ kind: "FragmentDefinition",
41
+ name: {
42
+ kind: "Name",
43
+ value: "attestationFields"
44
+ },
45
+ typeCondition: {
46
+ kind: "NamedType",
47
+ name: {
48
+ kind: "Name",
49
+ value: "Attestation"
50
+ }
51
+ },
52
+ selectionSet: {
53
+ kind: "SelectionSet",
54
+ selections: [
55
+ {
56
+ kind: "Field",
57
+ name: {
58
+ kind: "Name",
59
+ value: "id"
60
+ }
61
+ },
62
+ {
63
+ kind: "Field",
64
+ name: {
65
+ kind: "Name",
66
+ value: "decodedDataJson"
67
+ }
68
+ },
69
+ {
70
+ kind: "Field",
71
+ name: {
72
+ kind: "Name",
73
+ value: "attester"
74
+ }
75
+ },
76
+ {
77
+ kind: "Field",
78
+ name: {
79
+ kind: "Name",
80
+ value: "schema"
81
+ },
82
+ selectionSet: {
83
+ kind: "SelectionSet",
84
+ selections: [{
85
+ kind: "Field",
86
+ name: {
87
+ kind: "Name",
88
+ value: "schemaNames"
89
+ },
90
+ selectionSet: {
91
+ kind: "SelectionSet",
92
+ selections: [{
93
+ kind: "Field",
94
+ name: {
95
+ kind: "Name",
96
+ value: "name"
97
+ }
98
+ }]
99
+ }
100
+ }]
101
+ }
102
+ },
103
+ {
104
+ kind: "Field",
105
+ name: {
106
+ kind: "Name",
107
+ value: "refUID"
108
+ }
109
+ },
110
+ {
111
+ kind: "Field",
112
+ name: {
113
+ kind: "Name",
114
+ value: "revoked"
115
+ }
116
+ },
117
+ {
118
+ kind: "Field",
119
+ name: {
120
+ kind: "Name",
121
+ value: "schemaId"
122
+ }
123
+ },
124
+ {
125
+ kind: "Field",
126
+ name: {
127
+ kind: "Name",
128
+ value: "txid"
129
+ }
130
+ },
131
+ {
132
+ kind: "Field",
133
+ name: {
134
+ kind: "Name",
135
+ value: "timeCreated"
136
+ }
137
+ },
138
+ {
139
+ kind: "Field",
140
+ name: {
141
+ kind: "Name",
142
+ value: "time"
143
+ }
144
+ },
145
+ {
146
+ kind: "Field",
147
+ name: {
148
+ kind: "Name",
149
+ value: "isOffchain"
150
+ }
151
+ }
152
+ ]
153
+ }
154
+ }]
155
+ },
156
+ "\n fragment schemaFields on Schema {\n id\n resolver\n revocable\n schema\n index\n schemaNames {\n name\n }\n time\n txid\n creator\n }\n": {
157
+ kind: "Document",
158
+ definitions: [{
159
+ kind: "FragmentDefinition",
160
+ name: {
161
+ kind: "Name",
162
+ value: "schemaFields"
163
+ },
164
+ typeCondition: {
165
+ kind: "NamedType",
166
+ name: {
167
+ kind: "Name",
168
+ value: "Schema"
169
+ }
170
+ },
171
+ selectionSet: {
172
+ kind: "SelectionSet",
173
+ selections: [
174
+ {
175
+ kind: "Field",
176
+ name: {
177
+ kind: "Name",
178
+ value: "id"
179
+ }
180
+ },
181
+ {
182
+ kind: "Field",
183
+ name: {
184
+ kind: "Name",
185
+ value: "resolver"
186
+ }
187
+ },
188
+ {
189
+ kind: "Field",
190
+ name: {
191
+ kind: "Name",
192
+ value: "revocable"
193
+ }
194
+ },
195
+ {
196
+ kind: "Field",
197
+ name: {
198
+ kind: "Name",
199
+ value: "schema"
200
+ }
201
+ },
202
+ {
203
+ kind: "Field",
204
+ name: {
205
+ kind: "Name",
206
+ value: "index"
207
+ }
208
+ },
209
+ {
210
+ kind: "Field",
211
+ name: {
212
+ kind: "Name",
213
+ value: "schemaNames"
214
+ },
215
+ selectionSet: {
216
+ kind: "SelectionSet",
217
+ selections: [{
218
+ kind: "Field",
219
+ name: {
220
+ kind: "Name",
221
+ value: "name"
222
+ }
223
+ }]
224
+ }
225
+ },
226
+ {
227
+ kind: "Field",
228
+ name: {
229
+ kind: "Name",
230
+ value: "time"
231
+ }
232
+ },
233
+ {
234
+ kind: "Field",
235
+ name: {
236
+ kind: "Name",
237
+ value: "txid"
238
+ }
239
+ },
240
+ {
241
+ kind: "Field",
242
+ name: {
243
+ kind: "Name",
244
+ value: "creator"
245
+ }
246
+ }
247
+ ]
248
+ }
249
+ }]
250
+ },
251
+ "\n query GetSchemas($where: SchemaWhereInput!) {\n schemas: schemata(where: $where) {\n id\n schema\n schemaNames {\n name\n }\n }\n }\n": {
252
+ kind: "Document",
253
+ definitions: [{
254
+ kind: "OperationDefinition",
255
+ operation: "query",
256
+ name: {
257
+ kind: "Name",
258
+ value: "GetSchemas"
259
+ },
260
+ variableDefinitions: [{
261
+ kind: "VariableDefinition",
262
+ variable: {
263
+ kind: "Variable",
264
+ name: {
265
+ kind: "Name",
266
+ value: "where"
267
+ }
268
+ },
269
+ type: {
270
+ kind: "NonNullType",
271
+ type: {
272
+ kind: "NamedType",
273
+ name: {
274
+ kind: "Name",
275
+ value: "SchemaWhereInput"
276
+ }
277
+ }
278
+ }
279
+ }],
280
+ selectionSet: {
281
+ kind: "SelectionSet",
282
+ selections: [{
283
+ kind: "Field",
284
+ alias: {
285
+ kind: "Name",
286
+ value: "schemas"
287
+ },
288
+ name: {
289
+ kind: "Name",
290
+ value: "schemata"
291
+ },
292
+ arguments: [{
293
+ kind: "Argument",
294
+ name: {
295
+ kind: "Name",
296
+ value: "where"
297
+ },
298
+ value: {
299
+ kind: "Variable",
300
+ name: {
301
+ kind: "Name",
302
+ value: "where"
303
+ }
304
+ }
305
+ }],
306
+ selectionSet: {
307
+ kind: "SelectionSet",
308
+ selections: [
309
+ {
310
+ kind: "Field",
311
+ name: {
312
+ kind: "Name",
313
+ value: "id"
314
+ }
315
+ },
316
+ {
317
+ kind: "Field",
318
+ name: {
319
+ kind: "Name",
320
+ value: "schema"
321
+ }
322
+ },
323
+ {
324
+ kind: "Field",
325
+ name: {
326
+ kind: "Name",
327
+ value: "schemaNames"
328
+ },
329
+ selectionSet: {
330
+ kind: "SelectionSet",
331
+ selections: [{
332
+ kind: "Field",
333
+ name: {
334
+ kind: "Name",
335
+ value: "name"
336
+ }
337
+ }]
338
+ }
339
+ }
340
+ ]
341
+ }
342
+ }]
343
+ }
344
+ }]
345
+ },
346
+ "\n query GetSchemaByName($where: SchemaWhereInput!) {\n schemas: schemata(where: $where) {\n id\n schema\n schemaNames {\n name\n }\n }\n }\n": {
347
+ kind: "Document",
348
+ definitions: [{
349
+ kind: "OperationDefinition",
350
+ operation: "query",
351
+ name: {
352
+ kind: "Name",
353
+ value: "GetSchemaByName"
354
+ },
355
+ variableDefinitions: [{
356
+ kind: "VariableDefinition",
357
+ variable: {
358
+ kind: "Variable",
359
+ name: {
360
+ kind: "Name",
361
+ value: "where"
362
+ }
363
+ },
364
+ type: {
365
+ kind: "NonNullType",
366
+ type: {
367
+ kind: "NamedType",
368
+ name: {
369
+ kind: "Name",
370
+ value: "SchemaWhereInput"
371
+ }
372
+ }
373
+ }
374
+ }],
375
+ selectionSet: {
376
+ kind: "SelectionSet",
377
+ selections: [{
378
+ kind: "Field",
379
+ alias: {
380
+ kind: "Name",
381
+ value: "schemas"
382
+ },
383
+ name: {
384
+ kind: "Name",
385
+ value: "schemata"
386
+ },
387
+ arguments: [{
388
+ kind: "Argument",
389
+ name: {
390
+ kind: "Name",
391
+ value: "where"
392
+ },
393
+ value: {
394
+ kind: "Variable",
395
+ name: {
396
+ kind: "Name",
397
+ value: "where"
398
+ }
399
+ }
400
+ }],
401
+ selectionSet: {
402
+ kind: "SelectionSet",
403
+ selections: [
404
+ {
405
+ kind: "Field",
406
+ name: {
407
+ kind: "Name",
408
+ value: "id"
409
+ }
410
+ },
411
+ {
412
+ kind: "Field",
413
+ name: {
414
+ kind: "Name",
415
+ value: "schema"
416
+ }
417
+ },
418
+ {
419
+ kind: "Field",
420
+ name: {
421
+ kind: "Name",
422
+ value: "schemaNames"
423
+ },
424
+ selectionSet: {
425
+ kind: "SelectionSet",
426
+ selections: [{
427
+ kind: "Field",
428
+ name: {
429
+ kind: "Name",
430
+ value: "name"
431
+ }
432
+ }]
433
+ }
434
+ }
435
+ ]
436
+ }
437
+ }]
438
+ }
439
+ }]
440
+ },
441
+ "\n query GetSeeds($where: AttestationWhereInput!, $take: Int, $skip: Int) {\n itemSeeds: attestations(where: $where, orderBy: [{ timeCreated: desc }], take: $take, skip: $skip) {\n id\n decodedDataJson\n attester\n schema {\n schemaNames {\n name\n }\n }\n refUID\n revoked\n revocationTime\n schemaId\n timeCreated\n isOffchain\n }\n }\n": {
442
+ kind: "Document",
443
+ definitions: [{
444
+ kind: "OperationDefinition",
445
+ operation: "query",
446
+ name: {
447
+ kind: "Name",
448
+ value: "GetSeeds"
449
+ },
450
+ variableDefinitions: [
451
+ {
452
+ kind: "VariableDefinition",
453
+ variable: {
454
+ kind: "Variable",
455
+ name: {
456
+ kind: "Name",
457
+ value: "where"
458
+ }
459
+ },
460
+ type: {
461
+ kind: "NonNullType",
462
+ type: {
463
+ kind: "NamedType",
464
+ name: {
465
+ kind: "Name",
466
+ value: "AttestationWhereInput"
467
+ }
468
+ }
469
+ }
470
+ },
471
+ {
472
+ kind: "VariableDefinition",
473
+ variable: {
474
+ kind: "Variable",
475
+ name: {
476
+ kind: "Name",
477
+ value: "take"
478
+ }
479
+ },
480
+ type: {
481
+ kind: "NamedType",
482
+ name: {
483
+ kind: "Name",
484
+ value: "Int"
485
+ }
486
+ }
487
+ },
488
+ {
489
+ kind: "VariableDefinition",
490
+ variable: {
491
+ kind: "Variable",
492
+ name: {
493
+ kind: "Name",
494
+ value: "skip"
495
+ }
496
+ },
497
+ type: {
498
+ kind: "NamedType",
499
+ name: {
500
+ kind: "Name",
501
+ value: "Int"
502
+ }
503
+ }
504
+ }
505
+ ],
506
+ selectionSet: {
507
+ kind: "SelectionSet",
508
+ selections: [{
509
+ kind: "Field",
510
+ alias: {
511
+ kind: "Name",
512
+ value: "itemSeeds"
513
+ },
514
+ name: {
515
+ kind: "Name",
516
+ value: "attestations"
517
+ },
518
+ arguments: [
519
+ {
520
+ kind: "Argument",
521
+ name: {
522
+ kind: "Name",
523
+ value: "where"
524
+ },
525
+ value: {
526
+ kind: "Variable",
527
+ name: {
528
+ kind: "Name",
529
+ value: "where"
530
+ }
531
+ }
532
+ },
533
+ {
534
+ kind: "Argument",
535
+ name: {
536
+ kind: "Name",
537
+ value: "orderBy"
538
+ },
539
+ value: {
540
+ kind: "ListValue",
541
+ values: [{
542
+ kind: "ObjectValue",
543
+ fields: [{
544
+ kind: "ObjectField",
545
+ name: {
546
+ kind: "Name",
547
+ value: "timeCreated"
548
+ },
549
+ value: {
550
+ kind: "EnumValue",
551
+ value: "desc"
552
+ }
553
+ }]
554
+ }]
555
+ }
556
+ },
557
+ {
558
+ kind: "Argument",
559
+ name: {
560
+ kind: "Name",
561
+ value: "take"
562
+ },
563
+ value: {
564
+ kind: "Variable",
565
+ name: {
566
+ kind: "Name",
567
+ value: "take"
568
+ }
569
+ }
570
+ },
571
+ {
572
+ kind: "Argument",
573
+ name: {
574
+ kind: "Name",
575
+ value: "skip"
576
+ },
577
+ value: {
578
+ kind: "Variable",
579
+ name: {
580
+ kind: "Name",
581
+ value: "skip"
582
+ }
583
+ }
584
+ }
585
+ ],
586
+ selectionSet: {
587
+ kind: "SelectionSet",
588
+ selections: [
589
+ {
590
+ kind: "Field",
591
+ name: {
592
+ kind: "Name",
593
+ value: "id"
594
+ }
595
+ },
596
+ {
597
+ kind: "Field",
598
+ name: {
599
+ kind: "Name",
600
+ value: "decodedDataJson"
601
+ }
602
+ },
603
+ {
604
+ kind: "Field",
605
+ name: {
606
+ kind: "Name",
607
+ value: "attester"
608
+ }
609
+ },
610
+ {
611
+ kind: "Field",
612
+ name: {
613
+ kind: "Name",
614
+ value: "schema"
615
+ },
616
+ selectionSet: {
617
+ kind: "SelectionSet",
618
+ selections: [{
619
+ kind: "Field",
620
+ name: {
621
+ kind: "Name",
622
+ value: "schemaNames"
623
+ },
624
+ selectionSet: {
625
+ kind: "SelectionSet",
626
+ selections: [{
627
+ kind: "Field",
628
+ name: {
629
+ kind: "Name",
630
+ value: "name"
631
+ }
632
+ }]
633
+ }
634
+ }]
635
+ }
636
+ },
637
+ {
638
+ kind: "Field",
639
+ name: {
640
+ kind: "Name",
641
+ value: "refUID"
642
+ }
643
+ },
644
+ {
645
+ kind: "Field",
646
+ name: {
647
+ kind: "Name",
648
+ value: "revoked"
649
+ }
650
+ },
651
+ {
652
+ kind: "Field",
653
+ name: {
654
+ kind: "Name",
655
+ value: "revocationTime"
656
+ }
657
+ },
658
+ {
659
+ kind: "Field",
660
+ name: {
661
+ kind: "Name",
662
+ value: "schemaId"
663
+ }
664
+ },
665
+ {
666
+ kind: "Field",
667
+ name: {
668
+ kind: "Name",
669
+ value: "timeCreated"
670
+ }
671
+ },
672
+ {
673
+ kind: "Field",
674
+ name: {
675
+ kind: "Name",
676
+ value: "isOffchain"
677
+ }
678
+ }
679
+ ]
680
+ }
681
+ }]
682
+ }
683
+ }]
684
+ },
685
+ "\n query GetSeedIds($where: AttestationWhereInput!) {\n itemSeedIds: attestations(where: $where, orderBy: [{ timeCreated: desc }]) {\n id\n }\n }\n": {
686
+ kind: "Document",
687
+ definitions: [{
688
+ kind: "OperationDefinition",
689
+ operation: "query",
690
+ name: {
691
+ kind: "Name",
692
+ value: "GetSeedIds"
693
+ },
694
+ variableDefinitions: [{
695
+ kind: "VariableDefinition",
696
+ variable: {
697
+ kind: "Variable",
698
+ name: {
699
+ kind: "Name",
700
+ value: "where"
701
+ }
702
+ },
703
+ type: {
704
+ kind: "NonNullType",
705
+ type: {
706
+ kind: "NamedType",
707
+ name: {
708
+ kind: "Name",
709
+ value: "AttestationWhereInput"
710
+ }
711
+ }
712
+ }
713
+ }],
714
+ selectionSet: {
715
+ kind: "SelectionSet",
716
+ selections: [{
717
+ kind: "Field",
718
+ alias: {
719
+ kind: "Name",
720
+ value: "itemSeedIds"
721
+ },
722
+ name: {
723
+ kind: "Name",
724
+ value: "attestations"
725
+ },
726
+ arguments: [{
727
+ kind: "Argument",
728
+ name: {
729
+ kind: "Name",
730
+ value: "where"
731
+ },
732
+ value: {
733
+ kind: "Variable",
734
+ name: {
735
+ kind: "Name",
736
+ value: "where"
737
+ }
738
+ }
739
+ }, {
740
+ kind: "Argument",
741
+ name: {
742
+ kind: "Name",
743
+ value: "orderBy"
744
+ },
745
+ value: {
746
+ kind: "ListValue",
747
+ values: [{
748
+ kind: "ObjectValue",
749
+ fields: [{
750
+ kind: "ObjectField",
751
+ name: {
752
+ kind: "Name",
753
+ value: "timeCreated"
754
+ },
755
+ value: {
756
+ kind: "EnumValue",
757
+ value: "desc"
758
+ }
759
+ }]
760
+ }]
761
+ }
762
+ }],
763
+ selectionSet: {
764
+ kind: "SelectionSet",
765
+ selections: [{
766
+ kind: "Field",
767
+ name: {
768
+ kind: "Name",
769
+ value: "id"
770
+ }
771
+ }]
772
+ }
773
+ }]
774
+ }
775
+ }]
776
+ },
777
+ "\n query GetStorageTransactionId($where: AttestationWhereInput!) {\n storageTransactionId: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n id\n decodedDataJson\n }\n }\n": {
778
+ kind: "Document",
779
+ definitions: [{
780
+ kind: "OperationDefinition",
781
+ operation: "query",
782
+ name: {
783
+ kind: "Name",
784
+ value: "GetStorageTransactionId"
785
+ },
786
+ variableDefinitions: [{
787
+ kind: "VariableDefinition",
788
+ variable: {
789
+ kind: "Variable",
790
+ name: {
791
+ kind: "Name",
792
+ value: "where"
793
+ }
794
+ },
795
+ type: {
796
+ kind: "NonNullType",
797
+ type: {
798
+ kind: "NamedType",
799
+ name: {
800
+ kind: "Name",
801
+ value: "AttestationWhereInput"
802
+ }
803
+ }
804
+ }
805
+ }],
806
+ selectionSet: {
807
+ kind: "SelectionSet",
808
+ selections: [{
809
+ kind: "Field",
810
+ alias: {
811
+ kind: "Name",
812
+ value: "storageTransactionId"
813
+ },
814
+ name: {
815
+ kind: "Name",
816
+ value: "attestations"
817
+ },
818
+ arguments: [{
819
+ kind: "Argument",
820
+ name: {
821
+ kind: "Name",
822
+ value: "where"
823
+ },
824
+ value: {
825
+ kind: "Variable",
826
+ name: {
827
+ kind: "Name",
828
+ value: "where"
829
+ }
830
+ }
831
+ }, {
832
+ kind: "Argument",
833
+ name: {
834
+ kind: "Name",
835
+ value: "orderBy"
836
+ },
837
+ value: {
838
+ kind: "ListValue",
839
+ values: [{
840
+ kind: "ObjectValue",
841
+ fields: [{
842
+ kind: "ObjectField",
843
+ name: {
844
+ kind: "Name",
845
+ value: "timeCreated"
846
+ },
847
+ value: {
848
+ kind: "EnumValue",
849
+ value: "desc"
850
+ }
851
+ }]
852
+ }]
853
+ }
854
+ }],
855
+ selectionSet: {
856
+ kind: "SelectionSet",
857
+ selections: [{
858
+ kind: "Field",
859
+ name: {
860
+ kind: "Name",
861
+ value: "id"
862
+ }
863
+ }, {
864
+ kind: "Field",
865
+ name: {
866
+ kind: "Name",
867
+ value: "decodedDataJson"
868
+ }
869
+ }]
870
+ }
871
+ }]
872
+ }
873
+ }]
874
+ },
875
+ "\n query GetVersions($where: AttestationWhereInput!) {\n itemVersions: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n ...attestationFields\n }\n }\n": {
876
+ kind: "Document",
877
+ definitions: [{
878
+ kind: "OperationDefinition",
879
+ operation: "query",
880
+ name: {
881
+ kind: "Name",
882
+ value: "GetVersions"
883
+ },
884
+ variableDefinitions: [{
885
+ kind: "VariableDefinition",
886
+ variable: {
887
+ kind: "Variable",
888
+ name: {
889
+ kind: "Name",
890
+ value: "where"
891
+ }
892
+ },
893
+ type: {
894
+ kind: "NonNullType",
895
+ type: {
896
+ kind: "NamedType",
897
+ name: {
898
+ kind: "Name",
899
+ value: "AttestationWhereInput"
900
+ }
901
+ }
902
+ }
903
+ }],
904
+ selectionSet: {
905
+ kind: "SelectionSet",
906
+ selections: [{
907
+ kind: "Field",
908
+ alias: {
909
+ kind: "Name",
910
+ value: "itemVersions"
911
+ },
912
+ name: {
913
+ kind: "Name",
914
+ value: "attestations"
915
+ },
916
+ arguments: [{
917
+ kind: "Argument",
918
+ name: {
919
+ kind: "Name",
920
+ value: "where"
921
+ },
922
+ value: {
923
+ kind: "Variable",
924
+ name: {
925
+ kind: "Name",
926
+ value: "where"
927
+ }
928
+ }
929
+ }, {
930
+ kind: "Argument",
931
+ name: {
932
+ kind: "Name",
933
+ value: "orderBy"
934
+ },
935
+ value: {
936
+ kind: "ListValue",
937
+ values: [{
938
+ kind: "ObjectValue",
939
+ fields: [{
940
+ kind: "ObjectField",
941
+ name: {
942
+ kind: "Name",
943
+ value: "timeCreated"
944
+ },
945
+ value: {
946
+ kind: "EnumValue",
947
+ value: "desc"
948
+ }
949
+ }]
950
+ }]
951
+ }
952
+ }],
953
+ selectionSet: {
954
+ kind: "SelectionSet",
955
+ selections: [{
956
+ kind: "FragmentSpread",
957
+ name: {
958
+ kind: "Name",
959
+ value: "attestationFields"
960
+ }
961
+ }]
962
+ }
963
+ }]
964
+ }
965
+ }, {
966
+ kind: "FragmentDefinition",
967
+ name: {
968
+ kind: "Name",
969
+ value: "attestationFields"
970
+ },
971
+ typeCondition: {
972
+ kind: "NamedType",
973
+ name: {
974
+ kind: "Name",
975
+ value: "Attestation"
976
+ }
977
+ },
978
+ selectionSet: {
979
+ kind: "SelectionSet",
980
+ selections: [
981
+ {
982
+ kind: "Field",
983
+ name: {
984
+ kind: "Name",
985
+ value: "id"
986
+ }
987
+ },
988
+ {
989
+ kind: "Field",
990
+ name: {
991
+ kind: "Name",
992
+ value: "decodedDataJson"
993
+ }
994
+ },
995
+ {
996
+ kind: "Field",
997
+ name: {
998
+ kind: "Name",
999
+ value: "attester"
1000
+ }
1001
+ },
1002
+ {
1003
+ kind: "Field",
1004
+ name: {
1005
+ kind: "Name",
1006
+ value: "schema"
1007
+ },
1008
+ selectionSet: {
1009
+ kind: "SelectionSet",
1010
+ selections: [{
1011
+ kind: "Field",
1012
+ name: {
1013
+ kind: "Name",
1014
+ value: "schemaNames"
1015
+ },
1016
+ selectionSet: {
1017
+ kind: "SelectionSet",
1018
+ selections: [{
1019
+ kind: "Field",
1020
+ name: {
1021
+ kind: "Name",
1022
+ value: "name"
1023
+ }
1024
+ }]
1025
+ }
1026
+ }]
1027
+ }
1028
+ },
1029
+ {
1030
+ kind: "Field",
1031
+ name: {
1032
+ kind: "Name",
1033
+ value: "refUID"
1034
+ }
1035
+ },
1036
+ {
1037
+ kind: "Field",
1038
+ name: {
1039
+ kind: "Name",
1040
+ value: "revoked"
1041
+ }
1042
+ },
1043
+ {
1044
+ kind: "Field",
1045
+ name: {
1046
+ kind: "Name",
1047
+ value: "schemaId"
1048
+ }
1049
+ },
1050
+ {
1051
+ kind: "Field",
1052
+ name: {
1053
+ kind: "Name",
1054
+ value: "txid"
1055
+ }
1056
+ },
1057
+ {
1058
+ kind: "Field",
1059
+ name: {
1060
+ kind: "Name",
1061
+ value: "timeCreated"
1062
+ }
1063
+ },
1064
+ {
1065
+ kind: "Field",
1066
+ name: {
1067
+ kind: "Name",
1068
+ value: "time"
1069
+ }
1070
+ },
1071
+ {
1072
+ kind: "Field",
1073
+ name: {
1074
+ kind: "Name",
1075
+ value: "isOffchain"
1076
+ }
1077
+ }
1078
+ ]
1079
+ }
1080
+ }]
1081
+ },
1082
+ "\n query GetProperties($where: AttestationWhereInput!) {\n itemProperties: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n ...attestationFields\n }\n }\n": {
1083
+ kind: "Document",
1084
+ definitions: [{
1085
+ kind: "OperationDefinition",
1086
+ operation: "query",
1087
+ name: {
1088
+ kind: "Name",
1089
+ value: "GetProperties"
1090
+ },
1091
+ variableDefinitions: [{
1092
+ kind: "VariableDefinition",
1093
+ variable: {
1094
+ kind: "Variable",
1095
+ name: {
1096
+ kind: "Name",
1097
+ value: "where"
1098
+ }
1099
+ },
1100
+ type: {
1101
+ kind: "NonNullType",
1102
+ type: {
1103
+ kind: "NamedType",
1104
+ name: {
1105
+ kind: "Name",
1106
+ value: "AttestationWhereInput"
1107
+ }
1108
+ }
1109
+ }
1110
+ }],
1111
+ selectionSet: {
1112
+ kind: "SelectionSet",
1113
+ selections: [{
1114
+ kind: "Field",
1115
+ alias: {
1116
+ kind: "Name",
1117
+ value: "itemProperties"
1118
+ },
1119
+ name: {
1120
+ kind: "Name",
1121
+ value: "attestations"
1122
+ },
1123
+ arguments: [{
1124
+ kind: "Argument",
1125
+ name: {
1126
+ kind: "Name",
1127
+ value: "where"
1128
+ },
1129
+ value: {
1130
+ kind: "Variable",
1131
+ name: {
1132
+ kind: "Name",
1133
+ value: "where"
1134
+ }
1135
+ }
1136
+ }, {
1137
+ kind: "Argument",
1138
+ name: {
1139
+ kind: "Name",
1140
+ value: "orderBy"
1141
+ },
1142
+ value: {
1143
+ kind: "ListValue",
1144
+ values: [{
1145
+ kind: "ObjectValue",
1146
+ fields: [{
1147
+ kind: "ObjectField",
1148
+ name: {
1149
+ kind: "Name",
1150
+ value: "timeCreated"
1151
+ },
1152
+ value: {
1153
+ kind: "EnumValue",
1154
+ value: "desc"
1155
+ }
1156
+ }]
1157
+ }]
1158
+ }
1159
+ }],
1160
+ selectionSet: {
1161
+ kind: "SelectionSet",
1162
+ selections: [{
1163
+ kind: "FragmentSpread",
1164
+ name: {
1165
+ kind: "Name",
1166
+ value: "attestationFields"
1167
+ }
1168
+ }]
1169
+ }
1170
+ }]
1171
+ }
1172
+ }, {
1173
+ kind: "FragmentDefinition",
1174
+ name: {
1175
+ kind: "Name",
1176
+ value: "attestationFields"
1177
+ },
1178
+ typeCondition: {
1179
+ kind: "NamedType",
1180
+ name: {
1181
+ kind: "Name",
1182
+ value: "Attestation"
1183
+ }
1184
+ },
1185
+ selectionSet: {
1186
+ kind: "SelectionSet",
1187
+ selections: [
1188
+ {
1189
+ kind: "Field",
1190
+ name: {
1191
+ kind: "Name",
1192
+ value: "id"
1193
+ }
1194
+ },
1195
+ {
1196
+ kind: "Field",
1197
+ name: {
1198
+ kind: "Name",
1199
+ value: "decodedDataJson"
1200
+ }
1201
+ },
1202
+ {
1203
+ kind: "Field",
1204
+ name: {
1205
+ kind: "Name",
1206
+ value: "attester"
1207
+ }
1208
+ },
1209
+ {
1210
+ kind: "Field",
1211
+ name: {
1212
+ kind: "Name",
1213
+ value: "schema"
1214
+ },
1215
+ selectionSet: {
1216
+ kind: "SelectionSet",
1217
+ selections: [{
1218
+ kind: "Field",
1219
+ name: {
1220
+ kind: "Name",
1221
+ value: "schemaNames"
1222
+ },
1223
+ selectionSet: {
1224
+ kind: "SelectionSet",
1225
+ selections: [{
1226
+ kind: "Field",
1227
+ name: {
1228
+ kind: "Name",
1229
+ value: "name"
1230
+ }
1231
+ }]
1232
+ }
1233
+ }]
1234
+ }
1235
+ },
1236
+ {
1237
+ kind: "Field",
1238
+ name: {
1239
+ kind: "Name",
1240
+ value: "refUID"
1241
+ }
1242
+ },
1243
+ {
1244
+ kind: "Field",
1245
+ name: {
1246
+ kind: "Name",
1247
+ value: "revoked"
1248
+ }
1249
+ },
1250
+ {
1251
+ kind: "Field",
1252
+ name: {
1253
+ kind: "Name",
1254
+ value: "schemaId"
1255
+ }
1256
+ },
1257
+ {
1258
+ kind: "Field",
1259
+ name: {
1260
+ kind: "Name",
1261
+ value: "txid"
1262
+ }
1263
+ },
1264
+ {
1265
+ kind: "Field",
1266
+ name: {
1267
+ kind: "Name",
1268
+ value: "timeCreated"
1269
+ }
1270
+ },
1271
+ {
1272
+ kind: "Field",
1273
+ name: {
1274
+ kind: "Name",
1275
+ value: "time"
1276
+ }
1277
+ },
1278
+ {
1279
+ kind: "Field",
1280
+ name: {
1281
+ kind: "Name",
1282
+ value: "isOffchain"
1283
+ }
1284
+ }
1285
+ ]
1286
+ }
1287
+ }]
1288
+ },
1289
+ "\n query GetAllPropertiesForAllVersions($where: AttestationWhereInput!) {\n allProperties: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n ...attestationFields\n }\n }\n": {
1290
+ kind: "Document",
1291
+ definitions: [{
1292
+ kind: "OperationDefinition",
1293
+ operation: "query",
1294
+ name: {
1295
+ kind: "Name",
1296
+ value: "GetAllPropertiesForAllVersions"
1297
+ },
1298
+ variableDefinitions: [{
1299
+ kind: "VariableDefinition",
1300
+ variable: {
1301
+ kind: "Variable",
1302
+ name: {
1303
+ kind: "Name",
1304
+ value: "where"
1305
+ }
1306
+ },
1307
+ type: {
1308
+ kind: "NonNullType",
1309
+ type: {
1310
+ kind: "NamedType",
1311
+ name: {
1312
+ kind: "Name",
1313
+ value: "AttestationWhereInput"
1314
+ }
1315
+ }
1316
+ }
1317
+ }],
1318
+ selectionSet: {
1319
+ kind: "SelectionSet",
1320
+ selections: [{
1321
+ kind: "Field",
1322
+ alias: {
1323
+ kind: "Name",
1324
+ value: "allProperties"
1325
+ },
1326
+ name: {
1327
+ kind: "Name",
1328
+ value: "attestations"
1329
+ },
1330
+ arguments: [{
1331
+ kind: "Argument",
1332
+ name: {
1333
+ kind: "Name",
1334
+ value: "where"
1335
+ },
1336
+ value: {
1337
+ kind: "Variable",
1338
+ name: {
1339
+ kind: "Name",
1340
+ value: "where"
1341
+ }
1342
+ }
1343
+ }, {
1344
+ kind: "Argument",
1345
+ name: {
1346
+ kind: "Name",
1347
+ value: "orderBy"
1348
+ },
1349
+ value: {
1350
+ kind: "ListValue",
1351
+ values: [{
1352
+ kind: "ObjectValue",
1353
+ fields: [{
1354
+ kind: "ObjectField",
1355
+ name: {
1356
+ kind: "Name",
1357
+ value: "timeCreated"
1358
+ },
1359
+ value: {
1360
+ kind: "EnumValue",
1361
+ value: "desc"
1362
+ }
1363
+ }]
1364
+ }]
1365
+ }
1366
+ }],
1367
+ selectionSet: {
1368
+ kind: "SelectionSet",
1369
+ selections: [{
1370
+ kind: "FragmentSpread",
1371
+ name: {
1372
+ kind: "Name",
1373
+ value: "attestationFields"
1374
+ }
1375
+ }]
1376
+ }
1377
+ }]
1378
+ }
1379
+ }, {
1380
+ kind: "FragmentDefinition",
1381
+ name: {
1382
+ kind: "Name",
1383
+ value: "attestationFields"
1384
+ },
1385
+ typeCondition: {
1386
+ kind: "NamedType",
1387
+ name: {
1388
+ kind: "Name",
1389
+ value: "Attestation"
1390
+ }
1391
+ },
1392
+ selectionSet: {
1393
+ kind: "SelectionSet",
1394
+ selections: [
1395
+ {
1396
+ kind: "Field",
1397
+ name: {
1398
+ kind: "Name",
1399
+ value: "id"
1400
+ }
1401
+ },
1402
+ {
1403
+ kind: "Field",
1404
+ name: {
1405
+ kind: "Name",
1406
+ value: "decodedDataJson"
1407
+ }
1408
+ },
1409
+ {
1410
+ kind: "Field",
1411
+ name: {
1412
+ kind: "Name",
1413
+ value: "attester"
1414
+ }
1415
+ },
1416
+ {
1417
+ kind: "Field",
1418
+ name: {
1419
+ kind: "Name",
1420
+ value: "schema"
1421
+ },
1422
+ selectionSet: {
1423
+ kind: "SelectionSet",
1424
+ selections: [{
1425
+ kind: "Field",
1426
+ name: {
1427
+ kind: "Name",
1428
+ value: "schemaNames"
1429
+ },
1430
+ selectionSet: {
1431
+ kind: "SelectionSet",
1432
+ selections: [{
1433
+ kind: "Field",
1434
+ name: {
1435
+ kind: "Name",
1436
+ value: "name"
1437
+ }
1438
+ }]
1439
+ }
1440
+ }]
1441
+ }
1442
+ },
1443
+ {
1444
+ kind: "Field",
1445
+ name: {
1446
+ kind: "Name",
1447
+ value: "refUID"
1448
+ }
1449
+ },
1450
+ {
1451
+ kind: "Field",
1452
+ name: {
1453
+ kind: "Name",
1454
+ value: "revoked"
1455
+ }
1456
+ },
1457
+ {
1458
+ kind: "Field",
1459
+ name: {
1460
+ kind: "Name",
1461
+ value: "schemaId"
1462
+ }
1463
+ },
1464
+ {
1465
+ kind: "Field",
1466
+ name: {
1467
+ kind: "Name",
1468
+ value: "txid"
1469
+ }
1470
+ },
1471
+ {
1472
+ kind: "Field",
1473
+ name: {
1474
+ kind: "Name",
1475
+ value: "timeCreated"
1476
+ }
1477
+ },
1478
+ {
1479
+ kind: "Field",
1480
+ name: {
1481
+ kind: "Name",
1482
+ value: "time"
1483
+ }
1484
+ },
1485
+ {
1486
+ kind: "Field",
1487
+ name: {
1488
+ kind: "Name",
1489
+ value: "isOffchain"
1490
+ }
1491
+ }
1492
+ ]
1493
+ }
1494
+ }]
1495
+ },
1496
+ "\n query GetFilesMetadata($where: AttestationWhereInput!) {\n filesMetadata: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n ...attestationFields\n }\n }\n": {
1497
+ kind: "Document",
1498
+ definitions: [{
1499
+ kind: "OperationDefinition",
1500
+ operation: "query",
1501
+ name: {
1502
+ kind: "Name",
1503
+ value: "GetFilesMetadata"
1504
+ },
1505
+ variableDefinitions: [{
1506
+ kind: "VariableDefinition",
1507
+ variable: {
1508
+ kind: "Variable",
1509
+ name: {
1510
+ kind: "Name",
1511
+ value: "where"
1512
+ }
1513
+ },
1514
+ type: {
1515
+ kind: "NonNullType",
1516
+ type: {
1517
+ kind: "NamedType",
1518
+ name: {
1519
+ kind: "Name",
1520
+ value: "AttestationWhereInput"
1521
+ }
1522
+ }
1523
+ }
1524
+ }],
1525
+ selectionSet: {
1526
+ kind: "SelectionSet",
1527
+ selections: [{
1528
+ kind: "Field",
1529
+ alias: {
1530
+ kind: "Name",
1531
+ value: "filesMetadata"
1532
+ },
1533
+ name: {
1534
+ kind: "Name",
1535
+ value: "attestations"
1536
+ },
1537
+ arguments: [{
1538
+ kind: "Argument",
1539
+ name: {
1540
+ kind: "Name",
1541
+ value: "where"
1542
+ },
1543
+ value: {
1544
+ kind: "Variable",
1545
+ name: {
1546
+ kind: "Name",
1547
+ value: "where"
1548
+ }
1549
+ }
1550
+ }, {
1551
+ kind: "Argument",
1552
+ name: {
1553
+ kind: "Name",
1554
+ value: "orderBy"
1555
+ },
1556
+ value: {
1557
+ kind: "ListValue",
1558
+ values: [{
1559
+ kind: "ObjectValue",
1560
+ fields: [{
1561
+ kind: "ObjectField",
1562
+ name: {
1563
+ kind: "Name",
1564
+ value: "timeCreated"
1565
+ },
1566
+ value: {
1567
+ kind: "EnumValue",
1568
+ value: "desc"
1569
+ }
1570
+ }]
1571
+ }]
1572
+ }
1573
+ }],
1574
+ selectionSet: {
1575
+ kind: "SelectionSet",
1576
+ selections: [{
1577
+ kind: "FragmentSpread",
1578
+ name: {
1579
+ kind: "Name",
1580
+ value: "attestationFields"
1581
+ }
1582
+ }]
1583
+ }
1584
+ }]
1585
+ }
1586
+ }, {
1587
+ kind: "FragmentDefinition",
1588
+ name: {
1589
+ kind: "Name",
1590
+ value: "attestationFields"
1591
+ },
1592
+ typeCondition: {
1593
+ kind: "NamedType",
1594
+ name: {
1595
+ kind: "Name",
1596
+ value: "Attestation"
1597
+ }
1598
+ },
1599
+ selectionSet: {
1600
+ kind: "SelectionSet",
1601
+ selections: [
1602
+ {
1603
+ kind: "Field",
1604
+ name: {
1605
+ kind: "Name",
1606
+ value: "id"
1607
+ }
1608
+ },
1609
+ {
1610
+ kind: "Field",
1611
+ name: {
1612
+ kind: "Name",
1613
+ value: "decodedDataJson"
1614
+ }
1615
+ },
1616
+ {
1617
+ kind: "Field",
1618
+ name: {
1619
+ kind: "Name",
1620
+ value: "attester"
1621
+ }
1622
+ },
1623
+ {
1624
+ kind: "Field",
1625
+ name: {
1626
+ kind: "Name",
1627
+ value: "schema"
1628
+ },
1629
+ selectionSet: {
1630
+ kind: "SelectionSet",
1631
+ selections: [{
1632
+ kind: "Field",
1633
+ name: {
1634
+ kind: "Name",
1635
+ value: "schemaNames"
1636
+ },
1637
+ selectionSet: {
1638
+ kind: "SelectionSet",
1639
+ selections: [{
1640
+ kind: "Field",
1641
+ name: {
1642
+ kind: "Name",
1643
+ value: "name"
1644
+ }
1645
+ }]
1646
+ }
1647
+ }]
1648
+ }
1649
+ },
1650
+ {
1651
+ kind: "Field",
1652
+ name: {
1653
+ kind: "Name",
1654
+ value: "refUID"
1655
+ }
1656
+ },
1657
+ {
1658
+ kind: "Field",
1659
+ name: {
1660
+ kind: "Name",
1661
+ value: "revoked"
1662
+ }
1663
+ },
1664
+ {
1665
+ kind: "Field",
1666
+ name: {
1667
+ kind: "Name",
1668
+ value: "schemaId"
1669
+ }
1670
+ },
1671
+ {
1672
+ kind: "Field",
1673
+ name: {
1674
+ kind: "Name",
1675
+ value: "txid"
1676
+ }
1677
+ },
1678
+ {
1679
+ kind: "Field",
1680
+ name: {
1681
+ kind: "Name",
1682
+ value: "timeCreated"
1683
+ }
1684
+ },
1685
+ {
1686
+ kind: "Field",
1687
+ name: {
1688
+ kind: "Name",
1689
+ value: "time"
1690
+ }
1691
+ },
1692
+ {
1693
+ kind: "Field",
1694
+ name: {
1695
+ kind: "Name",
1696
+ value: "isOffchain"
1697
+ }
1698
+ }
1699
+ ]
1700
+ }
1701
+ }]
1702
+ },
1703
+ "\n query GetImageSeeds($where: AttestationWhereInput!) {\n imageSeeds: attestations(where: $where, orderBy: [{ timeCreated: desc }]) {\n id\n decodedDataJson\n attester\n schema {\n schemaNames {\n name\n }\n }\n refUID\n revoked\n schemaId\n txid\n timeCreated\n time\n isOffchain\n }\n }\n": {
1704
+ kind: "Document",
1705
+ definitions: [{
1706
+ kind: "OperationDefinition",
1707
+ operation: "query",
1708
+ name: {
1709
+ kind: "Name",
1710
+ value: "GetImageSeeds"
1711
+ },
1712
+ variableDefinitions: [{
1713
+ kind: "VariableDefinition",
1714
+ variable: {
1715
+ kind: "Variable",
1716
+ name: {
1717
+ kind: "Name",
1718
+ value: "where"
1719
+ }
1720
+ },
1721
+ type: {
1722
+ kind: "NonNullType",
1723
+ type: {
1724
+ kind: "NamedType",
1725
+ name: {
1726
+ kind: "Name",
1727
+ value: "AttestationWhereInput"
1728
+ }
1729
+ }
1730
+ }
1731
+ }],
1732
+ selectionSet: {
1733
+ kind: "SelectionSet",
1734
+ selections: [{
1735
+ kind: "Field",
1736
+ alias: {
1737
+ kind: "Name",
1738
+ value: "imageSeeds"
1739
+ },
1740
+ name: {
1741
+ kind: "Name",
1742
+ value: "attestations"
1743
+ },
1744
+ arguments: [{
1745
+ kind: "Argument",
1746
+ name: {
1747
+ kind: "Name",
1748
+ value: "where"
1749
+ },
1750
+ value: {
1751
+ kind: "Variable",
1752
+ name: {
1753
+ kind: "Name",
1754
+ value: "where"
1755
+ }
1756
+ }
1757
+ }, {
1758
+ kind: "Argument",
1759
+ name: {
1760
+ kind: "Name",
1761
+ value: "orderBy"
1762
+ },
1763
+ value: {
1764
+ kind: "ListValue",
1765
+ values: [{
1766
+ kind: "ObjectValue",
1767
+ fields: [{
1768
+ kind: "ObjectField",
1769
+ name: {
1770
+ kind: "Name",
1771
+ value: "timeCreated"
1772
+ },
1773
+ value: {
1774
+ kind: "EnumValue",
1775
+ value: "desc"
1776
+ }
1777
+ }]
1778
+ }]
1779
+ }
1780
+ }],
1781
+ selectionSet: {
1782
+ kind: "SelectionSet",
1783
+ selections: [
1784
+ {
1785
+ kind: "Field",
1786
+ name: {
1787
+ kind: "Name",
1788
+ value: "id"
1789
+ }
1790
+ },
1791
+ {
1792
+ kind: "Field",
1793
+ name: {
1794
+ kind: "Name",
1795
+ value: "decodedDataJson"
1796
+ }
1797
+ },
1798
+ {
1799
+ kind: "Field",
1800
+ name: {
1801
+ kind: "Name",
1802
+ value: "attester"
1803
+ }
1804
+ },
1805
+ {
1806
+ kind: "Field",
1807
+ name: {
1808
+ kind: "Name",
1809
+ value: "schema"
1810
+ },
1811
+ selectionSet: {
1812
+ kind: "SelectionSet",
1813
+ selections: [{
1814
+ kind: "Field",
1815
+ name: {
1816
+ kind: "Name",
1817
+ value: "schemaNames"
1818
+ },
1819
+ selectionSet: {
1820
+ kind: "SelectionSet",
1821
+ selections: [{
1822
+ kind: "Field",
1823
+ name: {
1824
+ kind: "Name",
1825
+ value: "name"
1826
+ }
1827
+ }]
1828
+ }
1829
+ }]
1830
+ }
1831
+ },
1832
+ {
1833
+ kind: "Field",
1834
+ name: {
1835
+ kind: "Name",
1836
+ value: "refUID"
1837
+ }
1838
+ },
1839
+ {
1840
+ kind: "Field",
1841
+ name: {
1842
+ kind: "Name",
1843
+ value: "revoked"
1844
+ }
1845
+ },
1846
+ {
1847
+ kind: "Field",
1848
+ name: {
1849
+ kind: "Name",
1850
+ value: "schemaId"
1851
+ }
1852
+ },
1853
+ {
1854
+ kind: "Field",
1855
+ name: {
1856
+ kind: "Name",
1857
+ value: "txid"
1858
+ }
1859
+ },
1860
+ {
1861
+ kind: "Field",
1862
+ name: {
1863
+ kind: "Name",
1864
+ value: "timeCreated"
1865
+ }
1866
+ },
1867
+ {
1868
+ kind: "Field",
1869
+ name: {
1870
+ kind: "Name",
1871
+ value: "time"
1872
+ }
1873
+ },
1874
+ {
1875
+ kind: "Field",
1876
+ name: {
1877
+ kind: "Name",
1878
+ value: "isOffchain"
1879
+ }
1880
+ }
1881
+ ]
1882
+ }
1883
+ }]
1884
+ }
1885
+ }]
1886
+ },
1887
+ "\n query GetImageVersions($where: AttestationWhereInput!) {\n imageVersions: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n ...attestationFields\n }\n }\n": {
1888
+ kind: "Document",
1889
+ definitions: [{
1890
+ kind: "OperationDefinition",
1891
+ operation: "query",
1892
+ name: {
1893
+ kind: "Name",
1894
+ value: "GetImageVersions"
1895
+ },
1896
+ variableDefinitions: [{
1897
+ kind: "VariableDefinition",
1898
+ variable: {
1899
+ kind: "Variable",
1900
+ name: {
1901
+ kind: "Name",
1902
+ value: "where"
1903
+ }
1904
+ },
1905
+ type: {
1906
+ kind: "NonNullType",
1907
+ type: {
1908
+ kind: "NamedType",
1909
+ name: {
1910
+ kind: "Name",
1911
+ value: "AttestationWhereInput"
1912
+ }
1913
+ }
1914
+ }
1915
+ }],
1916
+ selectionSet: {
1917
+ kind: "SelectionSet",
1918
+ selections: [{
1919
+ kind: "Field",
1920
+ alias: {
1921
+ kind: "Name",
1922
+ value: "imageVersions"
1923
+ },
1924
+ name: {
1925
+ kind: "Name",
1926
+ value: "attestations"
1927
+ },
1928
+ arguments: [{
1929
+ kind: "Argument",
1930
+ name: {
1931
+ kind: "Name",
1932
+ value: "where"
1933
+ },
1934
+ value: {
1935
+ kind: "Variable",
1936
+ name: {
1937
+ kind: "Name",
1938
+ value: "where"
1939
+ }
1940
+ }
1941
+ }, {
1942
+ kind: "Argument",
1943
+ name: {
1944
+ kind: "Name",
1945
+ value: "orderBy"
1946
+ },
1947
+ value: {
1948
+ kind: "ListValue",
1949
+ values: [{
1950
+ kind: "ObjectValue",
1951
+ fields: [{
1952
+ kind: "ObjectField",
1953
+ name: {
1954
+ kind: "Name",
1955
+ value: "timeCreated"
1956
+ },
1957
+ value: {
1958
+ kind: "EnumValue",
1959
+ value: "desc"
1960
+ }
1961
+ }]
1962
+ }]
1963
+ }
1964
+ }],
1965
+ selectionSet: {
1966
+ kind: "SelectionSet",
1967
+ selections: [{
1968
+ kind: "FragmentSpread",
1969
+ name: {
1970
+ kind: "Name",
1971
+ value: "attestationFields"
1972
+ }
1973
+ }]
1974
+ }
1975
+ }]
1976
+ }
1977
+ }, {
1978
+ kind: "FragmentDefinition",
1979
+ name: {
1980
+ kind: "Name",
1981
+ value: "attestationFields"
1982
+ },
1983
+ typeCondition: {
1984
+ kind: "NamedType",
1985
+ name: {
1986
+ kind: "Name",
1987
+ value: "Attestation"
1988
+ }
1989
+ },
1990
+ selectionSet: {
1991
+ kind: "SelectionSet",
1992
+ selections: [
1993
+ {
1994
+ kind: "Field",
1995
+ name: {
1996
+ kind: "Name",
1997
+ value: "id"
1998
+ }
1999
+ },
2000
+ {
2001
+ kind: "Field",
2002
+ name: {
2003
+ kind: "Name",
2004
+ value: "decodedDataJson"
2005
+ }
2006
+ },
2007
+ {
2008
+ kind: "Field",
2009
+ name: {
2010
+ kind: "Name",
2011
+ value: "attester"
2012
+ }
2013
+ },
2014
+ {
2015
+ kind: "Field",
2016
+ name: {
2017
+ kind: "Name",
2018
+ value: "schema"
2019
+ },
2020
+ selectionSet: {
2021
+ kind: "SelectionSet",
2022
+ selections: [{
2023
+ kind: "Field",
2024
+ name: {
2025
+ kind: "Name",
2026
+ value: "schemaNames"
2027
+ },
2028
+ selectionSet: {
2029
+ kind: "SelectionSet",
2030
+ selections: [{
2031
+ kind: "Field",
2032
+ name: {
2033
+ kind: "Name",
2034
+ value: "name"
2035
+ }
2036
+ }]
2037
+ }
2038
+ }]
2039
+ }
2040
+ },
2041
+ {
2042
+ kind: "Field",
2043
+ name: {
2044
+ kind: "Name",
2045
+ value: "refUID"
2046
+ }
2047
+ },
2048
+ {
2049
+ kind: "Field",
2050
+ name: {
2051
+ kind: "Name",
2052
+ value: "revoked"
2053
+ }
2054
+ },
2055
+ {
2056
+ kind: "Field",
2057
+ name: {
2058
+ kind: "Name",
2059
+ value: "schemaId"
2060
+ }
2061
+ },
2062
+ {
2063
+ kind: "Field",
2064
+ name: {
2065
+ kind: "Name",
2066
+ value: "txid"
2067
+ }
2068
+ },
2069
+ {
2070
+ kind: "Field",
2071
+ name: {
2072
+ kind: "Name",
2073
+ value: "timeCreated"
2074
+ }
2075
+ },
2076
+ {
2077
+ kind: "Field",
2078
+ name: {
2079
+ kind: "Name",
2080
+ value: "time"
2081
+ }
2082
+ },
2083
+ {
2084
+ kind: "Field",
2085
+ name: {
2086
+ kind: "Name",
2087
+ value: "isOffchain"
2088
+ }
2089
+ }
2090
+ ]
2091
+ }
2092
+ }]
2093
+ }
2094
+ };
2095
+ function f(e) {
2096
+ return d[e] ?? {};
2097
+ }
2098
+ //#endregion
2099
+ //#region src/queries.ts
2100
+ var p = f("\n query GetSchemas($where: SchemaWhereInput!) {\n schemas: schemata(where: $where) {\n id\n schema\n schemaNames {\n name\n }\n }\n }\n"), m = f("\n query GetSchemaByName($where: SchemaWhereInput!) {\n schemas: schemata(where: $where) {\n id\n schema\n schemaNames {\n name\n }\n }\n }\n"), h = f("\n query GetSeeds($where: AttestationWhereInput!, $take: Int, $skip: Int) {\n itemSeeds: attestations(where: $where, orderBy: [{ timeCreated: desc }], take: $take, skip: $skip) {\n id\n decodedDataJson\n attester\n schema {\n schemaNames {\n name\n }\n }\n refUID\n revoked\n revocationTime\n schemaId\n timeCreated\n isOffchain\n }\n }\n"), g = f("\n query GetSeedIds($where: AttestationWhereInput!) {\n itemSeedIds: attestations(where: $where, orderBy: [{ timeCreated: desc }]) {\n id\n }\n }\n"), _ = f("\n query GetStorageTransactionId($where: AttestationWhereInput!) {\n storageTransactionId: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n id\n decodedDataJson\n }\n }\n"), v = f("\n query GetVersions($where: AttestationWhereInput!) {\n itemVersions: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n ...attestationFields\n }\n }\n"), y = f("\n query GetProperties($where: AttestationWhereInput!) {\n itemProperties: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n ...attestationFields\n }\n }\n"), b = f("\n query GetAllPropertiesForAllVersions($where: AttestationWhereInput!) {\n allProperties: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n ...attestationFields\n }\n }\n"), x = f("\n query GetFilesMetadata($where: AttestationWhereInput!) {\n filesMetadata: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n ...attestationFields\n }\n }\n"), S = f("\n query GetImageSeeds($where: AttestationWhereInput!) {\n imageSeeds: attestations(where: $where, orderBy: [{ timeCreated: desc }]) {\n id\n decodedDataJson\n attester\n schema {\n schemaNames {\n name\n }\n }\n refUID\n revoked\n schemaId\n txid\n timeCreated\n time\n isOffchain\n }\n }\n"), C = f("\n query GetImageVersions($where: AttestationWhereInput!) {\n imageVersions: attestations(\n where: $where\n orderBy: [{ timeCreated: desc }]\n ) {\n ...attestationFields\n }\n }\n"), w = async ({ seedUids: t, excludeRevoked: n = !0 }) => {
2101
+ let i = e.getQueryClient(), a = r.getEasClient(), o = n ? u({ refUID: { in: t } }) : { refUID: { in: t } }, { itemVersions: s } = await i.fetchQuery({
2102
+ queryKey: [
2103
+ "getVersionsForAllModels",
2104
+ [...t].sort(),
2105
+ n
2106
+ ],
2107
+ queryFn: async () => a.request(v, { where: o })
2108
+ });
2109
+ return s;
2110
+ }, T = async ({ versionUids: t, excludeRevoked: n = !0 }) => {
2111
+ let i = e.getQueryClient(), a = r.getEasClient(), o = n ? u({ refUID: { in: t } }) : { refUID: { in: t } }, { itemProperties: s } = await i.fetchQuery({
2112
+ queryKey: [
2113
+ "getPropertiesForAllModels",
2114
+ [...t].sort(),
2115
+ n
2116
+ ],
2117
+ queryFn: async () => a.request(y, { where: o })
2118
+ });
2119
+ return s;
2120
+ }, E = async (e) => l(await T(e)), D = async ({ schemaName: t }) => {
2121
+ try {
2122
+ let n = e.getQueryClient(), i = r.getEasClient();
2123
+ if (!n || !i) return;
2124
+ let { schemas: a } = await n.fetchQuery({
2125
+ queryKey: ["getEasSchemaUidBySchemaName"],
2126
+ queryFn: async () => i.request(p, { where: { schema: { endsWith: t } } })
2127
+ });
2128
+ return !a || a.length === 0 ? void 0 : a[0].id;
2129
+ } catch (e) {
2130
+ process.env.NODE_ENV === "development" && console.warn(`Failed to fetch schema for schema name ${t}:`, e);
2131
+ return;
2132
+ }
2133
+ }, O = async ({ schemaUids: t, addresses: n, excludeRevoked: i = !0 }) => {
2134
+ let a = {
2135
+ attester: { in: n.map((e) => {
2136
+ try {
2137
+ return c(e);
2138
+ } catch {
2139
+ return e;
2140
+ }
2141
+ }) },
2142
+ schemaId: { in: t }
2143
+ };
2144
+ i && (a = u(a));
2145
+ let o = e.getQueryClient(), s = r.getEasClient(), { itemSeeds: l } = await o.fetchQuery({
2146
+ queryKey: [
2147
+ "getSeedsForAllModels",
2148
+ i,
2149
+ [...t].sort(),
2150
+ [...n].sort()
2151
+ ],
2152
+ queryFn: async () => s.request(h, { where: a })
2153
+ });
2154
+ return l;
2155
+ }, k = async (t, n = 10, i) => {
2156
+ let a = i ?? 0, o = {
2157
+ where: u({ schema: { is: { schemaNames: { some: { name: { equals: t } } } } } }),
2158
+ take: n,
2159
+ skip: a
2160
+ }, s = e.getQueryClient(), c = r.getEasClient(), { itemSeeds: l } = await s.fetchQuery({
2161
+ queryKey: [
2162
+ "getSeedsBySchemaName",
2163
+ t,
2164
+ n,
2165
+ a
2166
+ ],
2167
+ queryFn: async () => c.request(h, o)
2168
+ });
2169
+ return l;
2170
+ }, A = async (e, t = 10) => (await k(e, t)).map((e) => e.id);
2171
+ //#endregion
2172
+ //#region src/easUid.ts
2173
+ function j(e) {
2174
+ if (e == null || e === "" || e === "NULL") return !0;
2175
+ let t = e.trim();
2176
+ return t === "" || t.toLowerCase() === "0x0000000000000000000000000000000000000000000000000000000000000000";
2177
+ }
2178
+ function M(e) {
2179
+ if (j(e)) return !1;
2180
+ let t = String(e).trim();
2181
+ if (!/^0x/i.test(t)) return !1;
2182
+ let n = t.slice(2);
2183
+ return n.length === 64 ? /^[0-9a-fA-F]{64}$/.test(n) : !1;
2184
+ }
2185
+ function N(e) {
2186
+ if (e == null || e === "") return "";
2187
+ let t = String(e).trim();
2188
+ return ("0x" + (t.startsWith("0x") || t.startsWith("0X") ? t.slice(2) : t).replace(/[^0-9a-fA-F]/g, "0").padStart(64, "0").slice(-64)).toLowerCase();
2189
+ }
2190
+ //#endregion
2191
+ //#region src/stores/schemaUidCache.ts
2192
+ var P = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), I = ({ text: e, schemaUid: t }) => {
2193
+ P.set(s(e), t);
2194
+ }, L = ({ modelName: e, schemaUid: t }) => {
2195
+ F.set(e.toLowerCase(), t);
2196
+ }, R = (e) => F.get(e.toLowerCase()), z = async ({ schemaText: e }) => {
2197
+ let t = s(e);
2198
+ if (!P.has(t)) {
2199
+ let e = await D({ schemaName: t });
2200
+ return e && I({
2201
+ text: t,
2202
+ schemaUid: e
2203
+ }), e;
2204
+ }
2205
+ return P.get(t);
2206
+ };
2207
+ //#endregion
2208
+ export { r as BaseEasClient, r as EasClient, e as BaseQueryClient, a as EAS_ENDPOINT, b as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, x as GET_FILES_METADATA, S as GET_IMAGE_SEEDS, C as GET_IMAGE_VERSIONS, y as GET_PROPERTIES, p as GET_SCHEMAS, m as GET_SCHEMA_BY_NAME, h as GET_SEEDS, g as GET_SEED_IDS, _ as GET_STORAGE_TRANSACTION_ID, v as GET_VERSIONS, n as ZERO_ADDRESS, i as ZERO_BYTES, t as ZERO_BYTES32, c as checksumAddress, E as getCanonicalItemPropertiesFromEas, D as getEasSchemaUidBySchemaName, z as getEasSchemaUidForSchemaDefinition, T as getItemPropertiesFromEas, w as getItemVersionsFromEas, R as getSchemaUidForModelFromCache, A as getSeedUidsBySchemaName, k as getSeedsBySchemaName, O as getSeedsFromSchemaUids, j as isPlaceholderUid, M as isValidEasAttestationUid, N as normalizeBytes32Hex, l as pickLatestPropertyAttestationsByRefAndSchema, L as setSchemaUidForModel, I as setSchemaUidForSchemaDefinition, s as toSnakeCase, u as withExcludeRevokedFilter };
2209
+
2210
+ //# sourceMappingURL=index.js.map