@coinbase/cdp-sdk 1.44.1 → 1.46.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 (282) hide show
  1. package/CHANGELOG.md +28 -2
  2. package/README.md +164 -43
  3. package/_cjs/accounts/evm/eip6492.js +49 -0
  4. package/_cjs/accounts/evm/eip6492.js.map +1 -0
  5. package/_cjs/accounts/evm/toEvmDelegatedAccount.js +27 -0
  6. package/_cjs/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
  7. package/_cjs/accounts/evm/toEvmServerAccount.js +127 -55
  8. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  9. package/_cjs/accounts/evm/toEvmSmartAccount.js +115 -45
  10. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  11. package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js +31 -0
  12. package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
  13. package/_cjs/accounts/solana/toSolanaAccount.js +49 -19
  14. package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
  15. package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js +37 -0
  16. package/_cjs/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
  17. package/_cjs/actions/solana/transfer.js.map +1 -1
  18. package/_cjs/actions/solana/utils.js +9 -9
  19. package/_cjs/actions/solana/utils.js.map +1 -1
  20. package/_cjs/analytics.js +10 -228
  21. package/_cjs/analytics.js.map +1 -1
  22. package/_cjs/auth/utils/http.js +1 -0
  23. package/_cjs/auth/utils/http.js.map +1 -1
  24. package/_cjs/client/cdp.js +4 -7
  25. package/_cjs/client/cdp.js.map +1 -1
  26. package/_cjs/client/end-user/endUser.js +385 -4
  27. package/_cjs/client/end-user/endUser.js.map +1 -1
  28. package/_cjs/client/end-user/toEndUserAccount.js +201 -23
  29. package/_cjs/client/end-user/toEndUserAccount.js.map +1 -1
  30. package/_cjs/client/evm/evm.js +482 -227
  31. package/_cjs/client/evm/evm.js.map +1 -1
  32. package/_cjs/client/policies/policies.js +41 -11
  33. package/_cjs/client/policies/policies.js.map +1 -1
  34. package/_cjs/client/solana/solana.js +215 -118
  35. package/_cjs/client/solana/solana.js.map +1 -1
  36. package/_cjs/index.js +3 -1
  37. package/_cjs/index.js.map +1 -1
  38. package/_cjs/openapi-client/cdpApiClient.js +32 -0
  39. package/_cjs/openapi-client/cdpApiClient.js.map +1 -1
  40. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +178 -9
  41. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  42. package/_cjs/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js +261 -0
  43. package/_cjs/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js.map +1 -0
  44. package/_cjs/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
  45. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +30 -1
  46. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  47. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +2 -2
  48. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  49. package/_cjs/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -1
  50. package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
  51. package/_cjs/openapi-client/generated/faucets/faucets.js +6 -5
  52. package/_cjs/openapi-client/generated/faucets/faucets.js.map +1 -1
  53. package/_cjs/openapi-client/generated/onchain-data/onchain-data.js.map +1 -1
  54. package/_cjs/openapi-client/generated/onramp/onramp.js +15 -1
  55. package/_cjs/openapi-client/generated/onramp/onramp.js.map +1 -1
  56. package/_cjs/openapi-client/generated/policy-engine/policy-engine.js.map +1 -1
  57. package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
  58. package/_cjs/openapi-client/generated/solana-token-balances/solana-token-balances.js.map +1 -1
  59. package/_cjs/openapi-client/generated/sql-api/sql-api.js +75 -0
  60. package/_cjs/openapi-client/generated/sql-api/sql-api.js.map +1 -0
  61. package/_cjs/openapi-client/generated/webhooks/webhooks.js.map +1 -1
  62. package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
  63. package/_cjs/openapi-client/index.js +4 -1
  64. package/_cjs/openapi-client/index.js.map +1 -1
  65. package/_cjs/policies/evmSchema.js +127 -1
  66. package/_cjs/policies/evmSchema.js.map +1 -1
  67. package/_cjs/policies/solanaSchema.js +102 -1
  68. package/_cjs/policies/solanaSchema.js.map +1 -1
  69. package/_cjs/policies/types.js +7 -0
  70. package/_cjs/policies/types.js.map +1 -1
  71. package/_cjs/utils/export.js +6 -5
  72. package/_cjs/utils/export.js.map +1 -1
  73. package/_cjs/version.js +1 -1
  74. package/_esm/accounts/evm/eip6492.js +46 -0
  75. package/_esm/accounts/evm/eip6492.js.map +1 -0
  76. package/_esm/accounts/evm/toEvmDelegatedAccount.js +24 -0
  77. package/_esm/accounts/evm/toEvmDelegatedAccount.js.map +1 -0
  78. package/_esm/accounts/evm/toEvmServerAccount.js +127 -55
  79. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  80. package/_esm/accounts/evm/toEvmSmartAccount.js +115 -45
  81. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  82. package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js +31 -0
  83. package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
  84. package/_esm/accounts/solana/toSolanaAccount.js +49 -19
  85. package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
  86. package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js +34 -0
  87. package/_esm/actions/evm/waitForEvmEip7702DelegationStatus.js.map +1 -0
  88. package/_esm/actions/solana/transfer.js.map +1 -1
  89. package/_esm/actions/solana/utils.js +9 -9
  90. package/_esm/actions/solana/utils.js.map +1 -1
  91. package/_esm/analytics.js +9 -227
  92. package/_esm/analytics.js.map +1 -1
  93. package/_esm/auth/utils/http.js +1 -0
  94. package/_esm/auth/utils/http.js.map +1 -1
  95. package/_esm/client/cdp.js +4 -7
  96. package/_esm/client/cdp.js.map +1 -1
  97. package/_esm/client/end-user/endUser.js +385 -4
  98. package/_esm/client/end-user/endUser.js.map +1 -1
  99. package/_esm/client/end-user/toEndUserAccount.js +201 -23
  100. package/_esm/client/end-user/toEndUserAccount.js.map +1 -1
  101. package/_esm/client/evm/evm.js +482 -227
  102. package/_esm/client/evm/evm.js.map +1 -1
  103. package/_esm/client/policies/policies.js +41 -11
  104. package/_esm/client/policies/policies.js.map +1 -1
  105. package/_esm/client/solana/solana.js +215 -118
  106. package/_esm/client/solana/solana.js.map +1 -1
  107. package/_esm/index.js +1 -0
  108. package/_esm/index.js.map +1 -1
  109. package/_esm/openapi-client/cdpApiClient.js +32 -0
  110. package/_esm/openapi-client/cdpApiClient.js.map +1 -1
  111. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +175 -7
  112. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  113. package/_esm/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js +243 -0
  114. package/_esm/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.js.map +1 -0
  115. package/_esm/openapi-client/generated/end-user-accounts/end-user-accounts.js.map +1 -1
  116. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +27 -0
  117. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  118. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +2 -2
  119. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  120. package/_esm/openapi-client/generated/evm-swaps/evm-swaps.js.map +1 -1
  121. package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -1
  122. package/_esm/openapi-client/generated/faucets/faucets.js +6 -5
  123. package/_esm/openapi-client/generated/faucets/faucets.js.map +1 -1
  124. package/_esm/openapi-client/generated/onchain-data/onchain-data.js.map +1 -1
  125. package/_esm/openapi-client/generated/onramp/onramp.js +13 -0
  126. package/_esm/openapi-client/generated/onramp/onramp.js.map +1 -1
  127. package/_esm/openapi-client/generated/policy-engine/policy-engine.js.map +1 -1
  128. package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
  129. package/_esm/openapi-client/generated/solana-token-balances/solana-token-balances.js.map +1 -1
  130. package/_esm/openapi-client/generated/sql-api/sql-api.js +70 -0
  131. package/_esm/openapi-client/generated/sql-api/sql-api.js.map +1 -0
  132. package/_esm/openapi-client/generated/webhooks/webhooks.js.map +1 -1
  133. package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -1
  134. package/_esm/openapi-client/index.js +4 -1
  135. package/_esm/openapi-client/index.js.map +1 -1
  136. package/_esm/policies/evmSchema.js +126 -0
  137. package/_esm/policies/evmSchema.js.map +1 -1
  138. package/_esm/policies/solanaSchema.js +101 -0
  139. package/_esm/policies/solanaSchema.js.map +1 -1
  140. package/_esm/policies/types.js +9 -2
  141. package/_esm/policies/types.js.map +1 -1
  142. package/_esm/utils/export.js +6 -5
  143. package/_esm/utils/export.js.map +1 -1
  144. package/_esm/version.js +1 -1
  145. package/_types/accounts/evm/eip6492.d.ts +17 -0
  146. package/_types/accounts/evm/eip6492.d.ts.map +1 -0
  147. package/_types/accounts/evm/toEvmDelegatedAccount.d.ts +13 -0
  148. package/_types/accounts/evm/toEvmDelegatedAccount.d.ts.map +1 -0
  149. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  150. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  151. package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts +4 -4
  152. package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -1
  153. package/_types/accounts/evm/types.d.ts +3 -2
  154. package/_types/accounts/evm/types.d.ts.map +1 -1
  155. package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
  156. package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts +32 -0
  157. package/_types/actions/evm/waitForEvmEip7702DelegationStatus.d.ts.map +1 -0
  158. package/_types/actions/solana/transfer.d.ts +3 -4
  159. package/_types/actions/solana/transfer.d.ts.map +1 -1
  160. package/_types/actions/solana/types.d.ts +79 -29
  161. package/_types/actions/solana/types.d.ts.map +1 -1
  162. package/_types/actions/solana/utils.d.ts +10 -9
  163. package/_types/actions/solana/utils.d.ts.map +1 -1
  164. package/_types/analytics.d.ts +5 -38
  165. package/_types/analytics.d.ts.map +1 -1
  166. package/_types/auth/utils/http.d.ts.map +1 -1
  167. package/_types/client/cdp.d.ts +4 -0
  168. package/_types/client/cdp.d.ts.map +1 -1
  169. package/_types/client/end-user/endUser.d.ts +272 -1
  170. package/_types/client/end-user/endUser.d.ts.map +1 -1
  171. package/_types/client/end-user/endUser.types.d.ts +491 -1
  172. package/_types/client/end-user/endUser.types.d.ts.map +1 -1
  173. package/_types/client/end-user/toEndUserAccount.d.ts +4 -1
  174. package/_types/client/end-user/toEndUserAccount.d.ts.map +1 -1
  175. package/_types/client/evm/evm.d.ts +54 -1
  176. package/_types/client/evm/evm.d.ts.map +1 -1
  177. package/_types/client/evm/evm.types.d.ts +29 -2
  178. package/_types/client/evm/evm.types.d.ts.map +1 -1
  179. package/_types/client/policies/policies.d.ts.map +1 -1
  180. package/_types/client/solana/solana.d.ts +38 -12
  181. package/_types/client/solana/solana.d.ts.map +1 -1
  182. package/_types/index.d.ts +3 -1
  183. package/_types/index.d.ts.map +1 -1
  184. package/_types/openapi-client/cdpApiClient.d.ts.map +1 -1
  185. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +884 -90
  186. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  187. package/_types/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.d.ts +163 -0
  188. package/_types/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.d.ts.map +1 -0
  189. package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts +9 -9
  190. package/_types/openapi-client/generated/end-user-accounts/end-user-accounts.d.ts.map +1 -1
  191. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +35 -15
  192. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
  193. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +14 -14
  194. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
  195. package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts +3 -3
  196. package/_types/openapi-client/generated/evm-swaps/evm-swaps.d.ts.map +1 -1
  197. package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts +2 -2
  198. package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts.map +1 -1
  199. package/_types/openapi-client/generated/faucets/faucets.d.ts +9 -8
  200. package/_types/openapi-client/generated/faucets/faucets.d.ts.map +1 -1
  201. package/_types/openapi-client/generated/onchain-data/onchain-data.d.ts +3 -3
  202. package/_types/openapi-client/generated/onchain-data/onchain-data.d.ts.map +1 -1
  203. package/_types/openapi-client/generated/onramp/onramp.d.ts +12 -5
  204. package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -1
  205. package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts +6 -6
  206. package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts.map +1 -1
  207. package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts +12 -12
  208. package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts.map +1 -1
  209. package/_types/openapi-client/generated/solana-token-balances/solana-token-balances.d.ts +2 -2
  210. package/_types/openapi-client/generated/solana-token-balances/solana-token-balances.d.ts.map +1 -1
  211. package/_types/openapi-client/generated/sql-api/sql-api.d.ts +73 -0
  212. package/_types/openapi-client/generated/sql-api/sql-api.d.ts.map +1 -0
  213. package/_types/openapi-client/generated/webhooks/webhooks.d.ts +6 -6
  214. package/_types/openapi-client/generated/webhooks/webhooks.d.ts.map +1 -1
  215. package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts +4 -4
  216. package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts.map +1 -1
  217. package/_types/openapi-client/index.d.ts +23 -3
  218. package/_types/openapi-client/index.d.ts.map +1 -1
  219. package/_types/policies/evmSchema.d.ts +3128 -1064
  220. package/_types/policies/evmSchema.d.ts.map +1 -1
  221. package/_types/policies/solanaSchema.d.ts +1411 -47
  222. package/_types/policies/solanaSchema.d.ts.map +1 -1
  223. package/_types/policies/types.d.ts +8427 -2942
  224. package/_types/policies/types.d.ts.map +1 -1
  225. package/_types/types/contract.d.ts.map +1 -1
  226. package/_types/utils/export.d.ts +1 -1
  227. package/_types/utils/export.d.ts.map +1 -1
  228. package/_types/version.d.ts +1 -1
  229. package/accounts/evm/eip6492.ts +60 -0
  230. package/accounts/evm/toEvmDelegatedAccount.ts +26 -0
  231. package/accounts/evm/toEvmServerAccount.ts +115 -67
  232. package/accounts/evm/toEvmSmartAccount.ts +114 -57
  233. package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +44 -5
  234. package/accounts/evm/types.ts +8 -3
  235. package/accounts/solana/toSolanaAccount.ts +44 -24
  236. package/actions/evm/waitForEvmEip7702DelegationStatus.ts +57 -0
  237. package/actions/solana/transfer.ts +3 -3
  238. package/actions/solana/types.ts +79 -29
  239. package/actions/solana/utils.ts +13 -11
  240. package/analytics.ts +8 -294
  241. package/auth/utils/http.ts +1 -0
  242. package/client/cdp.ts +6 -8
  243. package/client/end-user/endUser.ts +513 -4
  244. package/client/end-user/endUser.types.ts +598 -0
  245. package/client/end-user/toEndUserAccount.ts +330 -26
  246. package/client/evm/evm.ts +517 -282
  247. package/client/evm/evm.types.ts +45 -2
  248. package/client/policies/policies.ts +41 -16
  249. package/client/solana/solana.ts +233 -153
  250. package/index.ts +36 -1
  251. package/openapi-client/cdpApiClient.ts +34 -0
  252. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +1155 -172
  253. package/openapi-client/generated/embedded-wallets-core-functionality/embedded-wallets-core-functionality.ts +455 -0
  254. package/openapi-client/generated/end-user-accounts/end-user-accounts.ts +12 -9
  255. package/openapi-client/generated/evm-accounts/evm-accounts.ts +66 -14
  256. package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +16 -16
  257. package/openapi-client/generated/evm-swaps/evm-swaps.ts +3 -3
  258. package/openapi-client/generated/evm-token-balances/evm-token-balances.ts +2 -2
  259. package/openapi-client/generated/faucets/faucets.ts +9 -8
  260. package/openapi-client/generated/onchain-data/onchain-data.ts +3 -3
  261. package/openapi-client/generated/onramp/onramp.ts +28 -4
  262. package/openapi-client/generated/policy-engine/policy-engine.ts +12 -6
  263. package/openapi-client/generated/solana-accounts/solana-accounts.ts +12 -12
  264. package/openapi-client/generated/solana-token-balances/solana-token-balances.ts +2 -2
  265. package/openapi-client/generated/sql-api/sql-api.ts +92 -0
  266. package/openapi-client/generated/webhooks/webhooks.ts +6 -6
  267. package/openapi-client/generated/x402-facilitator/x402-facilitator.ts +6 -4
  268. package/openapi-client/index.ts +4 -1
  269. package/package.json +7 -8
  270. package/policies/evmSchema.ts +164 -0
  271. package/policies/solanaSchema.ts +130 -0
  272. package/policies/types.ts +14 -0
  273. package/types/contract.ts +2 -4
  274. package/utils/export.ts +6 -5
  275. package/version.ts +1 -1
  276. package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +0 -55
  277. package/_cjs/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +0 -1
  278. package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js +0 -50
  279. package/_esm/openapi-client/generated/sql-api-alpha/sql-api-alpha.js.map +0 -1
  280. package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts +0 -53
  281. package/_types/openapi-client/generated/sql-api-alpha/sql-api-alpha.d.ts.map +0 -1
  282. package/openapi-client/generated/sql-api-alpha/sql-api-alpha.ts +0 -72
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v7.6.0 🍺
2
+ * Generated by orval v7.21.0 🍺
3
3
  * Do not edit manually.
