@zkp2p/zkp2p-attestation 3.0.0 → 3.1.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/CHANGELOG.md +10 -0
- package/README.md +54 -11
- package/dist/cli/verify.js +0 -2
- package/dist/cli/verify.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +114 -21
- package/dist/index.d.ts +114 -21
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -8,6 +8,7 @@ type SellerCredentialUploadPlatform = "venmo" | "cashapp" | "wise" | "paypal" |
|
|
|
8
8
|
type PayeeIdSellerCredentialUploadPlatform = Exclude<SellerCredentialUploadPlatform, "wise" | "monobank">;
|
|
9
9
|
type IdentityRequestPlatform = "venmo" | "paypal" | "wise" | "cashapp" | "alipay";
|
|
10
10
|
type IdentityPlatform = IdentityRequestPlatform | "monobank";
|
|
11
|
+
type DisputePlatform = "venmo" | "paypal";
|
|
11
12
|
type BuyerTeeSessionMaterialPlatform = "venmo" | "cashapp" | "monzo" | "wise" | "revolut" | "chime" | "zelle" | "paypal" | "monobank" | "alipay";
|
|
12
13
|
type BuyerTeeHeaderMap = Record<string, string>;
|
|
13
14
|
type RequiredBuyerTeeHeaders<K extends string> = BuyerTeeHeaderMap & {
|
|
@@ -60,6 +61,10 @@ interface CashAppIdentitySessionMaterial {
|
|
|
60
61
|
}
|
|
61
62
|
/** Captured Alipay identity request headers; type requires `Cookie`. */
|
|
62
63
|
type AlipayIdentitySessionMaterial = RequiredBuyerTeeHeaders<"Cookie">;
|
|
64
|
+
/** Complete RFC 5322 dispute email, including authenticated headers and body. */
|
|
65
|
+
interface DisputeEmailSessionMaterial {
|
|
66
|
+
rawEmail: string;
|
|
67
|
+
}
|
|
63
68
|
interface VenmoBuyerTeeParams {
|
|
64
69
|
SENDER_ID: string;
|
|
65
70
|
index: number;
|
|
@@ -137,6 +142,10 @@ interface IdentityActionTypeByPlatform {
|
|
|
137
142
|
monobank: "register_monobank";
|
|
138
143
|
alipay: "register_alipay";
|
|
139
144
|
}
|
|
145
|
+
interface DisputeActionTypeByPlatform {
|
|
146
|
+
venmo: "dispute_venmo";
|
|
147
|
+
paypal: "dispute_paypal";
|
|
148
|
+
}
|
|
140
149
|
interface BuyerTeeSessionMaterialByPlatform {
|
|
141
150
|
venmo: VenmoBuyerTeeSessionMaterial;
|
|
142
151
|
cashapp: CashAppBuyerTeeSessionMaterial;
|
|
@@ -156,6 +165,10 @@ interface IdentitySessionMaterialByPlatform {
|
|
|
156
165
|
cashapp: CashAppIdentitySessionMaterial;
|
|
157
166
|
alipay: AlipayIdentitySessionMaterial;
|
|
158
167
|
}
|
|
168
|
+
interface DisputeSessionMaterialByPlatform {
|
|
169
|
+
venmo: DisputeEmailSessionMaterial;
|
|
170
|
+
paypal: DisputeEmailSessionMaterial;
|
|
171
|
+
}
|
|
159
172
|
interface BuyerTeeParamsByPlatform {
|
|
160
173
|
venmo: VenmoBuyerTeeParams;
|
|
161
174
|
cashapp: CashAppBuyerTeeParams;
|
|
@@ -175,12 +188,17 @@ interface IdentityParamsByPlatform {
|
|
|
175
188
|
cashapp: CashAppIdentityParams;
|
|
176
189
|
alipay: AlipayIdentityParams;
|
|
177
190
|
}
|
|
191
|
+
interface DisputeParamsByPlatform {
|
|
192
|
+
venmo: Record<string, never>;
|
|
193
|
+
paypal: Record<string, never>;
|
|
194
|
+
}
|
|
178
195
|
/**
|
|
179
196
|
* Flat buyer TEE action union. Prefer `BuyerTeeActionTypeByPlatform[P]`
|
|
180
197
|
* so the action remains tied to its platform.
|
|
181
198
|
*/
|
|
182
199
|
type BuyerTeeActionType = BuyerTeeActionTypeByPlatform[BuyerTeeSessionMaterialPlatform];
|
|
183
200
|
type IdentityActionType = IdentityActionTypeByPlatform[IdentityPlatform];
|
|
201
|
+
type DisputeActionType = DisputeActionTypeByPlatform[DisputePlatform];
|
|
184
202
|
interface WiseSellerCredentialSessionMaterial {
|
|
185
203
|
apiToken: string;
|
|
186
204
|
profileId?: string;
|
|
@@ -221,12 +239,20 @@ type BuyerTeeVerifyPaymentPayloadFor<P extends BuyerTeeSessionMaterialPlatform>
|
|
|
221
239
|
type IdentitySessionMaterialPayloadFor<P extends IdentityRequestPlatform> = {
|
|
222
240
|
platform: P;
|
|
223
241
|
actionType: IdentityActionTypeByPlatform[P];
|
|
224
|
-
callerAddress: string;
|
|
225
242
|
sessionMaterial: IdentitySessionMaterialByPlatform[P];
|
|
226
243
|
};
|
|
227
244
|
type IdentityAttestationRequestPayloadFor<P extends IdentityRequestPlatform> = IdentitySessionMaterialPayloadFor<P> & {
|
|
245
|
+
callerAddress: string;
|
|
228
246
|
params: IdentityParamsByPlatform[P];
|
|
229
247
|
};
|
|
248
|
+
type DisputeSessionMaterialPayloadFor<P extends DisputePlatform> = {
|
|
249
|
+
platform: P;
|
|
250
|
+
actionType: DisputeActionTypeByPlatform[P];
|
|
251
|
+
sessionMaterial: DisputeSessionMaterialByPlatform[P];
|
|
252
|
+
};
|
|
253
|
+
type DisputeVerifyPayloadFor<P extends DisputePlatform> = DisputeSessionMaterialPayloadFor<P> & {
|
|
254
|
+
params: DisputeParamsByPlatform[P];
|
|
255
|
+
};
|
|
230
256
|
type BuyerTeeSessionMaterialPayload = {
|
|
231
257
|
[P in BuyerTeeSessionMaterialPlatform]: BuyerTeeSessionMaterialPayloadFor<P>;
|
|
232
258
|
}[BuyerTeeSessionMaterialPlatform];
|
|
@@ -239,6 +265,12 @@ type IdentitySessionMaterialPayload = {
|
|
|
239
265
|
type IdentityAttestationRequestPayload = {
|
|
240
266
|
[P in IdentityRequestPlatform]: IdentityAttestationRequestPayloadFor<P>;
|
|
241
267
|
}[IdentityRequestPlatform];
|
|
268
|
+
type DisputeSessionMaterialPayload = {
|
|
269
|
+
[P in DisputePlatform]: DisputeSessionMaterialPayloadFor<P>;
|
|
270
|
+
}[DisputePlatform];
|
|
271
|
+
type DisputeVerifyPayload = {
|
|
272
|
+
[P in DisputePlatform]: DisputeVerifyPayloadFor<P>;
|
|
273
|
+
}[DisputePlatform];
|
|
242
274
|
type VenmoBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"venmo">;
|
|
243
275
|
type CashAppBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"cashapp">;
|
|
244
276
|
type MonzoBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"monzo">;
|
|
@@ -254,6 +286,8 @@ type PayPalIdentitySessionMaterialPayload = IdentitySessionMaterialPayloadFor<"p
|
|
|
254
286
|
type WiseIdentitySessionMaterialPayload = IdentitySessionMaterialPayloadFor<"wise">;
|
|
255
287
|
type CashAppIdentitySessionMaterialPayload = IdentitySessionMaterialPayloadFor<"cashapp">;
|
|
256
288
|
type AlipayIdentitySessionMaterialPayload = IdentitySessionMaterialPayloadFor<"alipay">;
|
|
289
|
+
type VenmoDisputeSessionMaterialPayload = DisputeSessionMaterialPayloadFor<"venmo">;
|
|
290
|
+
type PayPalDisputeSessionMaterialPayload = DisputeSessionMaterialPayloadFor<"paypal">;
|
|
257
291
|
interface IntentDetails {
|
|
258
292
|
intentHash: string;
|
|
259
293
|
amount: string;
|
|
@@ -285,6 +319,10 @@ interface IdentityTypedDataValue {
|
|
|
285
319
|
issuedAt: string;
|
|
286
320
|
validUntil: string;
|
|
287
321
|
}
|
|
322
|
+
interface DisputeTypedDataValue {
|
|
323
|
+
intentHash: string;
|
|
324
|
+
dataHash: string;
|
|
325
|
+
}
|
|
288
326
|
interface AttestationOutput<P extends string = string, A extends string = string> {
|
|
289
327
|
platform: P;
|
|
290
328
|
actionType: A;
|
|
@@ -326,6 +364,28 @@ type BuyerTeeAttestationOutputFor<P extends BuyerTeeSessionMaterialPlatform> = A
|
|
|
326
364
|
type BuyerTeeAttestationOutput = {
|
|
327
365
|
[P in BuyerTeeSessionMaterialPlatform]: BuyerTeeAttestationOutputFor<P>;
|
|
328
366
|
}[BuyerTeeSessionMaterialPlatform];
|
|
367
|
+
interface DisputeDetails {
|
|
368
|
+
paymentMethod: string;
|
|
369
|
+
originalPaymentId: string;
|
|
370
|
+
disputeId: string;
|
|
371
|
+
paymentAmount: string;
|
|
372
|
+
paymentCurrency: string;
|
|
373
|
+
}
|
|
374
|
+
interface DisputeAttestationOutputFor<P extends DisputePlatform> {
|
|
375
|
+
platform: P;
|
|
376
|
+
actionType: DisputeActionTypeByPlatform[P];
|
|
377
|
+
signature: string;
|
|
378
|
+
signer: string;
|
|
379
|
+
domainSeparator: string;
|
|
380
|
+
typeHash: string;
|
|
381
|
+
typedDataSpec: TypedDataSpec;
|
|
382
|
+
typedDataValue: DisputeTypedDataValue;
|
|
383
|
+
encodedDisputeDetails: string;
|
|
384
|
+
disputeDetails: DisputeDetails;
|
|
385
|
+
}
|
|
386
|
+
type DisputeAttestationOutput = {
|
|
387
|
+
[P in DisputePlatform]: DisputeAttestationOutputFor<P>;
|
|
388
|
+
}[DisputePlatform];
|
|
329
389
|
type BuyerTeeVerifier = {
|
|
330
390
|
[P in BuyerTeeSessionMaterialPlatform]: {
|
|
331
391
|
key: string;
|
|
@@ -366,6 +426,7 @@ interface UnifiedPaymentVerifierDomain {
|
|
|
366
426
|
chainId: number;
|
|
367
427
|
verifyingContract: string;
|
|
368
428
|
}
|
|
429
|
+
type DisputeVerifierDomain = UnifiedPaymentVerifierDomain;
|
|
369
430
|
interface VerifyBuyerTeePaymentAttestationOptionsFor<P extends BuyerTeeSessionMaterialPlatform> {
|
|
370
431
|
trustedSigners: readonly string[];
|
|
371
432
|
expectedPlatform: P;
|
|
@@ -376,6 +437,16 @@ interface VerifyBuyerTeePaymentAttestationOptionsFor<P extends BuyerTeeSessionMa
|
|
|
376
437
|
type VerifyBuyerTeePaymentAttestationOptions = {
|
|
377
438
|
[P in BuyerTeeSessionMaterialPlatform]: VerifyBuyerTeePaymentAttestationOptionsFor<P>;
|
|
378
439
|
}[BuyerTeeSessionMaterialPlatform];
|
|
440
|
+
interface VerifyDisputeAttestationOptionsFor<P extends DisputePlatform> {
|
|
441
|
+
trustedSigners: readonly string[];
|
|
442
|
+
expectedPlatform: P;
|
|
443
|
+
expectedActionType: DisputeActionTypeByPlatform[P];
|
|
444
|
+
expectedDomain: DisputeVerifierDomain;
|
|
445
|
+
expectedIntentHash: string;
|
|
446
|
+
}
|
|
447
|
+
type VerifyDisputeAttestationOptions = {
|
|
448
|
+
[P in DisputePlatform]: VerifyDisputeAttestationOptionsFor<P>;
|
|
449
|
+
}[DisputePlatform];
|
|
379
450
|
interface VerifyIdentityAttestationOptionsFor<P extends IdentityPlatform> {
|
|
380
451
|
trustedSigners: readonly string[];
|
|
381
452
|
expectedPlatform: P;
|
|
@@ -396,39 +467,42 @@ interface VerifySellerCredentialBundleOptionsFor<P extends SellerCredentialUploa
|
|
|
396
467
|
type VerifySellerCredentialBundleOptions = {
|
|
397
468
|
[P in SellerCredentialUploadPlatform]: VerifySellerCredentialBundleOptionsFor<P>;
|
|
398
469
|
}[SellerCredentialUploadPlatform];
|
|
399
|
-
type CreateEncryptedSellerCredentialUploadParams =
|
|
400
|
-
type CreateEncryptedIdentitySessionMaterialParamsFor<P extends IdentityRequestPlatform> =
|
|
470
|
+
type CreateEncryptedSellerCredentialUploadParams = SellerCredentialRequestBaseParams & SellerCredentialUploadPayload;
|
|
471
|
+
type CreateEncryptedIdentitySessionMaterialParamsFor<P extends IdentityRequestPlatform> = AttestationServiceRequestBaseParams & IdentitySessionMaterialPayloadFor<P>;
|
|
401
472
|
type CreateEncryptedIdentitySessionMaterialParams = {
|
|
402
473
|
[P in IdentityRequestPlatform]: CreateEncryptedIdentitySessionMaterialParamsFor<P>;
|
|
403
474
|
}[IdentityRequestPlatform];
|
|
404
|
-
type CreateEncryptedBuyerTeeSessionMaterialParamsFor<P extends BuyerTeeSessionMaterialPlatform> =
|
|
475
|
+
type CreateEncryptedBuyerTeeSessionMaterialParamsFor<P extends BuyerTeeSessionMaterialPlatform> = AttestationServiceRequestBaseParams & BuyerTeeSessionMaterialPayloadFor<P>;
|
|
405
476
|
type CreateEncryptedBuyerTeeSessionMaterialParams = {
|
|
406
477
|
[P in BuyerTeeSessionMaterialPlatform]: CreateEncryptedBuyerTeeSessionMaterialParamsFor<P>;
|
|
407
478
|
}[BuyerTeeSessionMaterialPlatform];
|
|
408
|
-
type
|
|
479
|
+
type CreateEncryptedDisputeSessionMaterialParamsFor<P extends DisputePlatform> = AttestationServiceRequestBaseParams & DisputeSessionMaterialPayloadFor<P>;
|
|
480
|
+
type CreateEncryptedDisputeSessionMaterialParams = {
|
|
481
|
+
[P in DisputePlatform]: CreateEncryptedDisputeSessionMaterialParamsFor<P>;
|
|
482
|
+
}[DisputePlatform];
|
|
483
|
+
type VerifyBuyerTeePaymentParamsFor<P extends BuyerTeeSessionMaterialPlatform> = AttestationServiceRequestBaseParams & BuyerTeeVerifyPaymentPayloadFor<P> & {
|
|
409
484
|
chainId: number;
|
|
410
485
|
intent: IntentDetails;
|
|
411
486
|
};
|
|
412
487
|
type VerifyBuyerTeePaymentParams = {
|
|
413
488
|
[P in BuyerTeeSessionMaterialPlatform]: VerifyBuyerTeePaymentParamsFor<P>;
|
|
414
489
|
}[BuyerTeeSessionMaterialPlatform];
|
|
415
|
-
type RequestIdentityAttestationParamsFor<P extends IdentityRequestPlatform> =
|
|
490
|
+
type RequestIdentityAttestationParamsFor<P extends IdentityRequestPlatform> = AttestationServiceRequestBaseParams & IdentityAttestationRequestPayloadFor<P>;
|
|
416
491
|
type RequestIdentityAttestationParams = {
|
|
417
492
|
[P in IdentityRequestPlatform]: RequestIdentityAttestationParamsFor<P>;
|
|
418
493
|
}[IdentityRequestPlatform];
|
|
419
|
-
type
|
|
420
|
-
|
|
421
|
-
|
|
494
|
+
type VerifyDisputeParamsFor<P extends DisputePlatform> = AttestationServiceRequestBaseParams & DisputeVerifyPayloadFor<P> & {
|
|
495
|
+
chainId: number;
|
|
496
|
+
intentHash: string;
|
|
497
|
+
};
|
|
498
|
+
type VerifyDisputeParams = {
|
|
499
|
+
[P in DisputePlatform]: VerifyDisputeParamsFor<P>;
|
|
500
|
+
}[DisputePlatform];
|
|
501
|
+
type UploadSellerCredentialParams = SellerCredentialRequestBaseParams & UploadSellerCredentialPayload;
|
|
502
|
+
interface SellerCredentialRequestBaseParams extends AttestationServiceRequestBaseParams {
|
|
422
503
|
callerAddress?: string;
|
|
423
|
-
trust?: TrustPins;
|
|
424
|
-
fetch?: typeof fetch;
|
|
425
|
-
subtle?: SubtleCrypto;
|
|
426
|
-
getRandomValues?: (out: Uint8Array) => Uint8Array;
|
|
427
|
-
now?: () => number;
|
|
428
|
-
onWarning?: (warning: NitroAttestationWarning) => void;
|
|
429
|
-
timeoutMs?: number;
|
|
430
504
|
}
|
|
431
|
-
interface
|
|
505
|
+
interface AttestationServiceRequestBaseParams {
|
|
432
506
|
attestationServiceUrl: string;
|
|
433
507
|
trust?: TrustPins;
|
|
434
508
|
fetch?: typeof fetch;
|
|
@@ -471,14 +545,18 @@ interface VerifiedAttestationPayload {
|
|
|
471
545
|
};
|
|
472
546
|
}
|
|
473
547
|
type EncryptSellerCredentialUploadParams = EncryptSellerCredentialUploadBaseParams & SellerCredentialUploadPayload;
|
|
474
|
-
type EncryptBuyerTeeSessionMaterialParamsFor<P extends BuyerTeeSessionMaterialPlatform> =
|
|
548
|
+
type EncryptBuyerTeeSessionMaterialParamsFor<P extends BuyerTeeSessionMaterialPlatform> = EncryptTeeSessionMaterialBaseParams & BuyerTeeSessionMaterialPayloadFor<P>;
|
|
475
549
|
type EncryptBuyerTeeSessionMaterialParams = {
|
|
476
550
|
[P in BuyerTeeSessionMaterialPlatform]: EncryptBuyerTeeSessionMaterialParamsFor<P>;
|
|
477
551
|
}[BuyerTeeSessionMaterialPlatform];
|
|
478
|
-
type EncryptIdentitySessionMaterialParamsFor<P extends IdentityRequestPlatform> =
|
|
552
|
+
type EncryptIdentitySessionMaterialParamsFor<P extends IdentityRequestPlatform> = EncryptTeeSessionMaterialBaseParams & IdentitySessionMaterialPayloadFor<P>;
|
|
479
553
|
type EncryptIdentitySessionMaterialParams = {
|
|
480
554
|
[P in IdentityRequestPlatform]: EncryptIdentitySessionMaterialParamsFor<P>;
|
|
481
555
|
}[IdentityRequestPlatform];
|
|
556
|
+
type EncryptDisputeSessionMaterialParamsFor<P extends DisputePlatform> = EncryptTeeSessionMaterialBaseParams & DisputeSessionMaterialPayloadFor<P>;
|
|
557
|
+
type EncryptDisputeSessionMaterialParams = {
|
|
558
|
+
[P in DisputePlatform]: EncryptDisputeSessionMaterialParamsFor<P>;
|
|
559
|
+
}[DisputePlatform];
|
|
482
560
|
interface EncryptSellerCredentialUploadBaseParams {
|
|
483
561
|
key: AttestedSellerUploadKey;
|
|
484
562
|
callerAddress?: string;
|
|
@@ -488,7 +566,7 @@ interface EncryptSellerCredentialUploadBaseParams {
|
|
|
488
566
|
getRandomValues?: (out: Uint8Array) => Uint8Array;
|
|
489
567
|
now?: () => number;
|
|
490
568
|
}
|
|
491
|
-
interface
|
|
569
|
+
interface EncryptTeeSessionMaterialBaseParams {
|
|
492
570
|
key: AttestedSellerUploadKey;
|
|
493
571
|
subtle?: SubtleCrypto;
|
|
494
572
|
getRandomValues?: (out: Uint8Array) => Uint8Array;
|
|
@@ -509,24 +587,30 @@ type NitroAttestationClientCreateEncryptedSellerCredentialUploadParams = WithOpt
|
|
|
509
587
|
type NitroAttestationClientUploadSellerCredentialParams = WithOptionalAttestationServiceUrl<UploadSellerCredentialParams>;
|
|
510
588
|
type NitroAttestationClientCreateEncryptedBuyerTeeSessionMaterialParams = WithOptionalAttestationServiceUrl<CreateEncryptedBuyerTeeSessionMaterialParams>;
|
|
511
589
|
type NitroAttestationClientCreateEncryptedIdentitySessionMaterialParams = WithOptionalAttestationServiceUrl<CreateEncryptedIdentitySessionMaterialParams>;
|
|
590
|
+
type NitroAttestationClientCreateEncryptedDisputeSessionMaterialParams = WithOptionalAttestationServiceUrl<CreateEncryptedDisputeSessionMaterialParams>;
|
|
512
591
|
type NitroAttestationClientRequestIdentityAttestationParams = WithOptionalAttestationServiceUrl<RequestIdentityAttestationParams>;
|
|
513
592
|
type NitroAttestationClientVerifyBuyerTeePaymentParamsFor<P extends BuyerTeeSessionMaterialPlatform> = WithOptionalAttestationServiceUrl<VerifyBuyerTeePaymentParamsFor<P>>;
|
|
514
593
|
type NitroAttestationClientVerifyBuyerTeePaymentParams = WithOptionalAttestationServiceUrl<VerifyBuyerTeePaymentParams>;
|
|
594
|
+
type NitroAttestationClientVerifyDisputeParamsFor<P extends DisputePlatform> = WithOptionalAttestationServiceUrl<VerifyDisputeParamsFor<P>>;
|
|
595
|
+
type NitroAttestationClientVerifyDisputeParams = WithOptionalAttestationServiceUrl<VerifyDisputeParams>;
|
|
515
596
|
type WithOptionalAttestationServiceUrl<T> = T extends unknown ? Omit<T, "attestationServiceUrl"> & {
|
|
516
597
|
attestationServiceUrl?: string;
|
|
517
598
|
} : never;
|
|
518
599
|
interface NitroAttestationClient {
|
|
519
600
|
createEncryptedBuyerTeeSessionMaterial(params: NitroAttestationClientCreateEncryptedBuyerTeeSessionMaterialParams): Promise<string>;
|
|
520
601
|
createEncryptedIdentitySessionMaterial(params: NitroAttestationClientCreateEncryptedIdentitySessionMaterialParams): Promise<string>;
|
|
602
|
+
createEncryptedDisputeSessionMaterial(params: NitroAttestationClientCreateEncryptedDisputeSessionMaterialParams): Promise<string>;
|
|
521
603
|
createEncryptedSellerCredentialUpload(params: NitroAttestationClientCreateEncryptedSellerCredentialUploadParams): Promise<string>;
|
|
522
604
|
requestIdentityAttestation<P extends IdentityRequestPlatform>(params: WithOptionalAttestationServiceUrl<RequestIdentityAttestationParamsFor<P>>): Promise<IdentityAttestationOutputFor<P>>;
|
|
523
605
|
uploadSellerCredential(params: NitroAttestationClientUploadSellerCredentialParams): Promise<SellerCredentialBundle>;
|
|
524
606
|
verifyBuyerTeePayment<P extends BuyerTeeSessionMaterialPlatform>(params: NitroAttestationClientVerifyBuyerTeePaymentParamsFor<P>): Promise<BuyerTeeAttestationOutputFor<P>>;
|
|
607
|
+
verifyDispute<P extends DisputePlatform>(params: NitroAttestationClientVerifyDisputeParamsFor<P>): Promise<DisputeAttestationOutputFor<P>>;
|
|
525
608
|
fetchAndVerifyAttestation(params?: Omit<FetchAndVerifyAttestationParams, "attestationServiceUrl"> & {
|
|
526
609
|
attestationServiceUrl?: string;
|
|
527
610
|
}): Promise<VerifiedAttestation>;
|
|
528
611
|
encryptBuyerTeeSessionMaterial(params: EncryptBuyerTeeSessionMaterialParams): Promise<string>;
|
|
529
612
|
encryptIdentitySessionMaterial(params: EncryptIdentitySessionMaterialParams): Promise<string>;
|
|
613
|
+
encryptDisputeSessionMaterial(params: EncryptDisputeSessionMaterialParams): Promise<string>;
|
|
530
614
|
encryptSellerCredentialUpload(params: EncryptSellerCredentialUploadParams): Promise<string>;
|
|
531
615
|
}
|
|
532
616
|
|
|
@@ -534,15 +618,20 @@ declare function createNitroAttestationClient(options: NitroAttestationClientOpt
|
|
|
534
618
|
|
|
535
619
|
declare function createEncryptedBuyerTeeSessionMaterial<P extends BuyerTeeSessionMaterialPlatform>(params: CreateEncryptedBuyerTeeSessionMaterialParamsFor<P>): Promise<string>;
|
|
536
620
|
|
|
621
|
+
declare function createEncryptedDisputeSessionMaterial<P extends DisputePlatform>(params: CreateEncryptedDisputeSessionMaterialParamsFor<P>): Promise<string>;
|
|
622
|
+
|
|
537
623
|
declare function createEncryptedIdentitySessionMaterial<P extends IdentityRequestPlatform>(params: CreateEncryptedIdentitySessionMaterialParamsFor<P>): Promise<string>;
|
|
538
624
|
|
|
539
625
|
declare function createEncryptedSellerCredentialUpload(params: CreateEncryptedSellerCredentialUploadParams): Promise<string>;
|
|
540
626
|
|
|
541
627
|
declare function getUnifiedPaymentVerifierDomainSeparator(params: UnifiedPaymentVerifierDomain): string;
|
|
628
|
+
declare function getDisputeVerifierDomainSeparator(params: DisputeVerifierDomain): string;
|
|
542
629
|
declare function hashUtf8(value: string): string;
|
|
543
630
|
|
|
544
631
|
declare function encryptBuyerTeeSessionMaterial<P extends BuyerTeeSessionMaterialPlatform>(params: EncryptBuyerTeeSessionMaterialParamsFor<P>): Promise<string>;
|
|
545
632
|
|
|
633
|
+
declare function encryptDisputeSessionMaterial<P extends DisputePlatform>(params: EncryptDisputeSessionMaterialParamsFor<P>): Promise<string>;
|
|
634
|
+
|
|
546
635
|
declare function encryptIdentitySessionMaterial<P extends IdentityRequestPlatform>(params: EncryptIdentitySessionMaterialParamsFor<P>): Promise<string>;
|
|
547
636
|
|
|
548
637
|
declare function encryptSellerCredentialUpload(params: EncryptSellerCredentialUploadParams): Promise<string>;
|
|
@@ -577,8 +666,12 @@ declare function verifyBuyerTeePayment<P extends BuyerTeeSessionMaterialPlatform
|
|
|
577
666
|
|
|
578
667
|
declare function verifyBuyerTeePaymentAttestation<P extends BuyerTeeSessionMaterialPlatform>(payload: BuyerTeeAttestationOutputFor<P>, options: VerifyBuyerTeePaymentAttestationOptionsFor<P>): BuyerTeeAttestationOutputFor<P>;
|
|
579
668
|
|
|
669
|
+
declare function verifyDispute<P extends DisputePlatform>(params: VerifyDisputeParamsFor<P>): Promise<DisputeAttestationOutputFor<P>>;
|
|
670
|
+
|
|
671
|
+
declare function verifyDisputeAttestation<P extends DisputePlatform>(payload: DisputeAttestationOutputFor<P>, options: VerifyDisputeAttestationOptionsFor<P>): DisputeAttestationOutputFor<P>;
|
|
672
|
+
|
|
580
673
|
declare function verifyIdentityAttestation<P extends IdentityPlatform>(payload: IdentityAttestationOutputFor<P>, options: VerifyIdentityAttestationOptionsFor<P>): NormalizedIdentityDetails<P>;
|
|
581
674
|
|
|
582
675
|
declare function verifySellerCredentialBundle<P extends SellerCredentialUploadPlatform>(bundle: SellerCredentialBundleFor<P>, options: VerifySellerCredentialBundleOptionsFor<P>): SellerCredentialBundleFor<P>;
|
|
583
676
|
|
|
584
|
-
export { AWS_NITRO_ROOT_FINGERPRINT_SHA256_HEX, AWS_NITRO_ROOT_PEM, type AlipayBuyerTeeParams, type AlipayBuyerTeeSessionMaterial, type AlipayBuyerTeeSessionMaterialPayload, type AlipayIdentityParams, type AlipayIdentitySessionMaterial, type AlipayIdentitySessionMaterialPayload, type AttestationOutput, type AttestedSellerUploadKey, type BankOfAmericaBuyerTeeSessionMaterial, type BuyerTeeActionType, type BuyerTeeActionTypeByPlatform, type BuyerTeeAttestationOutput, type BuyerTeeAttestationOutputFor, type BuyerTeeHeaderMap, type BuyerTeeParamsByPlatform, type BuyerTeeSessionMaterialByPlatform, type BuyerTeeSessionMaterialPayload, type BuyerTeeSessionMaterialPayloadFor, type BuyerTeeSessionMaterialPlatform, type BuyerTeeSupportedVerifiersResponse, type BuyerTeeVerifier, type BuyerTeeVerifyPaymentPayload, type BuyerTeeVerifyPaymentPayloadFor, type CashAppBuyerTeeParams, type CashAppBuyerTeeSessionMaterial, type CashAppBuyerTeeSessionMaterialPayload, type CashAppIdentityParams, type CashAppIdentitySessionMaterial, type CashAppIdentitySessionMaterialPayload, type ChaseBuyerTeeSessionMaterial, type ChimeBuyerTeeParams, type ChimeBuyerTeeSessionMaterial, type ChimeBuyerTeeSessionMaterialPayload, type CitiBuyerTeeSessionMaterial, type CreateEncryptedBuyerTeeSessionMaterialParams, type CreateEncryptedBuyerTeeSessionMaterialParamsFor, type CreateEncryptedIdentitySessionMaterialParams, type CreateEncryptedIdentitySessionMaterialParamsFor, type CreateEncryptedSellerCredentialUploadParams, type Eip712Field, type EncryptBuyerTeeSessionMaterialParams, type EncryptBuyerTeeSessionMaterialParamsFor, type EncryptIdentitySessionMaterialParams, type EncryptIdentitySessionMaterialParamsFor, type EncryptSellerCredentialUploadParams, type FetchAndVerifyAttestationParams, type IdentityActionType, type IdentityActionTypeByPlatform, type IdentityAttestationOutput, type IdentityAttestationOutputFor, type IdentityAttestationRequestPayload, type IdentityAttestationRequestPayloadFor, type IdentityParamsByPlatform, type IdentityPlatform, type IdentityRequestPlatform, type IdentitySessionMaterialByPlatform, type IdentitySessionMaterialPayload, type IdentitySessionMaterialPayloadFor, type IdentityTypedDataValue, type IntentDetails, type MonobankBuyerTeeParams, type MonobankBuyerTeeSessionMaterial, type MonobankBuyerTeeSessionMaterialPayload, type MonobankSellerCredentialSessionMaterial, type MonobankSellerCredentialUploadPayload, type MonzoBuyerTeeParams, type MonzoBuyerTeeSessionMaterial, type MonzoBuyerTeeSessionMaterialPayload, type NitroAttestationClient, type NitroAttestationClientCreateEncryptedBuyerTeeSessionMaterialParams, type NitroAttestationClientCreateEncryptedIdentitySessionMaterialParams, type NitroAttestationClientCreateEncryptedSellerCredentialUploadParams, type NitroAttestationClientOptions, type NitroAttestationClientRequestIdentityAttestationParams, type NitroAttestationClientUploadSellerCredentialParams, type NitroAttestationClientVerifyBuyerTeePaymentParams, type NitroAttestationClientVerifyBuyerTeePaymentParamsFor, type NitroAttestationEnvironment, NitroAttestationError, type NitroAttestationErrorCode, type NitroAttestationWarning, type NitroServiceResponseErrorDetails, type NormalizedIdentityDetails, type PayPalBuyerTeeParams, type PayPalBuyerTeeSessionMaterial, type PayPalBuyerTeeSessionMaterialPayload, type PayPalIdentityParams, type PayPalIdentitySessionMaterial, type PayPalIdentitySessionMaterialPayload, type PayeeIdSellerCredentialUploadPayload, type PayeeIdSellerCredentialUploadPlatform, type PayeeIdSellerCredentialUploadWithPlatformPayload, type PaymentTypedDataValue, type RequestIdentityAttestationParams, type RequestIdentityAttestationParamsFor, type RevolutBuyerTeeParams, type RevolutBuyerTeeSessionMaterial, type RevolutBuyerTeeSessionMaterialPayload, type SellerCredentialBundle, type SellerCredentialBundleFor, type SellerCredentialUploadPayload, type SellerCredentialUploadPlatform, type TrustPins, type TypedDataSpec, type UnifiedPaymentVerifierDomain, type UploadSellerCredentialParams, type UploadSellerCredentialPayload, type VenmoBuyerTeeParams, type VenmoBuyerTeeSessionMaterial, type VenmoBuyerTeeSessionMaterialPayload, type VenmoIdentityParams, type VenmoIdentitySessionMaterial, type VenmoIdentitySessionMaterialPayload, type VerifiedAttestation, type VerifiedAttestationPayload, type VerifyBuyerTeePaymentAttestationOptions, type VerifyBuyerTeePaymentAttestationOptionsFor, type VerifyBuyerTeePaymentParams, type VerifyBuyerTeePaymentParamsFor, type VerifyIdentityAttestationOptions, type VerifyIdentityAttestationOptionsFor, type VerifySellerCredentialBundleOptions, type VerifySellerCredentialBundleOptionsFor, type WiseBuyerTeeParams, type WiseBuyerTeeSessionMaterial, type WiseBuyerTeeSessionMaterialPayload, type WiseIdentityParams, type WiseIdentitySessionMaterial, type WiseIdentitySessionMaterialPayload, type WiseSellerCredentialSessionMaterial, type WiseSellerCredentialUploadPayload, type ZelleBuyerTeeActionType, type ZelleBuyerTeeParams, type ZelleBuyerTeeSessionMaterial, type ZelleBuyerTeeSessionMaterialByActionType, type ZelleBuyerTeeSessionMaterialPayload, type ZelleBuyerTeeVerifyPaymentPayload, createEncryptedBuyerTeeSessionMaterial, createEncryptedIdentitySessionMaterial, createEncryptedSellerCredentialUpload, createNitroAttestationClient, encryptBuyerTeeSessionMaterial, encryptIdentitySessionMaterial, encryptSellerCredentialUpload, fetchAndVerifyAttestation, getUnifiedPaymentVerifierDomainSeparator, hashUtf8, requestIdentityAttestation, uploadSellerCredential, verifyBuyerTeePayment, verifyBuyerTeePaymentAttestation, verifyIdentityAttestation, verifySellerCredentialBundle };
|
|
677
|
+
export { AWS_NITRO_ROOT_FINGERPRINT_SHA256_HEX, AWS_NITRO_ROOT_PEM, type AlipayBuyerTeeParams, type AlipayBuyerTeeSessionMaterial, type AlipayBuyerTeeSessionMaterialPayload, type AlipayIdentityParams, type AlipayIdentitySessionMaterial, type AlipayIdentitySessionMaterialPayload, type AttestationOutput, type AttestedSellerUploadKey, type BankOfAmericaBuyerTeeSessionMaterial, type BuyerTeeActionType, type BuyerTeeActionTypeByPlatform, type BuyerTeeAttestationOutput, type BuyerTeeAttestationOutputFor, type BuyerTeeHeaderMap, type BuyerTeeParamsByPlatform, type BuyerTeeSessionMaterialByPlatform, type BuyerTeeSessionMaterialPayload, type BuyerTeeSessionMaterialPayloadFor, type BuyerTeeSessionMaterialPlatform, type BuyerTeeSupportedVerifiersResponse, type BuyerTeeVerifier, type BuyerTeeVerifyPaymentPayload, type BuyerTeeVerifyPaymentPayloadFor, type CashAppBuyerTeeParams, type CashAppBuyerTeeSessionMaterial, type CashAppBuyerTeeSessionMaterialPayload, type CashAppIdentityParams, type CashAppIdentitySessionMaterial, type CashAppIdentitySessionMaterialPayload, type ChaseBuyerTeeSessionMaterial, type ChimeBuyerTeeParams, type ChimeBuyerTeeSessionMaterial, type ChimeBuyerTeeSessionMaterialPayload, type CitiBuyerTeeSessionMaterial, type CreateEncryptedBuyerTeeSessionMaterialParams, type CreateEncryptedBuyerTeeSessionMaterialParamsFor, type CreateEncryptedDisputeSessionMaterialParams, type CreateEncryptedDisputeSessionMaterialParamsFor, type CreateEncryptedIdentitySessionMaterialParams, type CreateEncryptedIdentitySessionMaterialParamsFor, type CreateEncryptedSellerCredentialUploadParams, type DisputeActionType, type DisputeActionTypeByPlatform, type DisputeAttestationOutput, type DisputeAttestationOutputFor, type DisputeDetails, type DisputeEmailSessionMaterial, type DisputeParamsByPlatform, type DisputePlatform, type DisputeSessionMaterialByPlatform, type DisputeSessionMaterialPayload, type DisputeSessionMaterialPayloadFor, type DisputeTypedDataValue, type DisputeVerifierDomain, type DisputeVerifyPayload, type DisputeVerifyPayloadFor, type Eip712Field, type EncryptBuyerTeeSessionMaterialParams, type EncryptBuyerTeeSessionMaterialParamsFor, type EncryptDisputeSessionMaterialParams, type EncryptDisputeSessionMaterialParamsFor, type EncryptIdentitySessionMaterialParams, type EncryptIdentitySessionMaterialParamsFor, type EncryptSellerCredentialUploadParams, type FetchAndVerifyAttestationParams, type IdentityActionType, type IdentityActionTypeByPlatform, type IdentityAttestationOutput, type IdentityAttestationOutputFor, type IdentityAttestationRequestPayload, type IdentityAttestationRequestPayloadFor, type IdentityParamsByPlatform, type IdentityPlatform, type IdentityRequestPlatform, type IdentitySessionMaterialByPlatform, type IdentitySessionMaterialPayload, type IdentitySessionMaterialPayloadFor, type IdentityTypedDataValue, type IntentDetails, type MonobankBuyerTeeParams, type MonobankBuyerTeeSessionMaterial, type MonobankBuyerTeeSessionMaterialPayload, type MonobankSellerCredentialSessionMaterial, type MonobankSellerCredentialUploadPayload, type MonzoBuyerTeeParams, type MonzoBuyerTeeSessionMaterial, type MonzoBuyerTeeSessionMaterialPayload, type NitroAttestationClient, type NitroAttestationClientCreateEncryptedBuyerTeeSessionMaterialParams, type NitroAttestationClientCreateEncryptedDisputeSessionMaterialParams, type NitroAttestationClientCreateEncryptedIdentitySessionMaterialParams, type NitroAttestationClientCreateEncryptedSellerCredentialUploadParams, type NitroAttestationClientOptions, type NitroAttestationClientRequestIdentityAttestationParams, type NitroAttestationClientUploadSellerCredentialParams, type NitroAttestationClientVerifyBuyerTeePaymentParams, type NitroAttestationClientVerifyBuyerTeePaymentParamsFor, type NitroAttestationClientVerifyDisputeParams, type NitroAttestationClientVerifyDisputeParamsFor, type NitroAttestationEnvironment, NitroAttestationError, type NitroAttestationErrorCode, type NitroAttestationWarning, type NitroServiceResponseErrorDetails, type NormalizedIdentityDetails, type PayPalBuyerTeeParams, type PayPalBuyerTeeSessionMaterial, type PayPalBuyerTeeSessionMaterialPayload, type PayPalDisputeSessionMaterialPayload, type PayPalIdentityParams, type PayPalIdentitySessionMaterial, type PayPalIdentitySessionMaterialPayload, type PayeeIdSellerCredentialUploadPayload, type PayeeIdSellerCredentialUploadPlatform, type PayeeIdSellerCredentialUploadWithPlatformPayload, type PaymentTypedDataValue, type RequestIdentityAttestationParams, type RequestIdentityAttestationParamsFor, type RevolutBuyerTeeParams, type RevolutBuyerTeeSessionMaterial, type RevolutBuyerTeeSessionMaterialPayload, type SellerCredentialBundle, type SellerCredentialBundleFor, type SellerCredentialUploadPayload, type SellerCredentialUploadPlatform, type TrustPins, type TypedDataSpec, type UnifiedPaymentVerifierDomain, type UploadSellerCredentialParams, type UploadSellerCredentialPayload, type VenmoBuyerTeeParams, type VenmoBuyerTeeSessionMaterial, type VenmoBuyerTeeSessionMaterialPayload, type VenmoDisputeSessionMaterialPayload, type VenmoIdentityParams, type VenmoIdentitySessionMaterial, type VenmoIdentitySessionMaterialPayload, type VerifiedAttestation, type VerifiedAttestationPayload, type VerifyBuyerTeePaymentAttestationOptions, type VerifyBuyerTeePaymentAttestationOptionsFor, type VerifyBuyerTeePaymentParams, type VerifyBuyerTeePaymentParamsFor, type VerifyDisputeAttestationOptions, type VerifyDisputeAttestationOptionsFor, type VerifyDisputeParams, type VerifyDisputeParamsFor, type VerifyIdentityAttestationOptions, type VerifyIdentityAttestationOptionsFor, type VerifySellerCredentialBundleOptions, type VerifySellerCredentialBundleOptionsFor, type WiseBuyerTeeParams, type WiseBuyerTeeSessionMaterial, type WiseBuyerTeeSessionMaterialPayload, type WiseIdentityParams, type WiseIdentitySessionMaterial, type WiseIdentitySessionMaterialPayload, type WiseSellerCredentialSessionMaterial, type WiseSellerCredentialUploadPayload, type ZelleBuyerTeeActionType, type ZelleBuyerTeeParams, type ZelleBuyerTeeSessionMaterial, type ZelleBuyerTeeSessionMaterialByActionType, type ZelleBuyerTeeSessionMaterialPayload, type ZelleBuyerTeeVerifyPaymentPayload, createEncryptedBuyerTeeSessionMaterial, createEncryptedDisputeSessionMaterial, createEncryptedIdentitySessionMaterial, createEncryptedSellerCredentialUpload, createNitroAttestationClient, encryptBuyerTeeSessionMaterial, encryptDisputeSessionMaterial, encryptIdentitySessionMaterial, encryptSellerCredentialUpload, fetchAndVerifyAttestation, getDisputeVerifierDomainSeparator, getUnifiedPaymentVerifierDomainSeparator, hashUtf8, requestIdentityAttestation, uploadSellerCredential, verifyBuyerTeePayment, verifyBuyerTeePaymentAttestation, verifyDispute, verifyDisputeAttestation, verifyIdentityAttestation, verifySellerCredentialBundle };
|