interface NitroAttestationWarning { code: "TRUST_PIN_NOT_PROVIDED" | "CERT_VALIDITY_NEAR_EXPIRY"; message: string; details?: Record; } type SellerCredentialUploadPlatform = "venmo" | "cashapp" | "wise" | "paypal" | "monobank"; type PayeeIdSellerCredentialUploadPlatform = Exclude; type IdentityRequestPlatform = "venmo" | "paypal" | "wise" | "cashapp" | "alipay"; type IdentityPlatform = IdentityRequestPlatform | "monobank"; type DisputePlatform = "venmo" | "paypal"; type BuyerTeeSessionMaterialPlatform = "venmo" | "cashapp" | "monzo" | "wise" | "revolut" | "chime" | "zelle" | "paypal" | "monobank" | "alipay"; type BuyerTeeHeaderMap = Record; type RequiredBuyerTeeHeaders = BuyerTeeHeaderMap & { [H in K]: string; }; type BuyerTeeRequestBodySessionMaterial = { body: string; }; /** Captured Venmo request headers; type requires `Cookie`. */ type VenmoBuyerTeeSessionMaterial = RequiredBuyerTeeHeaders<"Cookie">; /** Captured Cash App request headers; type requires every listed secret header. */ type CashAppBuyerTeeSessionMaterial = RequiredBuyerTeeHeaders<"Cookie" | "x-csrf-token" | "x-device-name" | "x-request-signature" | "x-request-uuid" | "cash-web-request" | "x-web-device-info" | "x-web-context" | "x-bt-id">; /** Captured Monzo request headers; type requires `Authorization`. */ type MonzoBuyerTeeSessionMaterial = RequiredBuyerTeeHeaders<"Authorization">; /** Captured Wise request headers; type requires either `Cookie` or `X-Access-Token`. */ type WiseBuyerTeeSessionMaterial = ({ Cookie: string; } | { "X-Access-Token": string; }) & BuyerTeeHeaderMap; /** Captured Revolut request headers; type requires `Cookie` and `x-device-id`. */ type RevolutBuyerTeeSessionMaterial = RequiredBuyerTeeHeaders<"Cookie" | "x-device-id">; /** Captured Citi Zelle request headers; type requires `Cookie`. */ type CitiBuyerTeeSessionMaterial = RequiredBuyerTeeHeaders<"Cookie">; /** Captured Chime request headers and body; type requires `Cookie` and `body`. */ type ChimeBuyerTeeSessionMaterial = RequiredBuyerTeeHeaders<"Cookie"> & BuyerTeeRequestBodySessionMaterial; /** Captured Chase Zelle request headers; type requires every listed secret header. */ type ChaseBuyerTeeSessionMaterial = RequiredBuyerTeeHeaders<"Cookie" | "x-jpmc-channel" | "x-jpmc-csrf-token" | "Referer" | "Origin">; /** Captured Bank of America Zelle request headers; type requires `Cookie`. */ type BankOfAmericaBuyerTeeSessionMaterial = RequiredBuyerTeeHeaders<"Cookie">; /** Captured generic Zelle request headers for the selected Zelle action type. */ type ZelleBuyerTeeSessionMaterial = CitiBuyerTeeSessionMaterial | ChaseBuyerTeeSessionMaterial | BankOfAmericaBuyerTeeSessionMaterial; /** Captured PayPal request headers; type requires `Cookie`. */ type PayPalBuyerTeeSessionMaterial = RequiredBuyerTeeHeaders<"Cookie">; /** Monobank Open API request headers; type requires `X-Token`. */ type MonobankBuyerTeeSessionMaterial = RequiredBuyerTeeHeaders<"X-Token">; /** Captured Alipay request headers; type requires `Cookie`. */ type AlipayBuyerTeeSessionMaterial = RequiredBuyerTeeHeaders<"Cookie">; /** Captured Venmo identity request headers; type requires `Cookie`. */ type VenmoIdentitySessionMaterial = RequiredBuyerTeeHeaders<"Cookie">; /** Captured PayPal identity request headers; type requires `Cookie`. */ type PayPalIdentitySessionMaterial = RequiredBuyerTeeHeaders<"Cookie">; /** Captured Wise identity request headers; type requires `Cookie` and `X-Access-Token`. */ type WiseIdentitySessionMaterial = RequiredBuyerTeeHeaders<"Cookie" | "X-Access-Token">; /** Captured Cash App identity session; type requires a replayable session cookie and activity request body. */ interface CashAppIdentitySessionMaterial { sessionCookie: string; requestPayload: string; requestHeaders?: BuyerTeeHeaderMap; } /** Captured Alipay identity request headers; type requires `Cookie`. */ type AlipayIdentitySessionMaterial = RequiredBuyerTeeHeaders<"Cookie">; /** Complete RFC 5322 dispute email, including authenticated headers and body. */ interface DisputeEmailSessionMaterial { rawEmail: string; } interface VenmoBuyerTeeParams { SENDER_ID: string; index: number; } interface CashAppBuyerTeeParams { SENDER_ID: string; index: number; } interface MonzoBuyerTeeParams { TX_ID: string; } interface WiseBuyerTeeParams { PROFILE_ID: string; TRANSACTION_ID: string; } interface RevolutBuyerTeeParams { index: number; } type ZelleBuyerTeeActionType = "transfer_zelle_bofa" | "transfer_zelle_chase" | "transfer_zelle_citi"; interface ZelleBuyerTeeParams { index: number; } interface ZelleBuyerTeeSessionMaterialByActionType { transfer_zelle_bofa: BankOfAmericaBuyerTeeSessionMaterial; transfer_zelle_chase: ChaseBuyerTeeSessionMaterial; transfer_zelle_citi: CitiBuyerTeeSessionMaterial; } type ZelleBuyerTeeSessionMaterialPayloadByActionType = { [A in ZelleBuyerTeeActionType]: { platform: "zelle"; actionType: A; sessionMaterial: ZelleBuyerTeeSessionMaterialByActionType[A]; }; }[ZelleBuyerTeeActionType]; type ZelleBuyerTeeVerifyPaymentPayload = ZelleBuyerTeeSessionMaterialPayloadByActionType & { params: ZelleBuyerTeeParams; }; type ChimeBuyerTeeParams = Record; interface PayPalBuyerTeeParams { PAYMENT_ID: string; } interface MonobankBuyerTeeParams { ACCOUNT_ID: string; TRANSACTION_ID: string; } interface AlipayBuyerTeeParams { TRADE_NO: string; } interface VenmoIdentityParams { SENDER_ID: string; } type PayPalIdentityParams = Record; interface WiseIdentityParams { PROFILE_ID: string; } type CashAppIdentityParams = Record; type AlipayIdentityParams = Record; interface BuyerTeeActionTypeByPlatform { venmo: "transfer_venmo"; cashapp: "transfer_cashapp"; monzo: "transfer_monzo"; wise: "transfer_wise"; revolut: "transfer_revolut"; chime: "transfer_chime"; zelle: ZelleBuyerTeeActionType; paypal: "transfer_paypal"; monobank: "transfer_monobank"; alipay: "transfer_alipay"; } interface IdentityActionTypeByPlatform { venmo: "register_venmo"; paypal: "register_paypal"; wise: "register_wise"; cashapp: "register_cashapp"; monobank: "register_monobank"; alipay: "register_alipay"; } interface DisputeActionTypeByPlatform { venmo: "dispute_venmo"; paypal: "dispute_paypal"; } interface BuyerTeeSessionMaterialByPlatform { venmo: VenmoBuyerTeeSessionMaterial; cashapp: CashAppBuyerTeeSessionMaterial; monzo: MonzoBuyerTeeSessionMaterial; wise: WiseBuyerTeeSessionMaterial; revolut: RevolutBuyerTeeSessionMaterial; chime: ChimeBuyerTeeSessionMaterial; zelle: ZelleBuyerTeeSessionMaterial; paypal: PayPalBuyerTeeSessionMaterial; monobank: MonobankBuyerTeeSessionMaterial; alipay: AlipayBuyerTeeSessionMaterial; } interface IdentitySessionMaterialByPlatform { venmo: VenmoIdentitySessionMaterial; paypal: PayPalIdentitySessionMaterial; wise: WiseIdentitySessionMaterial; cashapp: CashAppIdentitySessionMaterial; alipay: AlipayIdentitySessionMaterial; } interface DisputeSessionMaterialByPlatform { venmo: DisputeEmailSessionMaterial; paypal: DisputeEmailSessionMaterial; } interface BuyerTeeParamsByPlatform { venmo: VenmoBuyerTeeParams; cashapp: CashAppBuyerTeeParams; monzo: MonzoBuyerTeeParams; wise: WiseBuyerTeeParams; revolut: RevolutBuyerTeeParams; chime: ChimeBuyerTeeParams; zelle: ZelleBuyerTeeParams; paypal: PayPalBuyerTeeParams; monobank: MonobankBuyerTeeParams; alipay: AlipayBuyerTeeParams; } interface IdentityParamsByPlatform { venmo: VenmoIdentityParams; paypal: PayPalIdentityParams; wise: WiseIdentityParams; cashapp: CashAppIdentityParams; alipay: AlipayIdentityParams; } interface DisputeParamsByPlatform { venmo: Record; paypal: Record; } /** * Flat buyer TEE action union. Prefer `BuyerTeeActionTypeByPlatform[P]` * so the action remains tied to its platform. */ type BuyerTeeActionType = BuyerTeeActionTypeByPlatform[BuyerTeeSessionMaterialPlatform]; type IdentityActionType = IdentityActionTypeByPlatform[IdentityPlatform]; type DisputeActionType = DisputeActionTypeByPlatform[DisputePlatform]; interface WiseSellerCredentialSessionMaterial { apiToken: string; profileId?: string; } interface MonobankSellerCredentialSessionMaterial { apiToken: string; accountId?: string; } interface PayeeIdSellerCredentialUploadPayload { platform?: PayeeIdSellerCredentialUploadPlatform; payeeId: string; sessionMaterial: unknown; } interface WiseSellerCredentialUploadPayload { platform: "wise"; sessionMaterial: WiseSellerCredentialSessionMaterial; payeeId?: never; } interface MonobankSellerCredentialUploadPayload { platform: "monobank"; sessionMaterial: MonobankSellerCredentialSessionMaterial; payeeId?: never; } type SellerCredentialUploadPayload = PayeeIdSellerCredentialUploadPayload | WiseSellerCredentialUploadPayload | MonobankSellerCredentialUploadPayload; type PayeeIdSellerCredentialUploadWithPlatformPayload = PayeeIdSellerCredentialUploadPayload & { platform: PayeeIdSellerCredentialUploadPlatform; }; type UploadSellerCredentialPayload = PayeeIdSellerCredentialUploadWithPlatformPayload | WiseSellerCredentialUploadPayload | MonobankSellerCredentialUploadPayload; type BuyerTeeSessionMaterialPayloadBaseFor

