@coinbase/cdp-sdk 1.44.0 → 1.45.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 +20 -0
  2. package/README.md +117 -0
  3. package/_cjs/accounts/evm/toEvmDelegatedAccount.js +27 -0
  4. package/_cjs/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
  5. package/_cjs/accounts/evm/toEvmServerAccount.js +127 -55
  6. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  7. package/_cjs/accounts/evm/toEvmSmartAccount.js +111 -45
  8. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  9. package/_cjs/accounts/solana/toSolanaAccount.js +49 -19
  10. package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
  11. package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js +37 -0
  12. package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
  13. package/_cjs/analytics.js +10 -229
  14. package/_cjs/analytics.js.map +1 -1
  15. package/_cjs/client/cdp.js +0 -6
  16. package/_cjs/client/cdp.js.map +1 -1
  17. package/_cjs/client/evm/evm.js +482 -227
  18. package/_cjs/client/evm/evm.js.map +1 -1
  19. package/_cjs/client/policies/policies.js +41 -11
  20. package/_cjs/client/policies/policies.js.map +1 -1
  21. package/_cjs/client/solana/solana.js +177 -106
  22. package/_cjs/client/solana/solana.js.map +1 -1
  23. package/_cjs/index.js +3 -1
  24. package/_cjs/index.js.map +1 -1
  25. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +139 -5
  26. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  27. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +30 -1
  28. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  29. package/_cjs/openapi-client/generated/onramp/onramp.js +15 -1
  30. package/_cjs/openapi-client/generated/onramp/onramp.js.map +1 -1
  31. package/_cjs/policies/evmSchema.js +127 -1
  32. package/_cjs/policies/evmSchema.js.map +1 -1
  33. package/_cjs/policies/solanaSchema.js +102 -1
  34. package/_cjs/policies/solanaSchema.js.map +1 -1
  35. package/_cjs/policies/types.js +7 -0
  36. package/_cjs/policies/types.js.map +1 -1
  37. package/_cjs/version.js +1 -1
  38. package/_esm/accounts/evm/toEvmDelegatedAccount.js +24 -0
  39. package/_esm/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
  40. package/_esm/accounts/evm/toEvmServerAccount.js +127 -55
  41. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  42. package/_esm/accounts/evm/toEvmSmartAccount.js +111 -45
  43. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  44. package/_esm/accounts/solana/toSolanaAccount.js +49 -19
  45. package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
  46. package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js +34 -0
  47. package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
  48. package/_esm/analytics.js +9 -228
  49. package/_esm/analytics.js.map +1 -1
  50. package/_esm/client/cdp.js +0 -6
  51. package/_esm/client/cdp.js.map +1 -1
  52. package/_esm/client/evm/evm.js +482 -227
  53. package/_esm/client/evm/evm.js.map +1 -1
  54. package/_esm/client/policies/policies.js +41 -11
  55. package/_esm/client/policies/policies.js.map +1 -1
  56. package/_esm/client/solana/solana.js +177 -106
  57. package/_esm/client/solana/solana.js.map +1 -1
  58. package/_esm/index.js +1 -0
  59. package/_esm/index.js.map +1 -1
  60. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +136 -3
  61. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  62. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +27 -0
  63. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  64. package/_esm/openapi-client/generated/onramp/onramp.js +13 -0
  65. package/_esm/openapi-client/generated/onramp/onramp.js.map +1 -1
  66. package/_esm/policies/evmSchema.js +126 -0
  67. package/_esm/policies/evmSchema.js.map +1 -1
  68. package/_esm/policies/solanaSchema.js +101 -0
  69. package/_esm/policies/solanaSchema.js.map +1 -1
  70. package/_esm/policies/types.js +9 -2
  71. package/_esm/policies/types.js.map +1 -1
  72. package/_esm/version.js +1 -1
  73. package/_types/accounts/evm/toEvmDelegatedAccount.d.ts +13 -0
  74. package/_types/accounts/evm/toEvmDelegatedAccount.d.ts.map +1 -0
  75. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  76. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  77. package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
  78. package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts +32 -0
  79. package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts.map +1 -0
  80. package/_types/analytics.d.ts +5 -38
  81. package/_types/analytics.d.ts.map +1 -1
  82. package/_types/client/cdp.d.ts.map +1 -1
  83. package/_types/client/evm/evm.d.ts +54 -1
  84. package/_types/client/evm/evm.d.ts.map +1 -1
  85. package/_types/client/evm/evm.types.d.ts +29 -2
  86. package/_types/client/evm/evm.types.d.ts.map +1 -1
  87. package/_types/client/policies/policies.d.ts.map +1 -1
  88. package/_types/client/solana/solana.d.ts.map +1 -1
  89. package/_types/index.d.ts +2 -0
  90. package/_types/index.d.ts.map +1 -1
  91. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +482 -187
  92. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  93. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +21 -1
  94. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
  95. package/_types/openapi-client/generated/onramp/onramp.d.ts +8 -1
  96. package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -1
  97. package/_types/openapi-client/index.d.ts +4 -0
  98. package/_types/openapi-client/index.d.ts.map +1 -1
  99. package/_types/policies/evmSchema.d.ts +2717 -601
  100. package/_types/policies/evmSchema.d.ts.map +1 -1
  101. package/_types/policies/solanaSchema.d.ts +1411 -47
  102. package/_types/policies/solanaSchema.d.ts.map +1 -1
  103. package/_types/policies/types.d.ts +8427 -2942
  104. package/_types/policies/types.d.ts.map +1 -1
  105. package/_types/version.d.ts +1 -1
  106. package/accounts/evm/toEvmDelegatedAccount.ts +26 -0
  107. package/accounts/evm/toEvmServerAccount.ts +115 -67
  108. package/accounts/evm/toEvmSmartAccount.ts +100 -56
  109. package/accounts/solana/toSolanaAccount.ts +44 -24
  110. package/actions/evm/waitForEvmEip7702DelegationStatus.ts +57 -0
  111. package/analytics.ts +8 -304
  112. package/client/cdp.ts +0 -7
  113. package/client/evm/evm.ts +517 -282
  114. package/client/evm/evm.types.ts +41 -0
  115. package/client/policies/policies.ts +41 -16
  116. package/client/solana/solana.ts +195 -141
  117. package/index.ts +5 -0
  118. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +624 -190
  119. package/openapi-client/generated/evm-accounts/evm-accounts.ts +49 -0
  120. package/openapi-client/generated/onramp/onramp.ts +24 -0
  121. package/package.json +1 -1
  122. package/policies/evmSchema.ts +164 -0
  123. package/policies/solanaSchema.ts +130 -0
  124. package/policies/types.ts +14 -0
  125. package/version.ts +1 -1
@@ -66,6 +66,7 @@ export declare const OAuth2ProviderType: {
66
66
  readonly google: "google";
67
67
  readonly apple: "apple";
68
68
  readonly x: "x";
69
+ readonly telegram: "telegram";
69
70
  };
70
71
  /**
71
72
  * Information about an end user who authenticates using a third-party provider.
@@ -81,10 +82,28 @@ export interface OAuth2Authentication {
81
82
  /** The username of the end user if available from third-party OAuth2 provider's token exchange. */
82
83
  username?: string;
83
84
  }
