@coinbase/cdp-api-client 0.0.67 → 0.0.69

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.
@@ -56,14 +56,15 @@ export declare interface Account {
56
56
  accountId: AccountId;
57
57
  type: AccountType;
58
58
  owner: Owner;
59
- name?: string;
60
- projectIds?: ProjectId[];
59
+ name?: AccountName;
61
60
  createdAt: string;
62
61
  updatedAt: string;
63
62
  }
64
63
 
65
64
  export declare type AccountId = string;
66
65
 
66
+ export declare type AccountName = string;
67
+
67
68
  export declare interface AccountTokenAddressesResponse {
68
69
  accountAddress?: string;
69
70
  tokenAddresses?: string[];
@@ -113,6 +114,11 @@ export declare const AddressRiskRiskLevel: {
113
114
 
114
115
  export declare type AlreadyExistsErrorResponse = Error_2;
115
116
 
117
+ export declare interface AmountDetail {
118
+ available: string;
119
+ total: string;
120
+ }
121
+
116
122
  export declare class APIError extends Error {
117
123
  statusCode: number;
118
124
  errorType: APIErrorType;
@@ -177,10 +183,13 @@ export declare type BadGatewayErrorResponse = Error_2;
177
183
 
178
184
  export declare interface Balance {
179
185
  asset: Asset;
180
- availableAmount: string;
181
- totalAmount: string;
186
+ amount: BalanceAmount;
182
187
  }
183
188
 
189
+ export declare type BalanceAmount = {
190
+ [key: string]: AmountDetail;
191
+ };
192
+
184
193
  export declare interface Balances {
185
194
  balances: Balance[];
186
195
  }
@@ -284,12 +293,9 @@ export declare const CoolPaymentMethodType: {
284
293
 
285
294
  export declare interface CreateAccountRequest {
286
295
  owner: string;
287
- name?: string;
288
- projectIds?: ProjectId[];
296
+ name?: AccountName;
289
297
  }
290
298
 
291
- export declare const createCustomAuthConfig: (projectId: string, createCustomAuthConfigRequest: CreateCustomAuthConfigRequest, options?: SecondParameter<typeof cdpApiClient>) => Promise<CustomAuthConfig>;
292
-
293
299
  export declare interface CreateCustomAuthConfigRequest {
294
300
  enabled: boolean;
295
301
  jwksUrl: string;
@@ -297,7 +303,22 @@ export declare interface CreateCustomAuthConfigRequest {
297
303
  audience?: string;
298
304
  }
299
305
 
300
- export declare type CreateCustomAuthConfigResult = NonNullable<Awaited<ReturnType<typeof createCustomAuthConfig>>>;
306
+ export declare interface CreateDepositDestinationRequest {
307
+ accountId: AccountId;
308
+ type: CreateDepositDestinationRequestType;
309
+ network: Network;
310
+ metadata?: CreateDepositDestinationRequestMetadata;
311
+ }
312
+
313
+ export declare type CreateDepositDestinationRequestMetadata = {
314
+ [key: string]: string;
315
+ };
316
+
317
+ export declare type CreateDepositDestinationRequestType = (typeof CreateDepositDestinationRequestType)[keyof typeof CreateDepositDestinationRequestType];
318
+
319
+ export declare const CreateDepositDestinationRequestType: {
320
+ readonly crypto: "crypto";
321
+ };
301
322
 
302
323
  export declare const createEndUserEvmAccount: (projectId: string, userId: string, createEndUserEvmAccountBody: CreateEndUserEvmAccountBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<EndUser>;
303
324
 
@@ -391,6 +412,29 @@ export declare type CreateSwapQuoteResponseAllOfTransaction = {
391
412
 
392
413
  export declare type CreateSwapQuoteResponseWrapper = CreateSwapQuoteResponse | SwapUnavailableResponse;
393
414
 
415
+ export declare type CreateTransferSource = TransfersAccount | PaymentMethod;
416
+
417
+ export declare interface CryptoDepositDestination {
418
+ depositDestinationId: DepositDestinationId;
419
+ accountId: AccountId;
420
+ type: CryptoDepositDestinationType;
421
+ address: string;
422
+ network: Network;
423
+ metadata?: CryptoDepositDestinationMetadata;
424
+ createdAt: string;
425
+ updatedAt: string;
426
+ }
427
+
428
+ export declare type CryptoDepositDestinationMetadata = {
429
+ [key: string]: string;
430
+ };
431
+
432
+ export declare type CryptoDepositDestinationType = (typeof CryptoDepositDestinationType)[keyof typeof CryptoDepositDestinationType];
433
+
434
+ export declare const CryptoDepositDestinationType: {
435
+ readonly crypto: "crypto";
436
+ };
437
+
394
438
  export declare interface CustomAuthConfig {
395
439
  enabled: boolean;
396
440
  jwksUrl: string;
@@ -453,6 +497,16 @@ export declare interface DateOfBirth {
453
497
  year?: string;
454
498
  }
455
499
 
500
+ export declare type DepositDestination = CryptoDepositDestination;
501
+
502
+ export declare type DepositDestinationId = string;
503
+
504
+ export declare type DepositDestinationType = (typeof DepositDestinationType)[keyof typeof DepositDestinationType];
505
+
506
+ export declare const DepositDestinationType: {
507
+ readonly crypto: "crypto";
508
+ };
509
+
456
510
  export declare interface DeveloperJWTAuthentication {
457
511
  type: DeveloperJWTAuthenticationType;
458
512
  kid: string;
@@ -513,6 +567,7 @@ export declare const EmailAuthenticationType: {
513
567
  export declare interface EndUser {
514
568
  userId: string;
515
569
  authenticationMethods: AuthenticationMethods;
570
+ mfaMethods?: MFAMethods;
516
571
  evmAccounts: string[];
517
572
  evmSmartAccounts: string[];
518
573
  solanaAccounts: string[];
@@ -577,6 +632,14 @@ export declare const ErrorType: {
577
632
  readonly recipient_allowlist_violation: "recipient_allowlist_violation";
578
633
  readonly recipient_allowlist_pending: "recipient_allowlist_pending";
579
634
  readonly travel_rules_recipient_violation: "travel_rules_recipient_violation";
635
+ readonly transfer_amount_out_of_bounds: "transfer_amount_out_of_bounds";
636
+ readonly transfer_recipient_address_invalid: "transfer_recipient_address_invalid";
637
+ readonly transfer_quote_expired: "transfer_quote_expired";
638
+ readonly mfa_already_enrolled: "mfa_already_enrolled";
639
+ readonly mfa_invalid_code: "mfa_invalid_code";
640
+ readonly mfa_flow_expired: "mfa_flow_expired";
641
+ readonly mfa_required: "mfa_required";
642
+ readonly mfa_not_enrolled: "mfa_not_enrolled";
580
643
  };
581
644
 
582
645
  export declare interface EthValueCriterion {
@@ -846,6 +909,7 @@ export declare type ExportEndUserEvmAccountBody = {
846
909
  address: string;
847
910
  exportEncryptionKey: string;
848
911
  walletSecretId: string;
912
+ parentOrigin?: string;
849
913
  };
850
914
 
851
915
  export declare type ExportEndUserEvmAccountResult = NonNullable<Awaited<ReturnType<typeof exportEndUserEvmAccount>>>;
@@ -860,6 +924,7 @@ export declare type ExportEndUserSolanaAccountBody = {
860
924
  address: string;
861
925
  exportEncryptionKey: string;
862
926
  walletSecretId: string;
927
+ parentOrigin?: string;
863
928
  };
864
929
 
865
930
  export declare type ExportEndUserSolanaAccountResult = NonNullable<Awaited<ReturnType<typeof exportEndUserSolanaAccount>>>;
@@ -1017,6 +1082,21 @@ export declare interface InitiateEmailAuthenticationResponse {
1017
1082
  nextStep: InitiateEmailAuthenticationNextStep;
1018
1083
  }
1019
1084
 
1085
+ export declare const initiateMfaEnrollment: (projectId: string, userId: string, mfaMethod: "totp", options?: SecondParameter<typeof cdpApiClient>) => Promise< InitiateMfaEnrollmentTotpResponse>;
1086
+
1087
+ export declare type InitiateMfaEnrollmentResponseWrapper = InitiateMfaEnrollmentTotpResponse;
1088
+
1089
+ export declare type InitiateMfaEnrollmentResult = NonNullable<Awaited<ReturnType<typeof initiateMfaEnrollment>>>;
1090
+
1091
+ export declare interface InitiateMfaEnrollmentTotpResponse {
1092
+ authUrl: string;
1093
+ secret: string;
1094
+ }
1095
+
1096
+ export declare const initiateMfaVerification: (projectId: string, userId: string, mfaMethod: "totp", options?: SecondParameter<typeof cdpApiClient>) => Promise<void>;
1097
+
1098
+ export declare type InitiateMfaVerificationResult = NonNullable<Awaited<ReturnType<typeof initiateMfaVerification>>>;
1099
+
1020
1100
  export declare interface InitiateOAuthAuthenticationRequest {
1021
1101
  type: OAuth2ProviderType;
1022
1102
  redirectUrl: string;
@@ -1210,6 +1290,32 @@ export declare type LogOutEndUserBody = {
1210
1290
 
1211
1291
  export declare type LogOutEndUserResult = NonNullable<Awaited<ReturnType<typeof logOutEndUser>>>;
1212
1292
 
1293
+ export declare interface Metadata {
1294
+ [key: string]: unknown;
1295
+ }
1296
+
1297
+ export declare type MfaAlreadyEnrolledErrorResponse = Error_2;
1298
+
1299
+ export declare type MfaFlowExpiredErrorResponse = Error_2;
1300
+
1301
+ export declare type MfaInvalidCodeErrorResponse = Error_2;
1302
+
1303
+ export declare type MfaMethod = (typeof MfaMethod)[keyof typeof MfaMethod];
1304
+
1305
+ export declare const MfaMethod: {
1306
+ readonly totp: "totp";
1307
+ };
1308
+
1309
+ export declare interface MFAMethods {
1310
+ totp?: MFAMethodsTotp;
1311
+ }
1312
+
1313
+ export declare type MFAMethodsTotp = {
1314
+ enrolledAt: string;
1315
+ };
1316
+
1317
+ export declare type MfaNotEnrolledErrorResponse = Error_2;
1318
+
1213
1319
  export declare interface MintAddressCriterion {
1214
1320
  type: MintAddressCriterionType;
1215
1321
  addresses: string[];
@@ -1256,17 +1362,13 @@ export declare type Network = (typeof Network)[keyof typeof Network];
1256
1362
  export declare const Network: {
1257
1363
  readonly base: "base";
1258
1364
  readonly ethereum: "ethereum";
1259
- readonly algorand: "algorand";
1365
+ readonly solana: "solana";
1260
1366
  readonly aptos: "aptos";
1261
1367
  readonly arbitrum: "arbitrum";
1262
1368
  readonly avacchain: "avacchain";
1263
- readonly noble: "noble";
1264
1369
  readonly optimism: "optimism";
1265
1370
  readonly polygon: "polygon";
1266
- readonly solana: "solana";
1267
- readonly stellar: "stellar";
1268
1371
  readonly sui: "sui";
1269
- readonly unichain: "unichain";
1270
1372
  };
1271
1373
 
1272
1374
  export declare interface OAuth2Authentication {
@@ -1371,11 +1473,6 @@ export declare interface OnchainDataTableSchema {
1371
1473
  columns?: OnchainDataColumnSchema[];
1372
1474
  }
1373
1475
 
1374
- export declare interface OnchainTransaction {
1375
- txHash: string;
1376
- network: Network;
1377
- }
1378
-
1379
1476
  export declare interface OnrampOrder {
1380
1477
  orderId: string;
1381
1478
  paymentTotal: string;
@@ -2391,6 +2488,26 @@ export declare const SplValueCriterionType: {
2391
2488
  readonly splValue: "splValue";
2392
2489
  };
2393
2490
 
2491
+ export declare const submitMfaEnrollment: (projectId: string, userId: string, mfaMethod: "totp", submitMfaEnrollmentBody: SubmitMfaEnrollmentBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<SubmitMfaEnrollment200>;
2492
+
2493
+ export declare type SubmitMfaEnrollment200 = {
2494
+ endUser: EndUser;
2495
+ };
2496
+
2497
+ export declare type SubmitMfaEnrollmentBody = {
2498
+ mfaCode: string;
2499
+ };
2500
+
2501
+ export declare type SubmitMfaEnrollmentResult = NonNullable<Awaited<ReturnType<typeof submitMfaEnrollment>>>;
2502
+
2503
+ export declare const submitMfaVerification: (projectId: string, userId: string, mfaMethod: "totp", submitMfaVerificationBody: SubmitMfaVerificationBody, options?: SecondParameter<typeof cdpApiClient>) => Promise<void>;
2504
+
2505
+ export declare type SubmitMfaVerificationBody = {
2506
+ mfaCode: string;
2507
+ };
2508
+
2509
+ export declare type SubmitMfaVerificationResult = NonNullable<Awaited<ReturnType<typeof submitMfaVerification>>>;
2510
+
2394
2511
  export declare interface SwapUnavailableResponse {
2395
2512
  liquidityAvailable: boolean;
2396
2513
  }
@@ -2440,15 +2557,12 @@ export declare interface Transfer {
2440
2557
  status: TransferStatus;
2441
2558
  source: TransferSource;
2442
2559
  target: TransferTarget;
2443
- amount: string;
2444
- asset: string;
2445
2560
  sourceAmount?: string;
2446
2561
  sourceAsset?: string;
2447
2562
  targetAmount?: string;
2448
2563
  targetAsset?: string;
2449
2564
  exchangeRate?: TransferExchangeRate;
2450
2565
  fees?: TransferFees;
2451
- onchainTransactions?: OnchainTransaction[];
2452
2566
  completedAt?: string;
2453
2567
  failureReason?: string;
2454
2568
  reversalReason?: TransferReversalReason;
@@ -2458,6 +2572,9 @@ export declare interface Transfer {
2458
2572
  executedAt?: string;
2459
2573
  createdAt: string;
2460
2574
  updatedAt: string;
2575
+ validateOnly?: boolean;
2576
+ metadata?: Metadata;
2577
+ travelRule?: TravelRule;
2461
2578
  }
2462
2579
 
2463
2580
  export declare type TransferCancellationReason = (typeof TransferCancellationReason)[keyof typeof TransferCancellationReason];
@@ -2510,12 +2627,15 @@ export declare type TransferLastErrorDetails = {
2510
2627
  };
2511
2628
 
2512
2629
  export declare interface TransferRequest {
2513
- source: TransferSource;
2630
+ source: CreateTransferSource;
2514
2631
  target: TransferTarget;
2515
2632
  amount: string;
2516
2633
  asset: string;
2517
2634
  amountType?: TransferRequestAmountType;
2635
+ validateOnly?: boolean;
2518
2636
  execute: boolean;
2637
+ metadata?: Metadata;
2638
+ travelRule?: TravelRule;
2519
2639
  }
2520
2640
 
2521
2641
  export declare type TransferRequestAmountType = (typeof TransferRequestAmountType)[keyof typeof TransferRequestAmountType];
@@ -2540,13 +2660,12 @@ export declare interface TransfersAccount {
2540
2660
  asset: string;
2541
2661
  }
2542
2662
 
2543
- export declare type TransferSource = TransfersAccount | PaymentMethod;
2663
+ export declare type TransferSource = TransfersAccount | PaymentMethod | OnchainAddress;
2544
2664
 
2545
2665
  export declare type TransferStatus = (typeof TransferStatus)[keyof typeof TransferStatus];
2546
2666
 
2547
2667
  export declare const TransferStatus: {
2548
- readonly draft: "draft";
2549
- readonly awaiting_funds: "awaiting_funds";
2668
+ readonly quoted: "quoted";
2550
2669
  readonly processing: "processing";
2551
2670
  readonly completed: "completed";
2552
2671
  readonly failed: "failed";
@@ -2555,8 +2674,45 @@ export declare const TransferStatus: {
2555
2674
  readonly reversed: "reversed";
2556
2675
  };
2557
2676
 
2677
+ export declare interface TransferStatusChangedWebhookEvent {
2678
+ eventType: TransferStatusChangedWebhookEventEventType;
2679
+ eventId: string;
2680
+ timestamp: string;
2681
+ data: Transfer;
2682
+ }
2683
+
2684
+ export declare type TransferStatusChangedWebhookEventEventType = (typeof TransferStatusChangedWebhookEventEventType)[keyof typeof TransferStatusChangedWebhookEventEventType];
2685
+
2686
+ export declare const TransferStatusChangedWebhookEventEventType: {
2687
+ readonly transferstatus_changed: "transfer.status_changed";
2688
+ };
2689
+
2558
2690
  export declare type TransferTarget = TransfersAccount | PaymentMethod | OnchainAddress | EmailAddress;
2559
2691
 
2692
+ export declare interface TravelRule {
2693
+ originator?: TravelRuleOriginator;
2694
+ beneficiary?: TravelRuleParty;
2695
+ }
2696
+
2697
+ export declare interface TravelRuleAddress {
2698
+ address1?: string;
2699
+ address2?: string;
2700
+ city?: string;
2701
+ postalCode?: string;
2702
+ country?: string;
2703
+ }
2704
+
2705
+ export declare type TravelRuleOriginator = TravelRuleParty & TravelRuleOriginatorAllOf;
2706
+
2707
+ export declare type TravelRuleOriginatorAllOf = {
2708
+ financialInstitution?: string;
2709
+ };
2710
+
2711
+ export declare interface TravelRuleParty {
2712
+ name?: string;
2713
+ address?: TravelRuleAddress;
2714
+ }
2715
+
2560
2716
  export declare type UnauthorizedErrorResponse = Error_2;
2561
2717
 
2562
2718
  export declare class UnknownApiError extends APIError {
@@ -2567,6 +2723,13 @@ export declare class UnknownError extends Error {
2567
2723
  constructor(message: string, cause?: Error);
2568
2724
  }
2569
2725
 
2726
+ export declare interface UpdateCustomAuthConfigRequest {
2727
+ enabled?: boolean;
2728
+ jwksUrl?: string;
2729
+ issuer?: string;
2730
+ audience?: string;
2731
+ }
2732
+
2570
2733
  export declare interface UserOperationReceipt {
2571
2734
  revert?: UserOperationReceiptRevert;
2572
2735
  transactionHash?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-api-client",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/**",