@thurinlabs/identity-kit 0.8.0 → 1.0.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.d.ts CHANGED
@@ -1,14 +1,973 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as viem from 'viem';
3
+ import { Hex, TypedDataDomain } from 'viem';
2
4
  import { ReactNode } from 'react';
3
5
 
6
+ declare const REGISTRY_ABI: readonly [{
7
+ readonly type: "function";
8
+ readonly name: "ATTEST_TYPEHASH";
9
+ readonly inputs: readonly [];
10
+ readonly outputs: readonly [{
11
+ readonly name: "";
12
+ readonly type: "bytes32";
13
+ readonly internalType: "bytes32";
14
+ }];
15
+ readonly stateMutability: "view";
16
+ }, {
17
+ readonly type: "function";
18
+ readonly name: "DOMAIN_SEPARATOR";
19
+ readonly inputs: readonly [];
20
+ readonly outputs: readonly [{
21
+ readonly name: "";
22
+ readonly type: "bytes32";
23
+ readonly internalType: "bytes32";
24
+ }];
25
+ readonly stateMutability: "view";
26
+ }, {
27
+ readonly type: "function";
28
+ readonly name: "EIP712_NAME";
29
+ readonly inputs: readonly [];
30
+ readonly outputs: readonly [{
31
+ readonly name: "";
32
+ readonly type: "string";
33
+ readonly internalType: "string";
34
+ }];
35
+ readonly stateMutability: "view";
36
+ }, {
37
+ readonly type: "function";
38
+ readonly name: "EIP712_VERSION";
39
+ readonly inputs: readonly [];
40
+ readonly outputs: readonly [{
41
+ readonly name: "";
42
+ readonly type: "string";
43
+ readonly internalType: "string";
44
+ }];
45
+ readonly stateMutability: "view";
46
+ }, {
47
+ readonly type: "function";
48
+ readonly name: "MAX_KEY_BYTES";
49
+ readonly inputs: readonly [];
50
+ readonly outputs: readonly [{
51
+ readonly name: "";
52
+ readonly type: "uint256";
53
+ readonly internalType: "uint256";
54
+ }];
55
+ readonly stateMutability: "view";
56
+ }, {
57
+ readonly type: "function";
58
+ readonly name: "MAX_RECORD_BYTES";
59
+ readonly inputs: readonly [];
60
+ readonly outputs: readonly [{
61
+ readonly name: "";
62
+ readonly type: "uint256";
63
+ readonly internalType: "uint256";
64
+ }];
65
+ readonly stateMutability: "view";
66
+ }, {
67
+ readonly type: "function";
68
+ readonly name: "MAX_SIG_BYTES";
69
+ readonly inputs: readonly [];
70
+ readonly outputs: readonly [{
71
+ readonly name: "";
72
+ readonly type: "uint256";
73
+ readonly internalType: "uint256";
74
+ }];
75
+ readonly stateMutability: "view";
76
+ }, {
77
+ readonly type: "function";
78
+ readonly name: "MESSAGE_VERSION";
79
+ readonly inputs: readonly [];
80
+ readonly outputs: readonly [{
81
+ readonly name: "";
82
+ readonly type: "uint8";
83
+ readonly internalType: "uint8";
84
+ }];
85
+ readonly stateMutability: "view";
86
+ }, {
87
+ readonly type: "function";
88
+ readonly name: "REATTEST_TYPEHASH";
89
+ readonly inputs: readonly [];
90
+ readonly outputs: readonly [{
91
+ readonly name: "";
92
+ readonly type: "bytes32";
93
+ readonly internalType: "bytes32";
94
+ }];
95
+ readonly stateMutability: "view";
96
+ }, {
97
+ readonly type: "function";
98
+ readonly name: "REVOKE_TYPEHASH";
99
+ readonly inputs: readonly [];
100
+ readonly outputs: readonly [{
101
+ readonly name: "";
102
+ readonly type: "bytes32";
103
+ readonly internalType: "bytes32";
104
+ }];
105
+ readonly stateMutability: "view";
106
+ }, {
107
+ readonly type: "function";
108
+ readonly name: "SET_RECORD_TYPEHASH";
109
+ readonly inputs: readonly [];
110
+ readonly outputs: readonly [{
111
+ readonly name: "";
112
+ readonly type: "bytes32";
113
+ readonly internalType: "bytes32";
114
+ }];
115
+ readonly stateMutability: "view";
116
+ }, {
117
+ readonly type: "function";
118
+ readonly name: "UPDATE_KEY_TYPEHASH";
119
+ readonly inputs: readonly [];
120
+ readonly outputs: readonly [{
121
+ readonly name: "";
122
+ readonly type: "bytes32";
123
+ readonly internalType: "bytes32";
124
+ }];
125
+ readonly stateMutability: "view";
126
+ }, {
127
+ readonly type: "function";
128
+ readonly name: "VERSION";
129
+ readonly inputs: readonly [];
130
+ readonly outputs: readonly [{
131
+ readonly name: "";
132
+ readonly type: "uint8";
133
+ readonly internalType: "uint8";
134
+ }];
135
+ readonly stateMutability: "view";
136
+ }, {
137
+ readonly type: "function";
138
+ readonly name: "addressesFor";
139
+ readonly inputs: readonly [{
140
+ readonly name: "fingerprintHash";
141
+ readonly type: "bytes32";
142
+ readonly internalType: "bytes32";
143
+ }];
144
+ readonly outputs: readonly [{
145
+ readonly name: "";
146
+ readonly type: "address[]";
147
+ readonly internalType: "address[]";
148
+ }];
149
+ readonly stateMutability: "view";
150
+ }, {
151
+ readonly type: "function";
152
+ readonly name: "addressesForCount";
153
+ readonly inputs: readonly [{
154
+ readonly name: "fingerprintHash";
155
+ readonly type: "bytes32";
156
+ readonly internalType: "bytes32";
157
+ }];
158
+ readonly outputs: readonly [{
159
+ readonly name: "";
160
+ readonly type: "uint256";
161
+ readonly internalType: "uint256";
162
+ }];
163
+ readonly stateMutability: "view";
164
+ }, {
165
+ readonly type: "function";
166
+ readonly name: "addressesForRange";
167
+ readonly inputs: readonly [{
168
+ readonly name: "fingerprintHash";
169
+ readonly type: "bytes32";
170
+ readonly internalType: "bytes32";
171
+ }, {
172
+ readonly name: "start";
173
+ readonly type: "uint256";
174
+ readonly internalType: "uint256";
175
+ }, {
176
+ readonly name: "count";
177
+ readonly type: "uint256";
178
+ readonly internalType: "uint256";
179
+ }];
180
+ readonly outputs: readonly [{
181
+ readonly name: "out";
182
+ readonly type: "address[]";
183
+ readonly internalType: "address[]";
184
+ }];
185
+ readonly stateMutability: "view";
186
+ }, {
187
+ readonly type: "function";
188
+ readonly name: "attest";
189
+ readonly inputs: readonly [{
190
+ readonly name: "fingerprint";
191
+ readonly type: "bytes";
192
+ readonly internalType: "bytes";
193
+ }, {
194
+ readonly name: "pgpSignature";
195
+ readonly type: "bytes";
196
+ readonly internalType: "bytes";
197
+ }, {
198
+ readonly name: "pgpPublicKey";
199
+ readonly type: "bytes";
200
+ readonly internalType: "bytes";
201
+ }];
202
+ readonly outputs: readonly [{
203
+ readonly name: "index";
204
+ readonly type: "uint256";
205
+ readonly internalType: "uint256";
206
+ }];
207
+ readonly stateMutability: "nonpayable";
208
+ }, {
209
+ readonly type: "function";
210
+ readonly name: "attestFor";
211
+ readonly inputs: readonly [{
212
+ readonly name: "owner";
213
+ readonly type: "address";
214
+ readonly internalType: "address";
215
+ }, {
216
+ readonly name: "fingerprint";
217
+ readonly type: "bytes";
218
+ readonly internalType: "bytes";
219
+ }, {
220
+ readonly name: "pgpSignature";
221
+ readonly type: "bytes";
222
+ readonly internalType: "bytes";
223
+ }, {
224
+ readonly name: "pgpPublicKey";
225
+ readonly type: "bytes";
226
+ readonly internalType: "bytes";
227
+ }, {
228
+ readonly name: "deadline";
229
+ readonly type: "uint256";
230
+ readonly internalType: "uint256";
231
+ }, {
232
+ readonly name: "signature";
233
+ readonly type: "bytes";
234
+ readonly internalType: "bytes";
235
+ }];
236
+ readonly outputs: readonly [{
237
+ readonly name: "index";
238
+ readonly type: "uint256";
239
+ readonly internalType: "uint256";
240
+ }];
241
+ readonly stateMutability: "nonpayable";
242
+ }, {
243
+ readonly type: "function";
244
+ readonly name: "attestationCount";
245
+ readonly inputs: readonly [{
246
+ readonly name: "owner";
247
+ readonly type: "address";
248
+ readonly internalType: "address";
249
+ }];
250
+ readonly outputs: readonly [{
251
+ readonly name: "";
252
+ readonly type: "uint256";
253
+ readonly internalType: "uint256";
254
+ }];
255
+ readonly stateMutability: "view";
256
+ }, {
257
+ readonly type: "function";
258
+ readonly name: "attestationsOf";
259
+ readonly inputs: readonly [{
260
+ readonly name: "owner";
261
+ readonly type: "address";
262
+ readonly internalType: "address";
263
+ }];
264
+ readonly outputs: readonly [{
265
+ readonly name: "";
266
+ readonly type: "tuple[]";
267
+ readonly internalType: "struct PGPRegistry.Attestation[]";
268
+ readonly components: readonly [{
269
+ readonly name: "fingerprint";
270
+ readonly type: "bytes";
271
+ readonly internalType: "bytes";
272
+ }, {
273
+ readonly name: "createdAt";
274
+ readonly type: "uint64";
275
+ readonly internalType: "uint64";
276
+ }, {
277
+ readonly name: "revokedAt";
278
+ readonly type: "uint64";
279
+ readonly internalType: "uint64";
280
+ }, {
281
+ readonly name: "messageVersion";
282
+ readonly type: "uint8";
283
+ readonly internalType: "uint8";
284
+ }, {
285
+ readonly name: "keyPtr";
286
+ readonly type: "address";
287
+ readonly internalType: "address";
288
+ }, {
289
+ readonly name: "sigPtr";
290
+ readonly type: "address";
291
+ readonly internalType: "address";
292
+ }];
293
+ }];
294
+ readonly stateMutability: "view";
295
+ }, {
296
+ readonly type: "function";
297
+ readonly name: "attestationsOfRange";
298
+ readonly inputs: readonly [{
299
+ readonly name: "owner";
300
+ readonly type: "address";
301
+ readonly internalType: "address";
302
+ }, {
303
+ readonly name: "start";
304
+ readonly type: "uint256";
305
+ readonly internalType: "uint256";
306
+ }, {
307
+ readonly name: "count";
308
+ readonly type: "uint256";
309
+ readonly internalType: "uint256";
310
+ }];
311
+ readonly outputs: readonly [{
312
+ readonly name: "out";
313
+ readonly type: "tuple[]";
314
+ readonly internalType: "struct PGPRegistry.Attestation[]";
315
+ readonly components: readonly [{
316
+ readonly name: "fingerprint";
317
+ readonly type: "bytes";
318
+ readonly internalType: "bytes";
319
+ }, {
320
+ readonly name: "createdAt";
321
+ readonly type: "uint64";
322
+ readonly internalType: "uint64";
323
+ }, {
324
+ readonly name: "revokedAt";
325
+ readonly type: "uint64";
326
+ readonly internalType: "uint64";
327
+ }, {
328
+ readonly name: "messageVersion";
329
+ readonly type: "uint8";
330
+ readonly internalType: "uint8";
331
+ }, {
332
+ readonly name: "keyPtr";
333
+ readonly type: "address";
334
+ readonly internalType: "address";
335
+ }, {
336
+ readonly name: "sigPtr";
337
+ readonly type: "address";
338
+ readonly internalType: "address";
339
+ }];
340
+ }];
341
+ readonly stateMutability: "view";
342
+ }, {
343
+ readonly type: "function";
344
+ readonly name: "cancelAuthorization";
345
+ readonly inputs: readonly [];
346
+ readonly outputs: readonly [];
347
+ readonly stateMutability: "nonpayable";
348
+ }, {
349
+ readonly type: "function";
350
+ readonly name: "current";
351
+ readonly inputs: readonly [{
352
+ readonly name: "owner";
353
+ readonly type: "address";
354
+ readonly internalType: "address";
355
+ }];
356
+ readonly outputs: readonly [{
357
+ readonly name: "found";
358
+ readonly type: "bool";
359
+ readonly internalType: "bool";
360
+ }, {
361
+ readonly name: "index";
362
+ readonly type: "uint256";
363
+ readonly internalType: "uint256";
364
+ }, {
365
+ readonly name: "attestation";
366
+ readonly type: "tuple";
367
+ readonly internalType: "struct PGPRegistry.Attestation";
368
+ readonly components: readonly [{
369
+ readonly name: "fingerprint";
370
+ readonly type: "bytes";
371
+ readonly internalType: "bytes";
372
+ }, {
373
+ readonly name: "createdAt";
374
+ readonly type: "uint64";
375
+ readonly internalType: "uint64";
376
+ }, {
377
+ readonly name: "revokedAt";
378
+ readonly type: "uint64";
379
+ readonly internalType: "uint64";
380
+ }, {
381
+ readonly name: "messageVersion";
382
+ readonly type: "uint8";
383
+ readonly internalType: "uint8";
384
+ }, {
385
+ readonly name: "keyPtr";
386
+ readonly type: "address";
387
+ readonly internalType: "address";
388
+ }, {
389
+ readonly name: "sigPtr";
390
+ readonly type: "address";
391
+ readonly internalType: "address";
392
+ }];
393
+ }];
394
+ readonly stateMutability: "view";
395
+ }, {
396
+ readonly type: "function";
397
+ readonly name: "fingerprintsForKeyId";
398
+ readonly inputs: readonly [{
399
+ readonly name: "keyId";
400
+ readonly type: "bytes8";
401
+ readonly internalType: "bytes8";
402
+ }];
403
+ readonly outputs: readonly [{
404
+ readonly name: "";
405
+ readonly type: "bytes[]";
406
+ readonly internalType: "bytes[]";
407
+ }];
408
+ readonly stateMutability: "view";
409
+ }, {
410
+ readonly type: "function";
411
+ readonly name: "fingerprintsForKeyIdCount";
412
+ readonly inputs: readonly [{
413
+ readonly name: "keyId";
414
+ readonly type: "bytes8";
415
+ readonly internalType: "bytes8";
416
+ }];
417
+ readonly outputs: readonly [{
418
+ readonly name: "";
419
+ readonly type: "uint256";
420
+ readonly internalType: "uint256";
421
+ }];
422
+ readonly stateMutability: "view";
423
+ }, {
424
+ readonly type: "function";
425
+ readonly name: "fingerprintsForKeyIdRange";
426
+ readonly inputs: readonly [{
427
+ readonly name: "keyId";
428
+ readonly type: "bytes8";
429
+ readonly internalType: "bytes8";
430
+ }, {
431
+ readonly name: "start";
432
+ readonly type: "uint256";
433
+ readonly internalType: "uint256";
434
+ }, {
435
+ readonly name: "count";
436
+ readonly type: "uint256";
437
+ readonly internalType: "uint256";
438
+ }];
439
+ readonly outputs: readonly [{
440
+ readonly name: "out";
441
+ readonly type: "bytes[]";
442
+ readonly internalType: "bytes[]";
443
+ }];
444
+ readonly stateMutability: "view";
445
+ }, {
446
+ readonly type: "function";
447
+ readonly name: "getAttestation";
448
+ readonly inputs: readonly [{
449
+ readonly name: "owner";
450
+ readonly type: "address";
451
+ readonly internalType: "address";
452
+ }, {
453
+ readonly name: "index";
454
+ readonly type: "uint256";
455
+ readonly internalType: "uint256";
456
+ }];
457
+ readonly outputs: readonly [{
458
+ readonly name: "";
459
+ readonly type: "tuple";
460
+ readonly internalType: "struct PGPRegistry.Attestation";
461
+ readonly components: readonly [{
462
+ readonly name: "fingerprint";
463
+ readonly type: "bytes";
464
+ readonly internalType: "bytes";
465
+ }, {
466
+ readonly name: "createdAt";
467
+ readonly type: "uint64";
468
+ readonly internalType: "uint64";
469
+ }, {
470
+ readonly name: "revokedAt";
471
+ readonly type: "uint64";
472
+ readonly internalType: "uint64";
473
+ }, {
474
+ readonly name: "messageVersion";
475
+ readonly type: "uint8";
476
+ readonly internalType: "uint8";
477
+ }, {
478
+ readonly name: "keyPtr";
479
+ readonly type: "address";
480
+ readonly internalType: "address";
481
+ }, {
482
+ readonly name: "sigPtr";
483
+ readonly type: "address";
484
+ readonly internalType: "address";
485
+ }];
486
+ }];
487
+ readonly stateMutability: "view";
488
+ }, {
489
+ readonly type: "function";
490
+ readonly name: "getPayload";
491
+ readonly inputs: readonly [{
492
+ readonly name: "owner";
493
+ readonly type: "address";
494
+ readonly internalType: "address";
495
+ }, {
496
+ readonly name: "index";
497
+ readonly type: "uint256";
498
+ readonly internalType: "uint256";
499
+ }];
500
+ readonly outputs: readonly [{
501
+ readonly name: "pgpSignature";
502
+ readonly type: "bytes";
503
+ readonly internalType: "bytes";
504
+ }, {
505
+ readonly name: "pgpPublicKey";
506
+ readonly type: "bytes";
507
+ readonly internalType: "bytes";
508
+ }];
509
+ readonly stateMutability: "view";
510
+ }, {
511
+ readonly type: "function";
512
+ readonly name: "nonces";
513
+ readonly inputs: readonly [{
514
+ readonly name: "";
515
+ readonly type: "address";
516
+ readonly internalType: "address";
517
+ }];
518
+ readonly outputs: readonly [{
519
+ readonly name: "";
520
+ readonly type: "uint256";
521
+ readonly internalType: "uint256";
522
+ }];
523
+ readonly stateMutability: "view";
524
+ }, {
525
+ readonly type: "function";
526
+ readonly name: "reattest";
527
+ readonly inputs: readonly [{
528
+ readonly name: "revokeIndex";
529
+ readonly type: "uint256";
530
+ readonly internalType: "uint256";
531
+ }, {
532
+ readonly name: "fingerprint";
533
+ readonly type: "bytes";
534
+ readonly internalType: "bytes";
535
+ }, {
536
+ readonly name: "pgpSignature";
537
+ readonly type: "bytes";
538
+ readonly internalType: "bytes";
539
+ }, {
540
+ readonly name: "pgpPublicKey";
541
+ readonly type: "bytes";
542
+ readonly internalType: "bytes";
543
+ }];
544
+ readonly outputs: readonly [{
545
+ readonly name: "index";
546
+ readonly type: "uint256";
547
+ readonly internalType: "uint256";
548
+ }];
549
+ readonly stateMutability: "nonpayable";
550
+ }, {
551
+ readonly type: "function";
552
+ readonly name: "reattestFor";
553
+ readonly inputs: readonly [{
554
+ readonly name: "owner";
555
+ readonly type: "address";
556
+ readonly internalType: "address";
557
+ }, {
558
+ readonly name: "revokeIndex";
559
+ readonly type: "uint256";
560
+ readonly internalType: "uint256";
561
+ }, {
562
+ readonly name: "fingerprint";
563
+ readonly type: "bytes";
564
+ readonly internalType: "bytes";
565
+ }, {
566
+ readonly name: "pgpSignature";
567
+ readonly type: "bytes";
568
+ readonly internalType: "bytes";
569
+ }, {
570
+ readonly name: "pgpPublicKey";
571
+ readonly type: "bytes";
572
+ readonly internalType: "bytes";
573
+ }, {
574
+ readonly name: "deadline";
575
+ readonly type: "uint256";
576
+ readonly internalType: "uint256";
577
+ }, {
578
+ readonly name: "signature";
579
+ readonly type: "bytes";
580
+ readonly internalType: "bytes";
581
+ }];
582
+ readonly outputs: readonly [{
583
+ readonly name: "index";
584
+ readonly type: "uint256";
585
+ readonly internalType: "uint256";
586
+ }];
587
+ readonly stateMutability: "nonpayable";
588
+ }, {
589
+ readonly type: "function";
590
+ readonly name: "record";
591
+ readonly inputs: readonly [{
592
+ readonly name: "owner";
593
+ readonly type: "address";
594
+ readonly internalType: "address";
595
+ }, {
596
+ readonly name: "index";
597
+ readonly type: "uint256";
598
+ readonly internalType: "uint256";
599
+ }, {
600
+ readonly name: "kind";
601
+ readonly type: "bytes32";
602
+ readonly internalType: "bytes32";
603
+ }];
604
+ readonly outputs: readonly [{
605
+ readonly name: "";
606
+ readonly type: "bytes";
607
+ readonly internalType: "bytes";
608
+ }];
609
+ readonly stateMutability: "view";
610
+ }, {
611
+ readonly type: "function";
612
+ readonly name: "revoke";
613
+ readonly inputs: readonly [{
614
+ readonly name: "index";
615
+ readonly type: "uint256";
616
+ readonly internalType: "uint256";
617
+ }];
618
+ readonly outputs: readonly [];
619
+ readonly stateMutability: "nonpayable";
620
+ }, {
621
+ readonly type: "function";
622
+ readonly name: "revokeFor";
623
+ readonly inputs: readonly [{
624
+ readonly name: "owner";
625
+ readonly type: "address";
626
+ readonly internalType: "address";
627
+ }, {
628
+ readonly name: "index";
629
+ readonly type: "uint256";
630
+ readonly internalType: "uint256";
631
+ }, {
632
+ readonly name: "deadline";
633
+ readonly type: "uint256";
634
+ readonly internalType: "uint256";
635
+ }, {
636
+ readonly name: "signature";
637
+ readonly type: "bytes";
638
+ readonly internalType: "bytes";
639
+ }];
640
+ readonly outputs: readonly [];
641
+ readonly stateMutability: "nonpayable";
642
+ }, {
643
+ readonly type: "function";
644
+ readonly name: "setRecord";
645
+ readonly inputs: readonly [{
646
+ readonly name: "index";
647
+ readonly type: "uint256";
648
+ readonly internalType: "uint256";
649
+ }, {
650
+ readonly name: "kind";
651
+ readonly type: "bytes32";
652
+ readonly internalType: "bytes32";
653
+ }, {
654
+ readonly name: "value";
655
+ readonly type: "bytes";
656
+ readonly internalType: "bytes";
657
+ }];
658
+ readonly outputs: readonly [];
659
+ readonly stateMutability: "nonpayable";
660
+ }, {
661
+ readonly type: "function";
662
+ readonly name: "setRecordFor";
663
+ readonly inputs: readonly [{
664
+ readonly name: "owner";
665
+ readonly type: "address";
666
+ readonly internalType: "address";
667
+ }, {
668
+ readonly name: "index";
669
+ readonly type: "uint256";
670
+ readonly internalType: "uint256";
671
+ }, {
672
+ readonly name: "kind";
673
+ readonly type: "bytes32";
674
+ readonly internalType: "bytes32";
675
+ }, {
676
+ readonly name: "value";
677
+ readonly type: "bytes";
678
+ readonly internalType: "bytes";
679
+ }, {
680
+ readonly name: "deadline";
681
+ readonly type: "uint256";
682
+ readonly internalType: "uint256";
683
+ }, {
684
+ readonly name: "signature";
685
+ readonly type: "bytes";
686
+ readonly internalType: "bytes";
687
+ }];
688
+ readonly outputs: readonly [];
689
+ readonly stateMutability: "nonpayable";
690
+ }, {
691
+ readonly type: "function";
692
+ readonly name: "updateKey";
693
+ readonly inputs: readonly [{
694
+ readonly name: "index";
695
+ readonly type: "uint256";
696
+ readonly internalType: "uint256";
697
+ }, {
698
+ readonly name: "pgpPublicKey";
699
+ readonly type: "bytes";
700
+ readonly internalType: "bytes";
701
+ }];
702
+ readonly outputs: readonly [];
703
+ readonly stateMutability: "nonpayable";
704
+ }, {
705
+ readonly type: "function";
706
+ readonly name: "updateKeyFor";
707
+ readonly inputs: readonly [{
708
+ readonly name: "owner";
709
+ readonly type: "address";
710
+ readonly internalType: "address";
711
+ }, {
712
+ readonly name: "index";
713
+ readonly type: "uint256";
714
+ readonly internalType: "uint256";
715
+ }, {
716
+ readonly name: "pgpPublicKey";
717
+ readonly type: "bytes";
718
+ readonly internalType: "bytes";
719
+ }, {
720
+ readonly name: "deadline";
721
+ readonly type: "uint256";
722
+ readonly internalType: "uint256";
723
+ }, {
724
+ readonly name: "signature";
725
+ readonly type: "bytes";
726
+ readonly internalType: "bytes";
727
+ }];
728
+ readonly outputs: readonly [];
729
+ readonly stateMutability: "nonpayable";
730
+ }, {
731
+ readonly type: "event";
732
+ readonly name: "Attested";
733
+ readonly inputs: readonly [{
734
+ readonly name: "owner";
735
+ readonly type: "address";
736
+ readonly indexed: true;
737
+ readonly internalType: "address";
738
+ }, {
739
+ readonly name: "fingerprintHash";
740
+ readonly type: "bytes32";
741
+ readonly indexed: true;
742
+ readonly internalType: "bytes32";
743
+ }, {
744
+ readonly name: "index";
745
+ readonly type: "uint256";
746
+ readonly indexed: true;
747
+ readonly internalType: "uint256";
748
+ }, {
749
+ readonly name: "fingerprint";
750
+ readonly type: "bytes";
751
+ readonly indexed: false;
752
+ readonly internalType: "bytes";
753
+ }, {
754
+ readonly name: "messageVersion";
755
+ readonly type: "uint8";
756
+ readonly indexed: false;
757
+ readonly internalType: "uint8";
758
+ }, {
759
+ readonly name: "keyPtr";
760
+ readonly type: "address";
761
+ readonly indexed: false;
762
+ readonly internalType: "address";
763
+ }, {
764
+ readonly name: "sigPtr";
765
+ readonly type: "address";
766
+ readonly indexed: false;
767
+ readonly internalType: "address";
768
+ }, {
769
+ readonly name: "submitter";
770
+ readonly type: "address";
771
+ readonly indexed: false;
772
+ readonly internalType: "address";
773
+ }];
774
+ readonly anonymous: false;
775
+ }, {
776
+ readonly type: "event";
777
+ readonly name: "KeyUpdated";
778
+ readonly inputs: readonly [{
779
+ readonly name: "owner";
780
+ readonly type: "address";
781
+ readonly indexed: true;
782
+ readonly internalType: "address";
783
+ }, {
784
+ readonly name: "fingerprintHash";
785
+ readonly type: "bytes32";
786
+ readonly indexed: true;
787
+ readonly internalType: "bytes32";
788
+ }, {
789
+ readonly name: "index";
790
+ readonly type: "uint256";
791
+ readonly indexed: true;
792
+ readonly internalType: "uint256";
793
+ }, {
794
+ readonly name: "oldKeyPtr";
795
+ readonly type: "address";
796
+ readonly indexed: false;
797
+ readonly internalType: "address";
798
+ }, {
799
+ readonly name: "newKeyPtr";
800
+ readonly type: "address";
801
+ readonly indexed: false;
802
+ readonly internalType: "address";
803
+ }, {
804
+ readonly name: "submitter";
805
+ readonly type: "address";
806
+ readonly indexed: false;
807
+ readonly internalType: "address";
808
+ }];
809
+ readonly anonymous: false;
810
+ }, {
811
+ readonly type: "event";
812
+ readonly name: "NonceUsed";
813
+ readonly inputs: readonly [{
814
+ readonly name: "owner";
815
+ readonly type: "address";
816
+ readonly indexed: true;
817
+ readonly internalType: "address";
818
+ }, {
819
+ readonly name: "nonce";
820
+ readonly type: "uint256";
821
+ readonly indexed: false;
822
+ readonly internalType: "uint256";
823
+ }];
824
+ readonly anonymous: false;
825
+ }, {
826
+ readonly type: "event";
827
+ readonly name: "RecordSet";
828
+ readonly inputs: readonly [{
829
+ readonly name: "owner";
830
+ readonly type: "address";
831
+ readonly indexed: true;
832
+ readonly internalType: "address";
833
+ }, {
834
+ readonly name: "index";
835
+ readonly type: "uint256";
836
+ readonly indexed: true;
837
+ readonly internalType: "uint256";
838
+ }, {
839
+ readonly name: "kind";
840
+ readonly type: "bytes32";
841
+ readonly indexed: true;
842
+ readonly internalType: "bytes32";
843
+ }, {
844
+ readonly name: "submitter";
845
+ readonly type: "address";
846
+ readonly indexed: false;
847
+ readonly internalType: "address";
848
+ }];
849
+ readonly anonymous: false;
850
+ }, {
851
+ readonly type: "event";
852
+ readonly name: "Revoked";
853
+ readonly inputs: readonly [{
854
+ readonly name: "owner";
855
+ readonly type: "address";
856
+ readonly indexed: true;
857
+ readonly internalType: "address";
858
+ }, {
859
+ readonly name: "fingerprintHash";
860
+ readonly type: "bytes32";
861
+ readonly indexed: true;
862
+ readonly internalType: "bytes32";
863
+ }, {
864
+ readonly name: "index";
865
+ readonly type: "uint256";
866
+ readonly indexed: true;
867
+ readonly internalType: "uint256";
868
+ }, {
869
+ readonly name: "submitter";
870
+ readonly type: "address";
871
+ readonly indexed: false;
872
+ readonly internalType: "address";
873
+ }];
874
+ readonly anonymous: false;
875
+ }, {
876
+ readonly type: "error";
877
+ readonly name: "AlreadyRevoked";
878
+ readonly inputs: readonly [];
879
+ }, {
880
+ readonly type: "error";
881
+ readonly name: "AuthorizationExpired";
882
+ readonly inputs: readonly [];
883
+ }, {
884
+ readonly type: "error";
885
+ readonly name: "DeploymentFailed";
886
+ readonly inputs: readonly [];
887
+ }, {
888
+ readonly type: "error";
889
+ readonly name: "DuplicateActiveFingerprint";
890
+ readonly inputs: readonly [];
891
+ }, {
892
+ readonly type: "error";
893
+ readonly name: "EmptyPublicKey";
894
+ readonly inputs: readonly [];
895
+ }, {
896
+ readonly type: "error";
897
+ readonly name: "EmptySignature";
898
+ readonly inputs: readonly [];
899
+ }, {
900
+ readonly type: "error";
901
+ readonly name: "IndexOutOfBounds";
902
+ readonly inputs: readonly [];
903
+ }, {
904
+ readonly type: "error";
905
+ readonly name: "InvalidAuthorization";
906
+ readonly inputs: readonly [];
907
+ }, {
908
+ readonly type: "error";
909
+ readonly name: "InvalidFingerprintLength";
910
+ readonly inputs: readonly [];
911
+ }, {
912
+ readonly type: "error";
913
+ readonly name: "InvalidPointer";
914
+ readonly inputs: readonly [];
915
+ }, {
916
+ readonly type: "error";
917
+ readonly name: "PublicKeyTooLarge";
918
+ readonly inputs: readonly [];
919
+ }, {
920
+ readonly type: "error";
921
+ readonly name: "RecordTooLarge";
922
+ readonly inputs: readonly [];
923
+ }, {
924
+ readonly type: "error";
925
+ readonly name: "SignatureTooLarge";
926
+ readonly inputs: readonly [];
927
+ }];
928
+
929
+ /**
930
+ * PGPRegistry v2 is deployed with CREATE2, so it has the same address on every
931
+ * network. (v1 lived at 0xf7a45BC662A78a6fb417ED5f52b3766cbf13EbBb on mainnet and
932
+ * is no longer read by Thurin.)
933
+ */
934
+ declare const REGISTRY_ADDRESS: "0x9302E02e2869e129aC8516fE5eFFd51EA3082c09";
935
+ /** Networks the PGPRegistry is deployed on. `mainnet` is the default everywhere. */
936
+ type NetworkName = 'mainnet' | 'sepolia' | 'local';
937
+ interface RegistryDeployment {
938
+ chainId: number;
939
+ address: `0x${string}`;
940
+ /** Block the registry was deployed in (informational; v2 needs no log scans). */
941
+ deployBlock: bigint;
942
+ /** Block explorer base URL for address/tx links. Empty when there is none. */
943
+ explorerUrl: string;
944
+ /** Keyless public RPC used when no rpcUrl is configured. */
945
+ defaultRpcUrl: string;
946
+ }
947
+ declare const NETWORKS: Record<NetworkName, RegistryDeployment>;
948
+ declare function isNetworkName(value: unknown): value is NetworkName;
949
+ /**
950
+ * The registry deployment for a network. `addressOverride` swaps the contract
951
+ * address (e.g. a local deploy that landed somewhere else).
952
+ */
953
+ declare function getRegistry(network?: NetworkName, addressOverride?: string): RegistryDeployment;
954
+
4
955
  interface Attestation {
956
+ /** Position in the owner's attestation history. */
5
957
  index: number;
958
+ /** Lowercase hex fingerprint, no 0x (40 chars for v4 keys, 64 for v6). */
6
959
  fingerprint: string;
960
+ /** Unix seconds. */
7
961
  createdAt: number;
8
962
  revoked: boolean;
963
+ /** Unix seconds, or null while active. */
964
+ revokedAt: number | null;
965
+ /** Format of the clearsigned message (1 = "I control the Ethereum address: <address>"). */
966
+ messageVersion: number;
967
+ /** The clearsigned message stored on-chain (null only if the payload read failed). */
9
968
  pgpSignature: string | null;
969
+ /** The armored public key stored on-chain (null only if the payload read failed). */
10
970
  pgpPublicKey: string | null;
11
- txHash: string | null;
12
971
  verification: PGPVerification | null;
13
972
  }
