@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
@@ -0,0 +1,641 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EvmClient = void 0;
4
+ const viem_1 = require("viem");
5
+ const toEvmServerAccount_js_1 = require("../../accounts/evm/toEvmServerAccount.js");
6
+ const toEvmSmartAccount_js_1 = require("../../accounts/evm/toEvmSmartAccount.js");
7
+ const sendUserOperation_js_1 = require("../../actions/evm/sendUserOperation.js");
8
+ const waitForUserOperation_js_1 = require("../../actions/evm/waitForUserOperation.js");
9
+ const index_js_1 = require("../../openapi-client/index.js");
10
+ /**
11
+ * The namespace containing all EVM methods.
12
+ */
13
+ class EvmClient {
14
+ /**
15
+ * Creates a new CDP EVM account.
16
+ *
17
+ * @param {CreateServerAccountOptions} [options] - Optional parameters for creating the account.
18
+ * @param {string} [options.name] - A name for the account to create.
19
+ * @param {string} [options.idempotencyKey] - An idempotency key.
20
+ *
21
+ * @returns A promise that resolves to the newly created account.
22
+ *
23
+ * @example **Without arguments**
24
+ * ```ts
25
+ * const account = await cdp.evm.createAccount();
26
+ * ```
27
+ *
28
+ * @example **With a name**
29
+ * ```ts
30
+ * const account = await cdp.evm.createAccount({ name: "MyAccount" });
31
+ * ```
32
+ *
33
+ * @example **With an idempotency key**
34
+ * ```ts
35
+ * const idempotencyKey = uuidv4();
36
+ *
37
+ * // First call
38
+ * await cdp.evm.createAccount({
39
+ * idempotencyKey,
40
+ * });
41
+ *
42
+ * // Second call with the same idempotency key will return the same account
43
+ * await cdp.evm.createAccount({
44
+ * idempotencyKey,
45
+ * });
46
+ * ```
47
+ */
48
+ async createAccount(options = {}) {
49
+ const account = await index_js_1.CdpOpenApiClient.createEvmAccount({
50
+ name: options.name,
51
+ }, options.idempotencyKey);
52
+ return (0, toEvmServerAccount_js_1.toEvmServerAccount)(index_js_1.CdpOpenApiClient, {
53
+ account,
54
+ });
55
+ }
56
+ /**
57
+ * Creates a new CDP EVM smart account.
58
+ *
59
+ * @param {CreateSmartAccountOptions} options - Parameters for creating the smart account.
60
+ * @param {Account} options.owner - The owner of the smart account.
61
+ * The owner can be any Ethereum account with signing capabilities,
62
+ * such as a CDP EVM account or a Viem LocalAccount.
63
+ * @param {string} [options.idempotencyKey] - An idempotency key.
64
+ *
65
+ * @returns A promise that resolves to the newly created smart account.
66
+ *
67
+ * @example **With a CDP EVM Account as the owner**
68
+ * ```ts
69
+ * const account = await cdp.evm.createAccount();
70
+ * const smartAccount = await cdp.evm.createSmartAccount({
71
+ * owner: account,
72
+ * });
73
+ * ```
74
+ *
75
+ * @example **With a Viem LocalAccount as the owner**
76
+ * ```ts
77
+ * // See https://viem.sh/docs/accounts/local/privateKeyToAccount
78
+ * const privateKey = generatePrivateKey();
79
+ * const account = privateKeyToAccount(privateKey);
80
+ * const smartAccount = await client.evm.createSmartAccount({
81
+ * owner: account,
82
+ * });
83
+ * ```
84
+ *
85
+ * @example **With an idempotency key**
86
+ * ```ts
87
+ * const idempotencyKey = uuidv4();
88
+ *
89
+ * // First call
90
+ * await cdp.evm.createSmartAccount({
91
+ * owner: account,
92
+ * idempotencyKey,
93
+ * });
94
+ *
95
+ * // Second call with the same idempotency key will return the same smart account
96
+ * await cdp.evm.createSmartAccount({
97
+ * owner: account,
98
+ * idempotencyKey,
99
+ * ```
100
+ */
101
+ async createSmartAccount(options) {
102
+ const smartAccount = await index_js_1.CdpOpenApiClient.createEvmSmartAccount({
103
+ owners: [options.owner.address],
104
+ }, options.idempotencyKey);
105
+ return (0, toEvmSmartAccount_js_1.toEvmSmartAccount)({
106
+ smartAccount,
107
+ owner: options.owner,
108
+ });
109
+ }
110
+ /**
111
+ * Gets a CDP EVM account.
112
+ *
113
+ * @param {GetServerAccountOptions} options - Parameters for getting the account.
114
+ * Either `address` or `name` must be provided.
115
+ * If both are provided, lookup will be done by `address` and `name` will be ignored.
116
+ * @param {string} [options.address] - The address of the account to get.
117
+ * @param {string} [options.name] - The name of the account to get.
118
+ *
119
+ * @returns A promise that resolves to the account.
120
+ *
121
+ * @example **Get an account by address**
122
+ * ```ts
123
+ * const account = await cdp.evm.getAccount({
124
+ * address: "0x1234567890123456789012345678901234567890",
125
+ * });
126
+ * ```
127
+ *
128
+ * @example **Get an account by name**
129
+ * ```ts
130
+ * const account = await cdp.evm.getAccount({
131
+ * name: "MyAccount",
132
+ * });
133
+ * ```
134
+ */
135
+ async getAccount(options) {
136
+ const account = await (() => {
137
+ if (options.address) {
138
+ return index_js_1.CdpOpenApiClient.getEvmAccount(options.address);
139
+ }
140
+ if (options.name) {
141
+ return index_js_1.CdpOpenApiClient.getEvmAccountByName(options.name);
142
+ }
143
+ throw new Error("Either address or name must be provided");
144
+ })();
145
+ return (0, toEvmServerAccount_js_1.toEvmServerAccount)(index_js_1.CdpOpenApiClient, {
146
+ account,
147
+ });
148
+ }
149
+ /**
150
+ * Gets a CDP EVM smart account.
151
+ *
152
+ * @param {GetSmartAccountOptions} options - Parameters for getting the smart account.
153
+ * @param {string} options.address - The address of the smart account to get.
154
+ * @param {Account} options.owner - The owner of the smart account.
155
+ * You must pass the signing-capable owner of the smart account so that the returned smart account
156
+ * can be functional.
157
+ *
158
+ * @returns A promise that resolves to the smart account.
159
+ *
160
+ * @example
161
+ * ```ts
162
+ * const smartAccount = await cdp.evm.getSmartAccount({
163
+ * address: "0x1234567890123456789012345678901234567890",
164
+ * owner: account,
165
+ * });
166
+ * ```
167
+ */
168
+ async getSmartAccount(options) {
169
+ const smartAccount = await index_js_1.CdpOpenApiClient.getEvmSmartAccount(options.address);
170
+ return (0, toEvmSmartAccount_js_1.toEvmSmartAccount)({
171
+ smartAccount,
172
+ owner: options.owner,
173
+ });
174
+ }
175
+ /**
176
+ * Gets a user operation for a smart account by user operation hash.
177
+ *
178
+ * @param {GetUserOperationOptions} options - Parameters for getting the user operation.
179
+ * @param {SmartAccount} options.smartAccount - The smart account signing the user operation.
180
+ * @param {string} options.userOpHash - The user operation hash.
181
+ *
182
+ * @returns A promise that resolves to the user operation.
183
+ *
184
+ * @example
185
+ * ```ts
186
+ * const userOp = await cdp.evm.getUserOperation({
187
+ * smartAccount,
188
+ * userOpHash: "0x1234567890123456789012345678901234567890123456789012345678901234",
189
+ * });
190
+ * ```
191
+ */
192
+ async getUserOperation(options) {
193
+ const userOp = await index_js_1.CdpOpenApiClient.getUserOperation(options.smartAccount.address, options.userOpHash);
194
+ return {
195
+ calls: userOp.calls.map(call => ({
196
+ to: call.to,
197
+ value: BigInt(call.value),
198
+ data: call.data,
199
+ })),
200
+ network: userOp.network,
201
+ status: userOp.status,
202
+ transactionHash: userOp.transactionHash,
203
+ userOpHash: userOp.userOpHash,
204
+ };
205
+ }
206
+ /**
207
+ * Lists CDP EVM accounts.
208
+ *
209
+ * @param {ListServerAccountsOptions} [options] - Optional parameters for listing the accounts.
210
+ * @param {number} [options.pageSize] - The number of accounts to return.
211
+ * @param {string} [options.pageToken] - The page token to begin listing from.
212
+ * This is obtained by previous calls to this method.
213
+ *
214
+ * @returns A promise that resolves to an array of accounts, and a token to paginate through the accounts.
215
+ *
216
+ * @example
217
+ * ```ts
218
+ * const accounts = await cdp.evm.listAccounts();
219
+ * ```
220
+ *
221
+ * @example **With pagination**
222
+ * ```ts
223
+ * let page = await cdp.evm.listAccounts();
224
+ *
225
+ * while (page.nextPageToken) {
226
+ * page = await cdp.evm.listAccounts({ pageToken: page.nextPageToken });
227
+ * }
228
+ * ```
229
+ */
230
+ async listAccounts(options = {}) {
231
+ const ethAccounts = await index_js_1.CdpOpenApiClient.listEvmAccounts({
232
+ pageSize: options.pageSize,
233
+ pageToken: options.pageToken,
234
+ });
235
+ return {
236
+ accounts: ethAccounts.accounts.map(account => (0, toEvmServerAccount_js_1.toEvmServerAccount)(index_js_1.CdpOpenApiClient, {
237
+ account: account,
238
+ })),
239
+ nextPageToken: ethAccounts.nextPageToken,
240
+ };
241
+ }
242
+ /**
243
+ * Lists CDP EVM token balances.
244
+ *
245
+ * @param {ListTokenBalancesOptions} options - Parameters for listing the token balances.
246
+ * @param {number} [options.pageSize] - The number of token balances to return.
247
+ * @param {string} [options.pageToken] - The page token to begin listing from.
248
+ * This is obtained by previous calls to this method.
249
+ *
250
+ * @returns A promise that resolves to an array of token balances, and a token to paginate through the token balances.
251
+ *
252
+ * @example
253
+ * ```ts
254
+ * const tokenBalances = await cdp.evm.listTokenBalances({
255
+ * address: "0x1234567890123456789012345678901234567890",
256
+ * network: "base-sepolia",
257
+ * });
258
+ * ```
259
+ *
260
+ * @example
261
+ * **With pagination**
262
+ * ```ts
263
+ * let page = await cdp.evm.listTokenBalances({
264
+ * address: "0x1234567890123456789012345678901234567890",
265
+ * network: "base-sepolia",
266
+ * });
267
+ *
268
+ * while (page.nextPageToken) {
269
+ * page = await cdp.evm.listTokenBalances({
270
+ * address: "0x1234567890123456789012345678901234567890",
271
+ * network: "base-sepolia",
272
+ * pageToken: page.nextPageToken,
273
+ * });
274
+ * }
275
+ */
276
+ async listTokenBalances(options) {
277
+ const response = await index_js_1.CdpOpenApiClient.listEvmTokenBalances(options.network, options.address, {
278
+ pageSize: options.pageSize,
279
+ pageToken: options.pageToken,
280
+ });
281
+ const balances = response.balances.map(balance => {
282
+ return {
283
+ token: {
284
+ network: balance.token.network,
285
+ contractAddress: balance.token.contractAddress,
286
+ },
287
+ amount: {
288
+ amount: BigInt(balance.amount.amount),
289
+ decimals: BigInt(balance.amount.decimals),
290
+ },
291
+ };
292
+ });
293
+ return {
294
+ balances,
295
+ nextPageToken: response.nextPageToken,
296
+ };
297
+ }
298
+ /**
299
+ * Lists CDP EVM smart accounts.
300
+ *
301
+ * @param {ListSmartAccountsOptions} options - Parameters for listing the smart accounts.
302
+ * @param {number} [options.pageSize] - The number of smart accounts to return.
303
+ * @param {string} [options.pageToken] - The page token to begin listing from.
304
+ * This is obtained by previous calls to this method.
305
+ *
306
+ * @returns A promise that resolves to an array of smart accounts, and a token to paginate through the smart accounts.
307
+ *
308
+ * @example
309
+ * ```ts
310
+ * const smartAccounts = await cdp.evm.listSmartAccounts();
311
+ * ```
312
+ *
313
+ * @example **With pagination**
314
+ * ```ts
315
+ * let page = await cdp.evm.listSmartAccounts();
316
+ *
317
+ * while (page.nextPageToken) {
318
+ * page = await cdp.evm.listSmartAccounts({ pageToken: page.nextPageToken });
319
+ * }
320
+ */
321
+ async listSmartAccounts(options = {}) {
322
+ const smartAccounts = await index_js_1.CdpOpenApiClient.listEvmSmartAccounts({
323
+ pageSize: options.pageSize,
324
+ pageToken: options.pageToken,
325
+ });
326
+ return {
327
+ accounts: smartAccounts.accounts.map(account => ({
328
+ address: account.address,
329
+ owners: [account.owners[0]],
330
+ type: "evm-smart",
331
+ })),
332
+ nextPageToken: smartAccounts.nextPageToken,
333
+ };
334
+ }
335
+ /**
336
+ * Prepares a user operation for a smart account.
337
+ *
338
+ * @param {PrepareUserOperationOptions} options - Parameters for preparing the user operation.
339
+ * @param {SmartAccount} options.smartAccount - The smart account signing the user operation.
340
+ * @param {string} options.network - The network to prepare the user operation for.
341
+ * @param {EvmCall[]} options.calls - The calls to include in the user operation.
342
+ * @param {string} [options.paymasterUrl] - The optional paymaster URL to use for the user operation.
343
+ *
344
+ * @returns A promise that resolves to the user operation hash.
345
+ *
346
+ * @example
347
+ * ```ts
348
+ * const userOp = await cdp.evm.prepareUserOperation({
349
+ * smartAccount,
350
+ * network: "base-sepolia",
351
+ * calls: [
352
+ * {
353
+ * to: "0x1234567890123456789012345678901234567890",
354
+ * value: parseEther("0.000001"),
355
+ * data: "0x",
356
+ * },
357
+ * ],
358
+ * });
359
+ * ```
360
+ */
361
+ async prepareUserOperation(options) {
362
+ const userOp = await index_js_1.CdpOpenApiClient.prepareUserOperation(options.smartAccount.address, {
363
+ network: options.network,
364
+ calls: options.calls.map(call => ({
365
+ to: call.to,
366
+ value: call.value.toString(),
367
+ data: call.data,
368
+ })),
369
+ paymasterUrl: options.paymasterUrl,
370
+ });
371
+ return {
372
+ network: userOp.network,
373
+ userOpHash: userOp.userOpHash,
374
+ status: userOp.status,
375
+ calls: userOp.calls.map(call => ({
376
+ to: call.to,
377
+ value: BigInt(call.value),
378
+ data: call.data,
379
+ })),
380
+ };
381
+ }
382
+ /**
383
+ * Requests funds from an EVM faucet.
384
+ *
385
+ * @param {RequestFaucetOptions} options - Parameters for requesting funds from the EVM faucet.
386
+ * @param {string} options.address - The address to request funds for.
387
+ * @param {string} options.network - The network to request funds from.
388
+ * @param {string} options.token - The token to request funds for.
389
+ * @param {string} [options.idempotencyKey] - An idempotency key.
390
+ *
391
+ * @returns A promise that resolves to the transaction hash.
392
+ *
393
+ * @example
394
+ * ```ts
395
+ * const result = await cdp.evm.requestFaucet({
396
+ * address: "0x1234567890123456789012345678901234567890",
397
+ * network: "base-sepolia",
398
+ * token: "eth",
399
+ * });
400
+ * ```
401
+ */
402
+ async requestFaucet(options) {
403
+ const { transactionHash } = await index_js_1.CdpOpenApiClient.requestEvmFaucet({ address: options.address, network: options.network, token: options.token }, options.idempotencyKey);
404
+ return {
405
+ transactionHash: transactionHash,
406
+ };
407
+ }
408
+ /**
409
+ * Signs an EVM transaction and sends it to the specified network using the Coinbase API.
410
+ * This method handles nonce management and gas estimation automatically.
411
+ *
412
+ * @param {SendTransactionOptions} options - Configuration options for sending the transaction.
413
+ * @returns A promise that resolves to the transaction hash.
414
+ *
415
+ * @example
416
+ * **Sending an RLP-encoded transaction**
417
+ * ```ts
418
+ * import { parseEther, serializeTransaction } from "viem";
419
+ * import { baseSepolia } from "viem/chains";
420
+ *
421
+ * const { transactionHash } = await cdp.evm.sendTransaction({
422
+ * address: account.address,
423
+ * transaction: serializeTransaction({
424
+ * to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
425
+ * value: parseEther("0.000001"),
426
+ * chainId: baseSepolia.id,
427
+ * // Fields below are optional, CDP API will populate them if omitted.
428
+ * // nonce
429
+ * // maxPriorityFeePerGas
430
+ * // maxFeePerGas
431
+ * // gas
432
+ * }),
433
+ * network: "base-sepolia",
434
+ * });
435
+ * ```
436
+ * @example
437
+ * **Sending an EIP-1559 transaction request object**
438
+ * ```ts
439
+ * const { transactionHash } = await cdp.evm.sendTransaction({
440
+ * address: account.address,
441
+ * transaction: {
442
+ * to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
443
+ * value: parseEther("0.000001"),
444
+ * // Fields below are optional, CDP API will populate them if omitted.
445
+ * // nonce
446
+ * // maxPriorityFeePerGas
447
+ * // maxFeePerGas
448
+ * // gas
449
+ * },
450
+ * network: "base-sepolia",
451
+ * });
452
+ * ```
453
+ */
454
+ async sendTransaction(options) {
455
+ const { address, network, idempotencyKey } = options;
456
+ let transaction = options.transaction;
457
+ if (typeof transaction !== "string") {
458
+ transaction = (0, viem_1.serializeTransaction)({
459
+ ...transaction,
460
+ // chainId is ignored in favor of network
461
+ chainId: 1,
462
+ type: "eip1559",
463
+ });
464
+ }
465
+ const result = await index_js_1.CdpOpenApiClient.sendEvmTransaction(address, { transaction, network }, idempotencyKey);
466
+ return {
467
+ transactionHash: result.transactionHash,
468
+ };
469
+ }
470
+ /**
471
+ * Sends a user operation.
472
+ *
473
+ * @param {SendUserOperationOptions} options - Parameters for sending the user operation.
474
+ * @param {SmartAccount} options.smartAccount - The smart account sending the user operation.
475
+ * @param {string} options.network - The network to send the user operation on.
476
+ * @param {EvmCall[]} options.calls - The calls to include in the user operation.
477
+ * @param {string} [options.paymasterUrl] - The optional paymaster URL to use for the user operation.
478
+ * @param {string} [options.idempotencyKey] - An idempotency key.
479
+ *
480
+ * @returns A promise that resolves to an object containing the smart account address,
481
+ * the user operation hash, and the status of the user operation.
482
+ *
483
+ * @example
484
+ * ```ts
485
+ * const userOp = await cdp.evm.sendUserOperation({
486
+ * smartAccount,
487
+ * network: "base-sepolia",
488
+ * calls: [
489
+ * {
490
+ * to: "0x1234567890123456789012345678901234567890",
491
+ * value: parseEther("0.000001"),
492
+ * data: "0x",
493
+ * },
494
+ * ],
495
+ * });
496
+ * ```
497
+ */
498
+ async sendUserOperation(options) {
499
+ return (0, sendUserOperation_js_1.sendUserOperation)(index_js_1.CdpOpenApiClient, options.smartAccount, {
500
+ network: options.network,
501
+ calls: options.calls,
502
+ paymasterUrl: options.paymasterUrl,
503
+ idempotencyKey: options.idempotencyKey,
504
+ });
505
+ }
506
+ /**
507
+ * Signs an EVM hash.
508
+ *
509
+ * @param {SignHashOptions} options - Parameters for signing the hash.
510
+ * @param {string} options.address - The address to sign the hash for.
511
+ * @param {string} options.hash - The hash to sign.
512
+ * @param {string} [options.idempotencyKey] - An idempotency key.
513
+ *
514
+ * @returns A promise that resolves to the signature.
515
+ *
516
+ * @example
517
+ * ```ts
518
+ * // Create a new EVM server account to sign with
519
+ * const ethAccount = await cdp.createEvmServerAccount({});
520
+ *
521
+ * const signature = await cdp.evm.signHash({
522
+ * address: ethAccount.address,
523
+ * hash: "0x1234567890123456789012345678901234567890123456789012345678901234",
524
+ * });
525
+ * ```
526
+ */
527
+ async signHash(options) {
528
+ const signature = await index_js_1.CdpOpenApiClient.signEvmHash(options.address, {
529
+ hash: options.hash,
530
+ }, options.idempotencyKey);
531
+ return {
532
+ signature: signature.signature,
533
+ };
534
+ }
535
+ /**
536
+ * Signs an EVM message.
537
+ *
538
+ * @param {SignMessageOptions} options - Parameters for signing the message.
539
+ * @param {string} options.address - The address to sign the message for.
540
+ * @param {string} options.message - The message to sign.
541
+ * @param {string} [options.idempotencyKey] - An idempotency key.
542
+ *
543
+ * @returns A promise that resolves to the signature.
544
+ *
545
+ * @example
546
+ * ```ts
547
+ * // Create a new EVM server account to sign with
548
+ * const ethAccount = await cdp.createEvmServerAccount({});
549
+ *
550
+ * const signature = await cdp.evm.signMessage({
551
+ * address: ethAccount.address,
552
+ * message: "Hello, world!",
553
+ * });
554
+ * ```
555
+ */
556
+ async signMessage(options) {
557
+ const signature = await index_js_1.CdpOpenApiClient.signEvmMessage(options.address, {
558
+ message: options.message,
559
+ }, options.idempotencyKey);
560
+ return {
561
+ signature: signature.signature,
562
+ };
563
+ }
564
+ /**
565
+ * Signs an EVM transaction.
566
+ *
567
+ * @param {SignTransactionOptions} options - Configuration options for signing the transaction.
568
+ * @returns A promise that resolves to the signature.
569
+ *
570
+ * @example
571
+ * ```ts
572
+ * import { parseEther, serializeTransaction } from "viem";
573
+ * import { baseSepolia } from "viem/chains";
574
+ *
575
+ * // Create a new EVM server account to sign with
576
+ * const ethAccount = await cdp.createEvmServerAccount({});
577
+ *
578
+ * const serializedTx = serializeTransaction(
579
+ * {
580
+ * chainId: baseSepolia.id,
581
+ * data: "0x",
582
+ * to: "0x4252e0c9A3da5A2700e7d91cb50aEf522D0C6Fe8",
583
+ * type: "eip1559",
584
+ * value: parseEther("0.000001"),
585
+ * },
586
+ * );
587
+ *
588
+ * const signature = await cdp.evm.signTransaction({
589
+ * address: ethAccount.address,
590
+ * transaction: serializedTx,
591
+ * });
592
+ * ```
593
+ */
594
+ async signTransaction(options) {
595
+ const signature = await index_js_1.CdpOpenApiClient.signEvmTransaction(options.address, {
596
+ transaction: options.transaction,
597
+ }, options.idempotencyKey);
598
+ return {
599
+ signature: signature.signedTransaction,
600
+ };
601
+ }
602
+ /**
603
+ * Waits for a user operation to complete or fail.
604
+ *
605
+ * @param {WaitForUserOperationOptions} options - Parameters for waiting for the user operation.
606
+ * @param {string} options.smartAccountAddress - The address of the smart account.
607
+ * @param {string} options.userOpHash - The user operation hash.
608
+ * @param {WaitOptions} [options.waitOptions] - Optional parameters for the wait operation.
609
+ *
610
+ * @returns A promise that resolves to the transaction receipt.
611
+ *
612
+ * @example
613
+ * ```ts
614
+ * // Send a user operation and get the user operation hash
615
+ * const { userOpHash } = await cdp.evm.sendUserOperation({
616
+ * smartAccount,
617
+ * network: "base-sepolia",
618
+ * calls: [
619
+ * {
620
+ * to: "0x0000000000000000000000000000000000000000",
621
+ * value: parseEther("0.000001"),
622
+ * data: "0x",
623
+ * },
624
+ * ],
625
+ * });
626
+ *
627
+ * // Wait for the user operation to complete or fail
628
+ * const result = await cdp.evm.waitForUserOperation({
629
+ * smartAccountAddress: smartAccount.address,
630
+ * userOpHash: userOp.userOpHash,
631
+ * });
632
+ * ```
633
+ */
634
+ async waitForUserOperation(options) {
635
+ return (0, waitForUserOperation_js_1.waitForUserOperation)(index_js_1.CdpOpenApiClient, {
636
+ ...options,
637
+ });
638
+ }
639
+ }
640
+ exports.EvmClient = EvmClient;
641
+ //# sourceMappingURL=evm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evm.js","sourceRoot":"","sources":["../../../client/evm/evm.ts"],"names":[],"mappings":";;;AAAA,+BAAqD;AA8BrD,oFAA8E;AAC9E,kFAA4E;AAC5E,iFAGgD;AAChD,uFAGmD;AACnD,4DAAiE;AAGjE;;GAEG;AACH,MAAa,SAAS;IACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,KAAK,CAAC,aAAa,CAAC,UAAsC,EAAE;QAC1D,MAAM,OAAO,GAAG,MAAM,2BAAgB,CAAC,gBAAgB,CACrD;YACE,IAAI,EAAE,OAAO,CAAC,IAAI;SACnB,EACD,OAAO,CAAC,cAAc,CACvB,CAAC;QAEF,OAAO,IAAA,0CAAkB,EAAC,2BAAgB,EAAE;YAC1C,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,KAAK,CAAC,kBAAkB,CAAC,OAAkC;QACzD,MAAM,YAAY,GAAG,MAAM,2BAAgB,CAAC,qBAAqB,CAC/D;YACE,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;SAChC,EACD,OAAO,CAAC,cAAc,CACvB,CAAC;QAEF,OAAO,IAAA,wCAAiB,EAAC;YACvB,YAAY;YACZ,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,C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AO,CAAC,cAAc,CACvB,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,SAAS,CAAC,iBAAwB;SAC9C,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,KAAK,CAAC,oBAAoB,CACxB,OAAoC;QAEpC,OAAO,IAAA,8CAAoB,EAAC,2BAAgB,EAAE;YAC5C,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAprBD,8BAorBC"}
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=evm.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evm.types.js","sourceRoot":"","sources":["../../../client/evm/evm.types.ts"],"names":[],"mappings":""}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SolanaClient = void 0;
4
- var solana_1 = require("./solana");
5
- Object.defineProperty(exports, "SolanaClient", { enumerable: true, get: function () { return solana_1.SolanaClient; } });
4
+ var solana_js_1 = require("./solana.js");
5
+ Object.defineProperty(exports, "SolanaClient", { enumerable: true, get: function () { return solana_js_1.SolanaClient; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../client/solana/index.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAAlC,yGAAA,YAAY,OAAA"}