@coinbase/cdp-sdk 1.28.0 → 1.30.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 (274) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/_cjs/accounts/evm/networkCapabilities.js +101 -0
  3. package/_cjs/accounts/evm/networkCapabilities.js.map +1 -1
  4. package/_cjs/accounts/evm/toEvmServerAccount.js +12 -1
  5. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  6. package/_cjs/accounts/evm/toEvmSmartAccount.js +12 -1
  7. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  8. package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js +10 -0
  9. package/_cjs/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
  10. package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js +11 -1
  11. package/_cjs/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
  12. package/_cjs/accounts/solana/toSolanaAccount.js +41 -1
  13. package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
  14. package/_cjs/actions/Quote.js +106 -0
  15. package/_cjs/actions/Quote.js.map +1 -0
  16. package/_cjs/actions/evm/fund/fund.js +5 -5
  17. package/_cjs/actions/evm/fund/fund.js.map +1 -1
  18. package/_cjs/actions/evm/fund/quoteFund.js +7 -7
  19. package/_cjs/actions/evm/fund/quoteFund.js.map +1 -1
  20. package/_cjs/actions/evm/getUserOperation.js +1 -0
  21. package/_cjs/actions/evm/getUserOperation.js.map +1 -1
  22. package/_cjs/actions/evm/spend-permissions/account.use.js +33 -0
  23. package/_cjs/actions/evm/spend-permissions/account.use.js.map +1 -0
  24. package/_cjs/actions/evm/spend-permissions/smartAccount.use.js +35 -0
  25. package/_cjs/actions/evm/spend-permissions/smartAccount.use.js.map +1 -0
  26. package/_cjs/actions/evm/spend-permissions/types.js.map +1 -0
  27. package/_cjs/actions/evm/transfer/accountTransferStrategy.js +1 -0
  28. package/_cjs/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
  29. package/_cjs/actions/solana/fund/fund.js +50 -0
  30. package/_cjs/actions/solana/fund/fund.js.map +1 -0
  31. package/_cjs/actions/solana/fund/quoteFund.js +47 -0
  32. package/_cjs/actions/solana/fund/quoteFund.js.map +1 -0
  33. package/_cjs/actions/solana/sendTransaction.js +1 -0
  34. package/_cjs/actions/solana/sendTransaction.js.map +1 -1
  35. package/_cjs/actions/solana/signTransaction.js +1 -0
  36. package/_cjs/actions/solana/signTransaction.js.map +1 -1
  37. package/_cjs/actions/types.js +3 -0
  38. package/{_esm/actions/evm/fund → _cjs/actions}/types.js.map +1 -1
  39. package/_cjs/actions/{evm/fund/waitForFundOperationReceipt.js → waitForFundOperationReceipt.js} +2 -2
  40. package/_cjs/actions/waitForFundOperationReceipt.js.map +1 -0
  41. package/_cjs/auth/hooks/axios/withAuth.js +3 -0
  42. package/_cjs/auth/hooks/axios/withAuth.js.map +1 -1
  43. package/_cjs/auth/utils/http.js +2 -1
  44. package/_cjs/auth/utils/http.js.map +1 -1
  45. package/_cjs/client/evm/evm.js +51 -1
  46. package/_cjs/client/evm/evm.js.map +1 -1
  47. package/_cjs/client/solana/solana.js.map +1 -1
  48. package/_cjs/index.js +5 -1
  49. package/_cjs/index.js.map +1 -1
  50. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +54 -7
  51. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  52. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +14 -1
  53. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  54. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js +76 -4
  55. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js.map +1 -1
  56. package/_cjs/openapi-client/generated/index.msw.js +2 -0
  57. package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
  58. package/_cjs/openapi-client/generated/onramp/onramp.js +30 -0
  59. package/_cjs/openapi-client/generated/onramp/onramp.js.map +1 -0
  60. package/_cjs/openapi-client/generated/onramp/onramp.msw.js +98 -0
  61. package/_cjs/openapi-client/generated/onramp/onramp.msw.js.map +1 -0
  62. package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js +15 -0
  63. package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -0
  64. package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.msw.js +69 -0
  65. package/_cjs/openapi-client/generated/x402-facilitator/x402-facilitator.msw.js.map +1 -0
  66. package/_cjs/openapi-client/index.js +2 -0
  67. package/_cjs/openapi-client/index.js.map +1 -1
  68. package/_cjs/spend-permissions/constants.js +716 -0
  69. package/_cjs/spend-permissions/constants.js.map +1 -0
  70. package/_cjs/spend-permissions/types.js +3 -0
  71. package/_cjs/{actions/evm/fund → spend-permissions}/types.js.map +1 -1
  72. package/_cjs/version.js +1 -1
  73. package/_esm/accounts/evm/networkCapabilities.js +101 -0
  74. package/_esm/accounts/evm/networkCapabilities.js.map +1 -1
  75. package/_esm/accounts/evm/toEvmServerAccount.js +12 -1
  76. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  77. package/_esm/accounts/evm/toEvmSmartAccount.js +12 -1
  78. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  79. package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js +10 -0
  80. package/_esm/accounts/evm/toNetworkScopedEvmServerAccount.js.map +1 -1
  81. package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js +11 -1
  82. package/_esm/accounts/evm/toNetworkScopedEvmSmartAccount.js.map +1 -1
  83. package/_esm/accounts/solana/toSolanaAccount.js +41 -1
  84. package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
  85. package/_esm/actions/Quote.js +101 -0
  86. package/_esm/actions/Quote.js.map +1 -0
  87. package/_esm/actions/evm/fund/fund.js +5 -5
  88. package/_esm/actions/evm/fund/fund.js.map +1 -1
  89. package/_esm/actions/evm/fund/quoteFund.js +7 -7
  90. package/_esm/actions/evm/fund/quoteFund.js.map +1 -1
  91. package/_esm/actions/evm/getUserOperation.js +1 -0
  92. package/_esm/actions/evm/getUserOperation.js.map +1 -1
  93. package/_esm/actions/evm/spend-permissions/account.use.js +30 -0
  94. package/_esm/actions/evm/spend-permissions/account.use.js.map +1 -0
  95. package/_esm/actions/evm/spend-permissions/smartAccount.use.js +32 -0
  96. package/_esm/actions/evm/spend-permissions/smartAccount.use.js.map +1 -0
  97. package/_esm/actions/evm/spend-permissions/types.js.map +1 -0
  98. package/_esm/actions/evm/transfer/accountTransferStrategy.js +1 -0
  99. package/_esm/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
  100. package/_esm/actions/solana/fund/fund.js +47 -0
  101. package/_esm/actions/solana/fund/fund.js.map +1 -0
  102. package/_esm/actions/solana/fund/quoteFund.js +44 -0
  103. package/_esm/actions/solana/fund/quoteFund.js.map +1 -0
  104. package/_esm/actions/solana/sendTransaction.js +1 -0
  105. package/_esm/actions/solana/sendTransaction.js.map +1 -1
  106. package/_esm/actions/solana/signTransaction.js +1 -0
  107. package/_esm/actions/solana/signTransaction.js.map +1 -1
  108. package/_esm/actions/types.js +2 -0
  109. package/_esm/actions/types.js.map +1 -0
  110. package/_esm/actions/{evm/fund/waitForFundOperationReceipt.js → waitForFundOperationReceipt.js} +2 -2
  111. package/_esm/actions/waitForFundOperationReceipt.js.map +1 -0
  112. package/_esm/auth/hooks/axios/withAuth.js +3 -0
  113. package/_esm/auth/hooks/axios/withAuth.js.map +1 -1
  114. package/_esm/auth/utils/http.js +2 -1
  115. package/_esm/auth/utils/http.js.map +1 -1
  116. package/_esm/client/evm/evm.js +51 -1
  117. package/_esm/client/evm/evm.js.map +1 -1
  118. package/_esm/client/solana/solana.js +2 -2
  119. package/_esm/client/solana/solana.js.map +1 -1
  120. package/_esm/index.js +2 -1
  121. package/_esm/index.js.map +1 -1
  122. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +52 -5
  123. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  124. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +12 -0
  125. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  126. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js +73 -3
  127. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.js.map +1 -1
  128. package/_esm/openapi-client/generated/index.msw.js +2 -0
  129. package/_esm/openapi-client/generated/index.msw.js.map +1 -1
  130. package/_esm/openapi-client/generated/onramp/onramp.js +25 -0
  131. package/_esm/openapi-client/generated/onramp/onramp.js.map +1 -0
  132. package/_esm/openapi-client/generated/onramp/onramp.msw.js +90 -0
  133. package/_esm/openapi-client/generated/onramp/onramp.msw.js.map +1 -0
  134. package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js +11 -0
  135. package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.js.map +1 -0
  136. package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.msw.js +63 -0
  137. package/_esm/openapi-client/generated/x402-facilitator/x402-facilitator.msw.js.map +1 -0
  138. package/_esm/openapi-client/index.js +2 -0
  139. package/_esm/openapi-client/index.js.map +1 -1
  140. package/_esm/spend-permissions/constants.js +713 -0
  141. package/_esm/spend-permissions/constants.js.map +1 -0
  142. package/_esm/spend-permissions/types.js +2 -0
  143. package/_esm/spend-permissions/types.js.map +1 -0
  144. package/_esm/version.js +1 -1
  145. package/_types/accounts/evm/networkCapabilities.d.ts +101 -0
  146. package/_types/accounts/evm/networkCapabilities.d.ts.map +1 -1
  147. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  148. package/_types/accounts/evm/toEvmSmartAccount.d.ts +1 -1
  149. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  150. package/_types/accounts/evm/toNetworkScopedEvmServerAccount.d.ts.map +1 -1
  151. package/_types/accounts/evm/toNetworkScopedEvmSmartAccount.d.ts.map +1 -1
  152. package/_types/accounts/evm/types.d.ts +15 -9
  153. package/_types/accounts/evm/types.d.ts.map +1 -1
  154. package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
  155. package/_types/actions/Quote.d.ts +97 -0
  156. package/_types/actions/Quote.d.ts.map +1 -0
  157. package/_types/actions/evm/fund/fund.d.ts +3 -7
  158. package/_types/actions/evm/fund/fund.d.ts.map +1 -1
  159. package/_types/actions/evm/fund/quoteFund.d.ts +4 -7
  160. package/_types/actions/evm/fund/quoteFund.d.ts.map +1 -1
  161. package/_types/actions/evm/getUserOperation.d.ts.map +1 -1
  162. package/_types/actions/evm/spend-permissions/account.use.d.ts +15 -0
  163. package/_types/actions/evm/spend-permissions/account.use.d.ts.map +1 -0
  164. package/_types/actions/evm/spend-permissions/smartAccount.use.d.ts +15 -0
  165. package/_types/actions/evm/spend-permissions/smartAccount.use.d.ts.map +1 -0
  166. package/_types/actions/evm/spend-permissions/types.d.ts +13 -0
  167. package/_types/actions/evm/spend-permissions/types.d.ts.map +1 -0
  168. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts.map +1 -1
  169. package/_types/actions/evm/types.d.ts +82 -7
  170. package/_types/actions/evm/types.d.ts.map +1 -1
  171. package/_types/actions/solana/fund/fund.d.ts +19 -0
  172. package/_types/actions/solana/fund/fund.d.ts.map +1 -0
  173. package/_types/actions/solana/fund/quoteFund.d.ts +20 -0
  174. package/_types/actions/solana/fund/quoteFund.d.ts.map +1 -0
  175. package/_types/actions/solana/sendTransaction.d.ts +8 -2
  176. package/_types/actions/solana/sendTransaction.d.ts.map +1 -1
  177. package/_types/actions/solana/signTransaction.d.ts +8 -2
  178. package/_types/actions/solana/signTransaction.d.ts.map +1 -1
  179. package/_types/actions/solana/types.d.ts +99 -3
  180. package/_types/actions/solana/types.d.ts.map +1 -1
  181. package/_types/actions/types.d.ts +37 -0
  182. package/_types/actions/types.d.ts.map +1 -0
  183. package/_types/actions/{evm/fund/waitForFundOperationReceipt.d.ts → waitForFundOperationReceipt.d.ts} +2 -2
  184. package/_types/actions/waitForFundOperationReceipt.d.ts.map +1 -0
  185. package/_types/auth/hooks/axios/withAuth.d.ts.map +1 -1
  186. package/_types/auth/utils/http.d.ts.map +1 -1
  187. package/_types/client/evm/evm.d.ts +19 -1
  188. package/_types/client/evm/evm.d.ts.map +1 -1
  189. package/_types/client/evm/evm.types.d.ts +29 -2
  190. package/_types/client/evm/evm.types.d.ts.map +1 -1
  191. package/_types/client/solana/solana.d.ts +5 -3
  192. package/_types/client/solana/solana.d.ts.map +1 -1
  193. package/_types/index.d.ts +3 -1
  194. package/_types/index.d.ts.map +1 -1
  195. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +356 -20
  196. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  197. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +7 -1
  198. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
  199. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.d.ts +2 -0
  200. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.d.ts.map +1 -1
  201. package/_types/openapi-client/generated/index.msw.d.ts +2 -0
  202. package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
  203. package/_types/openapi-client/generated/onramp/onramp.d.ts +28 -0
  204. package/_types/openapi-client/generated/onramp/onramp.d.ts.map +1 -0
  205. package/_types/openapi-client/generated/onramp/onramp.msw.d.ts +8 -0
  206. package/_types/openapi-client/generated/onramp/onramp.msw.d.ts.map +1 -0
  207. package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts +20 -0
  208. package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.d.ts.map +1 -0
  209. package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.msw.d.ts +6 -0
  210. package/_types/openapi-client/generated/x402-facilitator/x402-facilitator.msw.d.ts.map +1 -0
  211. package/_types/openapi-client/index.d.ts +4 -0
  212. package/_types/openapi-client/index.d.ts.map +1 -1
  213. package/_types/spend-permissions/constants.d.ts +1357 -0
  214. package/_types/spend-permissions/constants.d.ts.map +1 -0
  215. package/_types/spend-permissions/types.d.ts +30 -0
  216. package/_types/spend-permissions/types.d.ts.map +1 -0
  217. package/_types/version.d.ts +1 -1
  218. package/accounts/evm/networkCapabilities.ts +101 -0
  219. package/accounts/evm/toEvmServerAccount.ts +26 -11
  220. package/accounts/evm/toEvmSmartAccount.ts +30 -15
  221. package/accounts/evm/toNetworkScopedEvmServerAccount.ts +20 -5
  222. package/accounts/evm/toNetworkScopedEvmSmartAccount.ts +21 -6
  223. package/accounts/evm/types.ts +34 -12
  224. package/accounts/solana/toSolanaAccount.ts +58 -3
  225. package/actions/Quote.ts +154 -0
  226. package/actions/evm/fund/fund.ts +10 -14
  227. package/actions/evm/fund/quoteFund.ts +13 -16
  228. package/actions/evm/getUserOperation.ts +1 -0
  229. package/actions/evm/spend-permissions/account.use.ts +48 -0
  230. package/actions/evm/spend-permissions/smartAccount.use.ts +49 -0
  231. package/actions/evm/spend-permissions/types.ts +13 -0
  232. package/actions/evm/transfer/accountTransferStrategy.ts +2 -0
  233. package/actions/evm/types.ts +88 -7
  234. package/actions/solana/fund/fund.ts +71 -0
  235. package/actions/solana/fund/quoteFund.ts +77 -0
  236. package/actions/solana/sendTransaction.ts +10 -2
  237. package/actions/solana/signTransaction.ts +10 -2
  238. package/actions/solana/types.ts +113 -2
  239. package/actions/types.ts +39 -0
  240. package/actions/{evm/fund/waitForFundOperationReceipt.ts → waitForFundOperationReceipt.ts} +2 -2
  241. package/auth/hooks/axios/withAuth.ts +3 -0
  242. package/auth/utils/http.ts +2 -1
  243. package/client/evm/evm.ts +61 -1
  244. package/client/evm/evm.types.ts +31 -0
  245. package/client/solana/solana.ts +10 -5
  246. package/index.ts +6 -1
  247. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +400 -26
  248. package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.msw.ts +89 -3
  249. package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +23 -0
  250. package/openapi-client/generated/index.msw.ts +2 -0
  251. package/openapi-client/generated/onramp/onramp.msw.ts +135 -0
  252. package/openapi-client/generated/onramp/onramp.ts +54 -0
  253. package/openapi-client/generated/x402-facilitator/x402-facilitator.msw.ts +85 -0
  254. package/openapi-client/generated/x402-facilitator/x402-facilitator.ts +34 -0
  255. package/openapi-client/index.ts +2 -0
  256. package/package.json +1 -1
  257. package/spend-permissions/constants.ts +713 -0
  258. package/spend-permissions/types.ts +42 -0
  259. package/version.ts +1 -1
  260. package/_cjs/actions/evm/fund/Quote.js +0 -63
  261. package/_cjs/actions/evm/fund/Quote.js.map +0 -1
  262. package/_cjs/actions/evm/fund/waitForFundOperationReceipt.js.map +0 -1
  263. package/_esm/actions/evm/fund/Quote.js +0 -59
  264. package/_esm/actions/evm/fund/Quote.js.map +0 -1
  265. package/_esm/actions/evm/fund/waitForFundOperationReceipt.js.map +0 -1
  266. package/_types/actions/evm/fund/Quote.d.ts +0 -51
  267. package/_types/actions/evm/fund/Quote.d.ts.map +0 -1
  268. package/_types/actions/evm/fund/types.d.ts +0 -16
  269. package/_types/actions/evm/fund/types.d.ts.map +0 -1
  270. package/_types/actions/evm/fund/waitForFundOperationReceipt.d.ts.map +0 -1
  271. package/actions/evm/fund/Quote.ts +0 -83
  272. package/actions/evm/fund/types.ts +0 -16
  273. /package/_cjs/actions/evm/{fund → spend-permissions}/types.js +0 -0
  274. /package/_esm/actions/evm/{fund → spend-permissions}/types.js +0 -0
