@coinbase/cdp-sdk 1.1.2 → 1.3.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 (332) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/LICENSE +21 -0
  3. package/README.md +88 -1
  4. package/{dist → _cjs}/accounts/evm/toEvmServerAccount.js +1 -0
  5. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -0
  6. package/{dist → _cjs}/accounts/evm/toEvmSmartAccount.js +1 -0
  7. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -0
  8. package/{dist → _cjs}/accounts/types.js +1 -0
  9. package/_cjs/accounts/types.js.map +1 -0
  10. package/{dist → _cjs}/actions/evm/sendUserOperation.js +1 -0
  11. package/_cjs/actions/evm/sendUserOperation.js.map +1 -0
  12. package/{dist → _cjs}/actions/evm/waitForUserOperation.js +10 -9
  13. package/_cjs/actions/evm/waitForUserOperation.js.map +1 -0
  14. package/{dist → _cjs}/analytics.js +32 -12
  15. package/_cjs/analytics.js.map +1 -0
  16. package/{dist → _cjs}/auth/errors.js +1 -0
  17. package/_cjs/auth/errors.js.map +1 -0
  18. package/{dist → _cjs}/auth/hooks/axios/index.js +2 -1
  19. package/_cjs/auth/hooks/axios/index.js.map +1 -0
  20. package/{dist → _cjs}/auth/hooks/axios/withAuth.js +4 -2
  21. package/_cjs/auth/hooks/axios/withAuth.js.map +1 -0
  22. package/{dist → _cjs}/auth/index.js +4 -3
  23. package/_cjs/auth/index.js.map +1 -0
  24. package/{dist → _cjs}/auth/utils/http.js +6 -5
  25. package/_cjs/auth/utils/http.js.map +1 -0
  26. package/{dist → _cjs}/auth/utils/index.js +3 -2
  27. package/_cjs/auth/utils/index.js.map +1 -0
  28. package/{dist → _cjs}/auth/utils/jwt.js +4 -3
  29. package/_cjs/auth/utils/jwt.js.map +1 -0
  30. package/_cjs/client/cdp.js +101 -0
  31. package/_cjs/client/cdp.js.map +1 -0
  32. package/_cjs/client/evm/evm.js +641 -0
  33. package/_cjs/client/evm/evm.js.map +1 -0
  34. package/{dist → _cjs}/client/evm/evm.types.js +1 -0
  35. package/_cjs/client/evm/evm.types.js.map +1 -0
  36. package/{dist → _cjs}/client/solana/index.js +3 -2
  37. package/_cjs/client/solana/index.js.map +1 -0
  38. package/{dist → _cjs}/client/solana/solana.js +9 -8
  39. package/_cjs/client/solana/solana.js.map +1 -0
  40. package/{dist → _cjs}/client/solana/solana.types.js +1 -0
  41. package/_cjs/client/solana/solana.types.js.map +1 -0
  42. package/{dist → _cjs}/constants.js +1 -0
  43. package/_cjs/constants.js.map +1 -0
  44. package/{dist → _cjs}/errors.js +1 -0
  45. package/_cjs/errors.js.map +1 -0
  46. package/{dist → _cjs}/index.js +4 -3
  47. package/_cjs/index.js.map +1 -0
  48. package/_cjs/openapi-client/cdpApiClient.js +116 -0
  49. package/_cjs/openapi-client/cdpApiClient.js.map +1 -0
  50. package/{dist → _cjs}/openapi-client/errors.js +44 -3
  51. package/_cjs/openapi-client/errors.js.map +1 -0
  52. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +66 -0
  53. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -0
  54. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +125 -0
  55. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -0
  56. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js +160 -0
  57. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -0
  58. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +70 -0
  59. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -0
  60. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js +188 -0
  61. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js.map +1 -0
  62. package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js +15 -0
  63. package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -0
  64. package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js +45 -0
  65. package/_cjs/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js.map +1 -0
  66. package/{dist → _cjs}/openapi-client/generated/faucets/faucets.js +20 -14
  67. package/_cjs/openapi-client/generated/faucets/faucets.js.map +1 -0
  68. package/{dist → _cjs}/openapi-client/generated/faucets/faucets.msw.js +16 -12
  69. package/_cjs/openapi-client/generated/faucets/faucets.msw.js.map +1 -0
  70. package/{dist → _cjs}/openapi-client/generated/index.msw.js +6 -4
  71. package/_cjs/openapi-client/generated/index.msw.js.map +1 -0
  72. package/{dist → _cjs}/openapi-client/generated/solana-accounts/solana-accounts.js +38 -35
  73. package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -0
  74. package/{dist → _cjs}/openapi-client/generated/solana-accounts/solana-accounts.msw.js +68 -35
  75. package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.msw.js.map +1 -0
  76. package/{dist → _cjs}/openapi-client/index.js +16 -11
  77. package/_cjs/openapi-client/index.js.map +1 -0
  78. package/_cjs/package.json +1 -0
  79. package/{dist → _cjs}/types/calls.js +1 -0
  80. package/_cjs/types/calls.js.map +1 -0
  81. package/{dist → _cjs}/types/contract.js +1 -0
  82. package/_cjs/types/contract.js.map +1 -0
  83. package/{dist → _cjs}/types/misc.js +1 -0
  84. package/_cjs/types/misc.js.map +1 -0
  85. package/{dist → _cjs}/types/multicall.js +1 -0
  86. package/_cjs/types/multicall.js.map +1 -0
  87. package/{dist → _cjs}/types/utils.js +1 -0
  88. package/_cjs/types/utils.js.map +1 -0
  89. package/{dist → _cjs}/utils/wait.js +3 -2
  90. package/_cjs/utils/wait.js.map +1 -0
  91. package/_cjs/version.js +5 -0
  92. package/_cjs/version.js.map +1 -0
  93. package/_esm/accounts/evm/toEvmServerAccount.js +40 -0
  94. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -0
  95. package/_esm/accounts/evm/toEvmSmartAccount.js +22 -0
  96. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -0
  97. package/_esm/accounts/types.js +2 -0
  98. package/_esm/accounts/types.js.map +1 -0
  99. package/_esm/actions/evm/sendUserOperation.js +85 -0
  100. package/_esm/actions/evm/sendUserOperation.js.map +1 -0
  101. package/_esm/actions/evm/waitForUserOperation.js +58 -0
  102. package/_esm/actions/evm/waitForUserOperation.js.map +1 -0
  103. package/_esm/analytics.js +101 -0
  104. package/_esm/analytics.js.map +1 -0
  105. package/_esm/auth/errors.js +57 -0
  106. package/_esm/auth/errors.js.map +1 -0
  107. package/_esm/auth/hooks/axios/index.js +2 -0
  108. package/_esm/auth/hooks/axios/index.js.map +1 -0
  109. package/_esm/auth/hooks/axios/withAuth.js +72 -0
  110. package/_esm/auth/hooks/axios/withAuth.js.map +1 -0
  111. package/_esm/auth/index.js +5 -0
  112. package/_esm/auth/index.js.map +1 -0
  113. package/_esm/auth/utils/http.js +70 -0
  114. package/_esm/auth/utils/http.js.map +1 -0
  115. package/_esm/auth/utils/index.js +3 -0
  116. package/_esm/auth/utils/index.js.map +1 -0
  117. package/_esm/auth/utils/jwt.js +199 -0
  118. package/_esm/auth/utils/jwt.js.map +1 -0
  119. package/{dist → _esm}/client/cdp.js +16 -13
  120. package/_esm/client/cdp.js.map +1 -0
  121. package/{dist → _esm}/client/evm/evm.js +146 -30
  122. package/_esm/client/evm/evm.js.map +1 -0
  123. package/_esm/client/evm/evm.types.js +2 -0
  124. package/_esm/client/evm/evm.types.js.map +1 -0
  125. package/_esm/client/solana/index.js +2 -0
  126. package/_esm/client/solana/index.js.map +1 -0
  127. package/_esm/client/solana/solana.js +204 -0
  128. package/_esm/client/solana/solana.js.map +1 -0
  129. package/_esm/client/solana/solana.types.js +2 -0
  130. package/_esm/client/solana/solana.types.js.map +1 -0
  131. package/_esm/constants.js +5 -0
  132. package/_esm/constants.js.map +1 -0
  133. package/_esm/errors.js +18 -0
  134. package/_esm/errors.js.map +1 -0
  135. package/_esm/index.js +3 -0
  136. package/_esm/index.js.map +1 -0
  137. package/_esm/openapi-client/cdpApiClient.js +108 -0
  138. package/_esm/openapi-client/cdpApiClient.js.map +1 -0
  139. package/_esm/openapi-client/errors.js +104 -0
  140. package/_esm/openapi-client/errors.js.map +1 -0
  141. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +63 -0
  142. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -0
  143. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +114 -0
  144. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -0
  145. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js +140 -0
  146. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -0
  147. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +61 -0
  148. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -0
  149. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js +172 -0
  150. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js.map +1 -0
  151. package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js +11 -0
  152. package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.js.map +1 -0
  153. package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js +39 -0
  154. package/_esm/openapi-client/generated/evm-token-balances/evm-token-balances.msw.js.map +1 -0
  155. package/_esm/openapi-client/generated/faucets/faucets.js +52 -0
  156. package/_esm/openapi-client/generated/faucets/faucets.js.map +1 -0
  157. package/_esm/openapi-client/generated/faucets/faucets.msw.js +39 -0
  158. package/_esm/openapi-client/generated/faucets/faucets.msw.js.map +1 -0
  159. package/_esm/openapi-client/generated/index.msw.js +6 -0
  160. package/_esm/openapi-client/generated/index.msw.js.map +1 -0
  161. package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js +73 -0
  162. package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -0
  163. package/_esm/openapi-client/generated/solana-accounts/solana-accounts.msw.js +116 -0
  164. package/_esm/openapi-client/generated/solana-accounts/solana-accounts.msw.js.map +1 -0
  165. package/_esm/openapi-client/index.js +31 -0
  166. package/_esm/openapi-client/index.js.map +1 -0
  167. package/_esm/package.json +1 -0
  168. package/_esm/types/calls.js +4 -0
  169. package/_esm/types/calls.js.map +1 -0
  170. package/_esm/types/contract.js +4 -0
  171. package/_esm/types/contract.js.map +1 -0
  172. package/_esm/types/misc.js +3 -0
  173. package/_esm/types/misc.js.map +1 -0
  174. package/_esm/types/multicall.js +2 -0
  175. package/_esm/types/multicall.js.map +1 -0
  176. package/_esm/types/utils.js +4 -0
  177. package/_esm/types/utils.js.map +1 -0
  178. package/_esm/utils/wait.js +32 -0
  179. package/_esm/utils/wait.js.map +1 -0
  180. package/_esm/version.js +2 -0
  181. package/_esm/version.js.map +1 -0
  182. package/{dist → _types}/accounts/evm/toEvmServerAccount.d.ts +3 -2
  183. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -0
  184. package/{dist → _types}/accounts/evm/toEvmSmartAccount.d.ts +3 -2
  185. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -0
  186. package/{dist → _types}/accounts/types.d.ts +3 -2
  187. package/_types/accounts/types.d.ts.map +1 -0
  188. package/{dist → _types}/actions/evm/sendUserOperation.d.ts +5 -5
  189. package/_types/actions/evm/sendUserOperation.d.ts.map +1 -0
  190. package/{dist → _types}/actions/evm/waitForUserOperation.d.ts +4 -3
  191. package/_types/actions/evm/waitForUserOperation.d.ts.map +1 -0
  192. package/{dist → _types}/analytics.d.ts +16 -0
  193. package/_types/analytics.d.ts.map +1 -0
  194. package/{dist → _types}/auth/errors.d.ts +1 -0
  195. package/_types/auth/errors.d.ts.map +1 -0
  196. package/_types/auth/hooks/axios/index.d.ts +2 -0
  197. package/_types/auth/hooks/axios/index.d.ts.map +1 -0
  198. package/{dist → _types}/auth/hooks/axios/withAuth.d.ts +1 -0
  199. package/_types/auth/hooks/axios/withAuth.d.ts.map +1 -0
  200. package/_types/auth/index.d.ts +5 -0
  201. package/_types/auth/index.d.ts.map +1 -0
  202. package/{dist → _types}/auth/utils/http.d.ts +1 -0
  203. package/_types/auth/utils/http.d.ts.map +1 -0
  204. package/_types/auth/utils/index.d.ts +3 -0
  205. package/_types/auth/utils/index.d.ts.map +1 -0
  206. package/{dist → _types}/auth/utils/jwt.d.ts +1 -0
  207. package/_types/auth/utils/jwt.d.ts.map +1 -0
  208. package/{dist → _types}/client/cdp.d.ts +3 -2
  209. package/_types/client/cdp.d.ts.map +1 -0
  210. package/{dist → _types}/client/evm/evm.d.ts +86 -3
  211. package/_types/client/evm/evm.d.ts.map +1 -0
  212. package/{dist → _types}/client/evm/evm.types.d.ts +104 -7
  213. package/_types/client/evm/evm.types.d.ts.map +1 -0
  214. package/_types/client/solana/index.d.ts +2 -0
  215. package/_types/client/solana/index.d.ts.map +1 -0
  216. package/{dist → _types}/client/solana/solana.d.ts +2 -1
  217. package/_types/client/solana/solana.d.ts.map +1 -0
  218. package/{dist → _types}/client/solana/solana.types.d.ts +2 -1
  219. package/_types/client/solana/solana.types.d.ts.map +1 -0
  220. package/{dist → _types}/constants.d.ts +1 -0
  221. package/_types/constants.d.ts.map +1 -0
  222. package/{dist → _types}/errors.d.ts +1 -0
  223. package/_types/errors.d.ts.map +1 -0
  224. package/_types/index.d.ts +4 -0
  225. package/_types/index.d.ts.map +1 -0
  226. package/{dist → _types}/openapi-client/cdpApiClient.d.ts +1 -0
  227. package/_types/openapi-client/cdpApiClient.d.ts.map +1 -0
  228. package/{dist → _types}/openapi-client/errors.d.ts +30 -2
  229. package/_types/openapi-client/errors.d.ts.map +1 -0
  230. package/{dist → _types}/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +100 -14
  231. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -0
  232. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +91 -0
  233. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -0
  234. package/{dist → _types}/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts +5 -2
  235. package/_types/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts.map +1 -0
  236. package/{dist → _types}/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +22 -20
  237. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -0
  238. package/{dist → _types}/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.d.ts +3 -2
  239. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.d.ts.map +1 -0
  240. package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts +20 -0
  241. package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.d.ts.map +1 -0
  242. package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.msw.d.ts +6 -0
  243. package/_types/openapi-client/generated/evm-token-balances/evm-token-balances.msw.d.ts.map +1 -0
  244. package/{dist → _types}/openapi-client/generated/faucets/faucets.d.ts +11 -9
  245. package/_types/openapi-client/generated/faucets/faucets.d.ts.map +1 -0
  246. package/{dist → _types}/openapi-client/generated/faucets/faucets.msw.d.ts +3 -2
  247. package/_types/openapi-client/generated/faucets/faucets.msw.d.ts.map +1 -0
  248. package/_types/openapi-client/generated/index.msw.d.ts +6 -0
  249. package/_types/openapi-client/generated/index.msw.d.ts.map +1 -0
  250. package/{dist → _types}/openapi-client/generated/solana-accounts/solana-accounts.d.ts +21 -20
  251. package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts.map +1 -0
  252. package/{dist → _types}/openapi-client/generated/solana-accounts/solana-accounts.msw.d.ts +3 -2
  253. package/_types/openapi-client/generated/solana-accounts/solana-accounts.msw.d.ts.map +1 -0
  254. package/_types/openapi-client/index.d.ts +61 -0
  255. package/_types/openapi-client/index.d.ts.map +1 -0
  256. package/{dist → _types}/types/calls.d.ts +4 -3
  257. package/_types/types/calls.d.ts.map +1 -0
  258. package/{dist → _types}/types/contract.d.ts +3 -2
  259. package/_types/types/contract.d.ts.map +1 -0
  260. package/_types/types/misc.d.ts +41 -0
  261. package/_types/types/misc.d.ts.map +1 -0
  262. package/{dist → _types}/types/multicall.d.ts +2 -1
  263. package/_types/types/multicall.d.ts.map +1 -0
  264. package/{dist → _types}/types/utils.d.ts +1 -0
  265. package/_types/types/utils.d.ts.map +1 -0
  266. package/{dist → _types}/utils/wait.d.ts +1 -0
  267. package/_types/utils/wait.d.ts.map +1 -0
  268. package/_types/version.d.ts +2 -0
  269. package/_types/version.d.ts.map +1 -0
  270. package/accounts/evm/toEvmServerAccount.ts +60 -0
  271. package/accounts/evm/toEvmSmartAccount.ts +37 -0
  272. package/accounts/types.ts +53 -0
  273. package/actions/evm/sendUserOperation.ts +163 -0
  274. package/actions/evm/waitForUserOperation.ts +115 -0
  275. package/analytics.ts +142 -0
  276. package/auth/README.md +145 -0
  277. package/auth/errors.ts +59 -0
  278. package/auth/hooks/axios/index.ts +1 -0
  279. package/auth/hooks/axios/withAuth.ts +121 -0
  280. package/auth/index.ts +5 -0
  281. package/auth/utils/http.ts +146 -0
  282. package/auth/utils/index.ts +2 -0
  283. package/auth/utils/jwt.ts +324 -0
  284. package/client/cdp.ts +116 -0
  285. package/client/evm/evm.ts +739 -0
  286. package/client/evm/evm.types.ts +408 -0
  287. package/client/solana/index.ts +1 -0
  288. package/client/solana/solana.ts +237 -0
  289. package/client/solana/solana.types.ts +114 -0
  290. package/constants.ts +4 -0
  291. package/errors.ts +17 -0
  292. package/index.ts +4 -0
  293. package/openapi-client/cdpApiClient.ts +221 -0
  294. package/openapi-client/errors.ts +132 -0
  295. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +512 -0
  296. package/openapi-client/generated/evm-accounts/evm-accounts.msw.ts +271 -0
  297. package/openapi-client/generated/evm-accounts/evm-accounts.ts +194 -0
  298. package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.ts +283 -0
  299. package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +132 -0
  300. package/openapi-client/generated/evm-token-balances/evm-token-balances.msw.ts +57 -0
  301. package/openapi-client/generated/evm-token-balances/evm-token-balances.ts +37 -0
  302. package/openapi-client/generated/faucets/faucets.msw.ts +76 -0
  303. package/openapi-client/generated/faucets/faucets.ts +84 -0
  304. package/openapi-client/generated/index.msw.ts +5 -0
  305. package/openapi-client/generated/solana-accounts/solana-accounts.msw.ts +219 -0
  306. package/openapi-client/generated/solana-accounts/solana-accounts.ts +143 -0
  307. package/openapi-client/index.ts +36 -0
  308. package/package.json +31 -66
  309. package/types/calls.ts +40 -0
  310. package/types/contract.ts +126 -0
  311. package/types/misc.ts +44 -0
  312. package/types/multicall.ts +29 -0
  313. package/types/utils.ts +288 -0
  314. package/utils/wait.ts +52 -0
  315. package/version.ts +1 -0
  316. package/dist/auth/hooks/axios/index.d.ts +0 -1
  317. package/dist/auth/index.d.ts +0 -4
  318. package/dist/auth/utils/index.d.ts +0 -2
  319. package/dist/client/evm/index.d.ts +0 -1
  320. package/dist/client/evm/index.js +0 -5
  321. package/dist/client/solana/index.d.ts +0 -1
  322. package/dist/index.d.ts +0 -3
  323. package/dist/openapi-client/cdpApiClient.js +0 -146
  324. package/dist/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +0 -54
  325. package/dist/openapi-client/generated/evm-accounts/evm-accounts.d.ts +0 -62
  326. package/dist/openapi-client/generated/evm-accounts/evm-accounts.js +0 -85
  327. package/dist/openapi-client/generated/evm-accounts/evm-accounts.msw.js +0 -113
  328. package/dist/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +0 -66
  329. package/dist/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js +0 -99
  330. package/dist/openapi-client/generated/index.msw.d.ts +0 -4
  331. package/dist/openapi-client/index.d.ts +0 -55
  332. package/dist/types/misc.d.ts +0 -3