14
973
  interface PGPVerification {
@@ -79,12 +1038,166 @@ interface IdentityKitConfig {
79
1038
  rpcUrl?: string;
80
1039
  neynarApiKey?: string;
81
1040
  baseUrl?: string;
1041
+ /** Which PGPRegistry deployment to read: 'mainnet' (default) or 'sepolia'. */
1042
+ network?: 'mainnet' | 'sepolia' | 'local';
1043
+ /** Override the registry address (e.g. a local deploy that landed elsewhere). */
1044
+ registryAddress?: string;
82
1045
  }
83
1046
 
1047
+ declare function chainFor(network?: NetworkName): {
1048
+ blockExplorers: {
1049
+ readonly default: {
1050
+ readonly name: "Etherscan";
1051
+ readonly url: "https://sepolia.etherscan.io";
1052
+ readonly apiUrl: "https://api-sepolia.etherscan.io/api";
1053
+ };
1054
+ };
1055
+ blockTime?: number | undefined | undefined;
1056
+ contracts: {
1057
+ readonly multicall3: {
1058
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
1059
+ readonly blockCreated: 751532;
1060
+ };
1061
+ readonly ensUniversalResolver: {
1062
+ readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
1063
+ readonly blockCreated: 8928790;
1064
+ };
1065
+ };
1066
+ ensTlds?: readonly string[] | undefined;
1067
+ id: 11155111;
1068
+ name: "Sepolia";
1069
+ nativeCurrency: {
1070
+ readonly name: "Sepolia Ether";
1071
+ readonly symbol: "ETH";
1072
+ readonly decimals: 18;
1073
+ };
1074
+ experimental_preconfirmationTime?: number | undefined | undefined;
1075
+ rpcUrls: {
1076
+ readonly default: {
1077
+ readonly http: readonly ["https://11155111.rpc.thirdweb.com"];
1078
+ };
1079
+ };
1080
+ sourceId?: number | undefined | undefined;
1081
+ testnet: true;
1082
+ custom?: Record<string, unknown> | undefined;
1083
+ extendSchema?: Record<string, unknown> | undefined;
1084
+ fees?: viem.ChainFees<undefined> | undefined;
1085
+ formatters?: undefined;
1086
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
1087
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1088
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
1089
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1090
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
1091
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
1092
+ }] | undefined;
1093
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
1094
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
1095
+ } | {
1096
+ blockExplorers?: {
1097
+ [key: string]: {
1098
+ name: string;
1099
+ url: string;
1100
+ apiUrl?: string | undefined;
1101
+ };
1102
+ default: {
1103
+ name: string;
1104
+ url: string;
1105
+ apiUrl?: string | undefined;
1106
+ };
1107
+ } | undefined | undefined;
1108
+ blockTime?: number | undefined | undefined;
1109
+ contracts?: {
1110
+ [x: string]: viem.ChainContract | {
1111
+ [sourceId: number]: viem.ChainContract | undefined;
1112
+ } | undefined;
1113
+ ensRegistry?: viem.ChainContract | undefined;
1114
+ ensUniversalResolver?: viem.ChainContract | undefined;
1115
+ multicall3?: viem.ChainContract | undefined;
1116
+ erc6492Verifier?: viem.ChainContract | undefined;
1117
+ } | undefined;
1118
+ ensTlds?: readonly string[] | undefined;
1119
+ id: 31337;
1120
+ name: "Foundry";
1121
+ nativeCurrency: {
1122
+ readonly decimals: 18;
1123
+ readonly name: "Ether";
1124
+ readonly symbol: "ETH";
1125
+ };
1126
+ experimental_preconfirmationTime?: number | undefined | undefined;
1127
+ rpcUrls: {
1128
+ readonly default: {
1129
+ readonly http: readonly ["http://127.0.0.1:8545"];
1130
+ readonly webSocket: readonly ["ws://127.0.0.1:8545"];
1131
+ };
1132
+ };
1133
+ sourceId?: number | undefined | undefined;
1134
+ testnet?: boolean | undefined | undefined;
1135
+ custom?: Record<string, unknown> | undefined;
1136
+ extendSchema?: Record<string, unknown> | undefined;
1137
+ fees?: viem.ChainFees<undefined> | undefined;
1138
+ formatters?: undefined;
1139
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
1140
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1141
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
1142
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1143
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
1144
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
1145
+ }] | undefined;
1146
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
1147
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
1148
+ } | {
1149
+ blockExplorers: {
1150
+ readonly default: {
1151
+ readonly name: "Etherscan";
1152
+ readonly url: "https://etherscan.io";
1153
+ readonly apiUrl: "https://api.etherscan.io/api";
1154
+ };
1155
+ };
1156
+ blockTime: 12000;
1157
+ contracts: {
1158
+ readonly ensUniversalResolver: {
1159
+ readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
1160
+ readonly blockCreated: 23085558;
1161
+ };
1162
+ readonly multicall3: {
1163
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
1164
+ readonly blockCreated: 14353601;
1165
+ };
1166
+ };
1167
+ ensTlds?: readonly string[] | undefined;
1168
+ id: 1;
1169
+ name: "Ethereum";
1170
+ nativeCurrency: {
1171
+ readonly name: "Ether";
1172
+ readonly symbol: "ETH";
1173
+ readonly decimals: 18;
1174
+ };
1175
+ experimental_preconfirmationTime?: number | undefined | undefined;
1176
+ rpcUrls: {
1177
+ readonly default: {
1178
+ readonly http: readonly ["https://eth.merkle.io"];
1179
+ };
1180
+ };
1181
+ sourceId?: number | undefined | undefined;
1182
+ testnet?: boolean | undefined | undefined;
1183
+ custom?: Record<string, unknown> | undefined;
1184
+ extendSchema?: Record<string, unknown> | undefined;
1185
+ fees?: viem.ChainFees<undefined> | undefined;
1186
+ formatters?: undefined;
1187
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
1188
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1189
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
1190
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1191
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
1192
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
1193
+ }] | undefined;
1194
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
1195
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
1196
+ };
84
1197
  interface IdentityKitProviderProps extends IdentityKitConfig {
85
1198
  children: ReactNode;
86
1199
  }
