@coinbase/cdp-sdk 1.44.0 → 1.44.1

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.
@@ -2634,24 +2634,6 @@ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detec
2634
2634
  /** Unique identifier for the subscription. */
2635
2635
  subscriptionId: string;
2636
2636
  target: WebhookTarget;
2637
- /**
2638
- * (Deprecated) Use `labels` field instead.
2639
-
2640
- Label key for filtering events. Present when subscription uses traditional single-label format.
2641
- Maintained for backward compatibility only.
2642
-
2643
- * @deprecated
2644
- */
2645
- labelKey?: string;
2646
- /**
2647
- * (Deprecated) Use `labels` field instead.
2648
-
2649
- Label value for filtering events. Present when subscription uses traditional single-label format.
2650
- Maintained for backward compatibility only.
2651
-
2652
- * @deprecated
2653
- */
2654
- labelValue?: string;
2655
2637
  /** Multi-label filters using total overlap logic. Total overlap means the subscription only triggers when events contain ALL these key-value pairs.
2656
2638
  Present when subscription uses multi-label format.
2657
2639
  */
@@ -2669,9 +2651,9 @@ export type WebhookSubscriptionListResponseAllOf = {
2669
2651
  export type WebhookSubscriptionListResponse = WebhookSubscriptionListResponseAllOf & ListResponse;
2670
2652
 
2671
2653
  /**
2672
- * Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2673
- an event contains ALL the key-value pairs specified here. Additional labels on
2674
- the event are allowed and will not prevent matching.
2654
+ * Optional. Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2655
+ an event contains ALL the key-value pairs specified here. Additional labels on
2656
+ the event are allowed and will not prevent matching. Omit to receive all events for the selected event types.
2675
2657
 
2676
2658
  **Note:** Currently, labels are supported for onchain webhooks only.
2677
2659
 
@@ -2681,194 +2663,67 @@ See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-refe
2681
2663
  export type WebhookSubscriptionRequestLabels = { [key: string]: string };
2682
2664
 
2683
2665
  /**
2684
- * Request to create a new webhook subscription with support for both traditional single-label
2685
- and multi-label filtering formats.
2666
+ * Request to create a new webhook subscription with support for multi-label filtering.
2686
2667
 
2687
2668
  */
2688
- export type WebhookSubscriptionRequest =
2689
- | (unknown & {
2690
- /** Description of the webhook subscription. */
2691
- description?: Description;
2692
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2693
- service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2694
- The subscription will only receive events matching these types AND the label filter(s).
2695
- */
2696
- eventTypes?: string[];
2697
- /** Whether the subscription is enabled. */
2698
- isEnabled?: boolean;
2699
- target?: WebhookTarget;
2700
- metadata?: Metadata;
2701
- /**
2702
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2703
-
2704
- Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
2705
- in addition to the event types. Only events matching both the event types AND this label filter will be delivered.
2706
- NOTE: Use either (labelKey + labelValue) OR labels, not both.
2707
-
2708
- Maintained for backward compatibility only.
2709
-
2710
- * @deprecated
2711
- */
2712
- labelKey?: string;
2713
- /**
2714
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2715
-
2716
- Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
2717
- Only events with this exact label value will be delivered.
2718
- NOTE: Use either (labelKey + labelValue) OR labels, not both.
2719
-
2720
- Maintained for backward compatibility only.
2721
-
2722
- * @deprecated
2723
- */
2724
- labelValue?: string;
2725
- /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2726
- an event contains ALL the key-value pairs specified here. Additional labels on
2727
- the event are allowed and will not prevent matching.
2728
-
2729
- **Note:** Currently, labels are supported for onchain webhooks only.
2730
-
2731
- See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2732
- */
2733
- labels?: WebhookSubscriptionRequestLabels;
2734
- })
2735
- | (unknown & {
2736
- /** Description of the webhook subscription. */
2737
- description?: Description;
2738
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2669
+ export interface WebhookSubscriptionRequest {
2670
+ /** Description of the webhook subscription. */
2671
+ description?: Description;
2672
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2739
2673
  service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2740
2674
  The subscription will only receive events matching these types AND the label filter(s).
2741
2675
  */
2742
- eventTypes?: string[];
2743
- /** Whether the subscription is enabled. */
2744
- isEnabled?: boolean;
2745
- target?: WebhookTarget;
2746
- metadata?: Metadata;
2747
- /**
2748
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2749
-
2750
- Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
2751
- in addition to the event types. Only events matching both the event types AND this label filter will be delivered.
2752
- NOTE: Use either (labelKey + labelValue) OR labels, not both.
2753
-
2754
- Maintained for backward compatibility only.
2755
-
2756
- * @deprecated
2757
- */
2758
- labelKey?: string;
2759
- /**
2760
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2761
-
2762
- Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
2763
- Only events with this exact label value will be delivered.
2764
- NOTE: Use either (labelKey + labelValue) OR labels, not both.
2765
-
2766
- Maintained for backward compatibility only.
2767
-
2768
- * @deprecated
2769
- */
2770
- labelValue?: string;
2771
- /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2772
- an event contains ALL the key-value pairs specified here. Additional labels on
2773
- the event are allowed and will not prevent matching.
2676
+ eventTypes: string[];
2677
+ /** Whether the subscription is enabled. */
2678
+ isEnabled: boolean;
2679
+ target: WebhookTarget;
2680
+ metadata?: Metadata;
2681
+ /** Optional. Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2682
+ an event contains ALL the key-value pairs specified here. Additional labels on
2683
+ the event are allowed and will not prevent matching. Omit to receive all events for the selected event types.
2774
2684
 
2775
2685
  **Note:** Currently, labels are supported for onchain webhooks only.
2776
2686
 
2777
2687
  See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2778
2688
  */
2779
- labels?: WebhookSubscriptionRequestLabels;
2780
- });
2689
+ labels?: WebhookSubscriptionRequestLabels;
2690
+ }
2781
2691
 
2782
2692
  /**
2783
- * Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2693
+ * Optional. Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2784
2694
 
2785
2695
  **Note:** Currently, labels are supported for onchain webhooks only.
2786
2696
 
2787
2697
  See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2698
+ Omit to receive all events for the selected event types.
2788
2699
 
2789
2700
  */
2790
2701
  export type WebhookSubscriptionUpdateRequestLabels = { [key: string]: string };
2791
2702
 
2792
2703
  /**
2793
- * Request to update an existing webhook subscription. The update format must match
2794
- the original subscription format (traditional or multi-label).
2704
+ * Request to update an existing webhook subscription.
2795
2705
 
2796
2706
  */
2797
- export type WebhookSubscriptionUpdateRequest =
2798
- | (unknown & {
2799
- /** Description of the webhook subscription. */
2800
- description?: Description;
2801
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2802
- service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2803
- */
2804
- eventTypes?: string[];
2805
- /** Whether the subscription is enabled. */
2806
- isEnabled?: boolean;
2807
- target?: WebhookTarget;
2808
- metadata?: Metadata;
2809
- /** Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2810
-
2811
- **Note:** Currently, labels are supported for onchain webhooks only.
2812
-
2813
- See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2814
- */
2815
- labels?: WebhookSubscriptionUpdateRequestLabels;
2816
- /**
2817
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2818
-
2819
- Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2820
- Maintained for backward compatibility only.
2821
-
2822
- * @deprecated
2823
- */
2824
- labelKey?: string;
2825
- /**
2826
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2827
-
2828
- Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2829
- Maintained for backward compatibility only.
2830
-
2831
- * @deprecated
2832
- */
2833
- labelValue?: string;
2834
- })
2835
- | (unknown & {
2836
- /** Description of the webhook subscription. */
2837
- description?: Description;
2838
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2707
+ export interface WebhookSubscriptionUpdateRequest {
2708
+ /** Description of the webhook subscription. */
2709
+ description?: Description;
2710
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2839
2711
  service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2840
2712
  */
2841
- eventTypes?: string[];
2842
- /** Whether the subscription is enabled. */
2843
- isEnabled?: boolean;
2844
- target?: WebhookTarget;
2845
- metadata?: Metadata;
2846
- /** Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2713
+ eventTypes: string[];
2714
+ /** Whether the subscription is enabled. */
2715
+ isEnabled: boolean;
2716
+ target: WebhookTarget;
2717
+ metadata?: Metadata;
2718
+ /** Optional. Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2847
2719
 
2848
2720
  **Note:** Currently, labels are supported for onchain webhooks only.
2849
2721
 
2850
2722
  See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2723
+ Omit to receive all events for the selected event types.
2851
2724
  */
2852
- labels?: WebhookSubscriptionUpdateRequestLabels;
2853
- /**
2854
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2855
-
2856
- Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2857
- Maintained for backward compatibility only.
2858
-
2859
- * @deprecated
2860
- */
2861
- labelKey?: string;
2862
- /**
2863
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2864
-
2865
- Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2866
- Maintained for backward compatibility only.
2867
-
2868
- * @deprecated
2869
- */
2870
- labelValue?: string;
2871
- });
2725
+ labels?: WebhookSubscriptionUpdateRequestLabels;
2726
+ }
2872
2727
 
2873
2728
  /**
2874
2729
  * The version of the x402 protocol.
@@ -3206,6 +3061,7 @@ export const X402VerifyInvalidReason = {
3206
3061
  "invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts",
3207
3062
  invalid_exact_svm_payload_transaction_fee_payer_transferring_funds:
3208
3063
  "invalid_exact_svm_payload_transaction_fee_payer_transferring_funds",
3064
+ unknown_error: "unknown_error",
3209
3065
  } as const;
3210
3066
 
3211
3067
  /**
@@ -3215,6 +3071,8 @@ export interface X402VerifyPaymentRejection {
3215
3071
  /** Indicates whether the payment is valid. */
3216
3072
  isValid: boolean;
3217
3073
  invalidReason: X402VerifyInvalidReason;
3074
+ /** The message describing the invalid reason. */
3075
+ invalidMessage?: string;
3218
3076
  /**
3219
3077
  * The onchain address of the client that is paying for the resource.
3220
3078
 
@@ -3301,6 +3159,7 @@ export const X402SettleErrorReason = {
3301
3159
  settle_exact_svm_block_height_exceeded: "settle_exact_svm_block_height_exceeded",
3302
3160
  settle_exact_svm_transaction_confirmation_timed_out:
3303
3161
  "settle_exact_svm_transaction_confirmation_timed_out",
3162
+ unknown_error: "unknown_error",
3304
3163
  } as const;
3305
3164
 
3306
3165
  /**
@@ -3310,6 +3169,8 @@ export interface X402SettlePaymentRejection {
3310
3169
  /** Indicates whether the payment settlement is successful. */
3311
3170
  success: boolean;
3312
3171
  errorReason: X402SettleErrorReason;
3172
+ /** The message describing the error reason. */
3173
+ errorMessage?: string;
3313
3174
  /**
3314
3175
  * The onchain address of the client that is paying for the resource.
3315
3176
 
@@ -3593,6 +3454,8 @@ export type X402VerifyResponseResponse = {
3593
3454
  /** Indicates whether the payment is valid. */
3594
3455
  isValid: boolean;
3595
3456
  invalidReason?: X402VerifyInvalidReason;
3457
+ /** The message describing the invalid reason. */
3458
+ invalidMessage?: string;
3596
3459
  /**
3597
3460
  * The onchain address of the client that is paying for the resource.
3598
3461
 
@@ -3613,6 +3476,8 @@ export type X402SettleResponseResponse = {
3613
3476
  /** Indicates whether the payment settlement is successful. */
3614
3477
  success: boolean;
3615
3478
  errorReason?: X402SettleErrorReason;
3479
+ /** The message describing the error reason. */
3480
+ errorMessage?: string;
3616
3481
  /**
3617
3482
  * The onchain address of the client that is paying for the resource.
3618
3483
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-sdk",
3
- "version": "1.44.0",
3
+ "version": "1.44.1",
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.44.0";
1
+ export const version = "1.44.1";