= { platform: P; actionType: BuyerTeeActionTypeByPlatform[P]; sessionMaterial: BuyerTeeSessionMaterialByPlatform[P]; }; type BuyerTeeSessionMaterialPayloadFor

= P extends "zelle" ? ZelleBuyerTeeSessionMaterialPayloadByActionType : BuyerTeeSessionMaterialPayloadBaseFor

; type BuyerTeeVerifyPaymentPayloadFor

= BuyerTeeSessionMaterialPayloadFor

& { params: BuyerTeeParamsByPlatform[P]; }; type IdentitySessionMaterialPayloadFor

= { platform: P; actionType: IdentityActionTypeByPlatform[P]; sessionMaterial: IdentitySessionMaterialByPlatform[P]; }; type IdentityAttestationRequestPayloadFor

= IdentitySessionMaterialPayloadFor

& { callerAddress: string; params: IdentityParamsByPlatform[P]; }; type DisputeSessionMaterialPayloadFor

= { platform: P; actionType: DisputeActionTypeByPlatform[P]; sessionMaterial: DisputeSessionMaterialByPlatform[P]; }; type DisputeVerifyPayloadFor

= DisputeSessionMaterialPayloadFor

& { params: DisputeParamsByPlatform[P]; }; type BuyerTeeSessionMaterialPayload = { [P in BuyerTeeSessionMaterialPlatform]: BuyerTeeSessionMaterialPayloadFor

; }[BuyerTeeSessionMaterialPlatform]; type BuyerTeeVerifyPaymentPayload = { [P in BuyerTeeSessionMaterialPlatform]: BuyerTeeVerifyPaymentPayloadFor

; }[BuyerTeeSessionMaterialPlatform]; type IdentitySessionMaterialPayload = { [P in IdentityRequestPlatform]: IdentitySessionMaterialPayloadFor

; }[IdentityRequestPlatform]; type IdentityAttestationRequestPayload = { [P in IdentityRequestPlatform]: IdentityAttestationRequestPayloadFor

; }[IdentityRequestPlatform]; type DisputeSessionMaterialPayload = { [P in DisputePlatform]: DisputeSessionMaterialPayloadFor

; }[DisputePlatform]; type DisputeVerifyPayload = { [P in DisputePlatform]: DisputeVerifyPayloadFor

; }[DisputePlatform]; type VenmoBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"venmo">; type CashAppBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"cashapp">; type MonzoBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"monzo">; type WiseBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"wise">; type RevolutBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"revolut">; type ChimeBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"chime">; type ZelleBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"zelle">; type PayPalBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"paypal">; type MonobankBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"monobank">; type AlipayBuyerTeeSessionMaterialPayload = BuyerTeeSessionMaterialPayloadFor<"alipay">; type VenmoIdentitySessionMaterialPayload = IdentitySessionMaterialPayloadFor<"venmo">; type PayPalIdentitySessionMaterialPayload = IdentitySessionMaterialPayloadFor<"paypal">; type WiseIdentitySessionMaterialPayload = IdentitySessionMaterialPayloadFor<"wise">; type CashAppIdentitySessionMaterialPayload = IdentitySessionMaterialPayloadFor<"cashapp">; type AlipayIdentitySessionMaterialPayload = IdentitySessionMaterialPayloadFor<"alipay">; type VenmoDisputeSessionMaterialPayload = DisputeSessionMaterialPayloadFor<"venmo">; type PayPalDisputeSessionMaterialPayload = DisputeSessionMaterialPayloadFor<"paypal">; interface IntentDetails { intentHash: string; amount: string; timestampMs: string; paymentMethod: string; fiatCurrency: string; conversionRate: string; payeeDetails: string; } interface Eip712Field { name: string; type: string; } interface TypedDataSpec { primaryType: string; types: Record; } interface PaymentTypedDataValue { intentHash: string; releaseAmount: string; dataHash: string; } interface IdentityTypedDataValue { method: string; actionType: string; callerAddress: string; payeeIdHash: string; dataHash: string; issuedAt: string; validUntil: string; } interface DisputeTypedDataValue { intentHash: string; dataHash: string; } interface AttestationOutput