@@ -1,12 +1,13 @@
1
- import { FundOptions } from "./fund/fund.js";
2
- import { Quote } from "./fund/Quote.js";
3
- import { QuoteFundOptions } from "./fund/quoteFund.js";
4
- import { FundOperationResult } from "./fund/types.js";
5
- import { WaitForFundOperationOptions, WaitForFundOperationResult } from "./fund/waitForFundOperationReceipt.js";
1
+ import { FundOperationResult } from "../types.js";
2
+ import { WaitForFundOperationOptions, WaitForFundOperationResult } from "../waitForFundOperationReceipt.js";
3
+ import { EvmFundOptions } from "./fund/fund.js";
4
+ import { EvmQuoteFundOptions } from "./fund/quoteFund.js";
6
5
  import { SendUserOperationOptions, SendUserOperationReturnType } from "./sendUserOperation.js";
7
6
  import { KnownEvmNetworks } from "../../accounts/evm/types.js";
8
7
  import { GetUserOperationOptions, SignTypedDataOptions, UserOperation } from "../../client/evm/evm.types.js";
9
8
  import { Hex } from "../../types/misc.js";
9
+ import { EvmQuote } from "../Quote.js";
10
+ import { UseSpendPermissionOptions } from "./spend-permissions/types.js";
10
11
  import type { ListTokenBalancesOptions, ListTokenBalancesResult } from "./listTokenBalances.js";
