@thurinlabs/identity-kit 1.0.3 → 1.1.0

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/index.cjs CHANGED
@@ -1,1241 +1,45 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/provider.tsx
2
- var _react = require('react');
3
- var _wagmi = require('wagmi');
4
- var _chains = require('wagmi/chains');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
5
33
 
6
- // src/core/abi.ts
7
- var REGISTRY_ABI = [
8
- {
9
- "type": "function",
10
- "name": "ATTEST_TYPEHASH",
11
- "inputs": [],
12
- "outputs": [
13
- {
14
- "name": "",
15
- "type": "bytes32",
16
- "internalType": "bytes32"
17
- }
18
- ],
19
- "stateMutability": "view"
20
- },
21
- {
22
- "type": "function",
23
- "name": "DOMAIN_SEPARATOR",
24
- "inputs": [],
25
- "outputs": [
26
- {
27
- "name": "",
28
- "type": "bytes32",
29
- "internalType": "bytes32"
30
- }
31
- ],
32
- "stateMutability": "view"
33
- },
34
- {
35
- "type": "function",
36
- "name": "EIP712_NAME",
37
- "inputs": [],
38
- "outputs": [
39
- {
40
- "name": "",
41
- "type": "string",
42
- "internalType": "string"
43
- }
44
- ],
45
- "stateMutability": "view"
46
- },
47
- {
48
- "type": "function",
49
- "name": "EIP712_VERSION",
50
- "inputs": [],
51
- "outputs": [
52
- {
53
- "name": "",
54
- "type": "string",
55
- "internalType": "string"
56
- }
57
- ],
58
- "stateMutability": "view"
59
- },
60
- {
61
- "type": "function",
62
- "name": "MAX_KEY_BYTES",
63
- "inputs": [],
64
- "outputs": [
65
- {
66
- "name": "",
67
- "type": "uint256",
68
- "internalType": "uint256"
69
- }
70
- ],
71
- "stateMutability": "view"
72
- },
73
- {
74
- "type": "function",
75
- "name": "MAX_RECORD_BYTES",
76
- "inputs": [],
77
- "outputs": [
78
- {
79
- "name": "",
80
- "type": "uint256",
81
- "internalType": "uint256"
82
- }
83
- ],
84
- "stateMutability": "view"
85
- },
86
- {
87
- "type": "function",
88
- "name": "MAX_SIG_BYTES",
89
- "inputs": [],
90
- "outputs": [
91
- {
92
- "name": "",
93
- "type": "uint256",
94
- "internalType": "uint256"
95
- }
96
- ],
97
- "stateMutability": "view"
98
- },
99
- {
100
- "type": "function",
101
- "name": "MESSAGE_VERSION",
102
- "inputs": [],
103
- "outputs": [
104
- {
105
- "name": "",
106
- "type": "uint8",
107
- "internalType": "uint8"
108
- }
109
- ],
110
- "stateMutability": "view"
111
- },
112
- {
113
- "type": "function",
114
- "name": "REATTEST_TYPEHASH",
115
- "inputs": [],
116
- "outputs": [
117
- {
118
- "name": "",
119
- "type": "bytes32",
120
- "internalType": "bytes32"
121
- }
122
- ],
123
- "stateMutability": "view"
124
- },
125
- {
126
- "type": "function",
127
- "name": "REVOKE_TYPEHASH",
128
- "inputs": [],
129
- "outputs": [
130
- {
131
- "name": "",
132
- "type": "bytes32",
133
- "internalType": "bytes32"
134
- }
135
- ],
136
- "stateMutability": "view"
137
- },
138
- {
139
- "type": "function",
140
- "name": "SET_RECORD_TYPEHASH",
141
- "inputs": [],
142
- "outputs": [
143
- {
144
- "name": "",
145
- "type": "bytes32",
146
- "internalType": "bytes32"
147
- }
148
- ],
149
- "stateMutability": "view"
150
- },
151
- {
152
- "type": "function",
153
- "name": "UPDATE_KEY_TYPEHASH",
154
- "inputs": [],
155
- "outputs": [
156
- {
157
- "name": "",
158
- "type": "bytes32",
159
- "internalType": "bytes32"
160
- }
161
- ],
162
- "stateMutability": "view"
163
- },
164
- {
165
- "type": "function",
166
- "name": "VERSION",
167
- "inputs": [],
168
- "outputs": [
169
- {
170
- "name": "",
171
- "type": "uint8",
172
- "internalType": "uint8"
173
- }
174
- ],
175
- "stateMutability": "view"
176
- },
177
- {
178
- "type": "function",
179
- "name": "addressesFor",
180
- "inputs": [
181
- {
182
- "name": "fingerprintHash",
183
- "type": "bytes32",
184
- "internalType": "bytes32"
185
- }
186
- ],
187
- "outputs": [
188
- {
189
- "name": "",
190
- "type": "address[]",
191
- "internalType": "address[]"
192
- }
193
- ],
194
- "stateMutability": "view"
195
- },
196
- {
197
- "type": "function",
198
- "name": "addressesForCount",
199
- "inputs": [
200
- {
201
- "name": "fingerprintHash",
202
- "type": "bytes32",
203
- "internalType": "bytes32"
204
- }
205
- ],
206
- "outputs": [
207
- {
208
- "name": "",
209
- "type": "uint256",
210
- "internalType": "uint256"
211
- }
212
- ],
213
- "stateMutability": "view"
214
- },
215
- {
216
- "type": "function",
217
- "name": "addressesForRange",
218
- "inputs": [
219
- {
220
- "name": "fingerprintHash",
221
- "type": "bytes32",
222
- "internalType": "bytes32"
223
- },
224
- {
225
- "name": "start",
226
- "type": "uint256",
227
- "internalType": "uint256"
228
- },
229
- {
230
- "name": "count",
231
- "type": "uint256",
232
- "internalType": "uint256"
233
- }
234
- ],
235
- "outputs": [
236
- {
237
- "name": "out",
238
- "type": "address[]",
239
- "internalType": "address[]"
240
- }
241
- ],
242
- "stateMutability": "view"
243
- },
244
- {
245
- "type": "function",
246
- "name": "attest",
247
- "inputs": [
248
- {
249
- "name": "fingerprint",
250
- "type": "bytes",
251
- "internalType": "bytes"
252
- },
253
- {
254
- "name": "pgpSignature",
255
- "type": "bytes",
256
- "internalType": "bytes"
257
- },
258
- {
259
- "name": "pgpPublicKey",
260
- "type": "bytes",
261
- "internalType": "bytes"
262
- }
263
- ],
264
- "outputs": [
265
- {
266
- "name": "index",
267
- "type": "uint256",
268
- "internalType": "uint256"
269
- }
270
- ],
271
- "stateMutability": "nonpayable"
272
- },
273
- {
274
- "type": "function",
275
- "name": "attestFor",
276
- "inputs": [
277
- {
278
- "name": "owner",
279
- "type": "address",
280
- "internalType": "address"
281
- },
282
- {
283
- "name": "fingerprint",
284
- "type": "bytes",
285
- "internalType": "bytes"
286
- },
287
- {
288
- "name": "pgpSignature",
289
- "type": "bytes",
290
- "internalType": "bytes"
291
- },
292
- {
293
- "name": "pgpPublicKey",
294
- "type": "bytes",
295
- "internalType": "bytes"
296
- },
297
- {
298
- "name": "deadline",
299
- "type": "uint256",
300
- "internalType": "uint256"
301
- },
302
- {
303
- "name": "signature",
304
- "type": "bytes",
305
- "internalType": "bytes"
306
- }
307
- ],
308
- "outputs": [
309
- {
310
- "name": "index",
311
- "type": "uint256",
312
- "internalType": "uint256"
313
- }
314
- ],
315
- "stateMutability": "nonpayable"
316
- },
317
- {
318
- "type": "function",
319
- "name": "attestationCount",
320
- "inputs": [
321
- {
322
- "name": "owner",
323
- "type": "address",
324
- "internalType": "address"
325
- }
326
- ],
327
- "outputs": [
328
- {
329
- "name": "",
330
- "type": "uint256",
331
- "internalType": "uint256"
332
- }
333
- ],
334
- "stateMutability": "view"
335
- },
336
- {
337
- "type": "function",
338
- "name": "attestationsOf",
339
- "inputs": [
340
- {
341
- "name": "owner",
342
- "type": "address",
343
- "internalType": "address"
344
- }
345
- ],
346
- "outputs": [
347
- {
348
- "name": "",
349
- "type": "tuple[]",
350
- "internalType": "struct PGPRegistry.Attestation[]",
351
- "components": [
352
- {
353
- "name": "fingerprint",
354
- "type": "bytes",
355
- "internalType": "bytes"
356
- },
357
- {
358
- "name": "createdAt",
359
- "type": "uint64",
360
- "internalType": "uint64"
361
- },
362
- {
363
- "name": "revokedAt",
364
- "type": "uint64",
365
- "internalType": "uint64"
366
- },
367
- {
368
- "name": "messageVersion",
369
- "type": "uint8",
370
- "internalType": "uint8"
371
- },
372
- {
373
- "name": "keyPtr",
374
- "type": "address",
375
- "internalType": "address"
376
- },
377
- {
378
- "name": "sigPtr",
379
- "type": "address",
380
- "internalType": "address"
381
- }
382
- ]
383
- }
384
- ],
385
- "stateMutability": "view"
386
- },
387
- {
388
- "type": "function",
389
- "name": "attestationsOfRange",
390
- "inputs": [
391
- {
392
- "name": "owner",
393
- "type": "address",
394
- "internalType": "address"
395
- },
396
- {
397
- "name": "start",
398
- "type": "uint256",
399
- "internalType": "uint256"
400
- },
401
- {
402
- "name": "count",
403
- "type": "uint256",
404
- "internalType": "uint256"
405
- }
406
- ],
407
- "outputs": [
408
- {
409
- "name": "out",
410
- "type": "tuple[]",
411
- "internalType": "struct PGPRegistry.Attestation[]",
412
- "components": [
413
- {
414
- "name": "fingerprint",
415
- "type": "bytes",
416
- "internalType": "bytes"
417
- },
418
- {
419
- "name": "createdAt",
420
- "type": "uint64",
421
- "internalType": "uint64"
422
- },
423
- {
424
- "name": "revokedAt",
425
- "type": "uint64",
426
- "internalType": "uint64"
427
- },
428
- {
429
- "name": "messageVersion",
430
- "type": "uint8",
431
- "internalType": "uint8"
432
- },
433
- {
434
- "name": "keyPtr",
435
- "type": "address",
436
- "internalType": "address"
437
- },
438
- {
439
- "name": "sigPtr",
440
- "type": "address",
441
- "internalType": "address"
442
- }
443
- ]
444
- }
445
- ],
446
- "stateMutability": "view"
447
- },
448
- {
449
- "type": "function",
450
- "name": "cancelAuthorization",
451
- "inputs": [],
452
- "outputs": [],
453
- "stateMutability": "nonpayable"
454
- },
455
- {
456
- "type": "function",
457
- "name": "current",
458
- "inputs": [
459
- {
460
- "name": "owner",
461
- "type": "address",
462
- "internalType": "address"
463
- }
464
- ],
465
- "outputs": [
466
- {
467
- "name": "found",
468
- "type": "bool",
469
- "internalType": "bool"
470
- },
471
- {
472
- "name": "index",
473
- "type": "uint256",
474
- "internalType": "uint256"
475
- },
476
- {
477
- "name": "attestation",
478
- "type": "tuple",
479
- "internalType": "struct PGPRegistry.Attestation",
480
- "components": [
481
- {
482
- "name": "fingerprint",
483
- "type": "bytes",
484
- "internalType": "bytes"
485
- },
486
- {
487
- "name": "createdAt",
488
- "type": "uint64",
489
- "internalType": "uint64"
490
- },
491
- {
492
- "name": "revokedAt",
493
- "type": "uint64",
494
- "internalType": "uint64"
495
- },
496
- {
497
- "name": "messageVersion",
498
- "type": "uint8",
499
- "internalType": "uint8"
500
- },
501
- {
502
- "name": "keyPtr",
503
- "type": "address",
504
- "internalType": "address"
505
- },
506
- {
507
- "name": "sigPtr",
508
- "type": "address",
509
- "internalType": "address"
510
- }
511
- ]
512
- }
513
- ],
514
- "stateMutability": "view"
515
- },
516
- {
517
- "type": "function",
518
- "name": "fingerprintsForKeyId",
519
- "inputs": [
520
- {
521
- "name": "keyId",
522
- "type": "bytes8",
523
- "internalType": "bytes8"
524
- }
525
- ],
526
- "outputs": [
527
- {
528
- "name": "",
529
- "type": "bytes[]",
530
- "internalType": "bytes[]"
531
- }
532
- ],
533
- "stateMutability": "view"
534
- },
535
- {
536
- "type": "function",
537
- "name": "fingerprintsForKeyIdCount",
538
- "inputs": [
539
- {
540
- "name": "keyId",
541
- "type": "bytes8",
542
- "internalType": "bytes8"
543
- }
544
- ],
545
- "outputs": [
546
- {
547
- "name": "",
548
- "type": "uint256",
549
- "internalType": "uint256"
550
- }
551
- ],
552
- "stateMutability": "view"
553
- },
554
- {
555
- "type": "function",
556
- "name": "fingerprintsForKeyIdRange",
557
- "inputs": [
558
- {
559
- "name": "keyId",
560
- "type": "bytes8",
561
- "internalType": "bytes8"
562
- },
563
- {
564
- "name": "start",
565
- "type": "uint256",
566
- "internalType": "uint256"
567
- },
568
- {
569
- "name": "count",
570
- "type": "uint256",
571
- "internalType": "uint256"
572
- }
573
- ],
574
- "outputs": [
575
- {
576
- "name": "out",
577
- "type": "bytes[]",
578
- "internalType": "bytes[]"
579
- }
580
- ],
581
- "stateMutability": "view"
582
- },
583
- {
584
- "type": "function",
585
- "name": "getAttestation",
586
- "inputs": [
587
- {
588
- "name": "owner",
589
- "type": "address",
590
- "internalType": "address"
591
- },
592
- {
593
- "name": "index",
594
- "type": "uint256",
595
- "internalType": "uint256"
596
- }
597
- ],
598
- "outputs": [
599
- {
600
- "name": "",
601
- "type": "tuple",
602
- "internalType": "struct PGPRegistry.Attestation",
603
- "components": [
604
- {
605
- "name": "fingerprint",
606
- "type": "bytes",
607
- "internalType": "bytes"
608
- },
609
- {
610
- "name": "createdAt",
611
- "type": "uint64",
612
- "internalType": "uint64"
613
- },
614
- {
615
- "name": "revokedAt",
616
- "type": "uint64",
617
- "internalType": "uint64"
618
- },
619
- {
620
- "name": "messageVersion",
621
- "type": "uint8",
622
- "internalType": "uint8"
623
- },
624
- {
625
- "name": "keyPtr",
626
- "type": "address",
627
- "internalType": "address"
628
- },
629
- {
630
- "name": "sigPtr",
631
- "type": "address",
632
- "internalType": "address"
633
- }
634
- ]
635
- }
636
- ],
637
- "stateMutability": "view"
638
- },
639
- {
640
- "type": "function",
641
- "name": "getPayload",
642
- "inputs": [
643
- {
644
- "name": "owner",
645
- "type": "address",
646
- "internalType": "address"
647
- },
648
- {
649
- "name": "index",
650
- "type": "uint256",
651
- "internalType": "uint256"
652
- }
653
- ],
654
- "outputs": [
655
- {
656
- "name": "pgpSignature",
657
- "type": "bytes",
658
- "internalType": "bytes"
659
- },
660
- {
661
- "name": "pgpPublicKey",
662
- "type": "bytes",
663
- "internalType": "bytes"
664
- }
665
- ],
666
- "stateMutability": "view"
667
- },
668
- {
669
- "type": "function",
670
- "name": "nonces",
671
- "inputs": [
672
- {
673
- "name": "",
674
- "type": "address",
675
- "internalType": "address"
676
- }
677
- ],
678
- "outputs": [
679
- {
680
- "name": "",
681
- "type": "uint256",
682
- "internalType": "uint256"
683
- }
684
- ],
685
- "stateMutability": "view"
686
- },
687
- {
688
- "type": "function",
689
- "name": "reattest",
690
- "inputs": [
691
- {
692
- "name": "revokeIndex",
693
- "type": "uint256",
694
- "internalType": "uint256"
695
- },
696
- {
697
- "name": "fingerprint",
698
- "type": "bytes",
699
- "internalType": "bytes"
700
- },
701
- {
702
- "name": "pgpSignature",
703
- "type": "bytes",
704
- "internalType": "bytes"
705
- },
706
- {
707
- "name": "pgpPublicKey",
708
- "type": "bytes",
709
- "internalType": "bytes"
710
- }
711
- ],
712
- "outputs": [
713
- {
714
- "name": "index",
715
- "type": "uint256",
716
- "internalType": "uint256"
717
- }
718
- ],
719
- "stateMutability": "nonpayable"
720
- },
721
- {
722
- "type": "function",
723
- "name": "reattestFor",
724
- "inputs": [
725
- {
726
- "name": "owner",
727
- "type": "address",
728
- "internalType": "address"
729
- },
730
- {
731
- "name": "revokeIndex",
732
- "type": "uint256",
733
- "internalType": "uint256"
734
- },
735
- {
736
- "name": "fingerprint",
737
- "type": "bytes",
738
- "internalType": "bytes"
739
- },
740
- {
741
- "name": "pgpSignature",
742
- "type": "bytes",
743
- "internalType": "bytes"
744
- },
745
- {
746
- "name": "pgpPublicKey",
747
- "type": "bytes",
748
- "internalType": "bytes"
749
- },
750
- {
751
- "name": "deadline",
752
- "type": "uint256",
753
- "internalType": "uint256"
754
- },
755
- {
756
- "name": "signature",
757
- "type": "bytes",
758
- "internalType": "bytes"
759
- }
760
- ],
761
- "outputs": [
762
- {
763
- "name": "index",
764
- "type": "uint256",
765
- "internalType": "uint256"
766
- }
767
- ],
768
- "stateMutability": "nonpayable"
769
- },
770
- {
771
- "type": "function",
772
- "name": "record",
773
- "inputs": [
774
- {
775
- "name": "owner",
776
- "type": "address",
777
- "internalType": "address"
778
- },
779
- {
780
- "name": "index",
781
- "type": "uint256",
782
- "internalType": "uint256"
783
- },
784
- {
785
- "name": "kind",
786
- "type": "bytes32",
787
- "internalType": "bytes32"
788
- }
789
- ],
790
- "outputs": [
791
- {
792
- "name": "",
793
- "type": "bytes",
794
- "internalType": "bytes"
795
- }
796
- ],
797
- "stateMutability": "view"
798
- },
799
- {
800
- "type": "function",
801
- "name": "revoke",
802
- "inputs": [
803
- {
804
- "name": "index",
805
- "type": "uint256",
806
- "internalType": "uint256"
807
- }
808
- ],
809
- "outputs": [],
810
- "stateMutability": "nonpayable"
811
- },
812
- {
813
- "type": "function",
814
- "name": "revokeFor",
815
- "inputs": [
816
- {
817
- "name": "owner",
818
- "type": "address",
819
- "internalType": "address"
820
- },
821
- {
822
- "name": "index",
823
- "type": "uint256",
824
- "internalType": "uint256"
825
- },
826
- {
827
- "name": "deadline",
828
- "type": "uint256",
829
- "internalType": "uint256"
830
- },
831
- {
832
- "name": "signature",
833
- "type": "bytes",
834
- "internalType": "bytes"
835
- }
836
- ],
837
- "outputs": [],
838
- "stateMutability": "nonpayable"
839
- },
840
- {
841
- "type": "function",
842
- "name": "setRecord",
843
- "inputs": [
844
- {
845
- "name": "index",
846
- "type": "uint256",
847
- "internalType": "uint256"
848
- },
849
- {
850
- "name": "kind",
851
- "type": "bytes32",
852
- "internalType": "bytes32"
853
- },
854
- {
855
- "name": "value",
856
- "type": "bytes",
857
- "internalType": "bytes"
858
- }
859
- ],
860
- "outputs": [],
861
- "stateMutability": "nonpayable"
862
- },
863
- {
864
- "type": "function",
865
- "name": "setRecordFor",
866
- "inputs": [
867
- {
868
- "name": "owner",
869
- "type": "address",
870
- "internalType": "address"
871
- },
872
- {
873
- "name": "index",
874
- "type": "uint256",
875
- "internalType": "uint256"
876
- },
877
- {
878
- "name": "kind",
879
- "type": "bytes32",
880
- "internalType": "bytes32"
881
- },
882
- {
883
- "name": "value",
884
- "type": "bytes",
885
- "internalType": "bytes"
886
- },
887
- {
888
- "name": "deadline",
889
- "type": "uint256",
890
- "internalType": "uint256"
891
- },
892
- {
893
- "name": "signature",
894
- "type": "bytes",
895
- "internalType": "bytes"
896
- }
897
- ],
898
- "outputs": [],
899
- "stateMutability": "nonpayable"
900
- },
901
- {
902
- "type": "function",
903
- "name": "updateKey",
904
- "inputs": [
905
- {
906
- "name": "index",
907
- "type": "uint256",
908
- "internalType": "uint256"
909
- },
910
- {
911
- "name": "pgpPublicKey",
912
- "type": "bytes",
913
- "internalType": "bytes"
914
- }
915
- ],
916
- "outputs": [],
917
- "stateMutability": "nonpayable"
918
- },
919
- {
920
- "type": "function",
921
- "name": "updateKeyFor",
922
- "inputs": [
923
- {
924
- "name": "owner",
925
- "type": "address",
926
- "internalType": "address"
927
- },
928
- {
929
- "name": "index",
930
- "type": "uint256",
931
- "internalType": "uint256"
932
- },
933
- {
934
- "name": "pgpPublicKey",
935
- "type": "bytes",
936
- "internalType": "bytes"
937
- },
938
- {
939
- "name": "deadline",
940
- "type": "uint256",
941
- "internalType": "uint256"
942
- },
943
- {
944
- "name": "signature",
945
- "type": "bytes",
946
- "internalType": "bytes"
947
- }
948
- ],
949
- "outputs": [],
950
- "stateMutability": "nonpayable"
951
- },
952
- {
953
- "type": "event",
954
- "name": "Attested",
955
- "inputs": [
956
- {
957
- "name": "owner",
958
- "type": "address",
959
- "indexed": true,
960
- "internalType": "address"
961
- },
962
- {
963
- "name": "fingerprintHash",
964
- "type": "bytes32",
965
- "indexed": true,
966
- "internalType": "bytes32"
967
- },
968
- {
969
- "name": "index",
970
- "type": "uint256",
971
- "indexed": true,
972
- "internalType": "uint256"
973
- },
974
- {
975
- "name": "fingerprint",
976
- "type": "bytes",
977
- "indexed": false,
978
- "internalType": "bytes"
979
- },
980
- {
981
- "name": "messageVersion",
982
- "type": "uint8",
983
- "indexed": false,
984
- "internalType": "uint8"
985
- },
986
- {
987
- "name": "keyPtr",
988
- "type": "address",
989
- "indexed": false,
990
- "internalType": "address"
991
- },
992
- {
993
- "name": "sigPtr",
994
- "type": "address",
995
- "indexed": false,
996
- "internalType": "address"
997
- },
998
- {
999
- "name": "submitter",
1000
- "type": "address",
1001
- "indexed": false,
1002
- "internalType": "address"
1003
- }
1004
- ],
1005
- "anonymous": false
1006
- },
1007
- {
1008
- "type": "event",
1009
- "name": "KeyUpdated",
1010
- "inputs": [
1011
- {
1012
- "name": "owner",
1013
- "type": "address",
1014
- "indexed": true,
1015
- "internalType": "address"
1016
- },
1017
- {
1018
- "name": "fingerprintHash",
1019
- "type": "bytes32",
1020
- "indexed": true,
1021
- "internalType": "bytes32"
1022
- },
1023
- {
1024
- "name": "index",
1025
- "type": "uint256",
1026
- "indexed": true,
1027
- "internalType": "uint256"
1028
- },
1029
- {
1030
- "name": "oldKeyPtr",
1031
- "type": "address",
1032
- "indexed": false,
1033
- "internalType": "address"
1034
- },
1035
- {
1036
- "name": "newKeyPtr",
1037
- "type": "address",
1038
- "indexed": false,
1039
- "internalType": "address"
1040
- },
1041
- {
1042
- "name": "submitter",
1043
- "type": "address",
1044
- "indexed": false,
1045
- "internalType": "address"
1046
- }
1047
- ],
1048
- "anonymous": false
1049
- },
1050
- {
1051
- "type": "event",
1052
- "name": "NonceUsed",
1053
- "inputs": [
1054
- {
1055
- "name": "owner",
1056
- "type": "address",
1057
- "indexed": true,
1058
- "internalType": "address"
1059
- },
1060
- {
1061
- "name": "nonce",
1062
- "type": "uint256",
1063
- "indexed": false,
1064
- "internalType": "uint256"
1065
- }
1066
- ],
1067
- "anonymous": false
1068
- },
1069
- {
1070
- "type": "event",
1071
- "name": "RecordSet",
1072
- "inputs": [
1073
- {
1074
- "name": "owner",
1075
- "type": "address",
1076
- "indexed": true,
1077
- "internalType": "address"
1078
- },
1079
- {
1080
- "name": "index",
1081
- "type": "uint256",
1082
- "indexed": true,
1083
- "internalType": "uint256"
1084
- },
1085
- {
1086
- "name": "kind",
1087
- "type": "bytes32",
1088
- "indexed": true,
1089
- "internalType": "bytes32"
1090
- },
1091
- {
1092
- "name": "submitter",
1093
- "type": "address",
1094
- "indexed": false,
1095
- "internalType": "address"
1096
- }
1097
- ],
1098
- "anonymous": false
1099
- },
1100
- {
1101
- "type": "event",
1102
- "name": "Revoked",
1103
- "inputs": [
1104
- {
1105
- "name": "owner",
1106
- "type": "address",
1107
- "indexed": true,
1108
- "internalType": "address"
1109
- },
1110
- {
1111
- "name": "fingerprintHash",
1112
- "type": "bytes32",
1113
- "indexed": true,
1114
- "internalType": "bytes32"
1115
- },
1116
- {
1117
- "name": "index",
1118
- "type": "uint256",
1119
- "indexed": true,
1120
- "internalType": "uint256"
1121
- },
1122
- {
1123
- "name": "submitter",
1124
- "type": "address",
1125
- "indexed": false,
1126
- "internalType": "address"
1127
- }
1128
- ],
1129
- "anonymous": false
1130
- },
1131
- {
1132
- "type": "error",
1133
- "name": "AlreadyRevoked",
1134
- "inputs": []
1135
- },
1136
- {
1137
- "type": "error",
1138
- "name": "AuthorizationExpired",
1139
- "inputs": []
1140
- },
1141
- {
1142
- "type": "error",
1143
- "name": "DeploymentFailed",
1144
- "inputs": []
1145
- },
1146
- {
1147
- "type": "error",
1148
- "name": "DuplicateActiveFingerprint",
1149
- "inputs": []
1150
- },
1151
- {
1152
- "type": "error",
1153
- "name": "EmptyPublicKey",
1154
- "inputs": []
1155
- },
1156
- {
1157
- "type": "error",
1158
- "name": "EmptySignature",
1159
- "inputs": []
1160
- },
1161
- {
1162
- "type": "error",
1163
- "name": "IndexOutOfBounds",
1164
- "inputs": []
1165
- },
1166
- {
1167
- "type": "error",
1168
- "name": "InvalidAuthorization",
1169
- "inputs": []
1170
- },
1171
- {
1172
- "type": "error",
1173
- "name": "InvalidFingerprintLength",
1174
- "inputs": []
1175
- },
1176
- {
1177
- "type": "error",
1178
- "name": "InvalidPointer",
1179
- "inputs": []
1180
- },
1181
- {
1182
- "type": "error",
1183
- "name": "PublicKeyTooLarge",
1184
- "inputs": []
1185
- },
1186
- {
1187
- "type": "error",
1188
- "name": "RecordTooLarge",
1189
- "inputs": []
1190
- },
1191
- {
1192
- "type": "error",
1193
- "name": "SignatureTooLarge",
1194
- "inputs": []
1195
- }
1196
- ];
1197
-
1198
- // src/core/contract.ts
1199
- var REGISTRY_ADDRESS = "0x9302E02e2869e129aC8516fE5eFFd51EA3082c09";
1200
- var NETWORKS = {
1201
- mainnet: {
1202
- chainId: 1,
1203
- address: REGISTRY_ADDRESS,
1204
- deployBlock: 25962908n,
1205
- // 2026-09-12, tx 0xda4c3a19cae4e71ffb02559a048403f664d5a7967c19d42158c39600ec63bad8
1206
- explorerUrl: "https://etherscan.io",
1207
- defaultRpcUrl: "https://ethereum-rpc.publicnode.com"
1208
- },
1209
- sepolia: {
1210
- chainId: 11155111,
1211
- address: REGISTRY_ADDRESS,
1212
- deployBlock: 11683667n,
1213
- // 2026-09-11, tx 0x3e40e8f5b9fbf82a4b8943561bcc9b964b2987de10640ac8ff3a1b4ef0725322
1214
- explorerUrl: "https://sepolia.etherscan.io",
1215
- defaultRpcUrl: "https://ethereum-sepolia-rpc.publicnode.com"
1216
- },
1217
- /** A local anvil instance (`anvil`, chain id 31337). Deploy with pgp-registry's Deploy script. */
1218
- local: {
1219
- chainId: 31337,
1220
- address: REGISTRY_ADDRESS,
1221
- deployBlock: 0n,
1222
- explorerUrl: "",
1223
- defaultRpcUrl: "http://127.0.0.1:8545"
1224
- }
1225
- };
1226
- function isNetworkName(value) {
1227
- return value === "mainnet" || value === "sepolia" || value === "local";
1228
- }
1229
- function getRegistry(network = "mainnet", addressOverride) {
1230
- const r = NETWORKS[network];
1231
- if (!r) throw new Error(`Unknown network: ${network}`);
1232
- if (addressOverride && /^0x[0-9a-fA-F]{40}$/.test(addressOverride)) {
1233
- return { ...r, address: addressOverride };
1234
- }
1235
- return r;
1236
- }
34
+
35
+
36
+
37
+ var _chunkNL4LHKJXcjs = require('./chunk-NL4LHKJX.cjs');
1237
38
 
