@thurinlabs/identity-kit 1.0.4 → 1.1.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.
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
+
33
+
5
34
 
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
- }
35
+
36
+
37
+ var _chunkRC4PCCYVcjs = require('./chunk-RC4PCCYV.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 || _chunkRC4PCCYVcjs.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 = _chunkRC4PCCYVcjs.getRegistry.call(void 0, config.network, config.registryAddress);
111
+ const chain = _chunkRC4PCCYVcjs.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: _chunkRC4PCCYVcjs.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: _chunkRC4PCCYVcjs.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 = _chunkRC4PCCYVcjs.bytesToFingerprint.call(void 0, row.fingerprint);
150
+ const verification = pgpPublicKey && pgpSignature ? await _chunkRC4PCCYVcjs.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,43 +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 [statsResp, listsResp] = await Promise.all([
1603
- fetch(`${EFP_API}/users/${address}/stats`),
1604
- fetch(`${EFP_API}/users/${address}/lists`)
1605
- ]);
1606
- if (!statsResp.ok && !listsResp.ok) return null;
1607
- const statsData = statsResp.ok ? await statsResp.json() : {};
1608
- const listsData = listsResp.ok ? await listsResp.json() : {};
1609
- const followers = parseInt(statsData.followers_count) || 0;
1610
- const listId = listsData.primary_list;
1611
- let following = 0;
1612
- let top8 = [];
1613
- if (listId) {
1614
- const [followingResp, top8Resp] = await Promise.all([
1615
- fetch(`${EFP_API}/lists/${listId}/following?limit=100`),
1616
- fetch(`${EFP_API}/lists/${listId}/following?limit=8&tags=top8`)
1617
- ]);
1618
- const followingData = followingResp.ok ? await followingResp.json() : { following: [] };
1619
- const top8Data = top8Resp.ok ? await top8Resp.json() : { following: [] };
1620
- following = (followingData.following || []).length;
1621
- top8 = (top8Data.following || []).map((f) => f.data);
1622
- }
1623
- return { followers, following, top8, hasEfp: !!listId || followers > 0 };
1624
- } catch (e10) {
1625
- return null;
1626
- }
1627
- }
1628
-
1629
- // src/hooks/useEFPGraph.ts
1630
184
  function useEFPGraph(address) {
1631
185
  const { data, isLoading } = _reactquery.useQuery.call(void 0, {
1632
186
  queryKey: ["efp-graph", address],
1633
- queryFn: () => fetchEFPGraph(address),
187
+ queryFn: () => _chunkRC4PCCYVcjs.fetchEFPGraph.call(void 0, address),
1634
188
  enabled: !!address,
1635
189
  staleTime: 3e5
1636
190
  });
@@ -1642,267 +196,27 @@ function useEFPGraph(address) {
1642
196
 
1643
197
  // src/hooks/usePGPProofs.ts
1644
198
 
1645
-
1646
- // src/core/proofs.ts
1647
- var PROVIDERS = [
1648
- {
1649
- provider: "github",
1650
- label: "GitHub",
1651
- pattern: /^https:\/\/gist\.github\.com\/([^/]+)\/([a-f0-9]+)$/i,
1652
- parse: (m) => ({ user: m[1], gistId: m[2] })
1653
- },
1654
- {
1655
- // A repository's description — the form an organisation can use, since
1656
- // gists belong to user accounts only. Same shape as the Codeberg proof.
1657
- provider: "github",
1658
- label: "GitHub",
1659
- pattern: /^https:\/\/github\.com\/([A-Za-z0-9-]+)\/([A-Za-z0-9._-]+)$/i,
1660
- parse: (m) => ({ user: m[1], repo: m[2] })
1661
- },
1662
- {
1663
- provider: "dns",
1664
- label: "DNS",
1665
- // domain is restricted to a hostname (labels may include underscores for
1666
- // records like _thurin.example.com); rejects slashes, userinfo, and spaces.
1667
- pattern: /^dns:([a-z0-9._-]+)\?type=TXT$/i,
1668
- parse: (m) => ({ domain: m[1] })
1669
- },
1670
- {
1671
- provider: "farcaster",
1672
- label: "Farcaster",
1673
- pattern: /^https:\/\/farcaster\.xyz\/([^/]+)\/(0x[a-f0-9]+)$/i,
1674
- parse: (m) => ({ user: m[1], castHash: m[2] })
1675
- },
1676
- {
1677
- provider: "codeberg",
1678
- label: "Codeberg",
1679
- pattern: /^https:\/\/codeberg\.org\/([^/]+)\/([^/]+)$/i,
1680
- parse: (m) => ({ user: m[1], repo: m[2] })
1681
- },
1682
- {
1683
- provider: "mastodon",
1684
- label: "Mastodon",
1685
- // instance is restricted to a bare hostname (optional port) so a value
1686
- // like "mastodon.social@evil.com" can't redirect the lookup elsewhere.
1687
- pattern: /^https:\/\/([a-z0-9.-]+(?::\d+)?)\/@([^/@?#\s]+)$/i,
1688
- parse: (m) => ({ instance: m[1], user: m[2] })
1689
- }
1690
- ];
1691
- function identifyProof(notation) {
1692
- if (notation.name !== "proof@thurin.id") return null;
1693
- for (const { provider, label, pattern, parse } of PROVIDERS) {
1694
- const m = notation.value.match(pattern);
1695
- if (m) {
1696
- return { provider, label, url: notation.value, ...parse(m) };
1697
- }
1698
- }
1699
- return { provider: "unknown", label: "Unknown", url: notation.value };
1700
- }
1701
- function displayUrl(proof) {
1702
- if (proof.provider === "dns") return proof.domain;
1703
- if (proof.provider === "github") return proof.user;
1704
- if (proof.provider === "farcaster") return `@${proof.user}`;
1705
- if (proof.provider === "codeberg") return proof.user;
1706
- if (proof.provider === "mastodon") return `@${proof.user}@${proof.instance}`;
1707
- return proof.url;
1708
- }
1709
- function proofHref(proof) {
1710
- if (proof.provider === "dns") return `https://${proof.domain}`;
1711
- if (proof.provider === "github") return `https://github.com/${proof.user}`;
1712
- if (proof.provider === "farcaster") return `https://farcaster.xyz/${proof.user}`;
1713
- if (proof.provider === "codeberg") return `https://codeberg.org/${proof.user}`;
1714
- if (proof.provider === "mastodon") return `https://${proof.instance}/@${proof.user}`;
1715
- if (proof.url.startsWith("http")) return proof.url;
1716
- return null;
1717
- }
1718
- function proofSecondaryHref(proof) {
1719
- if (proof.provider === "github") return proof.url;
1720
- if (proof.provider === "farcaster") return proof.url;
1721
- if (proof.provider === "codeberg") return proof.url;
1722
- if (proof.provider === "mastodon") return proof.url;
1723
- return null;
1724
- }
1725
- var FPR_TOKEN = "OPENPGP4FPR:";
1726
- function containsFingerprint(text, fingerprint) {
1727
- return text.toUpperCase().includes(FPR_TOKEN + fingerprint.toUpperCase());
1728
- }
1729
- function containsFingerprintUrl(text, fingerprint) {
1730
- return text.toUpperCase().includes(fingerprint.toUpperCase());
1731
- }
1732
- async function verifyGitHub(proof, fingerprint) {
1733
- if (proof.repo) return verifyGitHubRepo(proof, fingerprint);
1734
- try {
1735
- const resp = await fetch(`https://api.github.com/gists/${proof.gistId}`);
1736
- if (!resp.ok) return { verified: false, reason: `GitHub API returned ${resp.status}` };
1737
- const data = await resp.json();
1738
- if (_optionalChain([data, 'access', _22 => _22.owner, 'optionalAccess', _23 => _23.login, 'optionalAccess', _24 => _24.toLowerCase, 'call', _25 => _25()]) !== proof.user.toLowerCase()) {
1739
- return { verified: false, reason: "Gist owner does not match claimed user" };
1740
- }
1741
- for (const file of Object.values(data.files || {})) {
1742
- if (file.content && containsFingerprint(file.content, fingerprint)) {
1743
- return { verified: true };
1744
- }
1745
- }
1746
- return { verified: false, reason: "Fingerprint token not found in gist" };
1747
- } catch (err) {
1748
- return { verified: false, reason: `GitHub fetch failed: ${err.message}` };
1749
- }
1750
- }
1751
- async function verifyGitHubRepo(proof, fingerprint) {
1752
- try {
1753
- const resp = await fetch(
1754
- `https://api.github.com/repos/${encodeURIComponent(proof.user)}/${encodeURIComponent(proof.repo)}`
1755
- );
1756
- if (!resp.ok) return { verified: false, reason: `GitHub API returned ${resp.status}` };
1757
- const data = await resp.json();
1758
- if (_optionalChain([data, 'access', _26 => _26.owner, 'optionalAccess', _27 => _27.login, 'optionalAccess', _28 => _28.toLowerCase, 'call', _29 => _29()]) !== proof.user.toLowerCase()) {
1759
- return { verified: false, reason: "Repository owner does not match claimed account" };
1760
- }
1761
- if (data.description && containsFingerprint(data.description, fingerprint)) {
1762
- return { verified: true };
1763
- }
1764
- return { verified: false, reason: "Fingerprint token not found in repository description" };
1765
- } catch (err) {
1766
- return { verified: false, reason: `GitHub fetch failed: ${err.message}` };
1767
- }
1768
- }
1769
- async function verifyDNS(proof, fingerprint) {
1770
- try {
1771
- const resp = await fetch(
1772
- `https://cloudflare-dns.com/dns-query?name=${encodeURIComponent(proof.domain)}&type=TXT`,
1773
- { headers: { Accept: "application/dns-json" } }
1774
- );
1775
- if (!resp.ok) return { verified: false, reason: `DNS query returned ${resp.status}` };
1776
- const data = await resp.json();
1777
- for (const answer of data.Answer || []) {
1778
- if (answer.type !== 16) continue;
1779
- if (answer.data && containsFingerprint(answer.data, fingerprint)) {
1780
- return { verified: true };
1781
- }
1782
- }
1783
- return { verified: false, reason: "Fingerprint token not found in TXT records" };
1784
- } catch (err) {
1785
- return { verified: false, reason: `DNS fetch failed: ${err.message}` };
1786
- }
1787
- }
1788
- var NEYNAR_HUB = "https://hub-api.neynar.com";
1789
- async function resolveFid(username, apiKey) {
1790
- const resp = await fetch(
1791
- `${NEYNAR_HUB}/v1/userNameProofByName?name=${encodeURIComponent(username)}`,
1792
- { headers: { "x-api-key": apiKey } }
1793
- );
1794
- if (!resp.ok) return null;
1795
- const data = await resp.json();
1796
- return _nullishCoalesce(data.fid, () => ( null));
1797
- }
1798
- async function verifyFarcaster(proof, fingerprint, neynarApiKey) {
1799
- if (!neynarApiKey) {
1800
- return { verified: false, reason: "Farcaster verification requires a Neynar API key" };
1801
- }
1802
- try {
1803
- const fid = await resolveFid(proof.user, neynarApiKey);
1804
- if (!fid) return { verified: false, reason: `Could not resolve Farcaster user "${proof.user}"` };
1805
- const headers = { "x-api-key": neynarApiKey };
1806
- let pageToken = "";
1807
- for (let page = 0; page < 5; page++) {
1808
- const url = `${NEYNAR_HUB}/v1/castsByFid?fid=${fid}&pageSize=100&reverse=true${pageToken ? `&pageToken=${pageToken}` : ""}`;
1809
- const resp = await fetch(url, { headers });
1810
- if (!resp.ok) return { verified: false, reason: `Farcaster Hub returned ${resp.status}` };
1811
- const data = await resp.json();
1812
- for (const msg of data.messages || []) {
1813
- if (msg.hash && msg.hash.startsWith(proof.castHash)) {
1814
- const text = _optionalChain([msg, 'access', _30 => _30.data, 'optionalAccess', _31 => _31.castAddBody, 'optionalAccess', _32 => _32.text]) || "";
1815
- if (containsFingerprint(text, fingerprint)) {
1816
- return { verified: true };
1817
- }
1818
- }
1819
- }
1820
- if (!data.nextPageToken) break;
1821
- pageToken = data.nextPageToken;
1822
- }
1823
- return { verified: false, reason: "Cast not found" };
1824
- } catch (err) {
1825
- return { verified: false, reason: `Farcaster fetch failed: ${err.message}` };
1826
- }
1827
- }
1828
- async function verifyCodeberg(proof, fingerprint) {
1829
- try {
1830
- const resp = await fetch(
1831
- `https://codeberg.org/api/v1/repos/${encodeURIComponent(proof.user)}/${encodeURIComponent(proof.repo)}`
1832
- );
1833
- if (!resp.ok) return { verified: false, reason: `Codeberg API returned ${resp.status}` };
1834
- const data = await resp.json();
1835
- if (data.description && containsFingerprint(data.description, fingerprint)) {
1836
- return { verified: true };
1837
- }
1838
- return { verified: false, reason: "Fingerprint token not found in repo description" };
1839
- } catch (err) {
1840
- return { verified: false, reason: `Codeberg fetch failed: ${err.message}` };
1841
- }
1842
- }
1843
- async function verifyMastodon(proof, fingerprint) {
1844
- try {
1845
- if (!proof.instance || !/^[a-z0-9.-]+(?::\d+)?$/i.test(proof.instance)) {
1846
- return { verified: false, reason: "Invalid Mastodon instance host" };
1847
- }
1848
- const resp = await fetch(
1849
- `https://${proof.instance}/api/v1/accounts/lookup?acct=${encodeURIComponent(proof.user)}`
1850
- );
1851
- if (!resp.ok) return { verified: false, reason: `Mastodon API returned ${resp.status}` };
1852
- const data = await resp.json();
1853
- const keyId = keyIdHex(fingerprint.replace(/^0x/i, "").replace(/\s+/g, "").toLowerCase());
1854
- for (const field of data.fields || []) {
1855
- const text = field.value.replace(/<[^>]*>/g, "");
1856
- if (containsFingerprintUrl(text, fingerprint) || containsFingerprintUrl(text, keyId)) {
1857
- return { verified: true };
1858
- }
1859
- }
1860
- if (data.note) {
1861
- const text = data.note.replace(/<[^>]*>/g, "");
1862
- if (containsFingerprintUrl(text, fingerprint) || containsFingerprintUrl(text, keyId)) {
1863
- return { verified: true };
1864
- }
1865
- }
1866
- return { verified: false, reason: "Fingerprint not found in profile fields or bio" };
1867
- } catch (err) {
1868
- return { verified: false, reason: `Mastodon fetch failed: ${err.message}` };
1869
- }
1870
- }
1871
- var verifiers = {
1872
- github: verifyGitHub,
1873
- dns: verifyDNS,
1874
- farcaster: verifyFarcaster,
1875
- codeberg: verifyCodeberg,
1876
- mastodon: verifyMastodon
1877
- };
1878
- async function verifyProof(proof, fingerprint, neynarApiKey) {
1879
- const fn = verifiers[proof.provider];
1880
- if (!fn) return { verified: false, reason: "Unknown provider" };
1881
- return fn(proof, fingerprint, neynarApiKey);
1882
- }
1883
-
1884
- // src/hooks/usePGPProofs.ts
1885
199
  function usePGPProofs(fingerprint, armoredKey) {
1886
200
  const config = useIdentityKitConfig();
1887
201
  const { data } = _reactquery.useQuery.call(void 0, {
1888
202
  // The key is large; key the query on its length + fingerprint, which
1889
203
  // changes whenever a different attestation's key is supplied.
1890
- 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))],
1891
205
  queryFn: async () => {
1892
206
  if (!fingerprint || !armoredKey) return { keyInfo: null, proofs: [] };
1893
- const keyInfo = await parsePgpKey(armoredKey);
207
+ const keyInfo = await _chunkRC4PCCYVcjs.parsePgpKey.call(void 0, armoredKey);
1894
208
  if (!keyInfo) return { keyInfo: null, proofs: [] };
1895
- const identified = keyInfo.notations.map((n) => identifyProof(n)).filter((p) => p !== null && p.provider !== "unknown");
209
+ const identified = keyInfo.notations.map((n) => _chunkRC4PCCYVcjs.identifyProof.call(void 0, n)).filter((p) => p !== null && p.provider !== "unknown");
1896
210
  const proofs = await Promise.all(
1897
211
  identified.map(async (proof) => {
1898
- const result = await verifyProof(proof, fingerprint, config.neynarApiKey);
212
+ const result = await _chunkRC4PCCYVcjs.verifyProof.call(void 0, proof, fingerprint, config.neynarApiKey);
1899
213
  return {
1900
214
  provider: proof.provider,
1901
215
  label: proof.label,
1902
216
  url: proof.url,
1903
- displayUrl: displayUrl(proof),
1904
- href: proofHref(proof),
1905
- secondaryHref: proofSecondaryHref(proof),
217
+ displayUrl: _chunkRC4PCCYVcjs.displayUrl.call(void 0, proof),
218
+ href: _chunkRC4PCCYVcjs.proofHref.call(void 0, proof),
219
+ secondaryHref: _chunkRC4PCCYVcjs.proofSecondaryHref.call(void 0, proof),
1906
220
  status: result.verified ? "verified" : "unverified",
1907
221
  reason: result.reason
1908
222
  };
@@ -1922,8 +236,8 @@ function usePGPProofs(fingerprint, armoredKey) {
1922
236
  staleTime: 3e5
1923
237
  });
1924
238
  return {
1925
- keyInfo: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _34 => _34.keyInfo]), () => ( null)),
1926
- 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]), () => ( [])),
1927
241
  // Report loading whenever a fingerprint is set but its proofs haven't
1928
242
  // resolved yet. Using react-query's own isLoading leaves a gap while the
1929
243
  // query is enabling (fingerprint just became known), during which the card
@@ -1939,12 +253,12 @@ function isAddress(value) {
1939
253
  function safeNormalize(name) {
1940
254
  try {
1941
255
  return _ens.normalize.call(void 0, name);
1942
- } catch (e11) {
256
+ } catch (e2) {
1943
257
  return void 0;
1944
258
  }
1945
259
  }
1946
260
  function useThurinIdentity(ensOrAddress) {
1947
- const chain = chainFor(useIdentityKitConfig().network);
261
+ const chain = _chunkRC4PCCYVcjs.chainFor.call(void 0, useIdentityKitConfig().network);
1948
262
  const isAddr = ensOrAddress ? isAddress(ensOrAddress) : false;
1949
263
  const ensInput = ensOrAddress && !isAddr ? safeNormalize(ensOrAddress) : void 0;
1950
264
  const { data: resolvedAddress } = _wagmi.useEnsAddress.call(void 0, {
@@ -1972,13 +286,13 @@ function useThurinIdentity(ensOrAddress) {
1972
286
  isLoading: claimsLoading
1973
287
  } = useAttestations(address);
1974
288
  const currentClaim = [...claims].reverse().find(
1975
- (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
1976
290
  );
1977
291
  const {
1978
292
  keyInfo: pgpKeyInfo,
1979
293
  proofs,
1980
294
  isLoading: proofsLoading
1981
- } = usePGPProofs(currentFingerprint, _nullishCoalesce(_optionalChain([currentClaim, 'optionalAccess', _38 => _38.pgpPublicKey]), () => ( null)));
295
+ } = usePGPProofs(currentFingerprint, _nullishCoalesce(_optionalChain([currentClaim, 'optionalAccess', _11 => _11.pgpPublicKey]), () => ( null)));
1982
296
  const { efp, isLoading: efpLoading } = useEFPGraph(address);
1983
297
  return {
1984
298
  address,
@@ -2017,7 +331,7 @@ function ThurinCard({ ens, address, theme = "thurin" }) {
2017
331
  }
2018
332
  const displayAddress = identity.address || null;
2019
333
  const verifiedProofs = identity.proofs.filter((p) => p.status === "verified").length;
2020
- 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);
2021
335
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "thurin-card", "data-thurin-theme": theme, children: [
2022
336
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "a", { className: "thurin-card-header", href: profileUrl || void 0, target: "_blank", rel: "noopener noreferrer", children: [
2023
337
  identity.ensAvatar ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2043,13 +357,13 @@ function ThurinCard({ ens, address, theme = "thurin" }) {
2043
357
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "thurin-card-stat-label", children: "Proofs" })
2044
358
  ] }),
2045
359
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "thurin-card-stat", children: [
2046
- /* @__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)) }),
2047
361
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "thurin-card-stat-label", children: "Followers" })
2048
362
  ] })
2049
363
  ] }),
2050
364
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "thurin-card-badges", children: [
2051
365
  hasVerifiedPgp && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "thurin-card-badge thurin-card-badge--verified", children: "PGP Verified" }),
2052
- _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" }),
2053
367
  identity.proofs.map((p, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2054
368
  "span",
2055
369
  {
@@ -2072,108 +386,6 @@ function ThurinCard({ ens, address, theme = "thurin" }) {
2072
386
  ] });
2073
387
  }
2074
388
 
2075
- // src/core/authorization.ts
2076
-
2077
- var EIP712_NAME = "Thurin PGPRegistry";
2078
- var EIP712_VERSION = "2";
2079
- function registryDomain(chainId, verifyingContract) {
2080
- return { name: EIP712_NAME, version: EIP712_VERSION, chainId, verifyingContract };
2081
- }
2082
- var AUTHORIZATION_TYPES = {
2083
- Attest: [
2084
- { name: "owner", type: "address" },
2085
- { name: "fingerprint", type: "bytes" },
2086
- { name: "pgpSignature", type: "bytes" },
2087
- { name: "pgpPublicKey", type: "bytes" },
2088
- { name: "nonce", type: "uint256" },
2089
- { name: "deadline", type: "uint256" }
2090
- ],
2091
- Reattest: [
2092
- { name: "owner", type: "address" },
2093
- { name: "revokeIndex", type: "uint256" },
2094
- { name: "fingerprint", type: "bytes" },
2095
- { name: "pgpSignature", type: "bytes" },
2096
- { name: "pgpPublicKey", type: "bytes" },
2097
- { name: "nonce", type: "uint256" },
2098
- { name: "deadline", type: "uint256" }
2099
- ],
2100
- UpdateKey: [
2101
- { name: "owner", type: "address" },
2102
- { name: "index", type: "uint256" },
2103
- { name: "pgpPublicKey", type: "bytes" },
2104
- { name: "nonce", type: "uint256" },
2105
- { name: "deadline", type: "uint256" }
2106
- ],
2107
- Revoke: [
2108
- { name: "owner", type: "address" },
2109
- { name: "index", type: "uint256" },
2110
- { name: "nonce", type: "uint256" },
2111
- { name: "deadline", type: "uint256" }
2112
- ],
2113
- SetRecord: [
2114
- { name: "owner", type: "address" },
2115
- { name: "index", type: "uint256" },
2116
- { name: "kind", type: "bytes32" },
2117
- { name: "value", type: "bytes" },
2118
- { name: "nonce", type: "uint256" },
2119
- { name: "deadline", type: "uint256" }
2120
- ]
2121
- };
2122
- function attestTypedData(chainId, registry, a) {
2123
- return {
2124
- domain: registryDomain(chainId, registry),
2125
- types: { Attest: AUTHORIZATION_TYPES.Attest },
2126
- primaryType: "Attest",
2127
- message: {
2128
- owner: a.owner,
2129
- fingerprint: fingerprintToBytes(a.fingerprint),
2130
- pgpSignature: _viem.stringToHex.call(void 0, a.pgpSignature),
2131
- pgpPublicKey: _viem.stringToHex.call(void 0, a.pgpPublicKey),
2132
- nonce: a.nonce,
2133
- deadline: a.deadline
2134
- }
2135
- };
2136
- }
2137
- function reattestTypedData(chainId, registry, a) {
2138
- const base = attestTypedData(chainId, registry, a);
2139
- return {
2140
- domain: base.domain,
2141
- types: { Reattest: AUTHORIZATION_TYPES.Reattest },
2142
- primaryType: "Reattest",
2143
- message: { ...base.message, revokeIndex: a.revokeIndex }
2144
- };
2145
- }
2146
- function updateKeyTypedData(chainId, registry, a) {
2147
- return {
2148
- domain: registryDomain(chainId, registry),
2149
- types: { UpdateKey: AUTHORIZATION_TYPES.UpdateKey },
2150
- primaryType: "UpdateKey",
2151
- message: { owner: a.owner, index: a.index, pgpPublicKey: _viem.stringToHex.call(void 0, a.pgpPublicKey), nonce: a.nonce, deadline: a.deadline }
2152
- };
2153
- }
2154
- function revokeTypedData(chainId, registry, a) {
2155
- return {
2156
- domain: registryDomain(chainId, registry),
2157
- types: { Revoke: AUTHORIZATION_TYPES.Revoke },
2158
- primaryType: "Revoke",
2159
- message: { owner: a.owner, index: a.index, nonce: a.nonce, deadline: a.deadline }
2160
- };
2161
- }
2162
- function setRecordTypedData(chainId, registry, a) {
2163
- return {
2164
- domain: registryDomain(chainId, registry),
2165
- types: { SetRecord: AUTHORIZATION_TYPES.SetRecord },
2166
- primaryType: "SetRecord",
2167
- message: { owner: a.owner, index: a.index, kind: a.kind, value: a.value, nonce: a.nonce, deadline: a.deadline }
2168
- };
2169
- }
2170
- function authorizationDigest(typedData) {
2171
- return _viem.hashTypedData.call(void 0, typedData);
2172
- }
2173
- function recordKind(name) {
2174
- return _viem.keccak256.call(void 0, _viem.stringToHex.call(void 0, name));
2175
- }
2176
-
2177
389
 
2178
390
 
2179
391
 
@@ -2215,5 +427,5 @@ function recordKind(name) {
2215
427
 
2216
428
 
2217
429
 
2218
- 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 = _chunkRC4PCCYVcjs.AUTHORIZATION_TYPES; exports.EIP712_NAME = _chunkRC4PCCYVcjs.EIP712_NAME; exports.EIP712_VERSION = _chunkRC4PCCYVcjs.EIP712_VERSION; exports.IdentityKitProvider = IdentityKitProvider; exports.NETWORKS = _chunkRC4PCCYVcjs.NETWORKS; exports.REGISTRY_ABI = _chunkRC4PCCYVcjs.REGISTRY_ABI; exports.REGISTRY_ADDRESS = _chunkRC4PCCYVcjs.REGISTRY_ADDRESS; exports.ThurinCard = ThurinCard; exports.attestTypedData = _chunkRC4PCCYVcjs.attestTypedData; exports.authorizationDigest = _chunkRC4PCCYVcjs.authorizationDigest; exports.bytesToFingerprint = _chunkRC4PCCYVcjs.bytesToFingerprint; exports.chainFor = _chunkRC4PCCYVcjs.chainFor; exports.displayUrl = _chunkRC4PCCYVcjs.displayUrl; exports.fetchEFPGraph = _chunkRC4PCCYVcjs.fetchEFPGraph; exports.fetchKeyByFingerprint = _chunkRC4PCCYVcjs.fetchKeyByFingerprint; exports.fetchKeyByKeyId = _chunkRC4PCCYVcjs.fetchKeyByKeyId; exports.fingerprintHash = _chunkRC4PCCYVcjs.fingerprintHash; exports.fingerprintToBytes = _chunkRC4PCCYVcjs.fingerprintToBytes; exports.getRegistry = _chunkRC4PCCYVcjs.getRegistry; exports.hasEmailUserID = _chunkRC4PCCYVcjs.hasEmailUserID; exports.identifyProof = _chunkRC4PCCYVcjs.identifyProof; exports.isNetworkName = _chunkRC4PCCYVcjs.isNetworkName; exports.keyIdOf = _chunkRC4PCCYVcjs.keyIdOf; exports.keyIdToBytes = _chunkRC4PCCYVcjs.keyIdToBytes; exports.normalizeFingerprint = _chunkRC4PCCYVcjs.normalizeFingerprint; exports.parsePgpKey = _chunkRC4PCCYVcjs.parsePgpKey; exports.proofHref = _chunkRC4PCCYVcjs.proofHref; exports.proofSecondaryHref = _chunkRC4PCCYVcjs.proofSecondaryHref; exports.reattestTypedData = _chunkRC4PCCYVcjs.reattestTypedData; exports.recordKind = _chunkRC4PCCYVcjs.recordKind; exports.registryDomain = _chunkRC4PCCYVcjs.registryDomain; exports.revokeTypedData = _chunkRC4PCCYVcjs.revokeTypedData; exports.setRecordTypedData = _chunkRC4PCCYVcjs.setRecordTypedData; exports.stripEmailUserIDs = _chunkRC4PCCYVcjs.stripEmailUserIDs; exports.updateKeyTypedData = _chunkRC4PCCYVcjs.updateKeyTypedData; exports.useAttestations = useAttestations; exports.useEFPGraph = useEFPGraph; exports.usePGPProofs = usePGPProofs; exports.useThurinIdentity = useThurinIdentity; exports.verifyAttestation = _chunkRC4PCCYVcjs.verifyAttestation; exports.verifyProof = _chunkRC4PCCYVcjs.verifyProof;
2219
431
  //# sourceMappingURL=index.cjs.map