@coinbase/cdp-sdk 1.38.6 → 1.40.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.
Files changed (78) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +17 -0
  3. package/_cjs/actions/evm/sendUserOperation.js +1 -0
  4. package/_cjs/actions/evm/sendUserOperation.js.map +1 -1
  5. package/_cjs/auth/utils/http.js +2 -1
  6. package/_cjs/auth/utils/http.js.map +1 -1
  7. package/_cjs/client/end-user/endUser.js +39 -0
  8. package/_cjs/client/end-user/endUser.js.map +1 -1
  9. package/_cjs/client/evm/evm.js +2 -0
  10. package/_cjs/client/evm/evm.js.map +1 -1
  11. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +19 -2
  12. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  13. package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js +25 -1
  14. package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
  15. package/_cjs/openapi-client/generated/onramp/onramp.js +1 -1
  16. package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +1 -2
  17. package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +1 -1
  18. package/_cjs/openapi-client/generated/webhooks/webhooks.js +130 -0
  19. package/_cjs/openapi-client/generated/webhooks/webhooks.js.map +1 -0
  20. package/_cjs/openapi-client/index.js +2 -0
  21. package/_cjs/openapi-client/index.js.map +1 -1
  22. package/_cjs/version.js +1 -1
  23. package/_esm/actions/evm/sendUserOperation.js +1 -0
  24. package/_esm/actions/evm/sendUserOperation.js.map +1 -1
  25. package/_esm/auth/utils/http.js +2 -1
  26. package/_esm/auth/utils/http.js.map +1 -1
  27. package/_esm/client/end-user/endUser.js +39 -0
  28. package/_esm/client/end-user/endUser.js.map +1 -1
  29. package/_esm/client/evm/evm.js +2 -0
  30. package/_esm/client/evm/evm.js.map +1 -1
  31. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +17 -0
  32. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  33. package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js +22 -0
  34. package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
  35. package/_esm/openapi-client/generated/onramp/onramp.js +1 -1
  36. package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +1 -2
  37. package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +1 -1
  38. package/_esm/openapi-client/generated/webhooks/webhooks.js +122 -0
  39. package/_esm/openapi-client/generated/webhooks/webhooks.js.map +1 -0
  40. package/_esm/openapi-client/index.js +2 -0
  41. package/_esm/openapi-client/index.js.map +1 -1
  42. package/_esm/version.js +1 -1
  43. package/_types/actions/evm/sendUserOperation.d.ts +2 -0
  44. package/_types/actions/evm/sendUserOperation.d.ts.map +1 -1
  45. package/_types/auth/utils/http.d.ts.map +1 -1
  46. package/_types/client/end-user/endUser.d.ts +30 -1
  47. package/_types/client/end-user/endUser.d.ts.map +1 -1
  48. package/_types/client/end-user/endUser.types.d.ts +5 -1
  49. package/_types/client/end-user/endUser.types.d.ts.map +1 -1
  50. package/_types/client/evm/evm.d.ts.map +1 -1
  51. package/_types/client/evm/evm.types.d.ts +2 -0
  52. package/_types/client/evm/evm.types.d.ts.map +1 -1
  53. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +386 -41
  54. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  55. package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts +16 -1
  56. package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts.map +1 -1
  57. package/_types/openapi-client/generated/onramp/onramp.d.ts +1 -1
  58. package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts +1 -2
  59. package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts.map +1 -1
  60. package/_types/openapi-client/generated/webhooks/webhooks.d.ts +117 -0
  61. package/_types/openapi-client/generated/webhooks/webhooks.d.ts.map +1 -0
  62. package/_types/openapi-client/index.d.ts +7 -0
  63. package/_types/openapi-client/index.d.ts.map +1 -1
  64. package/_types/version.d.ts +1 -1
  65. package/actions/evm/sendUserOperation.ts +3 -0
  66. package/auth/utils/http.ts +2 -1
  67. package/client/end-user/endUser.ts +48 -1
  68. package/client/end-user/endUser.types.ts +6 -1
  69. package/client/evm/evm.ts +2 -0
  70. package/client/evm/evm.types.ts +2 -0
  71. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +407 -41
  72. package/openapi-client/generated/end-user-accounts/end-user-accounts.ts +31 -0
  73. package/openapi-client/generated/onramp/onramp.ts +1 -1
  74. package/openapi-client/generated/sql-api-alpha/sql-api-alpha.ts +1 -2
  75. package/openapi-client/generated/webhooks/webhooks.ts +185 -0
  76. package/openapi-client/index.ts +2 -0
  77. package/package.json +1 -1
  78. package/version.ts +1 -1