1238
39
  // src/provider.tsx
40
+ var _react = require('react');
41
+ var _wagmi = require('wagmi');
42
+ var _chains = require('wagmi/chains');
1239
43
  var _reactquery = require('@tanstack/react-query');
1240
44
 
1241
45
  // src/context.ts
@@ -1259,13 +63,8 @@ var defaultQueryClient = new (0, _reactquery.QueryClient)({
1259
63
  }
1260
64
  }
1261
65
  });
1262
- function chainFor(network = "mainnet") {
1263
- if (network === "sepolia") return _chains.sepolia;
1264
- if (network === "local") return _chains.foundry;
1265
- return _chains.mainnet;
1266
- }
1267
66
  function createDefaultWagmiConfig(rpcUrl, network) {
1268
- const url = rpcUrl || getRegistry(network).defaultRpcUrl;
67
+ const url = rpcUrl || _chunkNL4LHKJXcjs.getRegistry.call(void 0, network).defaultRpcUrl;
1269
68
  if (network === "sepolia") return _wagmi.createConfig.call(void 0, { chains: [_chains.sepolia], transports: { [_chains.sepolia.id]: _wagmi.http.call(void 0, url) } });
1270
69
  if (network === "local") return _wagmi.createConfig.call(void 0, { chains: [_chains.foundry], transports: { [_chains.foundry.id]: _wagmi.http.call(void 0, url) } });
1271
70
  return _wagmi.createConfig.call(void 0, { chains: [_chains.mainnet], transports: { [_chains.mainnet.id]: _wagmi.http.call(void 0, url) } });
@@ -1306,235 +105,23 @@ var _ens = require('viem/ens');
1306
105
 
1307
106
 
1308
107
  var _viem = require('viem');
1309
-
1310
- // src/core/fingerprint.ts
1311
-
1312
- var FINGERPRINT_HEX = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/;
1313
- function normalizeFingerprint(input) {
1314
- const hex = input.replace(/^0x/i, "").replace(/\s+/g, "").toLowerCase();
1315
- return FINGERPRINT_HEX.test(hex) ? hex : null;
1316
- }
1317
- function fingerprintToBytes(fingerprint) {
1318
- const hex = normalizeFingerprint(fingerprint);
1319
- if (!hex) throw new Error(`Invalid PGP fingerprint: ${fingerprint}`);
1320
- return `0x${hex}`;
1321
- }
1322
- function bytesToFingerprint(bytes) {
1323
- return bytes.replace(/^0x/i, "").toLowerCase();
1324
- }
1325
- function fingerprintHash(fingerprint) {
1326
- return _viem.keccak256.call(void 0, fingerprintToBytes(fingerprint));
1327
- }
1328
- function keyIdOf(fingerprint) {
1329
- const hex = normalizeFingerprint(fingerprint);
1330
- if (!hex) throw new Error(`Invalid PGP fingerprint: ${fingerprint}`);
1331
- return `0x${keyIdHex(hex)}`;
1332
- }
1333
- function keyIdHex(normalizedFingerprint) {
1334
- return normalizedFingerprint.length === 64 ? normalizedFingerprint.slice(0, 16) : normalizedFingerprint.slice(-16);
1335
- }
1336
- function keyIdToBytes(keyId) {
1337
- const hex = keyId.replace(/^0x/i, "").replace(/\s+/g, "").toLowerCase();
1338
- return /^[0-9a-f]{16}$/.test(hex) ? `0x${hex}` : null;
1339
- }
1340
-
1341
- // src/core/pgp.ts
1342
- function pgpConfig(openpgp) {
1343
- return { ...openpgp.config, rejectCurves: /* @__PURE__ */ new Set() };
1344
- }
1345
- function algorithmName(keyOrSubkey) {
1346
- try {
1347
- const info = keyOrSubkey.getAlgorithmInfo();
1348
- const curve = (info.curve || "").toLowerCase();
1349
- if (curve.startsWith("ed25519") || info.algorithm === "ed25519" || info.algorithm === "eddsaLegacy") return "Ed25519";
1350
- if (curve.startsWith("curve25519") || info.algorithm === "x25519") return "Cv25519";
1351
- if (curve.startsWith("ed448")) return "Ed448";
1352
- if (curve.startsWith("curve448") || info.algorithm === "x448") return "X448";
1353
- if (curve.startsWith("nistp") || curve.startsWith("p")) return `NIST P-${curve.replace(/\D/g, "")}`;
1354
- if (curve.startsWith("secp")) return curve;
1355
- if (curve.startsWith("brainpool")) return curve;
1356
- if (info.algorithm.startsWith("rsa")) return info.bits ? `RSA ${info.bits}` : "RSA";
1357
- if (info.algorithm.startsWith("dsa")) return info.bits ? `DSA ${info.bits}` : "DSA";
1358
- if (info.algorithm.startsWith("elgamal")) return info.bits ? `ElGamal ${info.bits}` : "ElGamal";
1359
- return info.curve || info.algorithm;
1360
- } catch (e2) {
1361
- return String(_nullishCoalesce(_optionalChain([keyOrSubkey, 'access', _2 => _2.keyPacket, 'optionalAccess', _3 => _3.algorithm]), () => ( "unknown")));
1362
- }
1363
- }
1364
- async function parsePgpKey(armoredKey) {
1365
- try {
1366
- const openpgp = await Promise.resolve().then(() => _interopRequireWildcard(require("openpgp")));
1367
- const { readKey } = openpgp;
1368
- const config = pgpConfig(openpgp);
1369
- const key = await readKey({ armoredKey });
1370
- const fingerprint = key.getFingerprint().toUpperCase();
1371
- const algorithm = algorithmName(key);
1372
- const created = _nullishCoalesce(_optionalChain([key, 'access', _4 => _4.keyPacket, 'access', _5 => _5.created, 'optionalAccess', _6 => _6.toISOString, 'call', _7 => _7()]), () => ( null));
1373
- const expiration = await key.getExpirationTime();
1374
- const expires = expiration && expiration !== Infinity ? new Date(expiration).toISOString() : null;
1375
- const userIDs = [];
1376
- const notations = [];
1377
- const seen = /* @__PURE__ */ new Set();
1378
- for (const user of key.users) {
1379
- const certs = user.selfCertifications;
1380
- if (!certs || certs.length === 0) continue;
1381
- let userVerified = false;
1382
- for (const cert of certs) {
1383
- try {
1384
- await cert.verify(
1385
- key.keyPacket,
1386
- cert.signatureType,
1387
- { userID: user.userID, key: key.keyPacket },
1388
- void 0,
1389
- // date: now
1390
- void 0,
1391
- // detached
1392
- config
1393
- );
1394
- } catch (e3) {
1395
- continue;
1396
- }
1397
- userVerified = true;
1398
- if (cert.rawNotations) {
1399
- for (const n of cert.rawNotations) {
1400
- const name = typeof n.name === "string" ? n.name : new TextDecoder().decode(n.name);
1401
- const value = n.value instanceof Uint8Array ? new TextDecoder().decode(n.value) : typeof n.value === "string" ? n.value : null;
1402
- if (value) {
1403
- if (!seen.has(value)) {
1404
- seen.add(value);
1405
- notations.push({ name, value });
1406
- }
1407
- }
1408
- }
1409
- }
1410
- }
1411
- if (userVerified) {
1412
- const uid = _optionalChain([user, 'access', _8 => _8.userID, 'optionalAccess', _9 => _9.userID]);
1413
- if (uid) userIDs.push(uid);
1414
- }
1415
- }
1416
- const subkeys = key.subkeys.map((sk) => ({
1417
- algorithm: algorithmName(sk),
1418
- created: _nullishCoalesce(_optionalChain([sk, 'access', _10 => _10.keyPacket, 'access', _11 => _11.created, 'optionalAccess', _12 => _12.toISOString, 'call', _13 => _13()]), () => ( null)),
1419
- fingerprint: sk.getFingerprint().toUpperCase()
1420
- }));
1421
- return { fingerprint, userIDs, algorithm, created, expires, notations, subkeys };
1422
- } catch (e4) {
1423
- return null;
1424
- }
1425
- }
1426
- async function verifyAttestation({
1427
- pgpPublicKey,
1428
- pgpSignature,
1429
- fingerprint,
1430
- ethAddress
1431
- }) {
1432
- try {
1433
- if (!pgpPublicKey || !pgpSignature) {
1434
- return { verified: false, reason: "Missing PGP data" };
1435
- }
1436
- const openpgp = await Promise.resolve().then(() => _interopRequireWildcard(require("openpgp")));
1437
- const { readKey, readCleartextMessage, LiteralDataPacket } = openpgp;
1438
- const config = pgpConfig(openpgp);
1439
- const publicKey = await readKey({ armoredKey: pgpPublicKey });
1440
- const keyFingerprint = publicKey.getFingerprint().toUpperCase();
1441
- if (keyFingerprint !== fingerprint.toUpperCase()) {
1442
- return { verified: false, reason: "Key fingerprint mismatch" };
1443
- }
1444
- const message = await readCleartextMessage({ cleartextMessage: pgpSignature });
1445
- const msg = message;
1446
- const now = /* @__PURE__ */ new Date();
1447
- let signed = false;
1448
- for (const sig of msg.signature.packets) {
1449
- if (!publicKey.getKeys(sig.issuerKeyID).length) continue;
1450
- const signingKey = await publicKey.getSigningKey(sig.issuerKeyID, now, void 0, config);
1451
- const literal = new LiteralDataPacket();
1452
- literal.setText(_nullishCoalesce(msg.text, () => ( message.getText().replace(/\r?\n/g, "\r\n"))));
1453
- await sig.verify(signingKey.keyPacket, sig.signatureType, literal, now, true, config);
1454
- signed = true;
1455
- break;
1456
- }
1457
- if (!signed) return { verified: false, reason: "Message is not signed by this key" };
1458
- const signedText = message.getText();
1459
- if (!signedText.toLowerCase().includes(ethAddress.toLowerCase())) {
1460
- return { verified: false, reason: "Signed message does not contain ETH address" };
1461
- }
1462
- return { verified: true };
1463
- } catch (e5) {
1464
- return { verified: false, reason: "Signature verification failed" };
1465
- }
1466
- }
1467
- var EMAIL_UID = /@/;
1468
- async function stripEmailUserIDs(armoredKey) {
1469
- try {
1470
- const { readKey } = await Promise.resolve().then(() => _interopRequireWildcard(require("openpgp")));
1471
- const key = await readKey({ armoredKey });
1472
- const kept = [];
1473
- const removed = [];
1474
- const users = key.users.filter((u) => {
1475
- const uid = _optionalChain([u, 'access', _14 => _14.userID, 'optionalAccess', _15 => _15.userID]);
1476
- if (!uid) return false;
1477
- if (EMAIL_UID.test(uid)) {
1478
- removed.push(uid);
1479
- return false;
1480
- }
1481
- kept.push(uid);
1482
- return true;
1483
- });
1484
- if (users.length === 0) return null;
1485
- key.users = users;
1486
- return { armored: key.armor(), kept, removed };
1487
- } catch (e6) {
1488
- return null;
1489
- }
1490
- }
1491
- async function hasEmailUserID(armoredKey) {
1492
- try {
1493
- const { readKey } = await Promise.resolve().then(() => _interopRequireWildcard(require("openpgp")));
1494
- const key = await readKey({ armoredKey });
1495
- return key.users.some((u) => EMAIL_UID.test(_nullishCoalesce(_optionalChain([u, 'access', _16 => _16.userID, 'optionalAccess', _17 => _17.userID]), () => ( ""))));
1496
- } catch (e7) {
1497
- return false;
1498
- }
1499
- }
1500
- var KEYSERVER_BASE = "https://keys.openpgp.org/vks/v1";
1501
- async function fetchKeyByFingerprint(fingerprint) {
1502
- try {
1503
- const resp = await fetch(`${KEYSERVER_BASE}/by-fingerprint/${fingerprint}`);
1504
- if (!resp.ok) return null;
1505
- return await resp.text();
1506
- } catch (e8) {
1507
- return null;
1508
- }
1509
- }
1510
- async function fetchKeyByKeyId(keyId) {
1511
- try {
1512
- const resp = await fetch(`${KEYSERVER_BASE}/by-keyid/${keyId}`);
1513
- if (!resp.ok) return null;
1514
- return await resp.text();
1515
- } catch (e9) {
1516
- return null;
1517
- }
1518
- }
1519
-
1520
- // src/hooks/useAttestations.ts
1521
108
  function useAttestations(address) {
1522
109
  const config = useIdentityKitConfig();
1523
- const registry = getRegistry(config.network, config.registryAddress);
1524
- const chain = chainFor(config.network);
110
+ const registry = _chunkNL4LHKJXcjs.getRegistry.call(void 0, config.network, config.registryAddress);
111
+ const chain = _chunkNL4LHKJXcjs.chainFor.call(void 0, config.network);
1525
112
  const owner = address;
1526
113
  const { data: rows, isLoading: rowsLoading } = _wagmi.useReadContract.call(void 0, {
1527
114
  address: registry.address,
1528
- abi: REGISTRY_ABI,
115
+ abi: _chunkNL4LHKJXcjs.REGISTRY_ABI,
1529
116
  functionName: "attestationsOf",
1530
117
  args: owner ? [owner] : void 0,
1531
118
  chainId: chain.id,
1532
119
  query: { enabled: !!owner }
1533
120
  });
1534
- const count = _nullishCoalesce(_optionalChain([rows, 'optionalAccess', _18 => _18.length]), () => ( 0));
121
+ const count = _nullishCoalesce(_optionalChain([rows, 'optionalAccess', _2 => _2.length]), () => ( 0));
1535
122
  const contracts = owner && rows ? rows.map((_, i) => ({
1536
123
  address: registry.address,
1537
- abi: REGISTRY_ABI,
124
+ abi: _chunkNL4LHKJXcjs.REGISTRY_ABI,
1538
125
  functionName: "getPayload",
1539
126
  args: [owner, BigInt(i)],
1540
127
  chainId: chain.id
@@ -1551,7 +138,7 @@ function useAttestations(address) {
1551
138
  const results = [];
1552
139
  for (let i = 0; i < rows.length; i++) {
1553
140
  const row = rows[i];
1554
- const payload = _optionalChain([payloads, 'optionalAccess', _19 => _19[i]]);
141
+ const payload = _optionalChain([payloads, 'optionalAccess', _3 => _3[i]]);
1555
142
  let pgpSignature = null;
1556
143
  let pgpPublicKey = null;
1557
144
  if (payload && payload.status === "success") {
@@ -1559,8 +146,8 @@ function useAttestations(address) {
1559
146
  pgpSignature = _viem.hexToString.call(void 0, sigHex);
1560
147
  pgpPublicKey = _viem.hexToString.call(void 0, keyHex);
1561
148
  }
1562
- const fingerprint = bytesToFingerprint(row.fingerprint);
1563
- const verification = pgpPublicKey && pgpSignature ? await verifyAttestation({ pgpPublicKey, pgpSignature, fingerprint, ethAddress: address }) : null;
149
+ const fingerprint = _chunkNL4LHKJXcjs.bytesToFingerprint.call(void 0, row.fingerprint);
150
+ const verification = pgpPublicKey && pgpSignature ? await _chunkNL4LHKJXcjs.verifyAttestation.call(void 0, { pgpPublicKey, pgpSignature, fingerprint, ethAddress: address }) : null;
1564
151
  const revokedAt = Number(row.revokedAt);
1565
152
  results.push({
1566
153
  index: i,
@@ -1581,7 +168,7 @@ function useAttestations(address) {
1581
168
  });
1582
169
  const isLoading = rowsLoading || payloadsLoading || verifyLoading || !!owner && rows !== void 0 && !payloadsReady;
1583
170
  const activeClaims = (claims || []).filter((c) => !c.revoked);
1584
- const verifiedClaims = activeClaims.filter((c) => _optionalChain([c, 'access', _20 => _20.verification, 'optionalAccess', _21 => _21.verified]));
171
+ const verifiedClaims = activeClaims.filter((c) => _optionalChain([c, 'access', _4 => _4.verification, 'optionalAccess', _5 => _5.verified]));
1585
172
  const currentFingerprint = verifiedClaims.length > 0 ? verifiedClaims[verifiedClaims.length - 1].fingerprint : null;
1586
173
  return {
1587
174
  claims: claims || [],
@@ -1594,40 +181,10 @@ function useAttestations(address) {
1594
181
 
1595
182
  // src/hooks/useEFPGraph.ts
1596
183
 
1597
-
1598
- // src/core/efp.ts
1599
- var EFP_API = "https://api.ethfollow.xyz/api/v1";
1600
- async function fetchEFPGraph(address) {
1601
- try {
1602
- const listsResp = await fetch(`${EFP_API}/users/${address}/lists`);
1603
- if (!listsResp.ok) return null;
1604
- const listsData = await listsResp.json();
1605
- const listId = listsData.primary_list;
1606
- if (!listId) return null;
1607
- const [followingResp, statsResp, top8Resp] = await Promise.all([
1608
- fetch(`${EFP_API}/lists/${listId}/following?limit=100`),
1609
- fetch(`${EFP_API}/users/${address}/stats`),
1610
- fetch(`${EFP_API}/lists/${listId}/following?limit=8&tags=top8`)
1611
- ]);
1612
- const followingData = followingResp.ok ? await followingResp.json() : { following: [] };
1613
- const statsData = statsResp.ok ? await statsResp.json() : {};
1614
- const top8Data = top8Resp.ok ? await top8Resp.json() : { following: [] };
1615
- return {
1616
- followers: parseInt(statsData.followers_count) || 0,
1617
- following: (followingData.following || []).length,
1618
- top8: (top8Data.following || []).map((f) => f.data),
1619
- hasEfp: true
1620
- };
1621
- } catch (e10) {
1622
- return null;
1623
- }
1624
- }
1625
-
1626
- // src/hooks/useEFPGraph.ts
1627
184
  function useEFPGraph(address) {
1628
185
  const { data, isLoading } = _reactquery.useQuery.call(void 0, {
1629
186
  queryKey: ["efp-graph", address],
1630
- queryFn: () => fetchEFPGraph(address),
187
+ queryFn: () => _chunkNL4LHKJXcjs.fetchEFPGraph.call(void 0, address),
1631
188
  enabled: !!address,
1632
189
  staleTime: 3e5
1633
190
  });
@@ -1639,267 +196,27 @@ function useEFPGraph(address) {
1639
196
 
1640
197
  // src/hooks/usePGPProofs.ts
1641
198
 
1642
-
1643
- // src/core/proofs.ts
1644
- var PROVIDERS = [
1645
- {
1646
- provider: "github",
1647
- label: "GitHub",
1648
- pattern: /^https:\/\/gist\.github\.com\/([^/]+)\/([a-f0-9]+)$/i,
1649
- parse: (m) => ({ user: m[1], gistId: m[2] })
1650
- },
1651
- {
1652
- // A repository's description — the form an organisation can use, since
1653
- // gists belong to user accounts only. Same shape as the Codeberg proof.
1654
- provider: "github",
1655
- label: "GitHub",
1656
- pattern: /^https:\/\/github\.com\/([A-Za-z0-9-]+)\/([A-Za-z0-9._-]+)$/i,
1657
- parse: (m) => ({ user: m[1], repo: m[2] })
1658
- },
1659
- {
1660
- provider: "dns",
1661
- label: "DNS",
1662
- // domain is restricted to a hostname (labels may include underscores for
1663
- // records like _thurin.example.com); rejects slashes, userinfo, and spaces.
1664
- pattern: /^dns:([a-z0-9._-]+)\?type=TXT$/i,
1665
- parse: (m) => ({ domain: m[1] })
1666
- },
1667
- {
1668
- provider: "farcaster",
1669
- label: "Farcaster",
1670
- pattern: /^https:\/\/farcaster\.xyz\/([^/]+)\/(0x[a-f0-9]+)$/i,
1671
- parse: (m) => ({ user: m[1], castHash: m[2] })
1672
- },
1673
- {
1674
- provider: "codeberg",
1675
- label: "Codeberg",
1676
- pattern: /^https:\/\/codeberg\.org\/([^/]+)\/([^/]+)$/i,
1677
- parse: (m) => ({ user: m[1], repo: m[2] })
1678
- },
1679
- {
1680
- provider: "mastodon",
1681
- label: "Mastodon",
1682
- // instance is restricted to a bare hostname (optional port) so a value
1683
- // like "mastodon.social@evil.com" can't redirect the lookup elsewhere.
1684
- pattern: /^https:\/\/([a-z0-9.-]+(?::\d+)?)\/@([^/@?#\s]+)$/i,
1685
- parse: (m) => ({ instance: m[1], user: m[2] })
1686
- }
1687
- ];
1688
- function identifyProof(notation) {
1689
- if (notation.name !== "proof@thurin.id") return null;
1690
- for (const { provider, label, pattern, parse } of PROVIDERS) {
1691
- const m = notation.value.match(pattern);
1692
- if (m) {
1693
- return { provider, label, url: notation.value, ...parse(m) };
1694
- }
1695
- }
1696
- return { provider: "unknown", label: "Unknown", url: notation.value };
1697
- }
1698
- function displayUrl(proof) {
1699
- if (proof.provider === "dns") return proof.domain;
1700
- if (proof.provider === "github") return proof.user;
1701
- if (proof.provider === "farcaster") return `@${proof.user}`;
1702
- if (proof.provider === "codeberg") return proof.user;
1703
- if (proof.provider === "mastodon") return `@${proof.user}@${proof.instance}`;
1704
- return proof.url;
1705
- }
1706
- function proofHref(proof) {
1707
- if (proof.provider === "dns") return `https://${proof.domain}`;
1708
- if (proof.provider === "github") return `https://github.com/${proof.user}`;
1709
- if (proof.provider === "farcaster") return `https://farcaster.xyz/${proof.user}`;
1710
- if (proof.provider === "codeberg") return `https://codeberg.org/${proof.user}`;
1711
- if (proof.provider === "mastodon") return `https://${proof.instance}/@${proof.user}`;
1712
- if (proof.url.startsWith("http")) return proof.url;
1713
- return null;
1714
- }
1715
- function proofSecondaryHref(proof) {
1716
- if (proof.provider === "github") return proof.url;
1717
- if (proof.provider === "farcaster") return proof.url;
1718
- if (proof.provider === "codeberg") return proof.url;
1719
- if (proof.provider === "mastodon") return proof.url;
1720
- return null;
1721
- }
1722
- var FPR_TOKEN = "OPENPGP4FPR:";
1723
- function containsFingerprint(text, fingerprint) {
1724
- return text.toUpperCase().includes(FPR_TOKEN + fingerprint.toUpperCase());
1725
- }
1726
- function containsFingerprintUrl(text, fingerprint) {
1727
- return text.toUpperCase().includes(fingerprint.toUpperCase());
1728
- }
1729
- async function verifyGitHub(proof, fingerprint) {
1730
- if (proof.repo) return verifyGitHubRepo(proof, fingerprint);
1731
- try {
1732
- const resp = await fetch(`https://api.github.com/gists/${proof.gistId}`);
1733
- if (!resp.ok) return { verified: false, reason: `GitHub API returned ${resp.status}` };
1734
- const data = await resp.json();
1735
- if (_optionalChain([data, 'access', _22 => _22.owner, 'optionalAccess', _23 => _23.login, 'optionalAccess', _24 => _24.toLowerCase, 'call', _25 => _25()]) !== proof.user.toLowerCase()) {
1736
- return { verified: false, reason: "Gist owner does not match claimed user" };
1737
- }
1738
- for (const file of Object.values(data.files || {})) {
1739
- if (file.content && containsFingerprint(file.content, fingerprint)) {
1740
- return { verified: true };
1741
- }
1742
- }
1743
- return { verified: false, reason: "Fingerprint token not found in gist" };
1744
- } catch (err) {
1745
- return { verified: false, reason: `GitHub fetch failed: ${err.message}` };
1746
- }
1747
- }
1748
- async function verifyGitHubRepo(proof, fingerprint) {
1749
- try {
1750
- const resp = await fetch(
1751
- `https://api.github.com/repos/${encodeURIComponent(proof.user)}/${encodeURIComponent(proof.repo)}`
1752
- );
1753
- if (!resp.ok) return { verified: false, reason: `GitHub API returned ${resp.status}` };
1754
- const data = await resp.json();
1755
- if (_optionalChain([data, 'access', _26 => _26.owner, 'optionalAccess', _27 => _27.login, 'optionalAccess', _28 => _28.toLowerCase, 'call', _29 => _29()]) !== proof.user.toLowerCase()) {
1756
- return { verified: false, reason: "Repository owner does not match claimed account" };
1757
- }
1758
- if (data.description && containsFingerprint(data.description, fingerprint)) {
1759
- return { verified: true };
1760
- }
1761
- return { verified: false, reason: "Fingerprint token not found in repository description" };
1762
- } catch (err) {
1763
- return { verified: false, reason: `GitHub fetch failed: ${err.message}` };
1764
- }
1765
- }
1766
- async function verifyDNS(proof, fingerprint) {
1767
- try {
1768
- const resp = await fetch(
1769
- `https://cloudflare-dns.com/dns-query?name=${encodeURIComponent(proof.domain)}&type=TXT`,
1770
- { headers: { Accept: "application/dns-json" } }
1771
- );
1772
- if (!resp.ok) return { verified: false, reason: `DNS query returned ${resp.status}` };
1773
- const data = await resp.json();
1774
- for (const answer of data.Answer || []) {
1775
- if (answer.type !== 16) continue;
1776
- if (answer.data && containsFingerprint(answer.data, fingerprint)) {
1777
- return { verified: true };
1778
- }
1779
- }
1780
- return { verified: false, reason: "Fingerprint token not found in TXT records" };
1781
- } catch (err) {
1782
- return { verified: false, reason: `DNS fetch failed: ${err.message}` };
1783
- }
1784
- }
1785
- var NEYNAR_HUB = "https://hub-api.neynar.com";
1786
- async function resolveFid(username, apiKey) {
1787
- const resp = await fetch(
1788
- `${NEYNAR_HUB}/v1/userNameProofByName?name=${encodeURIComponent(username)}`,
1789
- { headers: { "x-api-key": apiKey } }
1790
- );
1791
- if (!resp.ok) return null;
1792
- const data = await resp.json();
1793
- return _nullishCoalesce(data.fid, () => ( null));
1794
- }
1795
- async function verifyFarcaster(proof, fingerprint, neynarApiKey) {
1796
- if (!neynarApiKey) {
1797
- return { verified: false, reason: "Farcaster verification requires a Neynar API key" };
1798
- }
1799
- try {
1800
- const fid = await resolveFid(proof.user, neynarApiKey);
1801
- if (!fid) return { verified: false, reason: `Could not resolve Farcaster user "${proof.user}"` };
1802
- const headers = { "x-api-key": neynarApiKey };
1803
- let pageToken = "";
1804
- for (let page = 0; page < 5; page++) {
1805
- const url = `${NEYNAR_HUB}/v1/castsByFid?fid=${fid}&pageSize=100&reverse=true${pageToken ? `&pageToken=${pageToken}` : ""}`;
1806
- const resp = await fetch(url, { headers });
1807
- if (!resp.ok) return { verified: false, reason: `Farcaster Hub returned ${resp.status}` };
1808
- const data = await resp.json();
1809
- for (const msg of data.messages || []) {
1810
- if (msg.hash && msg.hash.startsWith(proof.castHash)) {
1811
- const text = _optionalChain([msg, 'access', _30 => _30.data, 'optionalAccess', _31 => _31.castAddBody, 'optionalAccess', _32 => _32.text]) || "";
1812
- if (containsFingerprint(text, fingerprint)) {
1813
- return { verified: true };
1814
- }
1815
- }
1816
- }
1817
- if (!data.nextPageToken) break;
1818
- pageToken = data.nextPageToken;
1819
- }
1820
- return { verified: false, reason: "Cast not found" };
1821
- } catch (err) {
1822
- return { verified: false, reason: `Farcaster fetch failed: ${err.message}` };
1823
- }
1824
- }
1825
- async function verifyCodeberg(proof, fingerprint) {
1826
- try {
1827
- const resp = await fetch(
1828
- `https://codeberg.org/api/v1/repos/${encodeURIComponent(proof.user)}/${encodeURIComponent(proof.repo)}`
1829
- );
1830
- if (!resp.ok) return { verified: false, reason: `Codeberg API returned ${resp.status}` };
1831
- const data = await resp.json();
1832
- if (data.description && containsFingerprint(data.description, fingerprint)) {
1833
- return { verified: true };
1834
- }
1835
- return { verified: false, reason: "Fingerprint token not found in repo description" };
1836
- } catch (err) {
1837
- return { verified: false, reason: `Codeberg fetch failed: ${err.message}` };
1838
- }
1839
- }
1840
- async function verifyMastodon(proof, fingerprint) {
1841
- try {
1842
- if (!proof.instance || !/^[a-z0-9.-]+(?::\d+)?$/i.test(proof.instance)) {
1843
- return { verified: false, reason: "Invalid Mastodon instance host" };
1844
- }
1845
- const resp = await fetch(
1846
- `https://${proof.instance}/api/v1/accounts/lookup?acct=${encodeURIComponent(proof.user)}`
1847
- );
1848
- if (!resp.ok) return { verified: false, reason: `Mastodon API returned ${resp.status}` };
1849
- const data = await resp.json();
1850
- const keyId = keyIdHex(fingerprint.replace(/^0x/i, "").replace(/\s+/g, "").toLowerCase());
1851
- for (const field of data.fields || []) {
1852
- const text = field.value.replace(/<[^>]*>/g, "");
1853
- if (containsFingerprintUrl(text, fingerprint) || containsFingerprintUrl(text, keyId)) {
1854
- return { verified: true };
1855
- }
1856
- }
1857
- if (data.note) {
1858
- const text = data.note.replace(/<[^>]*>/g, "");
1859
- if (containsFingerprintUrl(text, fingerprint) || containsFingerprintUrl(text, keyId)) {
1860
- return { verified: true };
1861
- }
1862
- }
1863
- return { verified: false, reason: "Fingerprint not found in profile fields or bio" };
1864
- } catch (err) {
1865
- return { verified: false, reason: `Mastodon fetch failed: ${err.message}` };
1866
- }
1867
- }
1868
- var verifiers = {
1869
- github: verifyGitHub,
1870
- dns: verifyDNS,
1871
- farcaster: verifyFarcaster,
1872
- codeberg: verifyCodeberg,
1873
- mastodon: verifyMastodon
1874
- };
1875
- async function verifyProof(proof, fingerprint, neynarApiKey) {
1876
- const fn = verifiers[proof.provider];
1877
- if (!fn) return { verified: false, reason: "Unknown provider" };
1878
- return fn(proof, fingerprint, neynarApiKey);
1879
- }
1880
-
1881
- // src/hooks/usePGPProofs.ts
1882
199
  function usePGPProofs(fingerprint, armoredKey) {
1883
200
  const config = useIdentityKitConfig();
1884
201
  const { data } = _reactquery.useQuery.call(void 0, {
1885
202
  // The key is large; key the query on its length + fingerprint, which
1886
203
  // changes whenever a different attestation's key is supplied.
1887
- queryKey: ["pgp-proofs", fingerprint, _nullishCoalesce(_optionalChain([armoredKey, 'optionalAccess', _33 => _33.length]), () => ( 0))],
204
+ queryKey: ["pgp-proofs", fingerprint, _nullishCoalesce(_optionalChain([armoredKey, 'optionalAccess', _6 => _6.length]), () => ( 0))],
1888
205
  queryFn: async () => {
1889
206
  if (!fingerprint || !armoredKey) return { keyInfo: null, proofs: [] };
1890
- const keyInfo = await parsePgpKey(armoredKey);
207
+ const keyInfo = await _chunkNL4LHKJXcjs.parsePgpKey.call(void 0, armoredKey);
1891
208
  if (!keyInfo) return { keyInfo: null, proofs: [] };
1892
- const identified = keyInfo.notations.map((n) => identifyProof(n)).filter((p) => p !== null && p.provider !== "unknown");
209
+ const identified = keyInfo.notations.map((n) => _chunkNL4LHKJXcjs.identifyProof.call(void 0, n)).filter((p) => p !== null && p.provider !== "unknown");
1893
210
  const proofs = await Promise.all(
1894
211
  identified.map(async (proof) => {
1895
- const result = await verifyProof(proof, fingerprint, config.neynarApiKey);
212
+ const result = await _chunkNL4LHKJXcjs.verifyProof.call(void 0, proof, fingerprint, config.neynarApiKey);
1896
213
  return {
1897
214
  provider: proof.provider,
1898
215
  label: proof.label,
1899
216
  url: proof.url,
1900
- displayUrl: displayUrl(proof),
1901
- href: proofHref(proof),
1902
- secondaryHref: proofSecondaryHref(proof),
217
+ displayUrl: _chunkNL4LHKJXcjs.displayUrl.call(void 0, proof),
218
+ href: _chunkNL4LHKJXcjs.proofHref.call(void 0, proof),
219
+ secondaryHref: _chunkNL4LHKJXcjs.proofSecondaryHref.call(void 0, proof),
1903
220
  status: result.verified ? "verified" : "unverified",
1904
221
  reason: result.reason
1905
222
  };
@@ -1919,8 +236,8 @@ function usePGPProofs(fingerprint, armoredKey) {
1919
236
  staleTime: 3e5
1920
237
  });
1921
238
  return {
1922
- keyInfo: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _34 => _34.keyInfo]), () => ( null)),
1923
- proofs: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _35 => _35.proofs]), () => ( [])),
239
+ keyInfo: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _7 => _7.keyInfo]), () => ( null)),
240
+ proofs: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _8 => _8.proofs]), () => ( [])),
1924
241
  // Report loading whenever a fingerprint is set but its proofs haven't
1925
242
  // resolved yet. Using react-query's own isLoading leaves a gap while the
1926
243
  // query is enabling (fingerprint just became known), during which the card
@@ -1936,12 +253,12 @@ function isAddress(value) {
1936
253
  function safeNormalize(name) {
1937
254
  try {
1938
255
  return _ens.normalize.call(void 0, name);
1939
- } catch (e11) {
256
+ } catch (e2) {
1940
257
  return void 0;
1941
258
  }
1942
259
  }
1943
260
  function useThurinIdentity(ensOrAddress) {
1944
- const chain = chainFor(useIdentityKitConfig().network);
261
+ const chain = _chunkNL4LHKJXcjs.chainFor.call(void 0, useIdentityKitConfig().network);
1945
262
  const isAddr = ensOrAddress ? isAddress(ensOrAddress) : false;
1946
263
  const ensInput = ensOrAddress && !isAddr ? safeNormalize(ensOrAddress) : void 0;
1947
264
  const { data: resolvedAddress } = _wagmi.useEnsAddress.call(void 0, {
@@ -1969,13 +286,13 @@ function useThurinIdentity(ensOrAddress) {
1969
286
  isLoading: claimsLoading
1970
287
  } = useAttestations(address);
1971
288
  const currentClaim = [...claims].reverse().find(
1972
- (c) => !c.revoked && _optionalChain([c, 'access', _36 => _36.verification, 'optionalAccess', _37 => _37.verified]) && c.fingerprint === currentFingerprint
289
+ (c) => !c.revoked && _optionalChain([c, 'access', _9 => _9.verification, 'optionalAccess', _10 => _10.verified]) && c.fingerprint === currentFingerprint
1973
290
  );
1974
291
  const {
1975
292
  keyInfo: pgpKeyInfo,
1976
293
  proofs,
1977
294
  isLoading: proofsLoading
1978
- } = usePGPProofs(currentFingerprint, _nullishCoalesce(_optionalChain([currentClaim, 'optionalAccess', _38 => _38.pgpPublicKey]), () => ( null)));
295
+ } = usePGPProofs(currentFingerprint, _nullishCoalesce(_optionalChain([currentClaim, 'optionalAccess', _11 => _11.pgpPublicKey]), () => ( null)));
1979
296
  const { efp, isLoading: efpLoading } = useEFPGraph(address);
1980
297
  return {
1981
298
  address,
@@ -2014,7 +331,7 @@ function ThurinCard({ ens, address, theme = "thurin" }) {
2014
331
  }
2015
332
  const displayAddress = identity.address || null;
2016
333
  const verifiedProofs = identity.proofs.filter((p) => p.status === "verified").length;
2017
- const hasVerifiedPgp = identity.claims.some((c) => _optionalChain([c, 'access', _39 => _39.verification, 'optionalAccess', _40 => _40.verified]) && !c.revoked);
334
+ const hasVerifiedPgp = identity.claims.some((c) => _optionalChain([c, 'access', _12 => _12.verification, 'optionalAccess', _13 => _13.verified]) && !c.revoked);
2018
335
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "thurin-card", "data-thurin-theme": theme, children: [
2019
336
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "a", { className: "thurin-card-header", href: profileUrl || void 0, target: "_blank", rel: "noopener noreferrer", children: [
2020
337
  identity.ensAvatar ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2040,13 +357,13 @@ function ThurinCard({ ens, address, theme = "thurin" }) {
2040
357
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "thurin-card-stat-label", children: "Proofs" })
2041
358
  ] }),
2042
359
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "thurin-card-stat", children: [
2043
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "thurin-card-stat-value", children: _nullishCoalesce(_optionalChain([identity, 'access', _41 => _41.efp, 'optionalAccess', _42 => _42.followers]), () => ( 0)) }),
360
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "thurin-card-stat-value", children: _nullishCoalesce(_optionalChain([identity, 'access', _14 => _14.efp, 'optionalAccess', _15 => _15.followers]), () => ( 0)) }),
2044
361
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "thurin-card-stat-label", children: "Followers" })
2045
362
  ] })
2046
363
  ] }),
2047
364
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "thurin-card-badges", children: [
2048
365
  hasVerifiedPgp && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "thurin-card-badge thurin-card-badge--verified", children: "PGP Verified" }),
2049
- _optionalChain([identity, 'access', _43 => _43.efp, 'optionalAccess', _44 => _44.hasEfp]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "thurin-card-badge thurin-card-badge--verified", children: "EFP" }),
366
+ _optionalChain([identity, 'access', _16 => _16.efp, 'optionalAccess', _17 => _17.hasEfp]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "thurin-card-badge thurin-card-badge--verified", children: "EFP" }),
2050
367
  identity.proofs.map((p, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2051
368
  "span",
2052
369
  {
@@ -2069,108 +386,6 @@ function ThurinCard({ ens, address, theme = "thurin" }) {
2069
386
  ] });
2070
387
  }