4
4
  * Coinbase Developer Platform APIs
5
5
  * The Coinbase Developer Platform APIs - leading the world's transition onchain.
@@ -7,8 +7,11 @@
7
7
  */
8
8
  import type {
9
9
  CreateEvmAccountBody,
10
+ CreateEvmEip7702Delegation201,
11
+ CreateEvmEip7702DelegationBody,
10
12
  EIP712Message,
11
13
  EvmAccount,
14
+ EvmEip7702DelegationOperation,
12
15
  ExportEvmAccount200,
13
16
  ExportEvmAccountBody,
14
17
  ExportEvmAccountByName200,
@@ -39,7 +42,7 @@ The response is paginated, and by default, returns 20 accounts per page.
39
42
  */
40
43
  export const listEvmAccounts = (
41
44
  params?: ListEvmAccountsParams,
42
- options?: SecondParameter<typeof cdpApiClient>,
45
+ options?: SecondParameter<typeof cdpApiClient<ListEvmAccounts200>>,
43
46
  ) => {
44
47
  return cdpApiClient<ListEvmAccounts200>(
45
48
  { url: `/v2/evm/accounts`, method: "GET", params },
@@ -52,7 +55,7 @@ export const listEvmAccounts = (
52
55
  */
53
56
  export const createEvmAccount = (
54
57
  createEvmAccountBody?: CreateEvmAccountBody,
55
- options?: SecondParameter<typeof cdpApiClient>,
58
+ options?: SecondParameter<typeof cdpApiClient<EvmAccount>>,
56
59
  ) => {
57
60
  return cdpApiClient<EvmAccount>(
58
61
  {
@@ -68,7 +71,10 @@ export const createEvmAccount = (
68
71
  * Gets an EVM account by its address.
69
72
  * @summary Get an EVM account by address
70
73
  */
71
- export const getEvmAccount = (address: string, options?: SecondParameter<typeof cdpApiClient>) => {
74
+ export const getEvmAccount = (
75
+ address: string,
76
+ options?: SecondParameter<typeof cdpApiClient<EvmAccount>>,
77
+ ) => {
72
78
  return cdpApiClient<EvmAccount>({ url: `/v2/evm/accounts/${address}`, method: "GET" }, options);
73
79
  };
74
80
  /**
@@ -78,7 +84,7 @@ export const getEvmAccount = (address: string, options?: SecondParameter<typeof
78
84
  export const updateEvmAccount = (
79
85
  address: string,
80
86
  updateEvmAccountBody: UpdateEvmAccountBody,
81
- options?: SecondParameter<typeof cdpApiClient>,
87
+ options?: SecondParameter<typeof cdpApiClient<EvmAccount>>,
82
88
  ) => {
83
89
  return cdpApiClient<EvmAccount>(
84
90
  {
@@ -96,7 +102,7 @@ export const updateEvmAccount = (
96
102
  */
97
103
  export const getEvmAccountByName = (
98
104
  name: string,
99
- options?: SecondParameter<typeof cdpApiClient>,
105
+ options?: SecondParameter<typeof cdpApiClient<EvmAccount>>,
100
106
  ) => {
101
107
  return cdpApiClient<EvmAccount>(
102
108
  { url: `/v2/evm/accounts/by-name/${name}`, method: "GET" },
@@ -135,7 +141,7 @@ The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com
135
141
  export const sendEvmTransaction = (
136
142
  address: string,
137
143
  sendEvmTransactionBody: SendEvmTransactionBody,
138
- options?: SecondParameter<typeof cdpApiClient>,
144
+ options?: SecondParameter<typeof cdpApiClient<SendEvmTransaction200>>,
139
145
  ) => {
140
146
  return cdpApiClient<SendEvmTransaction200>(
141
147
  {
@@ -157,7 +163,7 @@ The transaction must be an [EIP-1559 dynamic fee transaction](https://github.com
157
163
  export const signEvmTransaction = (
158
164
  address: string,
159
165
  signEvmTransactionBody: SignEvmTransactionBody,
160
- options?: SecondParameter<typeof cdpApiClient>,
166
+ options?: SecondParameter<typeof cdpApiClient<SignEvmTransaction200>>,
161
167
  ) => {
162
168
  return cdpApiClient<SignEvmTransaction200>(
163
169
  {
@@ -176,7 +182,7 @@ export const signEvmTransaction = (
176
182
  export const signEvmHash = (
177
183
  address: string,
178
184
  signEvmHashBody: SignEvmHashBody,
179
- options?: SecondParameter<typeof cdpApiClient>,
185
+ options?: SecondParameter<typeof cdpApiClient<SignEvmHash200>>,
180
186
  ) => {
181
187
  return cdpApiClient<SignEvmHash200>(
182
188
  {
@@ -197,7 +203,7 @@ Per the specification, the message in the request body is prepended with `0x19 <
197
203
  export const signEvmMessage = (
198
204
  address: string,
199
205
  signEvmMessageBody: SignEvmMessageBody,
200
- options?: SecondParameter<typeof cdpApiClient>,
206
+ options?: SecondParameter<typeof cdpApiClient<SignEvmMessage200>>,
201
207
  ) => {
202
208
  return cdpApiClient<SignEvmMessage200>(
203
209
  {
@@ -216,7 +222,7 @@ export const signEvmMessage = (
216
222
  export const signEvmTypedData = (
217
223
  address: string,
218
224
  eIP712Message: EIP712Message,
219
- options?: SecondParameter<typeof cdpApiClient>,
225
+ options?: SecondParameter<typeof cdpApiClient<SignEvmTypedData200>>,
220
226
  ) => {
221
227
  return cdpApiClient<SignEvmTypedData200>(
222
228
  {
@@ -228,13 +234,53 @@ export const signEvmTypedData = (
228
234
  options,
229
235
  );
230
236
  };
237
+ /**
238
+ * Creates an EIP-7702 delegation for an EVM EOA account, upgrading it with smart account capabilities.
239
+
240
+ This endpoint:
241
+ - Retrieves delegation artifacts from onchain
242
+ - Signs the EIP-7702 authorization for delegation
243
+ - Assembles and submits a Type 4 transaction
244
+ - Creates an associated smart account object
245
+
246
+ The delegation allows the EVM EOA to be used as a smart account, which enables batched transactions and gas sponsorship via paymaster.
247
+ * @summary Create EIP-7702 delegation
248
+ */
249
+ export const createEvmEip7702Delegation = (
250
+ address: string,
251
+ createEvmEip7702DelegationBody: CreateEvmEip7702DelegationBody,
252
+ options?: SecondParameter<typeof cdpApiClient<CreateEvmEip7702Delegation201>>,
253
+ ) => {
254
+ return cdpApiClient<CreateEvmEip7702Delegation201>(
255
+ {
256
+ url: `/v2/evm/accounts/${address}/eip7702/delegation`,
257
+ method: "POST",
258
+ headers: { "Content-Type": "application/json" },
259
+ data: createEvmEip7702DelegationBody,
260
+ },
261
+ options,
262
+ );
263
+ };
264
+ /**
265
+ * Returns the EIP-7702 delegation operation. Use the delegationOperationId returned by the Create EIP-7702 delegation endpoint to poll for operation completion.
266
+ * @summary Get EIP-7702 delegation operation for an operationID
267
+ */
268
+ export const getEvmEip7702DelegationOperationById = (
269
+ delegationOperationId: string,
270
+ options?: SecondParameter<typeof cdpApiClient<EvmEip7702DelegationOperation>>,
271
+ ) => {
272
+ return cdpApiClient<EvmEip7702DelegationOperation>(
273
+ { url: `/v2/evm/eip7702/delegation-operations/${delegationOperationId}`, method: "GET" },
274
+ options,
275
+ );
276
+ };
231
277
  /**
232
278
  * Import an existing EVM account into the developer's CDP Project. This API should be called from the [CDP SDK](https://github.com/coinbase/cdp-sdk) to ensure that the associated private key is properly encrypted.
233
279
  * @summary Import an EVM account
234
280
  */
235
281
  export const importEvmAccount = (
236
282
  importEvmAccountBody: ImportEvmAccountBody,
237
- options?: SecondParameter<typeof cdpApiClient>,
283
+ options?: SecondParameter<typeof cdpApiClient<EvmAccount>>,
238
284
  ) => {
239
285
  return cdpApiClient<EvmAccount>(
240
286
  {
@@ -253,7 +299,7 @@ export const importEvmAccount = (
253
299
  export const exportEvmAccount = (
254
300
  address: string,
255
301
  exportEvmAccountBody: ExportEvmAccountBody,
256
- options?: SecondParameter<typeof cdpApiClient>,
302
+ options?: SecondParameter<typeof cdpApiClient<ExportEvmAccount200>>,
257
303
  ) => {
258
304
  return cdpApiClient<ExportEvmAccount200>(
259
305
  {
@@ -272,7 +318,7 @@ export const exportEvmAccount = (
272
318
  export const exportEvmAccountByName = (
273
319
  name: string,
274
320
  exportEvmAccountByNameBody: ExportEvmAccountByNameBody,
275
- options?: SecondParameter<typeof cdpApiClient>,
321
+ options?: SecondParameter<typeof cdpApiClient<ExportEvmAccountByName200>>,
276
322
  ) => {
277
323
  return cdpApiClient<ExportEvmAccountByName200>(
278
324
  {
@@ -296,6 +342,12 @@ export type SignEvmTransactionResult = NonNullable<Awaited<ReturnType<typeof sig
296
342
  export type SignEvmHashResult = NonNullable<Awaited<ReturnType<typeof signEvmHash>>>;
297
343
  export type SignEvmMessageResult = NonNullable<Awaited<ReturnType<typeof signEvmMessage>>>;
298
344
  export type SignEvmTypedDataResult = NonNullable<Awaited<ReturnType<typeof signEvmTypedData>>>;
345
+ export type CreateEvmEip7702DelegationResult = NonNullable<
346
+ Awaited<ReturnType<typeof createEvmEip7702Delegation>>
347
+ >;
348
+ export type GetEvmEip7702DelegationOperationByIdResult = NonNullable<
349
+ Awaited<ReturnType<typeof getEvmEip7702DelegationOperationById>>
350
+ >;
299
351
  export type ImportEvmAccountResult = NonNullable<Awaited<ReturnType<typeof importEvmAccount>>>;
300
352
  export type ExportEvmAccountResult = NonNullable<Awaited<ReturnType<typeof exportEvmAccount>>>;
301
353
  export type ExportEvmAccountByNameResult = NonNullable<
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v7.6.0 🍺
2
+ * Generated by orval v7.21.0 🍺
3
3
  * Do not edit manually.
4
4
  * Coinbase Developer Platform APIs
5
5
  * The Coinbase Developer Platform APIs - leading the world's transition onchain.
@@ -9,6 +9,7 @@ import type {
9
9
  CreateEvmSmartAccountBody,
10
10
  CreateSpendPermissionRequest,
11
11
  EvmSmartAccount,
12
+ EvmSpendPermissionsRevokeSpendPermissionRequest,
12
13
  EvmUserOperation,
13
14
  ListEvmSmartAccounts200,
14
15
  ListEvmSmartAccountsParams,
@@ -16,7 +17,6 @@ import type {
16
17
  ListSpendPermissionsParams,
17
18
  PrepareAndSendUserOperationBody,
18
19
  PrepareUserOperationBody,
19
- RevokeSpendPermissionRequest,
20
20
  SendUserOperationBody,
21
21
  UpdateEvmSmartAccountBody,
22
22
  } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
@@ -32,7 +32,7 @@ The response is paginated, and by default, returns 20 accounts per page.
32
32
  */
33
33
  export const listEvmSmartAccounts = (
34
34
  params?: ListEvmSmartAccountsParams,
35
- options?: SecondParameter<typeof cdpApiClient>,
35
+ options?: SecondParameter<typeof cdpApiClient<ListEvmSmartAccounts200>>,
36
36
  ) => {
37
37
  return cdpApiClient<ListEvmSmartAccounts200>(
38
38
  { url: `/v2/evm/smart-accounts`, method: "GET", params },
@@ -45,7 +45,7 @@ export const listEvmSmartAccounts = (
45
45
  */
46
46
  export const createEvmSmartAccount = (
47
47
  createEvmSmartAccountBody: CreateEvmSmartAccountBody,
48
- options?: SecondParameter<typeof cdpApiClient>,
48
+ options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
49
49
  ) => {
50
50
  return cdpApiClient<EvmSmartAccount>(
51
51
  {
@@ -63,7 +63,7 @@ export const createEvmSmartAccount = (
63
63
  */
64
64
  export const getEvmSmartAccountByName = (
65
65
  name: string,
66
- options?: SecondParameter<typeof cdpApiClient>,
66
+ options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
67
67
  ) => {
68
68
  return cdpApiClient<EvmSmartAccount>(
69
69
  { url: `/v2/evm/smart-accounts/by-name/${name}`, method: "GET" },
@@ -76,7 +76,7 @@ export const getEvmSmartAccountByName = (
76
76
  */
77
77
  export const getEvmSmartAccount = (
78
78
  address: string,
79
- options?: SecondParameter<typeof cdpApiClient>,
79
+ options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
80
80
  ) => {
81
81
  return cdpApiClient<EvmSmartAccount>(
82
82
  { url: `/v2/evm/smart-accounts/${address}`, method: "GET" },
@@ -90,7 +90,7 @@ export const getEvmSmartAccount = (
90
90
  export const updateEvmSmartAccount = (
91
91
  address: string,
92
92
  updateEvmSmartAccountBody: UpdateEvmSmartAccountBody,
93
- options?: SecondParameter<typeof cdpApiClient>,
93
+ options?: SecondParameter<typeof cdpApiClient<EvmSmartAccount>>,
94
94
  ) => {
95
95
  return cdpApiClient<EvmSmartAccount>(
96
96
  {
@@ -109,7 +109,7 @@ export const updateEvmSmartAccount = (
109
109
  export const prepareUserOperation = (
110
110
  address: string,
111
111
  prepareUserOperationBody: PrepareUserOperationBody,
112
- options?: SecondParameter<typeof cdpApiClient>,
112
+ options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
113
113
  ) => {
114
114
  return cdpApiClient<EvmUserOperation>(
115
115
  {
@@ -128,7 +128,7 @@ export const prepareUserOperation = (
128
128
  export const prepareAndSendUserOperation = (
129
129
  address: string,
130
130
  prepareAndSendUserOperationBody: PrepareAndSendUserOperationBody,
131
- options?: SecondParameter<typeof cdpApiClient>,
131
+ options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
132
132
  ) => {
133
133
  return cdpApiClient<EvmUserOperation>(
134
134
  {
@@ -147,7 +147,7 @@ export const prepareAndSendUserOperation = (
147
147
  export const getUserOperation = (
148
148
  address: string,
149
149
  userOpHash: string,
150
- options?: SecondParameter<typeof cdpApiClient>,
150
+ options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
151
151
  ) => {
152
152
  return cdpApiClient<EvmUserOperation>(
153
153
  { url: `/v2/evm/smart-accounts/${address}/user-operations/${userOpHash}`, method: "GET" },
@@ -165,7 +165,7 @@ export const sendUserOperation = (
165
165
  address: string,
166
166
  userOpHash: string,
167
167
  sendUserOperationBody: SendUserOperationBody,
168
- options?: SecondParameter<typeof cdpApiClient>,
168
+ options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
169
169
  ) => {
170
170
  return cdpApiClient<EvmUserOperation>(
171
171
  {
@@ -184,7 +184,7 @@ export const sendUserOperation = (
184
184
  export const createSpendPermission = (
185
185
  address: string,
186
186
  createSpendPermissionRequest: CreateSpendPermissionRequest,
187
- options?: SecondParameter<typeof cdpApiClient>,
187
+ options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
188
188
  ) => {
189
189
  return cdpApiClient<EvmUserOperation>(
190
190
  {
@@ -203,7 +203,7 @@ export const createSpendPermission = (
203
203
  export const listSpendPermissions = (
204
204
  address: string,
205
205
  params?: ListSpendPermissionsParams,
206
- options?: SecondParameter<typeof cdpApiClient>,
206
+ options?: SecondParameter<typeof cdpApiClient<ListSpendPermissions200>>,
207
207
  ) => {
208
208
  return cdpApiClient<ListSpendPermissions200>(
209
209
  { url: `/v2/evm/smart-accounts/${address}/spend-permissions/list`, method: "GET", params },
@@ -216,15 +216,15 @@ export const listSpendPermissions = (
216
216
  */
217
217
  export const revokeSpendPermission = (
218
218
  address: string,
219
- revokeSpendPermissionRequest: RevokeSpendPermissionRequest,
220
- options?: SecondParameter<typeof cdpApiClient>,
219
+ evmSpendPermissionsRevokeSpendPermissionRequest: EvmSpendPermissionsRevokeSpendPermissionRequest,
220
+ options?: SecondParameter<typeof cdpApiClient<EvmUserOperation>>,
221
221
  ) => {
222
222
  return cdpApiClient<EvmUserOperation>(
223
223
  {
224
224
  url: `/v2/evm/smart-accounts/${address}/spend-permissions/revoke`,
225
225
  method: "POST",
226
226
  headers: { "Content-Type": "application/json" },
227
- data: revokeSpendPermissionRequest,
227
+ data: evmSpendPermissionsRevokeSpendPermissionRequest,
228
228
  },
229
229
  options,
230
230
  );
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v7.6.0 🍺
2
+ * Generated by orval v7.21.0 🍺
3
3
  * Do not edit manually.
4
4
  * Coinbase Developer Platform APIs
5
5
  * The Coinbase Developer Platform APIs - leading the world's transition onchain.
@@ -22,7 +22,7 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
22
22
  */
23
23
  export const getEvmSwapPrice = (
24
24
  params: GetEvmSwapPriceParams,
25
- options?: SecondParameter<typeof cdpApiClient>,
25
+ options?: SecondParameter<typeof cdpApiClient<GetSwapPriceResponseWrapper>>,
26
26
  ) => {
27
27
  return cdpApiClient<GetSwapPriceResponseWrapper>(
28
28
  { url: `/v2/evm/swaps/quote`, method: "GET", params },
@@ -35,7 +35,7 @@ export const getEvmSwapPrice = (
35
35
  */
36
36
  export const createEvmSwapQuote = (
37
37
  createEvmSwapQuoteBody: CreateEvmSwapQuoteBody,
38
- options?: SecondParameter<typeof cdpApiClient>,
38
+ options?: SecondParameter<typeof cdpApiClient<CreateSwapQuoteResponseWrapper>>,
39
39
  ) => {
40
40
  return cdpApiClient<CreateSwapQuoteResponseWrapper>(
41
41
  {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v7.6.0 🍺
2
+ * Generated by orval v7.21.0 🍺
3
3
  * Do not edit manually.
4
4
  * Coinbase Developer Platform APIs
5
5
  * The Coinbase Developer Platform APIs - leading the world's transition onchain.
@@ -24,7 +24,7 @@ export const listEvmTokenBalances = (
24
24
  network: ListEvmTokenBalancesNetwork,
25
25
  address: string,
26
26
  params?: ListEvmTokenBalancesParams,
27
- options?: SecondParameter<typeof cdpApiClient>,
27
+ options?: SecondParameter<typeof cdpApiClient<ListEvmTokenBalances200>>,
28
28
  ) => {
29
29
  return cdpApiClient<ListEvmTokenBalances200>(
30
30
  { url: `/v2/evm/token-balances/${network}/${address}`, method: "GET", params },
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v7.6.0 🍺
2
+ * Generated by orval v7.21.0 🍺
3
3
  * Do not edit manually.
4
4
  * Coinbase Developer Platform APIs
5
5
  * The Coinbase Developer Platform APIs - leading the world's transition onchain.
@@ -36,7 +36,7 @@ A single blockchain address cannot exceed the specified limits, even if multiple
36
36
  */
37
37
  export const requestEvmFaucet = (
38
38
  requestEvmFaucetBody: RequestEvmFaucetBody,
39
- options?: SecondParameter<typeof cdpApiClient>,
39
+ options?: SecondParameter<typeof cdpApiClient<RequestEvmFaucet200>>,
40
40
  ) => {
41
41
  return cdpApiClient<RequestEvmFaucet200>(
42
42
  {
@@ -51,22 +51,23 @@ export const requestEvmFaucet = (
51
51
  /**
52
52
  * Request funds from the CDP Faucet on Solana devnet.
53
53
 
54
- Faucets are available for SOL.
54
+ Faucets are available for SOL, USDC, and CBTUSD.
55
55
 
56
56
  To prevent abuse, we enforce rate limits within a rolling 24-hour window to control the amount of funds that can be requested.
57
57
  These limits are applied at both the CDP Project level and the blockchain address level.
58
58
  A single blockchain address cannot exceed the specified limits, even if multiple users submit requests to the same address.
59
59
 
60
- | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits|
61
- |:-----:|:-------------------------:|:--------------------------------:|
62
- | SOL | 0.00125 SOL | 0.0125 SOL |
63
- | USDC | 1 USDC | 10 USDC |
60
+ | Token | Amount per Faucet Request |Rolling 24-hour window Rate Limits|
61
+ |:-----: |:-------------------------:|:--------------------------------:|
62
+ | SOL | 0.00125 SOL | 0.0125 SOL |
63
+ | USDC | 1 USDC | 10 USDC |
64
+ | CBTUSD | 1 CBTUSD | 10 CBTUSD |
64
65
 
65
66
  * @summary Request funds on Solana devnet
66
67
  */
67
68
  export const requestSolanaFaucet = (
68
69
  requestSolanaFaucetBody: RequestSolanaFaucetBody,
69
- options?: SecondParameter<typeof cdpApiClient>,
70
+ options?: SecondParameter<typeof cdpApiClient<RequestSolanaFaucet200>>,
70
71
  ) => {
71
72
  return cdpApiClient<RequestSolanaFaucet200>(
72
73
  {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v7.6.0 🍺
2
+ * Generated by orval v7.21.0 🍺
3
3
  * Do not edit manually.
4
4
  * Coinbase Developer Platform APIs
5
5
  * The Coinbase Developer Platform APIs - leading the world's transition onchain.
@@ -25,7 +25,7 @@ Analyzes transaction history to discover token interactions.
25
25
  export const listTokensForAccount = (
26
26
  network: "base" | "base-sepolia",
27
27
  address: string,
28
- options?: SecondParameter<typeof cdpApiClient>,
28
+ options?: SecondParameter<typeof cdpApiClient<AccountTokenAddressesResponse>>,
29
29
  ) => {
30
30
  return cdpApiClient<AccountTokenAddressesResponse>(
31
31
  { url: `/v2/data/evm/token-ownership/${network}/${address}`, method: "GET" },
@@ -42,7 +42,7 @@ export const listDataTokenBalances = (
42
42
  network: ListEvmTokenBalancesNetwork,
43
43
  address: string,
44
44
  params?: ListDataTokenBalancesParams,
45
- options?: SecondParameter<typeof cdpApiClient>,
45
+ options?: SecondParameter<typeof cdpApiClient<ListDataTokenBalances200>>,
46
46
  ) => {
47
47
  return cdpApiClient<ListDataTokenBalances200>(
48
48
  { url: `/v2/data/evm/token-balances/${network}/${address}`, method: "GET", params },
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v7.6.0 🍺
2
+ * Generated by orval v7.21.0 🍺
3
3
  * Do not edit manually.
4
4
  * Coinbase Developer Platform APIs
5
5
  * The Coinbase Developer Platform APIs - leading the world's transition onchain.
@@ -11,6 +11,8 @@ import type {
11
11
  CreateOnrampSession201,
12
12
  CreateOnrampSessionBody,
13
13
  GetOnrampOrderById200,
14
+ GetOnrampUserLimits200,
15
+ GetOnrampUserLimitsBody,
14
16
  } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
15
17
 
16
18
  import { cdpApiClient } from "../../cdpApiClient.js";
@@ -27,7 +29,7 @@ For detailed integration instructions and to get access to this API, refer to th
27
29
  */
28
30
  export const createOnrampOrder = (
29
31
  createOnrampOrderBody: CreateOnrampOrderBody,
30
- options?: SecondParameter<typeof cdpApiClient>,
32
+ options?: SecondParameter<typeof cdpApiClient<CreateOnrampOrder201>>,
31
33
  ) => {
32
34
  return cdpApiClient<CreateOnrampOrder201>(
33
35
  {
@@ -45,7 +47,7 @@ export const createOnrampOrder = (
45
47
  */
46
48
  export const getOnrampOrderById = (
47
49
  orderId: string,
48
- options?: SecondParameter<typeof cdpApiClient>,
50
+ options?: SecondParameter<typeof cdpApiClient<GetOnrampOrderById200>>,
49
51
  ) => {
50
52
  return cdpApiClient<GetOnrampOrderById200>(
51
53
  { url: `/v2/onramp/orders/${orderId}`, method: "GET" },
@@ -75,7 +77,7 @@ export const getOnrampOrderById = (
75
77
  */
76
78
  export const createOnrampSession = (
77
79
  createOnrampSessionBody: CreateOnrampSessionBody,
78
- options?: SecondParameter<typeof cdpApiClient>,
80
+ options?: SecondParameter<typeof cdpApiClient<CreateOnrampSession201>>,
79
81
  ) => {
80
82
  return cdpApiClient<CreateOnrampSession201>(
81
83
  {
@@ -87,8 +89,30 @@ export const createOnrampSession = (
87
89
  options,
88
90
  );
89
91
  };
92
+ /**
93
+ * Returns the transaction limits for an onramp user based on their payment method and user identifier. Use this API to show users their remaining purchase capacity before initiating an onramp transaction.
94
+ Currently supports `GUEST_CHECKOUT_APPLE_PAY` payment method with phone number identification. The phone number must have been previously verified via OTP.
95
+ * @summary Get onramp user limits
96
+ */
97
+ export const getOnrampUserLimits = (
98
+ getOnrampUserLimitsBody: GetOnrampUserLimitsBody,
99
+ options?: SecondParameter<typeof cdpApiClient<GetOnrampUserLimits200>>,
100
+ ) => {
101
+ return cdpApiClient<GetOnrampUserLimits200>(
102
+ {
103
+ url: `/v2/onramp/limits`,
104
+ method: "POST",
105
+ headers: { "Content-Type": "application/json" },
106
+ data: getOnrampUserLimitsBody,
107
+ },
108
+ options,
109
+ );
110
+ };
90
111
  export type CreateOnrampOrderResult = NonNullable<Awaited<ReturnType<typeof createOnrampOrder>>>;
91
112
  export type GetOnrampOrderByIdResult = NonNullable<Awaited<ReturnType<typeof getOnrampOrderById>>>;
92
113
  export type CreateOnrampSessionResult = NonNullable<
93
114
  Awaited<ReturnType<typeof createOnrampSession>>
94
115
  >;
116
+ export type GetOnrampUserLimitsResult = NonNullable<
117
+ Awaited<ReturnType<typeof getOnrampUserLimits>>
118
+ >;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v7.6.0 🍺
2
+ * Generated by orval v7.21.0 🍺
3
3
  * Do not edit manually.
4
4
  * Coinbase Developer Platform APIs
5
5
  * The Coinbase Developer Platform APIs - leading the world's transition onchain.
@@ -24,7 +24,7 @@ The response is paginated, and by default, returns 20 policies per page.
24
24
  */
25
25
  export const listPolicies = (
26
26
  params?: ListPoliciesParams,
27
- options?: SecondParameter<typeof cdpApiClient>,
27
+ options?: SecondParameter<typeof cdpApiClient<ListPolicies200>>,
28
28
  ) => {
29
29
  return cdpApiClient<ListPolicies200>(
30
30
  { url: `/v2/policy-engine/policies`, method: "GET", params },
@@ -37,7 +37,7 @@ export const listPolicies = (
37
37
  */
38
38
  export const createPolicy = (
39
39
  createPolicyBody: CreatePolicyBody,
40
- options?: SecondParameter<typeof cdpApiClient>,
40
+ options?: SecondParameter<typeof cdpApiClient<Policy>>,
41
41
  ) => {
42
42
  return cdpApiClient<Policy>(
43
43
  {
@@ -53,7 +53,10 @@ export const createPolicy = (
53
53
  * Get a policy by its ID.
54
54
  * @summary Get a policy by ID
55
55
  */
56
- export const getPolicyById = (policyId: string, options?: SecondParameter<typeof cdpApiClient>) => {
56
+ export const getPolicyById = (
57
+ policyId: string,
58
+ options?: SecondParameter<typeof cdpApiClient<Policy>>,
59
+ ) => {
57
60
  return cdpApiClient<Policy>(
58
61
  { url: `/v2/policy-engine/policies/${policyId}`, method: "GET" },
59
62
  options,
@@ -63,7 +66,10 @@ export const getPolicyById = (policyId: string, options?: SecondParameter<typeof
63
66
  * Delete a policy by its ID. This will have the effect of removing the policy from all accounts that are currently using it.
64
67
  * @summary Delete a policy
65
68
  */
66
- export const deletePolicy = (policyId: string, options?: SecondParameter<typeof cdpApiClient>) => {
69
+ export const deletePolicy = (
70
+ policyId: string,
71
+ options?: SecondParameter<typeof cdpApiClient<void>>,
72
+ ) => {
67
73
  return cdpApiClient<void>(
68
74
  { url: `/v2/policy-engine/policies/${policyId}`, method: "DELETE" },
69
75
  options,
@@ -76,7 +82,7 @@ export const deletePolicy = (policyId: string, options?: SecondParameter<typeof
76
82
  export const updatePolicy = (
77
83
  policyId: string,
78
84
  updatePolicyBody: UpdatePolicyBody,
79
- options?: SecondParameter<typeof cdpApiClient>,
85
+ options?: SecondParameter<typeof cdpApiClient<Policy>>,
80
86
  ) => {
81
87
  return cdpApiClient<Policy>(
82
88
  {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated by orval v7.6.0 🍺
2
+ * Generated by orval v7.21.0 🍺
3
3
  * Do not edit manually.
4
4
  * Coinbase Developer Platform APIs
5
5
  * The Coinbase Developer Platform APIs - leading the world's transition onchain.
@@ -37,7 +37,7 @@ If a name is provided, the response will contain only the account with that name
37
37
  */
38
38
  export const listSolanaAccounts = (
39
39
  params?: ListSolanaAccountsParams,
40
- options?: SecondParameter<typeof cdpApiClient>,
40
+ options?: SecondParameter<typeof cdpApiClient<ListSolanaAccounts200>>,
41
41
  ) => {
42
42
  return cdpApiClient<ListSolanaAccounts200>(
43
43
  { url: `/v2/solana/accounts`, method: "GET", params },
@@ -50,7 +50,7 @@ export const listSolanaAccounts = (
50
50
  */
51
51
  export const createSolanaAccount = (
52
52
  createSolanaAccountBody?: CreateSolanaAccountBody,
53
- options?: SecondParameter<typeof cdpApiClient>,
53
+ options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
54
54
  ) => {
55
55
  return cdpApiClient<SolanaAccount>(
56
56
  {
@@ -68,7 +68,7 @@ export const createSolanaAccount = (
68
68
  */
69
69
  export const getSolanaAccount = (
70
70
  address: string,
71
- options?: SecondParameter<typeof cdpApiClient>,
71
+ options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
72
72
  ) => {
73
73
  return cdpApiClient<SolanaAccount>(
74
74
  { url: `/v2/solana/accounts/${address}`, method: "GET" },
@@ -82,7 +82,7 @@ export const getSolanaAccount = (
82
82
  export const updateSolanaAccount = (
83
83
  address: string,
84
84
  updateSolanaAccountBody: UpdateSolanaAccountBody,
85
- options?: SecondParameter<typeof cdpApiClient>,
85
+ options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
86
86
  ) => {
87
87
  return cdpApiClient<SolanaAccount>(
88
88
  {
@@ -100,7 +100,7 @@ export const updateSolanaAccount = (
100
100
  */
101
101
  export const getSolanaAccountByName = (
102
102
  name: string,
103
- options?: SecondParameter<typeof cdpApiClient>,
103
+ options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
104
104
  ) => {
105
105
  return cdpApiClient<SolanaAccount>(
106
106
  { url: `/v2/solana/accounts/by-name/${name}`, method: "GET" },
@@ -113,7 +113,7 @@ export const getSolanaAccountByName = (
113
113
  */
114
114
  export const importSolanaAccount = (
115
115
  importSolanaAccountBody: ImportSolanaAccountBody,
116
- options?: SecondParameter<typeof cdpApiClient>,
116
+ options?: SecondParameter<typeof cdpApiClient<SolanaAccount>>,
117
117
  ) => {
118
118
  return cdpApiClient<SolanaAccount>(
119
119
  {
@@ -132,7 +132,7 @@ export const importSolanaAccount = (
132
132
  export const exportSolanaAccount = (
133
133
  address: string,
134
134
  exportSolanaAccountBody: ExportSolanaAccountBody,
135
- options?: SecondParameter<typeof cdpApiClient>,
135
+ options?: SecondParameter<typeof cdpApiClient<ExportSolanaAccount200>>,
136
136
  ) => {
137
137
  return cdpApiClient<ExportSolanaAccount200>(
138
138
  {
@@ -151,7 +151,7 @@ export const exportSolanaAccount = (
151
151
  export const exportSolanaAccountByName = (
152
152
  name: string,
153
153
  exportSolanaAccountByNameBody: ExportSolanaAccountByNameBody,
154
- options?: SecondParameter<typeof cdpApiClient>,
154
+ options?: SecondParameter<typeof cdpApiClient<ExportSolanaAccountByName200>>,
155
155
  ) => {
156
156
  return cdpApiClient<ExportSolanaAccountByName200>(
157
157
  {
@@ -179,7 +179,7 @@ The developer is responsible for ensuring that the unsigned transaction is valid
179
179
  export const signSolanaTransaction = (
180
180
  address: string,
181
181
  signSolanaTransactionBody: SignSolanaTransactionBody,
182
- options?: SecondParameter<typeof cdpApiClient>,
182
+ options?: SecondParameter<typeof cdpApiClient<SignSolanaTransaction200>>,
183
183
  ) => {
184
184
  return cdpApiClient<SignSolanaTransaction200>(
185
185
  {
@@ -200,7 +200,7 @@ export const signSolanaTransaction = (
200
200
  export const signSolanaMessage = (
201
201
  address: string,
202
202
  signSolanaMessageBody: SignSolanaMessageBody,
203
- options?: SecondParameter<typeof cdpApiClient>,
203
+ options?: SecondParameter<typeof cdpApiClient<SignSolanaMessage200>>,
204
204
  ) => {
205
205
  return cdpApiClient<SignSolanaMessage200>(
206
206
  {
@@ -238,7 +238,7 @@ The developer is responsible for ensuring that the unsigned transaction is valid
238
238
  */
239
239
  export const sendSolanaTransaction = (
240
240
  sendSolanaTransactionBody: SendSolanaTransactionBody,
241
- options?: SecondParameter<typeof cdpApiClient>,
241
+ options?: SecondParameter<typeof cdpApiClient<SendSolanaTransaction200>>,
242
242
  ) => {
243
243
  return cdpApiClient<SendSolanaTransaction200>(
244
244
  {