@@ -58,10 +58,33 @@ export interface DeveloperJWTAuthentication {
58
58
  /** The unique identifier for the end user that is captured in the `sub` claim of the JWT. */
59
59
  sub: string;
60
60
  }
61
+ /**
62
+ * The type of OAuth2 provider.
63
+ */
64
+ export type OAuth2ProviderType = (typeof OAuth2ProviderType)[keyof typeof OAuth2ProviderType];
65
+ export declare const OAuth2ProviderType: {
66
+ readonly google: "google";
67
+ readonly apple: "apple";
68
+ readonly x: "x";
69
+ };
70
+ /**
71
+ * Information about an end user who authenticates using a third-party provider.
72
+ */
73
+ export interface OAuth2Authentication {
74
+ type: OAuth2ProviderType;
75
+ /** The unique identifier for the end user that is captured in the `sub` claim of the JWT. */
76
+ sub: string;
77
+ /** The email address of the end user contained within the user's ID token, if available from third-party OAuth2 provider's token exchange. */
78
+ email?: string;
79
+ /** The full name of the end user if available from third-party OAuth2 provider's token exchange. */
80
+ name?: string;
81
+ /** The username of the end user if available from third-party OAuth2 provider's token exchange. */
82
+ username?: string;
83
+ }
61
84
  /**
62
85
  * Information about how the end user is authenticated.
63
86
  */
64
- export type AuthenticationMethod = EmailAuthentication | SmsAuthentication | DeveloperJWTAuthentication;
87
+ export type AuthenticationMethod = EmailAuthentication | SmsAuthentication | DeveloperJWTAuthentication | OAuth2Authentication;
65
88
  /**
66
89
  * The list of valid authentication methods linked to the end user.
67
90
  */
@@ -76,12 +99,23 @@ export interface EndUser {
76
99
  */
77
100
  userId: string;
78
101
  authenticationMethods: AuthenticationMethods;
79
- /** The list of EVM accounts associated with the end user. Currently, only one EVM account is supported per end user. */
102
+ /**
103
+ * **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.
104
+ * @deprecated
105
+ */
80
106
  evmAccounts: string[];
81
- /** The list of EVM smart accounts associated with the end user. Currently, only one EVM smart account is supported per end user. */
107
+ /**
108
+ * **DEPRECATED**: Use `evmSmartAccountObjects` instead for richer account information including owner relationships. The list of EVM smart account addresses associated with the end user. Each EVM EOA can own one smart account.
109
+ * @deprecated
110
+ */
82
111
  evmSmartAccounts: string[];
83
- /** The list of Solana accounts associated with the end user. Currently, only one Solana account is supported per end user. */
112
+ /**
113
+ * **DEPRECATED**: Use `solanaAccountObjects` instead for richer account information. The list of Solana account addresses associated with the end user. End users can have up to 10 Solana accounts.
114
+ * @deprecated
115
+ */
84
116
  solanaAccounts: string[];
117
+ /** The date and time when the end user was created, in ISO 8601 format. */
118
+ createdAt: string;
85
119
  }
86
120
  export interface ListResponse {
87
121
  /** The token for the next page of items, if any. */
@@ -122,7 +156,22 @@ export declare const ErrorType: {
122
156
  readonly recipient_allowlist_violation: "recipient_allowlist_violation";
123
157
  readonly recipient_allowlist_pending: "recipient_allowlist_pending";
124
158
  readonly travel_rules_recipient_violation: "travel_rules_recipient_violation";
159
+ readonly transfer_amount_out_of_bounds: "transfer_amount_out_of_bounds";
160
+ readonly transfer_recipient_address_invalid: "transfer_recipient_address_invalid";
161
+ readonly transfer_quote_expired: "transfer_quote_expired";
162
+ readonly mfa_already_enrolled: "mfa_already_enrolled";
163
+ readonly mfa_invalid_code: "mfa_invalid_code";
164
+ readonly mfa_flow_expired: "mfa_flow_expired";
165
+ readonly mfa_required: "mfa_required";
166
+ readonly mfa_not_enrolled: "mfa_not_enrolled";
125
167
  };
168
+ /**
169
+ * A valid HTTP or HTTPS URL.
170
+ * @minLength 11
171
+ * @maxLength 2048
172
+ * @pattern ^https?://.*$
173
+ */
174
+ export type Url = string;
126
175
  /**
127
176
  * An error response including the code for the type of error and a human-readable message describing the error.
128
177
  */
@@ -133,7 +182,7 @@ export interface Error {
133
182
  /** A unique identifier for the request that generated the error. This can be used to help debug issues with the API. */
134
183
  correlationId?: string;
135
184
  /** A link to the corresponding error documentation. */
136
- errorLink?: string;
185
+ errorLink?: Url;
137
186
  }
138
187
  export interface EvmAccount {
139
188
  /**
@@ -360,7 +409,7 @@ export interface CreateSpendPermissionRequest {
360
409
  /** Arbitrary data to include in the permission. */
361
410
  extraData?: string;
362
411
  /** The paymaster URL of the spend permission. */
363
- paymasterUrl?: string;
412
+ paymasterUrl?: Url;
364
413
  }
365
414
  /**
366
415
  * The core spend permission.
@@ -414,7 +463,7 @@ export interface RevokeSpendPermissionRequest {
414
463
  /** The hash of the spend permission to revoke. */
415
464
  permissionHash: string;
416
465
  /** The paymaster URL of the spend permission. */
417
- paymasterUrl?: string;
466
+ paymasterUrl?: Url;
418
467
  }