2071
388
 
2072
- // src/core/authorization.ts
2073
-
2074
- var EIP712_NAME = "Thurin PGPRegistry";
2075
- var EIP712_VERSION = "2";
2076
- function registryDomain(chainId, verifyingContract) {
2077
- return { name: EIP712_NAME, version: EIP712_VERSION, chainId, verifyingContract };
2078
- }
2079
- var AUTHORIZATION_TYPES = {
2080
- Attest: [
2081
- { name: "owner", type: "address" },
2082
- { name: "fingerprint", type: "bytes" },
2083
- { name: "pgpSignature", type: "bytes" },
2084
- { name: "pgpPublicKey", type: "bytes" },
2085
- { name: "nonce", type: "uint256" },
2086
- { name: "deadline", type: "uint256" }
2087
- ],
2088
- Reattest: [
2089
- { name: "owner", type: "address" },
2090
- { name: "revokeIndex", type: "uint256" },
2091
- { name: "fingerprint", type: "bytes" },
2092
- { name: "pgpSignature", type: "bytes" },
2093
- { name: "pgpPublicKey", type: "bytes" },
2094
- { name: "nonce", type: "uint256" },
2095
- { name: "deadline", type: "uint256" }
2096
- ],
2097
- UpdateKey: [
2098
- { name: "owner", type: "address" },
2099
- { name: "index", type: "uint256" },
2100
- { name: "pgpPublicKey", type: "bytes" },
2101
- { name: "nonce", type: "uint256" },
2102
- { name: "deadline", type: "uint256" }
2103
- ],
2104
- Revoke: [
2105
- { name: "owner", type: "address" },
2106
- { name: "index", type: "uint256" },
2107
- { name: "nonce", type: "uint256" },
2108
- { name: "deadline", type: "uint256" }
2109
- ],
2110
- SetRecord: [
2111
- { name: "owner", type: "address" },
2112
- { name: "index", type: "uint256" },
2113
- { name: "kind", type: "bytes32" },
2114
- { name: "value", type: "bytes" },
2115
- { name: "nonce", type: "uint256" },
2116
- { name: "deadline", type: "uint256" }
2117
- ]
2118
- };
2119
- function attestTypedData(chainId, registry, a) {
2120
- return {
2121
- domain: registryDomain(chainId, registry),
2122
- types: { Attest: AUTHORIZATION_TYPES.Attest },
2123
- primaryType: "Attest",
2124
- message: {
2125
- owner: a.owner,
2126
- fingerprint: fingerprintToBytes(a.fingerprint),
2127
- pgpSignature: _viem.stringToHex.call(void 0, a.pgpSignature),
2128
- pgpPublicKey: _viem.stringToHex.call(void 0, a.pgpPublicKey),
2129
- nonce: a.nonce,
2130
- deadline: a.deadline
2131
- }
2132
- };
2133
- }
2134
- function reattestTypedData(chainId, registry, a) {
2135
- const base = attestTypedData(chainId, registry, a);
2136
- return {
2137
- domain: base.domain,
2138
- types: { Reattest: AUTHORIZATION_TYPES.Reattest },
2139
- primaryType: "Reattest",
2140
- message: { ...base.message, revokeIndex: a.revokeIndex }
2141
- };
2142
- }
2143
- function updateKeyTypedData(chainId, registry, a) {
2144
- return {
2145
- domain: registryDomain(chainId, registry),
2146
- types: { UpdateKey: AUTHORIZATION_TYPES.UpdateKey },
2147
- primaryType: "UpdateKey",
2148
- message: { owner: a.owner, index: a.index, pgpPublicKey: _viem.stringToHex.call(void 0, a.pgpPublicKey), nonce: a.nonce, deadline: a.deadline }
2149
- };
2150
- }
2151
- function revokeTypedData(chainId, registry, a) {
2152
- return {
2153
- domain: registryDomain(chainId, registry),
2154
- types: { Revoke: AUTHORIZATION_TYPES.Revoke },
2155
- primaryType: "Revoke",
2156
- message: { owner: a.owner, index: a.index, nonce: a.nonce, deadline: a.deadline }
2157
- };
2158
- }
2159
- function setRecordTypedData(chainId, registry, a) {
2160
- return {
2161
- domain: registryDomain(chainId, registry),
2162
- types: { SetRecord: AUTHORIZATION_TYPES.SetRecord },
2163
- primaryType: "SetRecord",
2164
- message: { owner: a.owner, index: a.index, kind: a.kind, value: a.value, nonce: a.nonce, deadline: a.deadline }
2165
- };
2166
- }
2167
- function authorizationDigest(typedData) {
2168
- return _viem.hashTypedData.call(void 0, typedData);
2169
- }
2170
- function recordKind(name) {
2171
- return _viem.keccak256.call(void 0, _viem.stringToHex.call(void 0, name));
2172
- }
2173
-
2174
389
 
