@coinbase/agentkit 0.0.0-nightly-20250328174338

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 (292) hide show
  1. package/README.md +827 -0
  2. package/dist/action-providers/across/acrossActionProvider.d.ts +50 -0
  3. package/dist/action-providers/across/acrossActionProvider.js +333 -0
  4. package/dist/action-providers/across/acrossActionProvider.test.d.ts +1 -0
  5. package/dist/action-providers/across/acrossActionProvider.test.js +391 -0
  6. package/dist/action-providers/across/constants.d.ts +1 -0
  7. package/dist/action-providers/across/constants.js +2 -0
  8. package/dist/action-providers/across/index.d.ts +1 -0
  9. package/dist/action-providers/across/index.js +17 -0
  10. package/dist/action-providers/across/schemas.d.ts +36 -0
  11. package/dist/action-providers/across/schemas.js +46 -0
  12. package/dist/action-providers/across/utils.d.ts +7 -0
  13. package/dist/action-providers/across/utils.js +25 -0
  14. package/dist/action-providers/actionDecorator.d.ts +69 -0
  15. package/dist/action-providers/actionDecorator.js +96 -0
  16. package/dist/action-providers/actionProvider.d.ts +48 -0
  17. package/dist/action-providers/actionProvider.js +62 -0
  18. package/dist/action-providers/alchemy/alchemyTokenPricesActionProvider.d.ts +55 -0
  19. package/dist/action-providers/alchemy/alchemyTokenPricesActionProvider.js +173 -0
  20. package/dist/action-providers/alchemy/alchemyTokenPricesActionProvider.test.d.ts +1 -0
  21. package/dist/action-providers/alchemy/alchemyTokenPricesActionProvider.test.js +131 -0
  22. package/dist/action-providers/alchemy/index.d.ts +2 -0
  23. package/dist/action-providers/alchemy/index.js +18 -0
  24. package/dist/action-providers/alchemy/schemas.d.ts +41 -0
  25. package/dist/action-providers/alchemy/schemas.js +34 -0
  26. package/dist/action-providers/allora/alloraActionProvider.d.ts +44 -0
  27. package/dist/action-providers/allora/alloraActionProvider.js +195 -0
  28. package/dist/action-providers/allora/alloraActionProvider.test.d.ts +1 -0
  29. package/dist/action-providers/allora/alloraActionProvider.test.js +109 -0
  30. package/dist/action-providers/allora/index.d.ts +2 -0
  31. package/dist/action-providers/allora/index.js +18 -0
  32. package/dist/action-providers/allora/schemas.d.ts +28 -0
  33. package/dist/action-providers/allora/schemas.js +30 -0
  34. package/dist/action-providers/basename/basenameActionProvider.d.ts +30 -0
  35. package/dist/action-providers/basename/basenameActionProvider.js +109 -0
  36. package/dist/action-providers/basename/basenameActionProvider.test.d.ts +1 -0
  37. package/dist/action-providers/basename/basenameActionProvider.test.js +146 -0
  38. package/dist/action-providers/basename/constants.d.ts +52 -0
  39. package/dist/action-providers/basename/constants.js +81 -0
  40. package/dist/action-providers/basename/index.d.ts +2 -0
  41. package/dist/action-providers/basename/index.js +18 -0
  42. package/dist/action-providers/basename/schemas.d.ts +14 -0
  43. package/dist/action-providers/basename/schemas.js +14 -0
  44. package/dist/action-providers/cdp/cdpApiActionProvider.d.ts +43 -0
  45. package/dist/action-providers/cdp/cdpApiActionProvider.js +128 -0
  46. package/dist/action-providers/cdp/cdpApiActionProvider.test.d.ts +1 -0
  47. package/dist/action-providers/cdp/cdpApiActionProvider.test.js +146 -0
  48. package/dist/action-providers/cdp/cdpWalletActionProvider.d.ts +58 -0
  49. package/dist/action-providers/cdp/cdpWalletActionProvider.js +224 -0
  50. package/dist/action-providers/cdp/cdpWalletActionProvider.test.d.ts +1 -0
  51. package/dist/action-providers/cdp/cdpWalletActionProvider.test.js +267 -0
  52. package/dist/action-providers/cdp/constants.d.ts +31 -0
  53. package/dist/action-providers/cdp/constants.js +34 -0
  54. package/dist/action-providers/cdp/index.d.ts +3 -0
  55. package/dist/action-providers/cdp/index.js +19 -0
  56. package/dist/action-providers/cdp/schemas.d.ts +91 -0
  57. package/dist/action-providers/cdp/schemas.js +77 -0
  58. package/dist/action-providers/compound/compoundActionProvider.d.ts +67 -0
  59. package/dist/action-providers/compound/compoundActionProvider.js +365 -0
  60. package/dist/action-providers/compound/compoundActionProvider.test.d.ts +1 -0
  61. package/dist/action-providers/compound/compoundActionProvider.test.js +353 -0
  62. package/dist/action-providers/compound/constants.d.ts +180 -0
  63. package/dist/action-providers/compound/constants.js +129 -0
  64. package/dist/action-providers/compound/index.d.ts +1 -0
  65. package/dist/action-providers/compound/index.js +17 -0
  66. package/dist/action-providers/compound/schemas.d.ts +57 -0
  67. package/dist/action-providers/compound/schemas.js +58 -0
  68. package/dist/action-providers/compound/utils.d.ts +95 -0
  69. package/dist/action-providers/compound/utils.js +353 -0
  70. package/dist/action-providers/customActionProvider.d.ts +30 -0
  71. package/dist/action-providers/customActionProvider.js +66 -0
  72. package/dist/action-providers/defillama/constants.d.ts +8 -0
  73. package/dist/action-providers/defillama/constants.js +11 -0
  74. package/dist/action-providers/defillama/defillamaActionProvider.d.ts +54 -0
  75. package/dist/action-providers/defillama/defillamaActionProvider.js +180 -0
  76. package/dist/action-providers/defillama/defillamaActionProvider.test.d.ts +1 -0
  77. package/dist/action-providers/defillama/defillamaActionProvider.test.js +114 -0
  78. package/dist/action-providers/defillama/index.d.ts +1 -0
  79. package/dist/action-providers/defillama/index.js +17 -0
  80. package/dist/action-providers/defillama/schemas.d.ts +34 -0
  81. package/dist/action-providers/defillama/schemas.js +34 -0
  82. package/dist/action-providers/defillama/types.d.ts +73 -0
  83. package/dist/action-providers/defillama/types.js +2 -0
  84. package/dist/action-providers/defillama/utils.d.ts +10 -0
  85. package/dist/action-providers/defillama/utils.js +87 -0
  86. package/dist/action-providers/defillama/utils.test.d.ts +1 -0
  87. package/dist/action-providers/defillama/utils.test.js +124 -0
  88. package/dist/action-providers/erc20/constants.d.ts +137 -0
  89. package/dist/action-providers/erc20/constants.js +202 -0
  90. package/dist/action-providers/erc20/erc20ActionProvider.d.ts +38 -0
  91. package/dist/action-providers/erc20/erc20ActionProvider.js +142 -0
  92. package/dist/action-providers/erc20/erc20ActionProvider.test.d.ts +1 -0
  93. package/dist/action-providers/erc20/erc20ActionProvider.test.js +131 -0
  94. package/dist/action-providers/erc20/index.d.ts +1 -0
  95. package/dist/action-providers/erc20/index.js +17 -0
  96. package/dist/action-providers/erc20/schemas.d.ts +27 -0
  97. package/dist/action-providers/erc20/schemas.js +26 -0
  98. package/dist/action-providers/erc721/constants.d.ts +232 -0
  99. package/dist/action-providers/erc721/constants.js +298 -0
  100. package/dist/action-providers/erc721/erc721ActionProvider.d.ts +46 -0
  101. package/dist/action-providers/erc721/erc721ActionProvider.js +164 -0
  102. package/dist/action-providers/erc721/erc721ActionProvider.test.d.ts +1 -0
  103. package/dist/action-providers/erc721/erc721ActionProvider.test.js +137 -0
  104. package/dist/action-providers/erc721/index.d.ts +1 -0
  105. package/dist/action-providers/erc721/index.js +17 -0
  106. package/dist/action-providers/erc721/schemas.d.ts +46 -0
  107. package/dist/action-providers/erc721/schemas.js +44 -0
  108. package/dist/action-providers/farcaster/farcasterActionProvider.d.ts +57 -0
  109. package/dist/action-providers/farcaster/farcasterActionProvider.js +142 -0
  110. package/dist/action-providers/farcaster/farcasterActionProvider.test.d.ts +1 -0
  111. package/dist/action-providers/farcaster/farcasterActionProvider.test.js +151 -0
  112. package/dist/action-providers/farcaster/index.d.ts +2 -0
  113. package/dist/action-providers/farcaster/index.js +18 -0
  114. package/dist/action-providers/farcaster/schemas.d.ts +15 -0
  115. package/dist/action-providers/farcaster/schemas.js +20 -0
  116. package/dist/action-providers/index.d.ts +24 -0
  117. package/dist/action-providers/index.js +40 -0
  118. package/dist/action-providers/jupiter/index.d.ts +1 -0
  119. package/dist/action-providers/jupiter/index.js +17 -0
  120. package/dist/action-providers/jupiter/jupiterActionProvider.d.ts +36 -0
  121. package/dist/action-providers/jupiter/jupiterActionProvider.js +115 -0
  122. package/dist/action-providers/jupiter/jupiterActionProvider.test.d.ts +1 -0
  123. package/dist/action-providers/jupiter/jupiterActionProvider.test.js +146 -0
  124. package/dist/action-providers/jupiter/schemas.d.ts +20 -0
  125. package/dist/action-providers/jupiter/schemas.js +20 -0
  126. package/dist/action-providers/messari/constants.d.ts +17 -0
  127. package/dist/action-providers/messari/constants.js +20 -0
  128. package/dist/action-providers/messari/index.d.ts +5 -0
  129. package/dist/action-providers/messari/index.js +21 -0
  130. package/dist/action-providers/messari/messariActionProvider.d.ts +42 -0
  131. package/dist/action-providers/messari/messariActionProvider.js +128 -0
  132. package/dist/action-providers/messari/messariActionProvider.test.d.ts +1 -0
  133. package/dist/action-providers/messari/messariActionProvider.test.js +152 -0
  134. package/dist/action-providers/messari/schemas.d.ts +11 -0
  135. package/dist/action-providers/messari/schemas.js +16 -0
  136. package/dist/action-providers/messari/types.d.ts +40 -0
  137. package/dist/action-providers/messari/types.js +2 -0
  138. package/dist/action-providers/messari/utils.d.ts +22 -0
  139. package/dist/action-providers/messari/utils.js +65 -0
  140. package/dist/action-providers/moonwell/constants.d.ts +78 -0
  141. package/dist/action-providers/moonwell/constants.js +111 -0
  142. package/dist/action-providers/moonwell/index.d.ts +1 -0
  143. package/dist/action-providers/moonwell/index.js +5 -0
  144. package/dist/action-providers/moonwell/moonwellActionProvider.d.ts +39 -0
  145. package/dist/action-providers/moonwell/moonwellActionProvider.js +249 -0
  146. package/dist/action-providers/moonwell/moonwellActionProvider.test.d.ts +1 -0
  147. package/dist/action-providers/moonwell/moonwellActionProvider.test.js +455 -0
  148. package/dist/action-providers/moonwell/schemas.d.ts +30 -0
  149. package/dist/action-providers/moonwell/schemas.js +39 -0
  150. package/dist/action-providers/morpho/constants.d.ts +16 -0
  151. package/dist/action-providers/morpho/constants.js +27 -0
  152. package/dist/action-providers/morpho/index.d.ts +2 -0
  153. package/dist/action-providers/morpho/index.js +18 -0
  154. package/dist/action-providers/morpho/morphoActionProvider.d.ts +39 -0
  155. package/dist/action-providers/morpho/morphoActionProvider.js +154 -0
  156. package/dist/action-providers/morpho/morphoActionProvider.test.d.ts +1 -0
  157. package/dist/action-providers/morpho/morphoActionProvider.test.js +128 -0
  158. package/dist/action-providers/morpho/schemas.d.ts +36 -0
  159. package/dist/action-providers/morpho/schemas.js +47 -0
  160. package/dist/action-providers/opensea/index.d.ts +1 -0
  161. package/dist/action-providers/opensea/index.js +17 -0
  162. package/dist/action-providers/opensea/openseaActionProvider.d.ts +59 -0
  163. package/dist/action-providers/opensea/openseaActionProvider.js +146 -0
  164. package/dist/action-providers/opensea/openseaActionProvider.test.d.ts +1 -0
  165. package/dist/action-providers/opensea/openseaActionProvider.test.js +201 -0
  166. package/dist/action-providers/opensea/schemas.d.ts +30 -0
  167. package/dist/action-providers/opensea/schemas.js +33 -0
  168. package/dist/action-providers/opensea/utils.d.ts +12 -0
  169. package/dist/action-providers/opensea/utils.js +47 -0
  170. package/dist/action-providers/pyth/index.d.ts +2 -0
  171. package/dist/action-providers/pyth/index.js +18 -0
  172. package/dist/action-providers/pyth/pythActionProvider.d.ts +33 -0
  173. package/dist/action-providers/pyth/pythActionProvider.js +121 -0
  174. package/dist/action-providers/pyth/pythActionProvider.test.d.ts +1 -0
  175. package/dist/action-providers/pyth/pythActionProvider.test.js +113 -0
  176. package/dist/action-providers/pyth/schemas.d.ts +21 -0
  177. package/dist/action-providers/pyth/schemas.js +20 -0
  178. package/dist/action-providers/spl/index.d.ts +1 -0
  179. package/dist/action-providers/spl/index.js +17 -0
  180. package/dist/action-providers/spl/schemas.d.ts +30 -0
  181. package/dist/action-providers/spl/schemas.js +26 -0
  182. package/dist/action-providers/spl/splActionProvider.d.ts +45 -0
  183. package/dist/action-providers/spl/splActionProvider.js +173 -0
  184. package/dist/action-providers/spl/splActionProvider.test.d.ts +1 -0
  185. package/dist/action-providers/spl/splActionProvider.test.js +300 -0
  186. package/dist/action-providers/twitter/index.d.ts +2 -0
  187. package/dist/action-providers/twitter/index.js +18 -0
  188. package/dist/action-providers/twitter/schemas.d.ts +38 -0
  189. package/dist/action-providers/twitter/schemas.js +44 -0
  190. package/dist/action-providers/twitter/twitterActionProvider.d.ts +82 -0
  191. package/dist/action-providers/twitter/twitterActionProvider.js +204 -0
  192. package/dist/action-providers/twitter/twitterActionProvider.test.d.ts +1 -0
  193. package/dist/action-providers/twitter/twitterActionProvider.test.js +185 -0
  194. package/dist/action-providers/wallet/index.d.ts +1 -0
  195. package/dist/action-providers/wallet/index.js +17 -0
  196. package/dist/action-providers/wallet/schemas.d.ts +19 -0
  197. package/dist/action-providers/wallet/schemas.js +19 -0
  198. package/dist/action-providers/wallet/walletActionProvider.d.ts +44 -0
  199. package/dist/action-providers/wallet/walletActionProvider.js +140 -0
  200. package/dist/action-providers/wallet/walletActionProvider.test.d.ts +1 -0
  201. package/dist/action-providers/wallet/walletActionProvider.test.js +194 -0
  202. package/dist/action-providers/weth/constants.d.ts +19 -0
  203. package/dist/action-providers/weth/constants.js +29 -0
  204. package/dist/action-providers/weth/index.d.ts +1 -0
  205. package/dist/action-providers/weth/index.js +17 -0
  206. package/dist/action-providers/weth/schemas.d.ts +8 -0
  207. package/dist/action-providers/weth/schemas.js +10 -0
  208. package/dist/action-providers/weth/wethActionProvider.d.ts +30 -0
  209. package/dist/action-providers/weth/wethActionProvider.js +89 -0
  210. package/dist/action-providers/weth/wethActionProvider.test.d.ts +1 -0
  211. package/dist/action-providers/weth/wethActionProvider.test.js +92 -0
  212. package/dist/action-providers/wow/constants.d.ts +15 -0
  213. package/dist/action-providers/wow/constants.js +844 -0
  214. package/dist/action-providers/wow/index.d.ts +2 -0
  215. package/dist/action-providers/wow/index.js +18 -0
  216. package/dist/action-providers/wow/schemas.d.ts +43 -0
  217. package/dist/action-providers/wow/schemas.js +47 -0
  218. package/dist/action-providers/wow/uniswap/constants.d.ts +3 -0
  219. package/dist/action-providers/wow/uniswap/constants.js +100 -0
  220. package/dist/action-providers/wow/uniswap/utils.d.ts +82 -0
  221. package/dist/action-providers/wow/uniswap/utils.js +226 -0
  222. package/dist/action-providers/wow/utils.d.ts +27 -0
  223. package/dist/action-providers/wow/utils.js +63 -0
  224. package/dist/action-providers/wow/wowActionProvider.d.ts +46 -0
  225. package/dist/action-providers/wow/wowActionProvider.js +223 -0
  226. package/dist/action-providers/wow/wowActionProvider.test.d.ts +1 -0
  227. package/dist/action-providers/wow/wowActionProvider.test.js +291 -0
  228. package/dist/agentkit.d.ts +44 -0
  229. package/dist/agentkit.js +68 -0
  230. package/dist/analytics/index.d.ts +1 -0
  231. package/dist/analytics/index.js +17 -0
  232. package/dist/analytics/sendAnalyticsEvent.d.ts +31 -0
  233. package/dist/analytics/sendAnalyticsEvent.js +52 -0
  234. package/dist/index.d.ts +4 -0
  235. package/dist/index.js +20 -0
  236. package/dist/network/index.d.ts +3 -0
  237. package/dist/network/index.js +19 -0
  238. package/dist/network/network.d.ts +20 -0
  239. package/dist/network/network.js +86 -0
  240. package/dist/network/svm.d.ts +15 -0
  241. package/dist/network/svm.js +38 -0
  242. package/dist/network/types.d.ts +17 -0
  243. package/dist/network/types.js +2 -0
  244. package/dist/utils.d.ts +22 -0
  245. package/dist/utils.js +57 -0
  246. package/dist/utils.test.d.ts +1 -0
  247. package/dist/utils.test.js +50 -0
  248. package/dist/wallet-providers/cdpWalletProvider.d.ts +246 -0
  249. package/dist/wallet-providers/cdpWalletProvider.js +421 -0
  250. package/dist/wallet-providers/cdpWalletProvider.test.d.ts +1 -0
  251. package/dist/wallet-providers/cdpWalletProvider.test.js +701 -0
  252. package/dist/wallet-providers/evmWalletProvider.d.ts +51 -0
  253. package/dist/wallet-providers/evmWalletProvider.js +14 -0
  254. package/dist/wallet-providers/evmWalletProvider.test.d.ts +1 -0
  255. package/dist/wallet-providers/evmWalletProvider.test.js +56 -0
  256. package/dist/wallet-providers/index.d.ts +10 -0
  257. package/dist/wallet-providers/index.js +26 -0
  258. package/dist/wallet-providers/privyEvmWalletProvider.d.ts +55 -0
  259. package/dist/wallet-providers/privyEvmWalletProvider.js +140 -0
  260. package/dist/wallet-providers/privyEvmWalletProvider.test.d.ts +1 -0
  261. package/dist/wallet-providers/privyEvmWalletProvider.test.js +331 -0
  262. package/dist/wallet-providers/privyShared.d.ts +40 -0
  263. package/dist/wallet-providers/privyShared.js +49 -0
  264. package/dist/wallet-providers/privySvmWalletProvider.d.ts +128 -0
  265. package/dist/wallet-providers/privySvmWalletProvider.js +212 -0
  266. package/dist/wallet-providers/privySvmWalletProvider.test.d.ts +1 -0
  267. package/dist/wallet-providers/privySvmWalletProvider.test.js +310 -0
  268. package/dist/wallet-providers/privyWalletProvider.d.ts +35 -0
  269. package/dist/wallet-providers/privyWalletProvider.js +39 -0
  270. package/dist/wallet-providers/privyWalletProvider.test.d.ts +1 -0
  271. package/dist/wallet-providers/privyWalletProvider.test.js +124 -0
  272. package/dist/wallet-providers/smartWalletProvider.d.ts +177 -0
  273. package/dist/wallet-providers/smartWalletProvider.js +303 -0
  274. package/dist/wallet-providers/smartWalletProvider.test.d.ts +1 -0
  275. package/dist/wallet-providers/smartWalletProvider.test.js +388 -0
  276. package/dist/wallet-providers/solanaKeypairWalletProvider.d.ts +143 -0
  277. package/dist/wallet-providers/solanaKeypairWalletProvider.js +280 -0
  278. package/dist/wallet-providers/solanaKeypairWalletProvider.test.d.ts +1 -0
  279. package/dist/wallet-providers/solanaKeypairWalletProvider.test.js +218 -0
  280. package/dist/wallet-providers/svmWalletProvider.d.ts +56 -0
  281. package/dist/wallet-providers/svmWalletProvider.js +13 -0
  282. package/dist/wallet-providers/svmWalletProvider.test.d.ts +1 -0
  283. package/dist/wallet-providers/svmWalletProvider.test.js +55 -0
  284. package/dist/wallet-providers/viemWalletProvider.d.ts +103 -0
  285. package/dist/wallet-providers/viemWalletProvider.js +206 -0
  286. package/dist/wallet-providers/viemWalletProvider.test.d.ts +1 -0
  287. package/dist/wallet-providers/viemWalletProvider.test.js +338 -0
  288. package/dist/wallet-providers/walletProvider.d.ts +48 -0
  289. package/dist/wallet-providers/walletProvider.js +41 -0
  290. package/dist/wallet-providers/walletProvider.test.d.ts +1 -0
  291. package/dist/wallet-providers/walletProvider.test.js +103 -0
  292. package/package.json +83 -0