419
468
  /**
420
469
  * The network on which to perform the swap.
@@ -1849,6 +1898,20 @@ export interface SolanaTokenBalance {
1849
1898
  amount: SolanaTokenAmount;
1850
1899
  token: SolanaToken;
1851
1900
  }
1901
+ /**
1902
+ * Enables control over how often queries need to be fully re-executed on the backing store.
1903
+ This can be useful in scenarios where API calls might be made frequently, API latency is critical, and some freshness lag (ex: 750ms, 2s, 5s) is tolerable.
1904
+ By default, each query result is returned from cache so long as the result is from an identical query and less than 500ms old. This freshness tolerance can be modified upwards, to a maximum of 900000ms (i.e. 900s, 15m).
1905
+
1906
+ */
1907
+ export type OnchainDataQueryCache = {
1908
+ /**
1909
+ * The maximum tolerable staleness of the query result cache in milliseconds. If a previous execution result of an identical query is older than this age, the query will be re-executed. If the data is less than this age, the result will be returned from cache.
1910
+ * @minimum 500
1911
+ * @maximum 900000
1912
+ */
1913
+ maxAgeMs?: number;
1914
+ };
1852
1915
  /**
1853
1916
  * Request to execute a SQL query against indexed blockchain data.
1854
1917
  */
@@ -1856,9 +1919,14 @@ export interface OnchainDataQuery {
1856
1919
  /**
1857
1920
  * SQL query to execute against the indexed blockchain data.
1858
1921
  * @minLength 1
1859
- * @maxLength 50000
1922
+ * @maxLength 100000
1860
1923
  */
1861
1924
  sql: string;
1925
+ /** Enables control over how often queries need to be fully re-executed on the backing store.
1926
+ This can be useful in scenarios where API calls might be made frequently, API latency is critical, and some freshness lag (ex: 750ms, 2s, 5s) is tolerable.
1927
+ By default, each query result is returned from cache so long as the result is from an identical query and less than 500ms old. This freshness tolerance can be modified upwards, to a maximum of 900000ms (i.e. 900s, 15m).
1928
+ */
1929
+ cache?: OnchainDataQueryCache;
1862
1930
  }
1863
1931
  /**
1864
1932
  * Row data with column names as keys.
@@ -1910,8 +1978,10 @@ export type OnchainDataResultSchema = {
1910
1978
  * Metadata about query execution.
1911
1979
  */