2175
390
 
2176
391
 
@@ -2212,5 +427,5 @@ function recordKind(name) {
2212
427
 
2213
428
 
2214
429
 
2215
- exports.AUTHORIZATION_TYPES = AUTHORIZATION_TYPES; exports.EIP712_NAME = EIP712_NAME; exports.EIP712_VERSION = EIP712_VERSION; exports.IdentityKitProvider = IdentityKitProvider; exports.NETWORKS = NETWORKS; exports.REGISTRY_ABI = REGISTRY_ABI; exports.REGISTRY_ADDRESS = REGISTRY_ADDRESS; exports.ThurinCard = ThurinCard; exports.attestTypedData = attestTypedData; exports.authorizationDigest = authorizationDigest; exports.bytesToFingerprint = bytesToFingerprint; exports.chainFor = chainFor; exports.displayUrl = displayUrl; exports.fetchEFPGraph = fetchEFPGraph; exports.fetchKeyByFingerprint = fetchKeyByFingerprint; exports.fetchKeyByKeyId = fetchKeyByKeyId; exports.fingerprintHash = fingerprintHash; exports.fingerprintToBytes = fingerprintToBytes; exports.getRegistry = getRegistry; exports.hasEmailUserID = hasEmailUserID; exports.identifyProof = identifyProof; exports.isNetworkName = isNetworkName; exports.keyIdOf = keyIdOf; exports.keyIdToBytes = keyIdToBytes; exports.normalizeFingerprint = normalizeFingerprint; exports.parsePgpKey = parsePgpKey; exports.proofHref = proofHref; exports.proofSecondaryHref = proofSecondaryHref; exports.reattestTypedData = reattestTypedData; exports.recordKind = recordKind; exports.registryDomain = registryDomain; exports.revokeTypedData = revokeTypedData; exports.setRecordTypedData = setRecordTypedData; exports.stripEmailUserIDs = stripEmailUserIDs; exports.updateKeyTypedData = updateKeyTypedData; exports.useAttestations = useAttestations; exports.useEFPGraph = useEFPGraph; exports.usePGPProofs = usePGPProofs; exports.useThurinIdentity = useThurinIdentity; exports.verifyAttestation = verifyAttestation; exports.verifyProof = verifyProof;
430
+ exports.AUTHORIZATION_TYPES = _chunkNL4LHKJXcjs.AUTHORIZATION_TYPES; exports.EIP712_NAME = _chunkNL4LHKJXcjs.EIP712_NAME; exports.EIP712_VERSION = _chunkNL4LHKJXcjs.EIP712_VERSION; exports.IdentityKitProvider = IdentityKitProvider; exports.NETWORKS = _chunkNL4LHKJXcjs.NETWORKS; exports.REGISTRY_ABI = _chunkNL4LHKJXcjs.REGISTRY_ABI; exports.REGISTRY_ADDRESS = _chunkNL4LHKJXcjs.REGISTRY_ADDRESS; exports.ThurinCard = ThurinCard; exports.attestTypedData = _chunkNL4LHKJXcjs.attestTypedData; exports.authorizationDigest = _chunkNL4LHKJXcjs.authorizationDigest; exports.bytesToFingerprint = _chunkNL4LHKJXcjs.bytesToFingerprint; exports.chainFor = _chunkNL4LHKJXcjs.chainFor; exports.displayUrl = _chunkNL4LHKJXcjs.displayUrl; exports.fetchEFPGraph = _chunkNL4LHKJXcjs.fetchEFPGraph; exports.fetchKeyByFingerprint = _chunkNL4LHKJXcjs.fetchKeyByFingerprint; exports.fetchKeyByKeyId = _chunkNL4LHKJXcjs.fetchKeyByKeyId; exports.fingerprintHash = _chunkNL4LHKJXcjs.fingerprintHash; exports.fingerprintToBytes = _chunkNL4LHKJXcjs.fingerprintToBytes; exports.getRegistry = _chunkNL4LHKJXcjs.getRegistry; exports.hasEmailUserID = _chunkNL4LHKJXcjs.hasEmailUserID; exports.identifyProof = _chunkNL4LHKJXcjs.identifyProof; exports.isNetworkName = _chunkNL4LHKJXcjs.isNetworkName; exports.keyIdOf = _chunkNL4LHKJXcjs.keyIdOf; exports.keyIdToBytes = _chunkNL4LHKJXcjs.keyIdToBytes; exports.normalizeFingerprint = _chunkNL4LHKJXcjs.normalizeFingerprint; exports.parsePgpKey = _chunkNL4LHKJXcjs.parsePgpKey; exports.proofHref = _chunkNL4LHKJXcjs.proofHref; exports.proofSecondaryHref = _chunkNL4LHKJXcjs.proofSecondaryHref; exports.reattestTypedData = _chunkNL4LHKJXcjs.reattestTypedData; exports.recordKind = _chunkNL4LHKJXcjs.recordKind; exports.registryDomain = _chunkNL4LHKJXcjs.registryDomain; exports.revokeTypedData = _chunkNL4LHKJXcjs.revokeTypedData; exports.setRecordTypedData = _chunkNL4LHKJXcjs.setRecordTypedData; exports.stripEmailUserIDs = _chunkNL4LHKJXcjs.stripEmailUserIDs; exports.updateKeyTypedData = _chunkNL4LHKJXcjs.updateKeyTypedData; exports.useAttestations = useAttestations; exports.useEFPGraph = useEFPGraph; exports.usePGPProofs = usePGPProofs; exports.useThurinIdentity = useThurinIdentity; exports.verifyAttestation = _chunkNL4LHKJXcjs.verifyAttestation; exports.verifyProof = _chunkNL4LHKJXcjs.verifyProof;
2216
431
  //# sourceMappingURL=index.cjs.map