{ platform: P; actionType: A; signature: string; signer: string; domainSeparator: string; typeHash: string; typedDataSpec: TypedDataSpec; typedDataValue: PaymentTypedDataValue; proofInput: string; encodedPaymentDetails: string; metadata: string; } interface NormalizedIdentityDetails

{ platform: P; actionType: IdentityActionTypeByPlatform[P]; method: string; payeeId: string; payeeIdHash: string; username: string | null; metadata: Record; } interface IdentityAttestationOutputFor

{ platform: P; actionType: IdentityActionTypeByPlatform[P]; signature: string; signer: string; domainSeparator: string; typeHash: string; typedDataSpec: TypedDataSpec; typedDataValue: IdentityTypedDataValue; identity: NormalizedIdentityDetails

; proofInput: string; } type IdentityAttestationOutput = { [P in IdentityPlatform]: IdentityAttestationOutputFor

; }[IdentityPlatform]; type BuyerTeeAttestationOutputFor

= AttestationOutput; type BuyerTeeAttestationOutput = { [P in BuyerTeeSessionMaterialPlatform]: BuyerTeeAttestationOutputFor

; }[BuyerTeeSessionMaterialPlatform]; interface DisputeDetails { paymentMethod: string; originalPaymentId: string; disputeId: string; paymentAmount: string; paymentCurrency: string; } interface DisputeAttestationOutputFor