85
+ /**
86
+ * Information about an end user who authenticates using Telegram.
87
+ */
88
+ export interface TelegramAuthentication {
89
+ type: OAuth2ProviderType;
90
+ /** The Telegram ID for the end user. */
91
+ id: number;
92
+ /** The Telegram user's first name. */
93
+ firstName?: string;
94
+ /** The Telegram user's last name. */
95
+ lastName?: string;
96
+ /** The Telegram user's profile picture. */
97
+ photoUrl?: string;
98
+ /** The Telegram user's last login as a Unix timestamp. */
99
+ authDate: number;
100
+ /** The Telegram user's username. */
101
+ username?: string;
102
+ }
84
103
  /**
85
104
  * Information about how the end user is authenticated.
86
105
  */
87
- export type AuthenticationMethod = EmailAuthentication | SmsAuthentication | DeveloperJWTAuthentication | OAuth2Authentication;
106
+ export type AuthenticationMethod = EmailAuthentication | SmsAuthentication | DeveloperJWTAuthentication | OAuth2Authentication | TelegramAuthentication;
88
107
  /**
89
108
  * The list of valid authentication methods linked to the end user.
90
109
  */
@@ -199,6 +218,7 @@ export type ErrorType = (typeof ErrorType)[keyof typeof ErrorType];
199
218
  export declare const ErrorType: {
200
219
  readonly already_exists: "already_exists";
201
220
  readonly bad_gateway: "bad_gateway";
221
+ readonly client_closed_request: "client_closed_request";
202
222
  readonly faucet_limit_exceeded: "faucet_limit_exceeded";
203
223
  readonly forbidden: "forbidden";
204
224
  readonly idempotency_error: "idempotency_error";
@@ -209,6 +229,8 @@ export declare const ErrorType: {
209
229
  readonly malformed_transaction: "malformed_transaction";
210
230
  readonly not_found: "not_found";
211
231
  readonly payment_method_required: "payment_method_required";
232
+ readonly payment_required: "payment_required";
233
+ readonly settlement_failed: "settlement_failed";
212
234
  readonly rate_limit_exceeded: "rate_limit_exceeded";
213
235
  readonly request_canceled: "request_canceled";
214
236
  readonly service_unavailable: "service_unavailable";
@@ -227,14 +249,31 @@ export declare const ErrorType: {
227
249
  readonly recipient_allowlist_violation: "recipient_allowlist_violation";
228
250
  readonly recipient_allowlist_pending: "recipient_allowlist_pending";
229
251
  readonly travel_rules_recipient_violation: "travel_rules_recipient_violation";
230
- readonly transfer_amount_out_of_bounds: "transfer_amount_out_of_bounds";
231
- readonly transfer_recipient_address_invalid: "transfer_recipient_address_invalid";
232
- readonly transfer_quote_expired: "transfer_quote_expired";
252
+ readonly source_account_invalid: "source_account_invalid";
253
+ readonly target_account_invalid: "target_account_invalid";
254
+ readonly source_account_not_found: "source_account_not_found";
255
+ readonly target_account_not_found: "target_account_not_found";
256
+ readonly source_asset_not_supported: "source_asset_not_supported";
257
+ readonly target_asset_not_supported: "target_asset_not_supported";
258
+ readonly target_email_invalid: "target_email_invalid";
259
+ readonly target_onchain_address_invalid: "target_onchain_address_invalid";
260
+ readonly transfer_amount_invalid: "transfer_amount_invalid";
261
+ readonly transfer_asset_not_supported: "transfer_asset_not_supported";
262
+ readonly insufficient_balance: "insufficient_balance";
263
+ readonly metadata_too_many_entries: "metadata_too_many_entries";
264
+ readonly metadata_key_too_long: "metadata_key_too_long";
265
+ readonly metadata_value_too_long: "metadata_value_too_long";
266
+ readonly travel_rules_field_missing: "travel_rules_field_missing";
267
+ readonly asset_mismatch: "asset_mismatch";
233
268
  readonly mfa_already_enrolled: "mfa_already_enrolled";
234
269
  readonly mfa_invalid_code: "mfa_invalid_code";
235
270
  readonly mfa_flow_expired: "mfa_flow_expired";
236
271
  readonly mfa_required: "mfa_required";
237
272
  readonly mfa_not_enrolled: "mfa_not_enrolled";
273
+ readonly order_quote_expired: "order_quote_expired";
274
+ readonly order_already_filled: "order_already_filled";
275
+ readonly order_already_canceled: "order_already_canceled";
276
+ readonly account_not_ready: "account_not_ready";
238
277
  };
239
278
  /**
240
279
  * A valid HTTP or HTTPS URL.
@@ -321,6 +360,52 @@ export interface EIP712Message {
321
360
  /** The message to sign. The structure of this message must match the `primaryType` struct in the `types` object. */
322
361
  message: EIP712MessageMessage;
323
362
  }
363
+ /**
364
+ * The network for the EIP-7702 delegation.
365
+ */
366
+ export type EvmEip7702DelegationNetwork = (typeof EvmEip7702DelegationNetwork)[keyof typeof EvmEip7702DelegationNetwork];
367
+ export declare const EvmEip7702DelegationNetwork: {
368
+ readonly "base-sepolia": "base-sepolia";
369
+ readonly base: "base";
370
+ readonly arbitrum: "arbitrum";
371
+ readonly optimism: "optimism";
372
+ readonly polygon: "polygon";
373
+ readonly ethereum: "ethereum";
374
+ readonly "ethereum-sepolia": "ethereum-sepolia";
375
+ };
376
+ /**
377
+ * The current status of the delegation operation.
378
+ UNSPECIFIED means the status has not been set. PENDING means the operation has been created but not yet submitted. SUBMITTED means the operation has been submitted to the network. COMPLETED means the operation has completed successfully. FAILED means the operation has failed.
379
+ */
380
+ export type EvmEip7702DelegationOperationStatus = (typeof EvmEip7702DelegationOperationStatus)[keyof typeof EvmEip7702DelegationOperationStatus];
381
+ export declare const EvmEip7702DelegationOperationStatus: {
382
+ readonly UNSPECIFIED: "UNSPECIFIED";
383
+ readonly PENDING: "PENDING";
384
+ readonly SUBMITTED: "SUBMITTED";
385
+ readonly COMPLETED: "COMPLETED";
386
+ readonly FAILED: "FAILED";
387
+ };
388
+ /**
389
+ * The status of an EIP-7702 delegation operation.
390
+ */
391
+ export interface EvmEip7702DelegationOperation {
392
+ /** The unique identifier for the delegation operation. */
393
+ delegationOperationId: string;
394
+ /** The current status of the delegation operation.
395
+ UNSPECIFIED means the status has not been set. PENDING means the operation has been created but not yet submitted. SUBMITTED means the operation has been submitted to the network. COMPLETED means the operation has completed successfully. FAILED means the operation has failed. */
396
+ status: EvmEip7702DelegationOperationStatus;
397
+ /**
398
+ * The hash of the delegation transaction, if available. Present once the transaction has been submitted to the network.
399
+ * @pattern ^0x[0-9a-fA-F]{64}$
400
+ */
401
+ transactionHash?: string;
402
+ network: EvmEip7702DelegationNetwork;
403
+ /**
404
+ * The address the account has delegated to, if any. Only present when the account has an active delegation.
405
+ * @pattern ^0x[0-9a-fA-F]{40}$
406
+ */
407
+ delegateAddress?: string;
408
+ }
324
409
  export interface EvmSmartAccount {
325
410
  /**
326
411
  * The 0x-prefixed, checksum address of the Smart Account.
@@ -545,6 +630,7 @@ export declare const EvmSwapsNetwork: {
545
630
  readonly ethereum: "ethereum";
546
631
  readonly arbitrum: "arbitrum";
547
632
  readonly optimism: "optimism";
633
+ readonly polygon: "polygon";
548
634
  };
549
635
  /**
550
636
  * The 0x-prefixed contract address of the token to receive.
@@ -864,6 +950,7 @@ export interface EthValueCriterion {
864
950
  type: EthValueCriterionType;
865
951
  /**
866
952
  * The amount of ETH, in wei, that the transaction's `value` field should be compared to.
953
+ * @maxLength 78
867
954
  * @pattern ^[0-9]+$
868
955
  */
869
956
  ethValue: string;
@@ -1870,10 +1957,197 @@ export interface SendUserOperationRule {
1870
1957
  operation: SendUserOperationRuleOperation;
1871
1958
  criteria: SendUserOperationCriteria;
1872
1959
  }
1960
+ export type SignEndUserEvmTransactionCriteriaItem = EthValueCriterion | EvmAddressCriterion | EvmDataCriterion | NetUSDChangeCriterion;
1961
+ /**
1962
+ * A schema for specifying criteria for the signEndUserEvmTransaction operation.
1963
+ */
1964
+ export type SignEndUserEvmTransactionCriteria = SignEndUserEvmTransactionCriteriaItem[];
1965
+ /**
1966
+ * Whether matching the rule will cause the request to be rejected or accepted.
1967
+ */
1968
+ export type SignEndUserEvmTransactionRuleAction = (typeof SignEndUserEvmTransactionRuleAction)[keyof typeof SignEndUserEvmTransactionRuleAction];
1969
+ export declare const SignEndUserEvmTransactionRuleAction: {
1970
+ readonly reject: "reject";
1971
+ readonly accept: "accept";
1972
+ };
1973
+ /**
1974
+ * The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
1975
+ */
1976
+ export type SignEndUserEvmTransactionRuleOperation = (typeof SignEndUserEvmTransactionRuleOperation)[keyof typeof SignEndUserEvmTransactionRuleOperation];
1977
+ export declare const SignEndUserEvmTransactionRuleOperation: {
1978
+ readonly signEndUserEvmTransaction: "signEndUserEvmTransaction";
1979
+ };
1980
+ export interface SignEndUserEvmTransactionRule {
1981
+ /** Whether matching the rule will cause the request to be rejected or accepted. */
1982
+ action: SignEndUserEvmTransactionRuleAction;
1983
+ /** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
1984
+ operation: SignEndUserEvmTransactionRuleOperation;
1985
+ criteria: SignEndUserEvmTransactionCriteria;
1986
+ }
1987
+ export type SendEndUserEvmTransactionCriteriaItem = EthValueCriterion | EvmAddressCriterion | EvmNetworkCriterion | EvmDataCriterion | NetUSDChangeCriterion;
1988
+ /**
1989
+ * A schema for specifying criteria for the sendEndUserEvmTransaction operation.
1990
+ */
1991
+ export type SendEndUserEvmTransactionCriteria = SendEndUserEvmTransactionCriteriaItem[];
1992
+ /**
1993
+ * Whether matching the rule will cause the request to be rejected or accepted.
1994
+ */
1995
+ export type SendEndUserEvmTransactionRuleAction = (typeof SendEndUserEvmTransactionRuleAction)[keyof typeof SendEndUserEvmTransactionRuleAction];
1996
+ export declare const SendEndUserEvmTransactionRuleAction: {
1997
+ readonly reject: "reject";
1998
+ readonly accept: "accept";
1999
+ };
2000
+ /**
2001
+ * The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
2002
+ */
2003
+ export type SendEndUserEvmTransactionRuleOperation = (typeof SendEndUserEvmTransactionRuleOperation)[keyof typeof SendEndUserEvmTransactionRuleOperation];
2004
+ export declare const SendEndUserEvmTransactionRuleOperation: {
2005
+ readonly sendEndUserEvmTransaction: "sendEndUserEvmTransaction";
2006
+ };
2007
+ export interface SendEndUserEvmTransactionRule {
2008
+ /** Whether matching the rule will cause the request to be rejected or accepted. */
2009
+ action: SendEndUserEvmTransactionRuleAction;
2010
+ /** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
2011
+ operation: SendEndUserEvmTransactionRuleOperation;
2012
+ criteria: SendEndUserEvmTransactionCriteria;
2013
+ }
2014
+ /**
2015
+ * A schema for specifying criteria for the signEndUserEvmMessage operation.
2016
+ */
2017
+ export type SignEndUserEvmMessageCriteria = EvmMessageCriterion[];
2018
+ /**
2019
+ * Whether matching the rule will cause the request to be rejected or accepted.
2020
+ */
2021
+ export type SignEndUserEvmMessageRuleAction = (typeof SignEndUserEvmMessageRuleAction)[keyof typeof SignEndUserEvmMessageRuleAction];
2022
+ export declare const SignEndUserEvmMessageRuleAction: {
2023
+ readonly reject: "reject";
2024
+ readonly accept: "accept";
2025
+ };
2026
+ /**
2027
+ * The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
2028
+ */
2029
+ export type SignEndUserEvmMessageRuleOperation = (typeof SignEndUserEvmMessageRuleOperation)[keyof typeof SignEndUserEvmMessageRuleOperation];
2030
+ export declare const SignEndUserEvmMessageRuleOperation: {
2031
+ readonly signEndUserEvmMessage: "signEndUserEvmMessage";
2032
+ };
2033
+ export interface SignEndUserEvmMessageRule {
2034
+ /** Whether matching the rule will cause the request to be rejected or accepted. */
2035
+ action: SignEndUserEvmMessageRuleAction;
2036
+ /** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
2037
+ operation: SignEndUserEvmMessageRuleOperation;
2038
+ criteria: SignEndUserEvmMessageCriteria;
2039
+ }
2040
+ export type SignEndUserEvmTypedDataCriteriaItem = SignEvmTypedDataFieldCriterion | SignEvmTypedDataVerifyingContractCriterion;
2041
+ /**
2042
+ * A schema for specifying criteria for the signEndUserEvmTypedData operation.
2043
+ */
2044
+ export type SignEndUserEvmTypedDataCriteria = SignEndUserEvmTypedDataCriteriaItem[];
2045
+ /**
2046
+ * Whether matching the rule will cause the request to be rejected or accepted.
2047
+ */
2048
+ export type SignEndUserEvmTypedDataRuleAction = (typeof SignEndUserEvmTypedDataRuleAction)[keyof typeof SignEndUserEvmTypedDataRuleAction];
2049
+ export declare const SignEndUserEvmTypedDataRuleAction: {
2050
+ readonly reject: "reject";
2051
+ readonly accept: "accept";
2052
+ };
2053
+ /**
2054
+ * The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
2055
+ */
2056
+ export type SignEndUserEvmTypedDataRuleOperation = (typeof SignEndUserEvmTypedDataRuleOperation)[keyof typeof SignEndUserEvmTypedDataRuleOperation];
2057
+ export declare const SignEndUserEvmTypedDataRuleOperation: {
2058
+ readonly signEndUserEvmTypedData: "signEndUserEvmTypedData";
2059
+ };
2060
+ export interface SignEndUserEvmTypedDataRule {
2061
+ /** Whether matching the rule will cause the request to be rejected or accepted. */
2062
+ action: SignEndUserEvmTypedDataRuleAction;
2063
+ /** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
2064
+ operation: SignEndUserEvmTypedDataRuleOperation;
2065
+ criteria: SignEndUserEvmTypedDataCriteria;
2066
+ }
2067
+ export type SignEndUserSolTransactionCriteriaItem = SolAddressCriterion | SolValueCriterion | SplAddressCriterion | SplValueCriterion | MintAddressCriterion | SolDataCriterion | ProgramIdCriterion;
2068
+ /**
2069
+ * A schema for specifying criteria for the signEndUserSolTransaction operation.
2070
+ */
2071
+ export type SignEndUserSolTransactionCriteria = SignEndUserSolTransactionCriteriaItem[];
2072
+ /**
2073
+ * Whether matching the rule will cause the request to be rejected or accepted.
2074
+ */
2075
+ export type SignEndUserSolTransactionRuleAction = (typeof SignEndUserSolTransactionRuleAction)[keyof typeof SignEndUserSolTransactionRuleAction];
2076
+ export declare const SignEndUserSolTransactionRuleAction: {
2077
+ readonly reject: "reject";
2078
+ readonly accept: "accept";
2079
+ };
2080
+ /**
2081
+ * The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
2082
+ */
2083
+ export type SignEndUserSolTransactionRuleOperation = (typeof SignEndUserSolTransactionRuleOperation)[keyof typeof SignEndUserSolTransactionRuleOperation];
2084
+ export declare const SignEndUserSolTransactionRuleOperation: {
2085
+ readonly signEndUserSolTransaction: "signEndUserSolTransaction";
2086
+ };
2087
+ export interface SignEndUserSolTransactionRule {
2088
+ /** Whether matching the rule will cause the request to be rejected or accepted. */
2089
+ action: SignEndUserSolTransactionRuleAction;
2090
+ /** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
2091
+ operation: SignEndUserSolTransactionRuleOperation;
2092
+ criteria: SignEndUserSolTransactionCriteria;
2093
+ }
2094
+ export type SendEndUserSolTransactionCriteriaItem = SolAddressCriterion | SolValueCriterion | SplAddressCriterion | SplValueCriterion | MintAddressCriterion | SolDataCriterion | ProgramIdCriterion | SolNetworkCriterion;
2095
+ /**
2096
+ * A schema for specifying criteria for the sendEndUserSolTransaction operation.
2097
+ */
2098
+ export type SendEndUserSolTransactionCriteria = SendEndUserSolTransactionCriteriaItem[];
2099
+ /**
2100
+ * Whether matching the rule will cause the request to be rejected or accepted.
2101
+ */
2102
+ export type SendEndUserSolTransactionRuleAction = (typeof SendEndUserSolTransactionRuleAction)[keyof typeof SendEndUserSolTransactionRuleAction];
2103
+ export declare const SendEndUserSolTransactionRuleAction: {
2104
+ readonly reject: "reject";
2105
+ readonly accept: "accept";
2106
+ };
2107
+ /**
2108
+ * The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
2109
+ */
2110
+ export type SendEndUserSolTransactionRuleOperation = (typeof SendEndUserSolTransactionRuleOperation)[keyof typeof SendEndUserSolTransactionRuleOperation];
2111
+ export declare const SendEndUserSolTransactionRuleOperation: {
2112
+ readonly sendEndUserSolTransaction: "sendEndUserSolTransaction";
2113
+ };
2114
+ export interface SendEndUserSolTransactionRule {
2115
+ /** Whether matching the rule will cause the request to be rejected or accepted. */
2116
+ action: SendEndUserSolTransactionRuleAction;
2117
+ /** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
2118
+ operation: SendEndUserSolTransactionRuleOperation;
2119
+ criteria: SendEndUserSolTransactionCriteria;
2120
+ }
2121
+ /**
2122
+ * A schema for specifying criteria for the signEndUserSolMessage operation.
2123
+ */
2124
+ export type SignEndUserSolMessageCriteria = SolMessageCriterion[];
2125
+ /**
2126
+ * Whether matching the rule will cause the request to be rejected or accepted.
2127
+ */
2128
+ export type SignEndUserSolMessageRuleAction = (typeof SignEndUserSolMessageRuleAction)[keyof typeof SignEndUserSolMessageRuleAction];
2129
+ export declare const SignEndUserSolMessageRuleAction: {
2130
+ readonly reject: "reject";
2131
+ readonly accept: "accept";
2132
+ };
2133
+ /**
2134
+ * The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
2135
+ */
2136
+ export type SignEndUserSolMessageRuleOperation = (typeof SignEndUserSolMessageRuleOperation)[keyof typeof SignEndUserSolMessageRuleOperation];
2137
+ export declare const SignEndUserSolMessageRuleOperation: {
2138
+ readonly signEndUserSolMessage: "signEndUserSolMessage";
2139
+ };
2140
+ export interface SignEndUserSolMessageRule {
2141
+ /** Whether matching the rule will cause the request to be rejected or accepted. */
2142
+ action: SignEndUserSolMessageRuleAction;
2143
+ /** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
2144
+ operation: SignEndUserSolMessageRuleOperation;
2145
+ criteria: SignEndUserSolMessageCriteria;
2146
+ }
1873
2147
  /**
1874
2148
  * A rule that limits the behavior of an account.
1875
2149
  */
1876
- export type Rule = SignEvmTransactionRule | SendEvmTransactionRule | SignEvmMessageRule | SignEvmTypedDataRule | SignSolTransactionRule | SendSolTransactionRule | SignSolMessageRule | SignEvmHashRule | PrepareUserOperationRule | SendUserOperationRule;
2150
+ export type Rule = SignEvmTransactionRule | SendEvmTransactionRule | SignEvmMessageRule | SignEvmTypedDataRule | SignSolTransactionRule | SendSolTransactionRule | SignSolMessageRule | SignEvmHashRule | PrepareUserOperationRule | SendUserOperationRule | SignEndUserEvmTransactionRule | SendEndUserEvmTransactionRule | SignEndUserEvmMessageRule | SignEndUserEvmTypedDataRule | SignEndUserSolTransactionRule | SendEndUserSolTransactionRule | SignEndUserSolMessageRule;
1877
2151
  /**
1878
2152
  * The scope of the policy. Only one project-level policy can exist at any time.
1879
2153
  */
@@ -2153,24 +2427,6 @@ export interface WebhookSubscriptionResponse {
2153
2427
  /** Unique identifier for the subscription. */
2154
2428
  subscriptionId: string;
2155
2429
  target: WebhookTarget;
2156
- /**
2157
- * (Deprecated) Use `labels` field instead.
2158
-
2159
- Label key for filtering events. Present when subscription uses traditional single-label format.
2160
- Maintained for backward compatibility only.
2161
-
2162
- * @deprecated
2163
- */
2164
- labelKey?: string;
2165
- /**
2166
- * (Deprecated) Use `labels` field instead.
2167
-
2168
- Label value for filtering events. Present when subscription uses traditional single-label format.
2169
- Maintained for backward compatibility only.
2170
-
2171
- * @deprecated
2172
- */
2173
- labelValue?: string;
2174
2430
  /** Multi-label filters using total overlap logic. Total overlap means the subscription only triggers when events contain ALL these key-value pairs.
2175
2431
  Present when subscription uses multi-label format.
2176
2432
  */
@@ -2185,9 +2441,9 @@ export type WebhookSubscriptionListResponseAllOf = {
2185
2441
  };
2186
2442
  export type WebhookSubscriptionListResponse = WebhookSubscriptionListResponseAllOf & ListResponse;
2187
2443
  /**
2188
- * Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2444
+ * Optional. Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2189
2445
  an event contains ALL the key-value pairs specified here. Additional labels on
2190
- the event are allowed and will not prevent matching.
2446
+ the event are allowed and will not prevent matching. Omit to receive all events for the selected event types.
2191
2447
 
2192
2448
  **Note:** Currently, labels are supported for onchain webhooks only.
2193
2449
 
@@ -2198,190 +2454,67 @@ export type WebhookSubscriptionRequestLabels = {
2198
2454
  [key: string]: string;
2199
2455
  };
2200
2456
  /**
2201
- * Request to create a new webhook subscription with support for both traditional single-label
2202
- and multi-label filtering formats.
2457
+ * Request to create a new webhook subscription with support for multi-label filtering.
2203
2458
 
2204
2459
  */
2205
- export type WebhookSubscriptionRequest = (unknown & {
2460
+ export interface WebhookSubscriptionRequest {
2206
2461
  /** Description of the webhook subscription. */
2207
2462
  description?: Description;
2208
2463
  /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2209
- service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2210
- The subscription will only receive events matching these types AND the label filter(s).
2211
- */
2212
- eventTypes?: string[];
2213
- /** Whether the subscription is enabled. */
2214
- isEnabled?: boolean;
2215
- target?: WebhookTarget;
2216
- metadata?: Metadata;
2217
- /**
2218
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2219
-
2220
- Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
2221
- in addition to the event types. Only events matching both the event types AND this label filter will be delivered.
2222
- NOTE: Use either (labelKey + labelValue) OR labels, not both.
2223
-
2224
- Maintained for backward compatibility only.
2225
-
2226
- * @deprecated
2227
- */
2228
- labelKey?: string;
2229
- /**
2230
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2231
-
2232
- Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
2233
- Only events with this exact label value will be delivered.
2234
- NOTE: Use either (labelKey + labelValue) OR labels, not both.
2235
-
2236
- Maintained for backward compatibility only.
2237
-
2238
- * @deprecated
2239
- */
2240
- labelValue?: string;
2241
- /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2242
- an event contains ALL the key-value pairs specified here. Additional labels on
2243
- the event are allowed and will not prevent matching.
2244
-
2245
- **Note:** Currently, labels are supported for onchain webhooks only.
2246
-
2247
- See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2248
- */
2249
- labels?: WebhookSubscriptionRequestLabels;
2250
- }) | (unknown & {
2251
- /** Description of the webhook subscription. */
2252
- description?: Description;
2253
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2254
- service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2255
- The subscription will only receive events matching these types AND the label filter(s).
2256
- */
2257
- eventTypes?: string[];
2464
+ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2465
+ The subscription will only receive events matching these types AND the label filter(s).
2466
+ */
2467
+ eventTypes: string[];
2258
2468
  /** Whether the subscription is enabled. */
2259
- isEnabled?: boolean;
2260
- target?: WebhookTarget;
2469
+ isEnabled: boolean;
2470
+ target: WebhookTarget;
2261
2471
  metadata?: Metadata;
2262
- /**
2263
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2264
-
2265
- Label key for filtering events. Each subscription filters on exactly one (labelKey, labelValue) pair
2266
- in addition to the event types. Only events matching both the event types AND this label filter will be delivered.
2267
- NOTE: Use either (labelKey + labelValue) OR labels, not both.
2268
-
2269
- Maintained for backward compatibility only.
2270
-
2271
- * @deprecated
2272
- */
2273
- labelKey?: string;
2274
- /**
2275
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2276
-
2277
- Label value for filtering events. Must correspond to the labelKey (e.g., contract address for contract_address key).
2278
- Only events with this exact label value will be delivered.
2279
- NOTE: Use either (labelKey + labelValue) OR labels, not both.
2280
-
2281
- Maintained for backward compatibility only.
2282
-
2283
- * @deprecated
2284
- */
2285
- labelValue?: string;
2286
- /** Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2287
- an event contains ALL the key-value pairs specified here. Additional labels on
2288
- the event are allowed and will not prevent matching.
2289
-
2290
- **Note:** Currently, labels are supported for onchain webhooks only.
2291
-
2292
- See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2293
- */
2472
+ /** Optional. Multi-label filters using total overlap logic. Total overlap means the subscription will only trigger when
2473
+ an event contains ALL the key-value pairs specified here. Additional labels on
2474
+ the event are allowed and will not prevent matching. Omit to receive all events for the selected event types.
2475
+
2476
+ **Note:** Currently, labels are supported for onchain webhooks only.
2477
+
2478
+ See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2479
+ */
2294
2480
  labels?: WebhookSubscriptionRequestLabels;
2295
- });
2481
+ }
2296
2482
  /**
2297
- * Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2483
+ * Optional. Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2298
2484
 
2299
2485
  **Note:** Currently, labels are supported for onchain webhooks only.
2300
2486
 
2301
2487
  See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2488
+ Omit to receive all events for the selected event types.
2302
2489
 
2303
2490
  */
2304
2491
  export type WebhookSubscriptionUpdateRequestLabels = {
2305
2492
  [key: string]: string;
2306
2493
  };
2307
2494
  /**
2308
- * Request to update an existing webhook subscription. The update format must match
2309
- the original subscription format (traditional or multi-label).
2495
+ * Request to update an existing webhook subscription.
2310
2496
 
2311
2497
  */
2312
- export type WebhookSubscriptionUpdateRequest = (unknown & {
2498
+ export interface WebhookSubscriptionUpdateRequest {
2313
2499
  /** Description of the webhook subscription. */
2314
2500
  description?: Description;
2315
2501
  /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2316
- service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2317
- */
2318
- eventTypes?: string[];
2319
- /** Whether the subscription is enabled. */
2320
- isEnabled?: boolean;
2321
- target?: WebhookTarget;
2322
- metadata?: Metadata;
2323
- /** Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2324
-
2325
- **Note:** Currently, labels are supported for onchain webhooks only.
2326
-
2327
- See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2328
- */
2329
- labels?: WebhookSubscriptionUpdateRequestLabels;
2330
- /**
2331
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2332
-
2333
- Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2334
- Maintained for backward compatibility only.
2335
-
2336
- * @deprecated
2337
- */
2338
- labelKey?: string;
2339
- /**
2340
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2341
-
2342
- Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2343
- Maintained for backward compatibility only.
2344
-
2345
- * @deprecated
2346
- */
2347
- labelValue?: string;
2348
- }) | (unknown & {
2349
- /** Description of the webhook subscription. */
2350
- description?: Description;
2351
- /** Types of events to subscribe to. Event types follow a three-part dot-separated format:
2352
- service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2353
- */
2354
- eventTypes?: string[];
2502
+ service.resource.verb (e.g., "onchain.activity.detected", "wallet.activity.detected", "onramp.transaction.created").
2503
+ */
2504
+ eventTypes: string[];
2355
2505
  /** Whether the subscription is enabled. */
2356
- isEnabled?: boolean;
2357
- target?: WebhookTarget;
2506
+ isEnabled: boolean;
2507
+ target: WebhookTarget;
2358
2508
  metadata?: Metadata;
2359
- /** Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2360
-
2361
- **Note:** Currently, labels are supported for onchain webhooks only.
2362
-
2363
- See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2364
- */
2509
+ /** Optional. Multi-label filters that trigger only when an event contains ALL of these key-value pairs.
2510
+
2511
+ **Note:** Currently, labels are supported for onchain webhooks only.
2512
+
2513
+ See [allowed labels for onchain webhooks](https://docs.cdp.coinbase.com/api-reference/v2/rest-api/webhooks/create-webhook-subscription#onchain-label-filtering).
2514
+ Omit to receive all events for the selected event types.
2515
+ */
2365
2516
  labels?: WebhookSubscriptionUpdateRequestLabels;
2366
- /**
2367
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2368
-
2369
- Label key for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2370
- Maintained for backward compatibility only.
2371
-
2372
- * @deprecated
2373
- */
2374
- labelKey?: string;
2375
- /**
2376
- * (Deprecated) Use `labels` instead for better filtering capabilities, including filtering on multiple labels simultaneously.
2377
-
2378
- Label value for filtering events. Use either (labelKey + labelValue) OR labels, not both.
2379
- Maintained for backward compatibility only.
2380
-
2381
- * @deprecated
2382
- */
2383
- labelValue?: string;
2384
- });
2517
+ }
2385
2518
  /**
2386
2519
  * The version of the x402 protocol.
2387
2520
  */
@@ -2410,18 +2543,91 @@ export type X402ExactEvmPayloadAuthorization = {
2410
2543
  validAfter: string;
2411
2544
  /** The unix timestamp before which the payment is valid. */
2412
2545
  validBefore: string;
2413
- /** The hex-encoded nonce of the payment. */
2546
+ /**
2547
+ * The hex-encoded nonce of the payment (bytes32).
2548
+ * @pattern ^0x[0-9a-fA-F]{64}$
2549
+ */
2414
2550
  nonce: string;
2415
2551
  };
2416
2552
  /**
2417
2553
  * The x402 protocol exact scheme payload for EVM networks. The scheme is implemented using ERC-3009. For more details, please see [EVM Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_evm.md).
2418
2554
  */
2419
2555
  export interface X402ExactEvmPayload {
2420
- /** The EIP-712 hex-encoded signature of the ERC-3009 authorization message. */
2556
+ /**
2557
+ * The EIP-712 hex-encoded signature of the ERC-3009 authorization message. Smart account signatures may be longer than 65 bytes.
2558
+ * @pattern ^0x[0-9a-fA-F]{130,}$
2559
+ */
2421
2560
  signature: string;
2422
2561
  /** The authorization data for the ERC-3009 authorization message. */
2423
2562
  authorization: X402ExactEvmPayloadAuthorization;
2424
2563
  }
2564
+ /**
2565
+ * The token permissions for the transfer.
2566
+ */
2567
+ export type X402ExactEvmPermit2PayloadPermit2AuthorizationPermitted = {
2568
+ /**
2569
+ * The 0x-prefixed, checksum EVM address of the token to transfer.
2570
+ * @pattern ^0x[0-9a-fA-F]{40}$
2571
+ */
2572
+ token: string;
2573
+ /** The amount to transfer in atomic units. */
2574
+ amount: string;
2575
+ };
2576
+ /**
2577
+ * The witness data containing payment details.
2578
+ */
2579
+ export type X402ExactEvmPermit2PayloadPermit2AuthorizationWitness = {
2580
+ /**
2581
+ * The 0x-prefixed, checksum EVM address of the recipient.
2582
+ * @pattern ^0x[0-9a-fA-F]{40}$
2583
+ */
2584
+ to: string;
2585
+ /** The unix timestamp after which the payment is valid. */
2586
+ validAfter: string;
2587
+ /**
2588
+ * Optional hex-encoded extra data.
2589
+ * @pattern ^0x[0-9a-fA-F]*$
2590
+ */
2591
+ extra?: string;
2592
+ };
2593
+ /**
2594
+ * The authorization data for the Permit2 PermitWitnessTransferFrom message.
2595
+ */
2596
+ export type X402ExactEvmPermit2PayloadPermit2Authorization = {
2597
+ /**
2598
+ * The 0x-prefixed, checksum EVM address of the sender of the payment.
2599
+ * @pattern ^0x[0-9a-fA-F]{40}$
2600
+ */
2601
+ from: string;
2602
+ /** The token permissions for the transfer. */
2603
+ permitted: X402ExactEvmPermit2PayloadPermit2AuthorizationPermitted;
2604
+ /**
2605
+ * The 0x-prefixed, checksum EVM address of the spender (x402 Permit2 proxy contract).
2606
+ * @pattern ^0x[0-9a-fA-F]{40}$
2607
+ */
2608
+ spender: string;
2609
+ /**
2610
+ * The Permit2 nonce as a decimal string (uint256).
2611
+ * @pattern ^[0-9]+$
2612
+ */
2613
+ nonce: string;
2614
+ /** The unix timestamp before which the permit is valid. */
2615
+ deadline: string;
2616
+ /** The witness data containing payment details. */
2617
+ witness: X402ExactEvmPermit2PayloadPermit2AuthorizationWitness;
2618
+ };
2619
+ /**
2620
+ * The x402 protocol exact scheme payload for EVM networks using Permit2. Permit2 is a universal token approval mechanism that works with any ERC-20 token, unlike ERC-3009 which requires token-level support.
2621
+ */
2622
+ export interface X402ExactEvmPermit2Payload {
2623
+ /**
2624
+ * The EIP-712 hex-encoded signature of the Permit2 PermitWitnessTransferFrom message. Smart account signatures may be longer than 65 bytes.
2625
+ * @pattern ^0x[0-9a-fA-F]{130,}$
2626
+ */
2627
+ signature: string;
2628
+ /** The authorization data for the Permit2 PermitWitnessTransferFrom message. */
2629
+ permit2Authorization: X402ExactEvmPermit2PayloadPermit2Authorization;
2630
+ }
2425
2631
  /**
2426
2632
  * The x402 protocol exact scheme payload for Solana networks. For more details, please see [Solana Exact Scheme Details](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md).
2427
2633
  */
@@ -2445,11 +2651,12 @@ export declare const X402V1PaymentPayloadNetwork: {
2445
2651
  readonly base: "base";
2446
2652
  readonly "solana-devnet": "solana-devnet";
2447
2653
  readonly solana: "solana";
2654
+ readonly polygon: "polygon";
2448
2655
  };
2449
2656
  /**
2450
2657
  * The payload of the payment depending on the x402Version, scheme, and network.
2451
2658
  */
2452
- export type X402V1PaymentPayloadPayload = X402ExactEvmPayload | X402ExactSolanaPayload;
2659
+ export type X402V1PaymentPayloadPayload = X402ExactEvmPayload | X402ExactEvmPermit2Payload | X402ExactSolanaPayload;
2453
2660
  /**
2454
2661
  * The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.
2455
2662
  */
@@ -2522,7 +2729,7 @@ export interface X402ResourceInfo {
2522
2729
  /**
2523
2730
  * The payload of the payment depending on the x402Version, scheme, and network.
2524
2731
  */
2525
- export type X402V2PaymentPayloadPayload = X402ExactEvmPayload | X402ExactSolanaPayload;
2732
+ export type X402V2PaymentPayloadPayload = X402ExactEvmPayload | X402ExactEvmPermit2Payload | X402ExactSolanaPayload;
2526
2733
  /**
2527
2734
  * Optional protocol extensions.
2528
2735
  */
@@ -2543,6 +2750,7 @@ export interface X402V2PaymentPayload {
2543
2750
  }
2544
2751
  /**
2545
2752
  * The x402 protocol payment payload that the client attaches to x402-paid API requests to the resource server in the X-PAYMENT header.
2753
+ For EVM networks, smart account signatures can be longer than 65 bytes.
2546
2754
  */
2547
2755
  export type X402PaymentPayload = X402V1PaymentPayload | X402V2PaymentPayload;
2548
2756
  /**
@@ -2561,6 +2769,7 @@ export declare const X402V1PaymentRequirementsNetwork: {
2561
2769
  readonly base: "base";
2562
2770
  readonly "solana-devnet": "solana-devnet";
2563
2771
  readonly solana: "solana";
2772
+ readonly polygon: "polygon";
2564
2773
  };
2565
2774
  /**
2566
2775
  * The optional JSON schema describing the resource output.
@@ -2639,6 +2848,13 @@ export declare const X402VerifyInvalidReason: {
2639
2848
  readonly invalid_exact_evm_payload_authorization_to_address_kyt: "invalid_exact_evm_payload_authorization_to_address_kyt";
2640
2849
  readonly invalid_exact_evm_payload_signature: "invalid_exact_evm_payload_signature";
2641
2850
  readonly invalid_exact_evm_payload_signature_address: "invalid_exact_evm_payload_signature_address";
2851
+ readonly invalid_exact_evm_permit2_payload_allowance_required: "invalid_exact_evm_permit2_payload_allowance_required";
2852
+ readonly invalid_exact_evm_permit2_payload_signature: "invalid_exact_evm_permit2_payload_signature";
2853
+ readonly invalid_exact_evm_permit2_payload_deadline: "invalid_exact_evm_permit2_payload_deadline";
2854
+ readonly invalid_exact_evm_permit2_payload_valid_after: "invalid_exact_evm_permit2_payload_valid_after";
2855
+ readonly invalid_exact_evm_permit2_payload_spender: "invalid_exact_evm_permit2_payload_spender";
2856
+ readonly invalid_exact_evm_permit2_payload_recipient: "invalid_exact_evm_permit2_payload_recipient";
2857
+ readonly invalid_exact_evm_permit2_payload_amount: "invalid_exact_evm_permit2_payload_amount";
2642
2858
  readonly invalid_exact_svm_payload_transaction: "invalid_exact_svm_payload_transaction";
2643
2859
  readonly invalid_exact_svm_payload_transaction_amount_mismatch: "invalid_exact_svm_payload_transaction_amount_mismatch";
2644
2860
  readonly invalid_exact_svm_payload_transaction_create_ata_instruction: "invalid_exact_svm_payload_transaction_create_ata_instruction";
@@ -2659,6 +2875,7 @@ export declare const X402VerifyInvalidReason: {
2659
2875
  readonly invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata: "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata";
2660
2876
  readonly invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts: "invalid_exact_svm_payload_transaction_fee_payer_included_in_instruction_accounts";
2661
2877
  readonly invalid_exact_svm_payload_transaction_fee_payer_transferring_funds: "invalid_exact_svm_payload_transaction_fee_payer_transferring_funds";
2878
+ readonly unknown_error: "unknown_error";
2662
2879
  };
2663
2880
  /**
2664
2881
  * The result when x402 payment verification fails.
@@ -2667,6 +2884,8 @@ export interface X402VerifyPaymentRejection {
2667
2884
  /** Indicates whether the payment is valid. */
2668
2885
  isValid: boolean;
2669
2886
  invalidReason: X402VerifyInvalidReason;
2887
+ /** The message describing the invalid reason. */
2888
+ invalidMessage?: string;
2670
2889
  /**
2671
2890
  * The onchain address of the client that is paying for the resource.
2672
2891
 
@@ -2697,6 +2916,13 @@ export declare const X402SettleErrorReason: {
2697
2916
  readonly invalid_exact_evm_payload_authorization_to_address_kyt: "invalid_exact_evm_payload_authorization_to_address_kyt";
2698
2917
  readonly invalid_exact_evm_payload_signature: "invalid_exact_evm_payload_signature";
2699
2918
  readonly invalid_exact_evm_payload_signature_address: "invalid_exact_evm_payload_signature_address";
2919
+ readonly invalid_exact_evm_permit2_payload_allowance_required: "invalid_exact_evm_permit2_payload_allowance_required";
2920
+ readonly invalid_exact_evm_permit2_payload_signature: "invalid_exact_evm_permit2_payload_signature";
2921
+ readonly invalid_exact_evm_permit2_payload_deadline: "invalid_exact_evm_permit2_payload_deadline";
2922
+ readonly invalid_exact_evm_permit2_payload_valid_after: "invalid_exact_evm_permit2_payload_valid_after";
2923
+ readonly invalid_exact_evm_permit2_payload_spender: "invalid_exact_evm_permit2_payload_spender";
2924
+ readonly invalid_exact_evm_permit2_payload_recipient: "invalid_exact_evm_permit2_payload_recipient";
2925
+ readonly invalid_exact_evm_permit2_payload_amount: "invalid_exact_evm_permit2_payload_amount";
2700
2926
  readonly invalid_exact_svm_payload_transaction: "invalid_exact_svm_payload_transaction";
2701
2927
  readonly invalid_exact_svm_payload_transaction_amount_mismatch: "invalid_exact_svm_payload_transaction_amount_mismatch";
2702
2928
  readonly invalid_exact_svm_payload_transaction_create_ata_instruction: "invalid_exact_svm_payload_transaction_create_ata_instruction";
@@ -2722,6 +2948,7 @@ export declare const X402SettleErrorReason: {
2722
2948
  readonly settle_exact_failed_onchain: "settle_exact_failed_onchain";
2723
2949
  readonly settle_exact_svm_block_height_exceeded: "settle_exact_svm_block_height_exceeded";
2724
2950
  readonly settle_exact_svm_transaction_confirmation_timed_out: "settle_exact_svm_transaction_confirmation_timed_out";
2951
+ readonly unknown_error: "unknown_error";
2725
2952
  };
2726
2953
  /**
2727
2954
  * The result when x402 payment settlement fails.
@@ -2730,6 +2957,8 @@ export interface X402SettlePaymentRejection {
2730
2957
  /** Indicates whether the payment settlement is successful. */
2731
2958
  success: boolean;
2732
2959
  errorReason: X402SettleErrorReason;
2960
+ /** The message describing the error reason. */
2961
+ errorMessage?: string;
2733
2962
  /**
2734
2963
  * The onchain address of the client that is paying for the resource.
2735
2964
 
@@ -2765,8 +2994,10 @@ export declare const X402SupportedPaymentKindNetwork: {
2765
2994
  readonly base: "base";
2766
2995
  readonly "solana-devnet": "solana-devnet";
2767
2996
  readonly solana: "solana";
2997
+ readonly polygon: "polygon";
2768
2998
  readonly "eip155:8453": "eip155:8453";
2769
2999
  readonly "eip155:84532": "eip155:84532";
3000
+ readonly "eip155:137": "eip155:137";
2770
3001
  readonly "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
2771
3002
  readonly "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
2772
3003
  };
@@ -2800,6 +3031,7 @@ export type BlockchainAddress = string;
2800
3031
  export type OnrampOrderPaymentMethodTypeId = (typeof OnrampOrderPaymentMethodTypeId)[keyof typeof OnrampOrderPaymentMethodTypeId];
2801
3032
  export declare const OnrampOrderPaymentMethodTypeId: {
2802
3033
  readonly GUEST_CHECKOUT_APPLE_PAY: "GUEST_CHECKOUT_APPLE_PAY";
3034
+ readonly GUEST_CHECKOUT_GOOGLE_PAY: "GUEST_CHECKOUT_GOOGLE_PAY";
2803
3035
  };
2804
3036
  /**
2805
3037
  * The type of fee.
@@ -2930,6 +3162,42 @@ export interface OnrampQuote {
2930
3162
  /** The exchange rate used to convert fiat to crypto i.e. the crypto value of one fiat. */
2931
3163
  exchangeRate: string;
2932
3164
  }
3165
+ /**
3166
+ * The type of user identifier:
3167
+ - `phone_number`: A phone number in E.164 format associated with an onramp user.
3168
+
3169
+ */
3170
+ export type OnrampUserIdType = (typeof OnrampUserIdType)[keyof typeof OnrampUserIdType];
3171
+ export declare const OnrampUserIdType: {
3172
+ readonly phone_number: "phone_number";
3173
+ };
3174
+ /**
3175
+ * The type of limit:
3176
+ - `weekly_spending`: Rolling 7-day spending limit. The limit applies to the sum of all completed transactions
3177
+ within a sliding 168-hour (7-day) window. As time passes, older transactions naturally expire from the window.
3178
+ $500 is the default limit.
3179
+ - `lifetime_transactions`: All-time transaction count limit. Tracks the total number of completed transactions
3180
+ across the user's entire history with no time-based expiration. Once the limit is reached, no further
3181
+ transactions are allowed. 15 is the default limit.
3182
+
3183
+ */
3184
+ export type OnrampLimitType = (typeof OnrampLimitType)[keyof typeof OnrampLimitType];
3185
+ export declare const OnrampLimitType: {
3186
+ readonly weekly_spending: "weekly_spending";
3187
+ readonly lifetime_transactions: "lifetime_transactions";
3188
+ };
3189
+ /**
3190
+ * A single limit with remaining capacity.
3191
+ */
3192
+ export interface OnrampUserLimit {
3193
+ limitType: OnrampLimitType;
3194
+ /** The currency of the limit amounts. Only present for spending limits, not for count-based limits. */
3195
+ currency?: string;
3196
+ /** The maximum limit value. */
3197
+ limit: string;
3198
+ /** The remaining amount or count available. */
3199
+ remaining: string;
3200
+ }
2933
3201
  /**
2934
3202
  * Unauthorized.
2935
3203
  */
@@ -2962,6 +3230,10 @@ export type AlreadyExistsErrorResponse = Error;
2962
3230
  * The underlying SQL string is invalid.
2963
3231
  */
2964
3232
  export type InvalidSQLQueryErrorResponse = Error;
3233
+ /**
3234
+ * The client closed the connection before the server could send a response.
3235
+ */
3236
+ export type ClientClosedRequestErrorResponse = Error;
2965
3237
  /**
2966
3238
  * The request timed out.
2967
3239
  */
@@ -2970,6 +3242,8 @@ export type X402VerifyResponseResponse = {
2970
3242
  /** Indicates whether the payment is valid. */
2971
3243
  isValid: boolean;
2972
3244
  invalidReason?: X402VerifyInvalidReason;
3245
+ /** The message describing the invalid reason. */
3246
+ invalidMessage?: string;
2973
3247
  /**
2974
3248
  * The onchain address of the client that is paying for the resource.
2975
3249
 
@@ -2988,6 +3262,8 @@ export type X402SettleResponseResponse = {
2988
3262
  /** Indicates whether the payment settlement is successful. */
2989
3263
  success: boolean;
2990
3264
  errorReason?: X402SettleErrorReason;
3265
+ /** The message describing the error reason. */
3266
+ errorMessage?: string;
2991
3267
  /**
2992
3268
  * The onchain address of the client that is paying for the resource.
2993
3269
 
@@ -3037,7 +3313,7 @@ section of our Authentication docs for more details on how to generate your Wall
3037
3313
  */
3038
3314
  export type XWalletAuthParameter = string;
3039
3315
  /**
3040
- * An optional [UUID v4](https://www.uuidgenerator.net/version4) request header for making requests safely retryable.
3316
+ * An optional string request header for making requests safely retryable.
3041
3317
  When included, duplicate requests with the same key will return identical responses.
3042
3318
  Refer to our [Idempotency docs](https://docs.cdp.coinbase.com/api-reference/v2/idempotency) for more information on using idempotency keys.
3043
3319
 
@@ -3246,6 +3522,15 @@ export type SignEvmTypedData200 = {
3246
3522
  /** The signature of the typed data, as a 0x-prefixed hex string. */
3247
3523
  signature: string;
3248
3524
  };
3525
+ export type CreateEvmEip7702DelegationBody = {
3526
+ network: EvmEip7702DelegationNetwork;
3527
+ /** Whether to configure spend permissions for the upgraded, delegated account. When enabled, the account can grant permissions for third parties to spend on its behalf. */
3528
+ enableSpendPermissions?: boolean;
3529
+ };
3530
+ export type CreateEvmEip7702Delegation201 = {
3531
+ /** The unique identifier for the delegation operation. Use this to poll the operation status. */
3532
+ delegationOperationId: string;
3533
+ };
3249
3534
  export type ListEvmSmartAccountsParams = {
3250
3535
  /**
3251
3536
  * The number of resources to return per page.
@@ -3761,4 +4046,14 @@ export type CreateOnrampSession201 = {
3761
4046
  session: OnrampSession;
3762
4047
  quote?: OnrampQuote;
3763
4048
  };
4049
+ export type GetOnrampUserLimitsBody = {
4050
+ paymentMethodType: OnrampOrderPaymentMethodTypeId;
4051
+ /** The user identifier value. For `phone_number` type, this must be in E.164 format. */
4052
+ userId: string;
4053
+ userIdType: OnrampUserIdType;
4054
+ };
4055
+ export type GetOnrampUserLimits200 = {
4056
+ /** The list of limits applicable to the user. */
4057
+ limits: OnrampUserLimit[];
4058
+ };
3764
4059
  //# sourceMappingURL=coinbaseDeveloperPlatformAPIs.schemas.d.ts.map