@coinbase/cdp-sdk 1.40.2 → 1.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,7 @@ import {
4
4
  type ValidateAccessTokenOptions,
5
5
  type ListEndUsersOptions,
6
6
  type CreateEndUserOptions,
7
+ type GetEndUserOptions,
7
8
  } from "./endUser.types.js";
8
9
  import { Analytics } from "../../analytics.js";
9
10
  import {
@@ -103,6 +104,31 @@ export class CDPEndUserClient {
103
104
  return CdpOpenApiClient.listEndUsers(params as ListEndUsersOptions);
104
105
  }
105
106
 
107
+ /**
108
+ * Gets an end user by their unique identifier.
109
+ *
110
+ * @param options - The options for getting an end user.
111
+ *
112
+ * @returns A promise that resolves to the end user.
113
+ *
114
+ * @example **Get an end user by ID**
115
+ * ```ts
116
+ * const endUser = await cdp.endUser.getEndUser({
117
+ * userId: "user-123"
118
+ * });
119
+ * console.log(endUser.userId);
120
+ * ```
121
+ */
122
+ async getEndUser(options: GetEndUserOptions): Promise<EndUser> {
123
+ Analytics.trackAction({
124
+ action: "get_end_user",
125
+ });
126
+
127
+ const { userId } = options;
128
+
129
+ return CdpOpenApiClient.getEndUser(userId);
130
+ }
131
+
106
132
  /**
107
133
  * Validates an end user's access token. Throws an error if the access token is invalid.
108
134
  *
@@ -10,6 +10,16 @@ export interface ValidateAccessTokenOptions {
10
10
  accessToken: string;
11
11
  }
12
12
 
13
+ /**
14
+ * The options for getting an end user.
15
+ */
16
+ export interface GetEndUserOptions {
17
+ /**
18
+ * The unique identifier of the end user to retrieve.
19
+ */
20
+ userId: string;
21
+ }
22
+
13
23
  /**
14
24
  * The options for listing end users.
15
25
  */
@@ -114,6 +114,25 @@ export type AuthenticationMethod =
114
114
  */
115
115
  export type AuthenticationMethods = AuthenticationMethod[];
116
116
 
117
+ /**
118
+ * An object containing information about the end user's TOTP enrollment.
119
+ */
120
+ export type MFAMethodsTotp = {
121
+ /** The date and time when the method was enrolled, in ISO 8601 format. */
122
+ enrolledAt: string;
123
+ };
124
+
125
+ /**
126
+ * Information about the end user's MFA enrollments.
127
+
128
+ */
129
+ export interface MFAMethods {
130
+ /** The date and time when the end user was prompted for MFA enrollment, in ISO 8601 format. If the this field exists, and the user has no other enrolled MFA methods, then the user skipped MFA enrollment. */
131
+ enrollmentPromptedAt?: string;
132
+ /** An object containing information about the end user's TOTP enrollment. */
133
+ totp?: MFAMethodsTotp;
134
+ }
135
+
117
136
  /**
118
137
  * Information about an EVM account associated with an end user.
119
138
  */
@@ -165,6 +184,7 @@ export interface EndUser {
165
184
  */
166
185
  userId: string;
167
186
  authenticationMethods: AuthenticationMethods;
187
+ mfaMethods?: MFAMethods;
168
188
  /**
169
189
  * **DEPRECATED**: Use `evmAccountObjects` instead for richer account information. The list of EVM account addresses associated with the end user. End users can have up to 10 EVM accounts.
170
190
  * @deprecated
@@ -2574,7 +2594,7 @@ export interface WebhookSubscriptionResponse {
2574
2594
  createdAt: string;
2575
2595
  /** Description of the webhook subscription. */
2576
2596
  description?: string;
2577
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2597
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2578
2598
  service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2579
2599
  */
2580
2600
  eventTypes: string[];
@@ -2587,10 +2607,22 @@ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detec
2587
2607
  /** Unique identifier for the subscription. */
2588
2608
  subscriptionId: string;
2589
2609
  target: WebhookTarget;
2590
- /** Label key for filtering events. Present when subscription uses traditional single-label format.
2610
+ /**
2611
+ * (Deprecated) Use `labels` field instead.
2612
+
2613
+ Label key for filtering events. Present when subscription uses traditional single-label format.
2614
+ Maintained for backward compatibility only.
2615
+
2616
+ * @deprecated
2591
2617
  */
2592
2618
  labelKey?: string;
2593
- /** Label value for filtering events. Present when subscription uses traditional single-label format.
2619
+ /**
2620
+ * (Deprecated) Use `labels` field instead.
2621
+
2622
+ Label value for filtering events. Present when subscription uses traditional single-label format.
2623
+ Maintained for backward compatibility only.
2624
+
2625
+ * @deprecated
2594
2626
  */
2595
2627
  labelValue?: string;
2596
2628
  /** Multi-label filters using total overlap logic. Total overlap means the subscription only triggers when events contain ALL these key-value pairs.
@@ -2615,16 +2647,19 @@ export type WebhookSubscriptionListResponse = WebhookSubscriptionListResponseAll
2615
2647
  export type WebhookSubscriptionRequestMetadata = { [key: string]: unknown };
2616
2648
 
2617
2649
  /**
2618
- * Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2619
- an event contains ALL the key-value pairs specified here. Additional labels on
2650
+ * Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2651
+ an event contains ALL the key-value pairs specified here. Additional labels on
2620
2652
  the event are allowed and will not prevent matching.
2621
- NOTE: Use either labels OR (labelKey + labelValue), not both.
2653
+
2654
+ **Note:** Currently, labels are supported for onchain webhooks only.
2655
+
2656
+ See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2622
2657
 
2623
2658
  */
2624
2659
  export type WebhookSubscriptionRequestLabels = { [key: string]: string };
2625
2660
 
2626
2661
  /**
2627
- * Request to create a new webhook subscription with support for both traditional single-label
2662
+ * Request to create a new webhook subscription with support for both traditional single-label
2628
2663
  and multi-label filtering formats.
2629
2664
 
2630
2665
  */
@@ -2632,7 +2667,7 @@ export type WebhookSubscriptionRequest =
2632
2667
  | (unknown & {
2633
2668
  /** Description of the webhook subscription. */
2634
2669
  description?: string;
2635
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2670
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2636
2671
  service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2637
2672
  The subscription will only receive events matching these types AND the label filter(s).
2638
2673
  */
@@ -2642,27 +2677,44 @@ The subscription will only receive events matching these types AND the label fil
2642
2677
  target?: WebhookTarget;
2643
2678
  /** Additional metadata for the subscription. */
2644
2679
  metadata?: WebhookSubscriptionRequestMetadata;
2645
- /** Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
2680
+ /**
2681
+ * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2682
+
2683
+ Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
2646
2684
  in addition to the event types. Only events matching both the event types AND this label filter will be delivered.
2647
2685
  NOTE: Use either (labelKey + labelValue) OR labels, not both.
2648
- */
2686
+
2687
+ Maintained for backward compatibility only.
2688
+
2689
+ * @deprecated
2690
+ */
2649
2691
  labelKey?: string;
2650
- /** Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
2692
+ /**
2693
+ * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2694
+
2695
+ Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
2651
2696
  Only events with this exact label value will be delivered.
2652
2697
  NOTE: Use either (labelKey + labelValue) OR labels, not both.
2653
- */
2698
+
2699
+ Maintained for backward compatibility only.
2700
+
2701
+ * @deprecated
2702
+ */
2654
2703
  labelValue?: string;
2655
- /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2656
- an event contains ALL the key-value pairs specified here. Additional labels on
2704
+ /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2705
+ an event contains ALL the key-value pairs specified here. Additional labels on
2657
2706
  the event are allowed and will not prevent matching.
2658
- NOTE: Use either labels OR (labelKey + labelValue), not both.
2707
+
2708
+ **Note:** Currently, labels are supported for onchain webhooks only.
2709
+
2710
+ See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2659
2711
  */
2660
2712
  labels?: WebhookSubscriptionRequestLabels;
2661
2713
  })
2662
2714
  | (unknown & {
2663
2715
  /** Description of the webhook subscription. */
2664
2716
  description?: string;
2665
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2717
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2666
2718
  service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2667
2719
  The subscription will only receive events matching these types AND the label filter(s).
2668
2720
  */
@@ -2672,20 +2724,37 @@ The subscription will only receive events matching these types AND the label fil
2672
2724
  target?: WebhookTarget;
2673
2725
  /** Additional metadata for the subscription. */
2674
2726
  metadata?: WebhookSubscriptionRequestMetadata;
2675
- /** Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
2727
+ /**
2728
+ * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2729
+
2730
+ Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
2676
2731
  in addition to the event types. Only events matching both the event types AND this label filter will be delivered.
2677
2732
  NOTE: Use either (labelKey + labelValue) OR labels, not both.
2678
- */
2733
+
2734
+ Maintained for backward compatibility only.
2735
+
2736
+ * @deprecated
2737
+ */
2679
2738
  labelKey?: string;
2680
- /** Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
2739
+ /**
2740
+ * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2741
+
2742
+ Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
2681
2743
  Only events with this exact label value will be delivered.
2682
2744
  NOTE: Use either (labelKey + labelValue) OR labels, not both.
2683
- */
2745
+
2746
+ Maintained for backward compatibility only.
2747
+
2748
+ * @deprecated
2749
+ */
2684
2750
  labelValue?: string;
2685
- /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2686
- an event contains ALL the key-value pairs specified here. Additional labels on
2751
+ /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2752
+ an event contains ALL the key-value pairs specified here. Additional labels on
2687
2753
  the event are allowed and will not prevent matching.
2688
- NOTE: Use either labels OR (labelKey + labelValue), not both.
2754
+
2755
+ **Note:** Currently, labels are supported for onchain webhooks only.
2756
+
2757
+ See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2689
2758
  */
2690
2759
  labels?: WebhookSubscriptionRequestLabels;
2691
2760
  });
@@ -2696,14 +2765,17 @@ NOTE: Use either labels OR (labelKey + labelValue), not both.
2696
2765
  export type WebhookSubscriptionUpdateRequestMetadata = { [key: string]: unknown };
2697
2766
 
2698
2767
  /**
2699
- * Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2700
- an event contains ALL the key-value pairs specified here. Use either labels OR (labelKey + labelValue), not both.
2768
+ * Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2769
+
2770
+ **Note:** Currently, labels are supported for onchain webhooks only.
2771
+
2772
+ See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2701
2773
 
2702
2774
  */
2703
2775
  export type WebhookSubscriptionUpdateRequestLabels = { [key: string]: string };
2704
2776
 
2705
2777
  /**
2706
- * Request to update an existing webhook subscription. The update format must match
2778
+ * Request to update an existing webhook subscription. The update format must match
2707
2779
  the original subscription format (traditional or multi-label).
2708
2780
 
2709
2781
  */
@@ -2711,7 +2783,7 @@ export type WebhookSubscriptionUpdateRequest =
2711
2783
  | (unknown & {
2712
2784
  /** Description of the webhook subscription. */
2713
2785
  description?: string;
2714
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2786
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2715
2787
  service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2716
2788
  */
2717
2789
  eventTypes?: string[];
@@ -2720,21 +2792,36 @@ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detec
2720
2792
  target?: WebhookTarget;
2721
2793
  /** Additional metadata for the subscription. */
2722
2794
  metadata?: WebhookSubscriptionUpdateRequestMetadata;
2723
- /** Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2724
- */
2725
- labelKey?: string;
2726
- /** Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2727
- */
2728
- labelValue?: string;
2729
- /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2730
- an event contains ALL the key-value pairs specified here. Use either labels OR (labelKey + labelValue), not both.
2795
+ /** Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2796
+
2797
+ **Note:** Currently, labels are supported for onchain webhooks only.
2798
+
2799
+ See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2731
2800
  */
2732
2801
  labels?: WebhookSubscriptionUpdateRequestLabels;
2802
+ /**
2803
+ * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2804
+
2805
+ Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2806
+ Maintained for backward compatibility only.
2807
+
2808
+ * @deprecated
2809
+ */
2810
+ labelKey?: string;
2811
+ /**
2812
+ * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2813
+
2814
+ Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2815
+ Maintained for backward compatibility only.
2816
+
2817
+ * @deprecated
2818
+ */
2819
+ labelValue?: string;
2733
2820
  })
2734
2821
  | (unknown & {
2735
2822
  /** Description of the webhook subscription. */
2736
2823
  description?: string;
2737
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2824
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2738
2825
  service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2739
2826
  */
2740
2827
  eventTypes?: string[];
@@ -2743,16 +2830,31 @@ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detec
2743
2830
  target?: WebhookTarget;
2744
2831
  /** Additional metadata for the subscription. */
2745
2832
  metadata?: WebhookSubscriptionUpdateRequestMetadata;
2746
- /** Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2747
- */
2748
- labelKey?: string;
2749
- /** Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2750
- */
2751
- labelValue?: string;
2752
- /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2753
- an event contains ALL the key-value pairs specified here. Use either labels OR (labelKey + labelValue), not both.
2833
+ /** Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2834
+
2835
+ **Note:** Currently, labels are supported for onchain webhooks only.
2836
+
2837
+ See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2754
2838
  */
2755
2839
  labels?: WebhookSubscriptionUpdateRequestLabels;
2840
+ /**
2841
+ * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2842
+
2843
+ Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2844
+ Maintained for backward compatibility only.
2845
+
2846
+ * @deprecated
2847
+ */
2848
+ labelKey?: string;
2849
+ /**
2850
+ * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2851
+
2852
+ Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2853
+ Maintained for backward compatibility only.
2854
+
2855
+ * @deprecated
2856
+ */
2857
+ labelValue?: string;
2756
2858
  });
2757
2859
 
2758
2860
  /**
@@ -3093,6 +3195,24 @@ export const X402VerifyInvalidReason = {
3093
3195
  "invalid_exact_svm_payload_transaction_fee_payer_transferring_funds",
3094
3196
  } as const;
3095
3197
 
3198
+ /**
3199
+ * The result when x402 payment verification fails.
3200
+ */
3201
+ export interface X402VerifyPaymentRejection {
3202
+ /** Indicates whether the payment is valid. */
3203
+ isValid: boolean;
3204
+ invalidReason: X402VerifyInvalidReason;
3205
+ /**
3206
+ * The onchain address of the client that is paying for the resource.
3207
+
3208
+ For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
3209
+
3210
+ For Solana-based networks, the payer will be a base58-encoded Solana address.
3211
+ * @pattern ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
3212
+ */
3213
+ payer?: string;
3214
+ }
3215
+
3096
3216
  /**
3097
3217
  * The reason the payment settlement errored on the x402 protocol.
3098
3218
  */
@@ -3119,24 +3239,41 @@ export const X402SettleErrorReason = {
3119
3239
  invalid_exact_evm_payload_authorization_to_address_kyt:
3120
3240
  "invalid_exact_evm_payload_authorization_to_address_kyt",
3121
3241
  invalid_exact_evm_payload_signature_address: "invalid_exact_evm_payload_signature_address",
3242
+ settle_exact_evm_transaction_confirmation_timed_out:
3243
+ "settle_exact_evm_transaction_confirmation_timed_out",
3244
+ settle_exact_node_failure: "settle_exact_node_failure",
3245
+ settle_exact_failed_onchain: "settle_exact_failed_onchain",
3122
3246
  settle_exact_svm_block_height_exceeded: "settle_exact_svm_block_height_exceeded",
3123
3247
  settle_exact_svm_transaction_confirmation_timed_out:
3124
3248
  "settle_exact_svm_transaction_confirmation_timed_out",
3125
3249
  } as const;
3126
3250
 
3127
3251
  /**
3128
- * The network of the blockchain.
3252
+ * The result when x402 payment settlement fails.
3129
3253
  */
3130
- export type X402SupportedPaymentKindNetwork =
3131
- (typeof X402SupportedPaymentKindNetwork)[keyof typeof X402SupportedPaymentKindNetwork];
3254
+ export interface X402SettlePaymentRejection {
3255
+ /** Indicates whether the payment settlement is successful. */
3256
+ success: boolean;
3257
+ errorReason: X402SettleErrorReason;
3258
+ /**
3259
+ * The onchain address of the client that is paying for the resource.
3132
3260
 
3133
- // eslint-disable-next-line @typescript-eslint/no-redeclare
3134
- export const X402SupportedPaymentKindNetwork = {
3135
- "base-sepolia": "base-sepolia",
3136
- base: "base",
3137
- "solana-devnet": "solana-devnet",
3138
- solana: "solana",
3139
- } as const;
3261
+ For EVM networks, the payer will be a 0x-prefixed, checksum EVM address.
3262
+
3263
+ For Solana-based networks, the payer will be a base58-encoded Solana address.
3264
+ * @pattern ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
3265
+ */
3266
+ payer?: string;
3267
+ /**
3268
+ * The transaction of the settlement.
3269
+ For EVM networks, the transaction will be a 0x-prefixed, EVM transaction hash.
3270
+ For Solana-based networks, the transaction will be a base58-encoded Solana signature.
3271
+ * @pattern ^(0x[a-fA-F0-9]{64}|[1-9A-HJ-NP-Za-km-z]{87,88})$
3272
+ */
3273
+ transaction?: string;
3274
+ /** The network where the settlement occurred. */
3275
+ network?: string;
3276
+ }
3140
3277
 
3141
3278
  /**
3142
3279
  * The scheme of the payment protocol.
@@ -3149,6 +3286,20 @@ export const X402SupportedPaymentKindScheme = {
3149
3286
  exact: "exact",
3150
3287
  } as const;
3151
3288
 
3289
+ /**
3290
+ * The network of the blockchain.
3291
+ */
3292
+ export type X402SupportedPaymentKindNetwork =
3293
+ (typeof X402SupportedPaymentKindNetwork)[keyof typeof X402SupportedPaymentKindNetwork];
3294
+
3295
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
3296
+ export const X402SupportedPaymentKindNetwork = {
3297
+ "base-sepolia": "base-sepolia",
3298
+ base: "base",
3299
+ "solana-devnet": "solana-devnet",
3300
+ solana: "solana",
3301
+ } as const;
3302
+
3152
3303
  /**
3153
3304
  * The optional additional scheme-specific payment info.
3154
3305
  */
@@ -3162,7 +3313,7 @@ export interface X402SupportedPaymentKind {
3162
3313
  /** The scheme of the payment protocol. */
3163
3314
  scheme: X402SupportedPaymentKindScheme;
3164
3315
  /** The network of the blockchain. */
3165
- network: string;
3316
+ network: X402SupportedPaymentKindNetwork;
3166
3317
  /** The optional additional scheme-specific payment info. */
3167
3318
  extra?: X402SupportedPaymentKindExtra;
3168
3319
  }
@@ -3387,6 +3538,11 @@ For Solana-based networks, the payer will be a base58-encoded Solana address.
3387
3538
  payer: string;
3388
3539
  };
3389
3540
 
3541
+ /**
3542
+ * Invalid payment verification on the x402 protocol.
3543
+ */
3544
+ export type X402VerifyInvalidErrorResponse = X402VerifyPaymentRejection;
3545
+
3390
3546
  export type X402SettleResponseResponse = {
3391
3547
  /** Indicates whether the payment settlement is successful. */
3392
3548
  success: boolean;
@@ -3411,6 +3567,11 @@ For Solana-based networks, the transaction will be a base58-encoded Solana signa
3411
3567
  network: string;
3412
3568
  };
3413
3569
 
3570
+ /**
3571
+ * Unsuccessful payment settlement on the x402 protocol.
3572
+ */
3573
+ export type X402SettleErrorResponse = X402SettlePaymentRejection;
3574
+
3414
3575
  /**
3415
3576
  * A map of CAIP-2 network or protocol family patterns to their supported signer addresses.
3416
3577
  */
@@ -3440,7 +3601,7 @@ export type XWalletAuthParameter = string;
3440
3601
 
3441
3602
  /**
3442
3603
  * An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
3443
- When included, duplicate requests with the same key will return identical responses.
3604
+ When included, duplicate requests with the same key will return identical responses.
3444
3605
  Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
3445
3606
 
3446
3607
  */
@@ -3462,6 +3623,8 @@ export type PageTokenParameter = string;
3462
3623
  export type CreateEndUserBodyEvmAccount = {
3463
3624
  /** If true, creates an EVM smart account and a default EVM EOA account as the owner. If false, only a EVM EOA account is created. */
3464
3625
  createSmartAccount?: boolean;
3626
+ /** If true, enables spend permissions for the EVM smart account. */
3627
+ enableSpendPermissions?: boolean;
3465
3628
  };
3466
3629
 
3467
3630
  /**
@@ -17,7 +17,7 @@ import { cdpApiClient } from "../../cdpApiClient.js";
17
17
  type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
18
18
 
19
19
  /**
20
- * Retrieve all ERC-20 token contract addresses that an account has ever received tokens from.
20
+ * Retrieve all ERC-20 token contract addresses that an account has ever received tokens from.
21
21
  Analyzes transaction history to discover token interactions.
22
22
 
23
23
  * @summary List token addresses for account
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-sdk",
3
- "version": "1.40.2",
3
+ "version": "1.42.0",
4
4
  "description": "SDK for interacting with the Coinbase Developer Platform Wallet API",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
package/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = "1.40.2";
1
+ export const version = "1.42.0";