{ platform: P; actionType: DisputeActionTypeByPlatform[P]; signature: string; signer: string; domainSeparator: string; typeHash: string; typedDataSpec: TypedDataSpec; typedDataValue: DisputeTypedDataValue; encodedDisputeDetails: string; disputeDetails: DisputeDetails; } type DisputeAttestationOutput = { [P in DisputePlatform]: DisputeAttestationOutputFor

; }[DisputePlatform]; type BuyerTeeVerifier = { [P in BuyerTeeSessionMaterialPlatform]: { key: string; platform: P; actionType: BuyerTeeActionTypeByPlatform[P]; version: string; typedDataSpec: TypedDataSpec; }; }[BuyerTeeSessionMaterialPlatform]; interface BuyerTeeSupportedVerifiersResponse { verifiers: BuyerTeeVerifier[]; } interface SellerCredentialBundleBase { credentialType: string; encryptedBlob: string; encryptedDataKey: string; nonce: string; payeeIdHash: string; credentialValidatedAt: string; credentialExpiresAt: string | null; bundleSignature: string; } type SellerCredentialBundleFor

= SellerCredentialBundleBase & { platform: P; identityAttestation?: IdentityAttestationOutputFor

; }; type SellerCredentialBundle = { [P in SellerCredentialUploadPlatform]: SellerCredentialBundleFor

; }[SellerCredentialUploadPlatform]; interface TrustPins { expectedPcr8Hex?: string; expectedPcr8ByHost?: Record; strictPin?: boolean; awsNitroRootPem?: string; freshnessWindowMs?: number; } interface UnifiedPaymentVerifierDomain { chainId: number; verifyingContract: string; } type DisputeVerifierDomain = UnifiedPaymentVerifierDomain; interface VerifyBuyerTeePaymentAttestationOptionsFor

