@thurinlabs/identity-kit 1.4.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.d.cts CHANGED
@@ -2,7 +2,7 @@ import * as viem from 'viem';
2
2
  import { Hex, TypedDataDomain } from 'viem';
3
3
 
4
4
  interface Attestation {
5
- /** Position in the owner's attestation history. */
5
+ /** Position in the owner's claim history. */
6
6
  index: number;
7
7
  /** Lowercase hex fingerprint, no 0x (40 chars for v4 keys, 64 for v6). */
8
8
  fingerprint: string;
@@ -11,21 +11,28 @@ interface Attestation {
11
11
  revoked: boolean;
12
12
  /** Unix seconds, or null while active. */
13
13
  revokedAt: number | null;
14
- /** Format of the clearsigned message (1 = "I control the Ethereum address: <address>"). */
14
+ /** 'active', 'revoked', or 'replaced' (revoked by a reattest). */
15
+ state: 'active' | 'revoked' | 'replaced';
16
+ /** The claim that replaced this one, when `state` is 'replaced'. */
17
+ replacedBy: number | null;
18
+ /** The owner's revoke reason: '', 'compromised', 'retired', 'superseded', or 'other'. */
19
+ revokeReason: string;
20
+ /** 1 = detached signature over the statement; 0 = a clearsigned message stored as submitted. */
15
21
  messageVersion: number;
16
- /** The clearsigned message stored on-chain (null only if the payload read failed). */
22
+ /** The signature as armored text, or the clearsigned message (null only if the read failed). */
17
23
  pgpSignature: string | null;
18
- /** The armored public key stored on-chain (null only if the payload read failed). */
24
+ /** The armored public key (null only if the read failed). */
19
25
  pgpPublicKey: string | null;
26
+ /** null when the claim wasn't read: older than `readClaims`' limit. */
20
27
  verification: PGPVerification | null;
21
28
  }
22
- /** Why a claim does or doesn't count, in a form a UI can word (see CLAIM_CHECK_LABEL). Since 1.4.0. */
29
+ /** Why a claim does or doesn't count, in a form a UI can word (see CLAIM_CHECK_LABEL). */
23
30
  type ClaimCheckKind = 'verified' | 'expired' | 'signing-key-expired' | 'revoked' | 'compromised' | 'signing-key-revoked' | 'unsupported' | 'bad-signature';
24
31
  interface PGPVerification {
25
32
  verified: boolean;
26
33
  /** The underlying library message, for logs; show `kind` to people instead. */
27
34
  reason?: string;
28
- /** Since 1.4.0. */
35
+ /** Why a claim doesn't count, or `verified`. */
29
36
  kind?: ClaimCheckKind;
30
37
  /** ISO date that goes with `kind`: when the key or subkey expired or was revoked. */
31
38
  at?: string | null;
@@ -46,11 +53,19 @@ interface PGPKeyInfo {
46
53
  expires: string | null;
47
54
  notations: Notation[];
48
55
  subkeys: SubkeyInfo[];
56
+ /** A key or subkey that can take encrypted messages is valid now. */
57
+ canEncrypt: boolean;
49
58
  }
50
59
  interface SubkeyInfo {
51
60
  algorithm: string;
52
61
  created: string | null;
53
62
  fingerprint: string;
63
+ /** What its newest binding signature allows. */
64
+ usage: ('sign' | 'encrypt' | 'auth')[];
65
+ /** ISO, or null if it doesn't expire. */
66
+ expires: string | null;
67
+ /** Usable now: bound, not expired, not revoked. */
68
+ valid: boolean;
54
69
  }
55
70
  interface Notation {
56
71
  name: string;
@@ -67,139 +82,510 @@ interface Proof {
67
82
  castHash?: string;
68
83
  domain?: string;
69
84
  }
70
- interface ProofResult {
71
- provider: string;
72
- label: string;
73
- url: string;
74
- displayUrl: string;
75
- href: string | null;
76
- secondaryHref: string | null;
77
- status: 'verified' | 'unverified' | 'pending' | 'skipped';
78
- reason?: string;
85
+
86
+ declare function identifyProof(notation: Notation): Proof | null;
87
+ declare function displayUrl(proof: Proof): string;
88
+ declare function proofHref(proof: Proof): string | null;
89
+ declare function proofSecondaryHref(proof: Proof): string | null;
90
+ /**
91
+ * Farcaster proofs are read from a Farcaster node's HTTP API (`/v1/userNameProofByName`,
92
+ * `/v1/castsByFid`). The default is Quilibrium's public Hypersnap node, which needs no key and
93
+ * allows browser requests; it sees the visitor's IP and which account was checked. Point
94
+ * `farcasterHub` at your own node to avoid that, or pass a Neynar key to use Neynar's hub.
95
+ */
96
+ declare const FARCASTER_HUB = "https://haatz.quilibrium.com";
97
+ interface ProofOptions {
98
+ /** A Farcaster node's HTTP API base URL. Default: FARCASTER_HUB (keyless). */
99
+ farcasterHub?: string;
100
+ /** Optional: read Farcaster through Neynar's hub with this key instead. */
101
+ neynarApiKey?: string;
79
102
  }
80
- interface EFPGraph {
81
- followers: number;
82
- following: number;
83
- top8: string[];
84
- hasEfp: boolean;
103
+ /** Check one proof against its platform. `options` may also be a Neynar API key. */
104
+ declare function verifyProof(proof: Proof, fingerprint: string, opts?: ProofOptions | string): Promise<PGPVerification>;
105
+
106
+ /** A key or signature as armored text, raw bytes, or the `0x…` hex a contract call returns. */
107
+ type PgpInput = string | Uint8Array;
108
+ /** The line every claim signs (message version 1). The address is lowercased. */
109
+ declare function statementText(address: string): string;
110
+ declare function parsePgpKey(armoredKey: PgpInput): Promise<PGPKeyInfo | null>;
111
+ /** A clearsigned message against a key, judged as gpg would: claims, and records such as `thurin.canary`. */
112
+ declare function verifyClearsigned({ armoredKey, clearsigned }: {
113
+ armoredKey: PgpInput;
114
+ clearsigned: string;
115
+ }): Promise<{
116
+ verified: boolean;
117
+ reason?: string;
118
+ text: string;
119
+ }>;
120
+ /**
121
+ * A detached signature over the claim statement for `address`, exactly as `printf '%s'` gives it
122
+ * (no trailing line break): the only form the registry's `clearsigned()` view can show to gpg.
123
+ */
124
+ declare function verifyStatementSignature({ key, signature, address }: {
125
+ key: PgpInput;
126
+ signature: PgpInput;
127
+ address: string;
128
+ }): Promise<{
129
+ verified: boolean;
130
+ reason?: string;
131
+ text: string;
132
+ }>;
133
+ declare function verifyAttestation({ pgpPublicKey, pgpSignature, fingerprint, ethAddress, }: {
134
+ pgpPublicKey: PgpInput | null;
135
+ pgpSignature: PgpInput | null;
136
+ fingerprint: string;
137
+ ethAddress: string;
138
+ }): Promise<PGPVerification>;
139
+ interface StrippedKey {
140
+ /** Armored public key containing only the non-email user IDs. */
141
+ armored: string;
142
+ /** The same key as raw bytes. */
143
+ binary: Uint8Array;
144
+ /** User IDs kept (no `@`). */
145
+ kept: string[];
146
+ /** User IDs removed (contained an `@`). */
147
+ removed: string[];
85
148
  }
86
- interface ThurinIdentity {
87
- address: string | null;
88
- ensName: string | null;
89
- ensAvatar: string | null;
90
- claims: Attestation[];
91
- totalClaims: number;
92
- activeClaims: number;
93
- currentFingerprint: string | null;
94
- pgpKeyInfo: PGPKeyInfo | null;
95
- proofs: ProofResult[];
96
- efp: EFPGraph | null;
97
- isLoading: boolean;
98
- /** Set when the identity couldn't be shown; the message is plain and safe to display. */
99
- error: Error | null;
100
- /** Why: the RPC didn't answer, the ENS name has no address, or a registry read failed. */
101
- errorKind: 'rpc' | 'not-found' | 'read' | null;
102
- /** Re-run the lookups (for a "Try again" button). */
103
- retry: () => void;
149
+ /**
150
+ * The key without its email user IDs; the rest keep their self-certifications and notations.
151
+ * Null when no user ID would remain: openpgp needs one to verify signatures.
152
+ */
153
+ declare function stripEmailUserIDs(armoredKey: PgpInput): Promise<StrippedKey | null>;
154
+ /** True when any user ID on the key contains an email address. */
155
+ declare function hasEmailUserID(armoredKey: PgpInput): Promise<boolean>;
156
+ interface LeanKey {
157
+ /** The key to store, as raw bytes. */
158
+ binary: Uint8Array;
159
+ kept: string[];
160
+ /** Names left out: they contain an email, or a notation on them does. */
161
+ removed: string[];
162
+ /** Emails in notations on the key itself (not on a name), which can't be left out: refuse to publish these. */
163
+ keyNotationEmails: string[];
104
164
  }
105
- type Theme = 'thurin' | 'dark' | 'light';
106
- interface IdentityKitConfig {
107
- rpcUrl?: string;
108
- /** Optional: read Farcaster proofs through Neynar's hub with this key. Not needed since 1.3.7. */
109
- neynarApiKey?: string;
110
- /** A Farcaster node's HTTP API for Farcaster proofs. Default: Quilibrium's public Hypersnap node (keyless). */
111
- farcasterHub?: string;
112
- baseUrl?: string;
113
- /** Which PGPRegistry deployment to read: 'mainnet' (default) or 'sepolia'. */
114
- network?: 'mainnet' | 'sepolia' | 'local';
115
- /** Override the registry address (e.g. a local deploy that landed elsewhere). */
116
- registryAddress?: string;
165
+ /**
166
+ * The key as a claim stores it, like gpg's export-minimal: raw bytes, the newest self-signature per
167
+ * user ID and subkey, revocations kept. Email user IDs are left out unless `includeEmail`. Every subkey
168
+ * stays, authentication (SSH) ones included. Null when no user ID would remain.
169
+ */
170
+ declare function leanKey(input: PgpInput, { includeEmail }?: {
171
+ includeEmail?: boolean;
172
+ }): Promise<LeanKey | null>;
173
+ /**
174
+ * What to store as a claim's signature. A detached signature is stored as its own raw bytes
175
+ * (message version 1). A clearsigned message is reduced to its signature when that covers the
176
+ * statement exactly; otherwise (e.g. made with `echo`, which signs a trailing line break) the
177
+ * whole message is kept as text (version 0), so gpg can still verify what the registry returns.
178
+ */
179
+ declare function claimSignature({ signature, key, address }: {
180
+ signature: PgpInput;
181
+ key: PgpInput;
182
+ address: string;
183
+ }): Promise<{
184
+ signature: Uint8Array | string;
185
+ messageVersion: 0 | 1;
186
+ } | null>;
187
+ /**
188
+ * The email gpg signed in as the signer's user ID (from `-u me@example.com` or gpg.conf `sender`),
189
+ * or null. It can't be removed without re-signing; `gpg --disable-signer-uid` leaves it out.
190
+ */
191
+ declare function signatureEmail(signature: PgpInput): Promise<string | null>;
192
+ /**
193
+ * A stored key or signature as armored text, for display, copy buttons, and `gpg --import`.
194
+ * A clearsigned message comes back as stored. Accepts the `0x…` hex a contract call returns.
195
+ * Null if it isn't OpenPGP data.
196
+ */
197
+ declare function payloadText(input: PgpInput, kind: 'key' | 'signature'): Promise<string | null>;
198
+ interface SshKey {
199
+ /** An `authorized_keys` line without a comment: `ssh-ed25519 AAAA…`. */
200
+ line: string;
201
+ /** As `ssh-keygen -l` shows it: `SHA256:…`. */
202
+ sha256: string;
203
+ /** The PGP key or subkey it came from. */
204
+ fingerprint: string;
117
205
  }
206
+ /**
207
+ * The key's SSH keys: every authentication key or subkey that is valid now (not expired, not
208
+ * revoked), in a type OpenSSH accepts. What `gpg --export-ssh-key` prints, but every one, not only
209
+ * the newest. Empty when there are none.
210
+ */
211
+ declare function sshKeys(input: PgpInput): Promise<SshKey[]>;
118
212
 
119
- declare const REGISTRY_ABI: readonly [{
120
- readonly type: "function";
121
- readonly name: "ATTEST_TYPEHASH";
122
- readonly inputs: readonly [];
123
- readonly outputs: readonly [{
124
- readonly name: "";
125
- readonly type: "bytes32";
126
- readonly internalType: "bytes32";
213
+ /** Normalize a fingerprint to lowercase hex with no prefix or spaces. Returns null if malformed. */
214
+ declare function normalizeFingerprint(input: string): string | null;
215
+ /** Same key, whatever the case, spacing, or 0x of either side. Malformed input never matches. */
216
+ declare function sameFingerprint(a: string | null | undefined, b: string | null | undefined): boolean;
217
+ /** Fingerprint → the raw `bytes` argument the registry takes (0x-prefixed, 20 or 32 bytes). */
218
+ declare function fingerprintToBytes(fingerprint: string): Hex;
219
+ /** Raw `bytes` from the registry → lowercase hex fingerprint without 0x. */
220
+ declare function bytesToFingerprint(bytes: Hex | string): string;
221
+ /** keccak256 of the raw fingerprint bytes: the `fingerprintHash` the registry indexes by. */
222
+ declare function fingerprintHash(fingerprint: string): Hex;
223
+ /**
224
+ * The long key ID as the registry's `bytes8`: the last 8 bytes of a v4 fingerprint, the first 8 of
225
+ * a v6 (RFC 9580 §5.5.4), as `gpg --keyid-format long` prints.
226
+ */
227
+ declare function keyIdOf(fingerprint: string): Hex;
228
+ /** A 16-hex long key ID (spaces/0x tolerated) → `bytes8`. */
229
+ declare function keyIdToBytes(keyId: string): Hex | null;
230
+
231
+ /**
232
+ * EIP-712 permissions for the registry's relayed writes (`attestFor`, `reattestFor`,
233
+ * `updateKeyFor`, `revokeFor`, `setRecordFor`, `markCompromisedFor`). The owner signs one; anyone can submit the
234
+ * matching call and pay the gas. Every field is bound, plus the owner's `nonces(owner)` and a
235
+ * `deadline`. The domain includes the chain id, so a permission can't be replayed on another network.
236
+ */
237
+ declare const EIP712_NAME = "Thurin PGPRegistry";
238
+ declare const EIP712_VERSION = "3";
239
+ declare function registryDomain(chainId: number, verifyingContract: Hex): TypedDataDomain;
240
+ declare const AUTHORIZATION_TYPES: {
241
+ readonly Attest: readonly [{
242
+ readonly name: "owner";
243
+ readonly type: "address";
244
+ }, {
245
+ readonly name: "fingerprint";
246
+ readonly type: "bytes";
247
+ }, {
248
+ readonly name: "signature";
249
+ readonly type: "bytes";
250
+ }, {
251
+ readonly name: "key";
252
+ readonly type: "bytes";
253
+ }, {
254
+ readonly name: "nonce";
255
+ readonly type: "uint256";
256
+ }, {
257
+ readonly name: "deadline";
258
+ readonly type: "uint256";
127
259
  }];
128
- readonly stateMutability: "view";
129
- }, {
130
- readonly type: "function";
131
- readonly name: "DOMAIN_SEPARATOR";
132
- readonly inputs: readonly [];
133
- readonly outputs: readonly [{
134
- readonly name: "";
135
- readonly type: "bytes32";
136
- readonly internalType: "bytes32";
260
+ readonly Reattest: readonly [{
261
+ readonly name: "owner";
262
+ readonly type: "address";
263
+ }, {
264
+ readonly name: "revokeIndex";
265
+ readonly type: "uint256";
266
+ }, {
267
+ readonly name: "fingerprint";
268
+ readonly type: "bytes";
269
+ }, {
270
+ readonly name: "signature";
271
+ readonly type: "bytes";
272
+ }, {
273
+ readonly name: "key";
274
+ readonly type: "bytes";
275
+ }, {
276
+ readonly name: "keepRecords";
277
+ readonly type: "bool";
278
+ }, {
279
+ readonly name: "nonce";
280
+ readonly type: "uint256";
281
+ }, {
282
+ readonly name: "deadline";
283
+ readonly type: "uint256";
137
284
  }];
138
- readonly stateMutability: "view";
139
- }, {
140
- readonly type: "function";
141
- readonly name: "EIP712_NAME";
142
- readonly inputs: readonly [];
143
- readonly outputs: readonly [{
144
- readonly name: "";
145
- readonly type: "string";
146
- readonly internalType: "string";
285
+ readonly UpdateKey: readonly [{
286
+ readonly name: "owner";
287
+ readonly type: "address";
288
+ }, {
289
+ readonly name: "index";
290
+ readonly type: "uint256";
291
+ }, {
292
+ readonly name: "key";
293
+ readonly type: "bytes";
294
+ }, {
295
+ readonly name: "nonce";
296
+ readonly type: "uint256";
297
+ }, {
298
+ readonly name: "deadline";
299
+ readonly type: "uint256";
147
300
  }];
148
- readonly stateMutability: "view";
149
- }, {
150
- readonly type: "function";
151
- readonly name: "EIP712_VERSION";
152
- readonly inputs: readonly [];
153
- readonly outputs: readonly [{
154
- readonly name: "";
301
+ readonly Revoke: readonly [{
302
+ readonly name: "owner";
303
+ readonly type: "address";
304
+ }, {
305
+ readonly name: "index";
306
+ readonly type: "uint256";
307
+ }, {
308
+ readonly name: "reason";
155
309
  readonly type: "string";
156
- readonly internalType: "string";
157
- }];
158
- readonly stateMutability: "view";
159
- }, {
160
- readonly type: "function";
161
- readonly name: "MAX_KEY_BYTES";
162
- readonly inputs: readonly [];
163
- readonly outputs: readonly [{
164
- readonly name: "";
310
+ }, {
311
+ readonly name: "nonce";
165
312
  readonly type: "uint256";
166
- readonly internalType: "uint256";
167
- }];
168
- readonly stateMutability: "view";
169
- }, {
170
- readonly type: "function";
171
- readonly name: "MAX_RECORD_BYTES";
172
- readonly inputs: readonly [];
173
- readonly outputs: readonly [{
174
- readonly name: "";
313
+ }, {
314
+ readonly name: "deadline";
175
315
  readonly type: "uint256";
176
- readonly internalType: "uint256";
177
316
  }];
178
- readonly stateMutability: "view";
179
- }, {
180
- readonly type: "function";
181
- readonly name: "MAX_SIG_BYTES";
182
- readonly inputs: readonly [];
183
- readonly outputs: readonly [{
184
- readonly name: "";
317
+ readonly SetRecord: readonly [{
318
+ readonly name: "owner";
319
+ readonly type: "address";
320
+ }, {
321
+ readonly name: "index";
322
+ readonly type: "uint256";
323
+ }, {
324
+ readonly name: "kind";
325
+ readonly type: "string";
326
+ }, {
327
+ readonly name: "value";
328
+ readonly type: "string";
329
+ }, {
330
+ readonly name: "nonce";
331
+ readonly type: "uint256";
332
+ }, {
333
+ readonly name: "deadline";
185
334
  readonly type: "uint256";
186
- readonly internalType: "uint256";
187
335
  }];
188
- readonly stateMutability: "view";
189
- }, {
190
- readonly type: "function";
191
- readonly name: "MESSAGE_VERSION";
192
- readonly inputs: readonly [];
193
- readonly outputs: readonly [{
194
- readonly name: "";
195
- readonly type: "uint8";
196
- readonly internalType: "uint8";
336
+ readonly MarkCompromised: readonly [{
337
+ readonly name: "owner";
338
+ readonly type: "address";
339
+ }, {
340
+ readonly name: "index";
341
+ readonly type: "uint256";
342
+ }, {
343
+ readonly name: "nonce";
344
+ readonly type: "uint256";
345
+ }, {
346
+ readonly name: "deadline";
347
+ readonly type: "uint256";
197
348
  }];
198
- readonly stateMutability: "view";
199
- }, {
200
- readonly type: "function";
201
- readonly name: "REATTEST_TYPEHASH";
202
- readonly inputs: readonly [];
349
+ };
350
+ type AuthorizationAction = keyof typeof AUTHORIZATION_TYPES;
351
+ /** Every revoke reason a claim can show ('' = none given). "superseded" is set only by reattest. */
352
+ declare const REVOKE_REASONS: readonly ["", "compromised", "retired", "superseded", "other"];
353
+ type RevokeReason = (typeof REVOKE_REASONS)[number];
354
+ /** The reasons an owner can give to `revoke`. "compromised" is final: that address can never claim the key again. */
355
+ declare const OWNER_REVOKE_REASONS: readonly ["", "compromised", "retired", "other"];
356
+ interface Common {
357
+ owner: Hex;
358
+ nonce: bigint;
359
+ deadline: bigint;
360
+ }
361
+ /** `signature` and `key` are the raw bytes as `0x…` hex (or a clearsigned message as text). */
362
+ type AttestAuthorization = Common & {
363
+ fingerprint: string;
364
+ signature: string;
365
+ key: string;
366
+ };
367
+ type ReattestAuthorization = AttestAuthorization & {
368
+ revokeIndex: bigint;
369
+ keepRecords: boolean;
370
+ };
371
+ type UpdateKeyAuthorization = Common & {
372
+ index: bigint;
373
+ key: string;
374
+ };
375
+ type RevokeAuthorization = Common & {
376
+ index: bigint;
377
+ reason?: RevokeReason;
378
+ };
379
+ /** `kind` exactly as it will be submitted (the registry adds `thurin.` to undotted names itself). */
380
+ type SetRecordAuthorization = Common & {
381
+ index: bigint;
382
+ kind: string;
383
+ value: string;
384
+ };
385
+ /** Mark an already revoked or replaced claim compromised (`markCompromisedFor`). A Revoke permission never can. */
386
+ type MarkCompromisedAuthorization = Common & {
387
+ index: bigint;
388
+ };
389
+ /** The object to pass to viem/wagmi `signTypedData`. */
390
+ declare function attestTypedData(chainId: number, registry: Hex, a: AttestAuthorization): {
391
+ domain: TypedDataDomain;
392
+ types: {
393
+ Attest: readonly [{
394
+ readonly name: "owner";
395
+ readonly type: "address";
396
+ }, {
397
+ readonly name: "fingerprint";
398
+ readonly type: "bytes";
399
+ }, {
400
+ readonly name: "signature";
401
+ readonly type: "bytes";
402
+ }, {
403
+ readonly name: "key";
404
+ readonly type: "bytes";
405
+ }, {
406
+ readonly name: "nonce";
407
+ readonly type: "uint256";
408
+ }, {
409
+ readonly name: "deadline";
410
+ readonly type: "uint256";
411
+ }];
412
+ };
413
+ primaryType: "Attest";
414
+ message: {
415
+ owner: `0x${string}`;
416
+ fingerprint: `0x${string}`;
417
+ signature: `0x${string}`;
418
+ key: `0x${string}`;
419
+ nonce: bigint;
420
+ deadline: bigint;
421
+ };
422
+ };
423
+ declare function reattestTypedData(chainId: number, registry: Hex, a: ReattestAuthorization): {
424
+ domain: TypedDataDomain;
425
+ types: {
426
+ Reattest: readonly [{
427
+ readonly name: "owner";
428
+ readonly type: "address";
429
+ }, {
430
+ readonly name: "revokeIndex";
431
+ readonly type: "uint256";
432
+ }, {
433
+ readonly name: "fingerprint";
434
+ readonly type: "bytes";
435
+ }, {
436
+ readonly name: "signature";
437
+ readonly type: "bytes";
438
+ }, {
439
+ readonly name: "key";
440
+ readonly type: "bytes";
441
+ }, {
442
+ readonly name: "keepRecords";
443
+ readonly type: "bool";
444
+ }, {
445
+ readonly name: "nonce";
446
+ readonly type: "uint256";
447
+ }, {
448
+ readonly name: "deadline";
449
+ readonly type: "uint256";
450
+ }];
451
+ };
452
+ primaryType: "Reattest";
453
+ message: {
454
+ owner: `0x${string}`;
455
+ revokeIndex: bigint;
456
+ fingerprint: `0x${string}`;
457
+ signature: `0x${string}`;
458
+ key: `0x${string}`;
459
+ keepRecords: boolean;
460
+ nonce: bigint;
461
+ deadline: bigint;
462
+ };
463
+ };
464
+ declare function updateKeyTypedData(chainId: number, registry: Hex, a: UpdateKeyAuthorization): {
465
+ domain: TypedDataDomain;
466
+ types: {
467
+ UpdateKey: readonly [{
468
+ readonly name: "owner";
469
+ readonly type: "address";
470
+ }, {
471
+ readonly name: "index";
472
+ readonly type: "uint256";
473
+ }, {
474
+ readonly name: "key";
475
+ readonly type: "bytes";
476
+ }, {
477
+ readonly name: "nonce";
478
+ readonly type: "uint256";
479
+ }, {
480
+ readonly name: "deadline";
481
+ readonly type: "uint256";
482
+ }];
483
+ };
484
+ primaryType: "UpdateKey";
485
+ message: {
486
+ owner: `0x${string}`;
487
+ index: bigint;
488
+ key: `0x${string}`;
489
+ nonce: bigint;
490
+ deadline: bigint;
491
+ };
492
+ };
493
+ declare function revokeTypedData(chainId: number, registry: Hex, a: RevokeAuthorization): {
494
+ domain: TypedDataDomain;
495
+ types: {
496
+ Revoke: readonly [{
497
+ readonly name: "owner";
498
+ readonly type: "address";
499
+ }, {
500
+ readonly name: "index";
501
+ readonly type: "uint256";
502
+ }, {
503
+ readonly name: "reason";
504
+ readonly type: "string";
505
+ }, {
506
+ readonly name: "nonce";
507
+ readonly type: "uint256";
508
+ }, {
509
+ readonly name: "deadline";
510
+ readonly type: "uint256";
511
+ }];
512
+ };
513
+ primaryType: "Revoke";
514
+ message: {
515
+ owner: `0x${string}`;
516
+ index: bigint;
517
+ reason: "" | "compromised" | "retired" | "superseded" | "other";
518
+ nonce: bigint;
519
+ deadline: bigint;
520
+ };
521
+ };
522
+ declare function setRecordTypedData(chainId: number, registry: Hex, a: SetRecordAuthorization): {
523
+ domain: TypedDataDomain;
524
+ types: {
525
+ SetRecord: readonly [{
526
+ readonly name: "owner";
527
+ readonly type: "address";
528
+ }, {
529
+ readonly name: "index";
530
+ readonly type: "uint256";
531
+ }, {
532
+ readonly name: "kind";
533
+ readonly type: "string";
534
+ }, {
535
+ readonly name: "value";
536
+ readonly type: "string";
537
+ }, {
538
+ readonly name: "nonce";
539
+ readonly type: "uint256";
540
+ }, {
541
+ readonly name: "deadline";
542
+ readonly type: "uint256";
543
+ }];
544
+ };
545
+ primaryType: "SetRecord";
546
+ message: {
547
+ owner: `0x${string}`;
548
+ index: bigint;
549
+ kind: string;
550
+ value: string;
551
+ nonce: bigint;
552
+ deadline: bigint;
553
+ };
554
+ };
555
+ declare function markCompromisedTypedData(chainId: number, registry: Hex, a: MarkCompromisedAuthorization): {
556
+ domain: TypedDataDomain;
557
+ types: {
558
+ MarkCompromised: readonly [{
559
+ readonly name: "owner";
560
+ readonly type: "address";
561
+ }, {
562
+ readonly name: "index";
563
+ readonly type: "uint256";
564
+ }, {
565
+ readonly name: "nonce";
566
+ readonly type: "uint256";
567
+ }, {
568
+ readonly name: "deadline";
569
+ readonly type: "uint256";
570
+ }];
571
+ };
572
+ primaryType: "MarkCompromised";
573
+ message: {
574
+ owner: `0x${string}`;
575
+ index: bigint;
576
+ nonce: bigint;
577
+ deadline: bigint;
578
+ };
579
+ };
580
+ /** The digest the registry recovers the signer from. */
581
+ declare function authorizationDigest(typedData: ReturnType<typeof attestTypedData | typeof reattestTypedData | typeof updateKeyTypedData | typeof revokeTypedData | typeof setRecordTypedData | typeof markCompromisedTypedData>): Hex;
582
+ /** The hash the registry indexes a record name by (the `kindHash` in `RecordSet` events). */
583
+ declare function recordKind(name: string): Hex;
584
+
585
+ declare const REGISTRY_ABI: readonly [{
586
+ readonly type: "function";
587
+ readonly name: "ATTEST_TYPEHASH";
588
+ readonly inputs: readonly [];
203
589
  readonly outputs: readonly [{
204
590
  readonly name: "";
205
591
  readonly type: "bytes32";
@@ -208,7 +594,7 @@ declare const REGISTRY_ABI: readonly [{
208
594
  readonly stateMutability: "view";
209
595
  }, {
210
596
  readonly type: "function";
211
- readonly name: "REVOKE_TYPEHASH";
597
+ readonly name: "DOMAIN_SEPARATOR";
212
598
  readonly inputs: readonly [];
213
599
  readonly outputs: readonly [{
214
600
  readonly name: "";
@@ -218,56 +604,58 @@ declare const REGISTRY_ABI: readonly [{
218
604
  readonly stateMutability: "view";
219
605
  }, {
220
606
  readonly type: "function";
221
- readonly name: "SET_RECORD_TYPEHASH";
607
+ readonly name: "EIP712_NAME";
222
608
  readonly inputs: readonly [];
223
609
  readonly outputs: readonly [{
224
610
  readonly name: "";
225
- readonly type: "bytes32";
226
- readonly internalType: "bytes32";
611
+ readonly type: "string";
612
+ readonly internalType: "string";
227
613
  }];
228
614
  readonly stateMutability: "view";
229
615
  }, {
230
616
  readonly type: "function";
231
- readonly name: "UPDATE_KEY_TYPEHASH";
617
+ readonly name: "EIP712_VERSION";
232
618
  readonly inputs: readonly [];
233
619
  readonly outputs: readonly [{
234
620
  readonly name: "";
235
- readonly type: "bytes32";
236
- readonly internalType: "bytes32";
621
+ readonly type: "string";
622
+ readonly internalType: "string";
237
623
  }];
238
624
  readonly stateMutability: "view";
239
625
  }, {
240
626
  readonly type: "function";
241
- readonly name: "VERSION";
627
+ readonly name: "EPOCH";
242
628
  readonly inputs: readonly [];
243
629
  readonly outputs: readonly [{
244
630
  readonly name: "";
245
- readonly type: "uint8";
246
- readonly internalType: "uint8";
631
+ readonly type: "uint256";
632
+ readonly internalType: "uint256";
247
633
  }];
248
634
  readonly stateMutability: "view";
249
635
  }, {
250
636
  readonly type: "function";
251
- readonly name: "addressesFor";
252
- readonly inputs: readonly [{
253
- readonly name: "fingerprintHash";
637
+ readonly name: "MARK_COMPROMISED_TYPEHASH";
638
+ readonly inputs: readonly [];
639
+ readonly outputs: readonly [{
640
+ readonly name: "";
254
641
  readonly type: "bytes32";
255
642
  readonly internalType: "bytes32";
256
643
  }];
644
+ readonly stateMutability: "view";
645
+ }, {
646
+ readonly type: "function";
647
+ readonly name: "MAX_CLAIMS_PER_OWNER";
648
+ readonly inputs: readonly [];
257
649
  readonly outputs: readonly [{
258
650
  readonly name: "";
259
- readonly type: "address[]";
260
- readonly internalType: "address[]";
651
+ readonly type: "uint256";
652
+ readonly internalType: "uint256";
261
653
  }];
262
654
  readonly stateMutability: "view";
263
655
  }, {
264
656
  readonly type: "function";
265
- readonly name: "addressesForCount";
266
- readonly inputs: readonly [{
267
- readonly name: "fingerprintHash";
268
- readonly type: "bytes32";
269
- readonly internalType: "bytes32";
270
- }];
657
+ readonly name: "MAX_KEY_BYTES";
658
+ readonly inputs: readonly [];
271
659
  readonly outputs: readonly [{
272
660
  readonly name: "";
273
661
  readonly type: "uint256";
@@ -276,24 +664,144 @@ declare const REGISTRY_ABI: readonly [{
276
664
  readonly stateMutability: "view";
277
665
  }, {
278
666
  readonly type: "function";
279
- readonly name: "addressesForRange";
280
- readonly inputs: readonly [{
281
- readonly name: "fingerprintHash";
282
- readonly type: "bytes32";
283
- readonly internalType: "bytes32";
284
- }, {
285
- readonly name: "start";
667
+ readonly name: "MAX_KIND_BYTES";
668
+ readonly inputs: readonly [];
669
+ readonly outputs: readonly [{
670
+ readonly name: "";
286
671
  readonly type: "uint256";
287
672
  readonly internalType: "uint256";
288
- }, {
289
- readonly name: "count";
290
- readonly type: "uint256";
673
+ }];
674
+ readonly stateMutability: "view";
675
+ }, {
676
+ readonly type: "function";
677
+ readonly name: "MAX_PAYLOAD_BYTES";
678
+ readonly inputs: readonly [];
679
+ readonly outputs: readonly [{
680
+ readonly name: "";
681
+ readonly type: "uint256";
291
682
  readonly internalType: "uint256";
292
683
  }];
684
+ readonly stateMutability: "view";
685
+ }, {
686
+ readonly type: "function";
687
+ readonly name: "MAX_RECORD_BYTES";
688
+ readonly inputs: readonly [];
293
689
  readonly outputs: readonly [{
294
- readonly name: "out";
295
- readonly type: "address[]";
296
- readonly internalType: "address[]";
690
+ readonly name: "";
691
+ readonly type: "uint256";
692
+ readonly internalType: "uint256";
693
+ }];
694
+ readonly stateMutability: "view";
695
+ }, {
696
+ readonly type: "function";
697
+ readonly name: "MAX_SIGNATURE_BYTES";
698
+ readonly inputs: readonly [];
699
+ readonly outputs: readonly [{
700
+ readonly name: "";
701
+ readonly type: "uint256";
702
+ readonly internalType: "uint256";
703
+ }];
704
+ readonly stateMutability: "view";
705
+ }, {
706
+ readonly type: "function";
707
+ readonly name: "MESSAGE_CLEARSIGNED";
708
+ readonly inputs: readonly [];
709
+ readonly outputs: readonly [{
710
+ readonly name: "";
711
+ readonly type: "uint8";
712
+ readonly internalType: "uint8";
713
+ }];
714
+ readonly stateMutability: "view";
715
+ }, {
716
+ readonly type: "function";
717
+ readonly name: "MESSAGE_DETACHED";
718
+ readonly inputs: readonly [];
719
+ readonly outputs: readonly [{
720
+ readonly name: "";
721
+ readonly type: "uint8";
722
+ readonly internalType: "uint8";
723
+ }];
724
+ readonly stateMutability: "view";
725
+ }, {
726
+ readonly type: "function";
727
+ readonly name: "REATTEST_TYPEHASH";
728
+ readonly inputs: readonly [];
729
+ readonly outputs: readonly [{
730
+ readonly name: "";
731
+ readonly type: "bytes32";
732
+ readonly internalType: "bytes32";
733
+ }];
734
+ readonly stateMutability: "view";
735
+ }, {
736
+ readonly type: "function";
737
+ readonly name: "REVOKE_TYPEHASH";
738
+ readonly inputs: readonly [];
739
+ readonly outputs: readonly [{
740
+ readonly name: "";
741
+ readonly type: "bytes32";
742
+ readonly internalType: "bytes32";
743
+ }];
744
+ readonly stateMutability: "view";
745
+ }, {
746
+ readonly type: "function";
747
+ readonly name: "SET_RECORD_TYPEHASH";
748
+ readonly inputs: readonly [];
749
+ readonly outputs: readonly [{
750
+ readonly name: "";
751
+ readonly type: "bytes32";
752
+ readonly internalType: "bytes32";
753
+ }];
754
+ readonly stateMutability: "view";
755
+ }, {
756
+ readonly type: "function";
757
+ readonly name: "UPDATE_KEY_TYPEHASH";
758
+ readonly inputs: readonly [];
759
+ readonly outputs: readonly [{
760
+ readonly name: "";
761
+ readonly type: "bytes32";
762
+ readonly internalType: "bytes32";
763
+ }];
764
+ readonly stateMutability: "view";
765
+ }, {
766
+ readonly type: "function";
767
+ readonly name: "VERSION";
768
+ readonly inputs: readonly [];
769
+ readonly outputs: readonly [{
770
+ readonly name: "";
771
+ readonly type: "uint8";
772
+ readonly internalType: "uint8";
773
+ }];
774
+ readonly stateMutability: "view";
775
+ }, {
776
+ readonly type: "function";
777
+ readonly name: "armorToBytes";
778
+ readonly inputs: readonly [{
779
+ readonly name: "armored";
780
+ readonly type: "string";
781
+ readonly internalType: "string";
782
+ }];
783
+ readonly outputs: readonly [{
784
+ readonly name: "";
785
+ readonly type: "bytes";
786
+ readonly internalType: "bytes";
787
+ }];
788
+ readonly stateMutability: "pure";
789
+ }, {
790
+ readonly type: "function";
791
+ readonly name: "armoredKey";
792
+ readonly inputs: readonly [{
793
+ readonly name: "owner";
794
+ readonly type: "address";
795
+ readonly internalType: "address";
796
+ }, {
797
+ readonly name: "index";
798
+ readonly type: "uint256";
799
+ readonly internalType: "uint256";
800
+ }];
801
+ readonly outputs: readonly [{
802
+ readonly name: "";
803
+ readonly type: "string";
804
+ readonly internalType: "string";
297
805
  }];
298
806
  readonly stateMutability: "view";
299
807
  }, {
@@ -304,11 +812,11 @@ declare const REGISTRY_ABI: readonly [{
304
812
  readonly type: "bytes";
305
813
  readonly internalType: "bytes";
306
814
  }, {
307
- readonly name: "pgpSignature";
815
+ readonly name: "signature";
308
816
  readonly type: "bytes";
309
817
  readonly internalType: "bytes";
310
818
  }, {
311
- readonly name: "pgpPublicKey";
819
+ readonly name: "key";
312
820
  readonly type: "bytes";
313
821
  readonly internalType: "bytes";
314
822
  }];
@@ -330,11 +838,11 @@ declare const REGISTRY_ABI: readonly [{
330
838
  readonly type: "bytes";
331
839
  readonly internalType: "bytes";
332
840
  }, {
333
- readonly name: "pgpSignature";
841
+ readonly name: "signature";
334
842
  readonly type: "bytes";
335
843
  readonly internalType: "bytes";
336
844
  }, {
337
- readonly name: "pgpPublicKey";
845
+ readonly name: "key";
338
846
  readonly type: "bytes";
339
847
  readonly internalType: "bytes";
340
848
  }, {
@@ -342,7 +850,7 @@ declare const REGISTRY_ABI: readonly [{
342
850
  readonly type: "uint256";
343
851
  readonly internalType: "uint256";
344
852
  }, {
345
- readonly name: "signature";
853
+ readonly name: "permission";
346
854
  readonly type: "bytes";
347
855
  readonly internalType: "bytes";
348
856
  }];
@@ -354,7 +862,76 @@ declare const REGISTRY_ABI: readonly [{
354
862
  readonly stateMutability: "nonpayable";
355
863
  }, {
356
864
  readonly type: "function";
357
- readonly name: "attestationCount";
865
+ readonly name: "cancelAuthorization";
866
+ readonly inputs: readonly [];
867
+ readonly outputs: readonly [];
868
+ readonly stateMutability: "nonpayable";
869
+ }, {
870
+ readonly type: "function";
871
+ readonly name: "claim";
872
+ readonly inputs: readonly [{
873
+ readonly name: "owner";
874
+ readonly type: "address";
875
+ readonly internalType: "address";
876
+ }, {
877
+ readonly name: "index";
878
+ readonly type: "uint256";
879
+ readonly internalType: "uint256";
880
+ }];
881
+ readonly outputs: readonly [{
882
+ readonly name: "details";
883
+ readonly type: "tuple";
884
+ readonly internalType: "struct PGPRegistry.ClaimView";
885
+ readonly components: readonly [{
886
+ readonly name: "index";
887
+ readonly type: "uint256";
888
+ readonly internalType: "uint256";
889
+ }, {
890
+ readonly name: "fingerprint";
891
+ readonly type: "bytes";
892
+ readonly internalType: "bytes";
893
+ }, {
894
+ readonly name: "createdAt";
895
+ readonly type: "uint64";
896
+ readonly internalType: "uint64";
897
+ }, {
898
+ readonly name: "revokedAt";
899
+ readonly type: "uint64";
900
+ readonly internalType: "uint64";
901
+ }, {
902
+ readonly name: "state";
903
+ readonly type: "string";
904
+ readonly internalType: "string";
905
+ }, {
906
+ readonly name: "replacedBy";
907
+ readonly type: "uint256";
908
+ readonly internalType: "uint256";
909
+ }, {
910
+ readonly name: "revokeReason";
911
+ readonly type: "string";
912
+ readonly internalType: "string";
913
+ }, {
914
+ readonly name: "messageVersion";
915
+ readonly type: "uint8";
916
+ readonly internalType: "uint8";
917
+ }];
918
+ }, {
919
+ readonly name: "key";
920
+ readonly type: "string";
921
+ readonly internalType: "string";
922
+ }, {
923
+ readonly name: "statement";
924
+ readonly type: "string";
925
+ readonly internalType: "string";
926
+ }, {
927
+ readonly name: "recordKinds";
928
+ readonly type: "string[]";
929
+ readonly internalType: "string[]";
930
+ }];
931
+ readonly stateMutability: "view";
932
+ }, {
933
+ readonly type: "function";
934
+ readonly name: "claimCount";
358
935
  readonly inputs: readonly [{
359
936
  readonly name: "owner";
360
937
  readonly type: "address";
@@ -368,17 +945,21 @@ declare const REGISTRY_ABI: readonly [{
368
945
  readonly stateMutability: "view";
369
946
  }, {
370
947
  readonly type: "function";
371
- readonly name: "attestationsOf";
948
+ readonly name: "claimsOf";
372
949
  readonly inputs: readonly [{
373
950
  readonly name: "owner";
374
951
  readonly type: "address";
375
952
  readonly internalType: "address";
376
953
  }];
377
954
  readonly outputs: readonly [{
378
- readonly name: "";
955
+ readonly name: "out";
379
956
  readonly type: "tuple[]";
380
- readonly internalType: "struct PGPRegistry.Attestation[]";
957
+ readonly internalType: "struct PGPRegistry.ClaimView[]";
381
958
  readonly components: readonly [{
959
+ readonly name: "index";
960
+ readonly type: "uint256";
961
+ readonly internalType: "uint256";
962
+ }, {
382
963
  readonly name: "fingerprint";
383
964
  readonly type: "bytes";
384
965
  readonly internalType: "bytes";
@@ -390,24 +971,28 @@ declare const REGISTRY_ABI: readonly [{
390
971
  readonly name: "revokedAt";
391
972
  readonly type: "uint64";
392
973
  readonly internalType: "uint64";
974
+ }, {
975
+ readonly name: "state";
976
+ readonly type: "string";
977
+ readonly internalType: "string";
978
+ }, {
979
+ readonly name: "replacedBy";
980
+ readonly type: "uint256";
981
+ readonly internalType: "uint256";
982
+ }, {
983
+ readonly name: "revokeReason";
984
+ readonly type: "string";
985
+ readonly internalType: "string";
393
986
  }, {
394
987
  readonly name: "messageVersion";
395
988
  readonly type: "uint8";
396
989
  readonly internalType: "uint8";
397
- }, {
398
- readonly name: "keyPtr";
399
- readonly type: "address";
400
- readonly internalType: "address";
401
- }, {
402
- readonly name: "sigPtr";
403
- readonly type: "address";
404
- readonly internalType: "address";
405
990
  }];
406
991
  }];
407
992
  readonly stateMutability: "view";
408
993
  }, {
409
994
  readonly type: "function";
410
- readonly name: "attestationsOfRange";
995
+ readonly name: "claimsOfRange";
411
996
  readonly inputs: readonly [{
412
997
  readonly name: "owner";
413
998
  readonly type: "address";
@@ -424,8 +1009,12 @@ declare const REGISTRY_ABI: readonly [{
424
1009
  readonly outputs: readonly [{
425
1010
  readonly name: "out";
426
1011
  readonly type: "tuple[]";
427
- readonly internalType: "struct PGPRegistry.Attestation[]";
1012
+ readonly internalType: "struct PGPRegistry.ClaimView[]";
428
1013
  readonly components: readonly [{
1014
+ readonly name: "index";
1015
+ readonly type: "uint256";
1016
+ readonly internalType: "uint256";
1017
+ }, {
429
1018
  readonly name: "fingerprint";
430
1019
  readonly type: "bytes";
431
1020
  readonly internalType: "bytes";
@@ -437,27 +1026,43 @@ declare const REGISTRY_ABI: readonly [{
437
1026
  readonly name: "revokedAt";
438
1027
  readonly type: "uint64";
439
1028
  readonly internalType: "uint64";
1029
+ }, {
1030
+ readonly name: "state";
1031
+ readonly type: "string";
1032
+ readonly internalType: "string";
1033
+ }, {
1034
+ readonly name: "replacedBy";
1035
+ readonly type: "uint256";
1036
+ readonly internalType: "uint256";
1037
+ }, {
1038
+ readonly name: "revokeReason";
1039
+ readonly type: "string";
1040
+ readonly internalType: "string";
440
1041
  }, {
441
1042
  readonly name: "messageVersion";
442
1043
  readonly type: "uint8";
443
1044
  readonly internalType: "uint8";
444
- }, {
445
- readonly name: "keyPtr";
446
- readonly type: "address";
447
- readonly internalType: "address";
448
- }, {
449
- readonly name: "sigPtr";
450
- readonly type: "address";
451
- readonly internalType: "address";
452
1045
  }];
453
1046
  }];
454
1047
  readonly stateMutability: "view";
455
1048
  }, {
456
1049
  readonly type: "function";
457
- readonly name: "cancelAuthorization";
458
- readonly inputs: readonly [];
459
- readonly outputs: readonly [];
460
- readonly stateMutability: "nonpayable";
1050
+ readonly name: "clearsigned";
1051
+ readonly inputs: readonly [{
1052
+ readonly name: "owner";
1053
+ readonly type: "address";
1054
+ readonly internalType: "address";
1055
+ }, {
1056
+ readonly name: "index";
1057
+ readonly type: "uint256";
1058
+ readonly internalType: "uint256";
1059
+ }];
1060
+ readonly outputs: readonly [{
1061
+ readonly name: "";
1062
+ readonly type: "string";
1063
+ readonly internalType: "string";
1064
+ }];
1065
+ readonly stateMutability: "view";
461
1066
  }, {
462
1067
  readonly type: "function";
463
1068
  readonly name: "current";
@@ -475,10 +1080,14 @@ declare const REGISTRY_ABI: readonly [{
475
1080
  readonly type: "uint256";
476
1081
  readonly internalType: "uint256";
477
1082
  }, {
478
- readonly name: "attestation";
1083
+ readonly name: "details";
479
1084
  readonly type: "tuple";
480
- readonly internalType: "struct PGPRegistry.Attestation";
1085
+ readonly internalType: "struct PGPRegistry.ClaimView";
481
1086
  readonly components: readonly [{
1087
+ readonly name: "index";
1088
+ readonly type: "uint256";
1089
+ readonly internalType: "uint256";
1090
+ }, {
482
1091
  readonly name: "fingerprint";
483
1092
  readonly type: "bytes";
484
1093
  readonly internalType: "bytes";
@@ -490,35 +1099,73 @@ declare const REGISTRY_ABI: readonly [{
490
1099
  readonly name: "revokedAt";
491
1100
  readonly type: "uint64";
492
1101
  readonly internalType: "uint64";
1102
+ }, {
1103
+ readonly name: "state";
1104
+ readonly type: "string";
1105
+ readonly internalType: "string";
1106
+ }, {
1107
+ readonly name: "replacedBy";
1108
+ readonly type: "uint256";
1109
+ readonly internalType: "uint256";
1110
+ }, {
1111
+ readonly name: "revokeReason";
1112
+ readonly type: "string";
1113
+ readonly internalType: "string";
493
1114
  }, {
494
1115
  readonly name: "messageVersion";
495
1116
  readonly type: "uint8";
496
1117
  readonly internalType: "uint8";
497
- }, {
498
- readonly name: "keyPtr";
499
- readonly type: "address";
500
- readonly internalType: "address";
501
- }, {
502
- readonly name: "sigPtr";
503
- readonly type: "address";
504
- readonly internalType: "address";
505
1118
  }];
506
1119
  }];
507
1120
  readonly stateMutability: "view";
508
1121
  }, {
509
1122
  readonly type: "function";
510
- readonly name: "fingerprintsForKeyId";
511
- readonly inputs: readonly [{
512
- readonly name: "keyId";
513
- readonly type: "bytes8";
514
- readonly internalType: "bytes8";
515
- }];
1123
+ readonly name: "eip712Domain";
1124
+ readonly inputs: readonly [];
516
1125
  readonly outputs: readonly [{
517
- readonly name: "";
518
- readonly type: "bytes[]";
519
- readonly internalType: "bytes[]";
520
- }];
521
- readonly stateMutability: "view";
1126
+ readonly name: "fields";
1127
+ readonly type: "bytes1";
1128
+ readonly internalType: "bytes1";
1129
+ }, {
1130
+ readonly name: "name";
1131
+ readonly type: "string";
1132
+ readonly internalType: "string";
1133
+ }, {
1134
+ readonly name: "version";
1135
+ readonly type: "string";
1136
+ readonly internalType: "string";
1137
+ }, {
1138
+ readonly name: "chainId";
1139
+ readonly type: "uint256";
1140
+ readonly internalType: "uint256";
1141
+ }, {
1142
+ readonly name: "verifyingContract";
1143
+ readonly type: "address";
1144
+ readonly internalType: "address";
1145
+ }, {
1146
+ readonly name: "salt";
1147
+ readonly type: "bytes32";
1148
+ readonly internalType: "bytes32";
1149
+ }, {
1150
+ readonly name: "extensions";
1151
+ readonly type: "uint256[]";
1152
+ readonly internalType: "uint256[]";
1153
+ }];
1154
+ readonly stateMutability: "view";
1155
+ }, {
1156
+ readonly type: "function";
1157
+ readonly name: "fingerprintsForKeyId";
1158
+ readonly inputs: readonly [{
1159
+ readonly name: "keyId";
1160
+ readonly type: "bytes8";
1161
+ readonly internalType: "bytes8";
1162
+ }];
1163
+ readonly outputs: readonly [{
1164
+ readonly name: "";
1165
+ readonly type: "bytes[]";
1166
+ readonly internalType: "bytes[]";
1167
+ }];
1168
+ readonly stateMutability: "view";
522
1169
  }, {
523
1170
  readonly type: "function";
524
1171
  readonly name: "fingerprintsForKeyIdCount";
@@ -557,7 +1204,7 @@ declare const REGISTRY_ABI: readonly [{
557
1204
  readonly stateMutability: "view";
558
1205
  }, {
559
1206
  readonly type: "function";
560
- readonly name: "getAttestation";
1207
+ readonly name: "keyBytes";
561
1208
  readonly inputs: readonly [{
562
1209
  readonly name: "owner";
563
1210
  readonly type: "address";
@@ -567,40 +1214,33 @@ declare const REGISTRY_ABI: readonly [{
567
1214
  readonly type: "uint256";
568
1215
  readonly internalType: "uint256";
569
1216
  }];
1217
+ readonly outputs: readonly [{
1218
+ readonly name: "key";
1219
+ readonly type: "bytes";
1220
+ readonly internalType: "bytes";
1221
+ }];
1222
+ readonly stateMutability: "view";
1223
+ }, {
1224
+ readonly type: "function";
1225
+ readonly name: "keyStatus";
1226
+ readonly inputs: readonly [{
1227
+ readonly name: "owner";
1228
+ readonly type: "address";
1229
+ readonly internalType: "address";
1230
+ }, {
1231
+ readonly name: "fingerprint";
1232
+ readonly type: "bytes";
1233
+ readonly internalType: "bytes";
1234
+ }];
570
1235
  readonly outputs: readonly [{
571
1236
  readonly name: "";
572
- readonly type: "tuple";
573
- readonly internalType: "struct PGPRegistry.Attestation";
574
- readonly components: readonly [{
575
- readonly name: "fingerprint";
576
- readonly type: "bytes";
577
- readonly internalType: "bytes";
578
- }, {
579
- readonly name: "createdAt";
580
- readonly type: "uint64";
581
- readonly internalType: "uint64";
582
- }, {
583
- readonly name: "revokedAt";
584
- readonly type: "uint64";
585
- readonly internalType: "uint64";
586
- }, {
587
- readonly name: "messageVersion";
588
- readonly type: "uint8";
589
- readonly internalType: "uint8";
590
- }, {
591
- readonly name: "keyPtr";
592
- readonly type: "address";
593
- readonly internalType: "address";
594
- }, {
595
- readonly name: "sigPtr";
596
- readonly type: "address";
597
- readonly internalType: "address";
598
- }];
1237
+ readonly type: "string";
1238
+ readonly internalType: "string";
599
1239
  }];
600
1240
  readonly stateMutability: "view";
601
1241
  }, {
602
1242
  readonly type: "function";
603
- readonly name: "getPayload";
1243
+ readonly name: "markCompromisedFor";
604
1244
  readonly inputs: readonly [{
605
1245
  readonly name: "owner";
606
1246
  readonly type: "address";
@@ -609,22 +1249,36 @@ declare const REGISTRY_ABI: readonly [{
609
1249
  readonly name: "index";
610
1250
  readonly type: "uint256";
611
1251
  readonly internalType: "uint256";
612
- }];
613
- readonly outputs: readonly [{
614
- readonly name: "pgpSignature";
615
- readonly type: "bytes";
616
- readonly internalType: "bytes";
617
1252
  }, {
618
- readonly name: "pgpPublicKey";
1253
+ readonly name: "deadline";
1254
+ readonly type: "uint256";
1255
+ readonly internalType: "uint256";
1256
+ }, {
1257
+ readonly name: "permission";
619
1258
  readonly type: "bytes";
620
1259
  readonly internalType: "bytes";
621
1260
  }];
622
- readonly stateMutability: "view";
1261
+ readonly outputs: readonly [];
1262
+ readonly stateMutability: "nonpayable";
1263
+ }, {
1264
+ readonly type: "function";
1265
+ readonly name: "multicall";
1266
+ readonly inputs: readonly [{
1267
+ readonly name: "calls";
1268
+ readonly type: "bytes[]";
1269
+ readonly internalType: "bytes[]";
1270
+ }];
1271
+ readonly outputs: readonly [{
1272
+ readonly name: "results";
1273
+ readonly type: "bytes[]";
1274
+ readonly internalType: "bytes[]";
1275
+ }];
1276
+ readonly stateMutability: "nonpayable";
623
1277
  }, {
624
1278
  readonly type: "function";
625
1279
  readonly name: "nonces";
626
1280
  readonly inputs: readonly [{
627
- readonly name: "";
1281
+ readonly name: "owner";
628
1282
  readonly type: "address";
629
1283
  readonly internalType: "address";
630
1284
  }];
@@ -634,6 +1288,56 @@ declare const REGISTRY_ABI: readonly [{
634
1288
  readonly internalType: "uint256";
635
1289
  }];
636
1290
  readonly stateMutability: "view";
1291
+ }, {
1292
+ readonly type: "function";
1293
+ readonly name: "ownersOf";
1294
+ readonly inputs: readonly [{
1295
+ readonly name: "fingerprint";
1296
+ readonly type: "bytes";
1297
+ readonly internalType: "bytes";
1298
+ }];
1299
+ readonly outputs: readonly [{
1300
+ readonly name: "";
1301
+ readonly type: "address[]";
1302
+ readonly internalType: "address[]";
1303
+ }];
1304
+ readonly stateMutability: "view";
1305
+ }, {
1306
+ readonly type: "function";
1307
+ readonly name: "ownersOfCount";
1308
+ readonly inputs: readonly [{
1309
+ readonly name: "fingerprint";
1310
+ readonly type: "bytes";
1311
+ readonly internalType: "bytes";
1312
+ }];
1313
+ readonly outputs: readonly [{
1314
+ readonly name: "";
1315
+ readonly type: "uint256";
1316
+ readonly internalType: "uint256";
1317
+ }];
1318
+ readonly stateMutability: "view";
1319
+ }, {
1320
+ readonly type: "function";
1321
+ readonly name: "ownersOfRange";
1322
+ readonly inputs: readonly [{
1323
+ readonly name: "fingerprint";
1324
+ readonly type: "bytes";
1325
+ readonly internalType: "bytes";
1326
+ }, {
1327
+ readonly name: "start";
1328
+ readonly type: "uint256";
1329
+ readonly internalType: "uint256";
1330
+ }, {
1331
+ readonly name: "count";
1332
+ readonly type: "uint256";
1333
+ readonly internalType: "uint256";
1334
+ }];
1335
+ readonly outputs: readonly [{
1336
+ readonly name: "out";
1337
+ readonly type: "address[]";
1338
+ readonly internalType: "address[]";
1339
+ }];
1340
+ readonly stateMutability: "view";
637
1341
  }, {
638
1342
  readonly type: "function";
639
1343
  readonly name: "reattest";
@@ -646,13 +1350,17 @@ declare const REGISTRY_ABI: readonly [{
646
1350
  readonly type: "bytes";
647
1351
  readonly internalType: "bytes";
648
1352
  }, {
649
- readonly name: "pgpSignature";
1353
+ readonly name: "signature";
650
1354
  readonly type: "bytes";
651
1355
  readonly internalType: "bytes";
652
1356
  }, {
653
- readonly name: "pgpPublicKey";
1357
+ readonly name: "key";
654
1358
  readonly type: "bytes";
655
1359
  readonly internalType: "bytes";
1360
+ }, {
1361
+ readonly name: "keepRecords";
1362
+ readonly type: "bool";
1363
+ readonly internalType: "bool";
656
1364
  }];
657
1365
  readonly outputs: readonly [{
658
1366
  readonly name: "index";
@@ -676,19 +1384,23 @@ declare const REGISTRY_ABI: readonly [{
676
1384
  readonly type: "bytes";
677
1385
  readonly internalType: "bytes";
678
1386
  }, {
679
- readonly name: "pgpSignature";
1387
+ readonly name: "signature";
680
1388
  readonly type: "bytes";
681
1389
  readonly internalType: "bytes";
682
1390
  }, {
683
- readonly name: "pgpPublicKey";
1391
+ readonly name: "key";
684
1392
  readonly type: "bytes";
685
1393
  readonly internalType: "bytes";
1394
+ }, {
1395
+ readonly name: "keepRecords";
1396
+ readonly type: "bool";
1397
+ readonly internalType: "bool";
686
1398
  }, {
687
1399
  readonly name: "deadline";
688
1400
  readonly type: "uint256";
689
1401
  readonly internalType: "uint256";
690
1402
  }, {
691
- readonly name: "signature";
1403
+ readonly name: "permission";
692
1404
  readonly type: "bytes";
693
1405
  readonly internalType: "bytes";
694
1406
  }];
@@ -700,7 +1412,7 @@ declare const REGISTRY_ABI: readonly [{
700
1412
  readonly stateMutability: "nonpayable";
701
1413
  }, {
702
1414
  readonly type: "function";
703
- readonly name: "record";
1415
+ readonly name: "recordText";
704
1416
  readonly inputs: readonly [{
705
1417
  readonly name: "owner";
706
1418
  readonly type: "address";
@@ -711,13 +1423,35 @@ declare const REGISTRY_ABI: readonly [{
711
1423
  readonly internalType: "uint256";
712
1424
  }, {
713
1425
  readonly name: "kind";
714
- readonly type: "bytes32";
715
- readonly internalType: "bytes32";
1426
+ readonly type: "string";
1427
+ readonly internalType: "string";
716
1428
  }];
717
1429
  readonly outputs: readonly [{
718
1430
  readonly name: "";
719
- readonly type: "bytes";
720
- readonly internalType: "bytes";
1431
+ readonly type: "string";
1432
+ readonly internalType: "string";
1433
+ }];
1434
+ readonly stateMutability: "view";
1435
+ }, {
1436
+ readonly type: "function";
1437
+ readonly name: "recordsOf";
1438
+ readonly inputs: readonly [{
1439
+ readonly name: "owner";
1440
+ readonly type: "address";
1441
+ readonly internalType: "address";
1442
+ }, {
1443
+ readonly name: "index";
1444
+ readonly type: "uint256";
1445
+ readonly internalType: "uint256";
1446
+ }];
1447
+ readonly outputs: readonly [{
1448
+ readonly name: "kinds";
1449
+ readonly type: "string[]";
1450
+ readonly internalType: "string[]";
1451
+ }, {
1452
+ readonly name: "values";
1453
+ readonly type: "string[]";
1454
+ readonly internalType: "string[]";
721
1455
  }];
722
1456
  readonly stateMutability: "view";
723
1457
  }, {
@@ -727,6 +1461,10 @@ declare const REGISTRY_ABI: readonly [{
727
1461
  readonly name: "index";
728
1462
  readonly type: "uint256";
729
1463
  readonly internalType: "uint256";
1464
+ }, {
1465
+ readonly name: "reason";
1466
+ readonly type: "string";
1467
+ readonly internalType: "string";
730
1468
  }];
731
1469
  readonly outputs: readonly [];
732
1470
  readonly stateMutability: "nonpayable";
@@ -741,12 +1479,16 @@ declare const REGISTRY_ABI: readonly [{
741
1479
  readonly name: "index";
742
1480
  readonly type: "uint256";
743
1481
  readonly internalType: "uint256";
1482
+ }, {
1483
+ readonly name: "reason";
1484
+ readonly type: "string";
1485
+ readonly internalType: "string";
744
1486
  }, {
745
1487
  readonly name: "deadline";
746
1488
  readonly type: "uint256";
747
1489
  readonly internalType: "uint256";
748
1490
  }, {
749
- readonly name: "signature";
1491
+ readonly name: "permission";
750
1492
  readonly type: "bytes";
751
1493
  readonly internalType: "bytes";
752
1494
  }];
@@ -761,12 +1503,12 @@ declare const REGISTRY_ABI: readonly [{
761
1503
  readonly internalType: "uint256";
762
1504
  }, {
763
1505
  readonly name: "kind";
764
- readonly type: "bytes32";
765
- readonly internalType: "bytes32";
1506
+ readonly type: "string";
1507
+ readonly internalType: "string";
766
1508
  }, {
767
1509
  readonly name: "value";
768
- readonly type: "bytes";
769
- readonly internalType: "bytes";
1510
+ readonly type: "string";
1511
+ readonly internalType: "string";
770
1512
  }];
771
1513
  readonly outputs: readonly [];
772
1514
  readonly stateMutability: "nonpayable";
@@ -783,23 +1525,81 @@ declare const REGISTRY_ABI: readonly [{
783
1525
  readonly internalType: "uint256";
784
1526
  }, {
785
1527
  readonly name: "kind";
786
- readonly type: "bytes32";
787
- readonly internalType: "bytes32";
1528
+ readonly type: "string";
1529
+ readonly internalType: "string";
788
1530
  }, {
789
1531
  readonly name: "value";
790
- readonly type: "bytes";
791
- readonly internalType: "bytes";
1532
+ readonly type: "string";
1533
+ readonly internalType: "string";
792
1534
  }, {
793
1535
  readonly name: "deadline";
794
1536
  readonly type: "uint256";
795
1537
  readonly internalType: "uint256";
796
1538
  }, {
797
- readonly name: "signature";
1539
+ readonly name: "permission";
798
1540
  readonly type: "bytes";
799
1541
  readonly internalType: "bytes";
800
1542
  }];
801
1543
  readonly outputs: readonly [];
802
1544
  readonly stateMutability: "nonpayable";
1545
+ }, {
1546
+ readonly type: "function";
1547
+ readonly name: "signatureBytes";
1548
+ readonly inputs: readonly [{
1549
+ readonly name: "owner";
1550
+ readonly type: "address";
1551
+ readonly internalType: "address";
1552
+ }, {
1553
+ readonly name: "index";
1554
+ readonly type: "uint256";
1555
+ readonly internalType: "uint256";
1556
+ }];
1557
+ readonly outputs: readonly [{
1558
+ readonly name: "signature";
1559
+ readonly type: "bytes";
1560
+ readonly internalType: "bytes";
1561
+ }];
1562
+ readonly stateMutability: "view";
1563
+ }, {
1564
+ readonly type: "function";
1565
+ readonly name: "statementFor";
1566
+ readonly inputs: readonly [{
1567
+ readonly name: "owner";
1568
+ readonly type: "address";
1569
+ readonly internalType: "address";
1570
+ }];
1571
+ readonly outputs: readonly [{
1572
+ readonly name: "";
1573
+ readonly type: "string";
1574
+ readonly internalType: "string";
1575
+ }];
1576
+ readonly stateMutability: "pure";
1577
+ }, {
1578
+ readonly type: "function";
1579
+ readonly name: "summary";
1580
+ readonly inputs: readonly [{
1581
+ readonly name: "owner";
1582
+ readonly type: "address";
1583
+ readonly internalType: "address";
1584
+ }];
1585
+ readonly outputs: readonly [{
1586
+ readonly name: "total";
1587
+ readonly type: "uint256";
1588
+ readonly internalType: "uint256";
1589
+ }, {
1590
+ readonly name: "active";
1591
+ readonly type: "uint256";
1592
+ readonly internalType: "uint256";
1593
+ }, {
1594
+ readonly name: "hasCurrent";
1595
+ readonly type: "bool";
1596
+ readonly internalType: "bool";
1597
+ }, {
1598
+ readonly name: "currentIndex";
1599
+ readonly type: "uint256";
1600
+ readonly internalType: "uint256";
1601
+ }];
1602
+ readonly stateMutability: "view";
803
1603
  }, {
804
1604
  readonly type: "function";
805
1605
  readonly name: "updateKey";
@@ -808,7 +1608,7 @@ declare const REGISTRY_ABI: readonly [{
808
1608
  readonly type: "uint256";
809
1609
  readonly internalType: "uint256";
810
1610
  }, {
811
- readonly name: "pgpPublicKey";
1611
+ readonly name: "key";
812
1612
  readonly type: "bytes";
813
1613
  readonly internalType: "bytes";
814
1614
  }];
@@ -826,7 +1626,7 @@ declare const REGISTRY_ABI: readonly [{
826
1626
  readonly type: "uint256";
827
1627
  readonly internalType: "uint256";
828
1628
  }, {
829
- readonly name: "pgpPublicKey";
1629
+ readonly name: "key";
830
1630
  readonly type: "bytes";
831
1631
  readonly internalType: "bytes";
832
1632
  }, {
@@ -834,7 +1634,7 @@ declare const REGISTRY_ABI: readonly [{
834
1634
  readonly type: "uint256";
835
1635
  readonly internalType: "uint256";
836
1636
  }, {
837
- readonly name: "signature";
1637
+ readonly name: "permission";
838
1638
  readonly type: "bytes";
839
1639
  readonly internalType: "bytes";
840
1640
  }];
@@ -864,20 +1664,15 @@ declare const REGISTRY_ABI: readonly [{
864
1664
  readonly indexed: false;
865
1665
  readonly internalType: "bytes";
866
1666
  }, {
867
- readonly name: "messageVersion";
868
- readonly type: "uint8";
869
- readonly indexed: false;
870
- readonly internalType: "uint8";
871
- }, {
872
- readonly name: "keyPtr";
1667
+ readonly name: "payload";
873
1668
  readonly type: "address";
874
1669
  readonly indexed: false;
875
1670
  readonly internalType: "address";
876
1671
  }, {
877
- readonly name: "sigPtr";
878
- readonly type: "address";
1672
+ readonly name: "messageVersion";
1673
+ readonly type: "uint8";
879
1674
  readonly indexed: false;
880
- readonly internalType: "address";
1675
+ readonly internalType: "uint8";
881
1676
  }, {
882
1677
  readonly name: "submitter";
883
1678
  readonly type: "address";
@@ -904,12 +1699,12 @@ declare const REGISTRY_ABI: readonly [{
904
1699
  readonly indexed: true;
905
1700
  readonly internalType: "uint256";
906
1701
  }, {
907
- readonly name: "oldKeyPtr";
1702
+ readonly name: "oldPayload";
908
1703
  readonly type: "address";
909
1704
  readonly indexed: false;
910
1705
  readonly internalType: "address";
911
1706
  }, {
912
- readonly name: "newKeyPtr";
1707
+ readonly name: "newPayload";
913
1708
  readonly type: "address";
914
1709
  readonly indexed: false;
915
1710
  readonly internalType: "address";
@@ -949,10 +1744,20 @@ declare const REGISTRY_ABI: readonly [{
949
1744
  readonly indexed: true;
950
1745
  readonly internalType: "uint256";
951
1746
  }, {
952
- readonly name: "kind";
1747
+ readonly name: "kindHash";
953
1748
  readonly type: "bytes32";
954
1749
  readonly indexed: true;
955
1750
  readonly internalType: "bytes32";
1751
+ }, {
1752
+ readonly name: "kind";
1753
+ readonly type: "string";
1754
+ readonly indexed: false;
1755
+ readonly internalType: "string";
1756
+ }, {
1757
+ readonly name: "value";
1758
+ readonly type: "string";
1759
+ readonly indexed: false;
1760
+ readonly internalType: "string";
956
1761
  }, {
957
1762
  readonly name: "submitter";
958
1763
  readonly type: "address";
@@ -960,6 +1765,26 @@ declare const REGISTRY_ABI: readonly [{
960
1765
  readonly internalType: "address";
961
1766
  }];
962
1767
  readonly anonymous: false;
1768
+ }, {
1769
+ readonly type: "event";
1770
+ readonly name: "RecordsMoved";
1771
+ readonly inputs: readonly [{
1772
+ readonly name: "owner";
1773
+ readonly type: "address";
1774
+ readonly indexed: true;
1775
+ readonly internalType: "address";
1776
+ }, {
1777
+ readonly name: "fromIndex";
1778
+ readonly type: "uint256";
1779
+ readonly indexed: true;
1780
+ readonly internalType: "uint256";
1781
+ }, {
1782
+ readonly name: "toIndex";
1783
+ readonly type: "uint256";
1784
+ readonly indexed: true;
1785
+ readonly internalType: "uint256";
1786
+ }];
1787
+ readonly anonymous: false;
963
1788
  }, {
964
1789
  readonly type: "event";
965
1790
  readonly name: "Revoked";
@@ -978,6 +1803,16 @@ declare const REGISTRY_ABI: readonly [{
978
1803
  readonly type: "uint256";
979
1804
  readonly indexed: true;
980
1805
  readonly internalType: "uint256";
1806
+ }, {
1807
+ readonly name: "reason";
1808
+ readonly type: "string";
1809
+ readonly indexed: false;
1810
+ readonly internalType: "string";
1811
+ }, {
1812
+ readonly name: "replacedBy";
1813
+ readonly type: "uint256";
1814
+ readonly indexed: false;
1815
+ readonly internalType: "uint256";
981
1816
  }, {
982
1817
  readonly name: "submitter";
983
1818
  readonly type: "address";
@@ -988,11 +1823,27 @@ declare const REGISTRY_ABI: readonly [{
988
1823
  }, {
989
1824
  readonly type: "error";
990
1825
  readonly name: "AlreadyRevoked";
1826
+ readonly inputs: readonly [{
1827
+ readonly name: "index";
1828
+ readonly type: "uint256";
1829
+ readonly internalType: "uint256";
1830
+ }];
1831
+ }, {
1832
+ readonly type: "error";
1833
+ readonly name: "BadArmorChecksum";
991
1834
  readonly inputs: readonly [];
992
1835
  }, {
993
1836
  readonly type: "error";
994
- readonly name: "AuthorizationExpired";
1837
+ readonly name: "BadBase64";
995
1838
  readonly inputs: readonly [];
1839
+ }, {
1840
+ readonly type: "error";
1841
+ readonly name: "ClaimActive";
1842
+ readonly inputs: readonly [{
1843
+ readonly name: "index";
1844
+ readonly type: "uint256";
1845
+ readonly internalType: "uint256";
1846
+ }];
996
1847
  }, {
997
1848
  readonly type: "error";
998
1849
  readonly name: "DeploymentFailed";
@@ -1000,10 +1851,14 @@ declare const REGISTRY_ABI: readonly [{
1000
1851
  }, {
1001
1852
  readonly type: "error";
1002
1853
  readonly name: "DuplicateActiveFingerprint";
1003
- readonly inputs: readonly [];
1854
+ readonly inputs: readonly [{
1855
+ readonly name: "fingerprint";
1856
+ readonly type: "bytes";
1857
+ readonly internalType: "bytes";
1858
+ }];
1004
1859
  }, {
1005
1860
  readonly type: "error";
1006
- readonly name: "EmptyPublicKey";
1861
+ readonly name: "EmptyKey";
1007
1862
  readonly inputs: readonly [];
1008
1863
  }, {
1009
1864
  readonly type: "error";
@@ -1012,14 +1867,42 @@ declare const REGISTRY_ABI: readonly [{
1012
1867
  }, {
1013
1868
  readonly type: "error";
1014
1869
  readonly name: "IndexOutOfBounds";
1015
- readonly inputs: readonly [];
1870
+ readonly inputs: readonly [{
1871
+ readonly name: "index";
1872
+ readonly type: "uint256";
1873
+ readonly internalType: "uint256";
1874
+ }, {
1875
+ readonly name: "count";
1876
+ readonly type: "uint256";
1877
+ readonly internalType: "uint256";
1878
+ }];
1016
1879
  }, {
1017
1880
  readonly type: "error";
1018
- readonly name: "InvalidAuthorization";
1019
- readonly inputs: readonly [];
1881
+ readonly name: "InvalidFingerprint";
1882
+ readonly inputs: readonly [{
1883
+ readonly name: "fingerprint";
1884
+ readonly type: "bytes";
1885
+ readonly internalType: "bytes";
1886
+ }];
1020
1887
  }, {
1021
1888
  readonly type: "error";
1022
1889
  readonly name: "InvalidFingerprintLength";
1890
+ readonly inputs: readonly [{
1891
+ readonly name: "length";
1892
+ readonly type: "uint256";
1893
+ readonly internalType: "uint256";
1894
+ }];
1895
+ }, {
1896
+ readonly type: "error";
1897
+ readonly name: "InvalidKindName";
1898
+ readonly inputs: readonly [{
1899
+ readonly name: "kind";
1900
+ readonly type: "string";
1901
+ readonly internalType: "string";
1902
+ }];
1903
+ }, {
1904
+ readonly type: "error";
1905
+ readonly name: "InvalidPermission";
1023
1906
  readonly inputs: readonly [];
1024
1907
  }, {
1025
1908
  readonly type: "error";
@@ -1027,31 +1910,125 @@ declare const REGISTRY_ABI: readonly [{
1027
1910
  readonly inputs: readonly [];
1028
1911
  }, {
1029
1912
  readonly type: "error";
1030
- readonly name: "PublicKeyTooLarge";
1913
+ readonly name: "KeyCompromised";
1914
+ readonly inputs: readonly [{
1915
+ readonly name: "fingerprint";
1916
+ readonly type: "bytes";
1917
+ readonly internalType: "bytes";
1918
+ }];
1919
+ }, {
1920
+ readonly type: "error";
1921
+ readonly name: "KeyStillActive";
1922
+ readonly inputs: readonly [{
1923
+ readonly name: "fingerprint";
1924
+ readonly type: "bytes";
1925
+ readonly internalType: "bytes";
1926
+ }];
1927
+ }, {
1928
+ readonly type: "error";
1929
+ readonly name: "KeyTooLarge";
1930
+ readonly inputs: readonly [{
1931
+ readonly name: "size";
1932
+ readonly type: "uint256";
1933
+ readonly internalType: "uint256";
1934
+ }, {
1935
+ readonly name: "max";
1936
+ readonly type: "uint256";
1937
+ readonly internalType: "uint256";
1938
+ }];
1939
+ }, {
1940
+ readonly type: "error";
1941
+ readonly name: "NotAKey";
1942
+ readonly inputs: readonly [{
1943
+ readonly name: "firstByte";
1944
+ readonly type: "bytes1";
1945
+ readonly internalType: "bytes1";
1946
+ }];
1947
+ }, {
1948
+ readonly type: "error";
1949
+ readonly name: "NotASignature";
1950
+ readonly inputs: readonly [{
1951
+ readonly name: "firstByte";
1952
+ readonly type: "bytes1";
1953
+ readonly internalType: "bytes1";
1954
+ }];
1955
+ }, {
1956
+ readonly type: "error";
1957
+ readonly name: "NotArmored";
1031
1958
  readonly inputs: readonly [];
1959
+ }, {
1960
+ readonly type: "error";
1961
+ readonly name: "PayloadTooLarge";
1962
+ readonly inputs: readonly [{
1963
+ readonly name: "size";
1964
+ readonly type: "uint256";
1965
+ readonly internalType: "uint256";
1966
+ }, {
1967
+ readonly name: "max";
1968
+ readonly type: "uint256";
1969
+ readonly internalType: "uint256";
1970
+ }];
1971
+ }, {
1972
+ readonly type: "error";
1973
+ readonly name: "PermissionExpired";
1974
+ readonly inputs: readonly [{
1975
+ readonly name: "deadline";
1976
+ readonly type: "uint256";
1977
+ readonly internalType: "uint256";
1978
+ }];
1032
1979
  }, {
1033
1980
  readonly type: "error";
1034
1981
  readonly name: "RecordTooLarge";
1035
- readonly inputs: readonly [];
1982
+ readonly inputs: readonly [{
1983
+ readonly name: "size";
1984
+ readonly type: "uint256";
1985
+ readonly internalType: "uint256";
1986
+ }, {
1987
+ readonly name: "max";
1988
+ readonly type: "uint256";
1989
+ readonly internalType: "uint256";
1990
+ }];
1036
1991
  }, {
1037
1992
  readonly type: "error";
1038
1993
  readonly name: "SignatureTooLarge";
1994
+ readonly inputs: readonly [{
1995
+ readonly name: "size";
1996
+ readonly type: "uint256";
1997
+ readonly internalType: "uint256";
1998
+ }, {
1999
+ readonly name: "max";
2000
+ readonly type: "uint256";
2001
+ readonly internalType: "uint256";
2002
+ }];
2003
+ }, {
2004
+ readonly type: "error";
2005
+ readonly name: "SupersededIsSetByReattest";
2006
+ readonly inputs: readonly [];
2007
+ }, {
2008
+ readonly type: "error";
2009
+ readonly name: "TooManyClaims";
2010
+ readonly inputs: readonly [];
2011
+ }, {
2012
+ readonly type: "error";
2013
+ readonly name: "UnknownRevokeReason";
2014
+ readonly inputs: readonly [{
2015
+ readonly name: "reason";
2016
+ readonly type: "string";
2017
+ readonly internalType: "string";
2018
+ }];
2019
+ }, {
2020
+ readonly type: "error";
2021
+ readonly name: "UnsupportedHeader";
1039
2022
  readonly inputs: readonly [];
1040
2023
  }];
1041
2024
 
1042
- /**
1043
- * PGPRegistry v2 is deployed with CREATE2, so it has the same address on every
1044
- * network. (v1 lived at 0xf7a45BC662A78a6fb417ED5f52b3766cbf13EbBb on mainnet and
1045
- * is no longer read by Thurin.)
1046
- */
1047
- declare const REGISTRY_ADDRESS: "0x9302E02e2869e129aC8516fE5eFFd51EA3082c09";
2025
+ /** PGPRegistry v3. Deployed with CREATE2, so the address is the same on mainnet, Sepolia, and a local anvil. */
2026
+ declare const REGISTRY_ADDRESS: "0xFa6956c11163517249f8A67F5560a4406B519451";
1048
2027
  /** Networks the PGPRegistry is deployed on. `mainnet` is the default everywhere. */
1049
2028
  type NetworkName = 'mainnet' | 'sepolia' | 'local';
1050
2029
  interface RegistryDeployment {
1051
2030
  chainId: number;
1052
2031
  address: `0x${string}`;
1053
- /** Block the registry was deployed in (informational; v2 needs no log scans). */
1054
- deployBlock: bigint;
1055
2032
  /** Block explorer base URL for address/tx links. Empty when there is none. */
1056
2033
  explorerUrl: string;
1057
2034
  /** Keyless public RPC used when no rpcUrl is configured. */
@@ -1188,478 +2165,174 @@ declare function chainFor(network?: NetworkName): {
1188
2165
  ensTlds?: readonly string[] | undefined;
1189
2166
  id: 1;
1190
2167
  name: "Ethereum";
1191
- nativeCurrency: {
1192
- readonly name: "Ether";
1193
- readonly symbol: "ETH";
1194
- readonly decimals: 18;
1195
- };
1196
- experimental_preconfirmationTime?: number | undefined | undefined;
1197
- rpcUrls: {
1198
- readonly default: {
1199
- readonly http: readonly ["https://eth.merkle.io"];
1200
- };
1201
- };
1202
- sourceId?: number | undefined | undefined;
1203
- testnet?: boolean | undefined | undefined;
1204
- custom?: Record<string, unknown> | undefined;
1205
- extendSchema?: Record<string, unknown> | undefined;
1206
- fees?: viem.ChainFees<undefined> | undefined;
1207
- formatters?: undefined;
1208
- prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
1209
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1210
- }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
1211
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1212
- }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
1213
- runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
1214
- }] | undefined;
1215
- serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
1216
- verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
1217
- };
1218
-
1219
- /**
1220
- * The `id.thurin` ENS text record: a name points at the PGP key claimed on the Thurin
1221
- * registry by the address the name resolves to. It is a discovery hint, not part of the
1222
- * trust chain — the name owner set the address, the address signed the claim, so a reader
1223
- * verifies by resolving the name and reading the registry. The record only says where to
1224
- * look. `id.thurin` is a service key under ENSIP-5 (reverse-dot of thurin.id); ENSIP-18
1225
- * says service-key values are bare, so the value is the 40-hex fingerprint, uppercase.
1226
- */
1227
- declare const ENS_HINT_KEY: "id.thurin";
1228
- type EnsHintState = 'match' | 'unset' | 'mismatch';
1229
- interface EnsHint {
1230
- key: typeof ENS_HINT_KEY;
1231
- state: EnsHintState;
1232
- /** The raw record value, or null when the name carries no record. */
1233
- record: string | null;
1234
- /** The record as a lowercase fingerprint, or null when it does not parse as one. */
1235
- fingerprint: string | null;
1236
- /** The verified claim's fingerprint (lowercase) the record is compared against, if any. */
1237
- expected: string | null;
1238
- /** Why a record does not match; absent for `match` and `unset`. */
1239
- reason?: string;
1240
- }
1241
- /**
1242
- * Compare a name's `id.thurin` record with the fingerprint the registry verifies for the
1243
- * name's address. Parsing is lenient (case, spaces, 0x); what Thurin writes is strict.
1244
- */
1245
- declare function ensHintFor(record: string | null | undefined, verifiedFingerprint: string | null | undefined): EnsHint;
1246
- /** The value Thurin writes: the fingerprint, uppercase, bare. */
1247
- declare function ensHintValue(fingerprint: string): string;
1248
- /** The `text` / `setText` pair every ENS resolver speaks (ENSIP-5); the same on ENSv2. */
1249
- declare const ENS_TEXT_RESOLVER_ABI: readonly [{
1250
- readonly type: "function";
1251
- readonly name: "text";
1252
- readonly stateMutability: "view";
1253
- readonly inputs: readonly [{
1254
- readonly name: "node";
1255
- readonly type: "bytes32";
1256
- }, {
1257
- readonly name: "key";
1258
- readonly type: "string";
1259
- }];
1260
- readonly outputs: readonly [{
1261
- readonly name: "";
1262
- readonly type: "string";
1263
- }];
1264
- }, {
1265
- readonly type: "function";
1266
- readonly name: "setText";
1267
- readonly stateMutability: "nonpayable";
1268
- readonly inputs: readonly [{
1269
- readonly name: "node";
1270
- readonly type: "bytes32";
1271
- }, {
1272
- readonly name: "key";
1273
- readonly type: "string";
1274
- }, {
1275
- readonly name: "value";
1276
- readonly type: "string";
1277
- }];
1278
- readonly outputs: readonly [];
1279
- }];
1280
- /**
1281
- * The `setText` call that links a name to a claim. The resolver address is not part of it
1282
- * on purpose: look it up at write time (`client.getEnsResolver({ name })`) — on ENSv2 every
1283
- * account has its own resolver, so a cached or hardcoded one is the wrong contract.
1284
- */
1285
- declare function ensHintWrite(name: string, fingerprint: string): {
1286
- abi: readonly [{
1287
- readonly type: "function";
1288
- readonly name: "text";
1289
- readonly stateMutability: "view";
1290
- readonly inputs: readonly [{
1291
- readonly name: "node";
1292
- readonly type: "bytes32";
1293
- }, {
1294
- readonly name: "key";
1295
- readonly type: "string";
1296
- }];
1297
- readonly outputs: readonly [{
1298
- readonly name: "";
1299
- readonly type: "string";
1300
- }];
1301
- }, {
1302
- readonly type: "function";
1303
- readonly name: "setText";
1304
- readonly stateMutability: "nonpayable";
1305
- readonly inputs: readonly [{
1306
- readonly name: "node";
1307
- readonly type: "bytes32";
1308
- }, {
1309
- readonly name: "key";
1310
- readonly type: "string";
1311
- }, {
1312
- readonly name: "value";
1313
- readonly type: "string";
1314
- }];
1315
- readonly outputs: readonly [];
1316
- }];
1317
- functionName: "setText";
1318
- args: readonly [`0x${string}`, "id.thurin", string];
1319
- name: string;
1320
- };
1321
- /** Minimal client shape: viem's PublicClient has both. */
1322
- interface EnsTextReader {
1323
- getEnsText(args: {
1324
- name: string;
1325
- key: string;
1326
- }): Promise<string | null>;
1327
- }
1328
- /** Read a name's `id.thurin` record and compare it with the verified fingerprint. */
1329
- declare function fetchEnsHint(client: EnsTextReader, name: string, verifiedFingerprint: string | null | undefined): Promise<EnsHint>;
1330
-
1331
- /**
1332
- * EIP-712 authorizations for the registry's relayed writes (`attestFor`, `reattestFor`,
1333
- * `updateKeyFor`, `revokeFor`, `setRecordFor`). The owner signs one of these typed
1334
- * structs; anyone can then submit the matching call and pay the gas. Every field is
1335
- * bound, plus the owner's current `nonce` (read with `nonces(owner)`) and a `deadline`.
1336
- *
1337
- * The domain includes the chain id, so an authorization for one network cannot be
1338
- * replayed on another even though the registry has the same address everywhere.
1339
- */
1340
- declare const EIP712_NAME = "Thurin PGPRegistry";
1341
- declare const EIP712_VERSION = "2";
1342
- declare function registryDomain(chainId: number, verifyingContract: Hex): TypedDataDomain;
1343
- declare const AUTHORIZATION_TYPES: {
1344
- readonly Attest: readonly [{
1345
- readonly name: "owner";
1346
- readonly type: "address";
1347
- }, {
1348
- readonly name: "fingerprint";
1349
- readonly type: "bytes";
1350
- }, {
1351
- readonly name: "pgpSignature";
1352
- readonly type: "bytes";
1353
- }, {
1354
- readonly name: "pgpPublicKey";
1355
- readonly type: "bytes";
1356
- }, {
1357
- readonly name: "nonce";
1358
- readonly type: "uint256";
1359
- }, {
1360
- readonly name: "deadline";
1361
- readonly type: "uint256";
1362
- }];
1363
- readonly Reattest: readonly [{
1364
- readonly name: "owner";
1365
- readonly type: "address";
1366
- }, {
1367
- readonly name: "revokeIndex";
1368
- readonly type: "uint256";
1369
- }, {
1370
- readonly name: "fingerprint";
1371
- readonly type: "bytes";
1372
- }, {
1373
- readonly name: "pgpSignature";
1374
- readonly type: "bytes";
1375
- }, {
1376
- readonly name: "pgpPublicKey";
1377
- readonly type: "bytes";
1378
- }, {
1379
- readonly name: "nonce";
1380
- readonly type: "uint256";
1381
- }, {
1382
- readonly name: "deadline";
1383
- readonly type: "uint256";
1384
- }];
1385
- readonly UpdateKey: readonly [{
1386
- readonly name: "owner";
1387
- readonly type: "address";
1388
- }, {
1389
- readonly name: "index";
1390
- readonly type: "uint256";
1391
- }, {
1392
- readonly name: "pgpPublicKey";
1393
- readonly type: "bytes";
1394
- }, {
1395
- readonly name: "nonce";
1396
- readonly type: "uint256";
1397
- }, {
1398
- readonly name: "deadline";
1399
- readonly type: "uint256";
1400
- }];
1401
- readonly Revoke: readonly [{
1402
- readonly name: "owner";
1403
- readonly type: "address";
1404
- }, {
1405
- readonly name: "index";
1406
- readonly type: "uint256";
1407
- }, {
1408
- readonly name: "nonce";
1409
- readonly type: "uint256";
1410
- }, {
1411
- readonly name: "deadline";
1412
- readonly type: "uint256";
1413
- }];
1414
- readonly SetRecord: readonly [{
1415
- readonly name: "owner";
1416
- readonly type: "address";
1417
- }, {
1418
- readonly name: "index";
1419
- readonly type: "uint256";
1420
- }, {
1421
- readonly name: "kind";
1422
- readonly type: "bytes32";
1423
- }, {
1424
- readonly name: "value";
1425
- readonly type: "bytes";
1426
- }, {
1427
- readonly name: "nonce";
1428
- readonly type: "uint256";
1429
- }, {
1430
- readonly name: "deadline";
1431
- readonly type: "uint256";
1432
- }];
1433
- };
1434
- type AuthorizationAction = keyof typeof AUTHORIZATION_TYPES;
1435
- interface Common {
1436
- owner: Hex;
1437
- nonce: bigint;
1438
- deadline: bigint;
1439
- }
1440
- type AttestAuthorization = Common & {
1441
- fingerprint: string;
1442
- pgpSignature: string;
1443
- pgpPublicKey: string;
1444
- };
1445
- type ReattestAuthorization = AttestAuthorization & {
1446
- revokeIndex: bigint;
1447
- };
1448
- type UpdateKeyAuthorization = Common & {
1449
- index: bigint;
1450
- pgpPublicKey: string;
1451
- };
1452
- type RevokeAuthorization = Common & {
1453
- index: bigint;
1454
- };
1455
- type SetRecordAuthorization = Common & {
1456
- index: bigint;
1457
- kind: Hex;
1458
- value: Hex;
1459
- };
1460
- /**
1461
- * Build the object to pass to viem/wagmi `signTypedData`. `fingerprint` is the hex
1462
- * fingerprint; `pgpSignature` / `pgpPublicKey` are the armored text exactly as they
1463
- * will be submitted (they are hashed as UTF-8 bytes).
1464
- */
1465
- declare function attestTypedData(chainId: number, registry: Hex, a: AttestAuthorization): {
1466
- domain: TypedDataDomain;
1467
- types: {
1468
- Attest: readonly [{
1469
- readonly name: "owner";
1470
- readonly type: "address";
1471
- }, {
1472
- readonly name: "fingerprint";
1473
- readonly type: "bytes";
1474
- }, {
1475
- readonly name: "pgpSignature";
1476
- readonly type: "bytes";
1477
- }, {
1478
- readonly name: "pgpPublicKey";
1479
- readonly type: "bytes";
1480
- }, {
1481
- readonly name: "nonce";
1482
- readonly type: "uint256";
1483
- }, {
1484
- readonly name: "deadline";
1485
- readonly type: "uint256";
1486
- }];
1487
- };
1488
- primaryType: "Attest";
1489
- message: {
1490
- owner: `0x${string}`;
1491
- fingerprint: `0x${string}`;
1492
- pgpSignature: `0x${string}`;
1493
- pgpPublicKey: `0x${string}`;
1494
- nonce: bigint;
1495
- deadline: bigint;
1496
- };
1497
- };
1498
- declare function reattestTypedData(chainId: number, registry: Hex, a: ReattestAuthorization): {
1499
- domain: TypedDataDomain;
1500
- types: {
1501
- Reattest: readonly [{
1502
- readonly name: "owner";
1503
- readonly type: "address";
1504
- }, {
1505
- readonly name: "revokeIndex";
1506
- readonly type: "uint256";
1507
- }, {
1508
- readonly name: "fingerprint";
1509
- readonly type: "bytes";
1510
- }, {
1511
- readonly name: "pgpSignature";
1512
- readonly type: "bytes";
1513
- }, {
1514
- readonly name: "pgpPublicKey";
1515
- readonly type: "bytes";
1516
- }, {
1517
- readonly name: "nonce";
1518
- readonly type: "uint256";
1519
- }, {
1520
- readonly name: "deadline";
1521
- readonly type: "uint256";
1522
- }];
1523
- };
1524
- primaryType: "Reattest";
1525
- message: {
1526
- revokeIndex: bigint;
1527
- owner: `0x${string}`;
1528
- fingerprint: `0x${string}`;
1529
- pgpSignature: `0x${string}`;
1530
- pgpPublicKey: `0x${string}`;
1531
- nonce: bigint;
1532
- deadline: bigint;
1533
- };
1534
- };
1535
- declare function updateKeyTypedData(chainId: number, registry: Hex, a: UpdateKeyAuthorization): {
1536
- domain: TypedDataDomain;
1537
- types: {
1538
- UpdateKey: readonly [{
1539
- readonly name: "owner";
1540
- readonly type: "address";
1541
- }, {
1542
- readonly name: "index";
1543
- readonly type: "uint256";
1544
- }, {
1545
- readonly name: "pgpPublicKey";
1546
- readonly type: "bytes";
1547
- }, {
1548
- readonly name: "nonce";
1549
- readonly type: "uint256";
1550
- }, {
1551
- readonly name: "deadline";
1552
- readonly type: "uint256";
1553
- }];
1554
- };
1555
- primaryType: "UpdateKey";
1556
- message: {
1557
- owner: `0x${string}`;
1558
- index: bigint;
1559
- pgpPublicKey: `0x${string}`;
1560
- nonce: bigint;
1561
- deadline: bigint;
1562
- };
1563
- };
1564
- declare function revokeTypedData(chainId: number, registry: Hex, a: RevokeAuthorization): {
1565
- domain: TypedDataDomain;
1566
- types: {
1567
- Revoke: readonly [{
1568
- readonly name: "owner";
1569
- readonly type: "address";
1570
- }, {
1571
- readonly name: "index";
1572
- readonly type: "uint256";
1573
- }, {
1574
- readonly name: "nonce";
1575
- readonly type: "uint256";
1576
- }, {
1577
- readonly name: "deadline";
1578
- readonly type: "uint256";
1579
- }];
2168
+ nativeCurrency: {
2169
+ readonly name: "Ether";
2170
+ readonly symbol: "ETH";
2171
+ readonly decimals: 18;
1580
2172
  };
1581
- primaryType: "Revoke";
1582
- message: {
1583
- owner: `0x${string}`;
1584
- index: bigint;
1585
- nonce: bigint;
1586
- deadline: bigint;
2173
+ experimental_preconfirmationTime?: number | undefined | undefined;
2174
+ rpcUrls: {
2175
+ readonly default: {
2176
+ readonly http: readonly ["https://eth.merkle.io"];
2177
+ };
1587
2178
  };
2179
+ sourceId?: number | undefined | undefined;
2180
+ testnet?: boolean | undefined | undefined;
2181
+ custom?: Record<string, unknown> | undefined;
2182
+ extendSchema?: Record<string, unknown> | undefined;
2183
+ fees?: viem.ChainFees<undefined> | undefined;
2184
+ formatters?: undefined;
2185
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
2186
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2187
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
2188
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2189
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
2190
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
2191
+ }] | undefined;
2192
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
2193
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
1588
2194
  };
1589
- declare function setRecordTypedData(chainId: number, registry: Hex, a: SetRecordAuthorization): {
1590
- domain: TypedDataDomain;
1591
- types: {
1592
- SetRecord: readonly [{
1593
- readonly name: "owner";
1594
- readonly type: "address";
1595
- }, {
1596
- readonly name: "index";
1597
- readonly type: "uint256";
1598
- }, {
1599
- readonly name: "kind";
1600
- readonly type: "bytes32";
1601
- }, {
1602
- readonly name: "value";
1603
- readonly type: "bytes";
1604
- }, {
1605
- readonly name: "nonce";
1606
- readonly type: "uint256";
1607
- }, {
1608
- readonly name: "deadline";
1609
- readonly type: "uint256";
1610
- }];
1611
- };
1612
- primaryType: "SetRecord";
1613
- message: {
1614
- owner: `0x${string}`;
1615
- index: bigint;
1616
- kind: `0x${string}`;
1617
- value: `0x${string}`;
1618
- nonce: bigint;
1619
- deadline: bigint;
2195
+
2196
+ /** Any client with viem's `readContract` (a viem PublicClient, or a stub in tests). */
2197
+ interface ClaimReader {
2198
+ readContract(args: any): Promise<unknown>;
2199
+ }
2200
+ type Address = `0x${string}`;
2201
+ /** How many of the newest claims `readClaims` reads and verifies by default. */
2202
+ declare const CLAIM_LIMIT = 50;
2203
+ /**
2204
+ * An address's claims, oldest first: every row from `claimsOf`, and for the newest `limit` the
2205
+ * stored key and signature, verified. Older claims come back with `verification: null` (not read):
2206
+ * an address can hold 65,535 claims, and each one checked costs two reads and a signature check.
2207
+ * A failed `claimsOf` read throws; a failed key or signature read leaves that claim unverified.
2208
+ */
2209
+ declare function readClaims(client: ClaimReader, owner: Address, { registry, limit }?: {
2210
+ registry?: Address;
2211
+ limit?: number;
2212
+ }): Promise<Attestation[]>;
2213
+ /** Where an address's key stands. verified: the newest active claim that verifies · not-counted: the
2214
+ * newest active claim, none verify (its `verification` says why) · inactive: only ended claims, the
2215
+ * newest · none: never claimed. */
2216
+ type KeyStanding = {
2217
+ kind: 'verified' | 'not-counted' | 'inactive';
2218
+ claim: Attestation;
2219
+ } | {
2220
+ kind: 'none';
2221
+ claim: null;
2222
+ };
2223
+ declare function keyStanding(claims: readonly Attestation[]): KeyStanding;
2224
+ /**
2225
+ * Every address that ever claimed a key, found by fingerprint (`ownersOf`) or long key ID
2226
+ * (`fingerprintsForKeyId`, then `ownersOf`). A key ID can match more than one key, so each owner
2227
+ * comes with the fingerprint it claimed. Malformed input finds nothing.
2228
+ */
2229
+ declare function findOwners(client: ClaimReader, key: {
2230
+ fingerprint: string;
2231
+ } | {
2232
+ keyId: string;
2233
+ }, { registry }?: {
2234
+ registry?: Address;
2235
+ }): Promise<{
2236
+ owner: Address;
2237
+ fingerprint: string;
2238
+ }[]>;
2239
+
2240
+ /** Why an identity can't take an encrypted message. */
2241
+ type EncryptRefusal = 'no-claim' | 'unverified' | 'no-encryption-subkey' | 'encryption-subkey-expired';
2242
+ interface EncryptionKey {
2243
+ ok: true;
2244
+ /** The claim that counts; its key is the one to encrypt to. */
2245
+ claim: Attestation;
2246
+ /** The claim's armored public key. */
2247
+ key: string;
2248
+ /** The key or subkey openpgp will encrypt to. */
2249
+ subkey: {
2250
+ fingerprint: string;
2251
+ algorithm: string;
2252
+ expires: string | null;
1620
2253
  };
2254
+ /** Unix seconds: when this key arrived on the identity (the claim's creation). */
2255
+ addedAt: number;
2256
+ /** Added within `recentDays`: a stolen wallet can only bring in a new key through a new claim. */
2257
+ changedRecently: boolean;
2258
+ }
2259
+ type EncryptionKeyResult = EncryptionKey | {
2260
+ ok: false;
2261
+ reason: EncryptRefusal;
2262
+ claim: Attestation | null;
2263
+ expired?: string | null;
1621
2264
  };
1622
- /** The digest the registry recovers the signer from — handy for tests and CLIs. */
1623
- declare function authorizationDigest(typedData: ReturnType<typeof attestTypedData | typeof reattestTypedData | typeof updateKeyTypedData | typeof revokeTypedData | typeof setRecordTypedData>): Hex;
1624
- /** `bytes32 kind` for a record from a human-readable name, e.g. recordKind('thurin.vouch'). */
1625
- declare function recordKind(name: string): Hex;
2265
+ /**
2266
+ * The key to encrypt to for an address, from its claims: only the claim that counts (`keyStanding`),
2267
+ * and only while an encryption key or subkey is valid. An unverified claim could be someone else's
2268
+ * fake claim for the address, so it is never used.
2269
+ */
2270
+ declare function encryptionKeyFor(claims: readonly Attestation[], { now, recentDays }?: {
2271
+ now?: number;
2272
+ recentDays?: number;
2273
+ }): Promise<EncryptionKeyResult>;
2274
+ /** One plain sentence for a refusal, for the page and the CLI alike. */
2275
+ declare function encryptRefusalText(r: Extract<EncryptionKeyResult, {
2276
+ ok: false;
2277
+ }>, formatDate?: (iso: string | null | undefined) => string): string;
2278
+ /** The warning to show above Encrypt when the key arrived recently; null otherwise. */
2279
+ declare function keyChangedText(k: EncryptionKey, now?: number): string | null;
2280
+ /**
2281
+ * Encrypt text or a file to a public key, with the kit's openpgp config. The recipient is hidden by
2282
+ * default (key ID zero, like gpg's --throw-keyids), so an intercepted message doesn't name its
2283
+ * recipient; their software tries each of their keys. Text comes back armored; a file as bytes.
2284
+ */
2285
+ declare function encryptTo(key: PgpInput, data: string | Uint8Array, { filename, armor, hideRecipient, date }?: {
2286
+ filename?: string;
2287
+ armor?: boolean;
2288
+ hideRecipient?: boolean;
2289
+ date?: Date;
2290
+ }): Promise<string | Uint8Array>;
2291
+
2292
+ /** Each custom error the registry can revert with, as a sentence to show people. From the contract's NatSpec. */
2293
+ declare const CONTRACT_ERROR_TEXT: Record<string, string>;
2294
+ /** The registry's custom error name inside a viem error, following `cause` down; null when it isn't a contract revert. */
2295
+ declare function contractErrorName(err: unknown): string | null;
2296
+ /** The sentence for a registry revert inside a viem error, or null when it isn't one. */
2297
+ declare function contractErrorText(err: unknown): string | null;
1626
2298
 
1627
2299
  /**
1628
- * Records: one small value per claim per kind, set only by the owner (or by anyone holding
1629
- * the owner's `setRecordFor` authorization), readable by anyone, clearable. The contract looks
1630
- * a record up by kind and cannot list them, so readers ask for the kinds they know.
2300
+ * Records: named text values on a claim, set only by the owner (or with the owner's
2301
+ * `setRecordFor` permission), readable by anyone, clearable. `recordsOf(owner, index)` lists them.
1631
2302
  *
1632
- * Conventions: kind = keccak256("thurin.<name>"); simple kinds are UTF-8 text, structured
1633
- * kinds small JSON with a `v`, encrypted kinds an armored PGP message; readers ignore unknown
1634
- * fields. Third parties use reverse-dot names (`com.example.thing`) without asking. 1 KB max.
2303
+ * Conventions: simple kinds are text, structured kinds small JSON with a `v`, encrypted kinds an
2304
+ * armored PGP message; readers ignore unknown fields. Third parties use reverse-dot names
2305
+ * (`com.example.thing`) without asking. 1 KB max.
1635
2306
  */
1636
2307
  declare const MAX_RECORD_BYTES = 1024;
2308
+ /** Longest record name, `thurin.` included. */
2309
+ declare const MAX_KIND_BYTES = 31;
1637
2310
  /** `thurin.` is the default namespace: kindName('canary') === 'thurin.canary'. Dotted names pass through. */
1638
2311
  declare function kindName(input: string): string;
1639
- /** Every kind Thurin defines. `thurin.pointer` is the Thurin Labs release list (CLI only; not shown on identity pages). */
1640
- declare const KNOWN_KINDS: readonly ["thurin.railgun", "thurin.security", "thurin.successor", "thurin.affiliation", "thurin.canary", "thurin.private", "thurin.disclosure", "thurin.pointer"];
2312
+ /** The full record name for `input`, or throws with the registry's rule (a-z 0-9 - . only, 31 bytes). */
2313
+ declare function checkKindName(input: string): string;
2314
+ /** `value` unchanged, or throws if it is over the registry's 1 KB. An empty value clears the record. */
2315
+ declare function checkRecordValue(value: string): string;
2316
+ /** Every kind Thurin defines, in the order an identity page shows them. */
2317
+ declare const KNOWN_KINDS: readonly ["thurin.railgun", "thurin.security", "thurin.successor", "thurin.affiliation", "thurin.canary", "thurin.releases", "thurin.private", "thurin.disclosure"];
1641
2318
  type KnownKind = (typeof KNOWN_KINDS)[number];
1642
- /** The kinds an identity page shows, in display order. */
1643
- declare const IDENTITY_KINDS: readonly KnownKind[];
1644
- declare function encodeRecord(value: string): Hex;
1645
- declare function decodeRecord(hex: Hex): string;
1646
- interface PointerEntry {
2319
+ interface ReleaseEntry {
1647
2320
  name: string;
1648
2321
  sha256: string;
1649
2322
  date: string;
1650
2323
  url?: string;
1651
2324
  }
1652
- interface PointerRecord {
2325
+ interface ReleasesRecord {
1653
2326
  v: 1;
1654
- releases: PointerEntry[];
2327
+ releases: ReleaseEntry[];
1655
2328
  }
1656
- declare function parsePointer(text: string): PointerRecord;
2329
+ declare function parseReleases(text: string): ReleasesRecord;
1657
2330
  /** Add a release, newest first; drop the oldest until it fits the 1 KB slot. */
1658
- declare function addPointer(existing: PointerRecord | null, entry: PointerEntry): {
1659
- record: PointerRecord;
1660
- dropped: PointerEntry[];
2331
+ declare function addRelease(existing: ReleasesRecord | null, entry: ReleaseEntry): {
2332
+ record: ReleasesRecord;
2333
+ dropped: ReleaseEntry[];
1661
2334
  };
1662
- declare function renderPointer(p: PointerRecord): string;
2335
+ declare function renderReleases(p: ReleasesRecord): string;
1663
2336
  /** A record as the identity page shows it: what was stored, and what it means if it parses. */
1664
2337
  interface ParsedRecord {
1665
2338
  kind: string;
@@ -1698,8 +2371,8 @@ type RecordData = {
1698
2371
  type: 'encrypted';
1699
2372
  recipients: number | null;
1700
2373
  } | {
1701
- type: 'pointer';
1702
- releases: PointerEntry[];
2374
+ type: 'releases';
2375
+ releases: ReleaseEntry[];
1703
2376
  } | {
1704
2377
  type: 'text';
1705
2378
  };
@@ -1712,133 +2385,33 @@ type RecordData = {
1712
2385
  declare function parseRecord(kind: string, text: string, opts?: {
1713
2386
  armoredKey?: string;
1714
2387
  }): Promise<ParsedRecord>;
1715
- /** Minimal client shape: viem's PublicClient has it. */
2388
+ /** Anything with viem's `readContract`, such as a viem `PublicClient`. */
1716
2389
  interface RecordReader {
1717
- readContract(args: {
1718
- address: `0x${string}`;
1719
- abi: unknown;
1720
- functionName: 'record';
1721
- args: readonly [`0x${string}`, bigint, Hex];
1722
- }): Promise<unknown>;
1723
- }
1724
- /**
1725
- * Read and parse the given kinds on one claim. Kinds with no record are left out.
1726
- * `registry` is the contract address; pass the kit's REGISTRY_ABI.
1727
- */
1728
- declare function fetchRecords(client: RecordReader, registry: `0x${string}`, abi: unknown, owner: `0x${string}`, index: number | bigint, kinds?: readonly string[], opts?: {
1729
- armoredKey?: string;
1730
- }): Promise<ParsedRecord[]>;
1731
-
1732
- declare function identifyProof(notation: Notation): Proof | null;
1733
- declare function displayUrl(proof: Proof): string;
1734
- declare function proofHref(proof: Proof): string | null;
1735
- declare function proofSecondaryHref(proof: Proof): string | null;
1736
- /**
1737
- * Farcaster proofs are read from a Farcaster node's HTTP API (`/v1/userNameProofByName`,
1738
- * `/v1/castsByFid`). The default is Quilibrium's public Hypersnap node, which needs no key and
1739
- * allows browser requests; it sees the visitor's IP and which account was checked. Point
1740
- * `farcasterHub` at your own node to avoid that, or pass a Neynar key to use Neynar's hub.
1741
- */
1742
- declare const FARCASTER_HUB = "https://haatz.quilibrium.com";
1743
- interface ProofOptions {
1744
- /** A Farcaster node's HTTP API base URL. Default: FARCASTER_HUB (keyless). */
1745
- farcasterHub?: string;
1746
- /** Optional: read Farcaster through Neynar's hub with this key instead. */
1747
- neynarApiKey?: string;
2390
+ readContract(args: any): Promise<unknown>;
1748
2391
  }
1749
2392
  /**
1750
- * Check one proof. The third argument is options; a plain string is still accepted as a
1751
- * Neynar API key (the pre-1.3.7 signature).
1752
- */
1753
- declare function verifyProof(proof: Proof, fingerprint: string, opts?: ProofOptions | string): Promise<PGPVerification>;
1754
-
1755
- declare function parsePgpKey(armoredKey: string): Promise<PGPKeyInfo | null>;
1756
- /**
1757
- * Verify a clearsigned message against an armored public key, the way gpg does: the signing
1758
- * key (or subkey) must be valid *now* — bound to this primary, unrevoked, unexpired — and the
1759
- * signature must be sound. We deliberately do not ask openpgp.verify(), which also demands
1760
- * the key was valid at the instant the signature was made. Thurin's update flow tells people
1761
- * to `export-minimal` after editing notations, which keeps only the newest self-certification;
1762
- * when that postdates the signature (Ben's own key, 2026-09-14: notations edited 16 minutes
1763
- * after signing), openpgp.verify() reports "Could not find valid self-signature" for a
1764
- * signature gpg verifies fine. A key that has since been revoked or expired still fails here.
1765
- * These are internals the .d.ts does not expose (the signature packet list, the
1766
- * CRLF-normalised text, LiteralDataPacket.setText); they are stable across openpgp.js 6 and
1767
- * exercised by the real-data tests in attestation.test.ts.
1768
- *
1769
- * Used for attestation statements and for clearsigned records such as `thurin.canary`.
2393
+ * The records on one claim, from `recordsOf`, as `{ kind, text }` pairs. `kinds` picks and orders
2394
+ * them (full names); `null` keeps every record in the order it was first set.
1770
2395
  */
1771
- declare function verifyClearsigned({ armoredKey, clearsigned }: {
1772
- armoredKey: string;
1773
- clearsigned: string;
1774
- }): Promise<{
1775
- verified: boolean;
1776
- reason?: string;
2396
+ declare function pickRecords(names: readonly string[], values: readonly string[], kinds?: readonly string[] | null): {
2397
+ kind: string;
1777
2398
  text: string;
1778
- }>;
1779
- declare function verifyAttestation({ pgpPublicKey, pgpSignature, fingerprint, ethAddress, }: {
1780
- pgpPublicKey: string | null;
1781
- pgpSignature: string | null;
1782
- fingerprint: string;
1783
- ethAddress: string;
1784
- }): Promise<PGPVerification>;
1785
- interface StrippedKey {
1786
- /** Armored public key containing only the non-email user IDs. */
1787
- armored: string;
1788
- /** User IDs kept (no `@`). */
1789
- kept: string[];
1790
- /** User IDs removed (contained an `@`). */
1791
- removed: string[];
1792
- }
1793
- /**
1794
- * Remove every user ID that contains an email address, keeping the rest (and
1795
- * their self-certifications, so proof notations on a non-email user ID survive).
1796
- * Returns null when nothing would remain — openpgp needs at least one
1797
- * self-certified user ID to verify signatures, so such a key must not be
1798
- * published. The key material and subkeys are untouched; the fingerprint is
1799
- * unchanged.
1800
- */
1801
- declare function stripEmailUserIDs(armoredKey: string): Promise<StrippedKey | null>;
1802
- /** True when any user ID on the key contains an email address. */
1803
- declare function hasEmailUserID(armoredKey: string): Promise<boolean>;
1804
-
1805
- /**
1806
- * EFP social graph for an address. Followers are counted by EFP for any address,
1807
- * whether or not it has published a list of its own; following and top-8 exist
1808
- * only when it has (its "primary list"). An address with followers but no list
1809
- * — a project account that has never followed anyone — is still on EFP.
1810
- */
1811
- declare function fetchEFPGraph(address: string): Promise<EFPGraph | null>;
1812
-
2399
+ }[];
1813
2400
  /**
1814
- * Why an identity couldn't be shown. A dead RPC must never read as a fact about the identity:
1815
- * viem's ENS lookup turns an unreachable RPC into "no address", and a failed registry read
1816
- * leaves every count at zero. So when a lookup comes back empty or fails, the hook asks the
1817
- * RPC for the block number and this decides which it was.
1818
- *
1819
- * - `rpc`: the RPC didn't answer; nothing about the identity is known
1820
- * - `not-found`: the RPC answered and the ENS name has no address
1821
- * - `read`: the RPC answers, but a registry read failed anyway
2401
+ * The records an identity page shows, in page order: Thurin's kinds in their display order, then
2402
+ * everyone else's in the order they were first set on the claim. Empty values are left out.
1822
2403
  */
1823
- type IdentityErrorKind = 'rpc' | 'not-found' | 'read';
1824
- interface IdentityLookupState {
1825
- /** An ENS name was looked up and came back with no address. */
1826
- ensEmpty: boolean;
1827
- /** The ENS lookup itself errored. */
1828
- ensFailed: boolean;
1829
- /** Reading the owner's claims from the registry errored. */
1830
- claimsFailed: boolean;
1831
- /** The block-number probe: undefined while not run or running. */
1832
- rpcAnswered: boolean | undefined;
1833
- }
1834
- /** Whether the lookup needs the RPC probe to be understood. */
1835
- declare function needsRpcProbe(s: Omit<IdentityLookupState, 'rpcAnswered'>): boolean;
1836
- /** null when nothing went wrong or the probe hasn't answered yet. */
1837
- declare function identityErrorKind(s: IdentityLookupState): IdentityErrorKind | null;
1838
- declare const IDENTITY_ERROR_TEXT: Record<IdentityErrorKind, string>;
2404
+ declare function pageRecords(names: readonly string[], values: readonly string[]): {
2405
+ kind: string;
2406
+ text: string;
2407
+ }[];
2408
+ /** Read and parse the records on one claim. Pass the kit's REGISTRY_ABI. */
2409
+ declare function fetchRecords(client: RecordReader, registry: `0x${string}`, abi: unknown, owner: `0x${string}`, index: number | bigint, kinds?: readonly string[] | null, opts?: {
2410
+ armoredKey?: string;
2411
+ }): Promise<ParsedRecord[]>;
1839
2412
 
1840
2413
  /**
1841
- * Plain words for a claim's state, shared by thurin.id, the CLI, and anyone embedding the kit,
2414
+ * Plain words for a claim's state, shared by thurin.id, the CLI, and anyone using the kit,
1842
2415
  * so every surface says the same thing. `sentence` is for visitors; `fix` is for the owner only
1843
2416
  * (thurin.id shows it when the connected wallet owns the claim).
1844
2417
  */
@@ -1855,6 +2428,11 @@ interface ClaimCheckText {
1855
2428
  }
1856
2429
  /** Label, visitor sentence, and owner fix for a verification result. */
1857
2430
  declare function claimCheckText(v: PGPVerification, formatDate?: (iso: string | null | undefined) => string): ClaimCheckText;
2431
+ /**
2432
+ * What's wrong with a key before it's published, when the problem is the key and not the signature;
2433
+ * null otherwise. For the attest screen and CLI, where claimCheckText's claim wording doesn't fit.
2434
+ */
2435
+ declare function keyProblemText(v: PGPVerification, formatDate?: (iso: string | null | undefined) => string): ClaimCheckText | null;
1858
2436
  /** Days until a verified claim's key (or signing subkey) expires, when that is within `withinDays`. */
1859
2437
  declare function expiresSoon(v: PGPVerification | null | undefined, now?: number, withinDays?: number): {
1860
2438
  days: number;
@@ -1870,36 +2448,27 @@ type ClaimFate = {
1870
2448
  } | {
1871
2449
  state: 'revoked';
1872
2450
  at: number;
2451
+ reason?: string;
1873
2452
  } | {
1874
2453
  state: 'replaced';
1875
2454
  at: number;
1876
2455
  by: number;
2456
+ compromised?: boolean;
1877
2457
  };
1878
- /**
1879
- * Active, revoked, or replaced, for each of one owner's claims (keyed by index). `reattest`
1880
- * revokes and attests in one transaction, so a claim revoked at the very second a newer claim
1881
- * of the same owner was created counts as replaced by it. The contract has no "superseded"
1882
- * event; this reads the same fact from the stored timestamps.
1883
- */
1884
- declare function claimFates(claims: Pick<Attestation, 'index' | 'createdAt' | 'revokedAt'>[]): Map<number, ClaimFate>;
1885
- /** "Revoked by its owner on Oct 3, 2026." / "Replaced by claim #2 on Oct 3, 2026." */
2458
+ /** Active, revoked (with the owner's reason), or replaced, for each of one owner's claims (keyed by index). */
2459
+ declare function claimFates(claims: Pick<Attestation, 'index' | 'revokedAt' | 'state' | 'replacedBy' | 'revokeReason'>[]): Map<number, ClaimFate>;
2460
+ /** "Revoked by its owner on Oct 3, 2026 (compromised)." / "Replaced by claim #2 on Oct 3, 2026." */
1886
2461
  declare function claimFateText(fate: ClaimFate, formatDate?: (seconds: number) => string): string | null;
1887
2462
 
1888
2463
  /**
1889
- * ENS avatars without the tracking pixel. The `avatar` record is a link the name's owner
1890
- * chooses; loading an ordinary https:// link would tell that owner's server the IP and time of
1891
- * everyone who views the card. So only images the owner can't watch load: content-addressed
1892
- * ones (IPFS, Arweave, inline data, or an NFT whose metadata and image are content-addressed)
1893
- * through public gateways, and euc.li, ENS Labs' host behind the ENS app's avatar upload
1894
- * (most avatars; ENS Labs sees the view, the name's owner doesn't). Anything else: no avatar.
1895
- */
1896
- /**
1897
- * Public IPFS gateways, tried in order: when an image fails to load, the next one is used.
1898
- * Any single public gateway can stop serving (ipfs.io and dweb.link went "service worker only"
1899
- * in 2026), so there is always a fallback. The gateway sees the viewer's IP and the avatar.
2464
+ * ENS avatars without the tracking pixel: an ordinary https:// avatar tells the name's owner who
2465
+ * viewed the page. Only images the owner can't watch load: content-addressed ones (IPFS, Arweave,
2466
+ * inline data, an NFT whose metadata and image are content-addressed) through public gateways, and
2467
+ * euc.li, where the ENS app stores uploads (ENS Labs sees the view; the owner doesn't).
1900
2468
  */
2469
+ /** Public IPFS gateways, tried in order when an image fails: any one can stop serving. Each sees the viewer's IP. */
1901
2470
  declare const IPFS_GATEWAYS: readonly ["https://ipfs.filebase.io/ipfs/", "https://gateway.pinata.cloud/ipfs/"];
1902
- /** The first gateway in IPFS_GATEWAYS (kept for code that imported it before 1.3.6). */
2471
+ /** The first gateway in IPFS_GATEWAYS. */
1903
2472
  declare const IPFS_GATEWAY: string;
1904
2473
  declare const ARWEAVE_GATEWAY = "https://arweave.net/";
1905
2474
  /** An image URL safe to load for `uri`, or null if loading it would reach a host the owner picked. */
@@ -1941,21 +2510,112 @@ declare const NFT_AVATAR_ABI: readonly [{
1941
2510
  */
1942
2511
  declare function nftAvatarImage(tokenUri: string, tokenId: bigint, fetchFn?: typeof fetch): Promise<string | null>;
1943
2512
 
1944
- /** Normalize a fingerprint to lowercase hex with no prefix or spaces. Returns null if malformed. */
1945
- declare function normalizeFingerprint(input: string): string | null;
1946
- /** Fingerprint → the raw `bytes` argument the v2 registry takes (0x-prefixed, 20 or 32 bytes). */
1947
- declare function fingerprintToBytes(fingerprint: string): Hex;
1948
- /** Raw `bytes` from the registry → lowercase hex fingerprint without 0x. */
1949
- declare function bytesToFingerprint(bytes: Hex | string): string;
1950
- /** keccak256 of the raw fingerprint bytes — the `fingerprintHash` the registry indexes by. */
1951
- declare function fingerprintHash(fingerprint: string): Hex;
1952
2513
  /**
1953
- * The long key ID as the `bytes8` the registry indexes by. Per RFC 9580 §5.5.4 it is the
1954
- * low-order 8 bytes of a v4 (20-byte) fingerprint and the high-order 8 bytes of a v6
1955
- * (32-byte) fingerprint — the same value `gpg --keyid-format long` prints.
2514
+ * The `id.thurin` ENS text record points a name at the key its address claimed. A hint, not trust:
2515
+ * readers still resolve the name and verify the claim. It's an ENSIP-5 service key (reverse-dot of
2516
+ * thurin.id), so per ENSIP-18 the value is bare: the fingerprint, uppercase.
1956
2517
  */
1957
- declare function keyIdOf(fingerprint: string): Hex;
1958
- /** A 16-hex long key ID (spaces/0x tolerated) → `bytes8`. */
1959
- declare function keyIdToBytes(keyId: string): Hex | null;
2518
+ declare const ENS_HINT_KEY: "id.thurin";
2519
+ type EnsHintState = 'match' | 'unset' | 'mismatch';
2520
+ interface EnsHint {
2521
+ key: typeof ENS_HINT_KEY;
2522
+ state: EnsHintState;
2523
+ /** The raw record value, or null when the name carries no record. */
2524
+ record: string | null;
2525
+ /** The record as a lowercase fingerprint, or null when it does not parse as one. */
2526
+ fingerprint: string | null;
2527
+ /** The verified claim's fingerprint (lowercase) the record is compared against, if any. */
2528
+ expected: string | null;
2529
+ /** Why a record does not match; absent for `match` and `unset`. */
2530
+ reason?: string;
2531
+ }
2532
+ /**
2533
+ * Compare a name's `id.thurin` record with the fingerprint the registry verifies for the
2534
+ * name's address. Parsing is lenient (case, spaces, 0x); what Thurin writes is strict.
2535
+ */
2536
+ declare function ensHintFor(record: string | null | undefined, verifiedFingerprint: string | null | undefined): EnsHint;
2537
+ /** The value Thurin writes: the fingerprint, uppercase, bare. */
2538
+ declare function ensHintValue(fingerprint: string): string;
2539
+ /** The `text` / `setText` pair every ENS resolver speaks (ENSIP-5); the same on ENSv2. */
2540
+ declare const ENS_TEXT_RESOLVER_ABI: readonly [{
2541
+ readonly type: "function";
2542
+ readonly name: "text";
2543
+ readonly stateMutability: "view";
2544
+ readonly inputs: readonly [{
2545
+ readonly name: "node";
2546
+ readonly type: "bytes32";
2547
+ }, {
2548
+ readonly name: "key";
2549
+ readonly type: "string";
2550
+ }];
2551
+ readonly outputs: readonly [{
2552
+ readonly name: "";
2553
+ readonly type: "string";
2554
+ }];
2555
+ }, {
2556
+ readonly type: "function";
2557
+ readonly name: "setText";
2558
+ readonly stateMutability: "nonpayable";
2559
+ readonly inputs: readonly [{
2560
+ readonly name: "node";
2561
+ readonly type: "bytes32";
2562
+ }, {
2563
+ readonly name: "key";
2564
+ readonly type: "string";
2565
+ }, {
2566
+ readonly name: "value";
2567
+ readonly type: "string";
2568
+ }];
2569
+ readonly outputs: readonly [];
2570
+ }];
2571
+ /**
2572
+ * The `setText` call that links a name to a claim. Look up the resolver at write time
2573
+ * (`client.getEnsResolver({ name })`): on ENSv2 every account has its own.
2574
+ */
2575
+ declare function ensHintWrite(name: string, fingerprint: string): {
2576
+ abi: readonly [{
2577
+ readonly type: "function";
2578
+ readonly name: "text";
2579
+ readonly stateMutability: "view";
2580
+ readonly inputs: readonly [{
2581
+ readonly name: "node";
2582
+ readonly type: "bytes32";
2583
+ }, {
2584
+ readonly name: "key";
2585
+ readonly type: "string";
2586
+ }];
2587
+ readonly outputs: readonly [{
2588
+ readonly name: "";
2589
+ readonly type: "string";
2590
+ }];
2591
+ }, {
2592
+ readonly type: "function";
2593
+ readonly name: "setText";
2594
+ readonly stateMutability: "nonpayable";
2595
+ readonly inputs: readonly [{
2596
+ readonly name: "node";
2597
+ readonly type: "bytes32";
2598
+ }, {
2599
+ readonly name: "key";
2600
+ readonly type: "string";
2601
+ }, {
2602
+ readonly name: "value";
2603
+ readonly type: "string";
2604
+ }];
2605
+ readonly outputs: readonly [];
2606
+ }];
2607
+ functionName: "setText";
2608
+ args: readonly [`0x${string}`, "id.thurin", string];
2609
+ name: string;
2610
+ };
2611
+ /** Minimal client shape: viem's PublicClient has both. */
2612
+ interface EnsTextReader {
2613
+ getEnsText(args: {
2614
+ name: string;
2615
+ key: string;
2616
+ }): Promise<string | null>;
2617
+ }
2618
+ /** Read a name's `id.thurin` record and compare it with the verified fingerprint. */
2619
+ declare function fetchEnsHint(client: EnsTextReader, name: string, verifiedFingerprint: string | null | undefined): Promise<EnsHint>;
1960
2620
 
1961
- export { ARWEAVE_GATEWAY, AUTHORIZATION_TYPES, type AttestAuthorization, type Attestation, type AuthorizationAction, CLAIM_CHECK_LABEL, type ClaimCheckKind, type ClaimCheckText, type ClaimFate, type EFPGraph, EIP712_NAME, EIP712_VERSION, ENS_HINT_KEY, ENS_TEXT_RESOLVER_ABI, type EnsHint, type EnsHintState, type EnsTextReader, FARCASTER_HUB, IDENTITY_ERROR_TEXT, IDENTITY_KINDS, IPFS_GATEWAY, IPFS_GATEWAYS, type IdentityErrorKind, type IdentityKitConfig, type IdentityLookupState, KNOWN_KINDS, type KnownKind, MAX_RECORD_BYTES, NETWORKS, NFT_AVATAR_ABI, type NetworkName, type NftAvatar, type Notation, type PGPKeyInfo, type PGPVerification, type ParsedRecord, type PointerEntry, type PointerRecord, type Proof, type ProofOptions, type ProofResult, REGISTRY_ABI, REGISTRY_ADDRESS, type ReattestAuthorization, type RecordData, type RecordReader, type RegistryDeployment, type RevokeAuthorization, type SetRecordAuthorization, type StrippedKey, type SubkeyInfo, type Theme, type ThurinIdentity, type UpdateKeyAuthorization, addPointer, attestTypedData, authorizationDigest, avatarFallbacks, avatarUrl, bytesToFingerprint, chainFor, claimCheckText, claimFateText, claimFates, decodeRecord, displayUrl, encodeRecord, ensHintFor, ensHintValue, ensHintWrite, expiresSoon, expiresSoonText, fetchEFPGraph, fetchEnsHint, fetchRecords, fingerprintHash, fingerprintToBytes, formatClaimDate, getRegistry, hasEmailUserID, identifyProof, identityErrorKind, isNetworkName, keyIdOf, keyIdToBytes, kindName, needsRpcProbe, nftAvatarImage, normalizeFingerprint, parseNftAvatar, parsePgpKey, parsePointer, parseRecord, proofHref, proofSecondaryHref, reattestTypedData, recordKind, registryDomain, renderPointer, revokeTypedData, setRecordTypedData, stripEmailUserIDs, updateKeyTypedData, verifyAttestation, verifyClearsigned, verifyProof };
2621
+ export { ARWEAVE_GATEWAY, AUTHORIZATION_TYPES, type AttestAuthorization, type Attestation, type AuthorizationAction, CLAIM_CHECK_LABEL, CLAIM_LIMIT, CONTRACT_ERROR_TEXT, type ClaimCheckKind, type ClaimCheckText, type ClaimFate, type ClaimReader, EIP712_NAME, EIP712_VERSION, ENS_HINT_KEY, ENS_TEXT_RESOLVER_ABI, type EncryptRefusal, type EncryptionKey, type EncryptionKeyResult, type EnsHint, type EnsHintState, type EnsTextReader, FARCASTER_HUB, IPFS_GATEWAY, IPFS_GATEWAYS, KNOWN_KINDS, type KeyStanding, type KnownKind, type LeanKey, MAX_KIND_BYTES, MAX_RECORD_BYTES, type MarkCompromisedAuthorization, NETWORKS, NFT_AVATAR_ABI, type NetworkName, type NftAvatar, type Notation, OWNER_REVOKE_REASONS, type PGPKeyInfo, type PGPVerification, type ParsedRecord, type PgpInput, type Proof, type ProofOptions, REGISTRY_ABI, REGISTRY_ADDRESS, REVOKE_REASONS, type ReattestAuthorization, type RecordData, type RecordReader, type RegistryDeployment, type ReleaseEntry, type ReleasesRecord, type RevokeAuthorization, type RevokeReason, type SetRecordAuthorization, type SshKey, type StrippedKey, type SubkeyInfo, type UpdateKeyAuthorization, addRelease, attestTypedData, authorizationDigest, avatarFallbacks, avatarUrl, bytesToFingerprint, chainFor, checkKindName, checkRecordValue, claimCheckText, claimFateText, claimFates, claimSignature, contractErrorName, contractErrorText, displayUrl, encryptRefusalText, encryptTo, encryptionKeyFor, ensHintFor, ensHintValue, ensHintWrite, expiresSoon, expiresSoonText, fetchEnsHint, fetchRecords, findOwners, fingerprintHash, fingerprintToBytes, formatClaimDate, getRegistry, hasEmailUserID, identifyProof, isNetworkName, keyChangedText, keyIdOf, keyIdToBytes, keyProblemText, keyStanding, kindName, leanKey, markCompromisedTypedData, nftAvatarImage, normalizeFingerprint, pageRecords, parseNftAvatar, parsePgpKey, parseRecord, parseReleases, payloadText, pickRecords, proofHref, proofSecondaryHref, readClaims, reattestTypedData, recordKind, registryDomain, renderReleases, revokeTypedData, sameFingerprint, setRecordTypedData, signatureEmail, sshKeys, statementText, stripEmailUserIDs, updateKeyTypedData, verifyAttestation, verifyClearsigned, verifyProof, verifyStatementSignature };