@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.
- package/CHANGELOG.md +12 -0
- package/README.md +17 -0
- package/_cjs/actions/evm/sendUserOperation.js +1 -0
- package/_cjs/actions/evm/sendUserOperation.js.map +1 -1
- package/_cjs/auth/utils/http.js +2 -1
- package/_cjs/auth/utils/http.js.map +1 -1
- package/_cjs/client/end-user/endUser.js +39 -0
- package/_cjs/client/end-user/endUser.js.map +1 -1
- package/_cjs/client/evm/evm.js +2 -0
- package/_cjs/client/evm/evm.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +19 -2
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js +25 -1
- package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_cjs/openapi-client/generated/onramp/onramp.js +1 -1
- package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +1 -2
- package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +1 -1
- package/_cjs/openapi-client/generated/webhooks/webhooks.js +130 -0
- package/_cjs/openapi-client/generated/webhooks/webhooks.js.map +1 -0
- package/_cjs/openapi-client/index.js +2 -0
- package/_cjs/openapi-client/index.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/actions/evm/sendUserOperation.js +1 -0
- package/_esm/actions/evm/sendUserOperation.js.map +1 -1
- package/_esm/auth/utils/http.js +2 -1
- package/_esm/auth/utils/http.js.map +1 -1
- package/_esm/client/end-user/endUser.js +39 -0
- package/_esm/client/end-user/endUser.js.map +1 -1
- package/_esm/client/evm/evm.js +2 -0
- package/_esm/client/evm/evm.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +17 -0
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js +22 -0
- package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
- package/_esm/openapi-client/generated/onramp/onramp.js +1 -1
- package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +1 -2
- package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +1 -1
- package/_esm/openapi-client/generated/webhooks/webhooks.js +122 -0
- package/_esm/openapi-client/generated/webhooks/webhooks.js.map +1 -0
- package/_esm/openapi-client/index.js +2 -0
- package/_esm/openapi-client/index.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/actions/evm/sendUserOperation.d.ts +2 -0
- package/_types/actions/evm/sendUserOperation.d.ts.map +1 -1
- package/_types/auth/utils/http.d.ts.map +1 -1
- package/_types/client/end-user/endUser.d.ts +30 -1
- package/_types/client/end-user/endUser.d.ts.map +1 -1
- package/_types/client/end-user/endUser.types.d.ts +5 -1
- package/_types/client/end-user/endUser.types.d.ts.map +1 -1
- package/_types/client/evm/evm.d.ts.map +1 -1
- package/_types/client/evm/evm.types.d.ts +2 -0
- package/_types/client/evm/evm.types.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +386 -41
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts +16 -1
- package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts.map +1 -1
- package/_types/openapi-client/generated/onramp/onramp.d.ts +1 -1
- package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts +1 -2
- package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts.map +1 -1
- package/_types/openapi-client/generated/webhooks/webhooks.d.ts +117 -0
- package/_types/openapi-client/generated/webhooks/webhooks.d.ts.map +1 -0
- package/_types/openapi-client/index.d.ts +7 -0
- package/_types/openapi-client/index.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/actions/evm/sendUserOperation.ts +3 -0
- package/auth/utils/http.ts +2 -1
- package/client/end-user/endUser.ts +48 -1
- package/client/end-user/endUser.types.ts +6 -1
- package/client/evm/evm.ts +2 -0
- package/client/evm/evm.types.ts +2 -0
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +407 -41
- package/openapi-client/generated/end-user-accounts/end-user-accounts.ts +31 -0
- package/openapi-client/generated/onramp/onramp.ts +1 -1
- package/openapi-client/generated/sql-api-alpha/sql-api-alpha.ts +1 -2
- package/openapi-client/generated/webhooks/webhooks.ts +185 -0
- package/openapi-client/index.ts +2 -0
- package/package.json +1 -1
- package/version.ts +1 -1
|
@@ -73,13 +73,41 @@ export interface DeveloperJWTAuthentication {
|
|
|
73
73
|
sub: string;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* The type of OAuth2 provider.
|
|
78
|
+
*/
|
|
79
|
+
export type OAuth2ProviderType = (typeof OAuth2ProviderType)[keyof typeof OAuth2ProviderType];
|
|
80
|
+
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
82
|
+
export const OAuth2ProviderType = {
|
|
83
|
+
google: "google",
|
|
84
|
+
apple: "apple",
|
|
85
|
+
x: "x",
|
|
86
|
+
} as const;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Information about an end user who authenticates using a third-party provider.
|
|
90
|
+
*/
|
|
91
|
+
export interface OAuth2Authentication {
|
|
92
|
+
type: OAuth2ProviderType;
|
|
93
|
+
/** The unique identifier for the end user that is captured in the `sub` claim of the JWT. */
|
|
94
|
+
sub: string;
|
|
95
|
+
/** The email address of the end user contained within the user's ID token, if available from third-party OAuth2 provider's token exchange. */
|
|
96
|
+
email?: string;
|
|
97
|
+
/** The full name of the end user if available from third-party OAuth2 provider's token exchange. */
|
|
98
|
+
name?: string;
|
|
99
|
+
/** The username of the end user if available from third-party OAuth2 provider's token exchange. */
|
|
100
|
+
username?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
76
103
|
/**
|
|
77
104
|
* Information about how the end user is authenticated.
|
|
78
105
|
*/
|
|
79
106
|
export type AuthenticationMethod =
|
|
80
107
|
| EmailAuthentication
|
|
81
108
|
| SmsAuthentication
|
|
82
|
-
| DeveloperJWTAuthentication
|
|
109
|
+
| DeveloperJWTAuthentication
|
|
110
|
+
| OAuth2Authentication;
|
|
83
111
|
|
|
84
112
|
/**
|
|
85
113
|
* The list of valid authentication methods linked to the end user.
|
|
@@ -96,12 +124,23 @@ export interface EndUser {
|
|
|
96
124
|
*/
|
|
97
125
|
userId: string;
|
|
98
126
|
authenticationMethods: AuthenticationMethods;
|
|
99
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* **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.
|
|
129
|
+
* @deprecated
|
|
130
|
+
*/
|
|
100
131
|
evmAccounts: string[];
|
|
101
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* **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.
|
|
134
|
+
* @deprecated
|
|
135
|
+
*/
|
|
102
136
|
evmSmartAccounts: string[];
|
|
103
|
-
/**
|
|
137
|
+
/**
|
|
138
|
+
* **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.
|
|
139
|
+
* @deprecated
|
|
140
|
+
*/
|
|
104
141
|
solanaAccounts: string[];
|
|
142
|
+
/** The date and time when the end user was created, in ISO 8601 format. */
|
|
143
|
+
createdAt: string;
|
|
105
144
|
}
|
|
106
145
|
|
|
107
146
|
export interface ListResponse {
|
|
@@ -146,8 +185,24 @@ export const ErrorType = {
|
|
|
146
185
|
recipient_allowlist_violation: "recipient_allowlist_violation",
|
|
147
186
|
recipient_allowlist_pending: "recipient_allowlist_pending",
|
|
148
187
|
travel_rules_recipient_violation: "travel_rules_recipient_violation",
|
|
188
|
+
transfer_amount_out_of_bounds: "transfer_amount_out_of_bounds",
|
|
189
|
+
transfer_recipient_address_invalid: "transfer_recipient_address_invalid",
|
|
190
|
+
transfer_quote_expired: "transfer_quote_expired",
|
|
191
|
+
mfa_already_enrolled: "mfa_already_enrolled",
|
|
192
|
+
mfa_invalid_code: "mfa_invalid_code",
|
|
193
|
+
mfa_flow_expired: "mfa_flow_expired",
|
|
194
|
+
mfa_required: "mfa_required",
|
|
195
|
+
mfa_not_enrolled: "mfa_not_enrolled",
|
|
149
196
|
} as const;
|
|
150
197
|
|
|
198
|
+
/**
|
|
199
|
+
* A valid HTTP or HTTPS URL.
|
|
200
|
+
* @minLength 11
|
|
201
|
+
* @maxLength 2048
|
|
202
|
+
* @pattern ^https?://.*$
|
|
203
|
+
*/
|
|
204
|
+
export type Url = string;
|
|
205
|
+
|
|
151
206
|
/**
|
|
152
207
|
* An error response including the code for the type of error and a human-readable message describing the error.
|
|
153
208
|
*/
|
|
@@ -158,7 +213,7 @@ export interface Error {
|
|
|
158
213
|
/** A unique identifier for the request that generated the error. This can be used to help debug issues with the API. */
|
|
159
214
|
correlationId?: string;
|
|
160
215
|
/** A link to the corresponding error documentation. */
|
|
161
|
-
errorLink?:
|
|
216
|
+
errorLink?: Url;
|
|
162
217
|
}
|
|
163
218
|
|
|
164
219
|
export interface EvmAccount {
|
|
@@ -406,7 +461,7 @@ export interface CreateSpendPermissionRequest {
|
|
|
406
461
|
/** Arbitrary data to include in the permission. */
|
|
407
462
|
extraData?: string;
|
|
408
463
|
/** The paymaster URL of the spend permission. */
|
|
409
|
-
paymasterUrl?:
|
|
464
|
+
paymasterUrl?: Url;
|
|
410
465
|
}
|
|
411
466
|
|
|
412
467
|
/**
|
|
@@ -463,7 +518,7 @@ export interface RevokeSpendPermissionRequest {
|
|
|
463
518
|
/** The hash of the spend permission to revoke. */
|
|
464
519
|
permissionHash: string;
|
|
465
520
|
/** The paymaster URL of the spend permission. */
|
|
466
|
-
paymasterUrl?:
|
|
521
|
+
paymasterUrl?: Url;
|
|
467
522
|
}
|
|
468
523
|
|
|
469
524
|
/**
|
|
@@ -2304,6 +2359,21 @@ export interface SolanaTokenBalance {
|
|
|
2304
2359
|
token: SolanaToken;
|
|
2305
2360
|
}
|
|
2306
2361
|
|
|
2362
|
+
/**
|
|
2363
|
+
* Enables control over how often queries need to be fully re-executed on the backing store.
|
|
2364
|
+
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.
|
|
2365
|
+
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).
|
|
2366
|
+
|
|
2367
|
+
*/
|
|
2368
|
+
export type OnchainDataQueryCache = {
|
|
2369
|
+
/**
|
|
2370
|
+
* 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.
|
|
2371
|
+
* @minimum 500
|
|
2372
|
+
* @maximum 900000
|
|
2373
|
+
*/
|
|
2374
|
+
maxAgeMs?: number;
|
|
2375
|
+
};
|
|
2376
|
+
|
|
2307
2377
|
/**
|
|
2308
2378
|
* Request to execute a SQL query against indexed blockchain data.
|
|
2309
2379
|
*/
|
|
@@ -2311,9 +2381,14 @@ export interface OnchainDataQuery {
|
|
|
2311
2381
|
/**
|
|
2312
2382
|
* SQL query to execute against the indexed blockchain data.
|
|
2313
2383
|
* @minLength 1
|
|
2314
|
-
* @maxLength
|
|
2384
|
+
* @maxLength 100000
|
|
2315
2385
|
*/
|
|
2316
2386
|
sql: string;
|
|
2387
|
+
/** Enables control over how often queries need to be fully re-executed on the backing store.
|
|
2388
|
+
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.
|
|
2389
|
+
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).
|
|
2390
|
+
*/
|
|
2391
|
+
cache?: OnchainDataQueryCache;
|
|
2317
2392
|
}
|
|
2318
2393
|
|
|
2319
2394
|
/**
|
|
@@ -2371,8 +2446,10 @@ export type OnchainDataResultSchema = {
|
|
|
2371
2446
|
* Metadata about query execution.
|
|
2372
2447
|
*/
|
|
2373
2448
|
export type OnchainDataResultMetadata = {
|
|
2374
|
-
/** Whether the result was served from cache. */
|
|
2449
|
+
/** Whether the result was served from the query result cache. */
|
|
2375
2450
|
cached?: boolean;
|
|
2451
|
+
/** When the query result was executed against the backing store in RFC 3339 format. */
|
|
2452
|
+
executionTimestamp?: string;
|
|
2376
2453
|
/** Query execution time in milliseconds. */
|
|
2377
2454
|
executionTimeMs?: number;
|
|
2378
2455
|
/** Number of rows returned. */
|
|
@@ -2407,6 +2484,228 @@ export interface AccountTokenAddressesResponse {
|
|
|
2407
2484
|
totalCount?: number;
|
|
2408
2485
|
}
|
|
2409
2486
|
|
|
2487
|
+
/**
|
|
2488
|
+
* Additional headers to include in webhook requests.
|
|
2489
|
+
*/
|
|
2490
|
+
export type WebhookTargetHeaders = { [key: string]: string };
|
|
2491
|
+
|
|
2492
|
+
/**
|
|
2493
|
+
* Target configuration for webhook delivery.
|
|
2494
|
+
Specifies the destination URL and any custom headers to include in webhook requests.
|
|
2495
|
+
|
|
2496
|
+
*/
|
|
2497
|
+
export interface WebhookTarget {
|
|
2498
|
+
/** The webhook URL to deliver events to. */
|
|
2499
|
+
url: Url;
|
|
2500
|
+
/** Additional headers to include in webhook requests. */
|
|
2501
|
+
headers?: WebhookTargetHeaders;
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
/**
|
|
2505
|
+
* Additional metadata for the subscription.
|
|
2506
|
+
*/
|
|
2507
|
+
export type WebhookSubscriptionResponseMetadata = {
|
|
2508
|
+
/** Secret for webhook signature validation.
|
|
2509
|
+
|
|
2510
|
+
**Note:** Webhooks are in beta and this interface is subject to change.
|
|
2511
|
+
*/
|
|
2512
|
+
secret?: string;
|
|
2513
|
+
};
|
|
2514
|
+
|
|
2515
|
+
/**
|
|
2516
|
+
* Multi-label filters using total overlap logic. Total overlap means the subscription only triggers when events contain ALL these key-value pairs.
|
|
2517
|
+
Present when subscription uses multi-label format.
|
|
2518
|
+
|
|
2519
|
+
*/
|
|
2520
|
+
export type WebhookSubscriptionResponseLabels = { [key: string]: string };
|
|
2521
|
+
|
|
2522
|
+
/**
|
|
2523
|
+
* Response containing webhook subscription details.
|
|
2524
|
+
*/
|
|
2525
|
+
export interface WebhookSubscriptionResponse {
|
|
2526
|
+
/** When the subscription was created. */
|
|
2527
|
+
createdAt: string;
|
|
2528
|
+
/** Description of the webhook subscription. */
|
|
2529
|
+
description?: string;
|
|
2530
|
+
/** Types of events to subscribe to. Event types follow a three-part dot-separated format:
|
|
2531
|
+
service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
|
|
2532
|
+
*/
|
|
2533
|
+
eventTypes: string[];
|
|
2534
|
+
/** Whether the subscription is enabled. */
|
|
2535
|
+
isEnabled: boolean;
|
|
2536
|
+
/** Additional metadata for the subscription. */
|
|
2537
|
+
metadata?: WebhookSubscriptionResponseMetadata;
|
|
2538
|
+
/** Unique identifier for the subscription. */
|
|
2539
|
+
subscriptionId: string;
|
|
2540
|
+
target: WebhookTarget;
|
|
2541
|
+
/** Label key for filtering events. Present when subscription uses traditional single-label format.
|
|
2542
|
+
*/
|
|
2543
|
+
labelKey?: string;
|
|
2544
|
+
/** Label value for filtering events. Present when subscription uses traditional single-label format.
|
|
2545
|
+
*/
|
|
2546
|
+
labelValue?: string;
|
|
2547
|
+
/** Multi-label filters using total overlap logic. Total overlap means the subscription only triggers when events contain ALL these key-value pairs.
|
|
2548
|
+
Present when subscription uses multi-label format.
|
|
2549
|
+
*/
|
|
2550
|
+
labels?: WebhookSubscriptionResponseLabels;
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2553
|
+
/**
|
|
2554
|
+
* Response containing a list of webhook subscriptions.
|
|
2555
|
+
*/
|
|
2556
|
+
export type WebhookSubscriptionListResponseAllOf = {
|
|
2557
|
+
/** The list of webhook subscriptions. */
|
|
2558
|
+
subscriptions: WebhookSubscriptionResponse[];
|
|
2559
|
+
};
|
|
2560
|
+
|
|
2561
|
+
export type WebhookSubscriptionListResponse = WebhookSubscriptionListResponseAllOf & ListResponse;
|
|
2562
|
+
|
|
2563
|
+
/**
|
|
2564
|
+
* Additional metadata for the subscription.
|
|
2565
|
+
*/
|
|
2566
|
+
export type WebhookSubscriptionRequestMetadata = { [key: string]: unknown };
|
|
2567
|
+
|
|
2568
|
+
/**
|
|
2569
|
+
* Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
|
|
2570
|
+
an event contains ALL the key-value pairs specified here. Additional labels on
|
|
2571
|
+
the event are allowed and will not prevent matching.
|
|
2572
|
+
NOTE: Use either labels OR (labelKey + labelValue), not both.
|
|
2573
|
+
|
|
2574
|
+
*/
|
|
2575
|
+
export type WebhookSubscriptionRequestLabels = { [key: string]: string };
|
|
2576
|
+
|
|
2577
|
+
/**
|
|
2578
|
+
* Request to create a new webhook subscription with support for both traditional single-label
|
|
2579
|
+
and multi-label filtering formats.
|
|
2580
|
+
|
|
2581
|
+
*/
|
|
2582
|
+
export type WebhookSubscriptionRequest =
|
|
2583
|
+
| (unknown & {
|
|
2584
|
+
/** Description of the webhook subscription. */
|
|
2585
|
+
description?: string;
|
|
2586
|
+
/** Types of events to subscribe to. Event types follow a three-part dot-separated format:
|
|
2587
|
+
service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
|
|
2588
|
+
The subscription will only receive events matching these types AND the label filter(s).
|
|
2589
|
+
*/
|
|
2590
|
+
eventTypes?: string[];
|
|
2591
|
+
/** Whether the subscription is enabled. */
|
|
2592
|
+
isEnabled?: boolean;
|
|
2593
|
+
target?: WebhookTarget;
|
|
2594
|
+
/** Additional metadata for the subscription. */
|
|
2595
|
+
metadata?: WebhookSubscriptionRequestMetadata;
|
|
2596
|
+
/** Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
|
|
2597
|
+
in addition to the event types. Only events matching both the event types AND this label filter will be delivered.
|
|
2598
|
+
NOTE: Use either (labelKey + labelValue) OR labels, not both.
|
|
2599
|
+
*/
|
|
2600
|
+
labelKey?: string;
|
|
2601
|
+
/** Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
|
|
2602
|
+
Only events with this exact label value will be delivered.
|
|
2603
|
+
NOTE: Use either (labelKey + labelValue) OR labels, not both.
|
|
2604
|
+
*/
|
|
2605
|
+
labelValue?: string;
|
|
2606
|
+
/** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
|
|
2607
|
+
an event contains ALL the key-value pairs specified here. Additional labels on
|
|
2608
|
+
the event are allowed and will not prevent matching.
|
|
2609
|
+
NOTE: Use either labels OR (labelKey + labelValue), not both.
|
|
2610
|
+
*/
|
|
2611
|
+
labels?: WebhookSubscriptionRequestLabels;
|
|
2612
|
+
})
|
|
2613
|
+
| (unknown & {
|
|
2614
|
+
/** Description of the webhook subscription. */
|
|
2615
|
+
description?: string;
|
|
2616
|
+
/** Types of events to subscribe to. Event types follow a three-part dot-separated format:
|
|
2617
|
+
service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
|
|
2618
|
+
The subscription will only receive events matching these types AND the label filter(s).
|
|
2619
|
+
*/
|
|
2620
|
+
eventTypes?: string[];
|
|
2621
|
+
/** Whether the subscription is enabled. */
|
|
2622
|
+
isEnabled?: boolean;
|
|
2623
|
+
target?: WebhookTarget;
|
|
2624
|
+
/** Additional metadata for the subscription. */
|
|
2625
|
+
metadata?: WebhookSubscriptionRequestMetadata;
|
|
2626
|
+
/** Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
|
|
2627
|
+
in addition to the event types. Only events matching both the event types AND this label filter will be delivered.
|
|
2628
|
+
NOTE: Use either (labelKey + labelValue) OR labels, not both.
|
|
2629
|
+
*/
|
|
2630
|
+
labelKey?: string;
|
|
2631
|
+
/** Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
|
|
2632
|
+
Only events with this exact label value will be delivered.
|
|
2633
|
+
NOTE: Use either (labelKey + labelValue) OR labels, not both.
|
|
2634
|
+
*/
|
|
2635
|
+
labelValue?: string;
|
|
2636
|
+
/** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
|
|
2637
|
+
an event contains ALL the key-value pairs specified here. Additional labels on
|
|
2638
|
+
the event are allowed and will not prevent matching.
|
|
2639
|
+
NOTE: Use either labels OR (labelKey + labelValue), not both.
|
|
2640
|
+
*/
|
|
2641
|
+
labels?: WebhookSubscriptionRequestLabels;
|
|
2642
|
+
});
|
|
2643
|
+
|
|
2644
|
+
/**
|
|
2645
|
+
* Additional metadata for the subscription.
|
|
2646
|
+
*/
|
|
2647
|
+
export type WebhookSubscriptionUpdateRequestMetadata = { [key: string]: unknown };
|
|
2648
|
+
|
|
2649
|
+
/**
|
|
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. Use either labels OR (labelKey + labelValue), not both.
|
|
2652
|
+
|
|
2653
|
+
*/
|
|
2654
|
+
export type WebhookSubscriptionUpdateRequestLabels = { [key: string]: string };
|
|
2655
|
+
|
|
2656
|
+
/**
|
|
2657
|
+
* Request to update an existing webhook subscription. The update format must match
|
|
2658
|
+
the original subscription format (traditional or multi-label).
|
|
2659
|
+
|
|
2660
|
+
*/
|
|
2661
|
+
export type WebhookSubscriptionUpdateRequest =
|
|
2662
|
+
| (unknown & {
|
|
2663
|
+
/** Description of the webhook subscription. */
|
|
2664
|
+
description?: string;
|
|
2665
|
+
/** Types of events to subscribe to. Event types follow a three-part dot-separated format:
|
|
2666
|
+
service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
|
|
2667
|
+
*/
|
|
2668
|
+
eventTypes?: string[];
|
|
2669
|
+
/** Whether the subscription is enabled. */
|
|
2670
|
+
isEnabled?: boolean;
|
|
2671
|
+
target?: WebhookTarget;
|
|
2672
|
+
/** Additional metadata for the subscription. */
|
|
2673
|
+
metadata?: WebhookSubscriptionUpdateRequestMetadata;
|
|
2674
|
+
/** Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
|
|
2675
|
+
*/
|
|
2676
|
+
labelKey?: string;
|
|
2677
|
+
/** Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
|
|
2678
|
+
*/
|
|
2679
|
+
labelValue?: string;
|
|
2680
|
+
/** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
|
|
2681
|
+
an event contains ALL the key-value pairs specified here. Use either labels OR (labelKey + labelValue), not both.
|
|
2682
|
+
*/
|
|
2683
|
+
labels?: WebhookSubscriptionUpdateRequestLabels;
|
|
2684
|
+
})
|
|
2685
|
+
| (unknown & {
|
|
2686
|
+
/** Description of the webhook subscription. */
|
|
2687
|
+
description?: string;
|
|
2688
|
+
/** Types of events to subscribe to. Event types follow a three-part dot-separated format:
|
|
2689
|
+
service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
|
|
2690
|
+
*/
|
|
2691
|
+
eventTypes?: string[];
|
|
2692
|
+
/** Whether the subscription is enabled. */
|
|
2693
|
+
isEnabled?: boolean;
|
|
2694
|
+
target?: WebhookTarget;
|
|
2695
|
+
/** Additional metadata for the subscription. */
|
|
2696
|
+
metadata?: WebhookSubscriptionUpdateRequestMetadata;
|
|
2697
|
+
/** Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
|
|
2698
|
+
*/
|
|
2699
|
+
labelKey?: string;
|
|
2700
|
+
/** Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
|
|
2701
|
+
*/
|
|
2702
|
+
labelValue?: string;
|
|
2703
|
+
/** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
|
|
2704
|
+
an event contains ALL the key-value pairs specified here. Use either labels OR (labelKey + labelValue), not both.
|
|
2705
|
+
*/
|
|
2706
|
+
labels?: WebhookSubscriptionUpdateRequestLabels;
|
|
2707
|
+
});
|
|
2708
|
+
|
|
2410
2709
|
/**
|
|
2411
2710
|
* The version of the x402 protocol.
|
|
2412
2711
|
*/
|
|
@@ -2548,7 +2847,7 @@ export interface X402PaymentRequirements {
|
|
|
2548
2847
|
/** The maximum amount required to pay for the resource in atomic units of the payment asset. */
|
|
2549
2848
|
maxAmountRequired: string;
|
|
2550
2849
|
/** The URL of the resource to pay for. */
|
|
2551
|
-
resource:
|
|
2850
|
+
resource: Url;
|
|
2552
2851
|
/** The description of the resource. */
|
|
2553
2852
|
description: string;
|
|
2554
2853
|
/** The MIME type of the resource response. */
|
|
@@ -2594,6 +2893,8 @@ export const X402VerifyInvalidReason = {
|
|
|
2594
2893
|
invalid_payment_requirements: "invalid_payment_requirements",
|
|
2595
2894
|
invalid_payload: "invalid_payload",
|
|
2596
2895
|
invalid_exact_evm_payload_authorization_value: "invalid_exact_evm_payload_authorization_value",
|
|
2896
|
+
invalid_exact_evm_payload_authorization_value_too_low:
|
|
2897
|
+
"invalid_exact_evm_payload_authorization_value_too_low",
|
|
2597
2898
|
invalid_exact_evm_payload_authorization_valid_after:
|
|
2598
2899
|
"invalid_exact_evm_payload_authorization_valid_after",
|
|
2599
2900
|
invalid_exact_evm_payload_authorization_valid_before:
|
|
@@ -2641,6 +2942,10 @@ export const X402VerifyInvalidReason = {
|
|
|
2641
2942
|
"invalid_exact_svm_payload_transaction_simulation_failed",
|
|
2642
2943
|
invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata:
|
|
2643
2944
|
"invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata",
|
|
2945
|
+
invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts:
|
|
2946
|
+
"invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts",
|
|
2947
|
+
invalid_exact_svm_payload_transaction_fee_payer_transferring_funds:
|
|
2948
|
+
"invalid_exact_svm_payload_transaction_fee_payer_transferring_funds",
|
|
2644
2949
|
} as const;
|
|
2645
2950
|
|
|
2646
2951
|
/**
|
|
@@ -2818,8 +3123,8 @@ export const OnrampPaymentLinkType = {
|
|
|
2818
3123
|
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.
|
|
2819
3124
|
*/
|
|
2820
3125
|
export interface OnrampPaymentLink {
|
|
2821
|
-
/** The URL to the hosted widget the user should be redirected to. For certain payment link types you can append your
|
|
2822
|
-
url:
|
|
3126
|
+
/** 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. */
|
|
3127
|
+
url: Url;
|
|
2823
3128
|
paymentLinkType: OnrampPaymentLinkType;
|
|
2824
3129
|
}
|
|
2825
3130
|
|
|
@@ -2844,7 +3149,7 @@ export const OnrampQuotePaymentMethodTypeId = {
|
|
|
2844
3149
|
*/
|
|
2845
3150
|
export interface OnrampSession {
|
|
2846
3151
|
/** Ready-to-use onramp URL. */
|
|
2847
|
-
onrampUrl:
|
|
3152
|
+
onrampUrl: Url;
|
|
2848
3153
|
}
|
|
2849
3154
|
|
|
2850
3155
|
/**
|
|
@@ -2979,6 +3284,47 @@ Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/i
|
|
|
2979
3284
|
*/
|
|
2980
3285
|
export type IdempotencyKeyParameter = string;
|
|
2981
3286
|
|
|
3287
|
+
/**
|
|
3288
|
+
* The number of resources to return per page.
|
|
3289
|
+
*/
|
|
3290
|
+
export type PageSizeParameter = number;
|
|
3291
|
+
|
|
3292
|
+
/**
|
|
3293
|
+
* The token for the next page of resources, if any.
|
|
3294
|
+
*/
|
|
3295
|
+
export type PageTokenParameter = string;
|
|
3296
|
+
|
|
3297
|
+
/**
|
|
3298
|
+
* Configuration for creating an EVM account for the end user.
|
|
3299
|
+
*/
|
|
3300
|
+
export type CreateEndUserBodyEvmAccount = {
|
|
3301
|
+
/** 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. */
|
|
3302
|
+
createSmartAccount?: boolean;
|
|
3303
|
+
};
|
|
3304
|
+
|
|
3305
|
+
/**
|
|
3306
|
+
* Configuration for creating a Solana account for the end user.
|
|
3307
|
+
*/
|
|
3308
|
+
export type CreateEndUserBodySolanaAccount = {
|
|
3309
|
+
/** Only false is a valid option since currently smart accounts on Solana are not supported. */
|
|
3310
|
+
createSmartAccount?: boolean;
|
|
3311
|
+
};
|
|
3312
|
+
|
|
3313
|
+
export type CreateEndUserBody = {
|
|
3314
|
+
/**
|
|
3315
|
+
* 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.
|
|
3316
|
+
|
|
3317
|
+
If `userId` is not provided in the request, the server will generate a random UUID.
|
|
3318
|
+
* @pattern ^[a-zA-Z0-9-]{1,100}$
|
|
3319
|
+
*/
|
|
3320
|
+
userId?: string;
|
|
3321
|
+
authenticationMethods: AuthenticationMethods;
|
|
3322
|
+
/** Configuration for creating an EVM account for the end user. */
|
|
3323
|
+
evmAccount?: CreateEndUserBodyEvmAccount;
|
|
3324
|
+
/** Configuration for creating a Solana account for the end user. */
|
|
3325
|
+
solanaAccount?: CreateEndUserBodySolanaAccount;
|
|
3326
|
+
};
|
|
3327
|
+
|
|
2982
3328
|
export type ListEndUsersParams = {
|
|
2983
3329
|
/**
|
|
2984
3330
|
* The number of end users to return per page.
|
|
@@ -3019,13 +3365,13 @@ export type ValidateEndUserAccessTokenBody = {
|
|
|
3019
3365
|
|
|
3020
3366
|
export type ListEvmAccountsParams = {
|
|
3021
3367
|
/**
|
|
3022
|
-
* The number of
|
|
3368
|
+
* The number of resources to return per page.
|
|
3023
3369
|
*/
|
|
3024
|
-
pageSize?:
|
|
3370
|
+
pageSize?: PageSizeParameter;
|
|
3025
3371
|
/**
|
|
3026
|
-
* The token for the next page of
|
|
3372
|
+
* The token for the next page of resources, if any.
|
|
3027
3373
|
*/
|
|
3028
|
-
pageToken?:
|
|
3374
|
+
pageToken?: PageTokenParameter;
|
|
3029
3375
|
};
|
|
3030
3376
|
|
|
3031
3377
|
export type ListEvmAccounts200AllOf = {
|
|
@@ -3132,13 +3478,13 @@ export type SignEvmTypedData200 = {
|
|
|
3132
3478
|
|
|
3133
3479
|
export type ListEvmSmartAccountsParams = {
|
|
3134
3480
|
/**
|
|
3135
|
-
* The number of
|
|
3481
|
+
* The number of resources to return per page.
|
|
3136
3482
|
*/
|
|
3137
|
-
pageSize?:
|
|
3483
|
+
pageSize?: PageSizeParameter;
|
|
3138
3484
|
/**
|
|
3139
|
-
* The token for the next page of
|
|
3485
|
+
* The token for the next page of resources, if any.
|
|
3140
3486
|
*/
|
|
3141
|
-
pageToken?:
|
|
3487
|
+
pageToken?: PageTokenParameter;
|
|
3142
3488
|
};
|
|
3143
3489
|
|
|
3144
3490
|
export type ListEvmSmartAccounts200AllOf = {
|
|
@@ -3212,7 +3558,12 @@ export type PrepareUserOperationBody = {
|
|
|
3212
3558
|
/** The list of calls to make from the Smart Account. */
|
|
3213
3559
|
calls: EvmCall[];
|
|
3214
3560
|
/** The URL of the paymaster to use for the user operation. */
|
|
3215
|
-
paymasterUrl?:
|
|
3561
|
+
paymasterUrl?: Url;
|
|
3562
|
+
/**
|
|
3563
|
+
* The EIP-8021 data suffix (hex-encoded) that enables transaction attribution for the user operation.
|
|
3564
|
+
* @pattern ^0x[0-9a-fA-F]+$
|
|
3565
|
+
*/
|
|
3566
|
+
dataSuffix?: string;
|
|
3216
3567
|
};
|
|
3217
3568
|
|
|
3218
3569
|
export type PrepareAndSendUserOperationBody = {
|
|
@@ -3220,7 +3571,7 @@ export type PrepareAndSendUserOperationBody = {
|
|
|
3220
3571
|
/** The list of calls to make from the Smart Account. */
|
|
3221
3572
|
calls: EvmCall[];
|
|
3222
3573
|
/** The URL of the paymaster to use for the user operation. */
|
|
3223
|
-
paymasterUrl?:
|
|
3574
|
+
paymasterUrl?: Url;
|
|
3224
3575
|
};
|
|
3225
3576
|
|
|
3226
3577
|
export type SendUserOperationBody = {
|
|
@@ -3299,13 +3650,13 @@ export type CreateEvmSwapQuoteBody = {
|
|
|
3299
3650
|
|
|
3300
3651
|
export type ListEvmTokenBalancesParams = {
|
|
3301
3652
|
/**
|
|
3302
|
-
* The number of
|
|
3653
|
+
* The number of resources to return per page.
|
|
3303
3654
|
*/
|
|
3304
|
-
pageSize?:
|
|
3655
|
+
pageSize?: PageSizeParameter;
|
|
3305
3656
|
/**
|
|
3306
|
-
* The token for the next page of
|
|
3657
|
+
* The token for the next page of resources, if any.
|
|
3307
3658
|
*/
|
|
3308
|
-
pageToken?:
|
|
3659
|
+
pageToken?: PageTokenParameter;
|
|
3309
3660
|
};
|
|
3310
3661
|
|
|
3311
3662
|
export type ListEvmTokenBalances200AllOf = {
|
|
@@ -3362,13 +3713,13 @@ export type RequestEvmFaucet200 = {
|
|
|
3362
3713
|
|
|
3363
3714
|
export type ListPoliciesParams = {
|
|
3364
3715
|
/**
|
|
3365
|
-
* The number of
|
|
3716
|
+
* The number of resources to return per page.
|
|
3366
3717
|
*/
|
|
3367
|
-
pageSize?:
|
|
3718
|
+
pageSize?: PageSizeParameter;
|
|
3368
3719
|
/**
|
|
3369
|
-
* The token for the next page of
|
|
3720
|
+
* The token for the next page of resources, if any.
|
|
3370
3721
|
*/
|
|
3371
|
-
pageToken?:
|
|
3722
|
+
pageToken?: PageTokenParameter;
|
|
3372
3723
|
/**
|
|
3373
3724
|
* 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.
|
|
3374
3725
|
*/
|
|
@@ -3428,13 +3779,13 @@ Policy descriptions can consist of alphanumeric characters, spaces, commas, and
|
|
|
3428
3779
|
|
|
3429
3780
|
export type ListSolanaAccountsParams = {
|
|
3430
3781
|
/**
|
|
3431
|
-
* The number of
|
|
3782
|
+
* The number of resources to return per page.
|
|
3432
3783
|
*/
|
|
3433
|
-
pageSize?:
|
|
3784
|
+
pageSize?: PageSizeParameter;
|
|
3434
3785
|
/**
|
|
3435
|
-
* The token for the next page of
|
|
3786
|
+
* The token for the next page of resources, if any.
|
|
3436
3787
|
*/
|
|
3437
|
-
pageToken?:
|
|
3788
|
+
pageToken?: PageTokenParameter;
|
|
3438
3789
|
};
|
|
3439
3790
|
|
|
3440
3791
|
export type ListSolanaAccounts200AllOf = {
|
|
@@ -3596,13 +3947,13 @@ export type ListSolanaTokenBalances200 = ListSolanaTokenBalances200AllOf & ListR
|
|
|
3596
3947
|
|
|
3597
3948
|
export type ListDataTokenBalancesParams = {
|
|
3598
3949
|
/**
|
|
3599
|
-
* The number of
|
|
3950
|
+
* The number of resources to return per page.
|
|
3600
3951
|
*/
|
|
3601
|
-
pageSize?:
|
|
3952
|
+
pageSize?: PageSizeParameter;
|
|
3602
3953
|
/**
|
|
3603
|
-
* The token for the next page of
|
|
3954
|
+
* The token for the next page of resources, if any.
|
|
3604
3955
|
*/
|
|
3605
|
-
pageToken?:
|
|
3956
|
+
pageToken?: PageTokenParameter;
|
|
3606
3957
|
};
|
|
3607
3958
|
|
|
3608
3959
|
export type ListDataTokenBalances200AllOf = {
|
|
@@ -3612,6 +3963,17 @@ export type ListDataTokenBalances200AllOf = {
|
|
|
3612
3963
|
|
|
3613
3964
|
export type ListDataTokenBalances200 = ListDataTokenBalances200AllOf & ListResponse;
|
|
3614
3965
|
|
|
3966
|
+
export type ListWebhookSubscriptionsParams = {
|
|
3967
|
+
/**
|
|
3968
|
+
* The number of subscriptions to return per page.
|
|
3969
|
+
*/
|
|
3970
|
+
pageSize?: number;
|
|
3971
|
+
/**
|
|
3972
|
+
* The token for the next page of subscriptions, if any.
|
|
3973
|
+
*/
|
|
3974
|
+
pageToken?: string;
|
|
3975
|
+
};
|
|
3976
|
+
|
|
3615
3977
|
export type VerifyX402PaymentBody = {
|
|
3616
3978
|
x402Version: X402Version;
|
|
3617
3979
|
paymentPayload: X402PaymentPayload;
|
|
@@ -3695,10 +4057,14 @@ Use the [Onramp Buy Options API](https://docs.cdp.coinbase.com/api-reference/res
|
|
|
3695
4057
|
country?: string;
|
|
3696
4058
|
/** The ISO 3166-2 two letter state code (e.g. NY). Only required for US. */
|
|
3697
4059
|
subdivision?: string;
|
|
3698
|
-
/** URL to redirect the user to when they successfully complete a transaction. This URL will be
|
|
3699
|
-
redirectUrl?:
|
|
4060
|
+
/** 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. */
|
|
4061
|
+
redirectUrl?: Url;
|
|
3700
4062
|
/** The IP address of the end user requesting the onramp transaction. */
|
|
3701
4063
|
clientIp?: string;
|
|
4064
|
+
/** 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.
|
|
4065
|
+
|
|
4066
|
+
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. */
|
|
4067
|
+
partnerUserRef?: string;
|
|
3702
4068
|
};
|
|
3703
4069
|
|
|
3704
4070
|
export type CreateOnrampSession201 = {
|