@thurinlabs/identity-kit 1.3.7 → 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/README.md +44 -359
- package/dist/{chunk-ROQWHCHP.js → chunk-AAJWERE2.js} +2275 -1005
- package/dist/chunk-DJGCYNJN.cjs +3377 -0
- package/dist/core.cjs +58 -3
- package/dist/core.d.cts +1615 -892
- package/dist/core.d.ts +1615 -892
- package/dist/core.js +79 -24
- package/dist/index.cjs +39 -459
- package/dist/index.d.cts +1 -83
- package/dist/index.d.ts +1 -83
- package/dist/index.js +79 -499
- package/package.json +5 -22
- package/dist/chunk-OIE72R6J.cjs +0 -2107
- package/dist/chunk-OIE72R6J.cjs.map +0 -1
- package/dist/chunk-ROQWHCHP.js.map +0 -1
- package/dist/core.cjs.map +0 -1
- package/dist/core.js.map +0 -1
- package/dist/embed.global.js +0 -32151
- package/dist/embed.global.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.css +0 -185
- package/dist/index.css.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/core.d.ts
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
|
|
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,17 +11,39 @@ interface Attestation {
|
|
|
11
11
|
revoked: boolean;
|
|
12
12
|
/** Unix seconds, or null while active. */
|
|
13
13
|
revokedAt: number | null;
|
|
14
|
-
/**
|
|
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
|
|
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
|
|
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
|
}
|
|
29
|
+
/** Why a claim does or doesn't count, in a form a UI can word (see CLAIM_CHECK_LABEL). */
|
|
30
|
+
type ClaimCheckKind = 'verified' | 'expired' | 'signing-key-expired' | 'revoked' | 'compromised' | 'signing-key-revoked' | 'unsupported' | 'bad-signature';
|
|
22
31
|
interface PGPVerification {
|
|
23
32
|
verified: boolean;
|
|
33
|
+
/** The underlying library message, for logs; show `kind` to people instead. */
|
|
24
34
|
reason?: string;
|
|
35
|
+
/** Why a claim doesn't count, or `verified`. */
|
|
36
|
+
kind?: ClaimCheckKind;
|
|
37
|
+
/** ISO date that goes with `kind`: when the key or subkey expired or was revoked. */
|
|
38
|
+
at?: string | null;
|
|
39
|
+
/** The owner's revocation reason (their words, or the reason code's name). */
|
|
40
|
+
revocationReason?: string | null;
|
|
41
|
+
/** Fingerprint of the key or subkey that made the claim's signature. */
|
|
42
|
+
signingKey?: string | null;
|
|
43
|
+
/** When verified: the earlier expiry of the key and the signing subkey (ISO), or null if neither expires. */
|
|
44
|
+
expiresAt?: string | null;
|
|
45
|
+
/** For `unsupported`: the algorithm, e.g. "DSA 2048". */
|
|
46
|
+
algorithm?: string | null;
|
|
25
47
|
}
|
|
26
48
|
interface PGPKeyInfo {
|
|
27
49
|
fingerprint: string;
|
|
@@ -31,11 +53,19 @@ interface PGPKeyInfo {
|
|
|
31
53
|
expires: string | null;
|
|
32
54
|
notations: Notation[];
|
|
33
55
|
subkeys: SubkeyInfo[];
|
|
56
|
+
/** A key or subkey that can take encrypted messages is valid now. */
|
|
57
|
+
canEncrypt: boolean;
|
|
34
58
|
}
|
|
35
59
|
interface SubkeyInfo {
|
|
36
60
|
algorithm: string;
|
|
37
61
|
created: string | null;
|
|
38
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;
|
|
39
69
|
}
|
|
40
70
|
interface Notation {
|
|
41
71
|
name: string;
|
|
@@ -52,139 +82,510 @@ interface Proof {
|
|
|
52
82
|
castHash?: string;
|
|
53
83
|
domain?: string;
|
|
54
84
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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;
|
|
64
102
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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[];
|
|
70
148
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
errorKind: 'rpc' | 'not-found' | 'read' | null;
|
|
87
|
-
/** Re-run the lookups (for a "Try again" button). */
|
|
88
|
-
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[];
|
|
89
164
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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;
|
|
102
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[]>;
|
|
103
212
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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";
|
|
112
259
|
}];
|
|
113
|
-
readonly
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
readonly
|
|
121
|
-
readonly
|
|
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";
|
|
122
284
|
}];
|
|
123
|
-
readonly
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
readonly
|
|
131
|
-
readonly
|
|
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";
|
|
132
300
|
}];
|
|
133
|
-
readonly
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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";
|
|
140
309
|
readonly type: "string";
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
readonly stateMutability: "view";
|
|
144
|
-
}, {
|
|
145
|
-
readonly type: "function";
|
|
146
|
-
readonly name: "MAX_KEY_BYTES";
|
|
147
|
-
readonly inputs: readonly [];
|
|
148
|
-
readonly outputs: readonly [{
|
|
149
|
-
readonly name: "";
|
|
310
|
+
}, {
|
|
311
|
+
readonly name: "nonce";
|
|
150
312
|
readonly type: "uint256";
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
readonly stateMutability: "view";
|
|
154
|
-
}, {
|
|
155
|
-
readonly type: "function";
|
|
156
|
-
readonly name: "MAX_RECORD_BYTES";
|
|
157
|
-
readonly inputs: readonly [];
|
|
158
|
-
readonly outputs: readonly [{
|
|
159
|
-
readonly name: "";
|
|
313
|
+
}, {
|
|
314
|
+
readonly name: "deadline";
|
|
160
315
|
readonly type: "uint256";
|
|
161
|
-
readonly internalType: "uint256";
|
|
162
316
|
}];
|
|
163
|
-
readonly
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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";
|
|
170
334
|
readonly type: "uint256";
|
|
171
|
-
readonly internalType: "uint256";
|
|
172
335
|
}];
|
|
173
|
-
readonly
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
readonly
|
|
181
|
-
readonly
|
|
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";
|
|
182
348
|
}];
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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 [];
|
|
188
589
|
readonly outputs: readonly [{
|
|
189
590
|
readonly name: "";
|
|
190
591
|
readonly type: "bytes32";
|
|
@@ -193,7 +594,7 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
193
594
|
readonly stateMutability: "view";
|
|
194
595
|
}, {
|
|
195
596
|
readonly type: "function";
|
|
196
|
-
readonly name: "
|
|
597
|
+
readonly name: "DOMAIN_SEPARATOR";
|
|
197
598
|
readonly inputs: readonly [];
|
|
198
599
|
readonly outputs: readonly [{
|
|
199
600
|
readonly name: "";
|
|
@@ -203,56 +604,58 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
203
604
|
readonly stateMutability: "view";
|
|
204
605
|
}, {
|
|
205
606
|
readonly type: "function";
|
|
206
|
-
readonly name: "
|
|
607
|
+
readonly name: "EIP712_NAME";
|
|
207
608
|
readonly inputs: readonly [];
|
|
208
609
|
readonly outputs: readonly [{
|
|
209
610
|
readonly name: "";
|
|
210
|
-
readonly type: "
|
|
211
|
-
readonly internalType: "
|
|
611
|
+
readonly type: "string";
|
|
612
|
+
readonly internalType: "string";
|
|
212
613
|
}];
|
|
213
614
|
readonly stateMutability: "view";
|
|
214
615
|
}, {
|
|
215
616
|
readonly type: "function";
|
|
216
|
-
readonly name: "
|
|
617
|
+
readonly name: "EIP712_VERSION";
|
|
217
618
|
readonly inputs: readonly [];
|
|
218
619
|
readonly outputs: readonly [{
|
|
219
620
|
readonly name: "";
|
|
220
|
-
readonly type: "
|
|
221
|
-
readonly internalType: "
|
|
621
|
+
readonly type: "string";
|
|
622
|
+
readonly internalType: "string";
|
|
222
623
|
}];
|
|
223
624
|
readonly stateMutability: "view";
|
|
224
625
|
}, {
|
|
225
626
|
readonly type: "function";
|
|
226
|
-
readonly name: "
|
|
627
|
+
readonly name: "EPOCH";
|
|
227
628
|
readonly inputs: readonly [];
|
|
228
629
|
readonly outputs: readonly [{
|
|
229
630
|
readonly name: "";
|
|
230
|
-
readonly type: "
|
|
231
|
-
readonly internalType: "
|
|
631
|
+
readonly type: "uint256";
|
|
632
|
+
readonly internalType: "uint256";
|
|
232
633
|
}];
|
|
233
634
|
readonly stateMutability: "view";
|
|
234
635
|
}, {
|
|
235
636
|
readonly type: "function";
|
|
236
|
-
readonly name: "
|
|
237
|
-
readonly inputs: readonly [
|
|
238
|
-
|
|
637
|
+
readonly name: "MARK_COMPROMISED_TYPEHASH";
|
|
638
|
+
readonly inputs: readonly [];
|
|
639
|
+
readonly outputs: readonly [{
|
|
640
|
+
readonly name: "";
|
|
239
641
|
readonly type: "bytes32";
|
|
240
642
|
readonly internalType: "bytes32";
|
|
241
643
|
}];
|
|
644
|
+
readonly stateMutability: "view";
|
|
645
|
+
}, {
|
|
646
|
+
readonly type: "function";
|
|
647
|
+
readonly name: "MAX_CLAIMS_PER_OWNER";
|
|
648
|
+
readonly inputs: readonly [];
|
|
242
649
|
readonly outputs: readonly [{
|
|
243
650
|
readonly name: "";
|
|
244
|
-
readonly type: "
|
|
245
|
-
readonly internalType: "
|
|
651
|
+
readonly type: "uint256";
|
|
652
|
+
readonly internalType: "uint256";
|
|
246
653
|
}];
|
|
247
654
|
readonly stateMutability: "view";
|
|
248
655
|
}, {
|
|
249
656
|
readonly type: "function";
|
|
250
|
-
readonly name: "
|
|
251
|
-
readonly inputs: readonly [
|
|
252
|
-
readonly name: "fingerprintHash";
|
|
253
|
-
readonly type: "bytes32";
|
|
254
|
-
readonly internalType: "bytes32";
|
|
255
|
-
}];
|
|
657
|
+
readonly name: "MAX_KEY_BYTES";
|
|
658
|
+
readonly inputs: readonly [];
|
|
256
659
|
readonly outputs: readonly [{
|
|
257
660
|
readonly name: "";
|
|
258
661
|
readonly type: "uint256";
|
|
@@ -261,24 +664,144 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
261
664
|
readonly stateMutability: "view";
|
|
262
665
|
}, {
|
|
263
666
|
readonly type: "function";
|
|
264
|
-
readonly name: "
|
|
265
|
-
readonly inputs: readonly [
|
|
266
|
-
|
|
267
|
-
readonly
|
|
268
|
-
readonly internalType: "bytes32";
|
|
269
|
-
}, {
|
|
270
|
-
readonly name: "start";
|
|
667
|
+
readonly name: "MAX_KIND_BYTES";
|
|
668
|
+
readonly inputs: readonly [];
|
|
669
|
+
readonly outputs: readonly [{
|
|
670
|
+
readonly name: "";
|
|
271
671
|
readonly type: "uint256";
|
|
272
672
|
readonly internalType: "uint256";
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
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";
|
|
276
682
|
readonly internalType: "uint256";
|
|
277
683
|
}];
|
|
684
|
+
readonly stateMutability: "view";
|
|
685
|
+
}, {
|
|
686
|
+
readonly type: "function";
|
|
687
|
+
readonly name: "MAX_RECORD_BYTES";
|
|
688
|
+
readonly inputs: readonly [];
|
|
278
689
|
readonly outputs: readonly [{
|
|
279
|
-
readonly name: "
|
|
280
|
-
readonly type: "
|
|
281
|
-
readonly internalType: "
|
|
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";
|
|
282
805
|
}];
|
|
283
806
|
readonly stateMutability: "view";
|
|
284
807
|
}, {
|
|
@@ -289,11 +812,11 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
289
812
|
readonly type: "bytes";
|
|
290
813
|
readonly internalType: "bytes";
|
|
291
814
|
}, {
|
|
292
|
-
readonly name: "
|
|
815
|
+
readonly name: "signature";
|
|
293
816
|
readonly type: "bytes";
|
|
294
817
|
readonly internalType: "bytes";
|
|
295
818
|
}, {
|
|
296
|
-
readonly name: "
|
|
819
|
+
readonly name: "key";
|
|
297
820
|
readonly type: "bytes";
|
|
298
821
|
readonly internalType: "bytes";
|
|
299
822
|
}];
|
|
@@ -315,11 +838,11 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
315
838
|
readonly type: "bytes";
|
|
316
839
|
readonly internalType: "bytes";
|
|
317
840
|
}, {
|
|
318
|
-
readonly name: "
|
|
841
|
+
readonly name: "signature";
|
|
319
842
|
readonly type: "bytes";
|
|
320
843
|
readonly internalType: "bytes";
|
|
321
844
|
}, {
|
|
322
|
-
readonly name: "
|
|
845
|
+
readonly name: "key";
|
|
323
846
|
readonly type: "bytes";
|
|
324
847
|
readonly internalType: "bytes";
|
|
325
848
|
}, {
|
|
@@ -327,7 +850,7 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
327
850
|
readonly type: "uint256";
|
|
328
851
|
readonly internalType: "uint256";
|
|
329
852
|
}, {
|
|
330
|
-
readonly name: "
|
|
853
|
+
readonly name: "permission";
|
|
331
854
|
readonly type: "bytes";
|
|
332
855
|
readonly internalType: "bytes";
|
|
333
856
|
}];
|
|
@@ -339,7 +862,76 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
339
862
|
readonly stateMutability: "nonpayable";
|
|
340
863
|
}, {
|
|
341
864
|
readonly type: "function";
|
|
342
|
-
readonly name: "
|
|
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";
|
|
343
935
|
readonly inputs: readonly [{
|
|
344
936
|
readonly name: "owner";
|
|
345
937
|
readonly type: "address";
|
|
@@ -353,17 +945,21 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
353
945
|
readonly stateMutability: "view";
|
|
354
946
|
}, {
|
|
355
947
|
readonly type: "function";
|
|
356
|
-
readonly name: "
|
|
948
|
+
readonly name: "claimsOf";
|
|
357
949
|
readonly inputs: readonly [{
|
|
358
950
|
readonly name: "owner";
|
|
359
951
|
readonly type: "address";
|
|
360
952
|
readonly internalType: "address";
|
|
361
953
|
}];
|
|
362
954
|
readonly outputs: readonly [{
|
|
363
|
-
readonly name: "";
|
|
955
|
+
readonly name: "out";
|
|
364
956
|
readonly type: "tuple[]";
|
|
365
|
-
readonly internalType: "struct PGPRegistry.
|
|
957
|
+
readonly internalType: "struct PGPRegistry.ClaimView[]";
|
|
366
958
|
readonly components: readonly [{
|
|
959
|
+
readonly name: "index";
|
|
960
|
+
readonly type: "uint256";
|
|
961
|
+
readonly internalType: "uint256";
|
|
962
|
+
}, {
|
|
367
963
|
readonly name: "fingerprint";
|
|
368
964
|
readonly type: "bytes";
|
|
369
965
|
readonly internalType: "bytes";
|
|
@@ -375,24 +971,28 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
375
971
|
readonly name: "revokedAt";
|
|
376
972
|
readonly type: "uint64";
|
|
377
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";
|
|
378
986
|
}, {
|
|
379
987
|
readonly name: "messageVersion";
|
|
380
988
|
readonly type: "uint8";
|
|
381
989
|
readonly internalType: "uint8";
|
|
382
|
-
}, {
|
|
383
|
-
readonly name: "keyPtr";
|
|
384
|
-
readonly type: "address";
|
|
385
|
-
readonly internalType: "address";
|
|
386
|
-
}, {
|
|
387
|
-
readonly name: "sigPtr";
|
|
388
|
-
readonly type: "address";
|
|
389
|
-
readonly internalType: "address";
|
|
390
990
|
}];
|
|
391
991
|
}];
|
|
392
992
|
readonly stateMutability: "view";
|
|
393
993
|
}, {
|
|
394
994
|
readonly type: "function";
|
|
395
|
-
readonly name: "
|
|
995
|
+
readonly name: "claimsOfRange";
|
|
396
996
|
readonly inputs: readonly [{
|
|
397
997
|
readonly name: "owner";
|
|
398
998
|
readonly type: "address";
|
|
@@ -409,8 +1009,12 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
409
1009
|
readonly outputs: readonly [{
|
|
410
1010
|
readonly name: "out";
|
|
411
1011
|
readonly type: "tuple[]";
|
|
412
|
-
readonly internalType: "struct PGPRegistry.
|
|
1012
|
+
readonly internalType: "struct PGPRegistry.ClaimView[]";
|
|
413
1013
|
readonly components: readonly [{
|
|
1014
|
+
readonly name: "index";
|
|
1015
|
+
readonly type: "uint256";
|
|
1016
|
+
readonly internalType: "uint256";
|
|
1017
|
+
}, {
|
|
414
1018
|
readonly name: "fingerprint";
|
|
415
1019
|
readonly type: "bytes";
|
|
416
1020
|
readonly internalType: "bytes";
|
|
@@ -422,27 +1026,43 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
422
1026
|
readonly name: "revokedAt";
|
|
423
1027
|
readonly type: "uint64";
|
|
424
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";
|
|
425
1041
|
}, {
|
|
426
1042
|
readonly name: "messageVersion";
|
|
427
1043
|
readonly type: "uint8";
|
|
428
1044
|
readonly internalType: "uint8";
|
|
429
|
-
}, {
|
|
430
|
-
readonly name: "keyPtr";
|
|
431
|
-
readonly type: "address";
|
|
432
|
-
readonly internalType: "address";
|
|
433
|
-
}, {
|
|
434
|
-
readonly name: "sigPtr";
|
|
435
|
-
readonly type: "address";
|
|
436
|
-
readonly internalType: "address";
|
|
437
1045
|
}];
|
|
438
1046
|
}];
|
|
439
1047
|
readonly stateMutability: "view";
|
|
440
1048
|
}, {
|
|
441
1049
|
readonly type: "function";
|
|
442
|
-
readonly name: "
|
|
443
|
-
readonly inputs: readonly [
|
|
444
|
-
|
|
445
|
-
|
|
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";
|
|
446
1066
|
}, {
|
|
447
1067
|
readonly type: "function";
|
|
448
1068
|
readonly name: "current";
|
|
@@ -460,10 +1080,14 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
460
1080
|
readonly type: "uint256";
|
|
461
1081
|
readonly internalType: "uint256";
|
|
462
1082
|
}, {
|
|
463
|
-
readonly name: "
|
|
1083
|
+
readonly name: "details";
|
|
464
1084
|
readonly type: "tuple";
|
|
465
|
-
readonly internalType: "struct PGPRegistry.
|
|
1085
|
+
readonly internalType: "struct PGPRegistry.ClaimView";
|
|
466
1086
|
readonly components: readonly [{
|
|
1087
|
+
readonly name: "index";
|
|
1088
|
+
readonly type: "uint256";
|
|
1089
|
+
readonly internalType: "uint256";
|
|
1090
|
+
}, {
|
|
467
1091
|
readonly name: "fingerprint";
|
|
468
1092
|
readonly type: "bytes";
|
|
469
1093
|
readonly internalType: "bytes";
|
|
@@ -475,35 +1099,73 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
475
1099
|
readonly name: "revokedAt";
|
|
476
1100
|
readonly type: "uint64";
|
|
477
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";
|
|
478
1114
|
}, {
|
|
479
1115
|
readonly name: "messageVersion";
|
|
480
1116
|
readonly type: "uint8";
|
|
481
1117
|
readonly internalType: "uint8";
|
|
482
|
-
}, {
|
|
483
|
-
readonly name: "keyPtr";
|
|
484
|
-
readonly type: "address";
|
|
485
|
-
readonly internalType: "address";
|
|
486
|
-
}, {
|
|
487
|
-
readonly name: "sigPtr";
|
|
488
|
-
readonly type: "address";
|
|
489
|
-
readonly internalType: "address";
|
|
490
1118
|
}];
|
|
491
1119
|
}];
|
|
492
1120
|
readonly stateMutability: "view";
|
|
493
1121
|
}, {
|
|
494
1122
|
readonly type: "function";
|
|
495
|
-
readonly name: "
|
|
496
|
-
readonly inputs: readonly [
|
|
497
|
-
readonly name: "keyId";
|
|
498
|
-
readonly type: "bytes8";
|
|
499
|
-
readonly internalType: "bytes8";
|
|
500
|
-
}];
|
|
1123
|
+
readonly name: "eip712Domain";
|
|
1124
|
+
readonly inputs: readonly [];
|
|
501
1125
|
readonly outputs: readonly [{
|
|
502
|
-
readonly name: "";
|
|
503
|
-
readonly type: "
|
|
504
|
-
readonly internalType: "
|
|
505
|
-
}
|
|
506
|
-
|
|
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";
|
|
507
1169
|
}, {
|
|
508
1170
|
readonly type: "function";
|
|
509
1171
|
readonly name: "fingerprintsForKeyIdCount";
|
|
@@ -542,7 +1204,7 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
542
1204
|
readonly stateMutability: "view";
|
|
543
1205
|
}, {
|
|
544
1206
|
readonly type: "function";
|
|
545
|
-
readonly name: "
|
|
1207
|
+
readonly name: "keyBytes";
|
|
546
1208
|
readonly inputs: readonly [{
|
|
547
1209
|
readonly name: "owner";
|
|
548
1210
|
readonly type: "address";
|
|
@@ -552,40 +1214,33 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
552
1214
|
readonly type: "uint256";
|
|
553
1215
|
readonly internalType: "uint256";
|
|
554
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
|
+
}];
|
|
555
1235
|
readonly outputs: readonly [{
|
|
556
1236
|
readonly name: "";
|
|
557
|
-
readonly type: "
|
|
558
|
-
readonly internalType: "
|
|
559
|
-
readonly components: readonly [{
|
|
560
|
-
readonly name: "fingerprint";
|
|
561
|
-
readonly type: "bytes";
|
|
562
|
-
readonly internalType: "bytes";
|
|
563
|
-
}, {
|
|
564
|
-
readonly name: "createdAt";
|
|
565
|
-
readonly type: "uint64";
|
|
566
|
-
readonly internalType: "uint64";
|
|
567
|
-
}, {
|
|
568
|
-
readonly name: "revokedAt";
|
|
569
|
-
readonly type: "uint64";
|
|
570
|
-
readonly internalType: "uint64";
|
|
571
|
-
}, {
|
|
572
|
-
readonly name: "messageVersion";
|
|
573
|
-
readonly type: "uint8";
|
|
574
|
-
readonly internalType: "uint8";
|
|
575
|
-
}, {
|
|
576
|
-
readonly name: "keyPtr";
|
|
577
|
-
readonly type: "address";
|
|
578
|
-
readonly internalType: "address";
|
|
579
|
-
}, {
|
|
580
|
-
readonly name: "sigPtr";
|
|
581
|
-
readonly type: "address";
|
|
582
|
-
readonly internalType: "address";
|
|
583
|
-
}];
|
|
1237
|
+
readonly type: "string";
|
|
1238
|
+
readonly internalType: "string";
|
|
584
1239
|
}];
|
|
585
1240
|
readonly stateMutability: "view";
|
|
586
1241
|
}, {
|
|
587
1242
|
readonly type: "function";
|
|
588
|
-
readonly name: "
|
|
1243
|
+
readonly name: "markCompromisedFor";
|
|
589
1244
|
readonly inputs: readonly [{
|
|
590
1245
|
readonly name: "owner";
|
|
591
1246
|
readonly type: "address";
|
|
@@ -594,22 +1249,36 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
594
1249
|
readonly name: "index";
|
|
595
1250
|
readonly type: "uint256";
|
|
596
1251
|
readonly internalType: "uint256";
|
|
597
|
-
}];
|
|
598
|
-
readonly outputs: readonly [{
|
|
599
|
-
readonly name: "pgpSignature";
|
|
600
|
-
readonly type: "bytes";
|
|
601
|
-
readonly internalType: "bytes";
|
|
602
1252
|
}, {
|
|
603
|
-
readonly name: "
|
|
1253
|
+
readonly name: "deadline";
|
|
1254
|
+
readonly type: "uint256";
|
|
1255
|
+
readonly internalType: "uint256";
|
|
1256
|
+
}, {
|
|
1257
|
+
readonly name: "permission";
|
|
604
1258
|
readonly type: "bytes";
|
|
605
1259
|
readonly internalType: "bytes";
|
|
606
1260
|
}];
|
|
607
|
-
readonly
|
|
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";
|
|
608
1277
|
}, {
|
|
609
1278
|
readonly type: "function";
|
|
610
1279
|
readonly name: "nonces";
|
|
611
1280
|
readonly inputs: readonly [{
|
|
612
|
-
readonly name: "";
|
|
1281
|
+
readonly name: "owner";
|
|
613
1282
|
readonly type: "address";
|
|
614
1283
|
readonly internalType: "address";
|
|
615
1284
|
}];
|
|
@@ -619,6 +1288,56 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
619
1288
|
readonly internalType: "uint256";
|
|
620
1289
|
}];
|
|
621
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";
|
|
622
1341
|
}, {
|
|
623
1342
|
readonly type: "function";
|
|
624
1343
|
readonly name: "reattest";
|
|
@@ -631,13 +1350,17 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
631
1350
|
readonly type: "bytes";
|
|
632
1351
|
readonly internalType: "bytes";
|
|
633
1352
|
}, {
|
|
634
|
-
readonly name: "
|
|
1353
|
+
readonly name: "signature";
|
|
635
1354
|
readonly type: "bytes";
|
|
636
1355
|
readonly internalType: "bytes";
|
|
637
1356
|
}, {
|
|
638
|
-
readonly name: "
|
|
1357
|
+
readonly name: "key";
|
|
639
1358
|
readonly type: "bytes";
|
|
640
1359
|
readonly internalType: "bytes";
|
|
1360
|
+
}, {
|
|
1361
|
+
readonly name: "keepRecords";
|
|
1362
|
+
readonly type: "bool";
|
|
1363
|
+
readonly internalType: "bool";
|
|
641
1364
|
}];
|
|
642
1365
|
readonly outputs: readonly [{
|
|
643
1366
|
readonly name: "index";
|
|
@@ -661,19 +1384,23 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
661
1384
|
readonly type: "bytes";
|
|
662
1385
|
readonly internalType: "bytes";
|
|
663
1386
|
}, {
|
|
664
|
-
readonly name: "
|
|
1387
|
+
readonly name: "signature";
|
|
665
1388
|
readonly type: "bytes";
|
|
666
1389
|
readonly internalType: "bytes";
|
|
667
1390
|
}, {
|
|
668
|
-
readonly name: "
|
|
1391
|
+
readonly name: "key";
|
|
669
1392
|
readonly type: "bytes";
|
|
670
1393
|
readonly internalType: "bytes";
|
|
1394
|
+
}, {
|
|
1395
|
+
readonly name: "keepRecords";
|
|
1396
|
+
readonly type: "bool";
|
|
1397
|
+
readonly internalType: "bool";
|
|
671
1398
|
}, {
|
|
672
1399
|
readonly name: "deadline";
|
|
673
1400
|
readonly type: "uint256";
|
|
674
1401
|
readonly internalType: "uint256";
|
|
675
1402
|
}, {
|
|
676
|
-
readonly name: "
|
|
1403
|
+
readonly name: "permission";
|
|
677
1404
|
readonly type: "bytes";
|
|
678
1405
|
readonly internalType: "bytes";
|
|
679
1406
|
}];
|
|
@@ -685,7 +1412,7 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
685
1412
|
readonly stateMutability: "nonpayable";
|
|
686
1413
|
}, {
|
|
687
1414
|
readonly type: "function";
|
|
688
|
-
readonly name: "
|
|
1415
|
+
readonly name: "recordText";
|
|
689
1416
|
readonly inputs: readonly [{
|
|
690
1417
|
readonly name: "owner";
|
|
691
1418
|
readonly type: "address";
|
|
@@ -696,13 +1423,35 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
696
1423
|
readonly internalType: "uint256";
|
|
697
1424
|
}, {
|
|
698
1425
|
readonly name: "kind";
|
|
699
|
-
readonly type: "
|
|
700
|
-
readonly internalType: "
|
|
1426
|
+
readonly type: "string";
|
|
1427
|
+
readonly internalType: "string";
|
|
701
1428
|
}];
|
|
702
1429
|
readonly outputs: readonly [{
|
|
703
1430
|
readonly name: "";
|
|
704
|
-
readonly type: "
|
|
705
|
-
readonly internalType: "
|
|
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[]";
|
|
706
1455
|
}];
|
|
707
1456
|
readonly stateMutability: "view";
|
|
708
1457
|
}, {
|
|
@@ -712,6 +1461,10 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
712
1461
|
readonly name: "index";
|
|
713
1462
|
readonly type: "uint256";
|
|
714
1463
|
readonly internalType: "uint256";
|
|
1464
|
+
}, {
|
|
1465
|
+
readonly name: "reason";
|
|
1466
|
+
readonly type: "string";
|
|
1467
|
+
readonly internalType: "string";
|
|
715
1468
|
}];
|
|
716
1469
|
readonly outputs: readonly [];
|
|
717
1470
|
readonly stateMutability: "nonpayable";
|
|
@@ -726,12 +1479,16 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
726
1479
|
readonly name: "index";
|
|
727
1480
|
readonly type: "uint256";
|
|
728
1481
|
readonly internalType: "uint256";
|
|
1482
|
+
}, {
|
|
1483
|
+
readonly name: "reason";
|
|
1484
|
+
readonly type: "string";
|
|
1485
|
+
readonly internalType: "string";
|
|
729
1486
|
}, {
|
|
730
1487
|
readonly name: "deadline";
|
|
731
1488
|
readonly type: "uint256";
|
|
732
1489
|
readonly internalType: "uint256";
|
|
733
1490
|
}, {
|
|
734
|
-
readonly name: "
|
|
1491
|
+
readonly name: "permission";
|
|
735
1492
|
readonly type: "bytes";
|
|
736
1493
|
readonly internalType: "bytes";
|
|
737
1494
|
}];
|
|
@@ -746,12 +1503,12 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
746
1503
|
readonly internalType: "uint256";
|
|
747
1504
|
}, {
|
|
748
1505
|
readonly name: "kind";
|
|
749
|
-
readonly type: "
|
|
750
|
-
readonly internalType: "
|
|
1506
|
+
readonly type: "string";
|
|
1507
|
+
readonly internalType: "string";
|
|
751
1508
|
}, {
|
|
752
1509
|
readonly name: "value";
|
|
753
|
-
readonly type: "
|
|
754
|
-
readonly internalType: "
|
|
1510
|
+
readonly type: "string";
|
|
1511
|
+
readonly internalType: "string";
|
|
755
1512
|
}];
|
|
756
1513
|
readonly outputs: readonly [];
|
|
757
1514
|
readonly stateMutability: "nonpayable";
|
|
@@ -768,23 +1525,81 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
768
1525
|
readonly internalType: "uint256";
|
|
769
1526
|
}, {
|
|
770
1527
|
readonly name: "kind";
|
|
771
|
-
readonly type: "
|
|
772
|
-
readonly internalType: "
|
|
1528
|
+
readonly type: "string";
|
|
1529
|
+
readonly internalType: "string";
|
|
773
1530
|
}, {
|
|
774
1531
|
readonly name: "value";
|
|
775
|
-
readonly type: "
|
|
776
|
-
readonly internalType: "
|
|
1532
|
+
readonly type: "string";
|
|
1533
|
+
readonly internalType: "string";
|
|
777
1534
|
}, {
|
|
778
1535
|
readonly name: "deadline";
|
|
779
1536
|
readonly type: "uint256";
|
|
780
1537
|
readonly internalType: "uint256";
|
|
781
1538
|
}, {
|
|
782
|
-
readonly name: "
|
|
1539
|
+
readonly name: "permission";
|
|
783
1540
|
readonly type: "bytes";
|
|
784
1541
|
readonly internalType: "bytes";
|
|
785
1542
|
}];
|
|
786
1543
|
readonly outputs: readonly [];
|
|
787
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";
|
|
788
1603
|
}, {
|
|
789
1604
|
readonly type: "function";
|
|
790
1605
|
readonly name: "updateKey";
|
|
@@ -793,7 +1608,7 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
793
1608
|
readonly type: "uint256";
|
|
794
1609
|
readonly internalType: "uint256";
|
|
795
1610
|
}, {
|
|
796
|
-
readonly name: "
|
|
1611
|
+
readonly name: "key";
|
|
797
1612
|
readonly type: "bytes";
|
|
798
1613
|
readonly internalType: "bytes";
|
|
799
1614
|
}];
|
|
@@ -811,7 +1626,7 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
811
1626
|
readonly type: "uint256";
|
|
812
1627
|
readonly internalType: "uint256";
|
|
813
1628
|
}, {
|
|
814
|
-
readonly name: "
|
|
1629
|
+
readonly name: "key";
|
|
815
1630
|
readonly type: "bytes";
|
|
816
1631
|
readonly internalType: "bytes";
|
|
817
1632
|
}, {
|
|
@@ -819,7 +1634,7 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
819
1634
|
readonly type: "uint256";
|
|
820
1635
|
readonly internalType: "uint256";
|
|
821
1636
|
}, {
|
|
822
|
-
readonly name: "
|
|
1637
|
+
readonly name: "permission";
|
|
823
1638
|
readonly type: "bytes";
|
|
824
1639
|
readonly internalType: "bytes";
|
|
825
1640
|
}];
|
|
@@ -849,20 +1664,15 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
849
1664
|
readonly indexed: false;
|
|
850
1665
|
readonly internalType: "bytes";
|
|
851
1666
|
}, {
|
|
852
|
-
readonly name: "
|
|
853
|
-
readonly type: "uint8";
|
|
854
|
-
readonly indexed: false;
|
|
855
|
-
readonly internalType: "uint8";
|
|
856
|
-
}, {
|
|
857
|
-
readonly name: "keyPtr";
|
|
1667
|
+
readonly name: "payload";
|
|
858
1668
|
readonly type: "address";
|
|
859
1669
|
readonly indexed: false;
|
|
860
1670
|
readonly internalType: "address";
|
|
861
1671
|
}, {
|
|
862
|
-
readonly name: "
|
|
863
|
-
readonly type: "
|
|
1672
|
+
readonly name: "messageVersion";
|
|
1673
|
+
readonly type: "uint8";
|
|
864
1674
|
readonly indexed: false;
|
|
865
|
-
readonly internalType: "
|
|
1675
|
+
readonly internalType: "uint8";
|
|
866
1676
|
}, {
|
|
867
1677
|
readonly name: "submitter";
|
|
868
1678
|
readonly type: "address";
|
|
@@ -889,12 +1699,12 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
889
1699
|
readonly indexed: true;
|
|
890
1700
|
readonly internalType: "uint256";
|
|
891
1701
|
}, {
|
|
892
|
-
readonly name: "
|
|
1702
|
+
readonly name: "oldPayload";
|
|
893
1703
|
readonly type: "address";
|
|
894
1704
|
readonly indexed: false;
|
|
895
1705
|
readonly internalType: "address";
|
|
896
1706
|
}, {
|
|
897
|
-
readonly name: "
|
|
1707
|
+
readonly name: "newPayload";
|
|
898
1708
|
readonly type: "address";
|
|
899
1709
|
readonly indexed: false;
|
|
900
1710
|
readonly internalType: "address";
|
|
@@ -934,10 +1744,20 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
934
1744
|
readonly indexed: true;
|
|
935
1745
|
readonly internalType: "uint256";
|
|
936
1746
|
}, {
|
|
937
|
-
readonly name: "
|
|
1747
|
+
readonly name: "kindHash";
|
|
938
1748
|
readonly type: "bytes32";
|
|
939
1749
|
readonly indexed: true;
|
|
940
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";
|
|
941
1761
|
}, {
|
|
942
1762
|
readonly name: "submitter";
|
|
943
1763
|
readonly type: "address";
|
|
@@ -945,6 +1765,26 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
945
1765
|
readonly internalType: "address";
|
|
946
1766
|
}];
|
|
947
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;
|
|
948
1788
|
}, {
|
|
949
1789
|
readonly type: "event";
|
|
950
1790
|
readonly name: "Revoked";
|
|
@@ -963,6 +1803,16 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
963
1803
|
readonly type: "uint256";
|
|
964
1804
|
readonly indexed: true;
|
|
965
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";
|
|
966
1816
|
}, {
|
|
967
1817
|
readonly name: "submitter";
|
|
968
1818
|
readonly type: "address";
|
|
@@ -973,11 +1823,27 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
973
1823
|
}, {
|
|
974
1824
|
readonly type: "error";
|
|
975
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";
|
|
976
1834
|
readonly inputs: readonly [];
|
|
977
1835
|
}, {
|
|
978
1836
|
readonly type: "error";
|
|
979
|
-
readonly name: "
|
|
1837
|
+
readonly name: "BadBase64";
|
|
980
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
|
+
}];
|
|
981
1847
|
}, {
|
|
982
1848
|
readonly type: "error";
|
|
983
1849
|
readonly name: "DeploymentFailed";
|
|
@@ -985,10 +1851,14 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
985
1851
|
}, {
|
|
986
1852
|
readonly type: "error";
|
|
987
1853
|
readonly name: "DuplicateActiveFingerprint";
|
|
988
|
-
readonly inputs: readonly [
|
|
1854
|
+
readonly inputs: readonly [{
|
|
1855
|
+
readonly name: "fingerprint";
|
|
1856
|
+
readonly type: "bytes";
|
|
1857
|
+
readonly internalType: "bytes";
|
|
1858
|
+
}];
|
|
989
1859
|
}, {
|
|
990
1860
|
readonly type: "error";
|
|
991
|
-
readonly name: "
|
|
1861
|
+
readonly name: "EmptyKey";
|
|
992
1862
|
readonly inputs: readonly [];
|
|
993
1863
|
}, {
|
|
994
1864
|
readonly type: "error";
|
|
@@ -997,14 +1867,42 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
997
1867
|
}, {
|
|
998
1868
|
readonly type: "error";
|
|
999
1869
|
readonly name: "IndexOutOfBounds";
|
|
1000
|
-
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
|
+
}];
|
|
1001
1879
|
}, {
|
|
1002
1880
|
readonly type: "error";
|
|
1003
|
-
readonly name: "
|
|
1004
|
-
readonly inputs: readonly [
|
|
1881
|
+
readonly name: "InvalidFingerprint";
|
|
1882
|
+
readonly inputs: readonly [{
|
|
1883
|
+
readonly name: "fingerprint";
|
|
1884
|
+
readonly type: "bytes";
|
|
1885
|
+
readonly internalType: "bytes";
|
|
1886
|
+
}];
|
|
1005
1887
|
}, {
|
|
1006
1888
|
readonly type: "error";
|
|
1007
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";
|
|
1008
1906
|
readonly inputs: readonly [];
|
|
1009
1907
|
}, {
|
|
1010
1908
|
readonly type: "error";
|
|
@@ -1012,31 +1910,125 @@ declare const REGISTRY_ABI: readonly [{
|
|
|
1012
1910
|
readonly inputs: readonly [];
|
|
1013
1911
|
}, {
|
|
1014
1912
|
readonly type: "error";
|
|
1015
|
-
readonly name: "
|
|
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";
|
|
1016
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
|
+
}];
|
|
1017
1979
|
}, {
|
|
1018
1980
|
readonly type: "error";
|
|
1019
1981
|
readonly name: "RecordTooLarge";
|
|
1020
|
-
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
|
+
}];
|
|
1021
1991
|
}, {
|
|
1022
1992
|
readonly type: "error";
|
|
1023
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";
|
|
1024
2022
|
readonly inputs: readonly [];
|
|
1025
2023
|
}];
|
|
1026
2024
|
|
|
1027
|
-
/**
|
|
1028
|
-
|
|
1029
|
-
* network. (v1 lived at 0xf7a45BC662A78a6fb417ED5f52b3766cbf13EbBb on mainnet and
|
|
1030
|
-
* is no longer read by Thurin.)
|
|
1031
|
-
*/
|
|
1032
|
-
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";
|
|
1033
2027
|
/** Networks the PGPRegistry is deployed on. `mainnet` is the default everywhere. */
|
|
1034
2028
|
type NetworkName = 'mainnet' | 'sepolia' | 'local';
|
|
1035
2029
|
interface RegistryDeployment {
|
|
1036
2030
|
chainId: number;
|
|
1037
2031
|
address: `0x${string}`;
|
|
1038
|
-
/** Block the registry was deployed in (informational; v2 needs no log scans). */
|
|
1039
|
-
deployBlock: bigint;
|
|
1040
2032
|
/** Block explorer base URL for address/tx links. Empty when there is none. */
|
|
1041
2033
|
explorerUrl: string;
|
|
1042
2034
|
/** Keyless public RPC used when no rpcUrl is configured. */
|
|
@@ -1167,484 +2159,180 @@ declare function chainFor(network?: NetworkName): {
|
|
|
1167
2159
|
};
|
|
1168
2160
|
readonly multicall3: {
|
|
1169
2161
|
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
1170
|
-
readonly blockCreated: 14353601;
|
|
1171
|
-
};
|
|
1172
|
-
};
|
|
1173
|
-
ensTlds?: readonly string[] | undefined;
|
|
1174
|
-
id: 1;
|
|
1175
|
-
name: "Ethereum";
|
|
1176
|
-
nativeCurrency: {
|
|
1177
|
-
readonly name: "Ether";
|
|
1178
|
-
readonly symbol: "ETH";
|
|
1179
|
-
readonly decimals: 18;
|
|
1180
|
-
};
|
|
1181
|
-
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
1182
|
-
rpcUrls: {
|
|
1183
|
-
readonly default: {
|
|
1184
|
-
readonly http: readonly ["https://eth.merkle.io"];
|
|
1185
|
-
};
|
|
1186
|
-
};
|
|
1187
|
-
sourceId?: number | undefined | undefined;
|
|
1188
|
-
testnet?: boolean | undefined | undefined;
|
|
1189
|
-
custom?: Record<string, unknown> | undefined;
|
|
1190
|
-
extendSchema?: Record<string, unknown> | undefined;
|
|
1191
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
1192
|
-
formatters?: undefined;
|
|
1193
|
-
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
1194
|
-
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
1195
|
-
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
1196
|
-
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
1197
|
-
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
1198
|
-
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
1199
|
-
}] | undefined;
|
|
1200
|
-
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
1201
|
-
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
1202
|
-
};
|
|
1203
|
-
|
|
1204
|
-
/**
|
|
1205
|
-
* The `id.thurin` ENS text record: a name points at the PGP key claimed on the Thurin
|
|
1206
|
-
* registry by the address the name resolves to. It is a discovery hint, not part of the
|
|
1207
|
-
* trust chain — the name owner set the address, the address signed the claim, so a reader
|
|
1208
|
-
* verifies by resolving the name and reading the registry. The record only says where to
|
|
1209
|
-
* look. `id.thurin` is a service key under ENSIP-5 (reverse-dot of thurin.id); ENSIP-18
|
|
1210
|
-
* says service-key values are bare, so the value is the 40-hex fingerprint, uppercase.
|
|
1211
|
-
*/
|
|
1212
|
-
declare const ENS_HINT_KEY: "id.thurin";
|
|
1213
|
-
type EnsHintState = 'match' | 'unset' | 'mismatch';
|
|
1214
|
-
interface EnsHint {
|
|
1215
|
-
key: typeof ENS_HINT_KEY;
|
|
1216
|
-
state: EnsHintState;
|
|
1217
|
-
/** The raw record value, or null when the name carries no record. */
|
|
1218
|
-
record: string | null;
|
|
1219
|
-
/** The record as a lowercase fingerprint, or null when it does not parse as one. */
|
|
1220
|
-
fingerprint: string | null;
|
|
1221
|
-
/** The verified claim's fingerprint (lowercase) the record is compared against, if any. */
|
|
1222
|
-
expected: string | null;
|
|
1223
|
-
/** Why a record does not match; absent for `match` and `unset`. */
|
|
1224
|
-
reason?: string;
|
|
1225
|
-
}
|
|
1226
|
-
/**
|
|
1227
|
-
* Compare a name's `id.thurin` record with the fingerprint the registry verifies for the
|
|
1228
|
-
* name's address. Parsing is lenient (case, spaces, 0x); what Thurin writes is strict.
|
|
1229
|
-
*/
|
|
1230
|
-
declare function ensHintFor(record: string | null | undefined, verifiedFingerprint: string | null | undefined): EnsHint;
|
|
1231
|
-
/** The value Thurin writes: the fingerprint, uppercase, bare. */
|
|
1232
|
-
declare function ensHintValue(fingerprint: string): string;
|
|
1233
|
-
/** The `text` / `setText` pair every ENS resolver speaks (ENSIP-5); the same on ENSv2. */
|
|
1234
|
-
declare const ENS_TEXT_RESOLVER_ABI: readonly [{
|
|
1235
|
-
readonly type: "function";
|
|
1236
|
-
readonly name: "text";
|
|
1237
|
-
readonly stateMutability: "view";
|
|
1238
|
-
readonly inputs: readonly [{
|
|
1239
|
-
readonly name: "node";
|
|
1240
|
-
readonly type: "bytes32";
|
|
1241
|
-
}, {
|
|
1242
|
-
readonly name: "key";
|
|
1243
|
-
readonly type: "string";
|
|
1244
|
-
}];
|
|
1245
|
-
readonly outputs: readonly [{
|
|
1246
|
-
readonly name: "";
|
|
1247
|
-
readonly type: "string";
|
|
1248
|
-
}];
|
|
1249
|
-
}, {
|
|
1250
|
-
readonly type: "function";
|
|
1251
|
-
readonly name: "setText";
|
|
1252
|
-
readonly stateMutability: "nonpayable";
|
|
1253
|
-
readonly inputs: readonly [{
|
|
1254
|
-
readonly name: "node";
|
|
1255
|
-
readonly type: "bytes32";
|
|
1256
|
-
}, {
|
|
1257
|
-
readonly name: "key";
|
|
1258
|
-
readonly type: "string";
|
|
1259
|
-
}, {
|
|
1260
|
-
readonly name: "value";
|
|
1261
|
-
readonly type: "string";
|
|
1262
|
-
}];
|
|
1263
|
-
readonly outputs: readonly [];
|
|
1264
|
-
}];
|
|
1265
|
-
/**
|
|
1266
|
-
* The `setText` call that links a name to a claim. The resolver address is not part of it
|
|
1267
|
-
* on purpose: look it up at write time (`client.getEnsResolver({ name })`) — on ENSv2 every
|
|
1268
|
-
* account has its own resolver, so a cached or hardcoded one is the wrong contract.
|
|
1269
|
-
*/
|
|
1270
|
-
declare function ensHintWrite(name: string, fingerprint: string): {
|
|
1271
|
-
abi: readonly [{
|
|
1272
|
-
readonly type: "function";
|
|
1273
|
-
readonly name: "text";
|
|
1274
|
-
readonly stateMutability: "view";
|
|
1275
|
-
readonly inputs: readonly [{
|
|
1276
|
-
readonly name: "node";
|
|
1277
|
-
readonly type: "bytes32";
|
|
1278
|
-
}, {
|
|
1279
|
-
readonly name: "key";
|
|
1280
|
-
readonly type: "string";
|
|
1281
|
-
}];
|
|
1282
|
-
readonly outputs: readonly [{
|
|
1283
|
-
readonly name: "";
|
|
1284
|
-
readonly type: "string";
|
|
1285
|
-
}];
|
|
1286
|
-
}, {
|
|
1287
|
-
readonly type: "function";
|
|
1288
|
-
readonly name: "setText";
|
|
1289
|
-
readonly stateMutability: "nonpayable";
|
|
1290
|
-
readonly inputs: readonly [{
|
|
1291
|
-
readonly name: "node";
|
|
1292
|
-
readonly type: "bytes32";
|
|
1293
|
-
}, {
|
|
1294
|
-
readonly name: "key";
|
|
1295
|
-
readonly type: "string";
|
|
1296
|
-
}, {
|
|
1297
|
-
readonly name: "value";
|
|
1298
|
-
readonly type: "string";
|
|
1299
|
-
}];
|
|
1300
|
-
readonly outputs: readonly [];
|
|
1301
|
-
}];
|
|
1302
|
-
functionName: "setText";
|
|
1303
|
-
args: readonly [`0x${string}`, "id.thurin", string];
|
|
1304
|
-
name: string;
|
|
1305
|
-
};
|
|
1306
|
-
/** Minimal client shape: viem's PublicClient has both. */
|
|
1307
|
-
interface EnsTextReader {
|
|
1308
|
-
getEnsText(args: {
|
|
1309
|
-
name: string;
|
|
1310
|
-
key: string;
|
|
1311
|
-
}): Promise<string | null>;
|
|
1312
|
-
}
|
|
1313
|
-
/** Read a name's `id.thurin` record and compare it with the verified fingerprint. */
|
|
1314
|
-
declare function fetchEnsHint(client: EnsTextReader, name: string, verifiedFingerprint: string | null | undefined): Promise<EnsHint>;
|
|
1315
|
-
|
|
1316
|
-
/**
|
|
1317
|
-
* EIP-712 authorizations for the registry's relayed writes (`attestFor`, `reattestFor`,
|
|
1318
|
-
* `updateKeyFor`, `revokeFor`, `setRecordFor`). The owner signs one of these typed
|
|
1319
|
-
* structs; anyone can then submit the matching call and pay the gas. Every field is
|
|
1320
|
-
* bound, plus the owner's current `nonce` (read with `nonces(owner)`) and a `deadline`.
|
|
1321
|
-
*
|
|
1322
|
-
* The domain includes the chain id, so an authorization for one network cannot be
|
|
1323
|
-
* replayed on another even though the registry has the same address everywhere.
|
|
1324
|
-
*/
|
|
1325
|
-
declare const EIP712_NAME = "Thurin PGPRegistry";
|
|
1326
|
-
declare const EIP712_VERSION = "2";
|
|
1327
|
-
declare function registryDomain(chainId: number, verifyingContract: Hex): TypedDataDomain;
|
|
1328
|
-
declare const AUTHORIZATION_TYPES: {
|
|
1329
|
-
readonly Attest: readonly [{
|
|
1330
|
-
readonly name: "owner";
|
|
1331
|
-
readonly type: "address";
|
|
1332
|
-
}, {
|
|
1333
|
-
readonly name: "fingerprint";
|
|
1334
|
-
readonly type: "bytes";
|
|
1335
|
-
}, {
|
|
1336
|
-
readonly name: "pgpSignature";
|
|
1337
|
-
readonly type: "bytes";
|
|
1338
|
-
}, {
|
|
1339
|
-
readonly name: "pgpPublicKey";
|
|
1340
|
-
readonly type: "bytes";
|
|
1341
|
-
}, {
|
|
1342
|
-
readonly name: "nonce";
|
|
1343
|
-
readonly type: "uint256";
|
|
1344
|
-
}, {
|
|
1345
|
-
readonly name: "deadline";
|
|
1346
|
-
readonly type: "uint256";
|
|
1347
|
-
}];
|
|
1348
|
-
readonly Reattest: readonly [{
|
|
1349
|
-
readonly name: "owner";
|
|
1350
|
-
readonly type: "address";
|
|
1351
|
-
}, {
|
|
1352
|
-
readonly name: "revokeIndex";
|
|
1353
|
-
readonly type: "uint256";
|
|
1354
|
-
}, {
|
|
1355
|
-
readonly name: "fingerprint";
|
|
1356
|
-
readonly type: "bytes";
|
|
1357
|
-
}, {
|
|
1358
|
-
readonly name: "pgpSignature";
|
|
1359
|
-
readonly type: "bytes";
|
|
1360
|
-
}, {
|
|
1361
|
-
readonly name: "pgpPublicKey";
|
|
1362
|
-
readonly type: "bytes";
|
|
1363
|
-
}, {
|
|
1364
|
-
readonly name: "nonce";
|
|
1365
|
-
readonly type: "uint256";
|
|
1366
|
-
}, {
|
|
1367
|
-
readonly name: "deadline";
|
|
1368
|
-
readonly type: "uint256";
|
|
1369
|
-
}];
|
|
1370
|
-
readonly UpdateKey: readonly [{
|
|
1371
|
-
readonly name: "owner";
|
|
1372
|
-
readonly type: "address";
|
|
1373
|
-
}, {
|
|
1374
|
-
readonly name: "index";
|
|
1375
|
-
readonly type: "uint256";
|
|
1376
|
-
}, {
|
|
1377
|
-
readonly name: "pgpPublicKey";
|
|
1378
|
-
readonly type: "bytes";
|
|
1379
|
-
}, {
|
|
1380
|
-
readonly name: "nonce";
|
|
1381
|
-
readonly type: "uint256";
|
|
1382
|
-
}, {
|
|
1383
|
-
readonly name: "deadline";
|
|
1384
|
-
readonly type: "uint256";
|
|
1385
|
-
}];
|
|
1386
|
-
readonly Revoke: readonly [{
|
|
1387
|
-
readonly name: "owner";
|
|
1388
|
-
readonly type: "address";
|
|
1389
|
-
}, {
|
|
1390
|
-
readonly name: "index";
|
|
1391
|
-
readonly type: "uint256";
|
|
1392
|
-
}, {
|
|
1393
|
-
readonly name: "nonce";
|
|
1394
|
-
readonly type: "uint256";
|
|
1395
|
-
}, {
|
|
1396
|
-
readonly name: "deadline";
|
|
1397
|
-
readonly type: "uint256";
|
|
1398
|
-
}];
|
|
1399
|
-
readonly SetRecord: readonly [{
|
|
1400
|
-
readonly name: "owner";
|
|
1401
|
-
readonly type: "address";
|
|
1402
|
-
}, {
|
|
1403
|
-
readonly name: "index";
|
|
1404
|
-
readonly type: "uint256";
|
|
1405
|
-
}, {
|
|
1406
|
-
readonly name: "kind";
|
|
1407
|
-
readonly type: "bytes32";
|
|
1408
|
-
}, {
|
|
1409
|
-
readonly name: "value";
|
|
1410
|
-
readonly type: "bytes";
|
|
1411
|
-
}, {
|
|
1412
|
-
readonly name: "nonce";
|
|
1413
|
-
readonly type: "uint256";
|
|
1414
|
-
}, {
|
|
1415
|
-
readonly name: "deadline";
|
|
1416
|
-
readonly type: "uint256";
|
|
1417
|
-
}];
|
|
1418
|
-
};
|
|
1419
|
-
type AuthorizationAction = keyof typeof AUTHORIZATION_TYPES;
|
|
1420
|
-
interface Common {
|
|
1421
|
-
owner: Hex;
|
|
1422
|
-
nonce: bigint;
|
|
1423
|
-
deadline: bigint;
|
|
1424
|
-
}
|
|
1425
|
-
type AttestAuthorization = Common & {
|
|
1426
|
-
fingerprint: string;
|
|
1427
|
-
pgpSignature: string;
|
|
1428
|
-
pgpPublicKey: string;
|
|
1429
|
-
};
|
|
1430
|
-
type ReattestAuthorization = AttestAuthorization & {
|
|
1431
|
-
revokeIndex: bigint;
|
|
1432
|
-
};
|
|
1433
|
-
type UpdateKeyAuthorization = Common & {
|
|
1434
|
-
index: bigint;
|
|
1435
|
-
pgpPublicKey: string;
|
|
1436
|
-
};
|
|
1437
|
-
type RevokeAuthorization = Common & {
|
|
1438
|
-
index: bigint;
|
|
1439
|
-
};
|
|
1440
|
-
type SetRecordAuthorization = Common & {
|
|
1441
|
-
index: bigint;
|
|
1442
|
-
kind: Hex;
|
|
1443
|
-
value: Hex;
|
|
1444
|
-
};
|
|
1445
|
-
/**
|
|
1446
|
-
* Build the object to pass to viem/wagmi `signTypedData`. `fingerprint` is the hex
|
|
1447
|
-
* fingerprint; `pgpSignature` / `pgpPublicKey` are the armored text exactly as they
|
|
1448
|
-
* will be submitted (they are hashed as UTF-8 bytes).
|
|
1449
|
-
*/
|
|
1450
|
-
declare function attestTypedData(chainId: number, registry: Hex, a: AttestAuthorization): {
|
|
1451
|
-
domain: TypedDataDomain;
|
|
1452
|
-
types: {
|
|
1453
|
-
Attest: readonly [{
|
|
1454
|
-
readonly name: "owner";
|
|
1455
|
-
readonly type: "address";
|
|
1456
|
-
}, {
|
|
1457
|
-
readonly name: "fingerprint";
|
|
1458
|
-
readonly type: "bytes";
|
|
1459
|
-
}, {
|
|
1460
|
-
readonly name: "pgpSignature";
|
|
1461
|
-
readonly type: "bytes";
|
|
1462
|
-
}, {
|
|
1463
|
-
readonly name: "pgpPublicKey";
|
|
1464
|
-
readonly type: "bytes";
|
|
1465
|
-
}, {
|
|
1466
|
-
readonly name: "nonce";
|
|
1467
|
-
readonly type: "uint256";
|
|
1468
|
-
}, {
|
|
1469
|
-
readonly name: "deadline";
|
|
1470
|
-
readonly type: "uint256";
|
|
1471
|
-
}];
|
|
1472
|
-
};
|
|
1473
|
-
primaryType: "Attest";
|
|
1474
|
-
message: {
|
|
1475
|
-
owner: `0x${string}`;
|
|
1476
|
-
fingerprint: `0x${string}`;
|
|
1477
|
-
pgpSignature: `0x${string}`;
|
|
1478
|
-
pgpPublicKey: `0x${string}`;
|
|
1479
|
-
nonce: bigint;
|
|
1480
|
-
deadline: bigint;
|
|
1481
|
-
};
|
|
1482
|
-
};
|
|
1483
|
-
declare function reattestTypedData(chainId: number, registry: Hex, a: ReattestAuthorization): {
|
|
1484
|
-
domain: TypedDataDomain;
|
|
1485
|
-
types: {
|
|
1486
|
-
Reattest: readonly [{
|
|
1487
|
-
readonly name: "owner";
|
|
1488
|
-
readonly type: "address";
|
|
1489
|
-
}, {
|
|
1490
|
-
readonly name: "revokeIndex";
|
|
1491
|
-
readonly type: "uint256";
|
|
1492
|
-
}, {
|
|
1493
|
-
readonly name: "fingerprint";
|
|
1494
|
-
readonly type: "bytes";
|
|
1495
|
-
}, {
|
|
1496
|
-
readonly name: "pgpSignature";
|
|
1497
|
-
readonly type: "bytes";
|
|
1498
|
-
}, {
|
|
1499
|
-
readonly name: "pgpPublicKey";
|
|
1500
|
-
readonly type: "bytes";
|
|
1501
|
-
}, {
|
|
1502
|
-
readonly name: "nonce";
|
|
1503
|
-
readonly type: "uint256";
|
|
1504
|
-
}, {
|
|
1505
|
-
readonly name: "deadline";
|
|
1506
|
-
readonly type: "uint256";
|
|
1507
|
-
}];
|
|
1508
|
-
};
|
|
1509
|
-
primaryType: "Reattest";
|
|
1510
|
-
message: {
|
|
1511
|
-
revokeIndex: bigint;
|
|
1512
|
-
owner: `0x${string}`;
|
|
1513
|
-
fingerprint: `0x${string}`;
|
|
1514
|
-
pgpSignature: `0x${string}`;
|
|
1515
|
-
pgpPublicKey: `0x${string}`;
|
|
1516
|
-
nonce: bigint;
|
|
1517
|
-
deadline: bigint;
|
|
1518
|
-
};
|
|
1519
|
-
};
|
|
1520
|
-
declare function updateKeyTypedData(chainId: number, registry: Hex, a: UpdateKeyAuthorization): {
|
|
1521
|
-
domain: TypedDataDomain;
|
|
1522
|
-
types: {
|
|
1523
|
-
UpdateKey: readonly [{
|
|
1524
|
-
readonly name: "owner";
|
|
1525
|
-
readonly type: "address";
|
|
1526
|
-
}, {
|
|
1527
|
-
readonly name: "index";
|
|
1528
|
-
readonly type: "uint256";
|
|
1529
|
-
}, {
|
|
1530
|
-
readonly name: "pgpPublicKey";
|
|
1531
|
-
readonly type: "bytes";
|
|
1532
|
-
}, {
|
|
1533
|
-
readonly name: "nonce";
|
|
1534
|
-
readonly type: "uint256";
|
|
1535
|
-
}, {
|
|
1536
|
-
readonly name: "deadline";
|
|
1537
|
-
readonly type: "uint256";
|
|
1538
|
-
}];
|
|
1539
|
-
};
|
|
1540
|
-
primaryType: "UpdateKey";
|
|
1541
|
-
message: {
|
|
1542
|
-
owner: `0x${string}`;
|
|
1543
|
-
index: bigint;
|
|
1544
|
-
pgpPublicKey: `0x${string}`;
|
|
1545
|
-
nonce: bigint;
|
|
1546
|
-
deadline: bigint;
|
|
1547
|
-
};
|
|
1548
|
-
};
|
|
1549
|
-
declare function revokeTypedData(chainId: number, registry: Hex, a: RevokeAuthorization): {
|
|
1550
|
-
domain: TypedDataDomain;
|
|
1551
|
-
types: {
|
|
1552
|
-
Revoke: readonly [{
|
|
1553
|
-
readonly name: "owner";
|
|
1554
|
-
readonly type: "address";
|
|
1555
|
-
}, {
|
|
1556
|
-
readonly name: "index";
|
|
1557
|
-
readonly type: "uint256";
|
|
1558
|
-
}, {
|
|
1559
|
-
readonly name: "nonce";
|
|
1560
|
-
readonly type: "uint256";
|
|
1561
|
-
}, {
|
|
1562
|
-
readonly name: "deadline";
|
|
1563
|
-
readonly type: "uint256";
|
|
1564
|
-
}];
|
|
2162
|
+
readonly blockCreated: 14353601;
|
|
2163
|
+
};
|
|
1565
2164
|
};
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
2165
|
+
ensTlds?: readonly string[] | undefined;
|
|
2166
|
+
id: 1;
|
|
2167
|
+
name: "Ethereum";
|
|
2168
|
+
nativeCurrency: {
|
|
2169
|
+
readonly name: "Ether";
|
|
2170
|
+
readonly symbol: "ETH";
|
|
2171
|
+
readonly decimals: 18;
|
|
1572
2172
|
};
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
readonly name: "owner";
|
|
1579
|
-
readonly type: "address";
|
|
1580
|
-
}, {
|
|
1581
|
-
readonly name: "index";
|
|
1582
|
-
readonly type: "uint256";
|
|
1583
|
-
}, {
|
|
1584
|
-
readonly name: "kind";
|
|
1585
|
-
readonly type: "bytes32";
|
|
1586
|
-
}, {
|
|
1587
|
-
readonly name: "value";
|
|
1588
|
-
readonly type: "bytes";
|
|
1589
|
-
}, {
|
|
1590
|
-
readonly name: "nonce";
|
|
1591
|
-
readonly type: "uint256";
|
|
1592
|
-
}, {
|
|
1593
|
-
readonly name: "deadline";
|
|
1594
|
-
readonly type: "uint256";
|
|
1595
|
-
}];
|
|
2173
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2174
|
+
rpcUrls: {
|
|
2175
|
+
readonly default: {
|
|
2176
|
+
readonly http: readonly ["https://eth.merkle.io"];
|
|
2177
|
+
};
|
|
1596
2178
|
};
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
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;
|
|
2194
|
+
};
|
|
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;
|
|
1605
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;
|
|
1606
2264
|
};
|
|
1607
|
-
/**
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
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;
|
|
1611
2298
|
|
|
1612
2299
|
/**
|
|
1613
|
-
* Records:
|
|
1614
|
-
*
|
|
1615
|
-
* 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.
|
|
1616
2302
|
*
|
|
1617
|
-
* Conventions:
|
|
1618
|
-
*
|
|
1619
|
-
*
|
|
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.
|
|
1620
2306
|
*/
|
|
1621
2307
|
declare const MAX_RECORD_BYTES = 1024;
|
|
2308
|
+
/** Longest record name, `thurin.` included. */
|
|
2309
|
+
declare const MAX_KIND_BYTES = 31;
|
|
1622
2310
|
/** `thurin.` is the default namespace: kindName('canary') === 'thurin.canary'. Dotted names pass through. */
|
|
1623
2311
|
declare function kindName(input: string): string;
|
|
1624
|
-
/**
|
|
1625
|
-
declare
|
|
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"];
|
|
1626
2318
|
type KnownKind = (typeof KNOWN_KINDS)[number];
|
|
1627
|
-
|
|
1628
|
-
declare const IDENTITY_KINDS: readonly KnownKind[];
|
|
1629
|
-
declare function encodeRecord(value: string): Hex;
|
|
1630
|
-
declare function decodeRecord(hex: Hex): string;
|
|
1631
|
-
interface PointerEntry {
|
|
2319
|
+
interface ReleaseEntry {
|
|
1632
2320
|
name: string;
|
|
1633
2321
|
sha256: string;
|
|
1634
2322
|
date: string;
|
|
1635
2323
|
url?: string;
|
|
1636
2324
|
}
|
|
1637
|
-
interface
|
|
2325
|
+
interface ReleasesRecord {
|
|
1638
2326
|
v: 1;
|
|
1639
|
-
releases:
|
|
2327
|
+
releases: ReleaseEntry[];
|
|
1640
2328
|
}
|
|
1641
|
-
declare function
|
|
2329
|
+
declare function parseReleases(text: string): ReleasesRecord;
|
|
1642
2330
|
/** Add a release, newest first; drop the oldest until it fits the 1 KB slot. */
|
|
1643
|
-
declare function
|
|
1644
|
-
record:
|
|
1645
|
-
dropped:
|
|
2331
|
+
declare function addRelease(existing: ReleasesRecord | null, entry: ReleaseEntry): {
|
|
2332
|
+
record: ReleasesRecord;
|
|
2333
|
+
dropped: ReleaseEntry[];
|
|
1646
2334
|
};
|
|
1647
|
-
declare function
|
|
2335
|
+
declare function renderReleases(p: ReleasesRecord): string;
|
|
1648
2336
|
/** A record as the identity page shows it: what was stored, and what it means if it parses. */
|
|
1649
2337
|
interface ParsedRecord {
|
|
1650
2338
|
kind: string;
|
|
@@ -1683,8 +2371,8 @@ type RecordData = {
|
|
|
1683
2371
|
type: 'encrypted';
|
|
1684
2372
|
recipients: number | null;
|
|
1685
2373
|
} | {
|
|
1686
|
-
type: '
|
|
1687
|
-
releases:
|
|
2374
|
+
type: 'releases';
|
|
2375
|
+
releases: ReleaseEntry[];
|
|
1688
2376
|
} | {
|
|
1689
2377
|
type: 'text';
|
|
1690
2378
|
};
|
|
@@ -1697,146 +2385,90 @@ type RecordData = {
|
|
|
1697
2385
|
declare function parseRecord(kind: string, text: string, opts?: {
|
|
1698
2386
|
armoredKey?: string;
|
|
1699
2387
|
}): Promise<ParsedRecord>;
|
|
1700
|
-
/**
|
|
2388
|
+
/** Anything with viem's `readContract`, such as a viem `PublicClient`. */
|
|
1701
2389
|
interface RecordReader {
|
|
1702
|
-
readContract(args:
|
|
1703
|
-
address: `0x${string}`;
|
|
1704
|
-
abi: unknown;
|
|
1705
|
-
functionName: 'record';
|
|
1706
|
-
args: readonly [`0x${string}`, bigint, Hex];
|
|
1707
|
-
}): Promise<unknown>;
|
|
2390
|
+
readContract(args: any): Promise<unknown>;
|
|
1708
2391
|
}
|
|
1709
2392
|
/**
|
|
1710
|
-
*
|
|
1711
|
-
* `
|
|
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.
|
|
2395
|
+
*/
|
|
2396
|
+
declare function pickRecords(names: readonly string[], values: readonly string[], kinds?: readonly string[] | null): {
|
|
2397
|
+
kind: string;
|
|
2398
|
+
text: string;
|
|
2399
|
+
}[];
|
|
2400
|
+
/**
|
|
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.
|
|
1712
2403
|
*/
|
|
1713
|
-
declare function
|
|
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?: {
|
|
1714
2410
|
armoredKey?: string;
|
|
1715
2411
|
}): Promise<ParsedRecord[]>;
|
|
1716
2412
|
|
|
1717
|
-
declare function identifyProof(notation: Notation): Proof | null;
|
|
1718
|
-
declare function displayUrl(proof: Proof): string;
|
|
1719
|
-
declare function proofHref(proof: Proof): string | null;
|
|
1720
|
-
declare function proofSecondaryHref(proof: Proof): string | null;
|
|
1721
2413
|
/**
|
|
1722
|
-
*
|
|
1723
|
-
*
|
|
1724
|
-
*
|
|
1725
|
-
* `farcasterHub` at your own node to avoid that, or pass a Neynar key to use Neynar's hub.
|
|
2414
|
+
* Plain words for a claim's state, shared by thurin.id, the CLI, and anyone using the kit,
|
|
2415
|
+
* so every surface says the same thing. `sentence` is for visitors; `fix` is for the owner only
|
|
2416
|
+
* (thurin.id shows it when the connected wallet owns the claim).
|
|
1726
2417
|
*/
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
2418
|
+
/** Badge text for each check result. */
|
|
2419
|
+
declare const CLAIM_CHECK_LABEL: Record<ClaimCheckKind, string>;
|
|
2420
|
+
/** "Mar 5, 2029", in UTC so every viewer sees the same day. */
|
|
2421
|
+
declare function formatClaimDate(isoOrSeconds: string | number | null | undefined): string;
|
|
2422
|
+
interface ClaimCheckText {
|
|
2423
|
+
kind: ClaimCheckKind;
|
|
2424
|
+
label: string;
|
|
2425
|
+
sentence: string;
|
|
2426
|
+
/** What the owner can do about it, when there is something. */
|
|
2427
|
+
fix: string | null;
|
|
1733
2428
|
}
|
|
2429
|
+
/** Label, visitor sentence, and owner fix for a verification result. */
|
|
2430
|
+
declare function claimCheckText(v: PGPVerification, formatDate?: (iso: string | null | undefined) => string): ClaimCheckText;
|
|
1734
2431
|
/**
|
|
1735
|
-
*
|
|
1736
|
-
*
|
|
1737
|
-
*/
|
|
1738
|
-
declare function verifyProof(proof: Proof, fingerprint: string, opts?: ProofOptions | string): Promise<PGPVerification>;
|
|
1739
|
-
|
|
1740
|
-
declare function parsePgpKey(armoredKey: string): Promise<PGPKeyInfo | null>;
|
|
1741
|
-
/**
|
|
1742
|
-
* Verify a clearsigned message against an armored public key, the way gpg does: the signing
|
|
1743
|
-
* key (or subkey) must be valid *now* — bound to this primary, unrevoked, unexpired — and the
|
|
1744
|
-
* signature must be sound. We deliberately do not ask openpgp.verify(), which also demands
|
|
1745
|
-
* the key was valid at the instant the signature was made. Thurin's update flow tells people
|
|
1746
|
-
* to `export-minimal` after editing notations, which keeps only the newest self-certification;
|
|
1747
|
-
* when that postdates the signature (Ben's own key, 2026-09-14: notations edited 16 minutes
|
|
1748
|
-
* after signing), openpgp.verify() reports "Could not find valid self-signature" for a
|
|
1749
|
-
* signature gpg verifies fine. A key that has since been revoked or expired still fails here.
|
|
1750
|
-
* These are internals the .d.ts does not expose (the signature packet list, the
|
|
1751
|
-
* CRLF-normalised text, LiteralDataPacket.setText); they are stable across openpgp.js 6 and
|
|
1752
|
-
* exercised by the real-data tests in attestation.test.ts.
|
|
1753
|
-
*
|
|
1754
|
-
* Used for attestation statements and for clearsigned records such as `thurin.canary`.
|
|
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.
|
|
1755
2434
|
*/
|
|
1756
|
-
declare function
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
2435
|
+
declare function keyProblemText(v: PGPVerification, formatDate?: (iso: string | null | undefined) => string): ClaimCheckText | null;
|
|
2436
|
+
/** Days until a verified claim's key (or signing subkey) expires, when that is within `withinDays`. */
|
|
2437
|
+
declare function expiresSoon(v: PGPVerification | null | undefined, now?: number, withinDays?: number): {
|
|
2438
|
+
days: number;
|
|
2439
|
+
at: string;
|
|
2440
|
+
} | null;
|
|
2441
|
+
/** "Key expires in 12 days (Mar 6, 2027)." */
|
|
2442
|
+
declare function expiresSoonText(soon: {
|
|
2443
|
+
days: number;
|
|
2444
|
+
at: string;
|
|
2445
|
+
}, formatDate?: (iso: string) => string): string;
|
|
2446
|
+
type ClaimFate = {
|
|
2447
|
+
state: 'active';
|
|
2448
|
+
} | {
|
|
2449
|
+
state: 'revoked';
|
|
2450
|
+
at: number;
|
|
1761
2451
|
reason?: string;
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
armored: string;
|
|
1773
|
-
/** User IDs kept (no `@`). */
|
|
1774
|
-
kept: string[];
|
|
1775
|
-
/** User IDs removed (contained an `@`). */
|
|
1776
|
-
removed: string[];
|
|
1777
|
-
}
|
|
1778
|
-
/**
|
|
1779
|
-
* Remove every user ID that contains an email address, keeping the rest (and
|
|
1780
|
-
* their self-certifications, so proof notations on a non-email user ID survive).
|
|
1781
|
-
* Returns null when nothing would remain — openpgp needs at least one
|
|
1782
|
-
* self-certified user ID to verify signatures, so such a key must not be
|
|
1783
|
-
* published. The key material and subkeys are untouched; the fingerprint is
|
|
1784
|
-
* unchanged.
|
|
1785
|
-
*/
|
|
1786
|
-
declare function stripEmailUserIDs(armoredKey: string): Promise<StrippedKey | null>;
|
|
1787
|
-
/** True when any user ID on the key contains an email address. */
|
|
1788
|
-
declare function hasEmailUserID(armoredKey: string): Promise<boolean>;
|
|
1789
|
-
|
|
1790
|
-
/**
|
|
1791
|
-
* EFP social graph for an address. Followers are counted by EFP for any address,
|
|
1792
|
-
* whether or not it has published a list of its own; following and top-8 exist
|
|
1793
|
-
* only when it has (its "primary list"). An address with followers but no list
|
|
1794
|
-
* — a project account that has never followed anyone — is still on EFP.
|
|
1795
|
-
*/
|
|
1796
|
-
declare function fetchEFPGraph(address: string): Promise<EFPGraph | null>;
|
|
1797
|
-
|
|
1798
|
-
/**
|
|
1799
|
-
* Why an identity couldn't be shown. A dead RPC must never read as a fact about the identity:
|
|
1800
|
-
* viem's ENS lookup turns an unreachable RPC into "no address", and a failed registry read
|
|
1801
|
-
* leaves every count at zero. So when a lookup comes back empty or fails, the hook asks the
|
|
1802
|
-
* RPC for the block number and this decides which it was.
|
|
1803
|
-
*
|
|
1804
|
-
* - `rpc`: the RPC didn't answer; nothing about the identity is known
|
|
1805
|
-
* - `not-found`: the RPC answered and the ENS name has no address
|
|
1806
|
-
* - `read`: the RPC answers, but a registry read failed anyway
|
|
1807
|
-
*/
|
|
1808
|
-
type IdentityErrorKind = 'rpc' | 'not-found' | 'read';
|
|
1809
|
-
interface IdentityLookupState {
|
|
1810
|
-
/** An ENS name was looked up and came back with no address. */
|
|
1811
|
-
ensEmpty: boolean;
|
|
1812
|
-
/** The ENS lookup itself errored. */
|
|
1813
|
-
ensFailed: boolean;
|
|
1814
|
-
/** Reading the owner's claims from the registry errored. */
|
|
1815
|
-
claimsFailed: boolean;
|
|
1816
|
-
/** The block-number probe: undefined while not run or running. */
|
|
1817
|
-
rpcAnswered: boolean | undefined;
|
|
1818
|
-
}
|
|
1819
|
-
/** Whether the lookup needs the RPC probe to be understood. */
|
|
1820
|
-
declare function needsRpcProbe(s: Omit<IdentityLookupState, 'rpcAnswered'>): boolean;
|
|
1821
|
-
/** null when nothing went wrong or the probe hasn't answered yet. */
|
|
1822
|
-
declare function identityErrorKind(s: IdentityLookupState): IdentityErrorKind | null;
|
|
1823
|
-
declare const IDENTITY_ERROR_TEXT: Record<IdentityErrorKind, string>;
|
|
2452
|
+
} | {
|
|
2453
|
+
state: 'replaced';
|
|
2454
|
+
at: number;
|
|
2455
|
+
by: number;
|
|
2456
|
+
compromised?: boolean;
|
|
2457
|
+
};
|
|
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." */
|
|
2461
|
+
declare function claimFateText(fate: ClaimFate, formatDate?: (seconds: number) => string): string | null;
|
|
1824
2462
|
|
|
1825
2463
|
/**
|
|
1826
|
-
* ENS avatars without the tracking pixel
|
|
1827
|
-
*
|
|
1828
|
-
*
|
|
1829
|
-
*
|
|
1830
|
-
* through public gateways, and euc.li, ENS Labs' host behind the ENS app's avatar upload
|
|
1831
|
-
* (most avatars; ENS Labs sees the view, the name's owner doesn't). Anything else: no avatar.
|
|
1832
|
-
*/
|
|
1833
|
-
/**
|
|
1834
|
-
* Public IPFS gateways, tried in order: when an image fails to load, the next one is used.
|
|
1835
|
-
* Any single public gateway can stop serving (ipfs.io and dweb.link went "service worker only"
|
|
1836
|
-
* 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).
|
|
1837
2468
|
*/
|
|
2469
|
+
/** Public IPFS gateways, tried in order when an image fails: any one can stop serving. Each sees the viewer's IP. */
|
|
1838
2470
|
declare const IPFS_GATEWAYS: readonly ["https://ipfs.filebase.io/ipfs/", "https://gateway.pinata.cloud/ipfs/"];
|
|
1839
|
-
/** The first gateway in IPFS_GATEWAYS
|
|
2471
|
+
/** The first gateway in IPFS_GATEWAYS. */
|
|
1840
2472
|
declare const IPFS_GATEWAY: string;
|
|
1841
2473
|
declare const ARWEAVE_GATEWAY = "https://arweave.net/";
|
|
1842
2474
|
/** An image URL safe to load for `uri`, or null if loading it would reach a host the owner picked. */
|
|
@@ -1878,21 +2510,112 @@ declare const NFT_AVATAR_ABI: readonly [{
|
|
|
1878
2510
|
*/
|
|
1879
2511
|
declare function nftAvatarImage(tokenUri: string, tokenId: bigint, fetchFn?: typeof fetch): Promise<string | null>;
|
|
1880
2512
|
|
|
1881
|
-
/** Normalize a fingerprint to lowercase hex with no prefix or spaces. Returns null if malformed. */
|
|
1882
|
-
declare function normalizeFingerprint(input: string): string | null;
|
|
1883
|
-
/** Fingerprint → the raw `bytes` argument the v2 registry takes (0x-prefixed, 20 or 32 bytes). */
|
|
1884
|
-
declare function fingerprintToBytes(fingerprint: string): Hex;
|
|
1885
|
-
/** Raw `bytes` from the registry → lowercase hex fingerprint without 0x. */
|
|
1886
|
-
declare function bytesToFingerprint(bytes: Hex | string): string;
|
|
1887
|
-
/** keccak256 of the raw fingerprint bytes — the `fingerprintHash` the registry indexes by. */
|
|
1888
|
-
declare function fingerprintHash(fingerprint: string): Hex;
|
|
1889
2513
|
/**
|
|
1890
|
-
* The
|
|
1891
|
-
*
|
|
1892
|
-
*
|
|
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.
|
|
1893
2517
|
*/
|
|
1894
|
-
declare
|
|
1895
|
-
|
|
1896
|
-
|
|
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>;
|
|
1897
2620
|
|
|
1898
|
-
export { ARWEAVE_GATEWAY, AUTHORIZATION_TYPES, type AttestAuthorization, type Attestation, type AuthorizationAction, type
|
|
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 };
|