@coinbase/cdp-sdk 1.46.1 → 1.48.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 (125) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +332 -0
  3. package/_cjs/actions/solana/sendTransaction.js +3 -0
  4. package/_cjs/actions/solana/sendTransaction.js.map +1 -1
  5. package/_cjs/actions/webhooks/createWebhookSubscription.js +48 -0
  6. package/_cjs/actions/webhooks/createWebhookSubscription.js.map +1 -0
  7. package/_cjs/actions/webhooks/index.js +6 -0
  8. package/_cjs/actions/webhooks/index.js.map +1 -0
  9. package/_cjs/client/cdp.js +5 -4
  10. package/_cjs/client/cdp.js.map +1 -1
  11. package/_cjs/client/end-user/endUser.js +19 -89
  12. package/_cjs/client/end-user/endUser.js.map +1 -1
  13. package/_cjs/client/end-user/toEndUserAccount.js +13 -43
  14. package/_cjs/client/end-user/toEndUserAccount.js.map +1 -1
  15. package/_cjs/client/solana/solana.js +2 -0
  16. package/_cjs/client/solana/solana.js.map +1 -1
  17. package/_cjs/client/webhooks/webhooks.js +58 -0
  18. package/_cjs/client/webhooks/webhooks.js.map +1 -0
  19. package/_cjs/index.js.map +1 -1
  20. package/_cjs/openapi-client/cdpApiClient.js +0 -32
  21. package/_cjs/openapi-client/cdpApiClient.js.map +1 -1
  22. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +51 -11
  23. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  24. package/_cjs/openapi-client/generated/{embedded-wallets-core-functionality/embedded-wallets-core-functionality.js → embedded-wallets/embedded-wallets.js} +37 -65
  25. package/_cjs/openapi-client/generated/embedded-wallets/embedded-wallets.js.map +1 -0
  26. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +2 -2
  27. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  28. package/_cjs/openapi-client/generated/sql-api/sql-api.js +12 -1
  29. package/_cjs/openapi-client/generated/sql-api/sql-api.js.map +1 -1
  30. package/_cjs/openapi-client/generated/webhooks/webhooks.js +32 -5
  31. package/_cjs/openapi-client/generated/webhooks/webhooks.js.map +1 -1
  32. package/_cjs/openapi-client/index.js +2 -2
  33. package/_cjs/openapi-client/index.js.map +1 -1
  34. package/_cjs/version.js +1 -1
  35. package/_esm/actions/solana/sendTransaction.js +3 -0
  36. package/_esm/actions/solana/sendTransaction.js.map +1 -1
  37. package/_esm/actions/webhooks/createWebhookSubscription.js +45 -0
  38. package/_esm/actions/webhooks/createWebhookSubscription.js.map +1 -0
  39. package/_esm/actions/webhooks/index.js +2 -0
  40. package/_esm/actions/webhooks/index.js.map +1 -0
  41. package/_esm/client/cdp.js +6 -5
  42. package/_esm/client/cdp.js.map +1 -1
  43. package/_esm/client/end-user/endUser.js +17 -87
  44. package/_esm/client/end-user/endUser.js.map +1 -1
  45. package/_esm/client/end-user/toEndUserAccount.js +13 -43
  46. package/_esm/client/end-user/toEndUserAccount.js.map +1 -1
  47. package/_esm/client/solana/solana.js +2 -0
  48. package/_esm/client/solana/solana.js.map +1 -1
  49. package/_esm/client/webhooks/webhooks.js +54 -0
  50. package/_esm/client/webhooks/webhooks.js.map +1 -0
  51. package/_esm/index.js.map +1 -1
  52. package/_esm/openapi-client/cdpApiClient.js +0 -32
  53. package/_esm/openapi-client/cdpApiClient.js.map +1 -1
  54. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +48 -8
  55. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  56. package/_esm/openapi-client/generated/{embedded-wallets-core-functionality/embedded-wallets-core-functionality.js → embedded-wallets/embedded-wallets.js} +36 -61
  57. package/_esm/openapi-client/generated/embedded-wallets/embedded-wallets.js.map +1 -0
  58. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +2 -2
  59. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  60. package/_esm/openapi-client/generated/sql-api/sql-api.js +10 -0
  61. package/_esm/openapi-client/generated/sql-api/sql-api.js.map +1 -1
  62. package/_esm/openapi-client/generated/webhooks/webhooks.js +30 -4
  63. package/_esm/openapi-client/generated/webhooks/webhooks.js.map +1 -1
  64. package/_esm/openapi-client/index.js +2 -2
  65. package/_esm/openapi-client/index.js.map +1 -1
  66. package/_esm/version.js +1 -1
  67. package/_types/actions/solana/sendTransaction.d.ts +2 -0
  68. package/_types/actions/solana/sendTransaction.d.ts.map +1 -1
  69. package/_types/actions/webhooks/createWebhookSubscription.d.ts +68 -0
  70. package/_types/actions/webhooks/createWebhookSubscription.d.ts.map +1 -0
  71. package/_types/actions/webhooks/index.d.ts +2 -0
  72. package/_types/actions/webhooks/index.d.ts.map +1 -0
  73. package/_types/client/cdp.d.ts +5 -6
  74. package/_types/client/cdp.d.ts.map +1 -1
  75. package/_types/client/end-user/endUser.d.ts +2 -52
  76. package/_types/client/end-user/endUser.d.ts.map +1 -1
  77. package/_types/client/end-user/endUser.types.d.ts +1 -63
  78. package/_types/client/end-user/endUser.types.d.ts.map +1 -1
  79. package/_types/client/end-user/toEndUserAccount.d.ts +0 -2
  80. package/_types/client/end-user/toEndUserAccount.d.ts.map +1 -1
  81. package/_types/client/solana/solana.d.ts +2 -0
  82. package/_types/client/solana/solana.d.ts.map +1 -1
  83. package/_types/client/solana/solana.types.d.ts +2 -0
  84. package/_types/client/solana/solana.types.d.ts.map +1 -1
  85. package/_types/client/webhooks/webhooks.d.ts +41 -0
  86. package/_types/client/webhooks/webhooks.d.ts.map +1 -0
  87. package/_types/index.d.ts +2 -1
  88. package/_types/index.d.ts.map +1 -1
  89. package/_types/openapi-client/cdpApiClient.d.ts.map +1 -1
  90. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +285 -85
  91. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  92. package/_types/openapi-client/generated/{embedded-wallets-core-functionality/embedded-wallets-core-functionality.d.ts → embedded-wallets/embedded-wallets.d.ts} +14 -32
  93. package/_types/openapi-client/generated/embedded-wallets/embedded-wallets.d.ts.map +1 -0
  94. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +2 -2
  95. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
  96. package/_types/openapi-client/generated/sql-api/sql-api.d.ts +10 -1
  97. package/_types/openapi-client/generated/sql-api/sql-api.d.ts.map +1 -1
  98. package/_types/openapi-client/generated/webhooks/webhooks.d.ts +30 -5
  99. package/_types/openapi-client/generated/webhooks/webhooks.d.ts.map +1 -1
  100. package/_types/openapi-client/index.d.ts +16 -18
  101. package/_types/openapi-client/index.d.ts.map +1 -1
  102. package/_types/version.d.ts +1 -1
  103. package/actions/solana/sendTransaction.ts +3 -0
  104. package/actions/webhooks/createWebhookSubscription.ts +104 -0
  105. package/actions/webhooks/index.ts +6 -0
  106. package/client/cdp.ts +8 -8
  107. package/client/end-user/endUser.ts +55 -187
  108. package/client/end-user/endUser.types.ts +0 -72
  109. package/client/end-user/toEndUserAccount.ts +57 -152
  110. package/client/solana/solana.ts +2 -0
  111. package/client/solana/solana.types.ts +2 -0
  112. package/client/webhooks/webhooks.ts +61 -0
  113. package/index.ts +6 -4
  114. package/openapi-client/cdpApiClient.ts +0 -34
  115. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +331 -93
  116. package/openapi-client/generated/{embedded-wallets-core-functionality/embedded-wallets-core-functionality.ts → embedded-wallets/embedded-wallets.ts} +45 -99
  117. package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +3 -3
  118. package/openapi-client/generated/sql-api/sql-api.ts +19 -0
  119. package/openapi-client/generated/webhooks/webhooks.ts +42 -4
  120. package/openapi-client/index.ts +2 -2
  121. package/package.json +1 -1
  122. package/version.ts +1 -1
  123. package/_cjs/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js.map +0 -1
  124. package/_esm/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js.map +0 -1
  125. package/_types/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.d.ts.map +0 -1