1912
1980
  export type OnchainDataResultMetadata = {
1913
- /** Whether the result was served from cache. */
1981
+ /** Whether the result was served from the query result cache. */
1914
1982
  cached?: boolean;
1983
+ /** When the query result was executed against the backing store in RFC 3339 format. */
1984
+ executionTimestamp?: string;
1915
1985
  /** Query execution time in milliseconds. */
1916
1986
  executionTimeMs?: number;
1917
1987
  /** Number of rows returned. */
@@ -1943,6 +2013,223 @@ export interface AccountTokenAddressesResponse {
1943
2013
  */
1944
2014
  totalCount?: number;
1945
2015
  }
2016
+ /**
2017
+ * Additional headers to include in webhook requests.
2018
+ */
2019
+ export type WebhookTargetHeaders = {
2020
+ [key: string]: string;
2021
+ };
2022
+ /**
2023
+ * Target configuration for webhook delivery.
2024
+ Specifies the destination URL and any custom headers to include in webhook requests.
2025
+
2026
+ */
2027
+ export interface WebhookTarget {
2028
+ /** The webhook URL to deliver events to. */
2029
+ url: Url;
2030
+ /** Additional headers to include in webhook requests. */
2031
+ headers?: WebhookTargetHeaders;
2032
+ }
2033
+ /**
2034
+ * Additional metadata for the subscription.
2035
+ */
2036
+ export type WebhookSubscriptionResponseMetadata = {
2037
+ /** Secret for webhook signature validation.
2038
+
2039
+ **Note:** Webhooks are in beta and this interface is subject to change.
2040
+ */
2041
+ secret?: string;
2042
+ };
2043
+ /**
2044
+ * Multi-label filters using total overlap logic. Total overlap means the subscription only triggers when events contain ALL these key-value pairs.
2045
+ Present when subscription uses multi-label format.
2046
+
2047
+ */
2048
+ export type WebhookSubscriptionResponseLabels = {
2049
+ [key: string]: string;
2050
+ };
2051
+ /**
2052
+ * Response containing webhook subscription details.
2053
+ */
2054
+ export interface WebhookSubscriptionResponse {
2055
+ /** When the subscription was created. */
2056
+ createdAt: string;
2057
+ /** Description of the webhook subscription. */
2058
+ description?: string;
2059
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2060
+ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2061
+ */
2062
+ eventTypes: string[];
2063
+ /** Whether the subscription is enabled. */
2064
+ isEnabled: boolean;
2065
+ /** Additional metadata for the subscription. */
2066
+ metadata?: WebhookSubscriptionResponseMetadata;
2067
+ /** Unique identifier for the subscription. */
2068
+ subscriptionId: string;
2069
+ target: WebhookTarget;
2070
+ /** Label key for filtering events. Present when subscription uses traditional single-label format.
2071
+ */
2072
+ labelKey?: string;
2073
+ /** Label value for filtering events. Present when subscription uses traditional single-label format.
2074
+ */
2075
+ labelValue?: string;
2076
+ /** Multi-label filters using total overlap logic. Total overlap means the subscription only triggers when events contain ALL these key-value pairs.
2077
+ Present when subscription uses multi-label format.
2078
+ */
2079
+ labels?: WebhookSubscriptionResponseLabels;
2080
+ }
2081
+ /**
2082
+ * Response containing a list of webhook subscriptions.
2083
+ */
2084
+ export type WebhookSubscriptionListResponseAllOf = {
2085
+ /** The list of webhook subscriptions. */
2086
+ subscriptions: WebhookSubscriptionResponse[];
2087
+ };
2088
+ export type WebhookSubscriptionListResponse = WebhookSubscriptionListResponseAllOf & ListResponse;
2089
+ /**
2090
+ * Additional metadata for the subscription.
2091
+ */
2092
+ export type WebhookSubscriptionRequestMetadata = {
2093
+ [key: string]: unknown;
2094
+ };
2095
+ /**
2096
+ * Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2097
+ an event contains ALL the key-value pairs specified here. Additional labels on
2098
+ the event are allowed and will not prevent matching.
2099
+ NOTE: Use either labels OR (labelKey + labelValue), not both.
2100
+
2101
+ */
2102
+ export type WebhookSubscriptionRequestLabels = {
2103
+ [key: string]: string;
2104
+ };
2105
+ /**
2106
+ * Request to create a new webhook subscription with support for both traditional single-label
2107
+ and multi-label filtering formats.
2108
+
2109
+ */
2110
+ export type WebhookSubscriptionRequest = (unknown & {
2111
+ /** Description of the webhook subscription. */
2112
+ description?: string;
2113
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2114
+ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2115
+ The subscription will only receive events matching these types AND the label filter(s).
2116
+ */
2117
+ eventTypes?: string[];
2118
+ /** Whether the subscription is enabled. */
2119
+ isEnabled?: boolean;
2120
+ target?: WebhookTarget;
2121
+ /** Additional metadata for the subscription. */
2122
+ metadata?: WebhookSubscriptionRequestMetadata;
2123
+ /** Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
2124
+ in addition to the event types. Only events matching both the event types AND this label filter will be delivered.
2125
+ NOTE: Use either (labelKey + labelValue) OR labels, not both.
2126
+ */
2127
+ labelKey?: string;
2128
+ /** Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
2129
+ Only events with this exact label value will be delivered.
2130
+ NOTE: Use either (labelKey + labelValue) OR labels, not both.
2131
+ */
2132
+ labelValue?: string;
2133
+ /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2134
+ an event contains ALL the key-value pairs specified here. Additional labels on
2135
+ the event are allowed and will not prevent matching.
2136
+ NOTE: Use either labels OR (labelKey + labelValue), not both.
2137
+ */
2138
+ labels?: WebhookSubscriptionRequestLabels;
2139
+ }) | (unknown & {
2140
+ /** Description of the webhook subscription. */
2141
+ description?: string;
2142
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2143
+ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2144
+ The subscription will only receive events matching these types AND the label filter(s).
2145
+ */
2146
+ eventTypes?: string[];
2147
+ /** Whether the subscription is enabled. */
2148
+ isEnabled?: boolean;
2149
+ target?: WebhookTarget;
2150
+ /** Additional metadata for the subscription. */
2151
+ metadata?: WebhookSubscriptionRequestMetadata;
2152
+ /** Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
2153
+ in addition to the event types. Only events matching both the event types AND this label filter will be delivered.
2154
+ NOTE: Use either (labelKey + labelValue) OR labels, not both.
2155
+ */
2156
+ labelKey?: string;
2157
+ /** Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
2158
+ Only events with this exact label value will be delivered.
2159
+ NOTE: Use either (labelKey + labelValue) OR labels, not both.
2160
+ */
2161
+ labelValue?: string;
2162
+ /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2163
+ an event contains ALL the key-value pairs specified here. Additional labels on
2164
+ the event are allowed and will not prevent matching.
2165
+ NOTE: Use either labels OR (labelKey + labelValue), not both.
2166
+ */
2167
+ labels?: WebhookSubscriptionRequestLabels;
2168
+ });
2169
+ /**
2170
+ * Additional metadata for the subscription.
2171
+ */
2172
+ export type WebhookSubscriptionUpdateRequestMetadata = {
2173
+ [key: string]: unknown;
2174
+ };
2175
+ /**
2176
+ * Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2177
+ an event contains ALL the key-value pairs specified here. Use either labels OR (labelKey + labelValue), not both.
2178
+
2179
+ */
2180
+ export type WebhookSubscriptionUpdateRequestLabels = {
2181
+ [key: string]: string;
2182
+ };
2183
+ /**
2184
+ * Request to update an existing webhook subscription. The update format must match
2185
+ the original subscription format (traditional or multi-label).
2186
+
2187
+ */
2188
+ export type WebhookSubscriptionUpdateRequest = (unknown & {
2189
+ /** Description of the webhook subscription. */
2190
+ description?: string;
2191
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2192
+ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2193
+ */
2194
+ eventTypes?: string[];
2195
+ /** Whether the subscription is enabled. */
2196
+ isEnabled?: boolean;
2197
+ target?: WebhookTarget;
2198
+ /** Additional metadata for the subscription. */
2199
+ metadata?: WebhookSubscriptionUpdateRequestMetadata;
2200
+ /** Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2201
+ */
2202
+ labelKey?: string;
2203
+ /** Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2204
+ */
2205
+ labelValue?: string;
2206
+ /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2207
+ an event contains ALL the key-value pairs specified here. Use either labels OR (labelKey + labelValue), not both.
2208
+ */
2209
+ labels?: WebhookSubscriptionUpdateRequestLabels;
2210
+ }) | (unknown & {
2211
+ /** Description of the webhook subscription. */
2212
+ description?: string;
2213
+ /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2214
+ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2215
+ */
2216
+ eventTypes?: string[];
2217
+ /** Whether the subscription is enabled. */
2218
+ isEnabled?: boolean;
2219
+ target?: WebhookTarget;
2220
+ /** Additional metadata for the subscription. */
2221
+ metadata?: WebhookSubscriptionUpdateRequestMetadata;
2222
+ /** Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2223
+ */
2224
+ labelKey?: string;
2225
+ /** Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2226
+ */
2227
+ labelValue?: string;
2228
+ /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2229
+ an event contains ALL the key-value pairs specified here. Use either labels OR (labelKey + labelValue), not both.
2230
+ */
2231
+ labels?: WebhookSubscriptionUpdateRequestLabels;
2232
+ });
1946
2233
  /**
1947
2234
  * The version of the x402 protocol.
1948
2235
  */
@@ -2062,7 +2349,7 @@ export interface X402PaymentRequirements {
2062
2349
  /** The maximum amount required to pay for the resource in atomic units of the payment asset. */
2063
2350
  maxAmountRequired: string;
2064
2351
  /** The URL of the resource to pay for. */
2065
- resource: string;
2352
+ resource: Url;
2066
2353
  /** The description of the resource. */
2067
2354
  description: string;
2068
2355
  /** The MIME type of the resource response. */
@@ -2104,6 +2391,7 @@ export declare const X402VerifyInvalidReason: {
2104
2391
  readonly invalid_payment_requirements: "invalid_payment_requirements";
2105
2392
  readonly invalid_payload: "invalid_payload";
2106
2393
  readonly invalid_exact_evm_payload_authorization_value: "invalid_exact_evm_payload_authorization_value";
2394
+ readonly invalid_exact_evm_payload_authorization_value_too_low: "invalid_exact_evm_payload_authorization_value_too_low";
2107
2395
  readonly invalid_exact_evm_payload_authorization_valid_after: "invalid_exact_evm_payload_authorization_valid_after";
2108
2396
  readonly invalid_exact_evm_payload_authorization_valid_before: "invalid_exact_evm_payload_authorization_valid_before";
2109
2397
  readonly invalid_exact_evm_payload_authorization_typed_data_message: "invalid_exact_evm_payload_authorization_typed_data_message";
@@ -2129,6 +2417,8 @@ export declare const X402VerifyInvalidReason: {
2129
2417
  readonly invalid_exact_svm_payload_transaction_sender_ata_not_found: "invalid_exact_svm_payload_transaction_sender_ata_not_found";
2130
2418
  readonly invalid_exact_svm_payload_transaction_simulation_failed: "invalid_exact_svm_payload_transaction_simulation_failed";
2131
2419
  readonly invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata: "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata";
2420
+ readonly invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts: "invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts";
2421
+ readonly invalid_exact_svm_payload_transaction_fee_payer_transferring_funds: "invalid_exact_svm_payload_transaction_fee_payer_transferring_funds";
2132
2422
  };
2133
2423
  /**
2134
2424
  * The reason the payment settlement errored on the x402 protocol.
@@ -2271,8 +2561,8 @@ export declare const OnrampPaymentLinkType: {
2271
2561
  Please refer to the [Onramp docs](https://docs.cdp.coinbase.com/onramp-&-offramp/onramp-apis/onramp-overview) for details on how to integrate with the different payment link types.
2272
2562
  */
2273
2563
  export interface OnrampPaymentLink {
2274
- /** The URL to the hosted widget the user should be redirected to. For certain payment link types you can append your own redirect_url query parameter to this URL to ensure the user is redirected back to your app after the widget completes. */
2275
- url: string;
2564
+ /** The URL to the hosted widget the user should be redirected to. For certain payment link types you can append your own redirect_url query parameter to this URL to ensure the user is redirected back to your app after the widget completes. */
2565
+ url: Url;
2276
2566
  paymentLinkType: OnrampPaymentLinkType;
2277
2567
  }
2278
2568
  /**
@@ -2292,7 +2582,7 @@ export declare const OnrampQuotePaymentMethodTypeId: {
2292
2582
  */
2293
2583
  export interface OnrampSession {
2294
2584
  /** Ready-to-use onramp URL. */
2295
- onrampUrl: string;
2585
+ onrampUrl: Url;
2296
2586
  }
2297
2587
  /**
2298
2588
  * Quote information with pricing details for the crypto purchase.
@@ -2410,6 +2700,42 @@ Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/i
2410
2700
 
2411
2701
  */
2412
2702
  export type IdempotencyKeyParameter = string;
2703
+ /**
2704
+ * The number of resources to return per page.
2705
+ */
2706
+ export type PageSizeParameter = number;
2707
+ /**
2708
+ * The token for the next page of resources, if any.
2709
+ */
2710
+ export type PageTokenParameter = string;
2711
+ /**
2712
+ * Configuration for creating an EVM account for the end user.
2713
+ */
2714
+ export type CreateEndUserBodyEvmAccount = {
2715
+ /** 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. */
2716
+ createSmartAccount?: boolean;
2717
+ };
2718
+ /**
2719
+ * Configuration for creating a Solana account for the end user.
2720
+ */
2721
+ export type CreateEndUserBodySolanaAccount = {
2722
+ /** Only false is a valid option since currently smart accounts on Solana are not supported. */
2723
+ createSmartAccount?: boolean;
2724
+ };
2725
+ export type CreateEndUserBody = {
2726
+ /**
2727
+ * A stable, unique identifier for the end user. The `userId` must be unique across all end users in the developer's CDP Project. It must be between 1 and 100 characters long and can only contain alphanumeric characters and hyphens.
2728
+
2729
+ If `userId` is not provided in the request, the server will generate a random UUID.
2730
+ * @pattern ^[a-zA-Z0-9-]{1,100}$
2731
+ */
2732
+ userId?: string;
2733
+ authenticationMethods: AuthenticationMethods;
2734
+ /** Configuration for creating an EVM account for the end user. */
2735
+ evmAccount?: CreateEndUserBodyEvmAccount;
2736
+ /** Configuration for creating a Solana account for the end user. */
2737
+ solanaAccount?: CreateEndUserBodySolanaAccount;
2738
+ };
2413
2739
  export type ListEndUsersParams = {
2414
2740
  /**
2415
2741
  * The number of end users to return per page.
@@ -2443,13 +2769,13 @@ export type ValidateEndUserAccessTokenBody = {
2443
2769
  };
2444
2770
  export type ListEvmAccountsParams = {
2445
2771
  /**
2446
- * The number of accounts to return per page.
2772
+ * The number of resources to return per page.
2447
2773
  */
2448
- pageSize?: number;
2774
+ pageSize?: PageSizeParameter;
2449
2775
  /**
2450
- * The token for the next page of accounts, if any.
2776
+ * The token for the next page of resources, if any.
2451
2777
  */
2452
- pageToken?: string;
2778
+ pageToken?: PageTokenParameter;
2453
2779
  };
2454
2780
  export type ListEvmAccounts200AllOf = {
2455
2781
  /** The list of EVM accounts. */
@@ -2538,13 +2864,13 @@ export type SignEvmTypedData200 = {
2538
2864
  };
2539
2865
  export type ListEvmSmartAccountsParams = {
2540
2866
  /**
2541
- * The number of accounts to return per page.
2867
+ * The number of resources to return per page.
2542
2868
  */
2543
- pageSize?: number;
2869
+ pageSize?: PageSizeParameter;
2544
2870
  /**
2545
- * The token for the next page of accounts, if any.
2871
+ * The token for the next page of resources, if any.
2546
2872
  */
2547
- pageToken?: string;
2873
+ pageToken?: PageTokenParameter;
2548
2874
  };
2549
2875
  export type ListEvmSmartAccounts200AllOf = {
2550
2876
  /** The list of Smart Accounts. */
@@ -2608,14 +2934,19 @@ export type PrepareUserOperationBody = {
2608
2934
  /** The list of calls to make from the Smart Account. */
2609
2935
  calls: EvmCall[];
2610
2936
  /** The URL of the paymaster to use for the user operation. */
2611
- paymasterUrl?: string;
2937
+ paymasterUrl?: Url;
2938
+ /**
2939
+ * The EIP-8021 data suffix (hex-encoded) that enables transaction attribution for the user operation.
2940
+ * @pattern ^0x[0-9a-fA-F]+$
2941
+ */
2942
+ dataSuffix?: string;
2612
2943
  };
2613
2944
  export type PrepareAndSendUserOperationBody = {
2614
2945
  network: EvmUserOperationNetwork;
2615
2946
  /** The list of calls to make from the Smart Account. */
2616
2947
  calls: EvmCall[];
2617
2948
  /** The URL of the paymaster to use for the user operation. */
2618
- paymasterUrl?: string;
2949
+ paymasterUrl?: Url;
2619
2950
  };
2620
2951
  export type SendUserOperationBody = {
2621
2952
  /** The hex-encoded signature of the user operation. This should be a 65-byte signature consisting of the `r`, `s`, and `v` values of the ECDSA signature. Note that the `v` value should conform to the `personal_sign` standard, which means it should be 27 or 28. */
@@ -2687,13 +3018,13 @@ export type CreateEvmSwapQuoteBody = {
2687
3018
  };
2688
3019
  export type ListEvmTokenBalancesParams = {
2689
3020
  /**
2690
- * The number of balances to return per page.
3021
+ * The number of resources to return per page.
2691
3022
  */
2692
- pageSize?: number;
3023
+ pageSize?: PageSizeParameter;
2693
3024
  /**
2694
- * The token for the next page of balances. Will be empty if there are no more balances to fetch.
3025
+ * The token for the next page of resources, if any.
2695
3026
  */
2696
- pageToken?: string;
3027
+ pageToken?: PageTokenParameter;
2697
3028
  };
2698
3029
  export type ListEvmTokenBalances200AllOf = {
2699
3030
  /** The list of EVM token balances. */
@@ -2737,13 +3068,13 @@ export type RequestEvmFaucet200 = {
2737
3068
  };
2738
3069
  export type ListPoliciesParams = {
2739
3070
  /**
2740
- * The number of policies to return per page.
3071
+ * The number of resources to return per page.
2741
3072
  */
2742
- pageSize?: number;
3073
+ pageSize?: PageSizeParameter;
2743
3074
  /**
2744
- * The token for the next page of policies, if any.
3075
+ * The token for the next page of resources, if any.
2745
3076
  */
2746
- pageToken?: string;
3077
+ pageToken?: PageTokenParameter;
2747
3078
  /**
2748
3079
  * The scope of the policies to return. If `project`, the response will include exactly one policy, which is the project-level policy. If `account`, the response will include all account-level policies for the developer's CDP Project.
2749
3080
  */
@@ -2791,13 +3122,13 @@ export type UpdatePolicyBody = {
2791
3122
  };
2792
3123
  export type ListSolanaAccountsParams = {
2793
3124
  /**
2794
- * The number of accounts to return per page.
3125
+ * The number of resources to return per page.
2795
3126
  */
2796
- pageSize?: number;
3127
+ pageSize?: PageSizeParameter;
2797
3128
  /**
2798
- * The token for the next page of accounts, if any.
3129
+ * The token for the next page of resources, if any.
2799
3130
  */
2800
- pageToken?: string;
3131
+ pageToken?: PageTokenParameter;
2801
3132
  };
2802
3133
  export type ListSolanaAccounts200AllOf = {
2803
3134
  /** The list of Solana accounts. */
@@ -2930,19 +3261,29 @@ export type ListSolanaTokenBalances200AllOf = {
2930
3261
  export type ListSolanaTokenBalances200 = ListSolanaTokenBalances200AllOf & ListResponse;
2931
3262
  export type ListDataTokenBalancesParams = {
2932
3263
  /**
2933
- * The number of balances to return per page.
3264
+ * The number of resources to return per page.
2934
3265
  */
2935
- pageSize?: number;
3266
+ pageSize?: PageSizeParameter;
2936
3267
  /**
2937
- * The token for the next page of balances. Will be empty if there are no more balances to fetch.
3268
+ * The token for the next page of resources, if any.
2938
3269
  */
2939
- pageToken?: string;
3270
+ pageToken?: PageTokenParameter;
2940
3271
  };
2941
3272
  export type ListDataTokenBalances200AllOf = {
2942
3273
  /** The list of EVM token balances. */
2943
3274
  balances: TokenBalance[];
2944
3275
  };
2945
3276
  export type ListDataTokenBalances200 = ListDataTokenBalances200AllOf & ListResponse;
3277
+ export type ListWebhookSubscriptionsParams = {
3278
+ /**
3279
+ * The number of subscriptions to return per page.
3280
+ */
3281
+ pageSize?: number;
3282
+ /**
3283
+ * The token for the next page of subscriptions, if any.
3284
+ */
3285
+ pageToken?: string;
3286
+ };
2946
3287
  export type VerifyX402PaymentBody = {
2947
3288
  x402Version: X402Version;
2948
3289
  paymentPayload: X402PaymentPayload;
@@ -3021,10 +3362,14 @@ export type CreateOnrampSessionBody = {
3021
3362
  country?: string;
3022
3363
  /** The ISO 3166-2 two letter state code (e.g. NY). Only required for US. */
3023
3364
  subdivision?: string;
3024
- /** URL to redirect the user to when they successfully complete a transaction. This URL will be embedded in the returned onramp URL as a query parameter. */
3025
- redirectUrl?: string;
3365
+ /** URL to redirect the user to when they successfully complete a transaction. This URL will be embedded in the returned onramp URL as a query parameter. */
3366
+ redirectUrl?: Url;
3026
3367
  /** The IP address of the end user requesting the onramp transaction. */
3027
3368
  clientIp?: string;
3369
+ /** A unique string that represents the user in your app. This can be used to link individual transactions together so you can retrieve the transaction history for your users. Prefix this string with “sandbox-” (e.g. "sandbox-user-1234") to perform a sandbox transaction which will allow you to test your integration without any real transfer of funds.
3370
+
3371
+ This value can be used with with [Onramp User Transactions API](https://docs.cdp.coinbase.com/api-reference/rest-api/onramp-offramp/get-onramp-transactions-by-id) to retrieve all transactions created by the user. */
3372
+ partnerUserRef?: string;
3028
3373
  };
3029
3374
  export type CreateOnrampSession201 = {
3030
3375
  session: OnrampSession;