@@ -0,0 +1,91 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Input schema for address reputation check.
4
+ */
5
+ export declare const AddressReputationSchema: z.ZodObject<{
6
+ address: z.ZodString;
7
+ network: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ address: string;
10
+ network: string;
11
+ }, {
12
+ address: string;
13
+ network: string;
14
+ }>;
15
+ /**
16
+ * Input schema for deploy contract action.
17
+ */
18
+ export declare const DeployContractSchema: z.ZodObject<{
19
+ solidityVersion: z.ZodEnum<[string, ...string[]]>;
20
+ solidityInputJson: z.ZodString;
21
+ contractName: z.ZodString;
22
+ constructorArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ solidityVersion: string;
25
+ solidityInputJson: string;
26
+ contractName: string;
27
+ constructorArgs?: Record<string, any> | undefined;
28
+ }, {
29
+ solidityVersion: string;
30
+ solidityInputJson: string;
31
+ contractName: string;
32
+ constructorArgs?: Record<string, any> | undefined;
33
+ }>;
34
+ /**
35
+ * Input schema for deploy NFT action
36
+ */
37
+ export declare const DeployNftSchema: z.ZodObject<{
38
+ name: z.ZodString;
39
+ symbol: z.ZodString;
40
+ baseURI: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ symbol: string;
43
+ name: string;
44
+ baseURI: string;
45
+ }, {
46
+ symbol: string;
47
+ name: string;
48
+ baseURI: string;
49
+ }>;
50
+ /**
51
+ * Input schema for deploy token action.
52
+ */
53
+ export declare const DeployTokenSchema: z.ZodObject<{
54
+ name: z.ZodString;
55
+ symbol: z.ZodString;
56
+ totalSupply: z.ZodType<bigint, z.ZodTypeDef, bigint>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ symbol: string;
59
+ name: string;
60
+ totalSupply: bigint;
61
+ }, {
62
+ symbol: string;
63
+ name: string;
64
+ totalSupply: bigint;
65
+ }>;
66
+ /**
67
+ * Input schema for request faucet funds action.
68
+ */
69
+ export declare const RequestFaucetFundsSchema: z.ZodObject<{
70
+ assetId: z.ZodOptional<z.ZodString>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ assetId?: string | undefined;
73
+ }, {
74
+ assetId?: string | undefined;
75
+ }>;
76
+ /**
77
+ * Input schema for trade action.
78
+ */
79
+ export declare const TradeSchema: z.ZodObject<{
80
+ amount: z.ZodType<bigint, z.ZodTypeDef, bigint>;
81
+ fromAssetId: z.ZodString;
82
+ toAssetId: z.ZodString;
83
+ }, "strip", z.ZodTypeAny, {
84
+ amount: bigint;
85
+ fromAssetId: string;
86
+ toAssetId: string;
87
+ }, {
88
+ amount: bigint;
89
+ fromAssetId: string;
90
+ toAssetId: string;
91
+ }>;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TradeSchema = exports.RequestFaucetFundsSchema = exports.DeployTokenSchema = exports.DeployNftSchema = exports.DeployContractSchema = exports.AddressReputationSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("./constants");
6
+ /**
7
+ * Input schema for address reputation check.
8
+ */
9
+ exports.AddressReputationSchema = zod_1.z
10
+ .object({
11
+ address: zod_1.z
12
+ .string()
13
+ .regex(/^0x[a-fA-F0-9]{40}$/, "Invalid Ethereum address format")
14
+ .describe("The Ethereum address to check"),
15
+ network: zod_1.z.string().describe("The network to check the address on"),
16
+ })
17
+ .strip()
18
+ .describe("Input schema for address reputation check");
19
+ /**
20
+ * Input schema for deploy contract action.
21
+ */
22
+ exports.DeployContractSchema = zod_1.z
23
+ .object({
24
+ solidityVersion: zod_1.z
25
+ .enum(Object.keys(constants_1.SolidityVersions))
26
+ .describe("The solidity compiler version"),
27
+ solidityInputJson: zod_1.z.string().describe("The input json for the solidity compiler"),
28
+ contractName: zod_1.z.string().describe("The name of the contract class to be deployed"),
29
+ constructorArgs: zod_1.z
30
+ .record(zod_1.z.string(), zod_1.z.any())
31
+ .describe("The constructor arguments for the contract")
32
+ .optional(),
33
+ })
34
+ .strip()
35
+ .describe("Instructions for deploying an arbitrary contract");
36
+ /**
37
+ * Input schema for deploy NFT action
38
+ */
39
+ exports.DeployNftSchema = zod_1.z
40
+ .object({
41
+ name: zod_1.z.string().describe("The name of the NFT collection"),
42
+ symbol: zod_1.z.string().describe("The symbol of the NFT collection"),
43
+ baseURI: zod_1.z.string().describe("The base URI for the token metadata"),
44
+ })
45
+ .strip()
46
+ .describe("Instructions for deploying an NFT collection");
47
+ /**
48
+ * Input schema for deploy token action.
49
+ */
50
+ exports.DeployTokenSchema = zod_1.z
51
+ .object({
52
+ name: zod_1.z.string().describe("The name of the token"),
53
+ symbol: zod_1.z.string().describe("The token symbol"),
54
+ totalSupply: zod_1.z.custom().describe("The total supply of tokens to mint"),
55
+ })
56
+ .strip()
57
+ .describe("Instructions for deploying a token");
58
+ /**
59
+ * Input schema for request faucet funds action.
60
+ */
61
+ exports.RequestFaucetFundsSchema = zod_1.z
62
+ .object({
63
+ assetId: zod_1.z.string().optional().describe("The optional asset ID to request from faucet"),
64
+ })
65
+ .strip()
66
+ .describe("Instructions for requesting faucet funds");
67
+ /**
68
+ * Input schema for trade action.
69
+ */
70
+ exports.TradeSchema = zod_1.z
71
+ .object({
72
+ amount: zod_1.z.custom().describe("The amount of the from asset to trade"),
73
+ fromAssetId: zod_1.z.string().describe("The from asset ID to trade"),
74
+ toAssetId: zod_1.z.string().describe("The to asset ID to receive from the trade"),
75
+ })
76
+ .strip()
77
+ .describe("Instructions for trading assets");
@@ -0,0 +1,67 @@
1
+ import { z } from "zod";
2
+ import { ActionProvider } from "../actionProvider";
3
+ import { EvmWalletProvider } from "../../wallet-providers";
4
+ import { Network } from "../../network";
5
+ import { CompoundSupplySchema, CompoundWithdrawSchema, CompoundBorrowSchema, CompoundRepaySchema, CompoundPortfolioSchema } from "./schemas";
6
+ /**
7
+ * CompoundActionProvider is an action provider for Compound protocol interactions.
8
+ */
9
+ export declare class CompoundActionProvider extends ActionProvider<EvmWalletProvider> {
10
+ /**
11
+ * Constructs a new CompoundActionProvider instance.
12
+ */
13
+ constructor();
14
+ /**
15
+ * Supplies collateral assets to Compound.
16
+ *
17
+ * @param wallet - The wallet instance to perform the transaction.
18
+ * @param args - The input arguments including assetId and amount.
19
+ * @returns A message indicating success or an error message.
20
+ */
21
+ supply(wallet: EvmWalletProvider, args: z.infer<typeof CompoundSupplySchema>): Promise<string>;
22
+ /**
23
+ * Withdraws collateral assets from Compound.
24
+ *
25
+ * @param wallet - The wallet instance to perform the transaction.
26
+ * @param args - The input arguments including assetId and amount.
27
+ * @returns A message indicating success or an error message.
28
+ */
29
+ withdraw(wallet: EvmWalletProvider, args: z.infer<typeof CompoundWithdrawSchema>): Promise<string>;
30
+ /**
31
+ * Borrows base assets from Compound.
32
+ *
33
+ * @param wallet - The wallet instance to perform the transaction.
34
+ * @param args - The input arguments including assetId and amount.
35
+ * @returns A message indicating success or an error message.
36
+ */
37
+ borrow(wallet: EvmWalletProvider, args: z.infer<typeof CompoundBorrowSchema>): Promise<string>;
38
+ /**
39
+ * Repays borrowed assets to Compound.
40
+ *
41
+ * @param wallet - The wallet instance to perform the transaction.
42
+ * @param args - The input arguments including assetId and amount.
43
+ * @returns A message indicating success or an error message.
44
+ */
45
+ repay(wallet: EvmWalletProvider, args: z.infer<typeof CompoundRepaySchema>): Promise<string>;
46
+ /**
47
+ * Retrieves portfolio details from Compound.
48
+ *
49
+ * @param wallet - The wallet instance to fetch portfolio details.
50
+ * @param _ - No input is required for this action.
51
+ * @returns A Markdown formatted string with portfolio details or an error message.
52
+ */
53
+ getPortfolio(wallet: EvmWalletProvider, _: z.infer<typeof CompoundPortfolioSchema>): Promise<string>;
54
+ /**
55
+ * Checks if the Compound action provider supports the given network.
56
+ *
57
+ * @param network - The network to check.
58
+ * @returns True if the network is supported, false otherwise.
59
+ */
60
+ supportsNetwork: (network: Network) => boolean;
61
+ }
62
+ /**
63
+ * Factory function to create a new instance of CompoundActionProvider.
64
+ *
65
+ * @returns A new CompoundActionProvider instance.
66
+ */
67
+ export declare const compoundActionProvider: () => CompoundActionProvider;
@@ -0,0 +1,365 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.compoundActionProvider = exports.CompoundActionProvider = void 0;
13
+ const zod_1 = require("zod");
14
+ const viem_1 = require("viem");
15
+ const actionProvider_1 = require("../actionProvider");
16
+ const wallet_providers_1 = require("../../wallet-providers");
17
+ const actionDecorator_1 = require("../actionDecorator");
18
+ const utils_1 = require("../../utils");
19
+ const constants_1 = require("./constants");
20
+ const schemas_1 = require("./schemas");
21
+ const utils_2 = require("./utils");
22
+ /**
23
+ * CompoundActionProvider is an action provider for Compound protocol interactions.
24
+ */
25
+ class CompoundActionProvider extends actionProvider_1.ActionProvider {
26
+ /**
27
+ * Constructs a new CompoundActionProvider instance.
28
+ */
29
+ constructor() {
30
+ super("compound", []);
31
+ /**
32
+ * Checks if the Compound action provider supports the given network.
33
+ *
34
+ * @param network - The network to check.
35
+ * @returns True if the network is supported, false otherwise.
36
+ */
37
+ this.supportsNetwork = (network) => network.protocolFamily === "evm" &&
38
+ (network.networkId === "base-mainnet" || network.networkId === "base-sepolia");
39
+ }
40
+ /**
41
+ * Supplies collateral assets to Compound.
42
+ *
43
+ * @param wallet - The wallet instance to perform the transaction.
44
+ * @param args - The input arguments including assetId and amount.
45
+ * @returns A message indicating success or an error message.
46
+ */
47
+ async supply(wallet, args) {
48
+ try {
49
+ const network = wallet.getNetwork();
50
+ const cometAddress = (0, utils_2.getCometAddress)(network);
51
+ const tokenAddress = (0, utils_2.getAssetAddress)(network, args.assetId);
52
+ if (!tokenAddress) {
53
+ throw new Error(`Token address undefined for assetId ${args.assetId}`);
54
+ }
55
+ const decimals = await (0, utils_2.getTokenDecimals)(wallet, tokenAddress);
56
+ const amountAtomic = (0, viem_1.parseUnits)(args.amount, decimals);
57
+ // Check wallet balance before proceeding
58
+ const walletBalance = await (0, utils_2.getTokenBalance)(wallet, tokenAddress);
59
+ if (walletBalance < amountAtomic) {
60
+ const humanBalance = (0, viem_1.formatUnits)(walletBalance, decimals);
61
+ return `Error: Insufficient balance. You have ${humanBalance}, but trying to supply ${args.amount}`;
62
+ }
63
+ // Get current health ratio for reference
64
+ const currentHealth = await (0, utils_2.getHealthRatio)(wallet, cometAddress);
65
+ // Approve Compound to spend tokens
66
+ const approvalResult = await (0, utils_1.approve)(wallet, tokenAddress, cometAddress, amountAtomic);
67
+ if (approvalResult.startsWith("Error")) {
68
+ return `Error approving token: ${approvalResult}`;
69
+ }
70
+ // Supply tokens to Compound
71
+ const data = (0, viem_1.encodeFunctionData)({
72
+ abi: constants_1.COMET_ABI,
73
+ functionName: "supply",
74
+ args: [tokenAddress, amountAtomic],
75
+ });
76
+ const txHash = await wallet.sendTransaction({
77
+ to: cometAddress,
78
+ data,
79
+ });
80
+ await wallet.waitForTransactionReceipt(txHash);
81
+ // Get new health ratio and token symbol
82
+ const newHealth = await (0, utils_2.getHealthRatio)(wallet, cometAddress);
83
+ const tokenSymbol = await (0, utils_2.getTokenSymbol)(wallet, tokenAddress);
84
+ // Only add the health ratio message if at least one of the values is not Infinity
85
+ const healthMessage = currentHealth.eq(Infinity) && newHealth.eq(Infinity)
86
+ ? ""
87
+ : `\nHealth ratio changed from ${currentHealth.toFixed(2)} to ${newHealth.toFixed(2)}`;
88
+ return `Supplied ${args.amount} ${tokenSymbol} to Compound.\nTransaction hash: ${txHash}${healthMessage}`;
89
+ }
90
+ catch (error) {
91
+ return `Error supplying to Compound: ${error instanceof Error
92
+ ? error.message
93
+ : error && typeof error === "object" && "message" in error
94
+ ? `Error: ${error.message}`
95
+ : error}`;
96
+ }
97
+ }
98
+ /**
99
+ * Withdraws collateral assets from Compound.
100
+ *
101
+ * @param wallet - The wallet instance to perform the transaction.
102
+ * @param args - The input arguments including assetId and amount.
103
+ * @returns A message indicating success or an error message.
104
+ */
105
+ async withdraw(wallet, args) {
106
+ try {
107
+ const cometAddress = (0, utils_2.getCometAddress)(wallet.getNetwork());
108
+ const tokenAddress = (0, utils_2.getAssetAddress)(wallet.getNetwork(), args.assetId);
109
+ const decimals = await (0, utils_2.getTokenDecimals)(wallet, tokenAddress);
110
+ const amountAtomic = (0, viem_1.parseUnits)(args.amount, decimals);
111
+ // Check that there is enough collateral supplied to withdraw
112
+ const collateralBalance = await (0, utils_2.getCollateralBalance)(wallet, cometAddress, tokenAddress);
113
+ if (amountAtomic > collateralBalance) {
114
+ const humanBalance = (0, viem_1.formatUnits)(collateralBalance, decimals);
115
+ return `Error: Insufficient balance. Trying to withdraw ${args.amount}, but only have ${humanBalance} supplied`;
116
+ }
117
+ // Check if position would be healthy after withdrawal
118
+ const projectedHealthRatio = await (0, utils_2.getHealthRatioAfterWithdraw)(wallet, cometAddress, tokenAddress, amountAtomic);
119
+ if (projectedHealthRatio.lessThan(1)) {
120
+ return `Error: Withdrawing ${args.amount} would result in an unhealthy position. Health ratio would be ${projectedHealthRatio.toFixed(2)}`;
121
+ }
122
+ // Withdraw from Compound
123
+ const data = (0, viem_1.encodeFunctionData)({
124
+ abi: constants_1.COMET_ABI,
125
+ functionName: "withdraw",
126
+ args: [tokenAddress, amountAtomic],
127
+ });
128
+ const txHash = await wallet.sendTransaction({
129
+ to: cometAddress,
130
+ data,
131
+ });
132
+ await wallet.waitForTransactionReceipt(txHash);
133
+ // Get current and new health ratios and token symbol
134
+ const currentHealth = await (0, utils_2.getHealthRatio)(wallet, cometAddress);
135
+ const newHealth = await (0, utils_2.getHealthRatio)(wallet, cometAddress);
136
+ const tokenSymbol = await (0, utils_2.getTokenSymbol)(wallet, tokenAddress);
137
+ return (`Withdrawn ${args.amount} ${tokenSymbol} from Compound.\n` +
138
+ `Transaction hash: ${txHash}\n` +
139
+ `Health ratio changed from ${currentHealth.toFixed(2)} to ${newHealth.toFixed(2)}`);
140
+ }
141
+ catch (error) {
142
+ return `Error withdrawing from Compound: ${error instanceof Error ? error : error && typeof error === "object" && "message" in error ? `Error: ${error.message}` : error}`;
143
+ }
144
+ }
145
+ /**
146
+ * Borrows base assets from Compound.
147
+ *
148
+ * @param wallet - The wallet instance to perform the transaction.
149
+ * @param args - The input arguments including assetId and amount.
150
+ * @returns A message indicating success or an error message.
151
+ */
152
+ async borrow(wallet, args) {
153
+ try {
154
+ const cometAddress = (0, utils_2.getCometAddress)(wallet.getNetwork());
155
+ const baseTokenAddress = await (0, utils_2.getBaseTokenAddress)(wallet, cometAddress);
156
+ const decimals = await (0, utils_2.getTokenDecimals)(wallet, baseTokenAddress);
157
+ // Convert human-readable amount to atomic units
158
+ const amountAtomic = (0, viem_1.parseUnits)(args.amount, decimals);
159
+ // Get current health ratio for reference
160
+ const currentHealth = await (0, utils_2.getHealthRatio)(wallet, cometAddress);
161
+ const currentHealthStr = currentHealth.eq(Infinity) ? "Inf.%" : currentHealth.toFixed(2);
162
+ // Check if position would be healthy after borrow
163
+ const projectedHealthRatio = await (0, utils_2.getHealthRatioAfterBorrow)(wallet, cometAddress, amountAtomic);
164
+ if (projectedHealthRatio.lessThan(1)) {
165
+ return `Error: Borrowing ${args.amount} USDC would result in an unhealthy position. Health ratio would be ${projectedHealthRatio.toFixed(2)}`;
166
+ }
167
+ // Use the withdraw method to borrow from Compound
168
+ const data = (0, viem_1.encodeFunctionData)({
169
+ abi: constants_1.COMET_ABI,
170
+ functionName: "withdraw",
171
+ args: [baseTokenAddress, amountAtomic],
172
+ });
173
+ const txHash = await wallet.sendTransaction({
174
+ to: cometAddress,
175
+ data,
176
+ });
177
+ await wallet.waitForTransactionReceipt(txHash);
178
+ // Get new health ratio
179
+ const newHealth = await (0, utils_2.getHealthRatio)(wallet, cometAddress);
180
+ const newHealthStr = newHealth.eq(Infinity) ? "Inf.%" : newHealth.toFixed(2);
181
+ return (`Borrowed ${args.amount} USDC from Compound.\n` +
182
+ `Transaction hash: ${txHash}\n` +
183
+ `Health ratio changed from ${currentHealthStr} to ${newHealthStr}`);
184
+ }
185
+ catch (error) {
186
+ return `Error borrowing from Compound: ${error instanceof Error ? error : error && typeof error === "object" && "message" in error ? `Error: ${error.message}` : error}`;
187
+ }
188
+ }
189
+ /**
190
+ * Repays borrowed assets to Compound.
191
+ *
192
+ * @param wallet - The wallet instance to perform the transaction.
193
+ * @param args - The input arguments including assetId and amount.
194
+ * @returns A message indicating success or an error message.
195
+ */
196
+ async repay(wallet, args) {
197
+ try {
198
+ const cometAddress = (0, utils_2.getCometAddress)(wallet.getNetwork());
199
+ const tokenAddress = (0, utils_2.getAssetAddress)(wallet.getNetwork(), args.assetId);
200
+ const tokenDecimals = await (0, utils_2.getTokenDecimals)(wallet, tokenAddress);
201
+ const amountAtomic = (0, viem_1.parseUnits)(args.amount, tokenDecimals);
202
+ const tokenBalance = await (0, utils_2.getTokenBalance)(wallet, tokenAddress);
203
+ if (tokenBalance < amountAtomic) {
204
+ const humanBalance = (0, viem_1.formatUnits)(tokenBalance, tokenDecimals);
205
+ return `Error: Insufficient balance. You have ${humanBalance}, but trying to repay ${args.amount}`;
206
+ }
207
+ // Get current health ratio for reference
208
+ const currentHealth = await (0, utils_2.getHealthRatio)(wallet, cometAddress);
209
+ // Approve Compound to spend tokens
210
+ const approvalResult = await (0, utils_1.approve)(wallet, tokenAddress, cometAddress, amountAtomic);
211
+ if (approvalResult.startsWith("Error")) {
212
+ return `Error approving token: ${approvalResult}`;
213
+ }
214
+ // Repay debt by supplying tokens to Compound
215
+ const data = (0, viem_1.encodeFunctionData)({
216
+ abi: constants_1.COMET_ABI,
217
+ functionName: "supply",
218
+ args: [tokenAddress, amountAtomic],
219
+ });
220
+ const txHash = await wallet.sendTransaction({
221
+ to: cometAddress,
222
+ data,
223
+ });
224
+ await wallet.waitForTransactionReceipt(txHash);
225
+ // Get new health ratio and token symbol
226
+ const newHealth = await (0, utils_2.getHealthRatio)(wallet, cometAddress);
227
+ const tokenSymbol = await (0, utils_2.getTokenSymbol)(wallet, tokenAddress);
228
+ return (`Repaid ${args.amount} ${tokenSymbol} to Compound.\n` +
229
+ `Transaction hash: ${txHash}\n` +
230
+ `Health ratio improved from ${currentHealth.toFixed(2)} to ${newHealth.toFixed(2)}`);
231
+ }
232
+ catch (error) {
233
+ return `Error repaying to Compound: ${error instanceof Error ? error : error && typeof error === "object" && "message" in error ? `Error: ${error.message}` : error}`;
234
+ }
235
+ }
236
+ /**
237
+ * Retrieves portfolio details from Compound.
238
+ *
239
+ * @param wallet - The wallet instance to fetch portfolio details.
240
+ * @param _ - No input is required for this action.
241
+ * @returns A Markdown formatted string with portfolio details or an error message.
242
+ */
243
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
244
+ async getPortfolio(wallet, _) {
245
+ try {
246
+ const cometAddress = (0, utils_2.getCometAddress)(wallet.getNetwork());
247
+ return await (0, utils_2.getPortfolioDetailsMarkdown)(wallet, cometAddress);
248
+ }
249
+ catch (error) {
250
+ return `Error getting portfolio details: ${error && typeof error === "object" && "message" in error ? error.message : error}`;
251
+ }
252
+ }
253
+ }
254
+ exports.CompoundActionProvider = CompoundActionProvider;
255
+ __decorate([
256
+ (0, actionDecorator_1.CreateAction)({
257
+ name: "supply",
258
+ description: `
259
+ This tool allows supplying collateral assets to Compound.
260
+ It takes:
261
+ - assetId: The asset to supply, one of 'weth', 'cbeth', 'cbbtc', 'wsteth', or 'usdc'
262
+ - amount: The amount of tokens to supply in human-readable format
263
+ Examples:
264
+ - 1 WETH
265
+ - 0.1 WETH
266
+ - 0.01 WETH
267
+ Important notes:
268
+ - Use the exact amount provided
269
+ - The token must be an approved collateral asset for the Compound market
270
+ `,
271
+ schema: schemas_1.CompoundSupplySchema,
272
+ }),
273
+ __metadata("design:type", Function),
274
+ __metadata("design:paramtypes", [wallet_providers_1.EvmWalletProvider, void 0]),
275
+ __metadata("design:returntype", Promise)
276
+ ], CompoundActionProvider.prototype, "supply", null);
277
+ __decorate([
278
+ (0, actionDecorator_1.CreateAction)({
279
+ name: "withdraw",
280
+ description: `
281
+ This tool allows withdrawing collateral assets from Compound.
282
+ It takes:
283
+ - assetId: The asset to withdraw, one of 'weth', 'cbeth', 'cbbtc', 'wsteth', or 'usdc'
284
+ - amount: The amount of tokens to withdraw in human-readable format
285
+ Examples:
286
+ - 1 WETH
287
+ - 0.1 WETH
288
+ - 0.01 WETH
289
+ Important notes:
290
+ - Use the exact amount provided
291
+ - The token must be a collateral asset you have supplied to the Compound market
292
+ `,
293
+ schema: schemas_1.CompoundWithdrawSchema,
294
+ }),
295
+ __metadata("design:type", Function),
296
+ __metadata("design:paramtypes", [wallet_providers_1.EvmWalletProvider, void 0]),
297
+ __metadata("design:returntype", Promise)
298
+ ], CompoundActionProvider.prototype, "withdraw", null);
299
+ __decorate([
300
+ (0, actionDecorator_1.CreateAction)({
301
+ name: "borrow",
302
+ description: `
303
+ This tool allows borrowing base assets from Compound.
304
+ It takes:
305
+ - assetId: The asset to borrow, either 'weth' or 'usdc'
306
+ - amount: The amount of base tokens to borrow in human-readable format
307
+ Examples:
308
+ - 1000 USDC
309
+ - 0.5 WETH
310
+ Important notes:
311
+ - Use the exact amount provided
312
+ - Ensure you have sufficient collateral to borrow
313
+ `,
314
+ schema: schemas_1.CompoundBorrowSchema,
315
+ }),
316
+ __metadata("design:type", Function),
317
+ __metadata("design:paramtypes", [wallet_providers_1.EvmWalletProvider, void 0]),
318
+ __metadata("design:returntype", Promise)
319
+ ], CompoundActionProvider.prototype, "borrow", null);
320
+ __decorate([
321
+ (0, actionDecorator_1.CreateAction)({
322
+ name: "repay",
323
+ description: `
324
+ This tool allows repaying borrowed assets to Compound.
325
+ It takes:
326
+ - assetId: The asset to repay, either 'weth' or 'usdc'
327
+ - amount: The amount of tokens to repay in human-readable format
328
+ Examples:
329
+ - 1000 USDC
330
+ - 0.5 WETH
331
+ Important notes:
332
+ - Use the exact amount provided
333
+ - Ensure you have sufficient balance of the asset to repay
334
+ `,
335
+ schema: schemas_1.CompoundRepaySchema,
336
+ }),
337
+ __metadata("design:type", Function),
338
+ __metadata("design:paramtypes", [wallet_providers_1.EvmWalletProvider, void 0]),
339
+ __metadata("design:returntype", Promise)
340
+ ], CompoundActionProvider.prototype, "repay", null);
341
+ __decorate([
342
+ (0, actionDecorator_1.CreateAction)({
343
+ name: "get_portfolio",
344
+ description: `
345
+ This tool allows getting portfolio details from Compound.
346
+ Returns portfolio details including:
347
+ - Collateral balances and USD values
348
+ - Borrowed amounts and USD values
349
+ Formatted in Markdown for readability.
350
+ `,
351
+ schema: schemas_1.CompoundPortfolioSchema,
352
+ })
353
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
354
+ ,
355
+ __metadata("design:type", Function),
356
+ __metadata("design:paramtypes", [wallet_providers_1.EvmWalletProvider, void 0]),
357
+ __metadata("design:returntype", Promise)
358
+ ], CompoundActionProvider.prototype, "getPortfolio", null);
359
+ /**
360
+ * Factory function to create a new instance of CompoundActionProvider.
361
+ *
362
+ * @returns A new CompoundActionProvider instance.
363
+ */
364
+ const compoundActionProvider = () => new CompoundActionProvider();
365
+ exports.compoundActionProvider = compoundActionProvider;