@coinbase/cdp-api-client 0.0.121 → 0.0.123

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.
@@ -15,6 +15,14 @@ export declare interface AndroidAppAttestationConfig {
15
15
  googleProjectNumber?: string;
16
16
  }
17
17
 
18
+ /**
19
+ * Android Play Integrity Standard API payload for verifying a signed challenge.
20
+ */
21
+ export declare interface AndroidIntegrityPayload {
22
+ /** Play Integrity token (JWT) obtained from `StandardIntegrityManager.requestToken()`, proving this request originates from a genuine, unmodified installation of the partner app. The token must have been requested with `requestHash = base64url(SHA256(challenge))`, where `challenge` is the opaque token issued by the [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge) endpoint. */
23
+ integrityToken: string;
24
+ }
25
+
18
26
  /**
19
27
  * Extended API error that encompasses both OpenAPI errors and other API-related errors
20
28
  */
@@ -643,6 +651,63 @@ export declare type CreateEvmEip7702DelegationWithEndUserAccountParams = {
643
651
 
644
652
  export declare type CreateEvmEip7702DelegationWithEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof createEvmEip7702DelegationWithEndUserAccount>>>;
645
653
 
654
+ /**
655
+ * Issues a one-time challenge for the iOS App Attest device-key **registration** step. The partner app passes the challenge to `DCAppAttestService.attestKey(keyId, clientDataHash: SHA256(challenge))` and submits the resulting attestation to [Register Onramp iOS Attestation](#operation/registerOnrampIosAttestation).
656
+
657
+ This is distinct from [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge), which issues the per-transaction session challenge. Registration is a one-time, per-device-install operation; iOS-only (Android validates Play Integrity inline per request and has no registration step).
658
+ * @summary Create an onramp iOS attestation challenge
659
+ */
660
+ export declare const createOnrampIosAttestationChallenge: (projectId: ProjectId, options?: SecondParameter_2<typeof cdpApiClient<IosAttestationChallenge>>) => Promise<IosAttestationChallenge>;
661
+
662
+ export declare type CreateOnrampIosAttestationChallengeResult = NonNullable<Awaited<ReturnType<typeof createOnrampIosAttestationChallenge>>>;
663
+
664
+ /**
665
+ * Issues a challenge for initiating an onramp flow from a partner mobile app. The challenge is signed by the partner app using platform attestation (iOS App Attest or Android Play Integrity) and submitted to the [Create Onramp Mobile Session](#operation/createOnrampMobileSession) endpoint to obtain a ready-to-use onramp URL, without requiring the partner app to authenticate with a CDP API key.
666
+
667
+ The `projectId` identifies the partner mobile app and must be on the Coinbase-maintained allowlist. The `redirectUrl` is required so the Coinbase app knows where to return the user after completing or dismissing the transaction.
668
+ * @summary Create an onramp mobile challenge
669
+ */
670
+ export declare const createOnrampMobileChallenge: (createOnrampMobileChallengeBody: CreateOnrampMobileChallengeBody, options?: SecondParameter_2<typeof cdpApiClient<OnrampMobileChallenge>>) => Promise<OnrampMobileChallenge>;
671
+
672
+ export declare type CreateOnrampMobileChallengeBody = OnrampSessionRequest & CreateOnrampMobileChallengeBodyAllOf & Required<Pick<OnrampSessionRequest & CreateOnrampMobileChallengeBodyAllOf, "redirectUrl">>;
673
+
674
+ export declare type CreateOnrampMobileChallengeBodyAllOf = {
675
+ projectId: ProjectId;
676
+ };
677
+
678
+ export declare type CreateOnrampMobileChallengeResult = NonNullable<Awaited<ReturnType<typeof createOnrampMobileChallenge>>>;
679
+
680
+ /**
681
+ * Verifies the platform attestation for a challenge issued by [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge) and returns a ready-to-use onramp URL. The URL embeds the session token as a query parameter so the Coinbase app can populate the handoff screen immediately on launch.
682
+
683
+ This endpoint is idempotent on the challenge token: if the same challenge is submitted again (e.g. due to a lost response), the server returns the original session URL rather than an error.
684
+
685
+ Provide exactly one platform payload: `ios` (App Attest assertion) or `android` (Play Integrity token).
686
+ * @summary Create an onramp mobile session
687
+ */
688
+ export declare const createOnrampMobileSession: (createOnrampMobileSessionRequest: CreateOnrampMobileSessionRequest, options?: SecondParameter_2<typeof cdpApiClient<CreateOnrampMobileSession201>>) => Promise<CreateOnrampMobileSession201>;
689
+
690
+ export declare type CreateOnrampMobileSession201 = {
691
+ session: OnrampSession;
692
+ };
693
+
694
+ /**
695
+ * Request body for creating an onramp mobile session.
696
+ */
697
+ export declare type CreateOnrampMobileSessionRequest = (unknown & {
698
+ /** The challenge returned by the [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge) endpoint. Must be passed back exactly as received — do not decode or modify. */
699
+ challenge: OnrampMobileChallengeToken;
700
+ ios?: IosAssertionPayload;
701
+ android?: AndroidIntegrityPayload;
702
+ }) | (unknown & {
703
+ /** The challenge returned by the [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge) endpoint. Must be passed back exactly as received — do not decode or modify. */
704
+ challenge: OnrampMobileChallengeToken;
705
+ ios?: IosAssertionPayload;
706
+ android?: AndroidIntegrityPayload;
707
+ });
708
+
709
+ export declare type CreateOnrampMobileSessionResult = NonNullable<Awaited<ReturnType<typeof createOnrampMobileSession>>>;
710
+
646
711
  /**
647
712
  * Request parameters for creating a Spend Permission.
648
713
  */
@@ -702,6 +767,31 @@ export declare type CreateSpendPermissionWithEndUserAccountResult = NonNullable<
702
767
  */
703
768
  export declare type DelegationForbiddenErrorResponse = Error_2;
704
769
 
770
+ /**
771
+ * Deletes a single enrolled passkey by its credential ID.
772
+
773
+ **Last Method Protection:** If deleting this passkey would leave the end user with no enrolled MFA methods of any type (no other passkeys, TOTP, or SMS) and the project has `requireVerificationOnLogin: true`, the request is rejected with a 403 to prevent account lockout.
774
+ * @summary Delete a passkey
775
+ */
776
+ export declare const deletePasskey: (userId: string, credentialId: string, params?: DeletePasskeyParams, options?: SecondParameter<typeof cdpApiClient<void>>) => Promise<void>;
777
+
778
+ export declare type DeletePasskeyParams = {
779
+ /**
780
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
781
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
782
+ */
783
+ projectID?: ProjectIDOptionalParameter;
784
+ };
785
+
786
+ export declare type DeletePasskeyResult = NonNullable<Awaited<ReturnType<typeof deletePasskey>>>;
787
+
788
+ /**
789
+ * A human-readable description.
790
+ * @minLength 0
791
+ * @maxLength 500
792
+ */
793
+ export declare type Description = string;
794
+
705
795
  /**
706
796
  * Information about an end user who authenticates using a JWT issued by the developer.
707
797
  */
@@ -924,6 +1014,16 @@ export declare interface EndUserEvmAccount {
924
1014
  address: string;
925
1015
  /** The date and time when the account was created, in ISO 8601 format. */
926
1016
  createdAt: string;
1017
+ /**
1018
+ * The date and time when the account's private key was first exported, in ISO 8601 format. This is set on the first export and preserved on subsequent exports; it is not updated on re-export.
1019
+ * @nullable
1020
+ */
1021
+ exportedAt?: string | null;
1022
+ /**
1023
+ * The date and time when the account's key was ejected (marked for deletion), in ISO 8601 format. Populated when the account has been ejected. The account record remains queryable after this timestamp is set; it reflects when ejection was requested, not when the key material is purged.
1024
+ * @nullable
1025
+ */
1026
+ ejectedAt?: string | null;
927
1027
  }
928
1028
 
929
1029
  /**
@@ -1084,6 +1184,16 @@ export declare interface EndUserSolanaAccount {
1084
1184
  address: string;
1085
1185
  /** The date and time when the account was created, in ISO 8601 format. */
1086
1186
  createdAt: string;
1187
+ /**
1188
+ * The date and time when the account's private key was first exported, in ISO 8601 format. This is set on the first export and preserved on subsequent exports; it is not updated on re-export.
1189
+ * @nullable
1190
+ */
1191
+ exportedAt?: string | null;
1192
+ /**
1193
+ * The date and time when the account's key was ejected (marked for deletion), in ISO 8601 format. Populated when the account has been ejected. The account record remains queryable after this timestamp is set; it reflects when ejection was requested, not when the key material is purged.
1194
+ * @nullable
1195
+ */
1196
+ ejectedAt?: string | null;
1087
1197
  }
1088
1198
 
1089
1199
  /**
@@ -1309,6 +1419,8 @@ export declare interface EvmUserOperation {
1309
1419
  transactionHash?: string;
1310
1420
  /** The list of receipts associated with the user operation. */
1311
1421
  receipts?: UserOperationReceipt[];
1422
+ /** The timestamp at which the prepared user operation expires. */
1423
+ expiresAt?: string;
1312
1424
  }
1313
1425
 
1314
1426
  /**
@@ -1846,9 +1958,11 @@ export declare const initiateMfaEnrollment: (userId: string, mfaMethod: "totp" |
1846
1958
  * Initiates MFA enrollment for an end user for given method.
1847
1959
  For TOTP, this endpoint generates a TOTP secret and returns an otpauth:// URL that can be scanned with an authenticator app like Google Authenticator. This endpoint returns both an authUrl (for QR code generation) and the raw secret (for manual entry). The secret must be verified within 5 minutes by calling the submit endpoint.
1848
1960
  For SMS, this endpoint sends a 6-digit OTP code to the provided phone number. You can use any phone number for SMS MFA, even if it differs from your SMS authentication phone number. The OTP code must be verified within 5 minutes.
1961
+ For passkey (WebAuthn), this endpoint returns credential creation options to pass to navigator.credentials.create() in the browser. The resulting attestation credential must be submitted to the submit endpoint. Passkey MFA is supported in web environments only.
1962
+ Passkey requests must carry an `Origin` header that is one of the project's configured CORS origins and is either `https://` or `http://localhost`; otherwise the request is rejected with a 400. The WebAuthn Relying Party ID is the exact host of that origin, so the resulting credential can only be used from that same host.
1849
1963
  * @summary Initiate MFA enrollment
1850
1964
  */
1851
- export declare const initiateMfaEnrollment2: (userId: string, mfaMethod: "totp" | "sms", initiateMfaEnrollmentRequest: InitiateMfaEnrollmentRequest, params?: InitiateMfaEnrollment2Params, options?: SecondParameter<typeof cdpApiClient<InitiateMfaEnrollmentResponseWrapper>>) => Promise<InitiateMfaEnrollmentResponseWrapper>;
1965
+ export declare const initiateMfaEnrollment2: (userId: string, mfaMethod: "totp" | "sms" | "passkey", initiateMfaEnrollmentRequest: InitiateMfaEnrollmentRequest, params?: InitiateMfaEnrollment2Params, options?: SecondParameter<typeof cdpApiClient<InitiateMfaEnrollmentResponseWrapper>>) => Promise<InitiateMfaEnrollmentResponseWrapper>;
1852
1966
 