{ trustedSigners: readonly string[]; expectedPlatform: P; expectedActionType: BuyerTeeActionTypeByPlatform[P]; expectedDomain: UnifiedPaymentVerifierDomain; expectedIntentHash: string; } type VerifyBuyerTeePaymentAttestationOptions = { [P in BuyerTeeSessionMaterialPlatform]: VerifyBuyerTeePaymentAttestationOptionsFor

; }[BuyerTeeSessionMaterialPlatform]; interface VerifyDisputeAttestationOptionsFor

{ trustedSigners: readonly string[]; expectedPlatform: P; expectedActionType: DisputeActionTypeByPlatform[P]; expectedDomain: DisputeVerifierDomain; expectedIntentHash: string; } type VerifyDisputeAttestationOptions = { [P in DisputePlatform]: VerifyDisputeAttestationOptionsFor

; }[DisputePlatform]; interface VerifyIdentityAttestationOptionsFor

{ trustedSigners: readonly string[]; expectedPlatform: P; expectedActionType: IdentityActionTypeByPlatform[P]; expectedCallerAddress: string; expectedPayeeIdHash: string; now?: () => number; } type VerifyIdentityAttestationOptions = { [P in IdentityPlatform]: VerifyIdentityAttestationOptionsFor

; }[IdentityPlatform]; interface VerifySellerCredentialBundleOptionsFor

{ trustedSigners: readonly string[]; expectedPlatform: P; expectedPayeeIdHash: string; now?: () => number; } type VerifySellerCredentialBundleOptions = { [P in SellerCredentialUploadPlatform]: VerifySellerCredentialBundleOptionsFor

; }[SellerCredentialUploadPlatform]; type CreateEncryptedSellerCredentialUploadParams = SellerCredentialRequestBaseParams & SellerCredentialUploadPayload; type CreateEncryptedIdentitySessionMaterialParamsFor

= AttestationServiceRequestBaseParams & IdentitySessionMaterialPayloadFor

; type CreateEncryptedIdentitySessionMaterialParams = { [P in IdentityRequestPlatform]: CreateEncryptedIdentitySessionMaterialParamsFor

; }[IdentityRequestPlatform]; type CreateEncryptedBuyerTeeSessionMaterialParamsFor

= AttestationServiceRequestBaseParams & BuyerTeeSessionMaterialPayloadFor

; type CreateEncryptedBuyerTeeSessionMaterialParams = { [P in BuyerTeeSessionMaterialPlatform]: CreateEncryptedBuyerTeeSessionMaterialParamsFor

; }[BuyerTeeSessionMaterialPlatform]; type CreateEncryptedDisputeSessionMaterialParamsFor

= AttestationServiceRequestBaseParams & DisputeSessionMaterialPayloadFor

; type CreateEncryptedDisputeSessionMaterialParams = { [P in DisputePlatform]: CreateEncryptedDisputeSessionMaterialParamsFor

; }[DisputePlatform]; type VerifyBuyerTeePaymentParamsFor

= AttestationServiceRequestBaseParams & BuyerTeeVerifyPaymentPayloadFor

& { chainId: number; intent: IntentDetails; }; type VerifyBuyerTeePaymentParams = { [P in BuyerTeeSessionMaterialPlatform]: VerifyBuyerTeePaymentParamsFor

; }[BuyerTeeSessionMaterialPlatform]; type RequestIdentityAttestationParamsFor