@@ -121,6 +121,34 @@ export interface TelegramAuthentication {
121
121
  username?: string;
122
122
  }
123
123
 
124
+ /**
125
+ * A blockchain address. Format varies by network (e.g., 0x-prefixed for EVM, base58 for Solana).
126
+ * @minLength 1
127
+ * @maxLength 128
128
+ */
129
+ export type BlockchainAddress = string;
130
+
131
+ /**
132
+ * The type of authentication information.
133
+ */
134
+ export type SiweAuthenticationType =
135
+ (typeof SiweAuthenticationType)[keyof typeof SiweAuthenticationType];
136
+
137
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
138
+ export const SiweAuthenticationType = {
139
+ siwe: "siwe",
140
+ } as const;
141
+
142
+ /**
143
+ * Information about an end user who authenticates using Sign In With Ethereum (EIP-4361).
144
+ */
145
+ export interface SiweAuthentication {
146
+ /** The type of authentication information. */
147
+ type: SiweAuthenticationType;
148
+ /** The ERC-55 checksummed Ethereum address of the end user. */
149
+ address: BlockchainAddress;
150
+ }
151
+
124
152
  /**
125
153
  * Information about how the end user is authenticated.
126
154
  */
@@ -129,7 +157,8 @@ export type AuthenticationMethod =
129
157
  | SmsAuthentication