1853
1967
  export declare type InitiateMfaEnrollment2Params = {
1854
1968
  /**
@@ -1868,15 +1982,30 @@ export declare type InitiateMfaEnrollmentParams = {
1868
1982
  projectID?: ProjectIDOptionalParameter;
1869
1983
  };
1870
1984
 
1985
+ /**
1986
+ * Response after initiating passkey MFA enrollment. Contains the WebAuthn credential creation options (PublicKeyCredentialCreationOptions) to pass directly to navigator.credentials.create() in the browser. The payload is an opaque object produced by the WebAuthn server; the SDK should not modify it beyond the standard base64url decoding of binary fields.
1987
+ */
1988
+ export declare interface InitiateMfaEnrollmentPasskeyResponse {
1989
+ /** The WebAuthn PublicKeyCredentialCreationOptions object (the `publicKey` member of the credential creation request). Passed opaquely to the browser WebAuthn API. */
1990
+ creationOptions: InitiateMfaEnrollmentPasskeyResponseCreationOptions;
1991
+ }
1992
+
1993
+ /**
1994
+ * The WebAuthn PublicKeyCredentialCreationOptions object (the `publicKey` member of the credential creation request). Passed opaquely to the browser WebAuthn API.
1995
+ */
1996
+ export declare type InitiateMfaEnrollmentPasskeyResponseCreationOptions = {
1997
+ [key: string]: unknown;
1998
+ };
1999
+
1871
2000
  /**
1872
2001
  * Request body for initiating MFA enrollment.
1873
2002
  */
1874
- export declare type InitiateMfaEnrollmentRequest = InitiateTotpMfaEnrollment | InitiateSmsMfaEnrollment;
2003
+ export declare type InitiateMfaEnrollmentRequest = InitiateTotpMfaEnrollment | InitiateSmsMfaEnrollment | InitiatePasskeyMfaEnrollment;
1875
2004
 
1876
2005
  /**
1877
2006
  * A wrapper for the response of an initiate MFA enrollment operation.
1878
2007
  */
1879
- export declare type InitiateMfaEnrollmentResponseWrapper = InitiateMfaEnrollmentTotpResponse | InitiateMfaEnrollmentSmsResponse;
2008
+ export declare type InitiateMfaEnrollmentResponseWrapper = InitiateMfaEnrollmentTotpResponse | InitiateMfaEnrollmentSmsResponse | InitiateMfaEnrollmentPasskeyResponse;
1880
2009
 
1881
2010
  export declare type InitiateMfaEnrollmentResult = NonNullable<Awaited<ReturnType<typeof initiateMfaEnrollment>>>;
1882
2011
 
@@ -1901,10 +2030,18 @@ export declare interface InitiateMfaEnrollmentTotpResponse {
1901
2030
  /**
1902
2031
  * Initiates an MFA verification flow for operations requiring MFA. This endpoint should be called when a user attempts a sensitive operation (like transaction signing) but doesn't have a valid MFA-verified session.
1903
2032
  For SMS, generates and sends a 6-digit OTP to the enrolled phone number. For TOTP, user generates code from their authenticator app.
1904
- The mfaMethod parameter is required to specify which method to use for verification.
2033
+ For passkey (WebAuthn), returns credential request options (in the response body) to pass to navigator.credentials.get() in the browser; the resulting assertion must be submitted to the submit endpoint. Only the passkey method returns a response body here; TOTP and SMS return `{}`.
2034
+ Passkey requests must carry an `Origin` header that is one of the project's configured CORS origins and is either `https://` or `http://localhost`; otherwise the request is rejected with a 400. Only passkeys enrolled from that exact host are offered, so a user with passkeys on other hosts only receives a 404 here and must enroll a passkey for this origin.
1905
2035
  * @summary Initiate MFA verification
1906
2036
  */
1907
- export declare const initiateMfaVerification: (userId: string, mfaMethod: "totp" | "sms", params?: InitiateMfaVerificationParams, options?: SecondParameter<typeof cdpApiClient<void>>) => Promise<void>;
2037
+ export declare const initiateMfaVerification: (userId: string, mfaMethod: "totp" | "sms" | "passkey", params?: InitiateMfaVerificationParams, options?: SecondParameter<typeof cdpApiClient<InitiateMfaVerificationResponseWrapper>>) => Promise<InitiateMfaVerificationResponseWrapper>;
2038
+
2039
+ /**
2040
+ * Empty response for TOTP/SMS verification initiation.
2041
+ */
2042
+ export declare interface InitiateMfaVerificationEmptyResponse {
2043
+ [key: string]: unknown;
2044
+ }
1908
2045
 
1909
2046
  export declare type InitiateMfaVerificationParams = {
1910
2047
  /**
@@ -1914,6 +2051,26 @@ export declare type InitiateMfaVerificationParams = {
1914
2051
  projectID?: ProjectIDOptionalParameter;
1915
2052
  };
1916
2053
 
2054
+ /**
2055
+ * Response after initiating passkey MFA verification. Contains the WebAuthn credential request options (PublicKeyCredentialRequestOptions) to pass directly to navigator.credentials.get() in the browser. Only the passkey method returns a body from the verify-initiate operation; TOTP and SMS return `{}`.
2056
+ */
2057
+ export declare interface InitiateMfaVerificationPasskeyResponse {
2058
+ /** The WebAuthn PublicKeyCredentialRequestOptions object (the `publicKey` member of the credential request). Passed opaquely to the browser WebAuthn API. */
2059
+ requestOptions: InitiateMfaVerificationPasskeyResponseRequestOptions;
2060
+ }
2061
+
2062
+ /**
2063
+ * The WebAuthn PublicKeyCredentialRequestOptions object (the `publicKey` member of the credential request). Passed opaquely to the browser WebAuthn API.
2064
+ */
2065
+ export declare type InitiateMfaVerificationPasskeyResponseRequestOptions = {
2066
+ [key: string]: unknown;
2067
+ };
2068
+
2069
+ /**
2070
+ * A wrapper for the response of an initiate MFA verification operation. Passkey verification returns WebAuthn credential request options; TOTP and SMS return `{}`.
2071
+ */
2072
+ export declare type InitiateMfaVerificationResponseWrapper = InitiateMfaVerificationPasskeyResponse | InitiateMfaVerificationEmptyResponse;
2073
+
1917
2074
  export declare type InitiateMfaVerificationResult = NonNullable<Awaited<ReturnType<typeof initiateMfaVerification>>>;
1918
2075
 
1919
2076
  /**
@@ -1944,6 +2101,23 @@ export declare interface InitiateOAuthAuthenticationResponse {
1944
2101
  authUrl: Url;
1945
2102
  }
1946
2103
 
2104
+ /**
2105
+ * Request to initiate passkey (WebAuthn) MFA enrollment. Returns WebAuthn credential creation options for the browser to pass to navigator.credentials.create(). Passkey MFA is supported in web environments only.
2106
+ */
2107
+ export declare interface InitiatePasskeyMfaEnrollment {
2108
+ /** The type of MFA method. */
2109
+ type: InitiatePasskeyMfaEnrollmentType;
2110
+ }
2111
+
2112
+ /**
2113
+ * The type of MFA method.
2114
+ */
2115
+ export declare type InitiatePasskeyMfaEnrollmentType = (typeof InitiatePasskeyMfaEnrollmentType)[keyof typeof InitiatePasskeyMfaEnrollmentType];
2116
+
2117
+ export declare const InitiatePasskeyMfaEnrollmentType: {
2118
+ readonly passkey: "passkey";
2119
+ };
2120
+
1947
2121
  /**
1948
2122
  * The request body for an end user to initiate Sign In With Ethereum (EIP-4361) authentication. The server generates a nonce and returns a pre-formatted SIWE message for the end user to sign with their Ethereum wallet.
1949
2123
  */
@@ -2085,6 +2259,16 @@ export declare interface IOSAppAttestationConfig {
2085
2259
  identifier?: string;
2086
2260
  }
2087
2261
 
2262
+ /**
2263
+ * iOS App Attest assertion payload for verifying a signed challenge.
2264
+ */
2265
+ export declare interface IosAssertionPayload {
2266
+ /** The key identifier of the iOS App Attest key previously registered via the attestation registration endpoint. This is the `keyId` returned by `DCAppAttestService.generateKey()`. */
2267
+ keyId: string;
2268
+ /** Base64-encoded App Attest assertion generated by `DCAppAttestService.generateAssertion(keyId, clientDataHash: SHA256(challenge))`. */
2269
+ assertion: string;
2270
+ }
2271
+
2088
2272
  /**
2089
2273
  * A cryptographic challenge for iOS App Attest attestation. Used only by iOS clients - Android uses a different flow with Play Integrity Standard API tokens.
2090
2274
  */
@@ -2111,11 +2295,7 @@ export declare interface IosAttestationPayload {
2111
2295
  * @pattern ^[A-Za-z0-9+/]+=*$
2112
2296
  */
2113
2297
  attestation: string;
2114
- /**
2115
- * The iOS bundle identifier of the application.
2116
- * @pattern ^[a-zA-Z0-9.-]+$
2117
- */
2118
- bundleId: string;
2298
+ bundleId: IosBundleId;
2119
2299
  }
2120
2300
 
2121
2301
  /**
@@ -2153,6 +2333,12 @@ export declare const IosAttestationRegistrationResponsePlatform: {
2153
2333
  readonly ios: "ios";
2154
2334
  };
2155
2335
 
2336
+ /**
2337
+ * iOS application bundle identifier (`CFBundleIdentifier`), as configured in the app's Xcode project / Info.plist, or shown for the App ID in Apple Developer. Must contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), and periods (.), typically in reverse-DNS form (e.g. `com.example.app`). Underscores are not permitted.
2338
+ * @pattern ^[a-zA-Z0-9.-]+$
2339
+ */
2340
+ export declare type IosBundleId = string;
2341
+
2156
2342
  /**
2157
2343
  * Type guard to check if an object is an OpenAPIError
2158
2344
  *
@@ -2183,6 +2369,22 @@ export declare const isRefreshTokenUnavailableError: (error: unknown) => error i
2183
2369
  */
2184
2370
  export declare const isTransientTokenReadError: (error: RefreshTokenUnavailableError) => boolean;
2185
2371
 
2372
+ /**
2373
+ * Lists the passkey (WebAuthn) credentials enrolled by the end user. Never returns the COSE public key or other sensitive credential material.
2374
+ * @summary List passkeys
2375
+ */
2376
+ export declare const listPasskeys: (userId: string, params?: ListPasskeysParams, options?: SecondParameter<typeof cdpApiClient<PasskeyListResponse>>) => Promise<PasskeyListResponse>;
2377
+
2378
+ export declare type ListPasskeysParams = {
2379
+ /**
2380
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
2381
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
2382
+ */
2383
+ projectID?: ProjectIDOptionalParameter;
2384
+ };
2385
+
2386
+ export declare type ListPasskeysResult = NonNullable<Awaited<ReturnType<typeof listPasskeys>>>;
2387
+
2186
2388
  export declare interface ListResponse {
2187
2389
  /** The token for the next page of items, if any. */
2188
2390
  nextPageToken?: string;
@@ -2246,6 +2448,7 @@ export declare interface MfaConfig {
2246
2448
  enabled: boolean;
2247
2449
  totpConfig: TotpConfig;
2248
2450
  smsConfig?: SmsConfig;
2451
+ passkeyConfig?: PasskeyConfig;
2249
2452
  /** The duration in seconds for which a single MFA verification remains valid. After this period, the user must re-authenticate with MFA. */
2250
2453
  verificationWindowSeconds: number;
2251
2454
  /** Whether applications should prompt users for MFA enrollment during the login flow if they are not already enrolled. */
@@ -2259,12 +2462,7 @@ export declare interface MfaConfig {
2259
2462
  }
2260
2463
 
2261
2464
  /**
2262
- * The MFA enrollment or verification flow expired.
2263
- */
2264
- export declare type MfaFlowExpiredErrorResponse = Error_2;
2265
-
2266
- /**
2267
- * The MFA code provided is invalid or expired.
2465
+ * The MFA submission (code or WebAuthn credential) is invalid or expired.
2268
2466
  */
2269
2467
  export declare type MfaInvalidCodeErrorResponse = Error_2;
2270
2468
 
@@ -2276,6 +2474,7 @@ export declare type MfaMethod = (typeof MfaMethod)[keyof typeof MfaMethod];
2276
2474
  export declare const MfaMethod: {
2277
2475
  readonly totp: "totp";
2278
2476
  readonly sms: "sms";
2477
+ readonly passkey: "passkey";
2279
2478
  };
2280
2479
 
2281
2480
  /**
@@ -2291,6 +2490,8 @@ export declare interface MFAMethods {
2291
2490
  totp?: MFAMethodsTotp;
2292
2491
  /** An object containing information about the end user's SMS MFA enrollment. */
2293
2492
  sms?: MFAMethodsSms;
2493
+ /** The end user's enrolled passkey (WebAuthn) credentials. A user may enroll multiple passkeys, so this is a list. Omitted or empty when the user has no passkeys enrolled. Never includes COSE public-key material. */
2494
+ passkey?: PasskeySummary[];
2294
2495
  }
2295
2496
 
2296
2497
  /**
@@ -2310,12 +2511,7 @@ export declare type MFAMethodsTotp = {
2310
2511
  };
2311
2512
 
2312
2513
  /**
2313
- * The user has not enrolled in MFA method.
2314
- */
2315
- export declare type MfaNotEnrolledErrorResponse = Error_2;
2316
-
2317
- /**
2318
- * The blockchain network for the payment. Supported networks depend on the account type. See [API and Network Support](https://docs.cdp.coinbase.com/api-reference/payment-apis/supported-networks-assets#by-asset-and-network) for more details.
2514
+ * The blockchain network for the payment. Supported networks depend on the account type.
2319
2515
  */
2320
2516
  export declare type Network = (typeof Network)[keyof typeof Network];
2321
2517
 
@@ -2368,23 +2564,103 @@ export declare const OAuth2ProviderType: {
2368
2564
  };
2369
2565
 
2370
2566
  /**
2371
- * The OTP email logo for a project.
2567
+ * A server-issued challenge for platform attestation in an App2App onramp handoff.
2568
+ */
2569
+ export declare interface OnrampMobileChallenge {
2570
+ /** An opaque server-issued token to be used with platform attestation (iOS App Attest or Android Play Integrity Standard). Treat it as an opaque string — do not attempt to parse its contents. Pass this value along with the attestation payload to the [Create Onramp Mobile Session](#operation/createOnrampMobileSession) endpoint to complete the App2App handoff.
2571
+
2572
+ **iOS**: pass this value directly to `DCAppAttestService.generateAssertion(keyId, clientDataHash: SHA256(challenge))`.
2573
+
2574
+ **Android**: compute `requestHash = base64url(SHA256(challenge))` and pass it to `StandardIntegrityManager.requestToken(requestHash)`. */
2575
+ challenge: OnrampMobileChallengeToken;
2576
+ /** The time at which the challenge expires. Challenges are short-lived; submit the attestation to [Create Onramp Mobile Session](#operation/createOnrampMobileSession) before this time or request a new challenge. */
2577
+ expiresAt: string;
2578
+ }
2579
+
2580
+ /**
2581
+ * An opaque server-issued token used in the App2App onramp handoff. Treat it as an opaque string — do not attempt to parse or decode its contents.
2582
+ * @minLength 16
2583
+ * @maxLength 2048
2584
+ */
2585
+ export declare type OnrampMobileChallengeToken = string;
2586
+
2587
+ /**
2588
+ * The type of payment method used to generate the onramp quote.
2589
+ */
2590
+ export declare type OnrampQuotePaymentMethodTypeId = (typeof OnrampQuotePaymentMethodTypeId)[keyof typeof OnrampQuotePaymentMethodTypeId];
2591
+
2592
+ export declare const OnrampQuotePaymentMethodTypeId: {
2593
+ readonly CARD: "CARD";
2594
+ readonly ACH: "ACH";
2595
+ readonly APPLE_PAY: "APPLE_PAY";
2596
+ readonly PAYPAL: "PAYPAL";
2597
+ readonly FIAT_WALLET: "FIAT_WALLET";
2598
+ readonly CRYPTO_WALLET: "CRYPTO_WALLET";
2599
+ };
2600
+
2601
+ /**
2602
+ * An onramp session containing a ready-to-use onramp URL.
2603
+ */
2604
+ export declare interface OnrampSession {
2605
+ /** Ready-to-use onramp URL. */
2606
+ onrampUrl: Url;
2607
+ }
2608
+
2609
+ /**
2610
+ * Common request parameters shared by [Create Onramp Session](#operation/createOnrampSession) and [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge).
2611
+ */
2612
+ export declare interface OnrampSessionRequest {
2613
+ /** The ticker (e.g. `BTC`, `USDC`, `SOL`) or the Coinbase UUID (e.g. `d85dce9b-5b73-5c3c-8978-522ce1d1c1b4`) of the crypto asset to be purchased.
2614
+
2615
+ Use the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-buy-options) to discover the supported purchase currencies for your user's location. */
2616
+ purchaseCurrency: string;
2617
+ /** The name of the crypto network the purchased currency will be sent on.
2618
+
2619
+ Use the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-buy-options) to discover the supported networks for your user's location. */
2620
+ destinationNetwork: string;
2621
+ /** The address the purchased crypto will be sent to. */
2622
+ destinationAddress: BlockchainAddress;
2623
+ /** A string representing the amount of fiat the user wishes to pay in exchange for crypto. When using this parameter, the returned quote will be inclusive of fees i.e. the user will pay this exact amount of the payment currency. */
2624
+ paymentAmount?: string;
2625
+ /** A string representing the amount of crypto the user wishes to purchase. When using this parameter, the returned quote will be exclusive of fees i.e. the user will receive this exact amount of the purchase currency. */
2626
+ purchaseAmount?: string;
2627
+ /** The fiat currency to be converted to crypto. */
2628
+ paymentCurrency?: string;
2629
+ paymentMethod?: OnrampQuotePaymentMethodTypeId;
2630
+ /** The ISO 3166-1 two letter country code (e.g. US). */
2631
+ country?: string;
2632
+ /** The ISO 3166-2 two letter state code (e.g. NY). Only required for US. */
2633
+ subdivision?: string;
2634
+ /** URI to redirect the user to after they complete or dismiss the transaction. Embedded in the returned onramp URL as a query parameter. */
2635
+ redirectUrl?: Uri;
2636
+ /** The IP address of the end user requesting the onramp transaction. */
2637
+ clientIp?: string;
2638
+ /** A unique string that represents the user in your app. This can be used to link individual transactions together so you can retrieve the transaction history for your users. Prefix this string with "sandbox-" (e.g. "sandbox-user-1234") to perform a sandbox transaction which will allow you to test your integration without any real transfer of funds.
2639
+
2640
+ This value can be used with the [Onramp User Transactions API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-onramp-transactions-by-id) to retrieve all transactions created by the user. */
2641
+ partnerUserRef?: string;
2642
+ }
2643
+
2644
+ /**
2645
+ * An OTP email logo upload and its moderation state.
2372
2646
  */
2373
2647
  export declare interface OtpEmailLogo {
2374
- /** The unique identifier of the logo asset. */
2375
- logoId: string;
2376
- /** The public URL for the logo image. */
2377
- logoUrl?: Url;
2378
- /** The moderation status of the logo. If pending, poll getProjectConfig until the status resolves to approved or rejected. If rejected, upload a new image. */
2379
- moderationStatus: OtpEmailLogoModerationStatus;
2648
+ /** Moderation status of this logo. An approved logo is live and populates url. A pending logo is still undergoing moderation. A rejected logo failed moderation and populates rejectionReason.
2649
+ */
2650
+ status: OtpEmailLogoStatus;
2651
+ /** The URL of the logo. Present only when status is approved; omitted otherwise. */
2652
+ url?: Url;
2653
+ /** Reason the upload was rejected. Present only when status is rejected; omitted otherwise. */
2654
+ rejectionReason?: string;
2380
2655
  }
2381
2656
 
2382
2657
  /**
2383
- * The moderation status of the logo. If pending, poll getProjectConfig until the status resolves to approved or rejected. If rejected, upload a new image.
2658
+ * Moderation status of this logo. An approved logo is live and populates url. A pending logo is still undergoing moderation. A rejected logo failed moderation and populates rejectionReason.
2659
+
2384
2660
  */
2385
- export declare type OtpEmailLogoModerationStatus = (typeof OtpEmailLogoModerationStatus)[keyof typeof OtpEmailLogoModerationStatus];
2661
+ export declare type OtpEmailLogoStatus = (typeof OtpEmailLogoStatus)[keyof typeof OtpEmailLogoStatus];
2386
2662
 
2387
- export declare const OtpEmailLogoModerationStatus: {
2663
+ export declare const OtpEmailLogoStatus: {
2388
2664
  readonly approved: "approved";
2389
2665
  readonly pending: "pending";
2390
2666
  readonly rejected: "rejected";
@@ -2400,6 +2676,86 @@ export declare type PageSizeParameter = number;
2400
2676
  */
2401
2677
  export declare type PageTokenParameter = string;
2402
2678
 
2679
+ /**
2680
+ * Passkey-specific MFA configuration. There is no project-level Relying Party ID: the RP ID is derived per ceremony from the request `Origin`, and each enrolled credential records the host it is scoped to (see `PasskeySummary.rpId`).
2681
+ */
2682
+ export declare interface PasskeyConfig {
2683
+ /** Whether passkey MFA is enabled. */
2684
+ enabled: boolean;
2685
+ userVerification?: PasskeyUserVerification;
2686
+ }
2687
+
2688
+ /**
2689
+ * The list of passkeys enrolled by an end user.
2690
+ */
2691
+ export declare interface PasskeyListResponse {
2692
+ /** The enrolled passkey credentials. */
2693
+ passkeys: PasskeySummary[];
2694
+ }
2695
+
2696
+ /**
2697
+ * Read-only echo of the project's passkey (WebAuthn) MFA configuration, exposed on the project config so SDKs can decide whether to offer passkey ceremonies. Use `getProjectConfig` for that decision: when that response omits this block, passkey MFA is unavailable for the project and clients should treat it as disabled. Project-config write echoes may omit the block regardless of project state, so call `getProjectConfig` when current availability matters. When the block is present, `enabled` is authoritative rather than its mere presence. The Relying Party ID is deliberately not exposed: it is derived per ceremony from the request `Origin` (the origin's exact host), so the client already knows it.
2698
+ */
2699
+ export declare interface PasskeyProjectConfig {
2700
+ /** Whether passkey MFA is enabled for this project. */
2701
+ enabled: boolean;
2702
+ }
2703
+
2704
+ /**
2705
+ * Summary of an enrolled passkey credential. Never includes the COSE public key or any other sensitive credential material.
2706
+ */
2707
+ export declare interface PasskeySummary {
2708
+ /**
2709
+ * The base64url-encoded WebAuthn credential ID, uniquely identifying the passkey. Used as the path parameter when deleting a passkey.
2710
+ * @maxLength 1500
2711
+ * @pattern ^[A-Za-z0-9_-]+={0,2}$
2712
+ */
2713
+ credentialId: string;
2714
+ /**
2715
+ * The human-friendly name assigned to the passkey at enrollment, if any.
2716
+ * @maxLength 100
2717
+ */
2718
+ name?: string;
2719
+ /** The authenticator's AAGUID (Authenticator Attestation GUID), identifying the authenticator model. May be all-zero when the authenticator does not report one. */
2720
+ aaguid?: string;
2721
+ /** The transports the authenticator reported for this credential. */
2722
+ transports?: PasskeySummaryTransportsItem[];
2723
+ /** Whether the credential is currently backed up (e.g. synced to a cloud keychain / multi-device passkey). Reflects the authenticator's WebAuthn backup-state (BS) flag. */
2724
+ backedUp?: boolean;
2725
+ /** When the passkey was enrolled, in ISO 8601 format. */
2726
+ enrolledAt: string;
2727
+ /** When the passkey was last used for verification, in ISO 8601 format. Absent if the passkey has not been used since enrollment. */
2728
+ lastUsedAt?: string;
2729
+ /** The WebAuthn Relying Party ID this passkey is scoped to: the exact host of the origin it was enrolled from, canonicalized and without a port. Always present. The passkey can only be used from that same host, so a user who needs a passkey on another host must enroll one there as well. */
2730
+ rpId: string;
2731
+ }
2732
+
2733
+ /**
2734
+ * A WebAuthn authenticator transport hint, from the closed set defined by the WebAuthn `AuthenticatorTransport` values. `smart-card` and `cable` are the verbatim WebAuthn wire values and are kebab-case by exception (§2.6), matching those values exactly.
2735
+ */
2736
+ export declare type PasskeySummaryTransportsItem = (typeof PasskeySummaryTransportsItem)[keyof typeof PasskeySummaryTransportsItem];
2737
+
2738
+ export declare const PasskeySummaryTransportsItem: {
2739
+ readonly usb: "usb";
2740
+ readonly nfc: "nfc";
2741
+ readonly ble: "ble";
2742
+ readonly internal: "internal";
2743
+ readonly hybrid: "hybrid";
2744
+ readonly "smart-card": "smart-card";
2745
+ readonly cable: "cable";
2746
+ };
2747
+
2748
+ /**
2749
+ * The WebAuthn user-verification requirement applied during passkey ceremonies for this project. Defaults to `preferred` when omitted.
2750
+ */
2751
+ export declare type PasskeyUserVerification = (typeof PasskeyUserVerification)[keyof typeof PasskeyUserVerification];
2752
+
2753
+ export declare const PasskeyUserVerification: {
2754
+ readonly required: "required";
2755
+ readonly preferred: "preferred";
2756
+ readonly discouraged: "discouraged";
2757
+ };
2758
+
2403
2759
  /**
2404
2760
  * The ERC-7677 `context` object forwarded to the paymaster service as part of the `paymasterService` capability. The fields in this object are defined by the paymaster service provider; CDP forwards them to the paymaster unchanged. This field is only valid when a paymaster is configured for the request. Providing `paymasterContext` without a paymaster configured results in an `invalid_request` error.
2405
2761
  */
@@ -2435,9 +2791,13 @@ export declare interface ProjectConfig {
2435
2791
  iCloudAutoLinkingEnabled?: boolean;
2436
2792
  /** Whether delegated signing is enabled for this project. When enabled, end users can delegate transaction signing to the project. */
2437
2793
  delegatedSigningEnabled?: boolean;
2794
+ /** The verified cookie domain for this project, if one is active. When present, the SDK should route all auth requests through https://{activeCookieDomain}/v2/embedded-wallet-api/... so that first-party HttpOnly session cookies are scoped to the developer's domain. Absent when no cookie domain is registered or the registered domain is not yet active. */
2795
+ activeCookieDomain?: string;
2438
2796
  appAttestation?: AppAttestationProjectConfig;
2439
- /** The project's OTP email logo. */
2440
- logo?: OtpEmailLogo;
2797
+ passkey?: PasskeyProjectConfig;
2798
+ /** The project's OTP email logos, sorted by upload time from oldest to newest. When the latest upload is approved, only that logo is returned. When the latest upload is pending or rejected, the previously approved logo is also returned when one exists.
2799
+ */
2800
+ logos?: OtpEmailLogo[];
2441
2801
  }
2442
2802
 
2443
2803
  /**
@@ -2451,6 +2811,11 @@ export declare type ProjectId = string;
2451
2811
  */
2452
2812
  export declare type ProjectIDOptionalParameter = string;
2453
2813
 
2814
+ /**
2815
+ * Rate limit exceeded.
2816
+ */
2817
+ export declare type RateLimitExceededResponse = Error_2;
2818
+
2454
2819
  /**
2455
2820
  * Receives the OAuth callback from an identity provider. This endpoint is intended only for use as a callback URL during OAuth2 provider flows and should not be called directly by client applications. This is an unauthenticated endpoint.
2456
2821
  * @summary Receive OAuth callback from identity provider
@@ -2675,6 +3040,20 @@ export declare const registerAttestation: (projectId: ProjectId, iosAttestationR
2675
3040
 
2676
3041
  export declare type RegisterAttestationResult = NonNullable<Awaited<ReturnType<typeof registerAttestation>>>;
2677
3042
 
3043
+ /**
3044
+ * Verifies an iOS App Attest attestation payload and registers the device's public key for future assertion validation. The server checks that the attestation is genuine and signed by Apple, that the bundle ID is in the partner's allowed mobile clients list, and that the challenge issued by [Create Onramp iOS Attestation Challenge](#operation/createOnrampIosAttestationChallenge) is fresh and unused.
3045
+
3046
+ This is a one-time, per-device-install operation; iOS-only (Android validates Play Integrity inline per request and has no registration step). For security, all client-side verification failures are returned as an opaque `400 invalid_request` — the response never reveals which specific check failed.
3047
+
3048
+ The Apple App Attest `keyId` is supplied only in the request body (`ios.keyId`). Do not put `keyId` in the URL — App Attest key IDs are standard base64 and frequently contain `/`, which breaks path routing at the edge.
3049
+
3050
+ Idempotency is provided by `ios.keyId` itself: the server upserts the device public key on `(app, keyId)`, so repeating registration for the same key replaces the stored public key rather than creating a duplicate. This endpoint does not accept `X-Idempotency-Key` — `ios.keyId` is the natural idempotency key for the registration resource. The challenge remains single-use and is claimed on first receipt.
3051
+ * @summary Register a device key for iOS App Attest
3052
+ */
3053
+ export declare const registerOnrampIosAttestation: (projectId: ProjectId, iosAttestationRegistrationRequest: IosAttestationRegistrationRequest, options?: SecondParameter_2<typeof cdpApiClient<IosAttestationRegistrationResponse>>) => Promise<IosAttestationRegistrationResponse>;
3054
+
3055
+ export declare type RegisterOnrampIosAttestationResult = NonNullable<Awaited<ReturnType<typeof registerOnrampIosAttestation>>>;
3056
+
2678
3057
  /**
2679
3058
  * Registers a Temporary Wallet Secret for a given end user. This secret is generated on the client-side by the end user's device/browser, typically with the CDP User Wallet SDK, and is used to authenticate requests related to signing.
2680
3059
 
@@ -2843,6 +3222,8 @@ export declare type RevokeSpendPermissionWithEndUserAccountResult = NonNullable<
2843
3222
 
2844
3223
  declare type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
2845
3224
 
3225
+ declare type SecondParameter_2<T extends (...args: never) => unknown> = Parameters<T>[1];
3226
+
2846
3227
  /**
2847
3228
  * Sends USDC from an end user's EVM account (EOA or Smart Account) to a recipient address on a supported EVM network. This endpoint simplifies USDC transfers by automatically handling contract resolution, decimal conversion, gas estimation, and transaction encoding.
2848
3229
  The `amount` field accepts human-readable amounts as decimal strings (e.g., "1.5", "25.50").
@@ -3170,6 +3551,14 @@ export declare type ServiceUnavailableErrorResponse = Error_2;
3170
3551
  */
3171
3552
  export declare const setAuthManager: (manager: AuthManager) => void;
3172
3553
 
3554
+ /**
3555
+ * Updates the active cookie domain used for first-party auth routing.
3556
+ * Call after fetching project config to enable (non-null) or disable (null) cookie domain routing.
3557
+ *
3558
+ * @param domain - The active cookie domain, or null to route through the default CDP URL.
3559
+ */
3560
+ export declare const setCookieDomain: (domain: string | null) => void;
3561
+
3173
3562
  /**
3174
3563
  * Signs a 32-byte sighash using the child key derived from the end user's Bitcoin HD (Hierarchical Deterministic) account at the given child path. The child path [change, address_index] must correspond to the same path used to derive the address that controls the UTXO being spent. One call is required per UTXO input in the transaction.
3175
3564
  * @summary Sign a Bitcoin hash with an end user account
@@ -3493,6 +3882,50 @@ export declare type SignSolanaTransactionWithEndUserAccountParams = {
3493
3882
 
3494
3883
  export declare type SignSolanaTransactionWithEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof signSolanaTransactionWithEndUserAccount>>>;
3495
3884
 
3885
+ /**
3886
+ * Signs an x402 payment payload using the end user's given Solana account.
3887
+ Accepts the full x402 payment required response body from a resource server plus an index into the accepts array selecting which payment option to sign. The paymentRequired envelope's x402Version, resource, and extensions are carried through into the signed payment payload; only the selected accept entry becomes paymentPayload.accepted.
3888
+ Returns a signed payment payload that can be base64-encoded and sent in the PAYMENT-SIGNATURE header of the resource request.
3889
+ If acceptsIndex is out of range for paymentRequired.accepts, or the selected accept is not a Solana network payment option, the request fails with 422.
3890
+ * @summary Sign x402 payment via end user Solana account
3891
+ */
3892
+ export declare const signSolanaX402PaymentWithEndUserAccount: (userId: string, signSolanaX402PaymentWithEndUserAccountBody: SignSolanaX402PaymentWithEndUserAccountBody, params?: SignSolanaX402PaymentWithEndUserAccountParams, options?: SecondParameter<typeof cdpApiClient<SignSolanaX402PaymentWithEndUserAccount200>>) => Promise<SignSolanaX402PaymentWithEndUserAccount200>;
3893
+
3894
+ export declare type SignSolanaX402PaymentWithEndUserAccount200 = {
3895
+ /** The signed x402 payment payload. Base64-encode this and send it in the PAYMENT-SIGNATURE header of the resource request. */
3896
+ paymentPayload: X402PaymentPayload;
3897
+ };
3898
+
3899
+ export declare type SignSolanaX402PaymentWithEndUserAccountBody = {
3900
+ /** The complete x402 payment required response body from the resource server. Top-level fields (x402Version, resource, error, extensions) are preserved in the signed payment payload; acceptsIndex selects which entry from accepts is signed as paymentPayload.accepted. */
3901
+ paymentRequired: X402PaymentRequired;
3902
+ /**
3903
+ * Zero-based index into paymentRequired.accepts selecting which payment option to sign. Must be less than the length of accepts. The entry at this index must be a Solana network payment option for this endpoint.
3904
+ * @minimum 0
3905
+ */
3906
+ acceptsIndex: number;
3907
+ /**
3908
+ * The base58 encoded address of the end user's Solana account to sign with.
3909
+ * @pattern ^[1-9A-HJ-NP-Za-km-z]{32,44}$
3910
+ */
3911
+ address: string;
3912
+ /**
3913
+ * Required when not using delegated signing. The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
3914
+ * @pattern ^[a-zA-Z0-9-]{1,100}$
3915
+ */
3916
+ walletSecretId?: string;
3917
+ };
3918
+
3919
+ export declare type SignSolanaX402PaymentWithEndUserAccountParams = {
3920
+ /**
3921
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
3922
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
3923
+ */
3924
+ projectID?: ProjectIDOptionalParameter;
3925
+ };
3926
+
3927
+ export declare type SignSolanaX402PaymentWithEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof signSolanaX402PaymentWithEndUserAccount>>>;
3928
+
3496
3929
  /**
3497
3930
  * Information about an end user who authenticates using Sign In With Ethereum (EIP-4361).
3498
3931
  */
@@ -3601,11 +4034,23 @@ export declare interface SpendPermissionResponseObject {
3601
4034
  network: SpendPermissionNetwork;
3602
4035
  }
3603
4036
 
4037
+ /**
4038
+ * Submit a 6-digit MFA code for a TOTP or SMS method.
4039
+ */
4040
+ export declare interface SubmitMfaCode {
4041
+ /**
4042
+ * The 6-digit MFA code from the authenticator app or SMS.
4043
+ * @pattern ^\d{6}$
4044
+ */
4045
+ mfaCode: string;
4046
+ }
4047
+
3604
4048
  /**
3605
4049
  * Submits an MFA code to complete the enrollment process. On success, the MFA configuration is persisted to the end user.
4050
+ For passkey, the request must carry the same `Origin` header the enrollment was initiated from — the ceremony is bound to that exact origin (scheme, host, and port). A missing, disallowed, or differing `Origin` restarts the ceremony rather than silently changing the Relying Party ID.
3606
4051
  * @summary Submit MFA enrollment
3607
4052
  */
3608
- export declare const submitMfaEnrollment: (userId: string, mfaMethod: "totp" | "sms", submitMfaEnrollmentBody: SubmitMfaEnrollmentBody, params?: SubmitMfaEnrollmentParams, options?: SecondParameter<typeof cdpApiClient<SubmitMfaEnrollment200>>) => Promise<SubmitMfaEnrollment200>;
4053
+ export declare const submitMfaEnrollment: (userId: string, mfaMethod: "totp" | "sms" | "passkey", submitMfaEnrollmentRequest: SubmitMfaEnrollmentRequest, params?: SubmitMfaEnrollmentParams, options?: SecondParameter<typeof cdpApiClient<SubmitMfaEnrollment200>>) => Promise<SubmitMfaEnrollment200>;
3609
4054
 
3610
4055
  /**
3611
4056
  * Response after successful MFA enrollment with updated end user.
@@ -3614,17 +4059,6 @@ export declare type SubmitMfaEnrollment200 = {
3614
4059
  endUser: EndUser;
3615
4060
  };
3616
4061
 
3617
- /**
3618
- * Request to submit MFA code and complete enrollment.
3619
- */
3620
- export declare type SubmitMfaEnrollmentBody = {
3621
- /**
3622
- * The 6-digit MFA code from the authenticator app.
3623
- * @pattern ^\d{6}$
3624
- */
3625
- mfaCode: string;
3626
- };
3627
-
3628
4062
  export declare type SubmitMfaEnrollmentParams = {
3629
4063
  /**
3630
4064
  * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
@@ -3633,24 +4067,19 @@ export declare type SubmitMfaEnrollmentParams = {
3633
4067
  projectID?: ProjectIDOptionalParameter;
3634
4068
  };
3635
4069
 
4070
+ /**
4071
+ * Request body to complete MFA enrollment. For TOTP and SMS, submit the 6-digit code. For passkey, submit the WebAuthn attestation credential returned by navigator.credentials.create().
4072
+ */
4073
+ export declare type SubmitMfaEnrollmentRequest = SubmitMfaCode | SubmitPasskeyRegistration;
4074
+
3636
4075
  export declare type SubmitMfaEnrollmentResult = NonNullable<Awaited<ReturnType<typeof submitMfaEnrollment>>>;
3637
4076
 
3638
4077
  /**
3639
4078
  * Submits an MFA code to complete the verification process.
4079
+ For passkey, the request must carry the same `Origin` header the verification was initiated from — the ceremony is bound to that exact origin (scheme, host, and port). A missing, disallowed, or differing `Origin` restarts the ceremony rather than silently changing the Relying Party ID.
3640
4080
  * @summary Submit MFA verification
3641
4081
  */
3642
- export declare const submitMfaVerification: (userId: string, mfaMethod: "totp" | "sms", submitMfaVerificationBody: SubmitMfaVerificationBody, params?: SubmitMfaVerificationParams, options?: SecondParameter<typeof cdpApiClient<void>>) => Promise<void>;
3643
-
3644
- /**
3645
- * Request to submit MFA code for verification.
3646
- */
3647
- export declare type SubmitMfaVerificationBody = {
3648
- /**
3649
- * The 6-digit MFA code from the authenticator app.
3650
- * @pattern ^\d{6}$
3651
- */
3652
- mfaCode: string;
3653
- };
4082
+ export declare const submitMfaVerification: (userId: string, mfaMethod: "totp" | "sms" | "passkey", submitMfaVerificationRequest: SubmitMfaVerificationRequest, params?: SubmitMfaVerificationParams, options?: SecondParameter<typeof cdpApiClient<void>>) => Promise<void>;
3654
4083
 
3655
4084
  export declare type SubmitMfaVerificationParams = {
3656
4085
  /**
@@ -3660,14 +4089,76 @@ export declare type SubmitMfaVerificationParams = {
3660
4089
  projectID?: ProjectIDOptionalParameter;
3661
4090
  };
3662
4091
 
4092
+ /**
4093
+ * Request body to complete MFA verification. For TOTP and SMS, submit the 6-digit code. For passkey, submit the WebAuthn assertion credential returned by navigator.credentials.get().
4094
+ */
4095
+ export declare type SubmitMfaVerificationRequest = SubmitMfaCode | SubmitPasskeyVerification;
4096
+
3663
4097
  export declare type SubmitMfaVerificationResult = NonNullable<Awaited<ReturnType<typeof submitMfaVerification>>>;
3664
4098
 
3665
4099
  /**
3666
- * Information about an end user who authenticates using Telegram.
4100
+ * Submit a WebAuthn attestation credential to complete passkey enrollment. The `credential` object is the result of navigator.credentials.create(), serialized to JSON, and is parsed opaquely by the WebAuthn server.
3667
4101
  */
3668
- export declare interface TelegramAuthentication {
3669
- type: OAuth2ProviderType;
3670
- /** The Telegram ID for the end user. */
4102
+ export declare interface SubmitPasskeyRegistration {
4103
+ /** The type of MFA method. */
4104
+ type: SubmitPasskeyRegistrationType;
4105
+ /** The WebAuthn registration credential (PublicKeyCredential with an AuthenticatorAttestationResponse), serialized to JSON. Passed opaquely to the WebAuthn server for verification. */
4106
+ credential: SubmitPasskeyRegistrationCredential;
4107
+ /**
4108
+ * An optional human-friendly name for the passkey (e.g. the device or browser), shown when listing enrolled passkeys.
4109
+ * @maxLength 100
4110
+ */
4111
+ name?: string;
4112
+ }
4113
+
4114
+ /**
4115
+ * The WebAuthn registration credential (PublicKeyCredential with an AuthenticatorAttestationResponse), serialized to JSON. Passed opaquely to the WebAuthn server for verification.
4116
+ */
4117
+ export declare type SubmitPasskeyRegistrationCredential = {
4118
+ [key: string]: unknown;
4119
+ };
4120
+
4121
+ /**
4122
+ * The type of MFA method.
4123
+ */
4124
+ export declare type SubmitPasskeyRegistrationType = (typeof SubmitPasskeyRegistrationType)[keyof typeof SubmitPasskeyRegistrationType];
4125
+
4126
+ export declare const SubmitPasskeyRegistrationType: {
4127
+ readonly passkey: "passkey";
4128
+ };
4129
+
4130
+ /**
4131
+ * Submit a WebAuthn assertion credential to complete passkey verification. The `credential` object is the result of navigator.credentials.get(), serialized to JSON, and is parsed opaquely by the WebAuthn server.
4132
+ */
4133
+ export declare interface SubmitPasskeyVerification {
4134
+ /** The type of MFA method. */
4135
+ type: SubmitPasskeyVerificationType;
4136
+ /** The WebAuthn assertion credential (PublicKeyCredential with an AuthenticatorAssertionResponse), serialized to JSON. Passed opaquely to the WebAuthn server for verification. */
4137
+ credential: SubmitPasskeyVerificationCredential;
4138
+ }
4139
+
4140
+ /**
4141
+ * The WebAuthn assertion credential (PublicKeyCredential with an AuthenticatorAssertionResponse), serialized to JSON. Passed opaquely to the WebAuthn server for verification.
4142
+ */
4143
+ export declare type SubmitPasskeyVerificationCredential = {
4144
+ [key: string]: unknown;
4145
+ };
4146
+
4147
+ /**
4148
+ * The type of MFA method.
4149
+ */
4150
+ export declare type SubmitPasskeyVerificationType = (typeof SubmitPasskeyVerificationType)[keyof typeof SubmitPasskeyVerificationType];
4151
+
4152
+ export declare const SubmitPasskeyVerificationType: {
4153
+ readonly passkey: "passkey";
4154
+ };
4155
+
4156
+ /**
4157
+ * Information about an end user who authenticates using Telegram.
4158
+ */
4159
+ export declare interface TelegramAuthentication {
4160
+ type: OAuth2ProviderType;
4161
+ /** The Telegram ID for the end user. */
3671
4162
  id: number;
3672
4163
  /** The Telegram user's first name. */
3673
4164
  firstName?: string;
@@ -3973,6 +4464,703 @@ export declare interface VerifySmsAuthenticationRequest {
3973
4464
 
3974
4465
  export declare type VerifySmsAuthenticationResult = NonNullable<Awaited<ReturnType<typeof verifySmsAuthentication>>>;
3975
4466
 
4467
+ /**
4468
+ * Immutable configuration for an x402 batch-settlement payment channel. The EIP-712 hash of this struct produces the `channelId` used by all batch-settlement payloads.
4469
+ */
4470
+ export declare interface X402BatchSettlementChannelConfig {
4471
+ /**
4472
+ * The 0x-prefixed, checksum EVM address of the payer (channel funder).
4473
+ * @pattern ^0x[0-9a-fA-F]{40}$
4474
+ */
4475
+ payer: string;
4476
+ /**
4477
+ * The 0x-prefixed, checksum EVM address authorized to sign vouchers on behalf of the payer.
4478
+ * @pattern ^0x[0-9a-fA-F]{40}$
4479
+ */
4480
+ payerAuthorizer: string;
4481
+ /**
4482
+ * The 0x-prefixed, checksum EVM address of the receiver (resource server / merchant).
4483
+ * @pattern ^0x[0-9a-fA-F]{40}$
4484
+ */
4485
+ receiver: string;
4486
+ /**
4487
+ * The 0x-prefixed, checksum EVM address authorized to sign claim batches on behalf of the receiver (typically the facilitator).
4488
+ * @pattern ^0x[0-9a-fA-F]{40}$
4489
+ */
4490
+ receiverAuthorizer: string;
4491
+ /**
4492
+ * The 0x-prefixed, checksum EVM address of the ERC-20 payment token.
4493
+ * @pattern ^0x[0-9a-fA-F]{40}$
4494
+ */
4495
+ token: string;
4496
+ /**
4497
+ * The non-cooperative withdraw delay in seconds. Must be between 900 (15 minutes) and 2,592,000 (30 days).
4498
+ * @minimum 900
4499
+ * @maximum 2592000
4500
+ */
4501
+ withdrawDelay: number;
4502
+ /**
4503
+ * A 32-byte salt used to differentiate channels between the same payer/receiver pair.
4504
+ * @pattern ^0x[0-9a-fA-F]{64}$
4505
+ */
4506
+ salt: string;
4507
+ }
4508
+
4509
+ /**
4510
+ * A single voucher claim within a batched on-chain claim transaction. Used by `x402BatchSettlementClaimPayload.claims` and by the server-enriched shape of `x402BatchSettlementRefundPayload.claims`.
4511
+ NOTE: the nested `voucher` here has a **different shape** from the top-level `x402BatchSettlementVoucher` schema. The top-level voucher is the signed cumulative-ceiling message sent by a client (`{channelId, maxClaimableAmount, signature}`). This nested `voucher` mirrors the on-chain claim struct (`{channel: ChannelConfig, maxClaimableAmount}`) that participates in the EIP-712 hash, with `signature` and `totalClaimed` as siblings rather than nested fields. The field names match the upstream x402 protocol and the on-chain Solidity struct; they cannot be renamed without breaking wire and EIP-712 compatibility.
4512
+ */
4513
+ export declare interface X402BatchSettlementClaim {
4514
+ /** The voucher to claim, identified by the channel config it was signed against and its cumulative ceiling. Field shape mirrors the on-chain claim struct. */
4515
+ voucher: X402BatchSettlementClaimVoucher;
4516
+ /**
4517
+ * The voucher signature from `payerAuthorizer`.
4518
+ * @pattern ^0x[0-9a-fA-F]+$
4519
+ */
4520
+ signature: string;
4521
+ /**
4522
+ * The cumulative amount already claimed from this channel as of this claim.
4523
+ * @pattern ^[0-9]+$
4524
+ */
4525
+ totalClaimed: string;
4526
+ }
4527
+
4528
+ /**
4529
+ * Server-to-facilitator request to batch on-chain claims of accumulated vouchers. `claimAuthorizerSignature` is optional; when absent the facilitator auto-signs with its receiver-authorizer key.
4530
+ */
4531
+ export declare interface X402BatchSettlementClaimPayload {
4532
+ type: X402BatchSettlementClaimPayloadType;
4533
+ /** The list of voucher claims to batch in a single on-chain `claim` call. */
4534
+ claims: X402BatchSettlementClaim[];
4535
+ /**
4536
+ * Optional EIP-712 signature from the receiver authorizer over the claim batch. When omitted, the facilitator auto-signs.
4537
+ * @pattern ^0x[0-9a-fA-F]+$
4538
+ */
4539
+ claimAuthorizerSignature?: string;
4540
+ }
4541
+
4542
+ export declare type X402BatchSettlementClaimPayloadType = (typeof X402BatchSettlementClaimPayloadType)[keyof typeof X402BatchSettlementClaimPayloadType];
4543
+
4544
+ export declare const X402BatchSettlementClaimPayloadType: {
4545
+ readonly claim: "claim";
4546
+ };
4547
+
4548
+ /**
4549
+ * The voucher to claim, identified by the channel config it was signed against and its cumulative ceiling. Field shape mirrors the on-chain claim struct.
4550
+ */
4551
+ export declare type X402BatchSettlementClaimVoucher = {
4552
+ channel: X402BatchSettlementChannelConfig;
4553
+ /**
4554
+ * The cumulative maximum claimable amount (uint128 as decimal string) signed by the payer authorizer.
4555
+ * @pattern ^[0-9]+$
4556
+ */
4557
+ maxClaimableAmount: string;
4558
+ };
4559
+
4560
+ /**
4561
+ * Sent on the first request to fund a channel via an ERC-3009 receiveWithAuthorization deposit.
4562
+ */
4563
+ export declare interface X402BatchSettlementDepositPayload {
4564
+ type: X402BatchSettlementDepositPayloadType;
4565
+ channelConfig: X402BatchSettlementChannelConfig;
4566
+ voucher: X402BatchSettlementVoucher;
4567
+ /** The deposit amount and asset-transfer authorization that funds the channel. */
4568
+ deposit: X402BatchSettlementDepositPayloadDeposit;
4569
+ }
4570
+
4571
+ /**
4572
+ * The deposit amount and asset-transfer authorization that funds the channel.
4573
+ */
4574
+ export declare type X402BatchSettlementDepositPayloadDeposit = {
4575
+ /**
4576
+ * The deposit amount in atomic units of `channelConfig.token`.
4577
+ * @pattern ^[0-9]+$
4578
+ */
4579
+ amount: string;
4580
+ /** The asset-transfer authorization for the deposit. Currently only ERC-3009 is supported. */
4581
+ authorization: X402BatchSettlementDepositPayloadDepositAuthorization;
4582
+ };
4583
+
4584
+ /**
4585
+ * The asset-transfer authorization for the deposit. Currently only ERC-3009 is supported.
4586
+ */
4587
+ export declare type X402BatchSettlementDepositPayloadDepositAuthorization = {
4588
+ /** An ERC-3009 receiveWithAuthorization message authorizing the channel-funding transfer. */
4589
+ erc3009Authorization?: X402BatchSettlementDepositPayloadDepositAuthorizationErc3009Authorization;
4590
+ };
4591
+
4592
+ /**
4593
+ * An ERC-3009 receiveWithAuthorization message authorizing the channel-funding transfer.
4594
+ */
4595
+ export declare type X402BatchSettlementDepositPayloadDepositAuthorizationErc3009Authorization = {
4596
+ /** The unix timestamp after which the authorization is valid. */
4597
+ validAfter: string;
4598
+ /** The unix timestamp before which the authorization is valid. */
4599
+ validBefore: string;
4600
+ /**
4601
+ * The 32-byte ERC-3009 nonce/salt for replay protection.
4602
+ * @pattern ^0x[0-9a-fA-F]{64}$
4603
+ */
4604
+ salt: string;
4605
+ /**
4606
+ * The EIP-712 hex-encoded signature of the ERC-3009 authorization.
4607
+ * @pattern ^0x[0-9a-fA-F]+$
4608
+ */
4609
+ signature: string;
4610
+ };
4611
+
4612
+ export declare type X402BatchSettlementDepositPayloadType = (typeof X402BatchSettlementDepositPayloadType)[keyof typeof X402BatchSettlementDepositPayloadType];
4613
+
4614
+ export declare const X402BatchSettlementDepositPayloadType: {
4615
+ readonly deposit: "deposit";
4616
+ };
4617
+
4618
+ /**
4619
+ * The x402 protocol batch-settlement scheme payload for EVM networks. The `batch-settlement` scheme uses pre-funded payment channels with off-chain cumulative-ceiling vouchers, allowing servers to batch-claim accumulated value in a single on-chain transaction. The payload is a discriminated union on the `type` field with five variants:
4620
+
4621
+ - `deposit`: client-initiated channel funding via ERC-3009.
4622
+ - `voucher`: client-side cumulative voucher against an already-funded channel.
4623
+ - `refund`: cooperative refund request. The client emits a minimal shape (just channelConfig + voucher, with an optional `amount`); a mediating server enriches it with `amount`, `refundNonce`, and `claims` before forwarding to the facilitator. Authorizer signatures are optional — the facilitator auto-signs when absent.
4624
+ - `claim`: server-to-facilitator request to batch on-chain voucher claims.
4625
+ - `settle`: server-to-facilitator request to transfer claimed funds to the receiver.
4626
+
4627
+ For more details, see [batch-settlement specs](https://github.com/x402-foundation/x402/tree/main/specs/schemes/batch-settlement).
4628
+ */
4629
+ export declare type X402BatchSettlementEvmPayload = X402BatchSettlementDepositPayload | X402BatchSettlementVoucherPayload | X402BatchSettlementRefundPayload | X402BatchSettlementClaimPayload | X402BatchSettlementSettlePayload;
4630
+
4631
+ /**
4632
+ * A cooperative refund request. The client emits the minimal shape (just `channelConfig` and `voucher`, with an optional `amount`). A mediating server enriches the payload with `amount`, `refundNonce`, and `claims` before forwarding to the facilitator. Authorizer signatures are optional — the facilitator auto-signs when absent. Field presence determines which shape was sent; the facilitator dispatches accordingly.
4633
+ */
4634
+ export declare interface X402BatchSettlementRefundPayload {
4635
+ type: X402BatchSettlementRefundPayloadType;
4636
+ channelConfig: X402BatchSettlementChannelConfig;
4637
+ voucher: X402BatchSettlementVoucher;
4638
+ /**
4639
+ * The refund amount in atomic units of `channelConfig.token`. Optional in the client-emitted shape (defaults to the full remaining channel balance). Required when the payload is enriched by a mediating server.
4640
+ * @pattern ^[0-9]+$
4641
+ */
4642
+ amount?: string;
4643
+ /**
4644
+ * The on-chain refund nonce for replay protection (uint256 as decimal string). Only present on the server-enriched shape.
4645
+ * @pattern ^[0-9]+$
4646
+ */
4647
+ refundNonce?: string;
4648
+ /** Voucher claims to include atomically with the refund. Only present on the server-enriched shape. */
4649
+ claims?: X402BatchSettlementClaim[];
4650
+ /**
4651
+ * Optional EIP-712 signature from the receiver authorizer over the refund. When omitted, the facilitator auto-signs.
4652
+ * @pattern ^0x[0-9a-fA-F]+$
4653
+ */
4654
+ refundAuthorizerSignature?: string;
4655
+ /**
4656
+ * Optional EIP-712 signature from the receiver authorizer over the included claims. When omitted, the facilitator auto-signs.
4657
+ * @pattern ^0x[0-9a-fA-F]+$
4658
+ */
4659
+ claimAuthorizerSignature?: string;
4660
+ }
4661
+
4662
+ export declare type X402BatchSettlementRefundPayloadType = (typeof X402BatchSettlementRefundPayloadType)[keyof typeof X402BatchSettlementRefundPayloadType];
4663
+
4664
+ export declare const X402BatchSettlementRefundPayloadType: {
4665
+ readonly refund: "refund";
4666
+ };
4667
+
4668
+ /**
4669
+ * Server-to-facilitator request to transfer claimed funds for a `(receiver, token)` pair to the receiver wallet.
4670
+ */
4671
+ export declare interface X402BatchSettlementSettlePayload {
4672
+ type: X402BatchSettlementSettlePayloadType;
4673
+ /**
4674
+ * The 0x-prefixed, checksum EVM address of the receiver to settle to.
4675
+ * @pattern ^0x[0-9a-fA-F]{40}$
4676
+ */
4677
+ receiver: string;
4678
+ /**
4679
+ * The 0x-prefixed, checksum EVM address of the token to settle.
4680
+ * @pattern ^0x[0-9a-fA-F]{40}$
4681
+ */
4682
+ token: string;
4683
+ }
4684
+
4685
+ export declare type X402BatchSettlementSettlePayloadType = (typeof X402BatchSettlementSettlePayloadType)[keyof typeof X402BatchSettlementSettlePayloadType];
4686
+
4687
+ export declare const X402BatchSettlementSettlePayloadType: {
4688
+ readonly settle: "settle";
4689
+ };
4690
+
4691
+ /**
4692
+ * A signed cumulative-ceiling voucher for an x402 batch-settlement channel. `maxClaimableAmount` is monotonically increasing across requests in the same channel; the receiver may claim any amount up to this ceiling.
4693
+ */
4694
+ export declare interface X402BatchSettlementVoucher {
4695
+ /**
4696
+ * The 32-byte EIP-712 hash of the `channelConfig` for this voucher's channel.
4697
+ * @pattern ^0x[0-9a-fA-F]{64}$
4698
+ */
4699
+ channelId: string;
4700
+ /**
4701
+ * The cumulative maximum amount (uint128 as decimal string) the receiver is authorized to claim from this channel as of this voucher.
4702
+ * @pattern ^[0-9]+$
4703
+ */
4704
+ maxClaimableAmount: string;
4705
+ /**
4706
+ * The EIP-712 hex-encoded signature of the voucher by `payerAuthorizer`.
4707
+ * @pattern ^0x[0-9a-fA-F]+$
4708
+ */
4709
+ signature: string;
4710
+ }
4711
+
4712
+ /**
4713
+ * Sent on subsequent requests against an already-funded channel; carries only the latest cumulative voucher.
4714
+ */
4715
+ export declare interface X402BatchSettlementVoucherPayload {
4716
+ type: X402BatchSettlementVoucherPayloadType;
4717
+ channelConfig: X402BatchSettlementChannelConfig;
4718
+ voucher: X402BatchSettlementVoucher;
4719
+ }
4720
+
4721
+ export declare type X402BatchSettlementVoucherPayloadType = (typeof X402BatchSettlementVoucherPayloadType)[keyof typeof X402BatchSettlementVoucherPayloadType];
4722
+
4723
+ export declare const X402BatchSettlementVoucherPayloadType: {
4724
+ readonly voucher: "voucher";
4725
+ };
4726
+
4727
+ /**
4728
+ * The x402 protocol exact scheme payload for EVM networks. The scheme is implemented using ERC-3009. For more details, please see [EVM Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md).
4729
+ */
4730
+ export declare interface X402ExactEvmPayload {
4731
+ /**
4732
+ * The EIP-712 hex-encoded signature of the ERC-3009 authorization message. Smart account signatures may be longer than 65 bytes.
4733
+ * @pattern ^0x[0-9a-fA-F]{130,}$
4734
+ */
4735
+ signature: string;
4736
+ /** The authorization data for the ERC-3009 authorization message. */
4737
+ authorization: X402ExactEvmPayloadAuthorization;
4738
+ }
4739
+
4740
+ /**
4741
+ * The authorization data for the ERC-3009 authorization message.
4742
+ */
4743
+ export declare type X402ExactEvmPayloadAuthorization = {
4744
+ /**
4745
+ * The 0x-prefixed, checksum EVM address of the sender of the payment.
4746
+ * @pattern ^0x[0-9a-fA-F]{40}$
4747
+ */
4748
+ from: string;
4749
+ /**
4750
+ * The 0x-prefixed, checksum EVM address of the recipient of the payment.
4751
+ * @pattern ^0x[0-9a-fA-F]{40}$
4752
+ */
4753
+ to: string;
4754
+ /** The value of the payment, in atomic units of the payment asset. */
4755
+ value: string;
4756
+ /** The unix timestamp after which the payment is valid. */
4757
+ validAfter: string;
4758
+ /** The unix timestamp before which the payment is valid. */
4759
+ validBefore: string;
4760
+ /**
4761
+ * The hex-encoded nonce of the payment (bytes32).
4762
+ * @pattern ^0x[0-9a-fA-F]{64}$
4763
+ */
4764
+ nonce: string;
4765
+ };
4766
+
4767
+ /**
4768
+ * The x402 protocol exact scheme payload for EVM networks using Permit2. Permit2 is a universal token approval mechanism that works with any ERC-20 token, unlike ERC-3009 which requires token-level support.
4769
+ */
4770
+ export declare interface X402ExactEvmPermit2Payload {
4771
+ /**
4772
+ * The EIP-712 hex-encoded signature of the Permit2 PermitWitnessTransferFrom message. Smart account signatures may be longer than 65 bytes.
4773
+ * @pattern ^0x[0-9a-fA-F]{130,}$
4774
+ */
4775
+ signature: string;
4776
+ /** The authorization data for the Permit2 PermitWitnessTransferFrom message. */
4777
+ permit2Authorization: X402ExactEvmPermit2PayloadPermit2Authorization;
4778
+ }
4779
+
4780
+ /**
4781
+ * The authorization data for the Permit2 PermitWitnessTransferFrom message.
4782
+ */
4783
+ export declare type X402ExactEvmPermit2PayloadPermit2Authorization = {
4784
+ /**
4785
+ * The 0x-prefixed, checksum EVM address of the sender of the payment.
4786
+ * @pattern ^0x[0-9a-fA-F]{40}$
4787
+ */
4788
+ from: string;
4789
+ /** The token permissions for the transfer. */
4790
+ permitted: X402ExactEvmPermit2PayloadPermit2AuthorizationPermitted;
4791
+ /**
4792
+ * The 0x-prefixed, checksum EVM address of the spender (x402 Permit2 proxy contract).
4793
+ * @pattern ^0x[0-9a-fA-F]{40}$
4794
+ */
4795
+ spender: string;
4796
+ /**
4797
+ * The Permit2 nonce as a decimal string (uint256).
4798
+ * @pattern ^[0-9]+$
4799
+ */
4800
+ nonce: string;
4801
+ /** The unix timestamp before which the permit is valid. */
4802
+ deadline: string;
4803
+ /** The witness data containing payment details. */
4804
+ witness: X402ExactEvmPermit2PayloadPermit2AuthorizationWitness;
4805
+ };
4806
+
4807
+ /**
4808
+ * The token permissions for the transfer.
4809
+ */
4810
+ export declare type X402ExactEvmPermit2PayloadPermit2AuthorizationPermitted = {
4811
+ /**
4812
+ * The 0x-prefixed, checksum EVM address of the token to transfer.
4813
+ * @pattern ^0x[0-9a-fA-F]{40}$
4814
+ */
4815
+ token: string;
4816
+ /** The amount to transfer in atomic units. */
4817
+ amount: string;
4818
+ };
4819
+
4820
+ /**
4821
+ * The witness data containing payment details.
4822
+ */
4823
+ export declare type X402ExactEvmPermit2PayloadPermit2AuthorizationWitness = {
4824
+ /**
4825
+ * The 0x-prefixed, checksum EVM address of the recipient.
4826
+ * @pattern ^0x[0-9a-fA-F]{40}$
4827
+ */
4828
+ to: string;
4829
+ /** The unix timestamp after which the payment is valid. */
4830
+ validAfter: string;
4831
+ /**
4832
+ * Optional hex-encoded extra data.
4833
+ * @pattern ^0x[0-9a-fA-F]*$
4834
+ */
4835
+ extra?: string;
4836
+ };
4837
+
4838
+ /**
4839
+ * The x402 protocol exact scheme payload for Solana networks. For more details, please see [Solana Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md).
4840
+ */
4841
+ export declare interface X402ExactSolanaPayload {
4842
+ /** The base64-encoded Solana transaction. */
4843
+ transaction: string;
4844
+ }
4845
+
4846
+ /**
4847
+ * The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the PAYMENT-SIGNATURE header.
4848
+ For EVM networks, smart account signatures can be longer than 65 bytes.
4849
+ */
4850
+ export declare type X402PaymentPayload = X402V2PaymentPayload | X402V1PaymentPayload;
4851
+
4852
+ /**
4853
+ * The x402 protocol payment required response body, returned by a resource server when a request lacks valid payment. Contains the accepted payment options, optional resource metadata, and an optional error message from the resource server.
4854
+ */
4855
+ export declare interface X402PaymentRequired {
4856
+ /** The x402 protocol version. */
4857
+ x402Version: X402Version;
4858
+ /**
4859
+ * The list of payment options the resource server accepts. At least one option must be present.
4860
+ * @minItems 1
4861
+ * @maxItems 16
4862
+ */
4863
+ accepts: X402PaymentRequirements[];
4864
+ /** Optional metadata about the resource being paid for. */
4865
+ resource?: X402ResourceInfo;
4866
+ /** An optional error message from the resource server describing why payment is required. */
4867
+ error?: string;
4868
+ /** Optional protocol extensions. Unknown keys are forwarded as-is into the signed payment payload. */
4869
+ extensions?: X402PaymentRequiredExtensions;
4870
+ }
4871
+
4872
+ /**
4873
+ * Optional protocol extensions. Unknown keys are forwarded as-is into the signed payment payload.
4874
+ */
4875
+ export declare type X402PaymentRequiredExtensions = {
4876
+ [key: string]: unknown;
4877
+ };
4878
+
4879
+ /**
4880
+ * The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.
4881
+ */
4882
+ export declare type X402PaymentRequirements = X402V2PaymentRequirements | X402V1PaymentRequirements;
4883
+
4884
+ /**
4885
+ * Describes the resource being accessed in x402 protocol.
4886
+ */
4887
+ export declare interface X402ResourceInfo {
4888
+ /** The URL of the resource. */
4889
+ url?: string;
4890
+ /** A human-readable description of the resource. */
4891
+ description?: Description;
4892
+ /** The MIME type of the resource response. */
4893
+ mimeType?: string;
4894
+ }
4895
+
4896
+ /**
4897
+ * The x402 protocol upto scheme payload for EVM networks using Permit2. The `upto` scheme authorizes a maximum amount and lets the facilitator settle for the actual amount used. Structurally identical to `x402ExactEvmPermit2Payload` except `permit2Authorization.witness` carries an additional `facilitator` address that binds the authorization to a specific facilitator (the one announced via `extra.facilitatorAddress` in the payment requirements). For more details, see [EVM Upto Scheme Details](https://github.com/x402-foundation/x402/blob/main/specs/schemes/upto/scheme_upto_evm.md).
4898
+ */
4899
+ export declare interface X402UptoEvmPermit2Payload {
4900
+ /**
4901
+ * The EIP-712 hex-encoded signature of the Permit2 PermitWitnessTransferFrom message. Smart account signatures may be longer than 65 bytes.
4902
+ * @pattern ^0x[0-9a-fA-F]{130,}$
4903
+ */
4904
+ signature: string;
4905
+ /** The authorization data for the Permit2 PermitWitnessTransferFrom message. The `permitted.amount` is the maximum the client authorizes; the actual settled amount is decided by the resource server at settle time and MUST be less than or equal to it. */
4906
+ permit2Authorization: X402UptoEvmPermit2PayloadPermit2Authorization;
4907
+ }
4908
+
4909
+ /**
4910
+ * The authorization data for the Permit2 PermitWitnessTransferFrom message. The `permitted.amount` is the maximum the client authorizes; the actual settled amount is decided by the resource server at settle time and MUST be less than or equal to it.
4911
+ */
4912
+ export declare type X402UptoEvmPermit2PayloadPermit2Authorization = {
4913
+ /**
4914
+ * The 0x-prefixed, checksum EVM address of the sender of the payment.
4915
+ * @pattern ^0x[0-9a-fA-F]{40}$
4916
+ */
4917
+ from: string;
4918
+ /** The token permissions for the transfer. */
4919
+ permitted: X402UptoEvmPermit2PayloadPermit2AuthorizationPermitted;
4920
+ /**
4921
+ * The 0x-prefixed, checksum EVM address of the spender (the x402 Upto Permit2 proxy contract).
4922
+ * @pattern ^0x[0-9a-fA-F]{40}$
4923
+ */
4924
+ spender: string;
4925
+ /**
4926
+ * The Permit2 nonce as a decimal string (uint256).
4927
+ * @pattern ^[0-9]+$
4928
+ */
4929
+ nonce: string;
4930
+ /** The unix timestamp before which the permit is valid. */
4931
+ deadline: string;
4932
+ /** The witness data containing payment details. Includes a `facilitator` field to bind the authorization to a specific facilitator address. */
4933
+ witness: X402UptoEvmPermit2PayloadPermit2AuthorizationWitness;
4934
+ };
4935
+
4936
+ /**
4937
+ * The token permissions for the transfer.
4938
+ */
4939
+ export declare type X402UptoEvmPermit2PayloadPermit2AuthorizationPermitted = {
4940
+ /**
4941
+ * The 0x-prefixed, checksum EVM address of the token to transfer.
4942
+ * @pattern ^0x[0-9a-fA-F]{40}$
4943
+ */
4944
+ token: string;
4945
+ /** The maximum amount the client authorizes to transfer in atomic units. */
4946
+ amount: string;
4947
+ };
4948
+
4949
+ /**
4950
+ * The witness data containing payment details. Includes a `facilitator` field to bind the authorization to a specific facilitator address.
4951
+ */
4952
+ export declare type X402UptoEvmPermit2PayloadPermit2AuthorizationWitness = {
4953
+ /**
4954
+ * The 0x-prefixed, checksum EVM address of the recipient.
4955
+ * @pattern ^0x[0-9a-fA-F]{40}$
4956
+ */
4957
+ to: string;
4958
+ /**
4959
+ * The 0x-prefixed, checksum EVM address of the facilitator authorized to settle this payment. MUST match the `facilitatorAddress` advertised in the payment requirements `extra` field.
4960
+ * @pattern ^0x[0-9a-fA-F]{40}$
4961
+ */
4962
+ facilitator: string;
4963
+ /** The unix timestamp after which the payment is valid. */
4964
+ validAfter: string;
4965
+ };
4966
+
4967
+ /**
4968
+ * The x402 v1 network identifier. x402 v1 uses human-readable network names. Supported networks: Base mainnet and testnet, Solana mainnet and devnet.
4969
+ */
4970
+ export declare type X402V1Network = (typeof X402V1Network)[keyof typeof X402V1Network];
4971
+
4972
+ export declare const X402V1Network: {
4973
+ readonly base: "base";
4974
+ readonly "base-sepolia": "base-sepolia";
4975
+ readonly solana: "solana";
4976
+ readonly "solana-devnet": "solana-devnet";
4977
+ };
4978
+
4979
+ /**
4980
+ * The x402 v1 protocol payment payload. Uses human-readable network names and requires `scheme` and `network` alongside the inner `payload` object.
4981
+ */
4982
+ export declare interface X402V1PaymentPayload {
4983
+ /** The x402 protocol version. Must be `1` for this payload shape. */
4984
+ x402Version: X402Version;
4985
+ /** The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`. */
4986
+ scheme: X402V1PaymentPayloadScheme;
4987
+ /** The network of the blockchain to send payment on. */
4988
+ network: X402V1Network;
4989
+ /** The payload of the payment depending on the x402Version, scheme, and network. */
4990
+ payload: X402V1PaymentPayloadPayload;
4991
+ }
4992
+
4993
+ /**
4994
+ * The payload of the payment depending on the x402Version, scheme, and network.
4995
+ */
4996
+ export declare type X402V1PaymentPayloadPayload = X402ExactEvmPayload | X402ExactEvmPermit2Payload | X402ExactSolanaPayload;
4997
+
4998
+ /**
4999
+ * The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
5000
+ */
5001
+ export declare type X402V1PaymentPayloadScheme = (typeof X402V1PaymentPayloadScheme)[keyof typeof X402V1PaymentPayloadScheme];
5002
+
5003
+ export declare const X402V1PaymentPayloadScheme: {
5004
+ readonly exact: "exact";
5005
+ };
5006
+
5007
+ /**
5008
+ * The x402 v1 payment requirements. Uses human-readable network names, and carries resource metadata (`resource`, `description`, `mimeType`) alongside the payment fields. The only supported scheme is `exact`.
5009
+ */
5010
+ export declare interface X402V1PaymentRequirements {
5011
+ /** The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`. */
5012
+ scheme: X402V1PaymentRequirementsScheme;
5013
+ /** The network of the blockchain to send payment on. */
5014
+ network: X402V1Network;
5015
+ /** The maximum amount required to pay for the resource in atomic units of the payment asset. */
5016
+ maxAmountRequired: string;
5017
+ /** The URL of the resource to pay for. */
5018
+ resource: string;
5019
+ /** A human-readable description of the resource. */
5020
+ description: Description;
5021
+ /** The MIME type of the resource response. */
5022
+ mimeType: string;
5023
+ /** The optional JSON schema describing the resource output. */
5024
+ outputSchema?: X402V1PaymentRequirementsOutputSchema;
5025
+ /** The destination to pay value to.
5026
+
5027
+ For EVM networks, payTo will be a 0x-prefixed, checksum EVM address.
5028
+
5029
+ For Solana-based networks, payTo will be a base58-encoded Solana address. */
5030
+ payTo: BlockchainAddress;
5031
+ /** The maximum time in seconds for the resource server to respond. */
5032
+ maxTimeoutSeconds: number;
5033
+ /** The asset to pay with.
5034
+
5035
+ For EVM networks, the asset will be a 0x-prefixed, checksum EVM address.
5036
+
5037
+ For Solana-based networks, the asset will be a base58-encoded Solana address. */
5038
+ asset: BlockchainAddress;
5039
+ /** The optional additional scheme-specific payment info. */
5040
+ extra?: X402V1PaymentRequirementsExtra;
5041
+ }
5042
+
5043
+ /**
5044
+ * The optional additional scheme-specific payment info.
5045
+ */
5046
+ export declare type X402V1PaymentRequirementsExtra = {
5047
+ [key: string]: unknown;
5048
+ };
5049
+
5050
+ /**
5051
+ * The optional JSON schema describing the resource output.
5052
+ */
5053
+ export declare type X402V1PaymentRequirementsOutputSchema = {
5054
+ [key: string]: unknown;
5055
+ };
5056
+
5057
+ /**
5058
+ * The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
5059
+ */
5060
+ export declare type X402V1PaymentRequirementsScheme = (typeof X402V1PaymentRequirementsScheme)[keyof typeof X402V1PaymentRequirementsScheme];
5061
+
5062
+ export declare const X402V1PaymentRequirementsScheme: {
5063
+ readonly exact: "exact";
5064
+ };
5065
+
5066
+ /**
5067
+ * The x402 v2 network identifier in CAIP-2 format. x402 v2 identifies networks by their CAIP-2 chain ID (e.g. `eip155:<chainId>` for EVM networks, `solana:<genesisHash>` for Solana). Supported networks: Base, Polygon, Arbitrum One, World Chain (EVM), and Solana.
5068
+ */
5069
+ export declare type X402V2Network = (typeof X402V2Network)[keyof typeof X402V2Network];
5070
+
5071
+ export declare const X402V2Network: {
5072
+ readonly "eip155:8453": "eip155:8453";
5073
+ readonly "eip155:84532": "eip155:84532";
5074
+ readonly "eip155:137": "eip155:137";
5075
+ readonly "eip155:42161": "eip155:42161";
5076
+ readonly "eip155:480": "eip155:480";
5077
+ readonly "eip155:4801": "eip155:4801";
5078
+ readonly "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
5079
+ readonly "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
5080
+ };
5081
+
5082
+ /**
5083
+ * The x402 v2 protocol payment payload. Uses CAIP-2 network identifiers. The `accepted` field carries the full payment requirements; `scheme` and `network` are not top-level fields (they are on the nested `accepted` object).
5084
+ */
5085
+ export declare interface X402V2PaymentPayload {
5086
+ /** The x402 protocol version. Must be `2` for this payload shape. */
5087
+ x402Version: X402Version;
5088
+ /** The payload of the payment depending on the x402Version, scheme, and network. Discriminated by scheme-specific fields: exact-EVM/upto-EVM payloads carry a `signature`; exact-Solana carries a `transaction`; batch-settlement carries a `type` discriminator. See `x402BatchSettlementEvmPayload` for the documented batch-settlement variants. */
5089
+ payload: X402V2PaymentPayloadPayload;
5090
+ accepted: X402V2PaymentRequirements;
5091
+ resource?: X402ResourceInfo;
5092
+ /** Optional protocol extensions. */
5093
+ extensions?: X402V2PaymentPayloadExtensions;
5094
+ }
5095
+
5096
+ /**
5097
+ * Optional protocol extensions.
5098
+ */
5099
+ export declare type X402V2PaymentPayloadExtensions = {
5100
+ [key: string]: unknown;
5101
+ };
5102
+
5103
+ /**
5104
+ * The payload of the payment depending on the x402Version, scheme, and network. Discriminated by scheme-specific fields: exact-EVM/upto-EVM payloads carry a `signature`; exact-Solana carries a `transaction`; batch-settlement carries a `type` discriminator. See `x402BatchSettlementEvmPayload` for the documented batch-settlement variants.
5105
+ */
5106
+ export declare type X402V2PaymentPayloadPayload = X402ExactEvmPayload | X402ExactEvmPermit2Payload | X402ExactSolanaPayload | X402UptoEvmPermit2Payload | X402BatchSettlementEvmPayload;
5107
+
5108
+ /**
5109
+ * The x402 v2 payment requirements. Uses CAIP-2 network identifiers and supports `exact`, `upto`, and `batch-settlement` schemes. Carries only the payment fields (no resource metadata — that is in the enclosing `x402V2PaymentPayload.resource`).
5110
+ */
5111
+ export declare interface X402V2PaymentRequirements {
5112
+ /** The scheme of the payment protocol to use. Supported schemes are `exact`, `upto`, and `batch-settlement`. */
5113
+ scheme: X402V2PaymentRequirementsScheme;
5114
+ /** The network of the blockchain to send payment on in CAIP-2 format. */
5115
+ network: X402V2Network;
5116
+ /** The asset to pay with.
5117
+
5118
+ For EVM networks, the asset will be a 0x-prefixed, checksum EVM address.
5119
+
5120
+ For Solana-based networks, the asset will be a base58-encoded Solana address. */
5121
+ asset: BlockchainAddress;
5122
+ /** The amount to pay for the resource in atomic units of the payment asset. */
5123
+ amount: string;
5124
+ /** The destination to pay value to.
5125
+
5126
+ For EVM networks, payTo will be a 0x-prefixed, checksum EVM address.
5127
+
5128
+ For Solana-based networks, payTo will be a base58-encoded Solana address. */
5129
+ payTo: BlockchainAddress;
5130
+ /** The maximum time in seconds for the resource server to respond. */
5131
+ maxTimeoutSeconds: number;
5132
+ /** The optional additional scheme-specific payment info. */
5133
+ extra?: X402V2PaymentRequirementsExtra;
5134
+ }
5135
+
5136
+ /**
5137
+ * The optional additional scheme-specific payment info.
5138
+ */
5139
+ export declare type X402V2PaymentRequirementsExtra = {
5140
+ [key: string]: unknown;
5141
+ };
5142
+
5143
+ /**
5144
+ * The scheme of the payment protocol to use. Supported schemes are `exact`, `upto`, and `batch-settlement`.
5145
+ */
5146
+ export declare type X402V2PaymentRequirementsScheme = (typeof X402V2PaymentRequirementsScheme)[keyof typeof X402V2PaymentRequirementsScheme];
5147
+
5148
+ export declare const X402V2PaymentRequirementsScheme: {
5149
+ readonly exact: "exact";
5150
+ readonly upto: "upto";
5151
+ readonly "batch-settlement": "batch-settlement";
5152
+ };
5153
+
5154
+ /**
5155
+ * The version of the x402 protocol.
5156
+ */
5157
+ export declare type X402Version = (typeof X402Version)[keyof typeof X402Version];
5158
+
5159
+ export declare const X402Version: {
5160
+ readonly NUMBER_1: 1;
5161
+ readonly NUMBER_2: 2;
5162
+ };
5163
+
3976
5164
  /**
3977
5165
  * A JWT signed using your Wallet Secret, encoded in base64. Refer to the
3978
5166
  [Generate Wallet Token](https://docs.cdp.coinbase.com/api-reference/v2/authentication#2-generate-wallet-token)