= AttestationServiceRequestBaseParams & IdentityAttestationRequestPayloadFor

; type RequestIdentityAttestationParams = { [P in IdentityRequestPlatform]: RequestIdentityAttestationParamsFor

; }[IdentityRequestPlatform]; type VerifyDisputeParamsFor

= AttestationServiceRequestBaseParams & DisputeVerifyPayloadFor

& { chainId: number; intentHash: string; }; type VerifyDisputeParams = { [P in DisputePlatform]: VerifyDisputeParamsFor

; }[DisputePlatform]; type UploadSellerCredentialParams = SellerCredentialRequestBaseParams & UploadSellerCredentialPayload; interface SellerCredentialRequestBaseParams extends AttestationServiceRequestBaseParams { callerAddress?: string; } interface AttestationServiceRequestBaseParams { attestationServiceUrl: string; trust?: TrustPins; fetch?: typeof fetch; subtle?: SubtleCrypto; getRandomValues?: (out: Uint8Array) => Uint8Array; now?: () => number; onWarning?: (warning: NitroAttestationWarning) => void; timeoutMs?: number; } interface FetchAndVerifyAttestationParams { attestationServiceUrl: string; trust?: TrustPins; fetch?: typeof fetch; subtle?: SubtleCrypto; getRandomValues?: (out: Uint8Array) => Uint8Array; now?: () => number; onWarning?: (warning: NitroAttestationWarning) => void; timeoutMs?: number; } interface VerifiedAttestation { attestedSellerUploadKey: AttestedSellerUploadKey; payload: VerifiedAttestationPayload; } interface AttestedSellerUploadKey { publicKeyDer: Uint8Array; publicKeySha256Hex: string; } interface VerifiedAttestationPayload { timestampMs: number; pcr0Hex: string; pcr1Hex: string; pcr2Hex: string; pcr8Hex: string; nonceHex: string; advertised: { chainId?: number; verifyingContract?: string; expectedSigner?: string; expectedPcr8?: string; }; } type EncryptSellerCredentialUploadParams = EncryptSellerCredentialUploadBaseParams & SellerCredentialUploadPayload; type EncryptBuyerTeeSessionMaterialParamsFor

= EncryptTeeSessionMaterialBaseParams & BuyerTeeSessionMaterialPayloadFor

; type EncryptBuyerTeeSessionMaterialParams = { [P in BuyerTeeSessionMaterialPlatform]: EncryptBuyerTeeSessionMaterialParamsFor

; }[BuyerTeeSessionMaterialPlatform]; type EncryptIdentitySessionMaterialParamsFor

= EncryptTeeSessionMaterialBaseParams & IdentitySessionMaterialPayloadFor

; type EncryptIdentitySessionMaterialParams = { [P in IdentityRequestPlatform]: EncryptIdentitySessionMaterialParamsFor

; }[IdentityRequestPlatform]; type EncryptDisputeSessionMaterialParamsFor

= EncryptTeeSessionMaterialBaseParams & DisputeSessionMaterialPayloadFor

; type EncryptDisputeSessionMaterialParams = { [P in DisputePlatform]: EncryptDisputeSessionMaterialParamsFor

; }[DisputePlatform]; interface EncryptSellerCredentialUploadBaseParams { key: AttestedSellerUploadKey; callerAddress?: string; issuedAtMs?: number; jweId?: string; subtle?: SubtleCrypto; getRandomValues?: (out: Uint8Array) => Uint8Array; now?: () => number; } interface EncryptTeeSessionMaterialBaseParams { key: AttestedSellerUploadKey; subtle?: SubtleCrypto; getRandomValues?: (out: Uint8Array) => Uint8Array; } type NitroAttestationEnvironment = "staging" | "production"; interface NitroAttestationClientOptions { environment: NitroAttestationEnvironment; attestationServiceUrl?: string; trust?: TrustPins; fetch?: typeof fetch; subtle?: SubtleCrypto; getRandomValues?: (out: Uint8Array) => Uint8Array; now?: () => number; onWarning?: (warning: NitroAttestationWarning) => void; timeoutMs?: number; } type NitroAttestationClientCreateEncryptedSellerCredentialUploadParams = WithOptionalAttestationServiceUrl; type NitroAttestationClientUploadSellerCredentialParams = WithOptionalAttestationServiceUrl; type NitroAttestationClientCreateEncryptedBuyerTeeSessionMaterialParams = WithOptionalAttestationServiceUrl; type NitroAttestationClientCreateEncryptedIdentitySessionMaterialParams = WithOptionalAttestationServiceUrl; type NitroAttestationClientCreateEncryptedDisputeSessionMaterialParams = WithOptionalAttestationServiceUrl; type NitroAttestationClientRequestIdentityAttestationParams = WithOptionalAttestationServiceUrl; type NitroAttestationClientVerifyBuyerTeePaymentParamsFor