@@ -1,6 +1,6 @@
1
- import { SendUserOperationReturnType } from "../../actions/evm/sendUserOperation";
2
- import { WaitForUserOperationReturnType } from "../../actions/evm/waitForUserOperation";
3
- import { CreateServerAccountOptions, GetServerAccountOptions, ListServerAccountsOptions, CreateSmartAccountOptions, RequestFaucetOptions, SendUserOperationOptions, WaitForUserOperationOptions, RequestFaucetResult, SignHashOptions, SignatureResult, SignMessageOptions, SignTransactionOptions, GetSmartAccountOptions, SmartAccount, ServerAccount, EvmClientInterface, ListServerAccountResult, PrepareUserOperationOptions, UserOperation, GetUserOperationOptions, ListSmartAccountResult, ListSmartAccountsOptions } from "./evm.types";
1
+ import { CreateServerAccountOptions, GetServerAccountOptions, ListServerAccountsOptions, CreateSmartAccountOptions, RequestFaucetOptions, SendUserOperationOptions, WaitForUserOperationOptions, RequestFaucetResult, SignHashOptions, SignatureResult, SignMessageOptions, SignTransactionOptions, GetSmartAccountOptions, SmartAccount, ServerAccount, EvmClientInterface, ListServerAccountResult, PrepareUserOperationOptions, UserOperation, GetUserOperationOptions, ListSmartAccountResult, ListSmartAccountsOptions, ListTokenBalancesOptions, ListTokenBalancesResult, SendTransactionOptions, TransactionResult } from "./evm.types.js";
2
+ import { SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
3
+ import { WaitForUserOperationReturnType } from "../../actions/evm/waitForUserOperation.js";
4
4
  /**
5
5
  * The namespace containing all EVM methods.
6
6
  */
@@ -175,6 +175,41 @@ export declare class EvmClient implements EvmClientInterface {
175
175
  * ```
176
176
  */
177
177
  listAccounts(options?: ListServerAccountsOptions): Promise<ListServerAccountResult>;
178
+ /**
179
+ * Lists CDP EVM token balances.
180
+ *
181
+ * @param {ListTokenBalancesOptions} options - Parameters for listing the token balances.
182
+ * @param {number} [options.pageSize] - The number of token balances to return.
183
+ * @param {string} [options.pageToken] - The page token to begin listing from.
184
+ * This is obtained by previous calls to this method.
185
+ *
186
+ * @returns A promise that resolves to an array of token balances, and a token to paginate through the token balances.
187
+ *
188
+ * @example
189
+ * ```ts
190
+ * const tokenBalances = await cdp.evm.listTokenBalances({
191
+ * address: "0x1234567890123456789012345678901234567890",
192
+ * network: "base-sepolia",
193
+ * });
194
+ * ```
195
+ *
196
+ * @example
197
+ * **With pagination**
198
+ * ```ts
199
+ * let page = await cdp.evm.listTokenBalances({
200
+ * address: "0x1234567890123456789012345678901234567890",
201
+ * network: "base-sepolia",
202
+ * });
203
+ *
204
+ * while (page.nextPageToken) {
205
+ * page = await cdp.evm.listTokenBalances({
206
+ * address: "0x1234567890123456789012345678901234567890",
207
+ * network: "base-sepolia",
208
+ * pageToken: page.nextPageToken,
209
+ * });
210
+ * }
211
+ */
212
+ listTokenBalances(options: ListTokenBalancesOptions): Promise<ListTokenBalancesResult>;
178
213
  /**
179
214
  * Lists CDP EVM smart accounts.
180
215
  *
@@ -247,6 +282,53 @@ export declare class EvmClient implements EvmClientInterface {
247
282
  * ```
248
283
  */
249
284
  requestFaucet(options: RequestFaucetOptions): Promise<RequestFaucetResult>;
285
+ /**
286
+ * Signs an EVM transaction and sends it to the specified network using the Coinbase API.
287
+ * This method handles nonce management and gas estimation automatically.
288
+ *
289
+ * @param {SendTransactionOptions} options - Configuration options for sending the transaction.
290
+ * @returns A promise that resolves to the transaction hash.
291
+ *
292
+ * @example
293
+ * **Sending an RLP-encoded transaction**
294
+ * ```ts
295
+ * import { parseEther, serializeTransaction } from "viem";
296
+ * import { baseSepolia } from "viem/chains";
297
+ *
298
+ * const { transactionHash } = await cdp.evm.sendTransaction({
299
+ * address: account.address,
300
+ * transaction: serializeTransaction({
301
+ * to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
302
+ * value: parseEther("0.000001"),
303
+ * chainId: baseSepolia.id,
304
+ * // Fields below are optional, CDP API will populate them if omitted.
305
+ * // nonce
306
+ * // maxPriorityFeePerGas
307
+ * // maxFeePerGas
308
+ * // gas
309
+ * }),
310
+ * network: "base-sepolia",
311
+ * });
312
+ * ```
313
+ * @example
314
+ * **Sending an EIP-1559 transaction request object**
315
+ * ```ts
316
+ * const { transactionHash } = await cdp.evm.sendTransaction({
317
+ * address: account.address,
318
+ * transaction: {
319
+ * to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
320
+ * value: parseEther("0.000001"),
321
+ * // Fields below are optional, CDP API will populate them if omitted.
322
+ * // nonce
323
+ * // maxPriorityFeePerGas
324
+ * // maxFeePerGas
325
+ * // gas
326
+ * },
327
+ * network: "base-sepolia",
328
+ * });
329
+ * ```
330
+ */
331
+ sendTransaction(options: SendTransactionOptions): Promise<TransactionResult>;
250
332
  /**
251
333
  * Sends a user operation.
252
334
  *
@@ -385,3 +467,4 @@ export declare class EvmClient implements EvmClientInterface {
385
467
  */
386
468
  waitForUserOperation(options: WaitForUserOperationOptions): Promise<WaitForUserOperationReturnType>;
387
469
  }
470
+ //# sourceMappingURL=evm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,2BAA2B,EAC3B,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAEL,2BAA2B,EAC5B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,8BAA8B,EAC/B,MAAM,2CAA2C,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;;;;;;;;;;;;;;;;;;OA6CG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwBlF;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAShG;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAclE;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;IAcxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC;IAchF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,oBAAoB,CACxB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,8BAA8B,CAAC;CAK3C"}
@@ -1,13 +1,13 @@
1
- import type { EvmUserOperationNetwork, EvmUserOperationStatus, OpenApiEvmMethods } from "../../openapi-client";
2
- import { EvmAccount as Account, EvmServerAccount as ServerAccount, EvmSmartAccount as SmartAccount } from "../../accounts/types";
3
- import { Call, Calls } from "../../types/calls";
4
- import { Address, Hex } from "../../types/misc";
5
- import { WaitOptions } from "../../utils/wait";
6
- import { SendUserOperationReturnType } from "../../actions/evm/sendUserOperation";
1
+ import { EvmAccount as Account, EvmServerAccount as ServerAccount, EvmSmartAccount as SmartAccount } from "../../accounts/types.js";
2
+ import { SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
3
+ import { EvmUserOperationNetwork, EvmUserOperationStatus, OpenApiEvmMethods, ListEvmTokenBalancesNetwork, SendEvmTransactionBodyNetwork } from "../../openapi-client/index.js";
4
+ import { Call, Calls } from "../../types/calls.js";
5
+ import { Address, Hex, TransactionRequestEIP1559 } from "../../types/misc.js";
6
+ import { WaitOptions } from "../../utils/wait.js";
7
7
  /**
8
8
  * The EvmClient type, where all OpenApiEvmMethods methods are wrapped.
9
9
  */
10
- export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccount" | "createEvmSmartAccount" | "getEvmAccount" | "getEvmAccountByName" | "getEvmSmartAccount" | "getUserOperation" | "listEVMBalances" | "listEvmAccounts" | "listEvmSmartAccounts" | "prepareUserOperation" | "requestEvmFaucet" | "sendUserOperation" | "signEvmHash" | "signEvmMessage" | "signEvmTransaction"> & {
10
+ export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccount" | "createEvmSmartAccount" | "getEvmAccount" | "getEvmAccountByName" | "getEvmSmartAccount" | "getUserOperation" | "listEvmAccounts" | "listEvmSmartAccounts" | "listEvmTokenBalances" | "prepareUserOperation" | "requestEvmFaucet" | "sendUserOperation" | "signEvmHash" | "signEvmMessage" | "signEvmTransaction" | "sendEvmTransaction"> & {
11
11
  createAccount: (options: CreateServerAccountOptions) => Promise<ServerAccount>;
12
12
  createSmartAccount: (options: CreateSmartAccountOptions) => Promise<SmartAccount>;
13
13
  getAccount: (options: GetServerAccountOptions) => Promise<ServerAccount>;
@@ -15,8 +15,10 @@ export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccoun
15
15
  getUserOperation: (options: GetUserOperationOptions) => Promise<UserOperation>;
16
16
  listAccounts: (options: ListServerAccountsOptions) => Promise<ListServerAccountResult>;
17
17
  listSmartAccounts: (options: ListSmartAccountsOptions) => Promise<ListSmartAccountResult>;
18
+ listTokenBalances: (options: ListTokenBalancesOptions) => Promise<ListTokenBalancesResult>;
18
19
  prepareUserOperation: (options: PrepareUserOperationOptions) => Promise<UserOperation>;
19
20
  requestFaucet: (options: RequestFaucetOptions) => Promise<RequestFaucetResult>;
21
+ sendTransaction: (options: SendTransactionOptions) => Promise<TransactionResult>;
20
22
  sendUserOperation: (options: SendUserOperationOptions) => Promise<SendUserOperationReturnType>;
21
23
  signHash: (options: SignHashOptions) => Promise<SignatureResult>;
22
24
  signMessage: (options: SignMessageOptions) => Promise<SignatureResult>;
@@ -186,6 +188,28 @@ export interface RequestFaucetResult {
186
188
  /** The transaction hash. */
187
189
  transactionHash: Hex;
188
190
  }
191
+ /**
192
+ * Options for sending an EVM transaction.
193
+ */
194
+ export interface SendTransactionOptions {
195
+ /** The address of the account. */
196
+ address: Address;
197
+ /**
198
+ * The transaction to send. The chainId is ignored in favor of the `network` field.
199
+ *
200
+ * This can be either:
201
+ * - An RLP-encoded transaction to sign and send, as a 0x-prefixed hex string, or
202
+ * - An EIP-1559 transaction request object.
203
+ */
204
+ transaction: Hex | TransactionRequestEIP1559;
205
+ /**
206
+ * The network to send the transaction to.
207
+ * The chainId in the `transaction` field is ignored in favor of this field.
208
+ */
209
+ network: SendEvmTransactionBodyNetwork;
210
+ /** The idempotency key. */
211
+ idempotencyKey?: string;
212
+ }
189
213
  /**
190
214
  * Options for sending a user operation.
191
215
  */
@@ -241,6 +265,13 @@ export interface SignatureResult {
241
265
  /** The signature. */
242
266
  signature: Hex;
243
267
  }
268
+ /**
269
+ * Result of a transaction
270
+ */
271
+ export interface TransactionResult {
272
+ /** The hash of the transaction. */
273
+ transactionHash: Hex;
274
+ }
244
275
  /**
245
276
  * Options for waiting for a user operation.
246
277
  */
@@ -252,3 +283,69 @@ export interface WaitForUserOperationOptions {
252
283
  /** The wait options. */
253
284
  waitOptions?: WaitOptions;
254
285
  }
286
+ /**
287
+ * Options for listing EVM token balances.
288
+ */
289
+ export interface ListTokenBalancesOptions {
290
+ /** The address of the account. */
291
+ address: Address;
292
+ /** The network. */
293
+ network: ListEvmTokenBalancesNetwork;
294
+ /** The page size to paginate through the token balances. */
295
+ pageSize?: number;
296
+ /** The page token to paginate through the token balances. */
297
+ pageToken?: string;
298
+ }
299
+ /**
300
+ * A token on an EVM network, which is either an ERC-20 or a native token (i.e. ETH).
301
+ */
302
+ export interface EvmToken {
303
+ /**
304
+ * The contract address of the token. For Ether, the contract address is 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
305
+ * per EIP-7528. For ERC-20 tokens, this is the contract address where the token is deployed.
306
+ */
307
+ contractAddress: Address;
308
+ /** The network the token is on. */
309
+ network: ListEvmTokenBalancesNetwork;
310
+ /**
311
+ * The symbol of the token, which is optional and non-unique. Note: This field
312
+ * may not be present for most tokens while the API is still under development.
313
+ */
314
+ symbol?: string;
315
+ /**
316
+ * The name of the token, which is optional and non-unique. Note: This field
317
+ * may not be present for most tokens while the API is still under development.
318
+ */
319
+ name?: string;
320
+ }
321
+ /**
322
+ * A token amount on an EVM network.
323
+ */
324
+ export interface EvmTokenAmount {
325
+ /** The amount of the token in the smallest indivisible unit of the token. */
326
+ amount: bigint;
327
+ /** The number of decimals in the token. */
328
+ decimals: bigint;
329
+ }
330
+ /**
331
+ * An EVM token balance.
332
+ */
333
+ export interface EvmTokenBalance {
334
+ /** The token. */
335
+ token: EvmToken;
336
+ /** The amount of the token. */
337
+ amount: EvmTokenAmount;
338
+ }
339
+ /**
340
+ * The result of listing EVM token balances.
341
+ */
342
+ export interface ListTokenBalancesResult {
343
+ /** The token balances. */
344
+ balances: EvmTokenBalance[];
345
+ /**
346
+ * The next page token to paginate through the token balances.
347
+ * If undefined, there are no more token balances to paginate through.
348
+ */
349
+ nextPageToken?: string;
350
+ }
351
+ //# sourceMappingURL=evm.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evm.types.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,IAAI,OAAO,EACrB,gBAAgB,IAAI,aAAa,EACjC,eAAe,IAAI,YAAY,EAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,2BAA2B,E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AE,OAAO,CAAC;IACzB,mCAAmC;IACnC,OAAO,EAAE,2BAA2B,CAAC;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iBAAiB;IACjB,KAAK,EAAE,QAAQ,CAAC;IAChB,+BAA+B;IAC/B,MAAM,EAAE,cAAc,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export { SolanaClient } from "./solana.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../client/solana/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
@@ -1,4 +1,4 @@
1
- import { SolanaClientInterface, Account, CreateAccountOptions, GetAccountOptions, ListAccountsOptions, RequestFaucetOptions, ListAccountsResult, SignatureResult, SignMessageOptions, SignTransactionOptions } from "./solana.types";
1
+ import { SolanaClientInterface, Account, CreateAccountOptions, GetAccountOptions, ListAccountsOptions, RequestFaucetOptions, ListAccountsResult, SignatureResult, SignMessageOptions, SignTransactionOptions } from "./solana.types.js";
2
2
  /**
3
3
  * The namespace containing all Solana methods.
4
4
  */
@@ -166,3 +166,4 @@ export declare class SolanaClient implements SolanaClientInterface {
166
166
  */
167
167
  signTransaction(options: SignTransactionOptions): Promise<SignatureResult>;
168
168
  }
169
+ //# sourceMappingURL=solana.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../client/solana/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAG3B;;GAEG;AACH,qBAAa,YAAa,YAAW,qBAAqB;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAY9D;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAYlF;;;;;;;;;;;;;;;;;OAiBG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IAW5E;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;IAUxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC;CAajF"}
@@ -1,4 +1,4 @@
1
- import { OpenApiSolanaMethods, SolanaAccount as OpenAPISolanaAccount } from "../../openapi-client";
1
+ import { OpenApiSolanaMethods, SolanaAccount as OpenAPISolanaAccount } from "../../openapi-client/index.js";
2
2
  /**
3
3
  * The SolanaClient type, where all OpenApiSolanaMethods methods are wrapped.
4
4
  */
@@ -92,3 +92,4 @@ export interface SignatureResult {
92
92
  /** The signature. */
93
93
  signature: string;
94
94
  }
95
+ //# sourceMappingURL=solana.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solana.types.d.ts","sourceRoot":"","sources":["../../../client/solana/solana.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,aAAa,IAAI,oBAAoB,EACtC,MAAM,+BAA+B,CAAC;AACvC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,OAAO,oBAAoB,EACzB,qBAAqB,GACrB,kBAAkB,GAClB,wBAAwB,GACxB,oBAAoB,GACpB,qBAAqB,GACrB,mBAAmB,GACnB,uBAAuB,CAC1B,GAAG;IACF,aAAa,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,UAAU,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7D,YAAY,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC5E,aAAa,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAC3E,WAAW,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IACvE,eAAe,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;CAChF,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,oBAAoB,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,oBAAoB;IACpB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;IACtB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -2,3 +2,4 @@
2
2
  * The URL to the Coinbase CDP API error docs page.
3
3
  */
4
4
  export declare const ERROR_DOCS_PAGE_URL = "https://docs.cdp.coinbase.com/api-v2/docs/errors";
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB,qDAAqD,CAAC"}
@@ -9,3 +9,4 @@ export declare class TimeoutError extends Error {
9
9
  */
10
10
  constructor(message?: string);
11
11
  }
12
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC;;;;OAIG;gBACS,OAAO,GAAE,MAAwB;CAO9C"}
@@ -0,0 +1,4 @@
1
+ import "./analytics.js";
2
+ export { CdpClient } from "./client/cdp.js";
3
+ export type { EvmServerAccount, EvmSmartAccount } from "./accounts/types.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
@@ -48,3 +48,4 @@ export declare const configure: (options: CdpOptions) => void;
48
48
  * @throws {APIError} If the request fails.
49
49
  */
50
50
  export declare const cdpApiClient: <T>(config: AxiosRequestConfig, idempotencyKey?: string) => Promise<T>;
51
+ //# sourceMappingURL=cdpApiClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdpApiClient.d.ts","sourceRoot":"","sources":["../../openapi-client/cdpApiClient.ts"],"names":[],"mappings":"AACA,OAAc,EAAiB,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAYjE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,SAAS,UAAU,SAc5C,CAAC;AA0BF;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAU,CAAC,EAClC,QAAQ,kBAAkB,EAC1B,iBAAiB,MAAM,KACtB,OAAO,CAAC,CAAC,CAuFX,CAAC"}
@@ -1,10 +1,11 @@
1
- import { Error as OpenAPIError, ErrorType as OpenAPIErrorType } from "./generated/coinbaseDeveloperPlatformAPIs.schemas";
1
+ import { Error as OpenAPIError, ErrorType as OpenAPIErrorType } from "./generated/coinbaseDeveloperPlatformAPIs.schemas.js";
2
2
  export declare const HttpErrorType: {
3
3
  readonly unexpected_error: "unexpected_error";
4
4
  readonly unauthorized: "unauthorized";
5
5
  readonly not_found: "not_found";
6
6
  readonly bad_gateway: "bad_gateway";
7
7
  readonly service_unavailable: "service_unavailable";
8
+ readonly unknown: "unknown";
8
9
  };
9
10
  export type HttpErrorType = (typeof HttpErrorType)[keyof typeof HttpErrorType];
10
11
  /**
@@ -28,8 +29,9 @@ export declare class APIError extends Error {
28
29
  * @param errorMessage - The error message
29
30
  * @param correlationId - The correlation ID
30
31
  * @param errorLink - URL to documentation about this error
32
+ * @param cause - The cause of the error
31
33
  */
32
- constructor(statusCode: number, errorType: APIErrorType, errorMessage: string, correlationId?: string, errorLink?: string);
34
+ constructor(statusCode: number, errorType: APIErrorType, errorMessage: string, correlationId?: string, errorLink?: string, cause?: Error);
33
35
  /**
34
36
  * Convert the error to a JSON object, excluding undefined properties
35
37
  *
@@ -44,6 +46,31 @@ export declare class APIError extends Error {
44
46
  errorMessage: string;
45
47
  };
46
48
  }
49
+ /**
50
+ * Error thrown when an Axios request is made but no response is received
51
+ */
52
+ export declare class UnknownApiError extends APIError {
53
+ /**
54
+ * Constructor for the UnknownApiError class
55
+ *
56
+ * @param errorType - The type of error
57
+ * @param errorMessage - The error message
58
+ * @param cause - The cause of the error
59
+ */
60
+ constructor(errorType: APIErrorType, errorMessage: string, cause?: Error);
61
+ }
62
+ /**
63
+ * Error thrown when an error is not known
64
+ */
65
+ export declare class UnknownError extends Error {
66
+ /**
67
+ * Constructor for the UnknownError class
68
+ *
69
+ * @param message - The error message
70
+ * @param cause - The cause of the error
71
+ */
72
+ constructor(message: string, cause?: Error);
73
+ }
47
74
  /**
48
75
  * Type guard to check if an object is an OpenAPIError
49
76
  *
@@ -51,3 +78,4 @@ export declare class APIError extends Error {
51
78
  * @returns True if the object is an OpenAPIError
52
79
  */
53
80
  export declare function isOpenAPIError(obj: unknown): obj is OpenAPIError;
81
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../openapi-client/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,YAAY,EACrB,SAAS,IAAI,gBAAgB,EAC9B,MAAM,sDAAsD,CAAC;AAE9D,eAAO,MAAM,aAAa;;;;;;;CAOhB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC;AAE5D;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,YAAY,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;OASG;gBAED,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,YAAY,EACvB,YAAY,EAAE,MAAM,EACpB,aAAa,CAAC,EAAE,MAAM,EACtB,SAAS,CAAC,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,KAAK;IAmBf;;;;OAIG;IACH,MAAM;;;;;;;;CAUP;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,QAAQ;IAC3C;;;;;;OAMG;gBACS,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAIzE;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC;;;;;OAKG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAI3C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,YAAY,CAShE"}
@@ -26,7 +26,7 @@ export interface ListResponse {
26
26
  /**
27
27
  * The code that indicates the type of error that occurred. These error codes can be used to determine how to handle the error.
28
28
  */
29
- export type ErrorType = typeof ErrorType[keyof typeof ErrorType];
29
+ export type ErrorType = (typeof ErrorType)[keyof typeof ErrorType];
30
30
  export declare const ErrorType: {
31
31
  readonly already_exists: "already_exists";
32
32
  readonly faucet_limit_exceeded: "faucet_limit_exceeded";
@@ -41,6 +41,7 @@ export declare const ErrorType: {
41
41
  readonly request_canceled: "request_canceled";
42
42
  readonly timed_out: "timed_out";
43
43
  readonly unauthorized: "unauthorized";
44
+ readonly policy_violation: "policy_violation";
44
45
  };
45
46
  /**
46
47
  * An error response including the code for the type of error and a human-readable message describing the error.
@@ -87,15 +88,15 @@ export interface EvmCall {
87
88
  /**
88
89
  * The network the user operation is for.
89
90
  */
90
- export type EvmUserOperationNetwork = typeof EvmUserOperationNetwork[keyof typeof EvmUserOperationNetwork];
91
+ export type EvmUserOperationNetwork = (typeof EvmUserOperationNetwork)[keyof typeof EvmUserOperationNetwork];
91
92
  export declare const EvmUserOperationNetwork: {
92
- readonly 'base-sepolia': "base-sepolia";
93
+ readonly "base-sepolia": "base-sepolia";
93
94
  readonly base: "base";
94
95
  };
95
96
  /**
96
97
  * The status of the user operation.
97
98
  */
98
- export type EvmUserOperationStatus = typeof EvmUserOperationStatus[keyof typeof EvmUserOperationStatus];
99
+ export type EvmUserOperationStatus = (typeof EvmUserOperationStatus)[keyof typeof EvmUserOperationStatus];
99
100
  export declare const EvmUserOperationStatus: {
100
101
  readonly pending: "pending";
101
102
  readonly signed: "signed";
@@ -121,6 +122,57 @@ export interface EvmUserOperation {
121
122
  */
122
123
  transactionHash?: string;
123
124
  }
125
+ /**
126
+ * The name of the supported EVM networks in human-readable format.
127
+ */
128
+ export type ListEvmTokenBalancesNetwork = (typeof ListEvmTokenBalancesNetwork)[keyof typeof ListEvmTokenBalancesNetwork];
129
+ export declare const ListEvmTokenBalancesNetwork: {
130
+ readonly base: "base";
131
+ readonly "base-sepolia": "base-sepolia";
132
+ };
133
+ /**
134
+ * Amount of a given token.
135
+ */
136
+ export interface TokenAmount {
137
+ /**
138
+ * The amount is denominated in the smallest indivisible unit of the token. For ETH, the smallest indivisible unit is Wei (10^-18 ETH). For ERC-20s, the smallest unit is the unit returned from `function totalSupply() public view returns (uint256)`.
139
+ * @pattern ^[0-9]+$
140
+ */
141
+ amount: string;
142
+ /** 'decimals' is the exponential value N that satisfies the equation `amount * 10^-N = standard_denomination`. The standard denomination is the most commonly used denomination for the token.
143
+ - In the case of the native gas token, `decimals` is defined via convention. As an example, for ETH of Ethereum mainnet, the standard denomination is 10^-18 the smallest denomination (Wei). As such, for ETH on Ethereum mainnet, `decimals` is 18. - In the case of ERC-20 tokens, `decimals` is defined via configuration. `decimals` will be the number returned by `function decimals() public view returns (uint8)` on the underlying token contract.
144
+ Not all tokens have a `decimals` field, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#decimals). This field will be left empty if the underlying token contract doesn't implement `decimals`.
145
+ Further, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future. */
146
+ decimals: number;
147
+ }
148
+ /**
149
+ * General information about a token. Includes the type, the network, and other identifying information.
150
+ */
151
+ export interface Token {
152
+ network: ListEvmTokenBalancesNetwork;
153
+ /** The symbol of this token (ex: SOL, ETH, USDC).
154
+ The token symbol is not unique. It is possible for two different tokens to have the same symbol.
155
+ For native gas tokens, this symbol is defined via convention. As an example, for ETH on Ethereum mainnet, the symbol is "ETH". For ERC-20 tokens, this symbol is defined via configuration. `symbol` will be the string returned by `function symbol() public view returns (string)` on the underlying token contract.
156
+ Not all tokens have a symbol, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#symbol). This field will only be populated when the token's underlying ERC-20 contract has a `symbol()` function.
157
+ Further, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future. */
158
+ symbol?: string;
159
+ /** The name of this token (ex: "Solana", "Ether", "USD Coin").
160
+ The token name is not unique. It is possible for two different tokens to have the same name.
161
+ For native gas tokens, this name is defined via convention. As an example, for ETH on Ethereum mainnet, the name is "Ether". For ERC-20 tokens, this name is defined via configuration. `name` will be the string returned by `function name() public view returns (string)` on the underlying token contract.
162
+ Not all tokens have a name, as this function is [optional in the ERC-20 specification](https://eips.ethereum.org/EIPS/eip-20#name). This field will only be populated when the token's underlying ERC-20 contract has a `name()` function.
163
+ Further, this endpoint will only populate this value for a small subset of whitelisted ERC-20 tokens at this time. We intend to improve coverage in the future. */
164
+ name?: string;
165
+ /**
166
+ * The contract address of the token.
167
+ For Ether, the contract address is `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` per [EIP-7528](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7528.md). For ERC-20 tokens, this is the contract address where the token is deployed.
168
+ * @pattern ^0x[0-9a-fA-F]{40}$
169
+ */
170
+ contractAddress: string;
171
+ }
172
+ export interface TokenBalance {
173
+ amount: TokenAmount;
174
+ token: Token;
175
+ }
124
176
  export interface SolanaAccount {
125
177
  /**
126
178
  * The base58 encoded Solana address.
@@ -149,7 +201,7 @@ export type IdempotencyErrorResponse = Error;
149
201
  export type AlreadyExistsErrorResponse = Error;
150
202
  /**
151
203
  * A JWT signed using your Wallet Secret, encoded in base64. Refer to the
152
- [Generate a Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#3-generate-a-wallet-token)
204
+ [Generate Wallet Token](https://docs.cdp.coinbase.com/api-v2/docs/authentication#2-generate-wallet-token)
153
205
  section of our Authentication docs for more details on how to generate your Wallet Token.
154
206
 
155
207
  */
@@ -185,6 +237,24 @@ export type CreateEvmAccountBody = {
185
237
  */
186
238
  name?: string;
187
239
  };
240
+ /**
241
+ * The network to send the transaction to.
242
+ */
243
+ export type SendEvmTransactionBodyNetwork = (typeof SendEvmTransactionBodyNetwork)[keyof typeof SendEvmTransactionBodyNetwork];
244
+ export declare const SendEvmTransactionBodyNetwork: {
245
+ readonly base: "base";
246
+ readonly "base-sepolia": "base-sepolia";
247
+ };
248
+ export type SendEvmTransactionBody = {
249
+ /** The network to send the transaction to. */
250
+ network: SendEvmTransactionBodyNetwork;
251
+ /** The RLP-encoded transaction to sign and send, as a 0x-prefixed hex string. */
252
+ transaction: string;
253
+ };
254
+ export type SendEvmTransaction200 = {
255
+ /** The hash of the transaction, as a 0x-prefixed hex string. */
256
+ transactionHash: string;
257
+ };
188
258
  export type SignEvmTransactionBody = {
189
259
  /** The RLP-encoded transaction to sign, as a 0x-prefixed hex string. */
190
260
  transaction: string;
@@ -231,9 +301,9 @@ export type CreateEvmSmartAccountBody = {
231
301
  /**
232
302
  * The network to prepare the user operation for.
233
303
  */
234
- export type PrepareUserOperationBodyNetwork = typeof PrepareUserOperationBodyNetwork[keyof typeof PrepareUserOperationBodyNetwork];
304
+ export type PrepareUserOperationBodyNetwork = (typeof PrepareUserOperationBodyNetwork)[keyof typeof PrepareUserOperationBodyNetwork];
235
305
  export declare const PrepareUserOperationBodyNetwork: {
236
- readonly 'base-sepolia': "base-sepolia";
306
+ readonly "base-sepolia": "base-sepolia";
237
307
  readonly base: "base";
238
308
  };
239
309
  export type PrepareUserOperationBody = {
@@ -245,21 +315,36 @@ export type PrepareUserOperationBody = {
245
315
  paymasterUrl?: string;
246
316
  };
247
317
  export type SendUserOperationBody = {
248
- /** The hex-encoded signature of the user operation. */
318
+ /** The hex-encoded signature of the user operation. This should be a 65-byte signature consisting of the `r`, `s`, and `v` values of the ECDSA signature. Note that the `v` value should conform to the `personal_sign` standard, which means it should be 27 or 28. */
249
319
  signature: string;
250
320
  };
321
+ export type ListEvmTokenBalancesParams = {
322
+ /**
323
+ * The number of balances to return per page.
324
+ */
325
+ pageSize?: number;
326
+ /**
327
+ * The token for the next page of balances. Will be empty if there are no more balances to fetch.
328
+ */
329
+ pageToken?: string;
330
+ };
331
+ export type ListEvmTokenBalances200AllOf = {
332
+ /** The list of EVM token balances. */
333
+ balances: TokenBalance[];
334
+ };
335
+ export type ListEvmTokenBalances200 = ListEvmTokenBalances200AllOf & ListResponse;
251
336
  /**
252
337
  * The network to request funds from.
253
338
  */
254
- export type RequestEvmFaucetBodyNetwork = typeof RequestEvmFaucetBodyNetwork[keyof typeof RequestEvmFaucetBodyNetwork];
339
+ export type RequestEvmFaucetBodyNetwork = (typeof RequestEvmFaucetBodyNetwork)[keyof typeof RequestEvmFaucetBodyNetwork];
255
340
  export declare const RequestEvmFaucetBodyNetwork: {
256
- readonly 'base-sepolia': "base-sepolia";
257
- readonly 'ethereum-sepolia': "ethereum-sepolia";
341
+ readonly "base-sepolia": "base-sepolia";
342
+ readonly "ethereum-sepolia": "ethereum-sepolia";
258
343
  };
259
344
  /**
260
345
  * The token to request funds for.
261
346
  */
262
- export type RequestEvmFaucetBodyToken = typeof RequestEvmFaucetBodyToken[keyof typeof RequestEvmFaucetBodyToken];
347
+ export type RequestEvmFaucetBodyToken = (typeof RequestEvmFaucetBodyToken)[keyof typeof RequestEvmFaucetBodyToken];
263
348
  export declare const RequestEvmFaucetBodyToken: {
264
349
  readonly eth: "eth";
265
350
  readonly usdc: "usdc";
@@ -279,7 +364,7 @@ export type RequestEvmFaucetBody = {
279
364
  };
280
365
  export type RequestEvmFaucet200 = {
281
366
  /** The hash of the transaction that requested the funds.
282
- **Note:** In rare cases, when gas conditions are unusually high, the transaction may not confirm, and the system may issue a replacement transaction to complete the faucet request. In these rare cases, the `transactionHash` will be out of sync with the actual faucet transaction that was confirmed onchain. */
367
+ **Note:** In rare cases, when gas conditions are unusually high, the transaction may not confirm, and the system may issue a replacement transaction to complete the faucet request. In these rare cases, the `transactionHash` will be out of sync with the actual faucet transaction that was confirmed onchain. */
283
368
  transactionHash: string;
284
369
  };
285
370
  export type ListSolanaAccountsParams = {
@@ -325,7 +410,7 @@ export type SignSolanaMessage200 = {
325
410
  /**
326
411
  * The token to request funds for.
327
412
  */
328
- export type RequestSolanaFaucetBodyToken = typeof RequestSolanaFaucetBodyToken[keyof typeof RequestSolanaFaucetBodyToken];
413
+ export type RequestSolanaFaucetBodyToken = (typeof RequestSolanaFaucetBodyToken)[keyof typeof RequestSolanaFaucetBodyToken];
329
414
  export declare const RequestSolanaFaucetBodyToken: {
330
415
  readonly sol: "sol";
331
416
  readonly usdc: "usdc";
@@ -343,3 +428,4 @@ export type RequestSolanaFaucet200 = {
343
428
  /** The signature identifying the transaction that requested the funds. */
344
429
  transactionSignature: string;
345
430
  };
431
+ //# sourceMappingURL=coinbaseDeveloperPlatformAPIs.schemas.d.ts.map