11
12
  import type { RequestFaucetOptions, RequestFaucetResult } from "./requestFaucet.js";
12
13
  import type { SendTransactionOptions, TransactionResult } from "./sendTransaction.js";
@@ -70,7 +71,7 @@ export type Actions = {
70
71
  * });
71
72
  * ```
72
73
  */
73
- quoteFund: (options: Omit<QuoteFundOptions, "address">) => Promise<Quote>;
74
+ quoteFund: (options: Omit<EvmQuoteFundOptions, "address">) => Promise<EvmQuote>;
74
75
  /**
75
76
  * Funds an EVM account with the specified token amount.
76
77
  *
@@ -92,7 +93,7 @@ export type Actions = {
92
93
  * });
93
94
  * ```
94
95
  */
95
- fund: (options: Omit<FundOptions, "address">) => Promise<FundOperationResult>;
96
+ fund: (options: Omit<EvmFundOptions, "address">) => Promise<FundOperationResult>;
96
97
  /**
97
98
  * Waits for a fund operation to complete and returns the transfer receipt.
98
99
  *
@@ -322,6 +323,43 @@ export type AccountActions = Actions & {
322
323
  * ```
323
324
  */
324
325
  swap: (options: AccountSwapOptions) => Promise<AccountSwapResult>;
326
+ /**
327
+ * @deprecated Experimental! This method name will change, and is subject to other breaking changes.
328
+ *
329
+ * Uses a spend permission to execute a transaction.
330
+ * This allows the account to spend tokens that have been approved via a spend permission.
331
+ *
332
+ * @param {UseSpendPermissionOptions} options - Configuration options for using the spend permission.
333
+ * @param {SpendPermission} options.spendPermission - The spend permission object containing authorization details.
334
+ * @param {bigint} options.value - The amount to spend (must not exceed the permission's allowance).
335
+ * @param {KnownEvmNetworks} options.network - The network to execute the transaction on.
336
+ *
337
+ * @returns A promise that resolves to the transaction result.
338
+ *
339
+ * @throws {Error} If the network doesn't support spend permissions via CDP API.
340
+ *
341
+ * @example
342
+ * ```typescript
343
+ * const spendPermission = {
344
+ * account: "0x1234...", // Smart account that owns the tokens
345
+ * spender: account.address, // This account that can spend
346
+ * token: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // ETH
347
+ * allowance: parseEther("0.01"),
348
+ * period: 86400, // 1 day
349
+ * start: 0,
350
+ * end: 281474976710655,
351
+ * salt: 0n,
352
+ * extraData: "0x",
353
+ * };
354
+ *
355
+ * const result = await account.__experimental_useSpendPermission({
356
+ * spendPermission,
357
+ * value: parseEther("0.001"), // Spend 0.001 ETH
358
+ * network: "base-sepolia",
359
+ * });
360
+ * ```
361
+ */
362
+ __experimental_useSpendPermission: (options: UseSpendPermissionOptions) => Promise<TransactionResult>;
325
363
  };