= WithOptionalAttestationServiceUrl>; type NitroAttestationClientVerifyBuyerTeePaymentParams = WithOptionalAttestationServiceUrl; type NitroAttestationClientVerifyDisputeParamsFor

= WithOptionalAttestationServiceUrl>; type NitroAttestationClientVerifyDisputeParams = WithOptionalAttestationServiceUrl; type WithOptionalAttestationServiceUrl = T extends unknown ? Omit & { attestationServiceUrl?: string; } : never; interface NitroAttestationClient { createEncryptedBuyerTeeSessionMaterial(params: NitroAttestationClientCreateEncryptedBuyerTeeSessionMaterialParams): Promise; createEncryptedIdentitySessionMaterial(params: NitroAttestationClientCreateEncryptedIdentitySessionMaterialParams): Promise; createEncryptedDisputeSessionMaterial(params: NitroAttestationClientCreateEncryptedDisputeSessionMaterialParams): Promise; createEncryptedSellerCredentialUpload(params: NitroAttestationClientCreateEncryptedSellerCredentialUploadParams): Promise; requestIdentityAttestation

(params: WithOptionalAttestationServiceUrl>): Promise>; uploadSellerCredential(params: NitroAttestationClientUploadSellerCredentialParams): Promise; verifyBuyerTeePayment

(params: NitroAttestationClientVerifyBuyerTeePaymentParamsFor

): Promise>; verifyDispute

(params: NitroAttestationClientVerifyDisputeParamsFor

): Promise>; fetchAndVerifyAttestation(params?: Omit & { attestationServiceUrl?: string; }): Promise; encryptBuyerTeeSessionMaterial(params: EncryptBuyerTeeSessionMaterialParams): Promise; encryptIdentitySessionMaterial(params: EncryptIdentitySessionMaterialParams): Promise; encryptDisputeSessionMaterial(params: EncryptDisputeSessionMaterialParams): Promise; encryptSellerCredentialUpload(params: EncryptSellerCredentialUploadParams): Promise; } declare function createNitroAttestationClient(options: NitroAttestationClientOptions): NitroAttestationClient; declare function createEncryptedBuyerTeeSessionMaterial

(params: CreateEncryptedBuyerTeeSessionMaterialParamsFor

): Promise; declare function createEncryptedDisputeSessionMaterial

(params: CreateEncryptedDisputeSessionMaterialParamsFor

): Promise; declare function createEncryptedIdentitySessionMaterial

(params: CreateEncryptedIdentitySessionMaterialParamsFor

): Promise; declare function createEncryptedSellerCredentialUpload(params: CreateEncryptedSellerCredentialUploadParams): Promise; declare function getUnifiedPaymentVerifierDomainSeparator(params: UnifiedPaymentVerifierDomain): string; declare function getDisputeVerifierDomainSeparator(params: DisputeVerifierDomain): string; declare function hashUtf8(value: string): string; declare function encryptBuyerTeeSessionMaterial

(params: EncryptBuyerTeeSessionMaterialParamsFor

): Promise; declare function encryptDisputeSessionMaterial

(params: EncryptDisputeSessionMaterialParamsFor

): Promise; declare function encryptIdentitySessionMaterial

