@coinbase/cdp-api-client 0.0.108 → 0.0.109

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.
@@ -1,4 +1,4 @@
1
- var r = {};
1
+ var r = { exports: {} };
2
2
  export {
3
- r as __exports
3
+ r as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- e as __module
3
+ r as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var r = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- r as __module
3
+ e as __module
4
4
  };
@@ -1,2 +1,2 @@
1
- import { __require as r } from "./index12.js";
1
+ import { __require as r } from "./index17.js";
2
2
  r();
@@ -70,14 +70,16 @@ const e = {
70
70
  delegation_expired: "delegation_expired",
71
71
  delegation_revoked: "delegation_revoked",
72
72
  delegation_not_authorized: "delegation_not_authorized",
73
- delegation_not_enabled: "delegation_not_enabled"
73
+ delegation_not_enabled: "delegation_not_enabled",
74
+ network_mismatch: "network_mismatch",
75
+ already_enabled: "already_enabled"
74
76
  }, t = {
75
77
  ios: "ios"
76
- }, i = {
78
+ }, a = {
77
79
  email: "email"
78
- }, o = {
80
+ }, i = {
79
81
  sms: "sms"
80
- }, a = {
82
+ }, o = {
81
83
  google: "google",
82
84
  apple: "apple",
83
85
  x: "x",
@@ -238,16 +240,16 @@ export {
238
240
  g as EvmUserOperationNetwork,
239
241
  b as EvmUserOperationStatus,
240
242
  r as InitiateEmailAuthenticationNextStepType,
241
- i as InitiateEmailAuthenticationRequestType,
243
+ a as InitiateEmailAuthenticationRequestType,
242
244
  n as InitiateSiweAuthenticationRequestType,
243
245
  s as InitiateSmsAuthenticationNextStepType,
244
- o as InitiateSmsAuthenticationRequestType,
246
+ i as InitiateSmsAuthenticationRequestType,
245
247
  S as InitiateSmsMfaEnrollmentType,
246
248
  w as InitiateTotpMfaEnrollmentType,
247
249
  t as IosAttestationRegistrationResponsePlatform,
248
250
  A as MfaMethod,
249
251
  h as Network,
250
- a as OAuth2ProviderType,
252
+ o as OAuth2ProviderType,
251
253
  N as RefreshAccessTokenBodyGrantType,
252
254
  O as SendEvmAssetWithEndUserAccountBodyNetwork,
253
255
  R as SendEvmTransactionWithEndUserAccountBodyNetwork,
@@ -80,10 +80,10 @@ const i = (e, t) => d(
80
80
  method: "POST"
81
81
  },
82
82
  t
83
- ), w = (e, t) => d(
83
+ ), b = (e, t) => d(
84
84
  { url: `/v2/embedded-wallet-api/projects/${e}/config`, method: "GET" },
85
85
  t
86
- ), b = (e, t) => d(
86
+ ), w = (e, t) => d(
87
87
  { url: `/v2/embedded-wallet-api/projects/${e}/auth/mfa`, method: "GET" },
88
88
  t
89
89
  ), y = (e, t, n) => d(
@@ -98,7 +98,7 @@ const i = (e, t) => d(
98
98
  params: n
99
99
  },
100
100
  a
101
- ), g = (e, t, n, a) => d(
101
+ ), j = (e, t, n, a) => d(
102
102
  {
103
103
  url: `/v2/embedded-wallet-api/end-users/${e}/evm`,
104
104
  method: "POST",
@@ -107,7 +107,7 @@ const i = (e, t) => d(
107
107
  params: n
108
108
  },
109
109
  a
110
- ), j = (e, t, n, a) => d(
110
+ ), g = (e, t, n, a) => d(
111
111
  {
112
112
  url: `/v2/embedded-wallet-api/end-users/${e}/evm/sign`,
113
113
  method: "POST",
@@ -282,10 +282,19 @@ const i = (e, t) => d(
282
282
  params: a
283
283
  },
284
284
  r
285
- ), J = (e, t, n) => d(
285
+ ), J = (e, t, n, a, r) => d(
286
+ {
287
+ url: `/v2/embedded-wallet-api/end-users/${e}/evm/smart-accounts/${t}/spend-permissions/enable`,
288
+ method: "POST",
289
+ headers: { "Content-Type": "application/json" },
290
+ data: n,
291
+ params: a
292
+ },
293
+ r
294
+ ), K = (e, t, n) => d(
286
295
  { url: `/v2/embedded-wallet-api/end-users/${e}/evm/swaps/price`, method: "GET", params: t },
287
296
  n
288
- ), K = (e, t, n, a) => d(
297
+ ), N = (e, t, n, a) => d(
289
298
  {
290
299
  url: `/v2/embedded-wallet-api/end-users/${e}/evm/swaps`,
291
300
  method: "POST",
@@ -294,7 +303,7 @@ const i = (e, t) => d(
294
303
  params: n
295
304
  },
296
305
  a
297
- ), N = (e, t, n, a) => d(
306
+ ), Q = (e, t, n, a) => d(
298
307
  {
299
308
  url: `/v2/embedded-wallet-api/end-users/${e}/solana`,
300
309
  method: "POST",
@@ -303,7 +312,7 @@ const i = (e, t) => d(
303
312
  params: n
304
313
  },
305
314
  a
306
- ), Q = (e, t, n, a) => d(
315
+ ), R = (e, t, n, a) => d(
307
316
  {
308
317
  url: `/v2/embedded-wallet-api/end-users/${e}/solana/export`,
309
318
  method: "POST",
@@ -312,7 +321,7 @@ const i = (e, t) => d(
312
321
  params: n
313
322
  },
314
323
  a
315
- ), R = (e, t, n, a) => d(
324
+ ), X = (e, t, n, a) => d(
316
325
  {
317
326
  url: `/v2/embedded-wallet-api/end-users/${e}/solana/sign`,
318
327
  method: "POST",
@@ -321,7 +330,7 @@ const i = (e, t) => d(
321
330
  params: n
322
331
  },
323
332
  a
324
- ), X = (e, t, n, a) => d(
333
+ ), Y = (e, t, n, a) => d(
325
334
  {
326
335
  url: `/v2/embedded-wallet-api/end-users/${e}/solana/sign/message`,
327
336
  method: "POST",
@@ -330,7 +339,7 @@ const i = (e, t) => d(
330
339
  params: n
331
340
  },
332
341
  a
333
- ), Y = (e, t, n, a) => d(
342
+ ), Z = (e, t, n, a) => d(
334
343
  {
335
344
  url: `/v2/embedded-wallet-api/end-users/${e}/solana/sign/transaction`,
336
345
  method: "POST",
@@ -339,7 +348,7 @@ const i = (e, t) => d(
339
348
  params: n
340
349
  },
341
350
  a
342
- ), Z = (e, t, n, a) => d(
351
+ ), _ = (e, t, n, a) => d(
343
352
  {
344
353
  url: `/v2/embedded-wallet-api/end-users/${e}/solana/send/transaction`,
345
354
  method: "POST",
@@ -348,7 +357,7 @@ const i = (e, t) => d(
348
357
  params: n
349
358
  },
350
359
  a
351
- ), _ = (e, t, n, a, r, s) => d(
360
+ ), ee = (e, t, n, a, r, s) => d(
352
361
  {
353
362
  url: `/v2/embedded-wallet-api/end-users/${e}/solana/${t}/send/${n}`,
354
363
  method: "POST",
@@ -357,7 +366,7 @@ const i = (e, t) => d(
357
366
  params: r
358
367
  },
359
368
  s
360
- ), ee = (e, t, n, a) => d(
369
+ ), te = (e, t, n, a) => d(
361
370
  {
362
371
  url: `/v2/embedded-wallet-api/end-users/${e}/btc`,
363
372
  method: "POST",
@@ -366,7 +375,7 @@ const i = (e, t) => d(
366
375
  params: n
367
376
  },
368
377
  a
369
- ), te = (e, t, n, a) => d(
378
+ ), ne = (e, t, n, a) => d(
370
379
  {
371
380
  url: `/v2/embedded-wallet-api/end-users/${e}/btc/sign`,
372
381
  method: "POST",
@@ -375,7 +384,7 @@ const i = (e, t) => d(
375
384
  params: n
376
385
  },
377
386
  a
378
- ), ne = (e, t, n, a) => d(
387
+ ), ae = (e, t, n, a) => d(
379
388
  {
380
389
  url: `/v2/embedded-wallet-api/end-users/${e}/onramp/orders`,
381
390
  method: "POST",
@@ -384,14 +393,14 @@ const i = (e, t) => d(
384
393
  params: n
385
394
  },
386
395
  a
387
- ), ae = (e, t, n, a) => d(
396
+ ), de = (e, t, n, a) => d(
388
397
  {
389
398
  url: `/v2/embedded-wallet-api/end-users/${e}/mfa/enroll/${t}/init`,
390
399
  method: "POST",
391
400
  params: n
392
401
  },
393
402
  a
394
- ), de = (e, t, n, a, r) => d(
403
+ ), re = (e, t, n, a, r) => d(
395
404
  {
396
405
  url: `/v2/embedded-wallet-api/end-users/${e}/mfa/enroll/${t}/initiate`,
397
406
  method: "POST",
@@ -400,7 +409,7 @@ const i = (e, t) => d(
400
409
  params: a
401
410
  },
402
411
  r
403
- ), re = (e, t, n, a, r) => d(
412
+ ), se = (e, t, n, a, r) => d(
404
413
  {
405
414
  url: `/v2/embedded-wallet-api/end-users/${e}/mfa/enroll/${t}/submit`,
406
415
  method: "POST",
@@ -409,14 +418,14 @@ const i = (e, t) => d(
409
418
  params: a
410
419
  },
411
420
  r
412
- ), se = (e, t, n, a) => d(
421
+ ), oe = (e, t, n, a) => d(
413
422
  {
414
423
  url: `/v2/embedded-wallet-api/end-users/${e}/mfa/verify/${t}/init`,
415
424
  method: "POST",
416
425
  params: n
417
426
  },
418
427
  a
419
- ), oe = (e, t, n, a, r) => d(
428
+ ), ie = (e, t, n, a, r) => d(
420
429
  {
421
430
  url: `/v2/embedded-wallet-api/end-users/${e}/mfa/verify/${t}/submit`,
422
431
  method: "POST",
@@ -425,7 +434,7 @@ const i = (e, t) => d(
425
434
  params: a
426
435
  },
427
436
  r
428
- ), ie = (e, t, n) => d(
437
+ ), le = (e, t, n) => d(
429
438
  { url: `/v2/embedded-wallet-api/end-users/${e}/mfa/prompt`, method: "PUT", params: t },
430
439
  n
431
440
  );
@@ -433,32 +442,33 @@ export {
433
442
  E as authenticateUserWithCustomAuth,
434
443
  W as createDelegationForEndUser,
435
444
  M as createDelegationForEndUserAccount,
436
- ne as createEndUserApplePayOnrampOrder,
437
- ee as createEndUserBtcAccount,
438
- g as createEndUserEvmAccount,
445
+ ae as createEndUserApplePayOnrampOrder,
446
+ te as createEndUserBtcAccount,
447
+ j as createEndUserEvmAccount,
439
448
  H as createEndUserEvmSmartAccount,
440
- K as createEndUserEvmSwap,
441
- N as createEndUserSolanaAccount,
449
+ N as createEndUserEvmSwap,
450
+ Q as createEndUserSolanaAccount,
442
451
  x as createEvmEip7702DelegationWithEndUserAccount,
443
452
  V as createSpendPermissionWithEndUserAccount,
453
+ J as enableSpendPermissionWithEndUserAccount,
444
454
  f as exportEndUserEvmAccount,
445
- Q as exportEndUserSolanaAccount,
455
+ R as exportEndUserSolanaAccount,
446
456
  i as generateAttestationChallenge,
447
457
  y as getAuthenticatedEndUser,
448
458
  D as getDelegationForEndUser,
449
459
  F as getDelegationForEndUserAccount,
450
- J as getEndUserEvmSwapPrice,
460
+ K as getEndUserEvmSwapPrice,
451
461
  B as getEvmEip7702DelegationOperationByIdWithEndUserAccount,
452
- b as getMfaConfig,
453
- w as getProjectConfig,
462
+ w as getMfaConfig,
463
+ b as getProjectConfig,
454
464
  I as getUserOperationWithEndUserAccount,
455
465
  p as initiateAuthentication,
456
- ae as initiateMfaEnrollment,
457
- de as initiateMfaEnrollment2,
458
- se as initiateMfaVerification,
466
+ de as initiateMfaEnrollment,
467
+ re as initiateMfaEnrollment2,
468
+ oe as initiateMfaVerification,
459
469
  q as listSpendPermissionsWithEndUserAccount,
460
470
  $ as logOutEndUser,
461
- ie as recordMfaEnrollmentPrompted,
471
+ le as recordMfaEnrollmentPrompted,
462
472
  v as refreshAccessToken,
463
473
  l as registerAttestation,
464
474
  S as registerTemporaryWalletSecret,
@@ -467,19 +477,19 @@ export {
467
477
  z as revokeSpendPermissionWithEndUserAccount,
468
478
  C as sendEvmAssetWithEndUserAccount,
469
479
  O as sendEvmTransactionWithEndUserAccount,
470
- _ as sendSolanaAssetWithEndUserAccount,
471
- Z as sendSolanaTransactionWithEndUserAccount,
480
+ ee as sendSolanaAssetWithEndUserAccount,
481
+ _ as sendSolanaTransactionWithEndUserAccount,
472
482
  L as sendUserOperationWithEndUserAccount,
473
- te as signBtcHashWithEndUserAccount,
474
- j as signEvmHashWithEndUserAccount,
483
+ ne as signBtcHashWithEndUserAccount,
484
+ g as signEvmHashWithEndUserAccount,
475
485
  A as signEvmMessageWithEndUserAccount,
476
486
  P as signEvmTransactionWithEndUserAccount,
477
487
  U as signEvmTypedDataWithEndUserAccount,
478
- R as signSolanaHashWithEndUserAccount,
479
- X as signSolanaMessageWithEndUserAccount,
480
- Y as signSolanaTransactionWithEndUserAccount,
481
- re as submitMfaEnrollment,
482
- oe as submitMfaVerification,
488
+ X as signSolanaHashWithEndUserAccount,
489
+ Y as signSolanaMessageWithEndUserAccount,
490
+ Z as signSolanaTransactionWithEndUserAccount,
491
+ se as submitMfaEnrollment,
492
+ ie as submitMfaVerification,
483
493
  c as verifyEmailAuthentication,
484
494
  m as verifyOAuthCode,
485
495
  h as verifyOAuthEndUserIdentity,
@@ -107,7 +107,7 @@ export declare type Asset = string;
107
107
  Custom authentication differs from Coinbase-managed methods such as Email, SMS, or OAuth, as it allows future requests to be made using developer-provided JWT, subject to the expiration defined in its claims.
108
108
  * @summary Authenticate end user via custom auth JWT
109
109
  */
110
- export declare const authenticateUserWithCustomAuth: (projectId: string, options?: SecondParameter<typeof cdpApiClient<AuthenticateUserWithCustomAuth200>>) => Promise<AuthenticateUserWithCustomAuth200>;
110
+ export declare const authenticateUserWithCustomAuth: (projectId: ProjectId, options?: SecondParameter<typeof cdpApiClient<AuthenticateUserWithCustomAuth200>>) => Promise<AuthenticateUserWithCustomAuth200>;
111
111
 
112
112
  export declare type AuthenticateUserWithCustomAuth200 = {
113
113
  endUser: EndUser;
@@ -300,7 +300,7 @@ export declare type CreateEndUserApplePayOnrampOrderResult = NonNullable<Awaited
300
300
  * Creates a Bitcoin HD (Hierarchical Deterministic) account for an end user at the given address type and network. Returns the full end user resource including the extended public key (xpub) which can be used to derive child addresses for UTXO discovery. An end user can have one Bitcoin account per address type and network combination.
301
301
  * @summary Create end user Bitcoin HD (Hierarchical Deterministic) account
302
302
  */
303
- export declare const createEndUserBtcAccount: (userId: string, createEndUserBtcAccountBody: CreateEndUserBtcAccountBody, params?: CreateEndUserBtcAccountParams, options?: SecondParameter<typeof cdpApiClient>) => Promise<EndUser>;
303
+ export declare const createEndUserBtcAccount: (userId: string, createEndUserBtcAccountBody: CreateEndUserBtcAccountBody, params?: CreateEndUserBtcAccountParams, options?: SecondParameter<typeof cdpApiClient<EndUser>>) => Promise<EndUser>;
304
304
 
305
305
  export declare type CreateEndUserBtcAccountBody = {
306
306
  /**
@@ -336,6 +336,7 @@ export declare const CreateEndUserBtcAccountBodyNetwork: {
336
336
  export declare type CreateEndUserBtcAccountParams = {
337
337
  /**
338
338
  * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
339
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
339
340
  */
340
341
  projectID?: ProjectIDOptionalParameter;
341
342
  };
@@ -756,6 +757,34 @@ export declare const EmailAuthenticationType: {
756
757
  readonly email: "email";
757
758
  };
758
759
 
760
+ /**
761
+ * Request parameters for enabling spend permissions on an existing EVM Smart Account.
762
+ */
763
+ export declare interface EnableSpendPermissionRequest {
764
+ /**
765
+ * The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
766
+ * @pattern ^[a-zA-Z0-9-]{1,100}$
767
+ */
768
+ walletSecretId: string;
769
+ network: SpendPermissionNetwork;
770
+ }
771
+
772
+ /**
773
+ * Enables spend permissions on an existing EVM Smart Account by adding the SpendPermissionManager contract as an owner. Requires an `X-Wallet-Auth` header signed by the Temporary Wallet Secret identified by `walletSecretId`.
774
+ * @summary Enable spend permissions for an end user EVM Smart Account
775
+ */
776
+ export declare const enableSpendPermissionWithEndUserAccount: (userId: string, address: string, enableSpendPermissionRequest: EnableSpendPermissionRequest, params?: EnableSpendPermissionWithEndUserAccountParams, options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>) => Promise<EvmUserOperation>;
777
+
778
+ export declare type EnableSpendPermissionWithEndUserAccountParams = {
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 EnableSpendPermissionWithEndUserAccountResult = NonNullable<Awaited<ReturnType<typeof enableSpendPermissionWithEndUserAccount>>>;
787
+
759
788
  /**
760
789
  * Information about the end user.
761
790
  */
@@ -1102,6 +1131,8 @@ export declare const ErrorType: {
1102
1131
  readonly delegation_revoked: "delegation_revoked";
1103
1132
  readonly delegation_not_authorized: "delegation_not_authorized";
1104
1133
  readonly delegation_not_enabled: "delegation_not_enabled";
1134
+ readonly network_mismatch: "network_mismatch";
1135
+ readonly already_enabled: "already_enabled";
1105
1136
  };
1106
1137
 
1107
1138
  export declare interface EvmCall {
@@ -1335,7 +1366,7 @@ export declare type ExportEndUserSolanaAccountResult = NonNullable<Awaited<Retur
1335
1366
  The returned challenge must be used exactly once and cannot be reused for multiple attestation attempts.
1336
1367
  * @summary Generate attestation challenge (iOS only)
1337
1368
  */
1338
- export declare const generateAttestationChallenge: (projectId: string, options?: SecondParameter<typeof cdpApiClient<IosAttestationChallenge>>) => Promise<IosAttestationChallenge>;
1369
+ export declare const generateAttestationChallenge: (projectId: ProjectId, options?: SecondParameter<typeof cdpApiClient<IosAttestationChallenge>>) => Promise<IosAttestationChallenge>;
1339
1370
 
1340
1371
  export declare type GenerateAttestationChallengeResult = NonNullable<Awaited<ReturnType<typeof generateAttestationChallenge>>>;
1341
1372
 
@@ -1600,7 +1631,7 @@ export declare type GetEvmEip7702DelegationOperationByIdWithEndUserAccountResult
1600
1631
  * Retrieves the MFA configuration for a project. Returns 404 if MFA is not configured (disabled by default).
1601
1632
  * @summary Get MFA configuration
1602
1633
  */
1603
- export declare const getMfaConfig: (projectId: string, options?: SecondParameter<typeof cdpApiClient<MfaConfig>>) => Promise<MfaConfig>;
1634
+ export declare const getMfaConfig: (projectId: ProjectId, options?: SecondParameter<typeof cdpApiClient<MfaConfig>>) => Promise<MfaConfig>;
1604
1635
 
1605
1636
  export declare type GetMfaConfigResult = NonNullable<Awaited<ReturnType<typeof getMfaConfig>>>;
1606
1637
 
@@ -1608,7 +1639,7 @@ export declare type GetMfaConfigResult = NonNullable<Awaited<ReturnType<typeof g
1608
1639
  * Retrieves the project configuration for a project. Returns 404 if project is not configured (disabled by default).
1609
1640
  * @summary Get project configuration
1610
1641
  */
1611
- export declare const getProjectConfig: (projectId: string, options?: SecondParameter<typeof cdpApiClient<ProjectConfig>>) => Promise<ProjectConfig>;
1642
+ export declare const getProjectConfig: (projectId: ProjectId, options?: SecondParameter<typeof cdpApiClient<ProjectConfig>>) => Promise<ProjectConfig>;
1612
1643
 
1613
1644
  export declare type GetProjectConfigResult = NonNullable<Awaited<ReturnType<typeof getProjectConfig>>>;
1614
1645
 
@@ -1662,7 +1693,7 @@ export declare type IdempotencyKeyParameter = string;
1662
1693
  * Initiates the authentication flow for an end user. This is an optionally authenticated endpoint. The exact response depends on the authentication method specified in the request body. If a valid access token is included in the Authorization header, it is treated as an attempt to add an additional authentication method to the existing user associated with the token. If the authentication method already exists, an error is returned.
1663
1694
  * @summary Initiate end user authentication
1664
1695
  */
1665
- export declare const initiateAuthentication: (projectId: string, initiateAuthenticationRequest: InitiateAuthenticationRequest, options?: SecondParameter<typeof cdpApiClient<InitiateAuthenticationResponseWrapper>>) => Promise<InitiateAuthenticationResponseWrapper>;
1696
+ export declare const initiateAuthentication: (projectId: ProjectId, initiateAuthenticationRequest: InitiateAuthenticationRequest, options?: SecondParameter<typeof cdpApiClient<InitiateAuthenticationResponseWrapper>>) => Promise<InitiateAuthenticationResponseWrapper>;
1666
1697
 
1667
1698
  /**
1668
1699
  * The request body for an end user to initiate authentication.
@@ -1975,13 +2006,6 @@ export declare interface IOSAppAttestationConfig {
1975
2006
  identifier?: string;
1976
2007
  }
1977
2008
 
1978
- /**
1979
- * Generated by orval v7.20.0 🍺
1980
- * Do not edit manually.
1981
- * Coinbase Developer Platform APIs
1982
- * The Coinbase Developer Platform APIs - leading the world's transition onchain.
1983
- * OpenAPI spec version: 2.0.0
1984
- */
1985
2009
  /**
1986
2010
  * A cryptographic challenge for iOS App Attest attestation. Used only by iOS clients - Android uses a different flow with Play Integrity Standard API tokens.
1987
2011
  */
@@ -2098,7 +2122,7 @@ export declare type ListSpendPermissionsWithEndUserAccountResult = NonNullable<A
2098
2122
  * Logs out the end user using the attached refresh token.
2099
2123
  * @summary Log out end user
2100
2124
  */
2101
- export declare const logOutEndUser: (projectId: string, logOutEndUserBody?: LogOutEndUserBody, options?: SecondParameter<typeof cdpApiClient<void>>) => Promise<void>;
2125
+ export declare const logOutEndUser: (projectId: ProjectId, logOutEndUserBody?: LogOutEndUserBody, options?: SecondParameter<typeof cdpApiClient<void>>) => Promise<void>;
2102
2126
 
2103
2127
  export declare type LogOutEndUserBody = {
2104
2128
  /** The refresh token to exchange. */
@@ -2116,8 +2140,7 @@ export declare type MfaAlreadyEnrolledErrorResponse = Error_2;
2116
2140
  * MFA configuration for a project.
2117
2141
  */
2118
2142
  export declare interface MfaConfig {
2119
- /** The CDP Project ID. */
2120
- projectId: string;
2143
+ projectId: ProjectId;
2121
2144
  /** Whether MFA is enabled for the project (global toggle). */
2122
2145
  enabled: boolean;
2123
2146
  totpConfig: TotpConfig;
@@ -2255,8 +2278,7 @@ export declare type PaymentMethodRequiredErrorResponse = Error_2;
2255
2278
  * Configuration for a project.
2256
2279
  */
2257
2280
  export declare interface ProjectConfig {
2258
- /** The CDP Project ID. */
2259
- projectId: string;
2281
+ projectId: ProjectId;
2260
2282
  /** The project's name, used for the client configuration and TOTP issuer naming. */
2261
2283
  name?: string;
2262
2284
  /** When the configuration was created. */
@@ -2272,6 +2294,19 @@ export declare interface ProjectConfig {
2272
2294
  appAttestation?: AppAttestationProjectConfig;
2273
2295
  }
2274
2296
 
2297
+ /**
2298
+ * Generated by orval v7.20.0 🍺
2299
+ * Do not edit manually.
2300
+ * Coinbase Developer Platform APIs
2301
+ * The Coinbase Developer Platform APIs - leading the world's transition onchain.
2302
+ * OpenAPI spec version: 2.0.0
2303
+ */
2304
+ /**
2305
+ * The ID of the Project, a UUID v4.
2306
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
2307
+ */
2308
+ export declare type ProjectId = string;
2309
+
2275
2310
  /**
2276
2311
  * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
2277
2312
  */
@@ -2305,7 +2340,7 @@ export declare type RecordMfaEnrollmentPromptedResult = NonNullable<Awaited<Retu
2305
2340
  * Refreshes the access token for the end user. This is an unauthenticated endpoint, but it assumes that the refresh token provided in the various `verify` endpoints is set in the `Cookie` header or request body. The new refresh token will be set in the `Set-Cookie` header for non-WebKit user agents, otherwise returned in the response body.
2306
2341
  * @summary Refresh end user access token
2307
2342
  */
2308
- export declare const refreshAccessToken: (projectId: string, refreshAccessTokenBody: RefreshAccessTokenBody, options?: SecondParameter<typeof cdpApiClient<RefreshAccessToken200>>) => Promise<RefreshAccessToken200>;
2343
+ export declare const refreshAccessToken: (projectId: ProjectId, refreshAccessTokenBody: RefreshAccessTokenBody, options?: SecondParameter<typeof cdpApiClient<RefreshAccessToken200>>) => Promise<RefreshAccessToken200>;
2309
2344
 
2310
2345
  export declare type RefreshAccessToken200 = {
2311
2346
  endUser: EndUser;
@@ -2388,7 +2423,7 @@ export declare interface RefreshTokenStorage {
2388
2423
  - `429`: Rate limit exceeded (too many attestation attempts).
2389
2424
  * @summary Register device key for iOS App Attest attestation (iOS only)
2390
2425
  */
2391
- export declare const registerAttestation: (projectId: string, iosAttestationRegistrationRequest: IosAttestationRegistrationRequest, options?: SecondParameter<typeof cdpApiClient<IosAttestationRegistrationResponse>>) => Promise<IosAttestationRegistrationResponse>;
2426
+ export declare const registerAttestation: (projectId: ProjectId, iosAttestationRegistrationRequest: IosAttestationRegistrationRequest, options?: SecondParameter<typeof cdpApiClient<IosAttestationRegistrationResponse>>) => Promise<IosAttestationRegistrationResponse>;
2392
2427
 
2393
2428
  export declare type RegisterAttestationResult = NonNullable<Awaited<ReturnType<typeof registerAttestation>>>;
2394
2429
 
@@ -2889,7 +2924,7 @@ export declare const setAuthManager: (manager: AuthManager) => void;
2889
2924
  * 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.
2890
2925
  * @summary Sign a Bitcoin hash with an end user account
2891
2926
  */
2892
- export declare const signBtcHashWithEndUserAccount: (userId: string, signBtcHashWithEndUserAccountBody: SignBtcHashWithEndUserAccountBody, params?: SignBtcHashWithEndUserAccountParams, options?: SecondParameter<typeof cdpApiClient>) => Promise<SignBtcHashWithEndUserAccount200>;
2927
+ export declare const signBtcHashWithEndUserAccount: (userId: string, signBtcHashWithEndUserAccountBody: SignBtcHashWithEndUserAccountBody, params?: SignBtcHashWithEndUserAccountParams, options?: SecondParameter<typeof cdpApiClient<SignBtcHashWithEndUserAccount200>>) => Promise<SignBtcHashWithEndUserAccount200>;
2893
2928
 
2894
2929
  export declare type SignBtcHashWithEndUserAccount200 = {
2895
2930
  /**
@@ -2956,6 +2991,7 @@ export declare const SignBtcHashWithEndUserAccountBodyNetwork: {
2956
2991
  export declare type SignBtcHashWithEndUserAccountParams = {
2957
2992
  /**
2958
2993
  * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
2994
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
2959
2995
  */
2960
2996
  projectID?: ProjectIDOptionalParameter;
2961
2997
  };
@@ -3523,7 +3559,7 @@ export declare interface UserOperationReceiptRevert {
3523
3559
  * Verifies the end user's email address using a one-time password. This is an optionally authenticated endpoint. The API returns an access token that can be used to authenticate subsequent requests to the Embedded Wallet APIs, as well as a refresh token set in the `Set-Cookie` header for non-WebKit user agents, otherwise returned in the response body. If a valid access token is included in the Authorization header, the authentication method is added to the existing user associated with the token. If the authentication method already exists, an error is returned.
3524
3560
  * @summary Verify end user email address
3525
3561
  */
3526
- export declare const verifyEmailAuthentication: (projectId: string, verifyEmailAuthenticationRequest: VerifyEmailAuthenticationRequest, options?: SecondParameter<typeof cdpApiClient<VerifyEmailAuthentication200>>) => Promise<VerifyEmailAuthentication200>;
3562
+ export declare const verifyEmailAuthentication: (projectId: ProjectId, verifyEmailAuthenticationRequest: VerifyEmailAuthenticationRequest, options?: SecondParameter<typeof cdpApiClient<VerifyEmailAuthentication200>>) => Promise<VerifyEmailAuthentication200>;
3527
3563
 
3528
3564
  export declare type VerifyEmailAuthentication200 = {
3529
3565
  endUser: EndUser;
@@ -3567,7 +3603,7 @@ export declare interface VerifyOAuthAppleNativeRequest {
3567
3603
  * Verifies the end user's OAuth code. This is optionally authenticated endpoint. The API returns an access token that can be used to authenticate subsequent requests to the Embedded Wallet APIs, as well as a refresh token set in the `Set-Cookie` header for non-WebKit user agents, otherwise returned in the response body. If a valid access token is included in the Authorization header, the authentication method is added to the existing user associated with the token. If the authentication method already exists, an error is returned.
3568
3604
  * @summary Verify end user OAuth code
3569
3605
  */
3570
- export declare const verifyOAuthCode: (projectId: string, providerType: OAuth2ProviderType, verifyOAuthCodeRequest: VerifyOAuthCodeRequest, options?: SecondParameter<typeof cdpApiClient<VerifyOAuthCode200>>) => Promise<VerifyOAuthCode200>;
3606
+ export declare const verifyOAuthCode: (projectId: ProjectId, providerType: OAuth2ProviderType, verifyOAuthCodeRequest: VerifyOAuthCodeRequest, options?: SecondParameter<typeof cdpApiClient<VerifyOAuthCode200>>) => Promise<VerifyOAuthCode200>;
3571
3607
 
3572
3608
  export declare type VerifyOAuthCode200 = {
3573
3609
  endUser: EndUser;
@@ -3604,7 +3640,7 @@ export declare type VerifyOAuthEndUserIdentity = VerifyOAuthTelegramRequest | Ve
3604
3640
  * Verifies the end user's identity using data from a third-party provider like Telegram or Apple native sign-in that does not support code-based OAuth flows and only provides user data to flows initiated on a bot's domain. This is optionally authenticated endpoint. The API returns an access token that can be used to authenticate subsequent requests to the Embedded Wallet APIs, as well as a refresh token set in the `Set-Cookie` header for non-WebKit user agents, otherwise returned in the response body. If a valid access token is included in the Authorization header, the authentication method is added to the existing user associated with the token. If the authentication method already exists, an error is returned.
3605
3641
  * @summary Verify third-party end user identity
3606
3642
  */
3607
- export declare const verifyOAuthEndUserIdentity: (projectId: string, providerType: OAuth2ProviderType, verifyOAuthEndUserIdentity: VerifyOAuthEndUserIdentity, options?: SecondParameter<typeof cdpApiClient<VerifyOAuthEndUserIdentity200>>) => Promise<VerifyOAuthEndUserIdentity200>;
3643
+ export declare const verifyOAuthEndUserIdentity: (projectId: ProjectId, providerType: OAuth2ProviderType, verifyOAuthEndUserIdentity: VerifyOAuthEndUserIdentity, options?: SecondParameter<typeof cdpApiClient<VerifyOAuthEndUserIdentity200>>) => Promise<VerifyOAuthEndUserIdentity200>;
3608
3644
 
3609
3645
  export declare type VerifyOAuthEndUserIdentity200 = {
3610
3646
  endUser: EndUser;
@@ -3648,7 +3684,7 @@ export declare interface VerifyOAuthTelegramRequest {
3648
3684
  * Verifies the end user's Sign In With Ethereum (EIP-4361) signature. This is an optionally authenticated endpoint. The API returns an access token that can be used to authenticate subsequent requests to the Embedded Wallet APIs, as well as a refresh token set in the `Set-Cookie` header for non-WebKit user agents, otherwise returned in the response body. If a valid access token is included in the Authorization header, the authentication method is added to the existing user associated with the token. If the authentication method already exists, an error is returned.
3649
3685
  * @summary Verify end user SIWE signature
3650
3686
  */
3651
- export declare const verifySiweAuthentication: (projectId: string, verifySiweAuthenticationRequest: VerifySiweAuthenticationRequest, options?: SecondParameter<typeof cdpApiClient<VerifySiweAuthentication200>>) => Promise<VerifySiweAuthentication200>;
3687
+ export declare const verifySiweAuthentication: (projectId: ProjectId, verifySiweAuthenticationRequest: VerifySiweAuthenticationRequest, options?: SecondParameter<typeof cdpApiClient<VerifySiweAuthentication200>>) => Promise<VerifySiweAuthentication200>;
3652
3688
 
3653
3689
  export declare type VerifySiweAuthentication200 = {
3654
3690
  endUser: EndUser;
@@ -3680,7 +3716,7 @@ export declare type VerifySiweAuthenticationResult = NonNullable<Awaited<ReturnT
3680
3716
  * Verifies the end user's phone number using a one-time password sent via SMS. This is an optionally authenticated endpoint. The API returns an access token that can be used to authenticate subsequent requests to the Embedded Wallet APIs, as well as a refresh token set in the `Set-Cookie` header for non-WebKit user agents, otherwise returned in the response body. If a valid access token is included in the Authorization header, the authentication method is added to the existing user associated with the token. If the authentication method already exists, an error is returned.
3681
3717
  * @summary Verify end user phone number
3682
3718
  */
3683
- export declare const verifySmsAuthentication: (projectId: string, verifySmsAuthenticationRequest: VerifySmsAuthenticationRequest, options?: SecondParameter<typeof cdpApiClient<VerifySmsAuthentication200>>) => Promise<VerifySmsAuthentication200>;
3719
+ export declare const verifySmsAuthentication: (projectId: ProjectId, verifySmsAuthenticationRequest: VerifySmsAuthenticationRequest, options?: SecondParameter<typeof cdpApiClient<VerifySmsAuthentication200>>) => Promise<VerifySmsAuthentication200>;
3684
3720
 
3685
3721
  export declare type VerifySmsAuthentication200 = {
3686
3722
  endUser: EndUser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-api-client",
3
- "version": "0.0.108",
3
+ "version": "0.0.109",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/**",