326
364
  export type SmartAccountActions = Actions & {
327
365
  /**
@@ -596,5 +634,42 @@ export type SmartAccountActions = Actions & {
596
634
  signTypedData: (options: Omit<SignTypedDataOptions, "address"> & {
597
635
  network: KnownEvmNetworks;
598
636
  }) => Promise<Hex>;
637
+ /**
638
+ * @deprecated Experimental! This method name will change, and is subject to other breaking changes.
639
+ *
640
+ * Uses a spend permission to execute a transaction via user operation.
641
+ * This allows the smart account to spend tokens that have been approved via a spend permission.
642
+ *
643
+ * @param {UseSpendPermissionOptions} options - Configuration options for using the spend permission.
644
+ * @param {SpendPermission} options.spendPermission - The spend permission object containing authorization details.
645
+ * @param {bigint} options.value - The amount to spend (must not exceed the permission's allowance).
646
+ * @param {KnownEvmNetworks} options.network - The network to execute the transaction on.
647
+ *
648
+ * @returns A promise that resolves to the user operation result.
649
+ *
650
+ * @throws {Error} If the network doesn't support spend permissions via CDP API.
651
+ *
652
+ * @example
653
+ * ```typescript
654
+ * const spendPermission = {
655
+ * account: "0x1234...", // Smart account that owns the tokens
656
+ * spender: smartAccount.address, // This smart account that can spend
657
+ * token: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // ETH
658
+ * allowance: parseEther("0.01"),
659
+ * period: 86400, // 1 day
660
+ * start: 0,
661
+ * end: 281474976710655,
662
+ * salt: 0n,
663
+ * extraData: "0x",
664
+ * };
665
+ *
666
+ * const result = await smartAccount.__experimental_useSpendPermission({
667
+ * spendPermission,
668
+ * value: parseEther("0.001"), // Spend 0.001 ETH
669
+ * network: "base-sepolia",
670
+ * });
671
+ * ```
672
+ */
673
+ __experimental_useSpendPermission: (options: UseSpendPermissionOptions) => Promise<SendUserOperationReturnType>;
599
674
  };