(params: EncryptIdentitySessionMaterialParamsFor

): Promise; declare function encryptSellerCredentialUpload(params: EncryptSellerCredentialUploadParams): Promise; type NitroAttestationErrorCode = "ATTESTATION_FETCH_FAILED" | "ATTESTATION_RESPONSE_INVALID" | "SERVICE_RESPONSE_ERROR" | "ATTESTATION_NONCE_MISMATCH" | "COSE_STRUCTURE_INVALID" | "COSE_ALG_UNSUPPORTED" | "COSE_SIGNATURE_INVALID_SIZE" | "PAYLOAD_FIELD_MISSING" | "NONCE_BINDING_FAILED" | "FRESHNESS_CHECK_FAILED" | "CERT_CHAIN_INVALID" | "CERT_NOT_TIME_VALID" | "AWS_ROOT_FINGERPRINT_MISMATCH" | "COSE_SIGNATURE_VERIFY_FAILED" | "PCR8_PIN_MISMATCH" | "TRUST_PIN_REQUIRED" | "SIGNER_NOT_TRUSTED" | "ATTESTATION_SIGNATURE_INVALID" | "ATTESTATION_BINDING_MISMATCH" | "ATTESTATION_EXPIRED" | "INVALID_PARAMETER" | "TIMEOUT" | "CRYPTO_UNAVAILABLE"; interface NitroServiceResponseErrorDetails extends Record { status: number; statusCode?: number; message?: string; responseObject?: unknown; } declare class NitroAttestationError extends Error { readonly code: NitroAttestationErrorCode; readonly cause?: unknown; readonly details?: Record; constructor(code: NitroAttestationErrorCode, message: string, options?: { cause?: unknown; details?: Record; }); } declare function fetchAndVerifyAttestation(params: FetchAndVerifyAttestationParams): Promise; declare function requestIdentityAttestation

(params: RequestIdentityAttestationParamsFor

): Promise>; declare const AWS_NITRO_ROOT_PEM = "-----BEGIN CERTIFICATE-----\nMIICETCCAZagAwIBAgIRAPkxdWgbkK/hHUbMtOTn+FYwCgYIKoZIzj0EAwMwSTEL\nMAkGA1UEBhMCVVMxDzANBgNVBAoMBkFtYXpvbjEMMAoGA1UECwwDQVdTMRswGQYD\nVQQDDBJhd3Mubml0cm8tZW5jbGF2ZXMwHhcNMTkxMDI4MTMyODA1WhcNNDkxMDI4\nMTQyODA1WjBJMQswCQYDVQQGEwJVUzEPMA0GA1UECgwGQW1hem9uMQwwCgYDVQQL\nDANBV1MxGzAZBgNVBAMMEmF3cy5uaXRyby1lbmNsYXZlczB2MBAGByqGSM49AgEG\nBSuBBAAiA2IABPwCVOumCMHzaHDimtqQvkY4MpJzbolL//Zy2YlES1BR5TSksfbb\n48C8WBoyt7F2Bw7eEtaaP+ohG2bnUs990d0JX28TcPQXCEPZ3BABIeTPYwEoCWZE\nh8l5YoQwTcU/9KNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUkCW1DdkF\nR+eWw5b6cp3PmanfS5YwDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2kAMGYC\nMQCjfy+Rocm9Xue4YnwWmNJVA44fA0P5W2OpYow9OYCVRaEevL8uO1XYru5xtMPW\nrfMCMQCi85sWBbJwKKXdS6BptQFuZbT73o/gBh1qUxl/nNr12UO8Yfwr6wPLb+6N\nIwLz3/Y=\n-----END CERTIFICATE-----\n"; declare const AWS_NITRO_ROOT_FINGERPRINT_SHA256_HEX = "641a0321a3e244efe456463195d606317ed7cdcc3c1756e09893f3c68f79bb5b"; declare function uploadSellerCredential(params: UploadSellerCredentialParams): Promise; declare function verifyBuyerTeePayment

(params: VerifyBuyerTeePaymentParamsFor

): Promise>; declare function verifyBuyerTeePaymentAttestation

(payload: BuyerTeeAttestationOutputFor

, options: VerifyBuyerTeePaymentAttestationOptionsFor

): BuyerTeeAttestationOutputFor

; declare function verifyDispute

(params: VerifyDisputeParamsFor

): Promise>; declare function verifyDisputeAttestation

(payload: DisputeAttestationOutputFor

, options: VerifyDisputeAttestationOptionsFor

): DisputeAttestationOutputFor

; declare function verifyIdentityAttestation

(payload: IdentityAttestationOutputFor

, options: VerifyIdentityAttestationOptionsFor

): NormalizedIdentityDetails

; declare function verifySellerCredentialBundle

(bundle: SellerCredentialBundleFor

, options: VerifySellerCredentialBundleOptionsFor

): SellerCredentialBundleFor

; 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 };