@neus/sdk 1.1.4 → 1.1.6
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 +11 -10
- package/cjs/client.cjs +100 -20
- package/cjs/index.cjs +100 -20
- package/cli/neus.mjs +106 -32
- package/client.js +105 -20
- package/package.json +147 -147
- package/types.d.ts +1154 -1011
- package/widgets/verify-gate/dist/ProofBadge.js +1 -1
- package/widgets/verify-gate/dist/VerifyGate.js +1 -1
package/types.d.ts
CHANGED
|
@@ -1,1005 +1,1148 @@
|
|
|
1
|
-
declare module '@neus/sdk' {
|
|
2
|
-
export interface Eip1193Provider {
|
|
3
|
-
request(args: { method: string; params?: unknown[] | Record<string, unknown> }): Promise<unknown>;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export type WalletLike = Eip1193Provider | { address?: string } | { getAddress?: () => Promise<string> } | { signMessage?: (message: string) => Promise<string> };
|
|
7
|
-
|
|
8
|
-
export class NeusClient {
|
|
9
|
-
constructor(config?: NeusClientConfig);
|
|
10
|
-
|
|
11
|
-
verifyFromApp(params: VerifyFromAppParams): Promise<VerificationResult>;
|
|
12
|
-
|
|
13
|
-
verify(params: VerifyParams): Promise<VerificationResult>;
|
|
14
|
-
|
|
15
|
-
getProof(qHash: string): Promise<StatusResult>;
|
|
16
|
-
|
|
17
|
-
getPrivateProof(qHash: string, wallet?: WalletLike | GatePrivateAuth): Promise<StatusResult>;
|
|
18
|
-
|
|
19
|
-
isHealthy(): Promise<boolean>;
|
|
20
|
-
|
|
21
|
-
getVerifiers(): Promise<string[]>;
|
|
22
|
-
|
|
23
|
-
getVerifierCatalog(): Promise<VerifierCatalog>;
|
|
24
|
-
|
|
25
|
-
createWalletLinkData(params: {
|
|
26
|
-
primaryWalletAddress: string;
|
|
27
|
-
secondaryWalletAddress: string;
|
|
28
|
-
wallet?: WalletLike;
|
|
29
|
-
chain?: string;
|
|
30
|
-
signedTimestamp?: number;
|
|
31
|
-
relationshipType?: 'primary' | 'personal' | 'org' | 'affiliate' | 'agent' | 'linked';
|
|
32
|
-
label?: string;
|
|
33
|
-
}): Promise<WalletLinkData>;
|
|
34
|
-
|
|
35
|
-
pollProofStatus(qHash: string, options?: PollOptions): Promise<StatusResult>;
|
|
36
|
-
|
|
37
|
-
revokeOwnProof(qHash: string, wallet?: { address: string }): Promise<boolean>;
|
|
38
|
-
|
|
39
|
-
getProofsByWallet(walletAddress: string, options?: GetProofsOptions): Promise<ProofsResult>;
|
|
40
|
-
|
|
41
|
-
getPrivateProofsByWallet(walletAddress: string, options?: GetProofsOptions, wallet?: WalletLike): Promise<ProofsResult>;
|
|
42
|
-
|
|
43
|
-
gateCheck(params: GateCheckApiParams): Promise<GateCheckApiResponse>;
|
|
44
|
-
|
|
45
|
-
createGatePrivateAuth(params: {
|
|
46
|
-
address: string;
|
|
47
|
-
wallet?: WalletLike;
|
|
48
|
-
chain?: string;
|
|
49
|
-
signatureMethod?: string;
|
|
50
|
-
}): Promise<GatePrivateAuth>;
|
|
51
|
-
|
|
52
|
-
checkGate(params: CheckGateParams): Promise<CheckGateResult>;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
declare module '@neus/sdk' {
|
|
2
|
+
export interface Eip1193Provider {
|
|
3
|
+
request(args: { method: string; params?: unknown[] | Record<string, unknown> }): Promise<unknown>;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export type WalletLike = Eip1193Provider | { address?: string } | { getAddress?: () => Promise<string> } | { signMessage?: (message: string) => Promise<string> };
|
|
7
|
+
|
|
8
|
+
export class NeusClient {
|
|
9
|
+
constructor(config?: NeusClientConfig);
|
|
10
|
+
|
|
11
|
+
verifyFromApp(params: VerifyFromAppParams): Promise<VerificationResult>;
|
|
12
|
+
|
|
13
|
+
verify(params: VerifyParams): Promise<VerificationResult>;
|
|
14
|
+
|
|
15
|
+
getProof(qHash: string): Promise<StatusResult>;
|
|
16
|
+
|
|
17
|
+
getPrivateProof(qHash: string, wallet?: WalletLike | GatePrivateAuth): Promise<StatusResult>;
|
|
18
|
+
|
|
19
|
+
isHealthy(): Promise<boolean>;
|
|
20
|
+
|
|
21
|
+
getVerifiers(): Promise<string[]>;
|
|
22
|
+
|
|
23
|
+
getVerifierCatalog(): Promise<VerifierCatalog>;
|
|
24
|
+
|
|
25
|
+
createWalletLinkData(params: {
|
|
26
|
+
primaryWalletAddress: string;
|
|
27
|
+
secondaryWalletAddress: string;
|
|
28
|
+
wallet?: WalletLike;
|
|
29
|
+
chain?: string;
|
|
30
|
+
signedTimestamp?: number;
|
|
31
|
+
relationshipType?: 'primary' | 'personal' | 'org' | 'affiliate' | 'agent' | 'linked';
|
|
32
|
+
label?: string;
|
|
33
|
+
}): Promise<WalletLinkData>;
|
|
34
|
+
|
|
35
|
+
pollProofStatus(qHash: string, options?: PollOptions): Promise<StatusResult>;
|
|
36
|
+
|
|
37
|
+
revokeOwnProof(qHash: string, wallet?: { address: string }): Promise<boolean>;
|
|
38
|
+
|
|
39
|
+
getProofsByWallet(walletAddress: string, options?: GetProofsOptions): Promise<ProofsResult>;
|
|
40
|
+
|
|
41
|
+
getPrivateProofsByWallet(walletAddress: string, options?: GetProofsOptions, wallet?: WalletLike): Promise<ProofsResult>;
|
|
42
|
+
|
|
43
|
+
gateCheck(params: GateCheckApiParams): Promise<GateCheckApiResponse>;
|
|
44
|
+
|
|
45
|
+
createGatePrivateAuth(params: {
|
|
46
|
+
address: string;
|
|
47
|
+
wallet?: WalletLike;
|
|
48
|
+
chain?: string;
|
|
49
|
+
signatureMethod?: string;
|
|
50
|
+
}): Promise<GatePrivateAuth>;
|
|
51
|
+
|
|
52
|
+
checkGate(params: CheckGateParams): Promise<CheckGateResult>;
|
|
53
|
+
|
|
54
|
+
/** Public gate snapshot (requirements, charge, schedule — never the secret reward value). */
|
|
55
|
+
getGate(gateId: string): Promise<PublicGateSnapshot>;
|
|
56
|
+
|
|
57
|
+
/** Post-verify reward delivery for hosted gate checkout (session or wallet-bound). */
|
|
58
|
+
fulfillGate(params: FulfillGateParams): Promise<GateFulfillmentResponse>;
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type PrivacyLevel = 'public' | 'private';
|
|
63
|
+
|
|
64
|
+
export interface NeusClientConfig {
|
|
65
|
+
apiUrl?: string;
|
|
60
66
|
/** Optional server profile key; MCP/CI only. Not required for VerifyGate or gateCheck. */
|
|
61
|
-
apiKey?: string;
|
|
62
|
-
/** Public app attribution id (non-secret). */
|
|
63
|
-
appId?: string;
|
|
67
|
+
apiKey?: string;
|
|
68
|
+
/** Public app attribution id (non-secret). */
|
|
69
|
+
appId?: string;
|
|
64
70
|
/** Advanced server/app sponsor wallet. Published gate checkout resolves billing from gateId. */
|
|
65
|
-
billingWallet?: string;
|
|
66
|
-
/** Alias for billingWallet. */
|
|
67
|
-
sponsorOrgWallet?: string;
|
|
68
|
-
orgWallet?: string;
|
|
69
|
-
/** Site origin used when issuing billing authorization (defaults to browser origin). */
|
|
70
|
-
appOrigin?: string;
|
|
71
|
+
billingWallet?: string;
|
|
72
|
+
/** Alias for billingWallet. */
|
|
73
|
+
sponsorOrgWallet?: string;
|
|
74
|
+
orgWallet?: string;
|
|
75
|
+
/** Site origin used when issuing billing authorization (defaults to browser origin). */
|
|
76
|
+
appOrigin?: string;
|
|
71
77
|
/** Advanced server path only; not required for published gate checkout. */
|
|
72
|
-
appLinkQHash?: string;
|
|
73
|
-
paymentSignature?: string;
|
|
74
|
-
extraHeaders?: Record<string, string>;
|
|
75
|
-
timeout?: number;
|
|
76
|
-
hubChainId?: number;
|
|
77
|
-
enableLogging?: boolean;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface FetchSponsorGrantParams {
|
|
81
|
-
apiUrl?: string;
|
|
82
|
-
appId: string;
|
|
83
|
-
orgWallet: string;
|
|
84
|
-
verifierIds?: string[];
|
|
85
|
-
targetChains?: number[];
|
|
86
|
-
origin?: string;
|
|
87
|
-
expiresInSeconds?: number;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface FetchSponsorGrantResult {
|
|
91
|
-
sponsorGrant: string;
|
|
92
|
-
exp?: number;
|
|
93
|
-
orgWallet: string;
|
|
94
|
-
appId: string;
|
|
95
|
-
maxCredits?: number;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export function fetchSponsorGrant(params: FetchSponsorGrantParams): Promise<FetchSponsorGrantResult>;
|
|
99
|
-
|
|
100
|
-
export interface VerificationOptions {
|
|
101
|
-
privacyLevel?: PrivacyLevel;
|
|
102
|
-
enableIpfs?: boolean;
|
|
103
|
-
storeOriginalContent?: boolean;
|
|
104
|
-
targetChains?: number[];
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
| 'ownership-
|
|
262
|
-
| 'ownership-
|
|
263
|
-
| '
|
|
264
|
-
| '
|
|
265
|
-
| 'ownership
|
|
266
|
-
| '
|
|
267
|
-
| '
|
|
268
|
-
| 'wallet-
|
|
269
|
-
| '
|
|
270
|
-
| '
|
|
271
|
-
| '
|
|
272
|
-
| '
|
|
273
|
-
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
export type
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
| '
|
|
281
|
-
| '
|
|
282
|
-
| '
|
|
283
|
-
| '
|
|
284
|
-
| '
|
|
285
|
-
| '
|
|
286
|
-
| '
|
|
287
|
-
| '
|
|
288
|
-
| '
|
|
289
|
-
| '
|
|
290
|
-
| '
|
|
291
|
-
| '
|
|
292
|
-
| '
|
|
293
|
-
| '
|
|
294
|
-
| '
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
export
|
|
309
|
-
|
|
310
|
-
export function
|
|
311
|
-
|
|
312
|
-
export function
|
|
313
|
-
|
|
314
|
-
export function
|
|
315
|
-
|
|
316
|
-
export function
|
|
317
|
-
|
|
318
|
-
export function
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
export function
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
export function
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
export function
|
|
379
|
-
|
|
380
|
-
export function
|
|
381
|
-
|
|
382
|
-
export function
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
export function
|
|
397
|
-
|
|
398
|
-
export function
|
|
399
|
-
|
|
400
|
-
export function
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
export
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
export interface
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
export interface
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
export
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
export
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
type
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
};
|
|
810
|
-
|
|
811
|
-
type
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
78
|
+
appLinkQHash?: string;
|
|
79
|
+
paymentSignature?: string;
|
|
80
|
+
extraHeaders?: Record<string, string>;
|
|
81
|
+
timeout?: number;
|
|
82
|
+
hubChainId?: number;
|
|
83
|
+
enableLogging?: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface FetchSponsorGrantParams {
|
|
87
|
+
apiUrl?: string;
|
|
88
|
+
appId: string;
|
|
89
|
+
orgWallet: string;
|
|
90
|
+
verifierIds?: string[];
|
|
91
|
+
targetChains?: number[];
|
|
92
|
+
origin?: string;
|
|
93
|
+
expiresInSeconds?: number;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface FetchSponsorGrantResult {
|
|
97
|
+
sponsorGrant: string;
|
|
98
|
+
exp?: number;
|
|
99
|
+
orgWallet: string;
|
|
100
|
+
appId: string;
|
|
101
|
+
maxCredits?: number;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function fetchSponsorGrant(params: FetchSponsorGrantParams): Promise<FetchSponsorGrantResult>;
|
|
105
|
+
|
|
106
|
+
export interface VerificationOptions {
|
|
107
|
+
privacyLevel?: PrivacyLevel;
|
|
108
|
+
enableIpfs?: boolean;
|
|
109
|
+
storeOriginalContent?: boolean;
|
|
110
|
+
targetChains?: number[];
|
|
111
|
+
/** Anchor the receipt on the hub registry chain. Defaults to false (receipts persist offchain). */
|
|
112
|
+
publishToHub?: boolean;
|
|
113
|
+
publicDisplay?: boolean;
|
|
114
|
+
meta?: Record<string, any>;
|
|
115
|
+
verifierOptions?: Record<string, any>;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface VerifierCatalogMetadataEntry {
|
|
119
|
+
category?: string;
|
|
120
|
+
description?: string;
|
|
121
|
+
accessLevel?: 'public' | 'pro' | 'custom' | 'admin' | string;
|
|
122
|
+
flowType?: 'instant' | 'interactive' | 'external_lookup' | string;
|
|
123
|
+
expiryType?: 'permanent' | 'point_in_time' | 'expiring' | string;
|
|
124
|
+
allowsDelegatedSubject?: boolean;
|
|
125
|
+
compatibleWith?: string[];
|
|
126
|
+
conflictsWith?: string[];
|
|
127
|
+
supportsDirectApi?: boolean;
|
|
128
|
+
supportsHostedVerify?: boolean;
|
|
129
|
+
dataSchema?: Record<string, any>;
|
|
130
|
+
requiredFields?: string[];
|
|
131
|
+
optionalFields?: string[];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface VerifierCatalog {
|
|
135
|
+
data: string[];
|
|
136
|
+
metadata: Record<string, VerifierCatalogMetadataEntry>;
|
|
137
|
+
meta?: Record<string, any>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface VerifyFromAppParams {
|
|
141
|
+
user: {
|
|
142
|
+
walletAddress?: string;
|
|
143
|
+
address?: string;
|
|
144
|
+
identity?: string;
|
|
145
|
+
};
|
|
146
|
+
verifier?: VerifierId;
|
|
147
|
+
content?: string | Record<string, any>;
|
|
148
|
+
data?: VerificationData;
|
|
149
|
+
options?: VerifyOptions;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface VerifyParams {
|
|
153
|
+
verifier?: VerifierId;
|
|
154
|
+
content?: string;
|
|
155
|
+
data?: VerificationData;
|
|
156
|
+
options?: VerifyOptions;
|
|
157
|
+
|
|
158
|
+
verifierIds?: VerifierId[];
|
|
159
|
+
walletAddress?: string;
|
|
160
|
+
signature?: string;
|
|
161
|
+
signedTimestamp?: number;
|
|
162
|
+
chainId?: number;
|
|
163
|
+
chain?: string;
|
|
164
|
+
signatureMethod?: string;
|
|
165
|
+
delegationQHash?: string;
|
|
166
|
+
wallet?: WalletLike;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface ProofResult {
|
|
170
|
+
qHash: string;
|
|
171
|
+
status: string;
|
|
172
|
+
walletAddress?: string;
|
|
173
|
+
proofUrl?: string;
|
|
174
|
+
crossChain?: boolean;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface VerificationResult {
|
|
178
|
+
qHash: string;
|
|
179
|
+
status: VerificationStatus;
|
|
180
|
+
success: boolean;
|
|
181
|
+
data?: VerificationData;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface StatusResult {
|
|
185
|
+
qHash?: string;
|
|
186
|
+
proofUrl?: string | null;
|
|
187
|
+
success: boolean;
|
|
188
|
+
status: VerificationStatus;
|
|
189
|
+
data?: {
|
|
190
|
+
qHash?: string;
|
|
191
|
+
status: string;
|
|
192
|
+
walletAddress: string;
|
|
193
|
+
verifierIds?: string[];
|
|
194
|
+
targetChains?: number[];
|
|
195
|
+
verifiedVerifiers?: Array<{
|
|
196
|
+
verifierId: string;
|
|
197
|
+
verified: boolean;
|
|
198
|
+
data: any;
|
|
199
|
+
status: string;
|
|
200
|
+
zkInfo?: {
|
|
201
|
+
zkStatus: string;
|
|
202
|
+
};
|
|
203
|
+
}>;
|
|
204
|
+
crosschain?: {
|
|
205
|
+
status: string;
|
|
206
|
+
hubTxHash?: string;
|
|
207
|
+
initiated?: number;
|
|
208
|
+
completed?: number;
|
|
209
|
+
totalChains?: number;
|
|
210
|
+
finalized?: number;
|
|
211
|
+
relayResults?: Record<string, {
|
|
212
|
+
success: boolean;
|
|
213
|
+
transactionHash?: string;
|
|
214
|
+
completedAt?: number;
|
|
215
|
+
chainId: number;
|
|
216
|
+
status: string;
|
|
217
|
+
gasUsed?: string;
|
|
218
|
+
blockNumber?: string;
|
|
219
|
+
voucherId?: string;
|
|
220
|
+
}>;
|
|
221
|
+
createdVouchers?: string[];
|
|
222
|
+
};
|
|
223
|
+
hubTransaction?: {
|
|
224
|
+
txHash: string;
|
|
225
|
+
timestamp: number;
|
|
226
|
+
chainId: number;
|
|
227
|
+
status: string;
|
|
228
|
+
};
|
|
229
|
+
ipfs?: {
|
|
230
|
+
cid: string;
|
|
231
|
+
gateway: string;
|
|
232
|
+
createdAt: number;
|
|
233
|
+
size: number;
|
|
234
|
+
};
|
|
235
|
+
options?: {
|
|
236
|
+
enableIpfs?: boolean;
|
|
237
|
+
publicDisplay?: boolean;
|
|
238
|
+
storeOriginalContent?: boolean;
|
|
239
|
+
verifierOptions?: object;
|
|
240
|
+
privacyLevel?: 'private' | 'public';
|
|
241
|
+
meta?: object;
|
|
242
|
+
};
|
|
243
|
+
meta?: {
|
|
244
|
+
privacyLevel: 'private' | 'public';
|
|
245
|
+
publiclyAccessible: boolean;
|
|
246
|
+
};
|
|
247
|
+
createdAt?: number;
|
|
248
|
+
completedAt?: number;
|
|
249
|
+
lastUpdated?: number;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface PollOptions {
|
|
254
|
+
interval?: number;
|
|
255
|
+
timeout?: number;
|
|
256
|
+
onProgress?: (status: any) => void;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface ValidationResult {
|
|
260
|
+
valid: boolean;
|
|
261
|
+
error?: string;
|
|
262
|
+
missing?: string[];
|
|
263
|
+
warnings?: string[];
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export type CoreVerifierId =
|
|
267
|
+
| 'ownership-basic'
|
|
268
|
+
| 'ownership-social' // Hosted OAuth social ownership
|
|
269
|
+
| 'ownership-pseudonym' // Pseudonymous identity verification
|
|
270
|
+
| 'ownership-org-oauth' // Hosted OAuth organization ownership
|
|
271
|
+
| 'nft-ownership'
|
|
272
|
+
| 'token-holding'
|
|
273
|
+
| 'ownership-dns-txt'
|
|
274
|
+
| 'wallet-link'
|
|
275
|
+
| 'contract-ownership'
|
|
276
|
+
| 'wallet-risk' // Wallet risk assessment
|
|
277
|
+
| 'proof-of-human' // Hosted ZK personhood verification
|
|
278
|
+
| 'agent-identity'
|
|
279
|
+
| 'agent-delegation'
|
|
280
|
+
| 'ai-content-moderation'
|
|
281
|
+
| string; // Allow custom verifier IDs
|
|
282
|
+
|
|
283
|
+
export type VerifierId = CoreVerifierId;
|
|
284
|
+
|
|
285
|
+
export type VerificationStatus =
|
|
286
|
+
| 'processing_verifiers'
|
|
287
|
+
| 'processing_zk_proofs'
|
|
288
|
+
| 'verified'
|
|
289
|
+
| 'verified_no_verifiers'
|
|
290
|
+
| 'verified_crosschain_initiated'
|
|
291
|
+
| 'verified_crosschain_propagating'
|
|
292
|
+
| 'verified_crosschain_propagated'
|
|
293
|
+
| 'partially_verified'
|
|
294
|
+
| 'verified_propagation_failed'
|
|
295
|
+
| 'rejected'
|
|
296
|
+
| 'rejected_verifier_failure'
|
|
297
|
+
| 'rejected_zk_initiation_failure'
|
|
298
|
+
| 'error_processing_exception'
|
|
299
|
+
| 'error_initialization'
|
|
300
|
+
| 'error_storage_unavailable'
|
|
301
|
+
| 'error_storage_query'
|
|
302
|
+
| 'not_found';
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
export function constructVerificationMessage(params: {
|
|
306
|
+
walletAddress: string;
|
|
307
|
+
signedTimestamp: number;
|
|
308
|
+
data: any;
|
|
309
|
+
verifierIds: VerifierId[];
|
|
310
|
+
chainId?: number;
|
|
311
|
+
chain?: string;
|
|
312
|
+
}): string;
|
|
313
|
+
|
|
314
|
+
export const PORTABLE_PROOF_SIGNER_HEADER: string;
|
|
315
|
+
|
|
316
|
+
export function validateWalletAddress(address: string): boolean;
|
|
317
|
+
|
|
318
|
+
export function validateUniversalAddress(address: string, chain?: string): boolean;
|
|
319
|
+
|
|
320
|
+
export function validateTimestamp(timestamp: number, maxAgeMs?: number): boolean;
|
|
321
|
+
|
|
322
|
+
export function validateQHash(qHash: string): boolean;
|
|
323
|
+
|
|
324
|
+
export function normalizeAddress(address: string): string;
|
|
325
|
+
|
|
326
|
+
export function resolveDID(
|
|
327
|
+
params: {
|
|
328
|
+
walletAddress?: string;
|
|
329
|
+
chainId?: number;
|
|
330
|
+
chain?: string;
|
|
331
|
+
},
|
|
332
|
+
options?: {
|
|
333
|
+
endpoint?: string;
|
|
334
|
+
apiUrl?: string;
|
|
335
|
+
credentials?: 'omit' | 'same-origin' | 'include';
|
|
336
|
+
headers?: Record<string, string>;
|
|
337
|
+
}
|
|
338
|
+
): Promise<{
|
|
339
|
+
did: string;
|
|
340
|
+
data: unknown;
|
|
341
|
+
raw: unknown;
|
|
342
|
+
}>;
|
|
343
|
+
|
|
344
|
+
export function standardizeVerificationRequest(
|
|
345
|
+
params: Record<string, any>,
|
|
346
|
+
options?: {
|
|
347
|
+
endpoint?: string;
|
|
348
|
+
apiUrl?: string;
|
|
349
|
+
credentials?: 'omit' | 'same-origin' | 'include';
|
|
350
|
+
headers?: Record<string, string>;
|
|
351
|
+
}
|
|
352
|
+
): Promise<any>;
|
|
353
|
+
|
|
354
|
+
export function resolveZkPassportConfig(overrides?: Record<string, any>): {
|
|
355
|
+
provider: string;
|
|
356
|
+
scope: string;
|
|
357
|
+
checkSanctions: boolean;
|
|
358
|
+
requireFaceMatch: boolean;
|
|
359
|
+
faceMatchMode: string;
|
|
360
|
+
[key: string]: any;
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
export function toHexUtf8(message: string): string;
|
|
364
|
+
|
|
365
|
+
export function signMessage(params: {
|
|
366
|
+
provider?: any;
|
|
367
|
+
message: string;
|
|
368
|
+
walletAddress?: string;
|
|
369
|
+
chain?: string;
|
|
370
|
+
}): Promise<string>;
|
|
371
|
+
|
|
372
|
+
export function validateVerifierPayload(verifierId: string, data: any): ValidationResult;
|
|
373
|
+
|
|
374
|
+
export function buildVerificationRequest(params: {
|
|
375
|
+
verifierIds: string[];
|
|
376
|
+
data: any;
|
|
377
|
+
walletAddress: string;
|
|
378
|
+
chainId?: number;
|
|
379
|
+
chain?: string;
|
|
380
|
+
options?: any;
|
|
381
|
+
signedTimestamp?: number;
|
|
382
|
+
}): { message: string; request: { verifierIds: string[]; data: any; walletAddress: string; signedTimestamp: number; chainId?: number; chain?: string; options?: any } };
|
|
383
|
+
|
|
384
|
+
export function isTerminalStatus(status: VerificationStatus): boolean;
|
|
385
|
+
|
|
386
|
+
export function isSuccessStatus(status: VerificationStatus): boolean;
|
|
387
|
+
|
|
388
|
+
export function isFailureStatus(status: VerificationStatus): boolean;
|
|
389
|
+
|
|
390
|
+
export function formatVerificationStatus(status: VerificationStatus): {
|
|
391
|
+
label: string;
|
|
392
|
+
description: string;
|
|
393
|
+
color: string;
|
|
394
|
+
category: string;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
export class StatusPoller {
|
|
398
|
+
constructor(client: NeusClient, qHash: string, options?: { interval?: number; maxAttempts?: number; exponentialBackoff?: boolean; maxInterval?: number });
|
|
399
|
+
poll(): Promise<StatusResult>;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export function formatTimestamp(timestamp: number): string;
|
|
403
|
+
|
|
404
|
+
export function isSupportedChain(chainId: number): boolean;
|
|
405
|
+
|
|
406
|
+
export function delay(ms: number): Promise<void>;
|
|
407
|
+
|
|
408
|
+
export function withRetry<T>(fn: () => Promise<T>, options?: {
|
|
409
|
+
maxAttempts?: number;
|
|
410
|
+
baseDelay?: number;
|
|
411
|
+
maxDelay?: number;
|
|
412
|
+
backoffFactor?: number;
|
|
413
|
+
}): Promise<T>;
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
export function toAgentDelegationMaxSpend(
|
|
417
|
+
humanAmount: string | number,
|
|
418
|
+
decimals: number
|
|
419
|
+
): string;
|
|
420
|
+
|
|
421
|
+
export const DEFAULT_HOSTED_VERIFY_URL: string;
|
|
422
|
+
|
|
423
|
+
export function getHostedCheckoutUrl(opts?: {
|
|
424
|
+
gateId?: string;
|
|
425
|
+
returnUrl?: string;
|
|
426
|
+
verifiers?: string[];
|
|
427
|
+
preset?: string;
|
|
428
|
+
mode?: string;
|
|
429
|
+
intent?: string;
|
|
430
|
+
origin?: string;
|
|
431
|
+
oauthProvider?: string;
|
|
432
|
+
baseUrl?: string;
|
|
433
|
+
}): string;
|
|
434
|
+
|
|
435
|
+
export type NeusPublicGateCharge = {
|
|
436
|
+
enabled: boolean;
|
|
437
|
+
scheme: string;
|
|
438
|
+
label: string;
|
|
439
|
+
amountUsd: number;
|
|
440
|
+
/** Payment methods offered to visitors: 'usdc' and/or 'stripe' (card). */
|
|
441
|
+
methods: Array<'usdc' | 'stripe' | string>;
|
|
442
|
+
/** True when the owner can receive card payouts (Stripe Connect ready). */
|
|
443
|
+
cardPayoutReady?: boolean;
|
|
444
|
+
appliesTo: string;
|
|
445
|
+
/** 'verifyThenCharge' (default) or 'chargeThenVerify'. */
|
|
446
|
+
executionOrder?: string;
|
|
447
|
+
recipient?: string;
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
/** One gate requirement row on the wire (protocol shape used by published gates). */
|
|
451
|
+
export interface GateMatchRowWire {
|
|
452
|
+
path: string;
|
|
453
|
+
op?: 'eq' | 'gte' | 'lte' | string;
|
|
454
|
+
value: string;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export interface GateRequirementWire {
|
|
458
|
+
verifierId: string;
|
|
459
|
+
match?: GateMatchRowWire[];
|
|
460
|
+
optional?: boolean;
|
|
461
|
+
minCount?: number;
|
|
462
|
+
maxAgeMs?: number;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/** Public snapshot returned by GET /api/v1/gates/{gateId} — never includes the secret reward value. */
|
|
466
|
+
export interface PublicGateSnapshot {
|
|
467
|
+
schemaVersion: number;
|
|
468
|
+
gateId: string;
|
|
469
|
+
name?: string;
|
|
470
|
+
status?: string;
|
|
471
|
+
version?: number;
|
|
472
|
+
requirements: GateRequirementWire[];
|
|
473
|
+
policy?: {
|
|
474
|
+
visibility?: string;
|
|
475
|
+
gateFreshnessHours?: number;
|
|
476
|
+
};
|
|
477
|
+
monetization?: {
|
|
478
|
+
charge?: NeusPublicGateCharge | null;
|
|
479
|
+
};
|
|
480
|
+
checkout?: {
|
|
481
|
+
mode?: string;
|
|
482
|
+
flowPlan?: {
|
|
483
|
+
batches?: number;
|
|
484
|
+
hasInteractive?: boolean;
|
|
485
|
+
hasBackground?: boolean;
|
|
486
|
+
};
|
|
487
|
+
description?: string;
|
|
488
|
+
successReturnUrl?: string;
|
|
489
|
+
};
|
|
490
|
+
marketplaceTemplate?: {
|
|
491
|
+
templateId: string;
|
|
492
|
+
label?: string;
|
|
493
|
+
tags?: string[];
|
|
494
|
+
};
|
|
495
|
+
schedule?: {
|
|
496
|
+
startsAt?: string;
|
|
497
|
+
endsAt?: string;
|
|
498
|
+
};
|
|
499
|
+
artifact?: {
|
|
500
|
+
type: string;
|
|
501
|
+
label?: string;
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export interface FulfillGateParams {
|
|
506
|
+
gateId: string;
|
|
507
|
+
/** Verified proof receipt id for this checkout. */
|
|
508
|
+
qHash: string;
|
|
509
|
+
/** Required when no session cookie binds the wallet. */
|
|
510
|
+
walletAddress?: string;
|
|
511
|
+
/** Stripe checkout session id for paid gates (card rail). */
|
|
512
|
+
paymentCheckoutSessionId?: string;
|
|
513
|
+
/** USDC payment transaction hash for paid gates (wallet rail). */
|
|
514
|
+
paymentTxHash?: string;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export interface GateFulfillmentResult {
|
|
518
|
+
delivery: 'access_granted' | 'redirect' | 'download' | 'reveal' | string;
|
|
519
|
+
type?: string;
|
|
520
|
+
value?: string;
|
|
521
|
+
label?: string;
|
|
522
|
+
message?: string;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export interface GateFulfillmentResponse {
|
|
526
|
+
success: boolean;
|
|
527
|
+
data?: {
|
|
528
|
+
gateId: string;
|
|
529
|
+
qHash: string;
|
|
530
|
+
fulfillment: GateFulfillmentResult;
|
|
531
|
+
successReturnUrl?: string;
|
|
532
|
+
};
|
|
533
|
+
error?: any;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
export const NEUS_CONSTANTS: {
|
|
537
|
+
HUB_CHAIN_ID: number;
|
|
538
|
+
TESTNET_CHAINS: number[];
|
|
539
|
+
API_BASE_URL: string;
|
|
540
|
+
API_VERSION: string;
|
|
541
|
+
SIGNATURE_MAX_AGE_MS: number;
|
|
542
|
+
REQUEST_TIMEOUT_MS: number;
|
|
543
|
+
DEFAULT_VERIFIERS: VerifierId[];
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
export class SDKError extends Error {
|
|
548
|
+
code: string;
|
|
549
|
+
details: any;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export class ApiError extends SDKError {
|
|
553
|
+
statusCode: number;
|
|
554
|
+
response: any;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export class ValidationError extends SDKError {
|
|
558
|
+
field?: string;
|
|
559
|
+
value?: any;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export class NetworkError extends SDKError {
|
|
563
|
+
originalError?: Error;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
export class ConfigurationError extends SDKError {
|
|
567
|
+
configKey?: string;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export class VerificationError extends SDKError {
|
|
571
|
+
verifierId?: string;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export class AuthenticationError extends SDKError {}
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
export interface GetProofsOptions {
|
|
578
|
+
limit?: number;
|
|
579
|
+
offset?: number;
|
|
580
|
+
cursor?: string;
|
|
581
|
+
chain?: string;
|
|
582
|
+
signatureMethod?: string;
|
|
583
|
+
q?: string;
|
|
584
|
+
qHash?: string;
|
|
585
|
+
verifierId?: string;
|
|
586
|
+
verifierIds?: string;
|
|
587
|
+
tags?: string;
|
|
588
|
+
tagPrefix?: string;
|
|
589
|
+
tagContains?: string;
|
|
590
|
+
tagPrefixesAll?: string;
|
|
591
|
+
status?: string;
|
|
592
|
+
appId?: string;
|
|
593
|
+
chainCoverage?: 'hub-only' | 'cross-chain';
|
|
594
|
+
privacyLevel?: 'public' | 'private';
|
|
595
|
+
includeHistory?: boolean;
|
|
596
|
+
includeFacets?: string;
|
|
597
|
+
visibility?: 'public';
|
|
598
|
+
isPublicRead?: boolean;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export interface ProofsResult {
|
|
602
|
+
success: boolean;
|
|
603
|
+
proofs: any[];
|
|
604
|
+
totalCount: number | null;
|
|
605
|
+
hasMore: boolean;
|
|
606
|
+
nextOffset?: number | null;
|
|
607
|
+
/** Keyset continuation when the API returns cursor paging (preferred over deep offsets). */
|
|
608
|
+
nextCursor?: string | null;
|
|
609
|
+
facets?: {
|
|
610
|
+
tags?: string[];
|
|
611
|
+
truncated?: boolean;
|
|
612
|
+
} | null;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
export interface GateRequirement {
|
|
616
|
+
verifierId: CoreVerifierId;
|
|
617
|
+
maxAgeMs?: number;
|
|
618
|
+
optional?: boolean;
|
|
619
|
+
minCount?: number;
|
|
620
|
+
/**
|
|
621
|
+
* Either the protocol wire shape (array of { path, op, value } rows — what
|
|
622
|
+
* published gates store) or a flat { path: value } map for client-side checks.
|
|
623
|
+
*/
|
|
624
|
+
match?: GateMatchRowWire[] | Record<string, any>;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
export interface CheckGateParams {
|
|
628
|
+
walletAddress: string;
|
|
629
|
+
requirements: GateRequirement[];
|
|
630
|
+
proofs?: any[];
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
export interface CheckGateResult {
|
|
634
|
+
satisfied: boolean;
|
|
635
|
+
missing: GateRequirement[];
|
|
636
|
+
existing: Record<string, any>;
|
|
637
|
+
allProofs: any[];
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
export interface GateCheckApiParams {
|
|
641
|
+
address: string;
|
|
642
|
+
/** Published gate handle; resolves checks server-side (preferred public path). */
|
|
643
|
+
gateId?: string;
|
|
644
|
+
verifierIds?: string[] | string;
|
|
645
|
+
requireAll?: boolean;
|
|
646
|
+
minCount?: number;
|
|
647
|
+
sinceDays?: number;
|
|
648
|
+
since?: number;
|
|
649
|
+
limit?: number;
|
|
650
|
+
includePrivate?: boolean;
|
|
651
|
+
includeQHashes?: boolean;
|
|
652
|
+
wallet?: WalletLike;
|
|
653
|
+
chain?: string;
|
|
654
|
+
signatureMethod?: string;
|
|
655
|
+
privateAuth?: GatePrivateAuth;
|
|
656
|
+
|
|
657
|
+
referenceType?: string;
|
|
658
|
+
referenceId?: string;
|
|
659
|
+
tag?: string;
|
|
660
|
+
tags?: string[] | string;
|
|
661
|
+
contentType?: string;
|
|
662
|
+
content?: string;
|
|
663
|
+
contentHash?: string;
|
|
664
|
+
|
|
665
|
+
contractAddress?: string;
|
|
666
|
+
tokenId?: string;
|
|
667
|
+
chainId?: number;
|
|
668
|
+
domain?: string;
|
|
669
|
+
minBalance?: string;
|
|
670
|
+
|
|
671
|
+
provider?: string;
|
|
672
|
+
handle?: string;
|
|
673
|
+
namespace?: string;
|
|
674
|
+
ownerAddress?: string;
|
|
675
|
+
riskLevel?: string;
|
|
676
|
+
sanctioned?: boolean;
|
|
677
|
+
poisoned?: boolean;
|
|
678
|
+
primaryWalletAddress?: string;
|
|
679
|
+
secondaryWalletAddress?: string;
|
|
680
|
+
verificationMethod?: string;
|
|
681
|
+
/** Personhood ID for proof-of-human sybil resistance matching (0x-prefixed 64-hex-char SHA-256 digest) */
|
|
682
|
+
neusPersonhoodId?: string;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
export interface GatePrivateAuth {
|
|
686
|
+
walletAddress: string;
|
|
687
|
+
signature: string;
|
|
688
|
+
signedTimestamp: number;
|
|
689
|
+
chain?: string;
|
|
690
|
+
signatureMethod?: string;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export interface GateCheckApiResponse {
|
|
694
|
+
success: boolean;
|
|
695
|
+
data?: {
|
|
696
|
+
eligible: boolean;
|
|
697
|
+
matchedCount?: number;
|
|
698
|
+
matchedQHashes?: string[];
|
|
699
|
+
matchedTags?: string[];
|
|
700
|
+
projections?: Array<Record<string, any>> | null;
|
|
701
|
+
criteria?: Record<string, any>;
|
|
702
|
+
/**
|
|
703
|
+
* Per-requirement gate evaluation — present whenever `gateId` was passed.
|
|
704
|
+
* `allRequiredSatisfied === true` is the ONLY readiness signal for gate
|
|
705
|
+
* checkout; `eligible`/`matchedCount` alone are not sufficient.
|
|
706
|
+
*/
|
|
707
|
+
gate?: {
|
|
708
|
+
gateId: string | null;
|
|
709
|
+
allRequiredSatisfied: boolean;
|
|
710
|
+
satisfiedVerifierIds: string[];
|
|
711
|
+
missingVerifierIds: string[];
|
|
712
|
+
/** verifierId → qHash map for `options.reusedVerifierProofs` on submit (requires includeQHashes=true). */
|
|
713
|
+
reusedVerifierProofs?: Record<string, string>;
|
|
714
|
+
/** Per-requirement rows (requires includeQHashes=true). */
|
|
715
|
+
rows?: Array<{
|
|
716
|
+
verifierId: string;
|
|
717
|
+
satisfied: boolean;
|
|
718
|
+
qHashes?: string[];
|
|
719
|
+
}>;
|
|
720
|
+
};
|
|
721
|
+
};
|
|
722
|
+
error?: any;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
export interface ApiResponse<T = any> {
|
|
727
|
+
success: boolean;
|
|
728
|
+
data?: T;
|
|
729
|
+
error?: any;
|
|
730
|
+
status?: string;
|
|
731
|
+
timestamp?: number;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
export const HOUR: number;
|
|
736
|
+
export const DAY: number;
|
|
737
|
+
export const WEEK: number;
|
|
738
|
+
export const MONTH: number;
|
|
739
|
+
export const YEAR: number;
|
|
740
|
+
|
|
741
|
+
export const GATE_NFT_HOLDER: GateRequirement[];
|
|
742
|
+
export const GATE_TOKEN_HOLDER: GateRequirement[];
|
|
743
|
+
export const GATE_CONTRACT_ADMIN: GateRequirement[];
|
|
744
|
+
export const GATE_DOMAIN_OWNER: GateRequirement[];
|
|
745
|
+
export const GATE_LINKED_WALLETS: GateRequirement[];
|
|
746
|
+
export const GATE_AGENT_IDENTITY: GateRequirement[];
|
|
747
|
+
export const GATE_AGENT_DELEGATION: GateRequirement[];
|
|
748
|
+
export const GATE_CONTENT_MODERATION: GateRequirement[];
|
|
749
|
+
export const GATE_WALLET_RISK: GateRequirement[];
|
|
750
|
+
export const GATE_PSEUDONYM: GateRequirement[];
|
|
751
|
+
|
|
752
|
+
export function createGate(
|
|
753
|
+
requirements: Array<CoreVerifierId | GateRequirement>
|
|
754
|
+
): GateRequirement[];
|
|
755
|
+
|
|
756
|
+
export function combineGates(
|
|
757
|
+
...gates: GateRequirement[][]
|
|
758
|
+
): GateRequirement[];
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
type OwnershipBasicData = {
|
|
762
|
+
owner: string;
|
|
763
|
+
content?: string;
|
|
764
|
+
contentHash?: string;
|
|
765
|
+
contentType?: string;
|
|
766
|
+
reference?: {
|
|
767
|
+
type:
|
|
768
|
+
| 'ipfs'
|
|
769
|
+
| 'ipfs-hash'
|
|
770
|
+
| 'url'
|
|
771
|
+
| 'license-nft'
|
|
772
|
+
| 'contract'
|
|
773
|
+
| 'qhash'
|
|
774
|
+
| 'ethereum-tx'
|
|
775
|
+
| 'on-chain-tx'
|
|
776
|
+
| 'tx'
|
|
777
|
+
| 'file'
|
|
778
|
+
| 'doc'
|
|
779
|
+
| 'media'
|
|
780
|
+
| 'username-claim'
|
|
781
|
+
| 'job'
|
|
782
|
+
| 'job-status'
|
|
783
|
+
| 'other';
|
|
784
|
+
id?: string;
|
|
785
|
+
title?: string;
|
|
786
|
+
description?: string;
|
|
787
|
+
mime?: string;
|
|
788
|
+
name?: string;
|
|
789
|
+
size?: number;
|
|
790
|
+
};
|
|
791
|
+
provenance?: {
|
|
792
|
+
declaredKind?: 'human' | 'ai' | 'mixed' | 'unknown';
|
|
793
|
+
aiContext?: {
|
|
794
|
+
generatorType?: 'local' | 'saas' | 'agent';
|
|
795
|
+
provider?: string;
|
|
796
|
+
model?: string;
|
|
797
|
+
runId?: string;
|
|
798
|
+
};
|
|
799
|
+
};
|
|
800
|
+
[key: string]: any;
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
type OwnershipPseudonymData = {
|
|
804
|
+
pseudonymId: string;
|
|
805
|
+
namespace?: string;
|
|
806
|
+
displayName?: string;
|
|
807
|
+
metadata?: Record<string, any>;
|
|
808
|
+
[key: string]: any;
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
type OwnershipDnsTxtData = {
|
|
812
|
+
domain: string;
|
|
813
|
+
walletAddress?: string;
|
|
814
|
+
[key: string]: any;
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
type ContractOwnershipData = {
|
|
818
|
+
contractAddress: string;
|
|
819
|
+
chainId: number;
|
|
820
|
+
walletAddress?: string;
|
|
821
|
+
method?: 'owner' | 'admin' | 'accessControl';
|
|
822
|
+
[key: string]: any;
|
|
823
|
+
};
|
|
824
|
+
|
|
825
|
+
type NftOwnershipData = {
|
|
826
|
+
ownerAddress?: string;
|
|
827
|
+
contractAddress: string;
|
|
828
|
+
tokenId: string;
|
|
829
|
+
tokenType?: 'erc721' | 'erc1155';
|
|
830
|
+
chainId?: number;
|
|
831
|
+
chain?: string;
|
|
832
|
+
blockNumber?: number;
|
|
833
|
+
[key: string]: any;
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
type TokenHoldingData = {
|
|
837
|
+
ownerAddress?: string;
|
|
838
|
+
contractAddress: string;
|
|
839
|
+
minBalance: string;
|
|
840
|
+
chainId?: number;
|
|
841
|
+
chain?: string;
|
|
842
|
+
blockNumber?: number;
|
|
843
|
+
[key: string]: any;
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
type WalletRiskData = {
|
|
847
|
+
walletAddress: string;
|
|
848
|
+
provider?: string;
|
|
849
|
+
chainId?: number;
|
|
850
|
+
chain?: string;
|
|
851
|
+
[key: string]: any;
|
|
852
|
+
};
|
|
853
|
+
|
|
854
|
+
type WalletLinkData = {
|
|
855
|
+
primaryWalletAddress?: string;
|
|
856
|
+
secondaryWalletAddress?: string;
|
|
857
|
+
primaryAccountId?: string;
|
|
858
|
+
secondaryAccountId?: string;
|
|
859
|
+
primaryChainRef?: string;
|
|
860
|
+
secondaryChainRef?: string;
|
|
861
|
+
signature: string;
|
|
862
|
+
chain?: string;
|
|
863
|
+
signatureMethod: string;
|
|
864
|
+
signedTimestamp: number;
|
|
865
|
+
relationshipType?: 'primary' | 'personal' | 'org' | 'affiliate' | 'agent' | 'linked';
|
|
866
|
+
label?: string;
|
|
867
|
+
[key: string]: any;
|
|
868
|
+
};
|
|
869
|
+
|
|
870
|
+
type AiContentModerationData = {
|
|
871
|
+
content: string;
|
|
872
|
+
contentType:
|
|
873
|
+
| 'image/jpeg'
|
|
874
|
+
| 'image/png'
|
|
875
|
+
| 'image/webp'
|
|
876
|
+
| 'image/gif'
|
|
877
|
+
| 'text/plain'
|
|
878
|
+
| 'text/markdown'
|
|
879
|
+
| 'text/x-markdown'
|
|
880
|
+
| 'application/json'
|
|
881
|
+
| 'application/xml';
|
|
882
|
+
provider?: 'google-vision' | 'google-perspective';
|
|
883
|
+
[key: string]: any;
|
|
884
|
+
};
|
|
885
|
+
|
|
886
|
+
type AgentSkillRef = {
|
|
887
|
+
id: string;
|
|
888
|
+
label?: string;
|
|
889
|
+
version?: string;
|
|
890
|
+
provider?: string;
|
|
891
|
+
kind?: 'native' | 'integration' | 'plugin' | 'mcp' | 'toolkit';
|
|
892
|
+
configId?: string;
|
|
893
|
+
enabled?: boolean;
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
type AgentIdentityData = {
|
|
897
|
+
agentId: string;
|
|
898
|
+
agentWallet: string;
|
|
899
|
+
agentChainRef: string;
|
|
900
|
+
agentAccountId?: string;
|
|
901
|
+
agentLabel?: string;
|
|
902
|
+
agentType?: 'ai' | 'bot' | 'service' | 'automation' | 'agent';
|
|
903
|
+
avatar?: string;
|
|
904
|
+
description?: string;
|
|
905
|
+
defaultRuntime?: {
|
|
906
|
+
provider?: string;
|
|
907
|
+
model?: string;
|
|
908
|
+
mode?: string;
|
|
909
|
+
};
|
|
910
|
+
capabilities?: Record<string, boolean>;
|
|
911
|
+
instructions?: string;
|
|
912
|
+
skills?: AgentSkillRef[];
|
|
913
|
+
services?: Array<{
|
|
914
|
+
name: string;
|
|
915
|
+
endpoint: string;
|
|
916
|
+
version?: string;
|
|
917
|
+
}>;
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
type AgentDelegationData = {
|
|
921
|
+
controllerWallet: string;
|
|
922
|
+
controllerChainRef: string;
|
|
923
|
+
agentWallet: string;
|
|
924
|
+
agentChainRef: string;
|
|
925
|
+
controllerAccountId?: string;
|
|
926
|
+
agentAccountId?: string;
|
|
927
|
+
agentId?: string;
|
|
928
|
+
scope?: string;
|
|
929
|
+
permissions?: string[];
|
|
930
|
+
maxSpend?: string;
|
|
931
|
+
allowedPaymentTypes?: string[];
|
|
932
|
+
receiptDisclosure?: 'none' | 'summary' | 'full';
|
|
933
|
+
expiresAt?: number;
|
|
934
|
+
instructions?: string;
|
|
935
|
+
skills?: AgentSkillRef[];
|
|
936
|
+
model?: string;
|
|
937
|
+
provider?: string;
|
|
938
|
+
runtimePolicy?: {
|
|
939
|
+
allowedProviders?: string[];
|
|
940
|
+
allowedModelClasses?: string[];
|
|
941
|
+
requiresHumanApproval?: boolean;
|
|
942
|
+
secretsExposedToReceipt?: boolean;
|
|
943
|
+
};
|
|
944
|
+
allowedActions?: string[];
|
|
945
|
+
deniedActions?: string[];
|
|
946
|
+
approvalPolicy?: {
|
|
947
|
+
humanApprovalRequiredForNewClaims?: boolean;
|
|
948
|
+
preApprovedContentOnly?: boolean;
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
|
|
952
|
+
type CoreVerificationData =
|
|
953
|
+
| OwnershipBasicData
|
|
954
|
+
| OwnershipPseudonymData
|
|
955
|
+
| OwnershipDnsTxtData
|
|
956
|
+
| ContractOwnershipData
|
|
957
|
+
| NftOwnershipData
|
|
958
|
+
| TokenHoldingData
|
|
959
|
+
| WalletRiskData
|
|
960
|
+
| WalletLinkData
|
|
961
|
+
| AiContentModerationData
|
|
962
|
+
| AgentIdentityData
|
|
963
|
+
| AgentDelegationData;
|
|
964
|
+
|
|
965
|
+
type VerificationData =
|
|
966
|
+
| CoreVerificationData
|
|
967
|
+
| Record<string, CoreVerificationData>
|
|
968
|
+
| Record<string, any>;
|
|
969
|
+
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
interface VerifyOptions {
|
|
973
|
+
targetChains?: number[];
|
|
974
|
+
/** Anchor the receipt on the hub registry chain. Defaults to false (receipts persist offchain). */
|
|
975
|
+
publishToHub?: boolean;
|
|
976
|
+
enableIpfs?: boolean;
|
|
977
|
+
privacyLevel?: 'private' | 'public';
|
|
978
|
+
publicDisplay?: boolean;
|
|
979
|
+
storeOriginalContent?: boolean;
|
|
980
|
+
meta?: {
|
|
981
|
+
title?: string;
|
|
982
|
+
description?: string;
|
|
983
|
+
displayName?: string;
|
|
984
|
+
contentText?: string;
|
|
985
|
+
contentType?: string;
|
|
986
|
+
contentDescription?: string;
|
|
987
|
+
license?: string;
|
|
988
|
+
publicContentLicense?: string;
|
|
989
|
+
publicContentDisclaimer?: string;
|
|
990
|
+
legal?: string;
|
|
991
|
+
source?: string;
|
|
992
|
+
campaign?: string;
|
|
993
|
+
tags?: string[];
|
|
994
|
+
category?: string;
|
|
995
|
+
};
|
|
996
|
+
reference?: {
|
|
997
|
+
type:
|
|
998
|
+
| 'ipfs'
|
|
999
|
+
| 'ipfs-hash'
|
|
1000
|
+
| 'url'
|
|
1001
|
+
| 'license-nft'
|
|
1002
|
+
| 'contract'
|
|
1003
|
+
| 'qhash'
|
|
1004
|
+
| 'ethereum-tx'
|
|
1005
|
+
| 'on-chain-tx'
|
|
1006
|
+
| 'tx'
|
|
1007
|
+
| 'file'
|
|
1008
|
+
| 'doc'
|
|
1009
|
+
| 'media'
|
|
1010
|
+
| 'username-claim'
|
|
1011
|
+
| 'job'
|
|
1012
|
+
| 'job-status'
|
|
1013
|
+
| 'other';
|
|
1014
|
+
id?: string;
|
|
1015
|
+
title?: string;
|
|
1016
|
+
description?: string;
|
|
1017
|
+
mime?: string;
|
|
1018
|
+
name?: string;
|
|
1019
|
+
size?: number;
|
|
1020
|
+
};
|
|
1021
|
+
verifierOptions?: Record<string, any>;
|
|
1022
|
+
identity?: { pseudonym?: string; socials?: Record<string, string> };
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
declare module '@neus/sdk/widgets' {
|
|
1029
|
+
export interface VerifyGateProps {
|
|
1030
|
+
/** Published gate checkout handle (default integration path). */
|
|
1031
|
+
gateId?: string;
|
|
1032
|
+
requiredVerifiers?: string[];
|
|
1033
|
+
onVerified?: (result: {
|
|
1034
|
+
qHash: string;
|
|
1035
|
+
qHashes?: string[];
|
|
1036
|
+
address?: string;
|
|
1037
|
+
txHash?: string | null;
|
|
1038
|
+
verifierIds: string[];
|
|
1039
|
+
verifiedVerifiers?: any[];
|
|
1040
|
+
proofUrl?: string | null;
|
|
1041
|
+
existing?: boolean;
|
|
1042
|
+
eligible?: boolean;
|
|
1043
|
+
mode?: 'create' | 'access';
|
|
1044
|
+
data?: any;
|
|
1045
|
+
results?: Array<{
|
|
1046
|
+
verifierId: string;
|
|
1047
|
+
qHash: string;
|
|
1048
|
+
address?: string;
|
|
1049
|
+
txHash?: string | null;
|
|
1050
|
+
verifiedVerifiers?: any[];
|
|
1051
|
+
proofUrl?: string | null;
|
|
1052
|
+
}>;
|
|
1053
|
+
proofsByVerifierId?: Record<string, any>;
|
|
1054
|
+
}) => void;
|
|
1055
|
+
apiUrl?: string;
|
|
1056
|
+
appId?: string;
|
|
1057
|
+
paymentSignature?: string;
|
|
1058
|
+
extraHeaders?: Record<string, string>;
|
|
1059
|
+
hostedCheckoutUrl?: string;
|
|
1060
|
+
oauthProvider?: string;
|
|
1061
|
+
style?: Record<string, any>;
|
|
1062
|
+
children?: any;
|
|
1063
|
+
strategy?: 'reuse-or-create' | 'reuse' | 'fresh';
|
|
1064
|
+
checkExisting?: boolean;
|
|
1065
|
+
allowPrivateReuse?: boolean;
|
|
1066
|
+
showBrand?: boolean;
|
|
1067
|
+
disabled?: boolean;
|
|
1068
|
+
buttonText?: string;
|
|
1069
|
+
mode?: 'create' | 'access';
|
|
1070
|
+
qHash?: string | null;
|
|
1071
|
+
wallet?: WalletLike | any;
|
|
1072
|
+
chain?: string;
|
|
1073
|
+
signatureMethod?: string;
|
|
1074
|
+
onStateChange?: (state: string) => void;
|
|
1075
|
+
onError?: (error: Error) => void;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
export function VerifyGate(props: VerifyGateProps): any;
|
|
1079
|
+
|
|
1080
|
+
export interface ProofBadgeProps {
|
|
1081
|
+
qHash?: string;
|
|
1082
|
+
proofUrlPattern?: string;
|
|
1083
|
+
size?: 'sm' | 'md';
|
|
1084
|
+
uiLinkBase?: string;
|
|
1085
|
+
apiUrl?: string;
|
|
1086
|
+
proof?: any;
|
|
1087
|
+
showChains?: boolean;
|
|
1088
|
+
showLabel?: boolean;
|
|
1089
|
+
logoUrl?: string;
|
|
1090
|
+
onClick?: (data: { qHash: string; status: string; chainCount?: number }) => void;
|
|
1091
|
+
className?: string;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
export function ProofBadge(props: ProofBadgeProps): any;
|
|
1095
|
+
|
|
1096
|
+
export interface SimpleProofBadgeProps {
|
|
1097
|
+
qHash?: string;
|
|
1098
|
+
proofUrlPattern?: string;
|
|
1099
|
+
uiLinkBase?: string;
|
|
1100
|
+
apiUrl?: string;
|
|
1101
|
+
size?: 'sm' | 'md';
|
|
1102
|
+
label?: string;
|
|
1103
|
+
logoUrl?: string;
|
|
1104
|
+
proof?: any;
|
|
1105
|
+
onClick?: (data: { qHash: string; status: string }) => void;
|
|
1106
|
+
className?: string;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
export function SimpleProofBadge(props: SimpleProofBadgeProps): any;
|
|
1110
|
+
|
|
1111
|
+
export interface NeusPillLinkProps {
|
|
1112
|
+
qHash?: string;
|
|
1113
|
+
proofUrlPattern?: string;
|
|
1114
|
+
uiLinkBase?: string;
|
|
1115
|
+
label?: string;
|
|
1116
|
+
size?: 'sm' | 'md';
|
|
1117
|
+
logoUrl?: string;
|
|
1118
|
+
onClick?: (data: { qHash?: string }) => void;
|
|
1119
|
+
className?: string;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
export function NeusPillLink(props: NeusPillLinkProps): any;
|
|
1123
|
+
|
|
1124
|
+
export interface VerifiedIconProps {
|
|
1125
|
+
qHash?: string;
|
|
1126
|
+
proofUrlPattern?: string;
|
|
1127
|
+
uiLinkBase?: string;
|
|
1128
|
+
size?: number;
|
|
1129
|
+
logoUrl?: string;
|
|
1130
|
+
tooltip?: string;
|
|
1131
|
+
onClick?: (data: { qHash?: string }) => void;
|
|
1132
|
+
className?: string;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
export function VerifiedIcon(props: VerifiedIconProps): any;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
declare module '@neus/sdk/widgets/verify-gate' {
|
|
1139
|
+
export * from '@neus/sdk/widgets';
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
declare module '@neus/sdk/client' {
|
|
1143
|
+
export { NeusClient } from '@neus/sdk';
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1003
1146
|
declare module '@neus/sdk/mcp-hosts' {
|
|
1004
1147
|
export type McpInstallClient = 'claude' | 'codex' | 'cursor' | 'vscode';
|
|
1005
1148
|
export type McpInstallHost = 'cursor' | 'claude' | 'codex';
|
|
@@ -1011,18 +1154,18 @@ declare module '@neus/sdk/mcp-hosts' {
|
|
|
1011
1154
|
export const NEUS_MCP_SETUP_DOCS_URL: string;
|
|
1012
1155
|
export const MCP_INSTALL_CLIENTS: McpInstallClient[];
|
|
1013
1156
|
export const MCP_INSTALL_HOSTS: McpInstallHost[];
|
|
1014
|
-
export const IDE_HOST_LABELS: Record<McpInstallHost, string>;
|
|
1015
|
-
export const IDE_HOST_BRAND_LOGOS: Record<McpInstallHost, string>;
|
|
1016
|
-
|
|
1017
|
-
export function buildNeusMcpHttpConfig(accessKey?: string | null): {
|
|
1018
|
-
type: 'http';
|
|
1019
|
-
url: string;
|
|
1020
|
-
headers?: { Authorization: string };
|
|
1021
|
-
};
|
|
1022
|
-
|
|
1023
|
-
export function buildCursorMcpInstallUrl(accessKey?: string | null): string;
|
|
1024
|
-
export function buildVsCodeMcpInstallUrl(accessKey?: string | null): string;
|
|
1025
|
-
export function buildAuthCommandForClient(client: McpInstallClient): string;
|
|
1157
|
+
export const IDE_HOST_LABELS: Record<McpInstallHost, string>;
|
|
1158
|
+
export const IDE_HOST_BRAND_LOGOS: Record<McpInstallHost, string>;
|
|
1159
|
+
|
|
1160
|
+
export function buildNeusMcpHttpConfig(accessKey?: string | null): {
|
|
1161
|
+
type: 'http';
|
|
1162
|
+
url: string;
|
|
1163
|
+
headers?: { Authorization: string };
|
|
1164
|
+
};
|
|
1165
|
+
|
|
1166
|
+
export function buildCursorMcpInstallUrl(accessKey?: string | null): string;
|
|
1167
|
+
export function buildVsCodeMcpInstallUrl(accessKey?: string | null): string;
|
|
1168
|
+
export function buildAuthCommandForClient(client: McpInstallClient): string;
|
|
1026
1169
|
export function buildSetupCommandForClient(client: McpInstallClient, accessKey?: string | null): string;
|
|
1027
1170
|
export function buildSetupCommandForHost(host: McpInstallHost, accessKey?: string | null): string;
|
|
1028
1171
|
export function supportsMcpInstallDeeplink(host: McpInstallHost): boolean;
|