600
675
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../actions/evm/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,aAAa,EACd,MAAM,+BAA+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C,2BAA2B,CAAC,CAAC;CAC3C,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { type CdpOpenApiClientType } from "../../../openapi-client/index.js";
2
+ import { BaseFundOptions, FundOperationResult } from "../../types.js";
3
+ /**
4
+ * Options for funding a Solana account.
5
+ */
6
+ export interface SolanaFundOptions extends BaseFundOptions {
7
+ /** The token to request funds for. */
8
+ token: "sol" | "usdc";
9
+ }
10
+ /**
11
+ * Funds a Solana account.
12
+ *
13
+ * @param apiClient - The API client.
14
+ * @param options - The options for funding a Solana account.
15
+ *
16
+ * @returns A promise that resolves to the fund operation result.
17
+ */
18
+ export declare function fund(apiClient: CdpOpenApiClientType, options: SolanaFundOptions): Promise<FundOperationResult>;
19
+ //# sourceMappingURL=fund.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fund.d.ts","sourceRoot":"","sources":["../../../../actions/solana/fund/fund.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,sCAAsC;IACtC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAsB,IAAI,CACxB,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,mBAAmB,CAAC,CAyC9B"}
@@ -0,0 +1,20 @@
1
+ import { CdpOpenApiClientType } from "../../../openapi-client/index.js";
2
+ import { SolanaQuote } from "../../Quote.js";
3
+ import { BaseQuoteFundOptions } from "../../types.js";
4
+ /**
5
+ * Options for getting a quote to fund a Solana account.
6
+ */
7
+ export interface SolanaQuoteFundOptions extends BaseQuoteFundOptions {
8
+ /** The token to request funds for. */
9
+ token: "sol" | "usdc";
10
+ }
11
+ /**
12
+ * Gets a quote to fund a Solana account.
13
+ *
14
+ * @param apiClient - The API client.
15
+ * @param options - The options for getting a quote to fund a Solana account.
16
+ *
17
+ * @returns A promise that resolves to the quote.
18
+ */
19
+ export declare function quoteFund(apiClient: CdpOpenApiClientType, options: SolanaQuoteFundOptions): Promise<SolanaQuote>;
20
+ //# sourceMappingURL=quoteFund.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quoteFund.d.ts","sourceRoot":"","sources":["../../../../actions/solana/fund/quoteFund.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAGrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;IAClE,sCAAsC;IACtC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,WAAW,CAAC,CA8CtB"}
@@ -1,5 +1,11 @@
1
- import { SendTransactionOptions, TransactionResult } from "../../client/solana/solana.types.js";
1
+ import { SendTransactionOptions } from "../../client/solana/solana.types.js";
2
2
  import { CdpOpenApiClientType } from "../../openapi-client/index.js";
3
+ export interface SendTransactionResult {
4
+ /** The signature of the transaction base58 encoded. */
5
+ transactionSignature: string;
6
+ /** @deprecated Use transactionSignature instead. */
7
+ signature: string;
8
+ }
3
9
  /**
4
10
  * Sends a Solana transaction using the Coinbase API.
5
11
  *
@@ -19,5 +25,5 @@ import { CdpOpenApiClientType } from "../../openapi-client/index.js";
19
25
  * });
20
26
  * ```
21
27
  */
22
- export declare function sendTransaction(apiClient: CdpOpenApiClientType, options: SendTransactionOptions): Promise<TransactionResult>;
28
+ export declare function sendTransaction(apiClient: CdpOpenApiClientType, options: SendTransactionOptions): Promise<SendTransactionResult>;
23
29
  //# sourceMappingURL=sendTransaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sendTransaction.d.ts","sourceRoot":"","sources":["../../../actions/solana/sendTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,iBAAiB,CAAC,CAY5B"}