87
- declare function IdentityKitProvider({ children, rpcUrl, neynarApiKey, baseUrl, }: IdentityKitProviderProps): react_jsx_runtime.JSX.Element;
1200
+ declare function IdentityKitProvider({ children, rpcUrl, neynarApiKey, baseUrl, network, registryAddress, }: IdentityKitProviderProps): react_jsx_runtime.JSX.Element;
88
1201
 
89
1202
  interface ThurinCardProps {
90
1203
  ens?: string;
@@ -95,6 +1208,11 @@ declare function ThurinCard({ ens, address, theme }: ThurinCardProps): react_jsx
95
1208
 
96
1209
  declare function useThurinIdentity(ensOrAddress: string | undefined | null): ThurinIdentity;
97
1210
 
1211
+ /**
1212
+ * On-chain attestations for an address, read straight from the v2 registry:
1213
+ * `attestationsOf` for the history, `getPayload` for each stored signature + key.
1214
+ * No event logs, so any RPC works. Each claim is verified off-chain.
1215
+ */
98
1216
  declare function useAttestations(address: string | undefined | null): {
99
1217
  claims: Attestation[];
100
1218
  totalClaims: number;
@@ -108,7 +1226,16 @@ declare function useEFPGraph(address: string | undefined | null): {
108
1226
  isLoading: boolean;
109
1227
  };
110
1228
 
111
- declare function usePGPProofs(fingerprint: string | undefined | null): {
1229
+ /**
1230
+ * Proofs for an identity, read from the PGP key stored in its on-chain
1231
+ * attestation. No keyserver is consulted: keys.openpgp.org only serves user
1232
+ * IDs whose email is verified and drops non-email user IDs entirely, so it can
1233
+ * never carry the published (non-email) identity that holds the notations.
1234
+ *
1235
+ * @param fingerprint the attested fingerprint (proofs must name it)
1236
+ * @param armoredKey the attestation's `pgpPublicKey`
1237
+ */
1238
+ declare function usePGPProofs(fingerprint: string | undefined | null, armoredKey: string | undefined | null): {
112
1239
  keyInfo: PGPKeyInfo | null;
113
1240
  proofs: ProofResult[];
114
1241
  isLoading: boolean;
@@ -127,78 +1254,341 @@ declare function verifyAttestation({ pgpPublicKey, pgpSignature, fingerprint, et
127
1254
  fingerprint: string;
128
1255
  ethAddress: string;
129
1256
  }): Promise<PGPVerification>;
1257
+ interface StrippedKey {
1258
+ /** Armored public key containing only the non-email user IDs. */
1259
+ armored: string;
1260
+ /** User IDs kept (no `@`). */
1261
+ kept: string[];
1262
+ /** User IDs removed (contained an `@`). */
1263
+ removed: string[];
1264
+ }
1265
+ /**
1266
+ * Remove every user ID that contains an email address, keeping the rest (and
1267
+ * their self-certifications, so proof notations on a non-email user ID survive).
1268
+ * Returns null when nothing would remain — openpgp needs at least one
1269
+ * self-certified user ID to verify signatures, so such a key must not be
1270
+ * published. The key material and subkeys are untouched; the fingerprint is
1271
+ * unchanged.
1272
+ */
1273
+ declare function stripEmailUserIDs(armoredKey: string): Promise<StrippedKey | null>;
1274
+ /** True when any user ID on the key contains an email address. */
1275
+ declare function hasEmailUserID(armoredKey: string): Promise<boolean>;
130
1276
  declare function fetchKeyByFingerprint(fingerprint: string): Promise<string | null>;
131
1277
  declare function fetchKeyByKeyId(keyId: string): Promise<string | null>;
132
1278
 
133
1279
  declare function fetchEFPGraph(address: string): Promise<EFPGraph | null>;
134
1280
 
135
- declare const REGISTRY_ADDRESS: "0xf7a45BC662A78a6fb417ED5f52b3766cbf13EbBb";
136
- declare const CONTRACT_DEPLOY_BLOCK = 24515891n;
137
- declare const REGISTRY_ABI: readonly [{
138
- readonly name: "Attested";
139
- readonly type: "event";
140
- readonly inputs: readonly [{
141
- readonly name: "ethAddress";
1281
+ /** Normalize a fingerprint to lowercase hex with no prefix or spaces. Returns null if malformed. */
1282
+ declare function normalizeFingerprint(input: string): string | null;
1283
+ /** Fingerprint → the raw `bytes` argument the v2 registry takes (0x-prefixed, 20 or 32 bytes). */
1284
+ declare function fingerprintToBytes(fingerprint: string): Hex;
1285
+ /** Raw `bytes` from the registry → lowercase hex fingerprint without 0x. */
1286
+ declare function bytesToFingerprint(bytes: Hex | string): string;
1287
+ /** keccak256 of the raw fingerprint bytes — the `fingerprintHash` the registry indexes by. */
1288
+ declare function fingerprintHash(fingerprint: string): Hex;
1289
+ /**
1290
+ * The long key ID as the `bytes8` the registry indexes by. Per RFC 9580 §5.5.4 it is the
1291
+ * low-order 8 bytes of a v4 (20-byte) fingerprint and the high-order 8 bytes of a v6
1292
+ * (32-byte) fingerprint — the same value `gpg --keyid-format long` prints.
1293
+ */
1294
+ declare function keyIdOf(fingerprint: string): Hex;
1295
+ /** A 16-hex long key ID (spaces/0x tolerated) → `bytes8`. */
1296
+ declare function keyIdToBytes(keyId: string): Hex | null;
1297
+
1298
+ /**
1299
+ * EIP-712 authorizations for the registry's relayed writes (`attestFor`, `reattestFor`,
1300
+ * `updateKeyFor`, `revokeFor`, `setRecordFor`). The owner signs one of these typed
1301
+ * structs; anyone can then submit the matching call and pay the gas. Every field is
1302
+ * bound, plus the owner's current `nonce` (read with `nonces(owner)`) and a `deadline`.
1303
+ *
1304
+ * The domain includes the chain id, so an authorization for one network cannot be
1305
+ * replayed on another even though the registry has the same address everywhere.
1306
+ */
1307
+ declare const EIP712_NAME = "Thurin PGPRegistry";
1308
+ declare const EIP712_VERSION = "2";
1309
+ declare function registryDomain(chainId: number, verifyingContract: Hex): TypedDataDomain;
1310
+ declare const AUTHORIZATION_TYPES: {
1311
+ readonly Attest: readonly [{
1312
+ readonly name: "owner";
142
1313
  readonly type: "address";
143
- readonly indexed: true;
144
- }, {
145
- readonly name: "fingerprintHash";
146
- readonly type: "string";
147
- readonly indexed: true;
148
1314
  }, {
149
1315
  readonly name: "fingerprint";
150
- readonly type: "string";
151
- readonly indexed: false;
1316
+ readonly type: "bytes";
152
1317
  }, {
153
1318
  readonly name: "pgpSignature";
154
- readonly type: "string";
155
- readonly indexed: false;
1319
+ readonly type: "bytes";
156
1320
  }, {
157
1321
  readonly name: "pgpPublicKey";
158
- readonly type: "string";
159
- readonly indexed: false;
1322
+ readonly type: "bytes";
160
1323
  }, {
161
- readonly name: "index";
1324
+ readonly name: "nonce";
162
1325
  readonly type: "uint256";
163
- readonly indexed: false;
164
1326
  }, {
165
- readonly name: "timestamp";
1327
+ readonly name: "deadline";
166
1328
  readonly type: "uint256";
167
- readonly indexed: false;
168
1329
  }];
169
- }, {
170
- readonly name: "attestationCount";
171
- readonly type: "function";
172
- readonly stateMutability: "view";
173
- readonly inputs: readonly [{
174
- readonly name: "addr";
1330
+ readonly Reattest: readonly [{
1331
+ readonly name: "owner";
175
1332
  readonly type: "address";
1333
+ }, {
1334
+ readonly name: "revokeIndex";
1335
+ readonly type: "uint256";
1336
+ }, {
1337
+ readonly name: "fingerprint";
1338
+ readonly type: "bytes";
1339
+ }, {
1340
+ readonly name: "pgpSignature";
1341
+ readonly type: "bytes";
1342
+ }, {
1343
+ readonly name: "pgpPublicKey";
1344
+ readonly type: "bytes";
1345
+ }, {
1346
+ readonly name: "nonce";
1347
+ readonly type: "uint256";
1348
+ }, {
1349
+ readonly name: "deadline";
1350
+ readonly type: "uint256";
176
1351
  }];
177
- readonly outputs: readonly [{
178
- readonly name: "";
1352
+ readonly UpdateKey: readonly [{
1353
+ readonly name: "owner";
1354
+ readonly type: "address";
1355
+ }, {
1356
+ readonly name: "index";
1357
+ readonly type: "uint256";
1358
+ }, {
1359
+ readonly name: "pgpPublicKey";
1360
+ readonly type: "bytes";
1361
+ }, {
1362
+ readonly name: "nonce";
1363
+ readonly type: "uint256";
1364
+ }, {
1365
+ readonly name: "deadline";
179
1366
  readonly type: "uint256";
180
1367
  }];
181
- }, {
182
- readonly name: "getAttestation";
183
- readonly type: "function";
184
- readonly stateMutability: "view";
185
- readonly inputs: readonly [{
186
- readonly name: "addr";
1368
+ readonly Revoke: readonly [{
1369
+ readonly name: "owner";
187
1370
  readonly type: "address";
188
1371
  }, {
189
1372
  readonly name: "index";
190
1373
  readonly type: "uint256";
1374
+ }, {
1375
+ readonly name: "nonce";
1376
+ readonly type: "uint256";
1377
+ }, {
1378
+ readonly name: "deadline";
1379
+ readonly type: "uint256";
191
1380
  }];
192
- readonly outputs: readonly [{
193
- readonly name: "fingerprint";
194
- readonly type: "string";
1381
+ readonly SetRecord: readonly [{
1382
+ readonly name: "owner";
1383
+ readonly type: "address";
195
1384
  }, {
196
- readonly name: "createdAt";
1385
+ readonly name: "index";
197
1386
  readonly type: "uint256";
198
1387
  }, {
199
- readonly name: "revoked";
200
- readonly type: "bool";
1388
+ readonly name: "kind";
1389
+ readonly type: "bytes32";
1390
+ }, {
1391
+ readonly name: "value";
1392
+ readonly type: "bytes";
1393
+ }, {
1394
+ readonly name: "nonce";
1395
+ readonly type: "uint256";
1396
+ }, {
1397
+ readonly name: "deadline";
1398
+ readonly type: "uint256";
201
1399
  }];
202
- }];
1400
+ };
1401
+ type AuthorizationAction = keyof typeof AUTHORIZATION_TYPES;
1402
+ interface Common {
1403
+ owner: Hex;
1404
+ nonce: bigint;
1405
+ deadline: bigint;
1406
+ }
1407
+ type AttestAuthorization = Common & {
1408
+ fingerprint: string;
1409
+ pgpSignature: string;
1410
+ pgpPublicKey: string;
1411
+ };
1412
+ type ReattestAuthorization = AttestAuthorization & {
1413
+ revokeIndex: bigint;
1414
+ };
1415
+ type UpdateKeyAuthorization = Common & {
1416
+ index: bigint;
1417
+ pgpPublicKey: string;
1418
+ };
1419
+ type RevokeAuthorization = Common & {
1420
+ index: bigint;
1421
+ };
1422
+ type SetRecordAuthorization = Common & {
1423
+ index: bigint;
1424
+ kind: Hex;
1425
+ value: Hex;
1426
+ };
1427
+ /**
1428
+ * Build the object to pass to viem/wagmi `signTypedData`. `fingerprint` is the hex
1429
+ * fingerprint; `pgpSignature` / `pgpPublicKey` are the armored text exactly as they
1430
+ * will be submitted (they are hashed as UTF-8 bytes).
1431
+ */
1432
+ declare function attestTypedData(chainId: number, registry: Hex, a: AttestAuthorization): {
1433
+ domain: TypedDataDomain;
1434
+ types: {
1435
+ Attest: readonly [{
1436
+ readonly name: "owner";
1437
+ readonly type: "address";
1438
+ }, {
1439
+ readonly name: "fingerprint";
1440
+ readonly type: "bytes";
1441
+ }, {
1442
+ readonly name: "pgpSignature";
1443
+ readonly type: "bytes";
1444
+ }, {
1445
+ readonly name: "pgpPublicKey";
1446
+ readonly type: "bytes";
1447
+ }, {
1448
+ readonly name: "nonce";
1449
+ readonly type: "uint256";
1450
+ }, {
1451
+ readonly name: "deadline";
1452
+ readonly type: "uint256";
1453
+ }];
1454
+ };
1455
+ primaryType: "Attest";
1456
+ message: {
1457
+ owner: `0x${string}`;
1458
+ fingerprint: `0x${string}`;
1459
+ pgpSignature: `0x${string}`;
1460
+ pgpPublicKey: `0x${string}`;
1461
+ nonce: bigint;
1462
+ deadline: bigint;
1463
+ };
1464
+ };
1465
+ declare function reattestTypedData(chainId: number, registry: Hex, a: ReattestAuthorization): {
1466
+ domain: TypedDataDomain;
1467
+ types: {
1468
+ Reattest: readonly [{
1469
+ readonly name: "owner";
1470
+ readonly type: "address";
1471
+ }, {
1472
+ readonly name: "revokeIndex";
1473
+ readonly type: "uint256";
1474
+ }, {
1475
+ readonly name: "fingerprint";
1476
+ readonly type: "bytes";
1477
+ }, {
1478
+ readonly name: "pgpSignature";
1479
+ readonly type: "bytes";
1480
+ }, {
1481
+ readonly name: "pgpPublicKey";
1482
+ readonly type: "bytes";
1483
+ }, {
1484
+ readonly name: "nonce";
1485
+ readonly type: "uint256";
1486
+ }, {
1487
+ readonly name: "deadline";
1488
+ readonly type: "uint256";
1489
+ }];
1490
+ };
1491
+ primaryType: "Reattest";
1492
+ message: {
1493
+ revokeIndex: bigint;
1494
+ owner: `0x${string}`;
1495
+ fingerprint: `0x${string}`;
1496
+ pgpSignature: `0x${string}`;
1497
+ pgpPublicKey: `0x${string}`;
1498
+ nonce: bigint;
1499
+ deadline: bigint;
1500
+ };
1501
+ };
1502
+ declare function updateKeyTypedData(chainId: number, registry: Hex, a: UpdateKeyAuthorization): {
1503
+ domain: TypedDataDomain;
1504
+ types: {
1505
+ UpdateKey: readonly [{
1506
+ readonly name: "owner";
1507
+ readonly type: "address";
1508
+ }, {
1509
+ readonly name: "index";
1510
+ readonly type: "uint256";
1511
+ }, {
1512
+ readonly name: "pgpPublicKey";
1513
+ readonly type: "bytes";
1514
+ }, {
1515
+ readonly name: "nonce";
1516
+ readonly type: "uint256";
1517
+ }, {
1518
+ readonly name: "deadline";
1519
+ readonly type: "uint256";
1520
+ }];
1521
+ };
1522
+ primaryType: "UpdateKey";
1523
+ message: {
1524
+ owner: `0x${string}`;
1525
+ index: bigint;
1526
+ pgpPublicKey: `0x${string}`;
1527
+ nonce: bigint;
1528
+ deadline: bigint;
1529
+ };
1530
+ };
1531
+ declare function revokeTypedData(chainId: number, registry: Hex, a: RevokeAuthorization): {
1532
+ domain: TypedDataDomain;
1533
+ types: {
1534
+ Revoke: readonly [{
1535
+ readonly name: "owner";
1536
+ readonly type: "address";
1537
+ }, {
1538
+ readonly name: "index";
1539
+ readonly type: "uint256";
1540
+ }, {
1541
+ readonly name: "nonce";
1542
+ readonly type: "uint256";
1543
+ }, {
1544
+ readonly name: "deadline";
1545
+ readonly type: "uint256";
1546
+ }];
1547
+ };
1548
+ primaryType: "Revoke";
1549
+ message: {
1550
+ owner: `0x${string}`;
1551
+ index: bigint;
1552
+ nonce: bigint;
1553
+ deadline: bigint;
1554
+ };
1555
+ };
1556
+ declare function setRecordTypedData(chainId: number, registry: Hex, a: SetRecordAuthorization): {
1557
+ domain: TypedDataDomain;
1558
+ types: {
1559
+ SetRecord: readonly [{
1560
+ readonly name: "owner";
1561
+ readonly type: "address";
1562
+ }, {
1563
+ readonly name: "index";
1564
+ readonly type: "uint256";
1565
+ }, {
1566
+ readonly name: "kind";
1567
+ readonly type: "bytes32";
1568
+ }, {
1569
+ readonly name: "value";
1570
+ readonly type: "bytes";
1571
+ }, {
1572
+ readonly name: "nonce";
1573
+ readonly type: "uint256";
1574
+ }, {
1575
+ readonly name: "deadline";
1576
+ readonly type: "uint256";
1577
+ }];
1578
+ };
1579
+ primaryType: "SetRecord";
1580
+ message: {
1581
+ owner: `0x${string}`;
1582
+ index: bigint;
1583
+ kind: `0x${string}`;
1584
+ value: `0x${string}`;
1585
+ nonce: bigint;
1586
+ deadline: bigint;
1587
+ };
1588
+ };
1589
+ /** The digest the registry recovers the signer from — handy for tests and CLIs. */
1590
+ declare function authorizationDigest(typedData: ReturnType<typeof attestTypedData | typeof reattestTypedData | typeof updateKeyTypedData | typeof revokeTypedData | typeof setRecordTypedData>): Hex;
1591
+ /** `bytes32 kind` for a record from a human-readable name, e.g. recordKind('thurin.vouch'). */
1592
+ declare function recordKind(name: string): Hex;
203
1593
 
204
- export { type Attestation, CONTRACT_DEPLOY_BLOCK, type EFPGraph, type IdentityKitConfig, IdentityKitProvider, type IdentityKitProviderProps, type Notation, type PGPKeyInfo, type PGPVerification, type Proof, type ProofResult, REGISTRY_ABI, REGISTRY_ADDRESS, type SubkeyInfo, type Theme, ThurinCard, type ThurinCardProps, type ThurinIdentity, displayUrl, fetchEFPGraph, fetchKeyByFingerprint, fetchKeyByKeyId, identifyProof, parsePgpKey, proofHref, proofSecondaryHref, useAttestations, useEFPGraph, usePGPProofs, useThurinIdentity, verifyAttestation, verifyProof };
1594
+ export { AUTHORIZATION_TYPES, type AttestAuthorization, type Attestation, type AuthorizationAction, type EFPGraph, EIP712_NAME, EIP712_VERSION, type IdentityKitConfig, IdentityKitProvider, type IdentityKitProviderProps, NETWORKS, type NetworkName, type Notation, type PGPKeyInfo, type PGPVerification, type Proof, type ProofResult, REGISTRY_ABI, REGISTRY_ADDRESS, type ReattestAuthorization, type RegistryDeployment, type RevokeAuthorization, type SetRecordAuthorization, type StrippedKey, type SubkeyInfo, type Theme, ThurinCard, type ThurinCardProps, type ThurinIdentity, type UpdateKeyAuthorization, attestTypedData, authorizationDigest, bytesToFingerprint, chainFor, displayUrl, fetchEFPGraph, fetchKeyByFingerprint, fetchKeyByKeyId, fingerprintHash, fingerprintToBytes, getRegistry, hasEmailUserID, identifyProof, isNetworkName, keyIdOf, keyIdToBytes, normalizeFingerprint, parsePgpKey, proofHref, proofSecondaryHref, reattestTypedData, recordKind, registryDomain, revokeTypedData, setRecordTypedData, stripEmailUserIDs, updateKeyTypedData, useAttestations, useEFPGraph, usePGPProofs, useThurinIdentity, verifyAttestation, verifyProof };