130
158
  | DeveloperJWTAuthentication
131
159
  | OAuth2Authentication
132
- | TelegramAuthentication;
160
+ | TelegramAuthentication
161
+ | SiweAuthentication;
133
162
 
134
163
  /**
135
164
  * The list of valid authentication methods linked to the end user.
@@ -338,13 +367,6 @@ export interface Error {
338
367
  errorLink?: Url;
339
368
  }
340
369
 
341
- /**
342
- * A blockchain address. Format varies by network (e.g., 0x-prefixed for EVM, base58 for Solana).
343
- * @minLength 1
344
- * @maxLength 128
345
- */
346
- export type BlockchainAddress = string;
347
-
348
370
  /**
349
371
  * The symbol of the asset (e.g., eth, usd, usdc, usdt).
350
372
  * @minLength 1
@@ -524,42 +546,6 @@ export interface EvmUserOperation {
524
546
  receipts?: UserOperationReceipt[];
525
547
  }
526
548
 
527
- /**
528
- * The network the spend permission is on.
529
- */
530
- export type SpendPermissionNetwork =
531
- (typeof SpendPermissionNetwork)[keyof typeof SpendPermissionNetwork];
532
-
533
- // eslint-disable-next-line @typescript-eslint/no-redeclare
534
- export const SpendPermissionNetwork = {
535
- base: "base",
536
- "base-sepolia": "base-sepolia",
537
- ethereum: "ethereum",
538
- "ethereum-sepolia": "ethereum-sepolia",
539
- optimism: "optimism",
540
- arbitrum: "arbitrum",
541
- avalanche: "avalanche",
542
- polygon: "polygon",
543
- } as const;
544
-
545
- /**
546
- * Request parameters for revoking a Spend Permission.
547
- */
548
- export interface RevokeSpendPermissionRequest {
549
- /**
550
- * The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
551
- * @pattern ^[a-zA-Z0-9-]{1,100}$
552
- */
553
- walletSecretId: string;
554
- network: SpendPermissionNetwork;
555
- /** The hash of the spend permission to revoke. */
556
- permissionHash: string;
557
- /** Whether to use the CDP Paymaster for the user operation. */
558
- useCdpPaymaster: boolean;
559
- /** The paymaster URL of the spend permission. */
560
- paymasterUrl?: Url;
561
- }
562
-
563
549
  export interface EvmAccount {
564
550
  /**
565
551
  * The 0x-prefixed, checksum EVM address.
@@ -642,6 +628,24 @@ Account names are guaranteed to be unique across all Smart Accounts in the devel
642
628
  updatedAt?: string;
643
629
  }
644
630
 
631
+ /**
632
+ * The network the spend permission is on.
633
+ */
634
+ export type SpendPermissionNetwork =
635
+ (typeof SpendPermissionNetwork)[keyof typeof SpendPermissionNetwork];
636
+
637
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
638
+ export const SpendPermissionNetwork = {
639
+ base: "base",
640
+ "base-sepolia": "base-sepolia",
641
+ ethereum: "ethereum",
642
+ "ethereum-sepolia": "ethereum-sepolia",
643
+ optimism: "optimism",
644
+ arbitrum: "arbitrum",
645
+ avalanche: "avalanche",
646
+ polygon: "polygon",
647
+ } as const;
648
+
645
649
  /**
646
650
  * Request parameters for creating a Spend Permission.
647
651
  */
@@ -722,7 +726,7 @@ export interface SpendPermissionResponseObject {
722
726
  /**
723
727
  * Request parameters for revoking a Spend Permission.
724
728
  */
725
- export interface EvmSpendPermissionsRevokeSpendPermissionRequest {
729
+ export interface RevokeSpendPermissionRequest {
726
730
  network: SpendPermissionNetwork;
727
731
  /** The hash of the spend permission to revoke. */
728
732
  permissionHash: string;
@@ -1442,8 +1446,11 @@ export const EvmNetworkCriterionNetworksItem = {
1442
1446
  polygon: "polygon",
1443
1447
  optimism: "optimism",
1444
1448
  arbitrum: "arbitrum",
1449
+ "arbitrum-sepolia": "arbitrum-sepolia",
1445
1450
  zora: "zora",
1446
1451
  bnb: "bnb",
1452
+ world: "world",
1453
+ "world-sepolia": "world-sepolia",
1447
1454
  } as const;
1448
1455
 
1449
1456
  /**
@@ -2609,6 +2616,36 @@ export interface SignEndUserEvmTypedDataRule {
2609
2616
  criteria: SignEndUserEvmTypedDataCriteria;
2610
2617
  }
2611
2618
 
2619
+ /**
2620
+ * Whether any attempts to sign a hash will be accepted or rejected. This rule does not accept any criteria.
2621
+ */
2622
+ export type SignEndUserEvmHashRuleAction =
2623
+ (typeof SignEndUserEvmHashRuleAction)[keyof typeof SignEndUserEvmHashRuleAction];
2624
+
2625
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
2626
+ export const SignEndUserEvmHashRuleAction = {
2627
+ reject: "reject",
2628
+ accept: "accept",
2629
+ } as const;
2630
+
2631
+ /**
2632
+ * The operation to which the rule applies.
2633
+ */
2634
+ export type SignEndUserEvmHashRuleOperation =
2635
+ (typeof SignEndUserEvmHashRuleOperation)[keyof typeof SignEndUserEvmHashRuleOperation];
2636
+
2637
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
2638
+ export const SignEndUserEvmHashRuleOperation = {
2639
+ signEndUserEvmHash: "signEndUserEvmHash",
2640
+ } as const;
2641
+
2642
+ export interface SignEndUserEvmHashRule {
2643
+ /** Whether any attempts to sign a hash will be accepted or rejected. This rule does not accept any criteria. */
2644
+ action: SignEndUserEvmHashRuleAction;
2645
+ /** The operation to which the rule applies. */
2646
+ operation: SignEndUserEvmHashRuleOperation;
2647
+ }
2648
+
2612
2649
  export type SignEndUserSolTransactionCriteriaItem =
2613
2650
  | SolAddressCriterion
2614
2651
  | SolValueCriterion
@@ -2754,6 +2791,7 @@ export type Rule =
2754
2791
  | SendEndUserEvmTransactionRule
2755
2792
  | SignEndUserEvmMessageRule
2756
2793
  | SignEndUserEvmTypedDataRule
2794
+ | SignEndUserEvmHashRule
2757
2795
  | SignEndUserSolTransactionRule
2758
2796
  | SendEndUserSolTransactionRule
2759
2797
  | SignEndUserSolMessageRule;
@@ -2975,6 +3013,49 @@ export interface OnchainDataResult {
2975
3013
  metadata?: OnchainDataResultMetadata;
2976
3014
  }
2977
3015
 
3016
+ /**
3017
+ * A human-readable description.
3018
+ * @minLength 0
3019
+ * @maxLength 500
3020
+ */
3021
+ export type Description = string;
3022
+
3023
+ /**
3024
+ * Schema definition for a table column.
3025
+ */
3026
+ export interface OnchainDataColumnSchema {
3027
+ /** Column name. */
3028
+ name?: string;
3029
+ /** Column data type. */
3030
+ type?: string;
3031
+ /** Whether this column can contain NULL values. */
3032
+ nullable?: boolean;
3033
+ /** Human-readable description of the column. */
3034
+ description?: Description;
3035
+ /** The order of the column in the index. A lower number means the column is more important for the index and should be first in the query. */
3036
+ indexOrder?: number;
3037
+ }
3038
+
3039
+ /**
3040
+ * Schema definition for a data table.
3041
+ */
3042
+ export interface OnchainDataTableSchema {
3043
+ /** The blockchain network database this table belongs to. */
3044
+ database?: string;
3045
+ /** Table name. */
3046
+ table?: string;
3047
+ /** Column definitions for this table. */
3048
+ columns?: OnchainDataColumnSchema[];
3049
+ }
3050
+
3051
+ /**
3052
+ * Schema information for available blockchain data tables.
3053
+ */
3054
+ export interface OnchainDataSchemaResponse {
3055
+ /** List of available tables. */
3056
+ tables?: OnchainDataTableSchema[];
3057
+ }
3058
+
2978
3059
  /**
2979
3060
  * Response containing token addresses that an account has received.
2980
3061
  */
@@ -2991,14 +3072,7 @@ export interface AccountTokenAddressesResponse {
2991
3072
  }
2992
3073
 
2993
3074
  /**
2994
- * A human-readable description.
2995
- * @minLength 0
2996
- * @maxLength 500
2997
- */
2998
- export type Description = string;
2999
-
3000
- /**
3001
- * Optional metadata as key-value pairs. Use this to store additional structured information on a resource, such as customer IDs, order references, or any application-specific data. Up to 50 key/value pairs may be provided. Keys and values are both strings. Keys must be ≤ 40 characters; values must be ≤ 500 characters.
3075
+ * Optional metadata as key-value pairs. Use this to store additional structured information on a resource, such as customer IDs, order references, or any application-specific data. Up to 10 key/value pairs may be provided. Keys and values are both strings. Keys must be ≤ 40 characters; values must be ≤ 500 characters.
3002
3076
  */
3003
3077
  export interface Metadata {
3004
3078
  [key: string]: string;
@@ -3052,8 +3126,9 @@ export interface WebhookSubscriptionResponse {
3052
3126
  updatedAt?: string;
3053
3127
  /** Description of the webhook subscription. */
3054
3128
  description?: Description;
3055
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
3056
- service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
3129
+ /** Types of events to subscribe to. Event types follow a dot-separated format:
3130
+ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created",
3131
+ "acceptance.payment_session.authorization_succeeded").
3057
3132
  */
3058
3133
  eventTypes: string[];
3059
3134
  /** Whether the subscription is enabled. */
@@ -3100,8 +3175,9 @@ export type WebhookSubscriptionRequestLabels = { [key: string]: string };
3100
3175
  export interface WebhookSubscriptionRequest {
3101
3176
  /** Description of the webhook subscription. */
3102
3177
  description?: Description;
3103
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
3104
- service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
3178
+ /** Types of events to subscribe to. Event types follow a dot-separated format:
3179
+ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created",
3180
+ "acceptance.payment_session.authorization_succeeded").
3105
3181
  The subscription will only receive events matching these types AND the label filter(s).
3106
3182
  */
3107
3183
  eventTypes: string[];
@@ -3156,6 +3232,62 @@ Omit to receive all events for the selected event types.
3156
3232
  labels?: WebhookSubscriptionUpdateRequestLabels;
3157
3233
  }
3158
3234
 
3235
+ /**
3236
+ * Details of the HTTP response received from the webhook target.
3237
+ */
3238
+ export interface WebhookEventResponseDetail {
3239
+ /** HTTP status code returned by the webhook target. */
3240
+ httpCode?: number;
3241
+ /** Round-trip time of the webhook delivery in milliseconds. */
3242
+ elapsedTimeMs?: number;
3243
+ /** Response body returned by the webhook target. */
3244
+ body?: string;
3245
+ /** Error name if the delivery failed (e.g., timeout, connection_refused). */
3246
+ errorName?: string;
3247
+ }
3248
+
3249
+ /**
3250
+ * Current delivery status of the event.
3251
+ */
3252
+ export type WebhookEventResponseStatus =
3253
+ (typeof WebhookEventResponseStatus)[keyof typeof WebhookEventResponseStatus];
3254
+
3255
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
3256
+ export const WebhookEventResponseStatus = {
3257
+ pending: "pending",
3258
+ processing: "processing",
3259
+ succeeded: "succeeded",
3260
+ failed: "failed",
3261
+ retrying: "retrying",
3262
+ } as const;
3263
+
3264
+ /**
3265
+ * Details of a webhook event delivery attempt for a subscription.
3266
+ */
3267
+ export interface WebhookEventResponse {
3268
+ /** Unique identifier for the webhook event. */
3269
+ eventId: string;
3270
+ /** The type of event that was delivered (e.g., "onchain.activity.detected"). */
3271
+ eventTypeName: string;
3272
+ /** Current delivery status of the event. */
3273
+ status: WebhookEventResponseStatus;
3274
+ /** Timestamp when the event delivery attempt was created. */
3275
+ createdAt: string;
3276
+ /** Timestamp when the event was successfully delivered. Only present if status is "succeeded". */
3277
+ succeededAt?: string;
3278
+ /** Number of delivery retry attempts so far. */
3279
+ retryCount: number;
3280
+ response?: WebhookEventResponseDetail;
3281
+ }
3282
+
3283
+ /**
3284
+ * Response containing a list of webhook event delivery attempts.
3285
+ */
3286
+ export interface WebhookEventListResponse {
3287
+ /** The list of webhook event delivery attempts. */
3288
+ events: WebhookEventResponse[];
3289
+ }
3290
+
3159
3291
  /**
3160
3292
  * The version of the x402 protocol.
3161
3293
  */
@@ -3287,7 +3419,7 @@ export interface X402ExactSolanaPayload {
3287
3419
  }
3288
3420
 
3289
3421
  /**
3290
- * The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`.
3422
+ * The scheme of the payment protocol to use. Supported schemes are `exact` and `upto`.
3291
3423
  */
3292
3424
  export type X402V2PaymentRequirementsScheme =
3293
3425
  (typeof X402V2PaymentRequirementsScheme)[keyof typeof X402V2PaymentRequirementsScheme];
@@ -3295,6 +3427,7 @@ export type X402V2PaymentRequirementsScheme =
3295
3427
  // eslint-disable-next-line @typescript-eslint/no-redeclare
3296
3428
  export const X402V2PaymentRequirementsScheme = {
3297
3429
  exact: "exact",
3430
+ upto: "upto",
3298
3431
  } as const;
3299
3432
 
3300
3433
  /**
@@ -3306,7 +3439,7 @@ export type X402V2PaymentRequirementsExtra = { [key: string]: unknown };
3306
3439
  * The x402 protocol payment requirements that the resource server expects the client's payment payload to meet.
3307
3440
  */
3308
3441
  export interface X402V2PaymentRequirements {
3309
- /** The scheme of the payment protocol to use. Currently, the only supported scheme is `exact`. */
3442
+ /** The scheme of the payment protocol to use. Supported schemes are `exact` and `upto`. */
3310
3443
  scheme: X402V2PaymentRequirementsScheme;
3311
3444
  /** The network of the blockchain to send payment on in caip2 format. */
3312
3445
  network: string;
@@ -3733,6 +3866,7 @@ export type X402SupportedPaymentKindScheme =
3733
3866
  // eslint-disable-next-line @typescript-eslint/no-redeclare
3734
3867
  export const X402SupportedPaymentKindScheme = {
3735
3868
  exact: "exact",
3869
+ upto: "upto",
3736
3870
  } as const;
3737
3871
 
3738
3872
  /**
@@ -4073,6 +4207,8 @@ For Solana-based networks, the transaction will be a base58-encoded Solana signa
4073
4207
  transaction: string;
4074
4208
  /** The network where the settlement occurred. */
4075
4209
  network: string;
4210
+ /** The amount that was settled, in atomic units. */
4211
+ amount?: string;
4076
4212
  };
4077
4213
 
4078
4214
  /**
@@ -4121,7 +4257,7 @@ export type IdempotencyKeyParameter = string;
4121
4257
  section of our Authentication docs for more details on how to generate your Wallet Token.
4122
4258
 
4123
4259
  */
4124
- export type XDeveloperAuthParameter = string;
4260
+ export type XWalletAuthOptionalParameter = string;
4125
4261
 
4126
4262
  /**
4127
4263
  * A JWT signed using your Wallet Secret, encoded in base64. Refer to the
@@ -4129,7 +4265,12 @@ export type XDeveloperAuthParameter = string;
4129
4265
  section of our Authentication docs for more details on how to generate your Wallet Token.
4130
4266
 
4131
4267
  */
4132
- export type XWalletAuthOptionalParameter = string;
4268
+ export type XDeveloperAuthParameter = string;
4269
+
4270
+ /**
4271
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4272
+ */
4273
+ export type ProjectIDOptionalParameter = string;
4133
4274
 
4134
4275
  /**
4135
4276
  * The number of resources to return per page.
@@ -4260,24 +4401,12 @@ export type ImportEndUserBody = {
4260
4401
  keyType: ImportEndUserBodyKeyType;
4261
4402
  };
4262
4403
 
4263
- export type SignEvmHashWithEndUserAccountBody = {
4264
- /** The arbitrary 32 byte hash to sign. */
4265
- hash: string;
4404
+ export type SignEvmTransactionWithEndUserAccountParams = {
4266
4405
  /**
4267
- * The 0x-prefixed address of the EVM account belonging to the end user.
4268
- * @pattern ^0x[0-9a-fA-F]{40}$
4406
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4407
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4269
4408
  */
4270
- address: string;
4271
- /**
4272
- * Required when not using delegated signing. The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
4273
- * @pattern ^[a-zA-Z0-9-]{1,100}$
4274
- */
4275
- walletSecretId?: string;
4276
- };
4277
-
4278
- export type SignEvmHashWithEndUserAccount200 = {
4279
- /** The signature of the hash, as a 0x-prefixed hex string. */
4280
- signature: string;
4409
+ projectID?: ProjectIDOptionalParameter;
4281
4410
  };
4282
4411
 
4283
4412
  export type SignEvmTransactionWithEndUserAccountBody = {
@@ -4300,6 +4429,14 @@ export type SignEvmTransactionWithEndUserAccount200 = {
4300
4429
  signedTransaction: string;
4301
4430
  };
4302
4431
 
4432
+ export type SendEvmTransactionWithEndUserAccountParams = {
4433
+ /**
4434
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4435
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4436
+ */
4437
+ projectID?: ProjectIDOptionalParameter;
4438
+ };
4439
+
4303
4440
  /**
4304
4441
  * The network to send the transaction to.
4305
4442
  */
@@ -4316,6 +4453,9 @@ export const SendEvmTransactionWithEndUserAccountBodyNetwork = {
4316
4453
  polygon: "polygon",
4317
4454
  optimism: "optimism",
4318
4455
  arbitrum: "arbitrum",
4456
+ "arbitrum-sepolia": "arbitrum-sepolia",
4457
+ world: "world",
4458
+ "world-sepolia": "world-sepolia",
4319
4459
  } as const;
4320
4460
 
4321
4461
  export type SendEvmTransactionWithEndUserAccountBody = {
@@ -4340,6 +4480,14 @@ export type SendEvmTransactionWithEndUserAccount200 = {
4340
4480
  transactionHash: string;
4341
4481
  };
4342
4482
 
4483
+ export type SendEvmAssetWithEndUserAccountParams = {
4484
+ /**
4485
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4486
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4487
+ */
4488
+ projectID?: ProjectIDOptionalParameter;
4489
+ };
4490
+
4343
4491
  /**
4344
4492
  * The EVM network to send USDC on.
4345
4493
  */
@@ -4356,6 +4504,9 @@ export const SendEvmAssetWithEndUserAccountBodyNetwork = {
4356
4504
  polygon: "polygon",
4357
4505
  optimism: "optimism",
4358
4506
  arbitrum: "arbitrum",
4507
+ "arbitrum-sepolia": "arbitrum-sepolia",
4508
+ world: "world",
4509
+ "world-sepolia": "world-sepolia",
4359
4510
  } as const;
4360
4511
 
4361
4512
  export type SendEvmAssetWithEndUserAccountBody = {
@@ -4396,6 +4547,14 @@ export type SendEvmAssetWithEndUserAccount200 = {
4396
4547
  userOpHash?: string | null;
4397
4548
  };
4398
4549
 
4550
+ export type SignEvmMessageWithEndUserAccountParams = {
4551
+ /**
4552
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4553
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4554
+ */
4555
+ projectID?: ProjectIDOptionalParameter;
4556
+ };
4557
+
4399
4558
  export type SignEvmMessageWithEndUserAccountBody = {
4400
4559
  /**
4401
4560
  * The 0x-prefixed address of the EVM account belonging to the end user.
@@ -4416,6 +4575,14 @@ export type SignEvmMessageWithEndUserAccount200 = {
4416
4575
  signature: string;
4417
4576
  };
4418
4577
 
4578
+ export type SignEvmTypedDataWithEndUserAccountParams = {
4579
+ /**
4580
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4581
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4582
+ */
4583
+ projectID?: ProjectIDOptionalParameter;
4584
+ };
4585
+
4419
4586
  export type SignEvmTypedDataWithEndUserAccountBody = {
4420
4587
  /**
4421
4588
  * The 0x-prefixed address of the EVM account belonging to the end user.
@@ -4443,6 +4610,14 @@ export type RevokeDelegationForEndUserBody = {
4443
4610
  walletSecretId?: string;
4444
4611
  };
4445
4612
 
4613
+ export type CreateEvmEip7702DelegationWithEndUserAccountParams = {
4614
+ /**
4615
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4616
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4617
+ */
4618
+ projectID?: ProjectIDOptionalParameter;
4619
+ };
4620
+
4446
4621
  export type CreateEvmEip7702DelegationWithEndUserAccountBody = {
4447
4622
  /**
4448
4623
  * The 0x-prefixed address of the EVM account to delegate.
@@ -4464,6 +4639,14 @@ export type CreateEvmEip7702DelegationWithEndUserAccount201 = {
4464
4639
  delegationOperationId: string;
4465
4640
  };
4466
4641
 
4642
+ export type SendUserOperationWithEndUserAccountParams = {
4643
+ /**
4644
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4645
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4646
+ */
4647
+ projectID?: ProjectIDOptionalParameter;
4648
+ };
4649
+
4467
4650
  export type SendUserOperationWithEndUserAccountBody = {
4468
4651
  network: EvmUserOperationNetwork;
4469
4652
  /** The list of calls to make from the Smart Account. */
@@ -4484,24 +4667,12 @@ export type SendUserOperationWithEndUserAccountBody = {
4484
4667
  dataSuffix?: string;
4485
4668
  };
4486
4669
 
4487
- export type SignSolanaHashWithEndUserAccountBody = {
4488
- /** The arbitrary 32 byte hash to sign as base58 encoded string. */
4489
- hash: string;
4670
+ export type SignSolanaMessageWithEndUserAccountParams = {
4490
4671
  /**
4491
- * The base58 encoded address of the Solana account belonging to the end user.
4492
- * @pattern ^[1-9A-HJ-NP-Za-km-z]{32,44}$
4493
- */
4494
- address: string;
4495
- /**
4496
- * Required when not using delegated signing. The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
4497
- * @pattern ^[a-zA-Z0-9-]{1,100}$
4672
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4673
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4498
4674
  */
4499
- walletSecretId?: string;
4500
- };
4501
-
4502
- export type SignSolanaHashWithEndUserAccount200 = {
4503
- /** The signature of the hash, as a base58 encoded string. */
4504
- signature: string;
4675
+ projectID?: ProjectIDOptionalParameter;
4505
4676
  };
4506
4677
 
4507
4678
  export type SignSolanaMessageWithEndUserAccountBody = {
@@ -4524,6 +4695,14 @@ export type SignSolanaMessageWithEndUserAccount200 = {
4524
4695
  signature: string;
4525
4696
  };
4526
4697
 
4698
+ export type SignSolanaTransactionWithEndUserAccountParams = {
4699
+ /**
4700
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4701
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4702
+ */
4703
+ projectID?: ProjectIDOptionalParameter;
4704
+ };
4705
+
4527
4706
  export type SignSolanaTransactionWithEndUserAccountBody = {
4528
4707
  /**
4529
4708
  * The base58 encoded address of the Solana account belonging to the end user.
@@ -4544,6 +4723,14 @@ export type SignSolanaTransactionWithEndUserAccount200 = {
4544
4723
  signedTransaction: string;
4545
4724
  };
4546
4725
 
4726
+ export type SendSolanaTransactionWithEndUserAccountParams = {
4727
+ /**
4728
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4729
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4730
+ */
4731
+ projectID?: ProjectIDOptionalParameter;
4732
+ };
4733
+
4547
4734
  /**
4548
4735
  * The Solana network to send the transaction to.
4549
4736
  */
@@ -4580,6 +4767,14 @@ export type SendSolanaTransactionWithEndUserAccount200 = {
4580
4767
  transactionSignature: string;
4581
4768
  };
4582
4769
 
4770
+ export type SendSolanaAssetWithEndUserAccountParams = {
4771
+ /**
4772
+ * The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
4773
+ * @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4774
+ */
4775
+ projectID?: ProjectIDOptionalParameter;
4776
+ };
4777
+
4583
4778
  /**
4584
4779
  * The Solana network to send USDC on.
4585
4780
  */
@@ -4686,6 +4881,9 @@ export const SendEvmTransactionBodyNetwork = {
4686
4881
  polygon: "polygon",
4687
4882
  optimism: "optimism",
4688
4883
  arbitrum: "arbitrum",
4884
+ "arbitrum-sepolia": "arbitrum-sepolia",
4885
+ world: "world",
4886
+ "world-sepolia": "world-sepolia",
4689
4887
  } as const;
4690
4888
 
4691
4889
  export type SendEvmTransactionBody = {
@@ -5163,6 +5361,8 @@ export type SendSolanaTransactionBody = {
5163
5361
  network: SendSolanaTransactionBodyNetwork;
5164
5362
  /** The base64 encoded transaction to sign and send. This transaction can contain multiple instructions for native Solana batching. */
5165
5363
  transaction: string;
5364
+ /** Whether transaction fees should be sponsored by CDP. When true, CDP sponsors the transaction fees on behalf of the server wallet. When false, the server wallet is responsible for paying the transaction fees. */
5365
+ useCdpSponsor?: boolean;
5166
5366
  };
5167
5367
 
5168
5368
  export type SendSolanaTransaction200 = {
@@ -5216,6 +5416,25 @@ export type ListSolanaTokenBalances200AllOf = {
5216
5416
 
5217
5417
  export type ListSolanaTokenBalances200 = ListSolanaTokenBalances200AllOf & ListResponse;
5218
5418
 
5419
+ export type GetSQLSchemaParams = {
5420
+ /**
5421
+ * The name of the database to query. Defaults to "base" when not specified.
5422
+ */
5423
+ database?: GetSQLSchemaDatabase;
5424
+ /**
5425
+ * Get the schema for a specific table.
5426
+ */
5427
+ table?: string;
5428
+ };
5429
+
5430
+ export type GetSQLSchemaDatabase = (typeof GetSQLSchemaDatabase)[keyof typeof GetSQLSchemaDatabase];
5431
+
5432
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
5433
+ export const GetSQLSchemaDatabase = {
5434
+ base: "base",
5435
+ base_sepolia: "base_sepolia",
5436
+ } as const;
5437
+
5219
5438
  export type ListDataTokenBalancesParams = {
5220
5439
  /**
5221
5440
  * The number of resources to return per page.
@@ -5247,6 +5466,25 @@ export type ListWebhookSubscriptionsParams = {
5247
5466
  pageToken?: string;
5248
5467
  };
5249
5468
 
5469
+ export type ListWebhookSubscriptionEventsParams = {
5470
+ /**
5471
+ * Filter by a specific event ID.
5472
+ */
5473
+ eventId?: string;
5474
+ /**
5475
+ * Filter events created at or after this timestamp (RFC 3339 format).
5476
+ */
5477
+ minCreatedAt?: string;
5478
+ /**
5479
+ * Filter events created at or before this timestamp (RFC 3339 format).
5480
+ */
5481
+ maxCreatedAt?: string;
5482
+ /**
5483
+ * Filter by event type names (comma-separated).
5484
+ */
5485
+ eventTypeNames?: string;
5486
+ };
5487
+
5250
5488
  export type VerifyX402PaymentBody = {
5251
5489
  x402Version: X402Version;
5252
5490
  paymentPayload: X402PaymentPayload;