1
+ {"version":3,"file":"sendTransaction.d.ts","sourceRoot":"","sources":["../../../actions/solana/sendTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAahC"}
@@ -1,5 +1,11 @@
1
- import { SignTransactionOptions, SignatureResult } from "../../client/solana/solana.types.js";
1
+ import { SignTransactionOptions } from "../../client/solana/solana.types.js";
2
2
  import { CdpOpenApiClientType } from "../../openapi-client/index.js";
3
+ export interface SignTransactionResult {
4
+ /** The signature of the transaction base58 encoded. */
5
+ signedTransaction: string;
6
+ /** @deprecated Use signedTransaction instead. */
7
+ signature: string;
8
+ }
3
9
  /**
4
10
  * Signs a transaction.
5
11
  *
@@ -34,5 +40,5 @@ import { CdpOpenApiClientType } from "../../openapi-client/index.js";
34
40
  * });
35
41
  * ```
36
42
  */
37
- export declare function signTransaction(apiClient: CdpOpenApiClientType, options: SignTransactionOptions): Promise<SignatureResult>;
43
+ export declare function signTransaction(apiClient: CdpOpenApiClientType, options: SignTransactionOptions): Promise<SignTransactionResult>;
38
44
  //# sourceMappingURL=signTransaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signTransaction.d.ts","sourceRoot":"","sources":["../../../actions/solana/signTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,eAAe,CAAC,CAY1B"}
1
+ {"version":3,"file":"signTransaction.d.ts","sourceRoot":"","sources":["../../../actions/solana/signTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAahC"}
@@ -1,5 +1,12 @@
1
1
  import { TransferOptions } from "./transfer.js";
2
- import { RequestFaucetOptions, SignatureResult, SignMessageOptions, SignTransactionOptions } from "../../client/solana/solana.types.js";
2
+ import { RequestFaucetOptions, SendTransactionOptions, SignatureResult, SignMessageOptions, SignTransactionOptions } from "../../client/solana/solana.types.js";
3
+ import { SolanaQuote } from "../Quote.js";
4
+ import { FundOperationResult } from "../types.js";
5
+ import { WaitForFundOperationOptions, WaitForFundOperationResult } from "../waitForFundOperationReceipt.js";
6
+ import { SolanaFundOptions } from "./fund/fund.js";
7
+ import { SolanaQuoteFundOptions } from "./fund/quoteFund.js";
8
+ import { SendTransactionResult } from "./sendTransaction.js";
9
+ import type { SignTransactionResult } from "./signTransaction.js";
3
10
  export type AccountActions = {
4
11
  /**
5
12
  * Requests funds from a Solana faucet.
@@ -71,12 +78,45 @@ export type AccountActions = {
71
78
  * const transaction = Buffer.from(serializedTransaction).toString("base64");
72
79
  *
73
80
  * // When you want to sign a transaction, you can do so by address and base64 encoded transaction
74
- * const { signature } = await account.signTransaction({
81
+ * const { signedTransaction } = await account.signTransaction({
75
82
  * transaction,
76
83
  * });
77
84
  * ```
78
85
  */
79
- signTransaction: (options: Omit<SignTransactionOptions, "address">) => Promise<SignatureResult>;
86
+ signTransaction: (options: Omit<SignTransactionOptions, "address">) => Promise<SignTransactionResult>;
87
+ /**
88
+ * Sends a transaction.
89
+ *
90
+ * @param {SendTransactionOptions} options - Parameters for sending the transaction.
91
+ * @param {string} options.address - The address to send the transaction for.
92
+ * @param {string} options.transaction - The transaction to send.
93
+ * @param {string} [options.idempotencyKey] - An idempotency key.
94
+ *
95
+ * @returns A promise that resolves to the transaction signature.
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * // Create a Solana account
100
+ * const account = await cdp.solana.createAccount();
101
+ *
102
+ * // Add your transaction instructions here
103
+ * const transaction = new Transaction()
104
+ *
105
+ * // Make sure to set requireAllSignatures to false, since signing will be done through the API
106
+ * const serializedTransaction = transaction.serialize({
107
+ * requireAllSignatures: false,
108
+ * });
109
+ *
110
+ * // Base64 encode the serialized transaction
111
+ * const transaction = Buffer.from(serializedTransaction).toString("base64");
112
+ *
113
+ * // When you want to sign a transaction, you can do so by address and base64 encoded transaction
114
+ * const { transactionSignature } = await account.sendTransaction({
115
+ * transaction,
116
+ * });
117
+ * ```
118
+ */
119
+ sendTransaction: (options: Omit<SendTransactionOptions, "address">) => Promise<SendTransactionResult>;
80
120
  /**
81
121
  * Transfers SOL or SPL tokens between accounts
82
122
  *
@@ -103,5 +143,61 @@ export type AccountActions = {
103
143
  * ```
104
144
  */
105
145
  transfer: (options: Omit<TransferOptions, "from">) => Promise<SignatureResult>;
146
+ /**
147
+ * Gets a quote to fund a Solana account.
148
+ *
149
+ * @param options - The options for the quote fund.
150
+ * @param options.token - The token to fund the account with.
151
+ * @param options.amount - The amount of the token to fund represented as an atomic unit.
152
+ * It's common to use `parseUnits` utils from viem to convert to atomic units.
153
+ * Otherwise, you can pass atomic units directly.
154
+ *
155
+ * @returns A promise that resolves to a Quote object containing details about the funding operation.
156
+ *
157
+ * @example
158
+ * ```ts
159
+ * const quote = await account.quoteFund({
160
+ * token: "usdc",
161
+ * amount: 1000000n,
162
+ * });
163
+ * ```
164
+ */
165
+ quoteFund: (options: Omit<SolanaQuoteFundOptions, "address">) => Promise<SolanaQuote>;
166
+ /**
167
+ * Funds a Solana account with the specified token amount.
168
+ *
169
+ * @param options - The options for the fund operation.
170
+ * @param options.token - The token to fund the account with (e.g., 'usdc').
171
+ * @param options.amount - The amount of the token to fund represented as an atomic unit.
172
+ * It's common to use `parseUnits` utils from viem to convert to atomic units.
173
+ * Otherwise, you can pass atomic units directly.
174
+ *
175
+ * @returns A promise that resolves to the fund operation result containing the transfer details.
176
+ *
177
+ * @example
178
+ * ```ts
179
+ * const fundOperation = await account.fund({
180
+ * token: "usdc",
181
+ * amount: 1000000n,
182
+ * });
183
+ * ```
184
+ */
185
+ fund: (options: Omit<SolanaFundOptions, "address">) => Promise<FundOperationResult>;
186
+ /**
187
+ * Waits for a fund operation to complete and returns the transfer receipt.
188
+ *
189
+ * @param options - The options for the wait for fund operation.
190
+ * @param options.transferId - The ID of the transfer to wait for.
191
+ *
192
+ * @returns A promise that resolves to the completed transfer receipt containing details about the funding operation.
193
+ *
194
+ * @example
195
+ * ```ts
196
+ * const completedTransfer = await account.waitForFundOperationReceipt({
197
+ * transferId: "transfer_123",
198
+ * });
199
+ * ```
200
+ */
201
+ waitForFundOperationReceipt(options: WaitForFundOperationOptions): Promise<WaitForFundOperationResult>;
106
202
  };
107
203
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../actions/solana/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;AAE7C,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAE5F;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAExF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,eAAe,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAEhG;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;CAChF,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../actions/solana/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OA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AAE,MAAM,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAE/E;;;;;;;;;;;;;;;;;;OAkBG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAEtF;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEpF;;;;;;;;;;;;;;OAcG;IACH,2BAA2B,CACzB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACxC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { TransferStatus } from "../openapi-client/index.js";
2
+ /**
3
+ * Base options for getting a quote to fund an account.
4
+ */
5
+ export interface BaseQuoteFundOptions {
6
+ /** The address of the account. */
7
+ address: string;
8
+ /** The amount to fund the account with, in atomic units (e.g. wei for ETH, lamports for SOL) of the token. */
9
+ amount: bigint;
10
+ }
11
+ /**
12
+ * Base options for funding an account.
13
+ */
14
+ export interface BaseFundOptions {
15
+ /** The address of the account. */
16
+ address: string;
17
+ /** The amount to fund the account with, in atomic units (e.g. wei for ETH, lamports for SOL) of the token. */
18
+ amount: bigint;
19
+ }
20
+ /**
21
+ * The result of a fund operation.
22
+ */
23
+ export type FundOperationResult = {
24
+ /** The transfer that was created to fund the account. */
25
+ id: string;
26
+ /** The network that the transfer was created on. */
27
+ network: string;
28
+ /** The target amount that will be received. */
29
+ targetAmount: string;
30
+ /** The currency that will be received. */
31
+ targetCurrency: string;
32
+ /** The status of the fund operation. */
33
+ status: TransferStatus;
34
+ /** The transaction hash of the transfer. */
35
+ transactionHash?: string;
36
+ };
37
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,8GAA8G;IAC9G,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,8GAA8G;IAC9G,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,yDAAyD;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,MAAM,EAAE,cAAc,CAAC;IACvB,4CAA4C;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
@@ -1,5 +1,5 @@
1
- import { CdpOpenApiClientType, TransferStatus } from "../../../openapi-client/index.js";
2
- import { WaitOptions } from "../../../utils/wait.js";
1
+ import { CdpOpenApiClientType, TransferStatus } from "../openapi-client/index.js";
2
+ import { WaitOptions } from "../utils/wait.js";
3
3
  /**
4
4
  * Options for waiting for a fund operation.
5
5
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waitForFundOperationReceipt.d.ts","sourceRoot":"","sources":["../../actions/waitForFundOperationReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAY,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAQ,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,WAAW,CAA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EtB,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,+CAA+C;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,sBAAsB,iBA+EnF"}
1
+ {"version":3,"file":"withAuth.d.ts","sourceRoot":"","sources":["../../../../auth/hooks/axios/withAuth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgB,MAAM,OAAO,CAAC;AAKpD,MAAM,WAAW,sBAAsB;IACrC;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB,wBAAwB;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,+CAA+C;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,sBAAsB,iBAkFnF"}
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../auth/utils/http.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,EAAE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,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAsCjC;AAgBD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAYlF"}
@@ -1,4 +1,4 @@
1
- import { CreateServerAccountOptions, CreateSmartAccountOptions, CreateSwapQuoteOptions, CreateSwapQuoteResult, EvmClientInterface, ExportServerAccountOptions, GetOrCreateServerAccountOptions, GetOrCreateSmartAccountOptions, GetServerAccountOptions, GetSmartAccountOptions, GetSwapPriceOptions, GetSwapPriceResult, GetUserOperationOptions, ImportServerAccountOptions, ListServerAccountResult, ListServerAccountsOptions, ListSmartAccountResult, ListSmartAccountsOptions, PrepareUserOperationOptions, ServerAccount, SignatureResult, SignHashOptions, SignMessageOptions, SignTransactionOptions, SignTypedDataOptions, SmartAccount, SwapUnavailableResult, UpdateEvmAccountOptions, UpdateEvmSmartAccountOptions, UserOperation, WaitForUserOperationOptions } from "./evm.types.js";
1
+ import { CreateServerAccountOptions, CreateSmartAccountOptions, CreateSpendPermissionOptions, CreateSwapQuoteOptions, CreateSwapQuoteResult, EvmClientInterface, ExportServerAccountOptions, GetOrCreateServerAccountOptions, GetOrCreateSmartAccountOptions, GetServerAccountOptions, GetSmartAccountOptions, GetSwapPriceOptions, GetSwapPriceResult, GetUserOperationOptions, ImportServerAccountOptions, ListServerAccountResult, ListServerAccountsOptions, ListSmartAccountResult, ListSmartAccountsOptions, PrepareUserOperationOptions, ServerAccount, SignatureResult, SignHashOptions, SignMessageOptions, SignTransactionOptions, SignTypedDataOptions, SmartAccount, SwapUnavailableResult, UpdateEvmAccountOptions, UpdateEvmSmartAccountOptions, UserOperation, WaitForUserOperationOptions } from "./evm.types.js";
2
2
  import { ListTokenBalancesOptions, ListTokenBalancesResult } from "../../actions/evm/listTokenBalances.js";
3
3
  import { RequestFaucetOptions, RequestFaucetResult } from "../../actions/evm/requestFaucet.js";
4
4
  import { SendUserOperationOptions, SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
@@ -158,6 +158,24 @@ export declare class EvmClient implements EvmClientInterface {
158
158
  * ```
159
159
  */
160
160
  createSmartAccount(options: CreateSmartAccountOptions): Promise<SmartAccount>;
161
+ /**
162
+ * Creates a spend permission for a smart account.
163
+ *
164
+ * @param {CreateSpendPermissionOptions} options - Parameters for creating the spend permission.
165
+ * @param {SpendPermission} options.spendPermission - The spend permission to create.
166
+ * @param {string} [options.idempotencyKey] - The idempotency key to use for the spend permission.
167
+ *
168
+ * @returns A promise that resolves to the spend permission.
169
+ *
170
+ * @example
171
+ * ```ts
172
+ * const userOperation = await cdp.evm.createSpendPermission({
173
+ * spendPermission,
174
+ * network: "base-sepolia",
175
+ * });
176
+ * ```
177
+ */
178
+ createSpendPermission(options: CreateSpendPermissionOptions): Promise<UserOperation>;
161
179
  /**
162
180
  * Gets a CDP EVM account.
163
181
  *
@@ -1 +1 @@
1
- {"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../client/evm/evm.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,+BAA+B,EAC/B,8BAA8B,EAC9B,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,aAAa,EACb,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,aAAa,EACb,2BAA2B,EAC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{ EvmAccount as Account, EvmServerAccount as ServerAccount, EvmSmartAccount as SmartAccount } from "../../accounts/evm/types.js";
2
3
  import type { ListTokenBalancesOptions, ListTokenBalancesResult } from "../../actions/evm/listTokenBalances.js";
3
4
  import type { RequestFaucetOptions, RequestFaucetResult } from "../../actions/evm/requestFaucet.js";
4
5
  import type { TransactionResult, SendTransactionOptions } from "../../actions/evm/sendTransaction.js";
5
6
  import type { SendUserOperationOptions, SendUserOperationReturnType } from "../../actions/evm/sendUserOperation.js";
6
7
  import type { SmartAccountActions } from "../../actions/evm/types.js";
7
- import type { EvmSwapsNetwork, EvmUserOperationNetwork, EvmUserOperationStatus, OpenApiEvmMethods, UpdateEvmAccountBody as UpdateEvmAccount, UpdateEvmSmartAccountBody as UpdateEvmSmartAccount } from "../../openapi-client/index.js";
8
+ import type { EvmSwapsNetwork, EvmUserOperationNetwork, EvmUserOperationStatus, OpenApiEvmMethods, UpdateEvmAccountBody as UpdateEvmAccount, UpdateEvmSmartAccountBody as UpdateEvmSmartAccount, UserOperationReceipt } from "../../openapi-client/index.js";
8
9
  import type { Calls } from "../../types/calls.js";
9
10
  import type { Address, EIP712Message, Hex } from "../../types/misc.js";
10
11
  import type { WaitOptions } from "../../utils/wait.js";
11
12
  /**
12
13
  * The EvmClient type, where all OpenApiEvmMethods methods are wrapped.
13
14
  */
14
- export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccount" | "createEvmSmartAccount" | "importEvmAccount" | "exportEvmAccount" | "exportEvmAccountByName" | "getEvmAccount" | "getEvmAccountByName" | "getEvmSmartAccount" | "getEvmSmartAccountByName" | "getEvmSwapPrice" | "createEvmSwapQuote" | "getUserOperation" | "updateEvmAccount" | "listEvmAccounts" | "listEvmSmartAccounts" | "listEvmTokenBalances" | "prepareUserOperation" | "requestEvmFaucet" | "sendUserOperation" | "signEvmHash" | "signEvmMessage" | "signEvmTransaction" | "signEvmTypedData" | "sendEvmTransaction" | "signEvmTypedData" | "updateEvmAccount" | "exportEvmAccount" | "exportEvmAccountByName" | "updateEvmSmartAccount"> & {
15
+ export type EvmClientInterface = Omit<typeof OpenApiEvmMethods, "createEvmAccount" | "createEvmSmartAccount" | "createSpendPermission" | "importEvmAccount" | "exportEvmAccount" | "exportEvmAccountByName" | "getEvmAccount" | "getEvmAccountByName" | "getEvmSmartAccount" | "getEvmSmartAccountByName" | "getEvmSwapPrice" | "createEvmSwapQuote" | "getUserOperation" | "updateEvmAccount" | "listEvmAccounts" | "listEvmSmartAccounts" | "listEvmTokenBalances" | "prepareUserOperation" | "requestEvmFaucet" | "sendUserOperation" | "signEvmHash" | "signEvmMessage" | "signEvmTransaction" | "signEvmTypedData" | "sendEvmTransaction" | "signEvmTypedData" | "updateEvmAccount" | "exportEvmAccount" | "exportEvmAccountByName" | "updateEvmSmartAccount"> & {
15
16
  createAccount: (options: CreateServerAccountOptions) => Promise<ServerAccount>;
16
17
  createSmartAccount: (options: CreateSmartAccountOptions) => Promise<SmartAccount>;
17
18
  importAccount: (options: ImportServerAccountOptions) => Promise<ServerAccount>;
@@ -189,6 +190,16 @@ export interface CreateSwapQuoteResult {
189
190
  */
190
191
  execute: (options?: ExecuteSwapQuoteOptions) => Promise<ExecuteSwapQuoteResult>;
191
192
  }
193
+ export interface CreateSpendPermissionOptions {
194
+ /** The spend permission. */
195
+ spendPermission: SpendPermission;
196
+ /** The network. */
197
+ network: EvmUserOperationNetwork;
198
+ /** The paymaster URL. */
199
+ paymasterUrl?: string;
200
+ /** The idempotency key. */
201
+ idempotencyKey?: string;
202
+ }
192
203
  /**
193
204
  * Options for getting a user operation.
194
205
  */
@@ -244,6 +255,10 @@ export interface UserOperation {
244
255
  * The hash of the transaction that included this particular user operation. This gets set after the user operation is broadcasted and the transaction is included in a block.
245
256
  */
246
257
  transactionHash?: Hex;
258
+ /**
259
+ * The receipts associated with the broadcasted user operation.
260
+ */
261
+ receipts?: UserOperationReceipt[];
247
262
  }
248
263
  /**
249
264
  * Options for creating an EVM server account.
@@ -315,6 +330,12 @@ export interface GetOrCreateSmartAccountOptions {
315
330
  name: string;
316
331
  /** The owner of the account. */
317
332
  owner: Account;
333
+ /**
334
+ * @deprecated Experimental! This method name will change, and is subject to other breaking changes.
335
+ *
336
+ * The flag to enable spend permission.
337
+ */
338
+ __experimental_enableSpendPermission?: boolean;
318
339
  }
319
340
  /**
320
341
  * Options for listing EVM accounts.
@@ -401,6 +422,12 @@ export interface CreateSmartAccountOptions {
401
422
  idempotencyKey?: string;
402
423
  /** The name of the account. */
403
424
  name?: string;
425
+ /**
426
+ * @deprecated Experimental! This method name will change, and is subject to other breaking changes.
427
+ *
428
+ * The flag to enable spend permission.
429
+ */
430
+ __experimental_enableSpendPermission?: boolean;
404
431
  }
405
432
  /**
406
433
  * Options for signing an EVM hash.