keyring-agent-core 0.2.1 → 0.2.3

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 (417) hide show
  1. package/dist/index.d.ts +6692 -27
  2. package/dist/index.js +877 -70
  3. package/package.json +6 -4
  4. package/dist/agent/AgentCore.d.ts +0 -256
  5. package/dist/agent/AgentCore.d.ts.map +0 -1
  6. package/dist/agent/AgentCore.js +0 -1093
  7. package/dist/agent/AgentCore.js.map +0 -1
  8. package/dist/agent/QueryRewriter.d.ts +0 -84
  9. package/dist/agent/QueryRewriter.d.ts.map +0 -1
  10. package/dist/agent/QueryRewriter.js +0 -306
  11. package/dist/agent/QueryRewriter.js.map +0 -1
  12. package/dist/agent/Router.d.ts +0 -33
  13. package/dist/agent/Router.d.ts.map +0 -1
  14. package/dist/agent/Router.js +0 -229
  15. package/dist/agent/Router.js.map +0 -1
  16. package/dist/agent/Subagent.d.ts +0 -80
  17. package/dist/agent/Subagent.d.ts.map +0 -1
  18. package/dist/agent/Subagent.js +0 -272
  19. package/dist/agent/Subagent.js.map +0 -1
  20. package/dist/agent/Synthesizer.d.ts +0 -11
  21. package/dist/agent/Synthesizer.d.ts.map +0 -1
  22. package/dist/agent/Synthesizer.js +0 -86
  23. package/dist/agent/Synthesizer.js.map +0 -1
  24. package/dist/agent/chatGraph.d.ts +0 -364
  25. package/dist/agent/chatGraph.d.ts.map +0 -1
  26. package/dist/agent/chatGraph.js +0 -184
  27. package/dist/agent/chatGraph.js.map +0 -1
  28. package/dist/agent/index.d.ts +0 -10
  29. package/dist/agent/index.d.ts.map +0 -1
  30. package/dist/agent/index.js +0 -24
  31. package/dist/agent/index.js.map +0 -1
  32. package/dist/agent/subagents/AiAgent.d.ts +0 -6
  33. package/dist/agent/subagents/AiAgent.d.ts.map +0 -1
  34. package/dist/agent/subagents/AiAgent.js +0 -52
  35. package/dist/agent/subagents/AiAgent.js.map +0 -1
  36. package/dist/agent/subagents/NftAgent.d.ts +0 -6
  37. package/dist/agent/subagents/NftAgent.d.ts.map +0 -1
  38. package/dist/agent/subagents/NftAgent.js +0 -79
  39. package/dist/agent/subagents/NftAgent.js.map +0 -1
  40. package/dist/agent/subagents/PoolAgent.d.ts +0 -6
  41. package/dist/agent/subagents/PoolAgent.d.ts.map +0 -1
  42. package/dist/agent/subagents/PoolAgent.js +0 -184
  43. package/dist/agent/subagents/PoolAgent.js.map +0 -1
  44. package/dist/agent/subagents/PoolSubgraphAgent.d.ts +0 -6
  45. package/dist/agent/subagents/PoolSubgraphAgent.d.ts.map +0 -1
  46. package/dist/agent/subagents/PoolSubgraphAgent.js +0 -117
  47. package/dist/agent/subagents/PoolSubgraphAgent.js.map +0 -1
  48. package/dist/agent/subagents/TokenAgent.d.ts +0 -6
  49. package/dist/agent/subagents/TokenAgent.d.ts.map +0 -1
  50. package/dist/agent/subagents/TokenAgent.js +0 -76
  51. package/dist/agent/subagents/TokenAgent.js.map +0 -1
  52. package/dist/agent/subagents/WalletActionAgent.d.ts +0 -6
  53. package/dist/agent/subagents/WalletActionAgent.d.ts.map +0 -1
  54. package/dist/agent/subagents/WalletActionAgent.js +0 -55
  55. package/dist/agent/subagents/WalletActionAgent.js.map +0 -1
  56. package/dist/agent/subagents/WalletAgent.d.ts +0 -6
  57. package/dist/agent/subagents/WalletAgent.d.ts.map +0 -1
  58. package/dist/agent/subagents/WalletAgent.js +0 -93
  59. package/dist/agent/subagents/WalletAgent.js.map +0 -1
  60. package/dist/agent/subagents/index.d.ts +0 -34
  61. package/dist/agent/subagents/index.d.ts.map +0 -1
  62. package/dist/agent/subagents/index.js +0 -69
  63. package/dist/agent/subagents/index.js.map +0 -1
  64. package/dist/constants/abi.d.ts +0 -551
  65. package/dist/constants/abi.d.ts.map +0 -1
  66. package/dist/constants/abi.js +0 -690
  67. package/dist/constants/abi.js.map +0 -1
  68. package/dist/functions/pool.d.ts +0 -25
  69. package/dist/functions/pool.d.ts.map +0 -1
  70. package/dist/functions/pool.js +0 -151
  71. package/dist/functions/pool.js.map +0 -1
  72. package/dist/functions/web3.d.ts +0 -31
  73. package/dist/functions/web3.d.ts.map +0 -1
  74. package/dist/functions/web3.js +0 -232
  75. package/dist/functions/web3.js.map +0 -1
  76. package/dist/index.d.ts.map +0 -1
  77. package/dist/index.js.map +0 -1
  78. package/dist/llm/GeminiProvider.d.ts +0 -16
  79. package/dist/llm/GeminiProvider.d.ts.map +0 -1
  80. package/dist/llm/GeminiProvider.js +0 -329
  81. package/dist/llm/GeminiProvider.js.map +0 -1
  82. package/dist/llm/index.d.ts +0 -2
  83. package/dist/llm/index.d.ts.map +0 -1
  84. package/dist/llm/index.js +0 -6
  85. package/dist/llm/index.js.map +0 -1
  86. package/dist/memory/ChatHistory.d.ts +0 -83
  87. package/dist/memory/ChatHistory.d.ts.map +0 -1
  88. package/dist/memory/ChatHistory.js +0 -143
  89. package/dist/memory/ChatHistory.js.map +0 -1
  90. package/dist/memory/KnowledgeBase.d.ts +0 -38
  91. package/dist/memory/KnowledgeBase.d.ts.map +0 -1
  92. package/dist/memory/KnowledgeBase.js +0 -139
  93. package/dist/memory/KnowledgeBase.js.map +0 -1
  94. package/dist/memory/Summarizer.d.ts +0 -12
  95. package/dist/memory/Summarizer.d.ts.map +0 -1
  96. package/dist/memory/Summarizer.js +0 -39
  97. package/dist/memory/Summarizer.js.map +0 -1
  98. package/dist/memory/UpstashKnowledgeBase.d.ts +0 -124
  99. package/dist/memory/UpstashKnowledgeBase.d.ts.map +0 -1
  100. package/dist/memory/UpstashKnowledgeBase.js +0 -152
  101. package/dist/memory/UpstashKnowledgeBase.js.map +0 -1
  102. package/dist/memory/historyUtils.d.ts +0 -58
  103. package/dist/memory/historyUtils.d.ts.map +0 -1
  104. package/dist/memory/historyUtils.js +0 -190
  105. package/dist/memory/historyUtils.js.map +0 -1
  106. package/dist/memory/index.d.ts +0 -7
  107. package/dist/memory/index.d.ts.map +0 -1
  108. package/dist/memory/index.js +0 -12
  109. package/dist/memory/index.js.map +0 -1
  110. package/dist/memory/ingestKnowledgeBase.d.ts +0 -17
  111. package/dist/memory/ingestKnowledgeBase.d.ts.map +0 -1
  112. package/dist/memory/ingestKnowledgeBase.js +0 -35
  113. package/dist/memory/ingestKnowledgeBase.js.map +0 -1
  114. package/dist/services/MoralisService.d.ts +0 -1328
  115. package/dist/services/MoralisService.d.ts.map +0 -1
  116. package/dist/services/MoralisService.js +0 -1239
  117. package/dist/services/MoralisService.js.map +0 -1
  118. package/dist/services/PantographService.d.ts +0 -98
  119. package/dist/services/PantographService.d.ts.map +0 -1
  120. package/dist/services/PantographService.js +0 -451
  121. package/dist/services/PantographService.js.map +0 -1
  122. package/dist/services/PoolService.d.ts +0 -238
  123. package/dist/services/PoolService.d.ts.map +0 -1
  124. package/dist/services/PoolService.js +0 -485
  125. package/dist/services/PoolService.js.map +0 -1
  126. package/dist/services/UniswapService.d.ts +0 -289
  127. package/dist/services/UniswapService.d.ts.map +0 -1
  128. package/dist/services/UniswapService.js +0 -585
  129. package/dist/services/UniswapService.js.map +0 -1
  130. package/dist/services/UniswapSubgraphService.d.ts +0 -144
  131. package/dist/services/UniswapSubgraphService.d.ts.map +0 -1
  132. package/dist/services/UniswapSubgraphService.js +0 -606
  133. package/dist/services/UniswapSubgraphService.js.map +0 -1
  134. package/dist/services/rpc.d.ts +0 -35
  135. package/dist/services/rpc.d.ts.map +0 -1
  136. package/dist/services/rpc.js +0 -110
  137. package/dist/services/rpc.js.map +0 -1
  138. package/dist/services/swap/BaseSwapService.d.ts +0 -17
  139. package/dist/services/swap/BaseSwapService.d.ts.map +0 -1
  140. package/dist/services/swap/BaseSwapService.js +0 -19
  141. package/dist/services/swap/BaseSwapService.js.map +0 -1
  142. package/dist/services/swap/DebridgeAdapter.d.ts +0 -37
  143. package/dist/services/swap/DebridgeAdapter.d.ts.map +0 -1
  144. package/dist/services/swap/DebridgeAdapter.js +0 -243
  145. package/dist/services/swap/DebridgeAdapter.js.map +0 -1
  146. package/dist/services/swap/RelayAdapter.d.ts +0 -19
  147. package/dist/services/swap/RelayAdapter.d.ts.map +0 -1
  148. package/dist/services/swap/RelayAdapter.js +0 -189
  149. package/dist/services/swap/RelayAdapter.js.map +0 -1
  150. package/dist/services/swap/SwapServiceFactory.d.ts +0 -25
  151. package/dist/services/swap/SwapServiceFactory.d.ts.map +0 -1
  152. package/dist/services/swap/SwapServiceFactory.js +0 -79
  153. package/dist/services/swap/SwapServiceFactory.js.map +0 -1
  154. package/dist/services/swap/addresses.d.ts +0 -3
  155. package/dist/services/swap/addresses.d.ts.map +0 -1
  156. package/dist/services/swap/addresses.js +0 -68
  157. package/dist/services/swap/addresses.js.map +0 -1
  158. package/dist/services/swap/affiliate.d.ts +0 -17
  159. package/dist/services/swap/affiliate.d.ts.map +0 -1
  160. package/dist/services/swap/affiliate.js +0 -126
  161. package/dist/services/swap/affiliate.js.map +0 -1
  162. package/dist/services/swap/config.d.ts +0 -9
  163. package/dist/services/swap/config.d.ts.map +0 -1
  164. package/dist/services/swap/config.js +0 -19
  165. package/dist/services/swap/config.js.map +0 -1
  166. package/dist/services/swap/index.d.ts +0 -10
  167. package/dist/services/swap/index.d.ts.map +0 -1
  168. package/dist/services/swap/index.js +0 -22
  169. package/dist/services/swap/index.js.map +0 -1
  170. package/dist/services/swap/types.d.ts +0 -89
  171. package/dist/services/swap/types.d.ts.map +0 -1
  172. package/dist/services/swap/types.js +0 -6
  173. package/dist/services/swap/types.js.map +0 -1
  174. package/dist/tools/BaseTool.d.ts +0 -15
  175. package/dist/tools/BaseTool.d.ts.map +0 -1
  176. package/dist/tools/BaseTool.js +0 -35
  177. package/dist/tools/BaseTool.js.map +0 -1
  178. package/dist/tools/ToolRegistry.d.ts +0 -27
  179. package/dist/tools/ToolRegistry.d.ts.map +0 -1
  180. package/dist/tools/ToolRegistry.js +0 -80
  181. package/dist/tools/ToolRegistry.js.map +0 -1
  182. package/dist/tools/builtin/ai/GeminiSearchAiTool.d.ts +0 -36
  183. package/dist/tools/builtin/ai/GeminiSearchAiTool.d.ts.map +0 -1
  184. package/dist/tools/builtin/ai/GeminiSearchAiTool.js +0 -91
  185. package/dist/tools/builtin/ai/GeminiSearchAiTool.js.map +0 -1
  186. package/dist/tools/builtin/ai/index.d.ts +0 -3
  187. package/dist/tools/builtin/ai/index.d.ts.map +0 -1
  188. package/dist/tools/builtin/ai/index.js +0 -6
  189. package/dist/tools/builtin/ai/index.js.map +0 -1
  190. package/dist/tools/builtin/index.d.ts +0 -8
  191. package/dist/tools/builtin/index.d.ts.map +0 -1
  192. package/dist/tools/builtin/index.js +0 -24
  193. package/dist/tools/builtin/index.js.map +0 -1
  194. package/dist/tools/builtin/nft/BaseNftMessageTool.d.ts +0 -35
  195. package/dist/tools/builtin/nft/BaseNftMessageTool.d.ts.map +0 -1
  196. package/dist/tools/builtin/nft/BaseNftMessageTool.js +0 -45
  197. package/dist/tools/builtin/nft/BaseNftMessageTool.js.map +0 -1
  198. package/dist/tools/builtin/nft/NFTContractInfoTool.d.ts +0 -15
  199. package/dist/tools/builtin/nft/NFTContractInfoTool.d.ts.map +0 -1
  200. package/dist/tools/builtin/nft/NFTContractInfoTool.js +0 -19
  201. package/dist/tools/builtin/nft/NFTContractInfoTool.js.map +0 -1
  202. package/dist/tools/builtin/nft/NFTMetadataTool.d.ts +0 -15
  203. package/dist/tools/builtin/nft/NFTMetadataTool.d.ts.map +0 -1
  204. package/dist/tools/builtin/nft/NFTMetadataTool.js +0 -20
  205. package/dist/tools/builtin/nft/NFTMetadataTool.js.map +0 -1
  206. package/dist/tools/builtin/nft/SendNftTool.d.ts +0 -14
  207. package/dist/tools/builtin/nft/SendNftTool.d.ts.map +0 -1
  208. package/dist/tools/builtin/nft/SendNftTool.js +0 -20
  209. package/dist/tools/builtin/nft/SendNftTool.js.map +0 -1
  210. package/dist/tools/builtin/nft/WalletNFTsTool.d.ts +0 -15
  211. package/dist/tools/builtin/nft/WalletNFTsTool.d.ts.map +0 -1
  212. package/dist/tools/builtin/nft/WalletNFTsTool.js +0 -20
  213. package/dist/tools/builtin/nft/WalletNFTsTool.js.map +0 -1
  214. package/dist/tools/builtin/nft/index.d.ts +0 -7
  215. package/dist/tools/builtin/nft/index.d.ts.map +0 -1
  216. package/dist/tools/builtin/nft/index.js +0 -10
  217. package/dist/tools/builtin/nft/index.js.map +0 -1
  218. package/dist/tools/builtin/pool/EstimatePoolYieldTool.d.ts +0 -124
  219. package/dist/tools/builtin/pool/EstimatePoolYieldTool.d.ts.map +0 -1
  220. package/dist/tools/builtin/pool/EstimatePoolYieldTool.js +0 -236
  221. package/dist/tools/builtin/pool/EstimatePoolYieldTool.js.map +0 -1
  222. package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.d.ts +0 -128
  223. package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.d.ts.map +0 -1
  224. package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.js +0 -520
  225. package/dist/tools/builtin/pool/OpenAddLiquidityFormTool.js.map +0 -1
  226. package/dist/tools/builtin/pool/PoolByAddressTool.d.ts +0 -127
  227. package/dist/tools/builtin/pool/PoolByAddressTool.d.ts.map +0 -1
  228. package/dist/tools/builtin/pool/PoolByAddressTool.js +0 -238
  229. package/dist/tools/builtin/pool/PoolByAddressTool.js.map +0 -1
  230. package/dist/tools/builtin/pool/PoolDetailTool.d.ts +0 -127
  231. package/dist/tools/builtin/pool/PoolDetailTool.d.ts.map +0 -1
  232. package/dist/tools/builtin/pool/PoolDetailTool.js +0 -273
  233. package/dist/tools/builtin/pool/PoolDetailTool.js.map +0 -1
  234. package/dist/tools/builtin/pool/PoolSearchTool.d.ts +0 -50
  235. package/dist/tools/builtin/pool/PoolSearchTool.d.ts.map +0 -1
  236. package/dist/tools/builtin/pool/PoolSearchTool.js +0 -160
  237. package/dist/tools/builtin/pool/PoolSearchTool.js.map +0 -1
  238. package/dist/tools/builtin/pool/PreviewAddLiquidityTool.d.ts +0 -124
  239. package/dist/tools/builtin/pool/PreviewAddLiquidityTool.d.ts.map +0 -1
  240. package/dist/tools/builtin/pool/PreviewAddLiquidityTool.js +0 -382
  241. package/dist/tools/builtin/pool/PreviewAddLiquidityTool.js.map +0 -1
  242. package/dist/tools/builtin/pool/TopPoolsTool.d.ts +0 -68
  243. package/dist/tools/builtin/pool/TopPoolsTool.d.ts.map +0 -1
  244. package/dist/tools/builtin/pool/TopPoolsTool.js +0 -159
  245. package/dist/tools/builtin/pool/TopPoolsTool.js.map +0 -1
  246. package/dist/tools/builtin/pool/index.d.ts +0 -15
  247. package/dist/tools/builtin/pool/index.d.ts.map +0 -1
  248. package/dist/tools/builtin/pool/index.js +0 -18
  249. package/dist/tools/builtin/pool/index.js.map +0 -1
  250. package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.d.ts +0 -54
  251. package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.d.ts.map +0 -1
  252. package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.js +0 -98
  253. package/dist/tools/builtin/pool-subgraph/SubgraphCoinPoolPairsTool.js.map +0 -1
  254. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.d.ts +0 -63
  255. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.d.ts.map +0 -1
  256. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.js +0 -82
  257. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByAddressTool.js.map +0 -1
  258. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.d.ts +0 -79
  259. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.d.ts.map +0 -1
  260. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.js +0 -97
  261. package/dist/tools/builtin/pool-subgraph/SubgraphPoolByPositionIdTool.js.map +0 -1
  262. package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.d.ts +0 -77
  263. package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.d.ts.map +0 -1
  264. package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.js +0 -190
  265. package/dist/tools/builtin/pool-subgraph/SubgraphPoolSearchTool.js.map +0 -1
  266. package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.d.ts +0 -107
  267. package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.d.ts.map +0 -1
  268. package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.js +0 -92
  269. package/dist/tools/builtin/pool-subgraph/SubgraphPositionDetailTool.js.map +0 -1
  270. package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.d.ts +0 -56
  271. package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.d.ts.map +0 -1
  272. package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.js +0 -94
  273. package/dist/tools/builtin/pool-subgraph/SubgraphTrendingPoolsTool.js.map +0 -1
  274. package/dist/tools/builtin/pool-subgraph/index.d.ts +0 -13
  275. package/dist/tools/builtin/pool-subgraph/index.d.ts.map +0 -1
  276. package/dist/tools/builtin/pool-subgraph/index.js +0 -18
  277. package/dist/tools/builtin/pool-subgraph/index.js.map +0 -1
  278. package/dist/tools/builtin/token/TokenAnalyticsTool.d.ts +0 -71
  279. package/dist/tools/builtin/token/TokenAnalyticsTool.d.ts.map +0 -1
  280. package/dist/tools/builtin/token/TokenAnalyticsTool.js +0 -147
  281. package/dist/tools/builtin/token/TokenAnalyticsTool.js.map +0 -1
  282. package/dist/tools/builtin/token/TokenHoldersTool.d.ts +0 -81
  283. package/dist/tools/builtin/token/TokenHoldersTool.d.ts.map +0 -1
  284. package/dist/tools/builtin/token/TokenHoldersTool.js +0 -139
  285. package/dist/tools/builtin/token/TokenHoldersTool.js.map +0 -1
  286. package/dist/tools/builtin/token/TokenInfoTool.d.ts +0 -40
  287. package/dist/tools/builtin/token/TokenInfoTool.d.ts.map +0 -1
  288. package/dist/tools/builtin/token/TokenInfoTool.js +0 -221
  289. package/dist/tools/builtin/token/TokenInfoTool.js.map +0 -1
  290. package/dist/tools/builtin/token/TokenScoreTool.d.ts +0 -63
  291. package/dist/tools/builtin/token/TokenScoreTool.d.ts.map +0 -1
  292. package/dist/tools/builtin/token/TokenScoreTool.js +0 -148
  293. package/dist/tools/builtin/token/TokenScoreTool.js.map +0 -1
  294. package/dist/tools/builtin/token/TopGainersTool.d.ts +0 -37
  295. package/dist/tools/builtin/token/TopGainersTool.d.ts.map +0 -1
  296. package/dist/tools/builtin/token/TopGainersTool.js +0 -100
  297. package/dist/tools/builtin/token/TopGainersTool.js.map +0 -1
  298. package/dist/tools/builtin/token/TopLosersTool.d.ts +0 -66
  299. package/dist/tools/builtin/token/TopLosersTool.d.ts.map +0 -1
  300. package/dist/tools/builtin/token/TopLosersTool.js +0 -129
  301. package/dist/tools/builtin/token/TopLosersTool.js.map +0 -1
  302. package/dist/tools/builtin/token/TrendingTokensTool.d.ts +0 -39
  303. package/dist/tools/builtin/token/TrendingTokensTool.d.ts.map +0 -1
  304. package/dist/tools/builtin/token/TrendingTokensTool.js +0 -83
  305. package/dist/tools/builtin/token/TrendingTokensTool.js.map +0 -1
  306. package/dist/tools/builtin/token/index.d.ts +0 -13
  307. package/dist/tools/builtin/token/index.d.ts.map +0 -1
  308. package/dist/tools/builtin/token/index.js +0 -16
  309. package/dist/tools/builtin/token/index.js.map +0 -1
  310. package/dist/tools/builtin/wallet/TransactionByHashTool.d.ts +0 -70
  311. package/dist/tools/builtin/wallet/TransactionByHashTool.d.ts.map +0 -1
  312. package/dist/tools/builtin/wallet/TransactionByHashTool.js +0 -111
  313. package/dist/tools/builtin/wallet/TransactionByHashTool.js.map +0 -1
  314. package/dist/tools/builtin/wallet/WalletApprovalsTool.d.ts +0 -107
  315. package/dist/tools/builtin/wallet/WalletApprovalsTool.d.ts.map +0 -1
  316. package/dist/tools/builtin/wallet/WalletApprovalsTool.js +0 -164
  317. package/dist/tools/builtin/wallet/WalletApprovalsTool.js.map +0 -1
  318. package/dist/tools/builtin/wallet/WalletDefiPositionsTool.d.ts +0 -61
  319. package/dist/tools/builtin/wallet/WalletDefiPositionsTool.d.ts.map +0 -1
  320. package/dist/tools/builtin/wallet/WalletDefiPositionsTool.js +0 -100
  321. package/dist/tools/builtin/wallet/WalletDefiPositionsTool.js.map +0 -1
  322. package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.d.ts +0 -68
  323. package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.d.ts.map +0 -1
  324. package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.js +0 -115
  325. package/dist/tools/builtin/wallet/WalletDefiProtocolPositionsTool.js.map +0 -1
  326. package/dist/tools/builtin/wallet/WalletDefiSummaryTool.d.ts +0 -50
  327. package/dist/tools/builtin/wallet/WalletDefiSummaryTool.d.ts.map +0 -1
  328. package/dist/tools/builtin/wallet/WalletDefiSummaryTool.js +0 -80
  329. package/dist/tools/builtin/wallet/WalletDefiSummaryTool.js.map +0 -1
  330. package/dist/tools/builtin/wallet/WalletHistoryTool.d.ts +0 -31
  331. package/dist/tools/builtin/wallet/WalletHistoryTool.d.ts.map +0 -1
  332. package/dist/tools/builtin/wallet/WalletHistoryTool.js +0 -154
  333. package/dist/tools/builtin/wallet/WalletHistoryTool.js.map +0 -1
  334. package/dist/tools/builtin/wallet/WalletNetWorthTool.d.ts +0 -44
  335. package/dist/tools/builtin/wallet/WalletNetWorthTool.d.ts.map +0 -1
  336. package/dist/tools/builtin/wallet/WalletNetWorthTool.js +0 -122
  337. package/dist/tools/builtin/wallet/WalletNetWorthTool.js.map +0 -1
  338. package/dist/tools/builtin/wallet/WalletNftTransfersTool.d.ts +0 -86
  339. package/dist/tools/builtin/wallet/WalletNftTransfersTool.d.ts.map +0 -1
  340. package/dist/tools/builtin/wallet/WalletNftTransfersTool.js +0 -265
  341. package/dist/tools/builtin/wallet/WalletNftTransfersTool.js.map +0 -1
  342. package/dist/tools/builtin/wallet/WalletPnlSummaryTool.d.ts +0 -43
  343. package/dist/tools/builtin/wallet/WalletPnlSummaryTool.d.ts.map +0 -1
  344. package/dist/tools/builtin/wallet/WalletPnlSummaryTool.js +0 -89
  345. package/dist/tools/builtin/wallet/WalletPnlSummaryTool.js.map +0 -1
  346. package/dist/tools/builtin/wallet/WalletPnlTool.d.ts +0 -43
  347. package/dist/tools/builtin/wallet/WalletPnlTool.d.ts.map +0 -1
  348. package/dist/tools/builtin/wallet/WalletPnlTool.js +0 -175
  349. package/dist/tools/builtin/wallet/WalletPnlTool.js.map +0 -1
  350. package/dist/tools/builtin/wallet/WalletTokenBalancesTool.d.ts +0 -35
  351. package/dist/tools/builtin/wallet/WalletTokenBalancesTool.d.ts.map +0 -1
  352. package/dist/tools/builtin/wallet/WalletTokenBalancesTool.js +0 -68
  353. package/dist/tools/builtin/wallet/WalletTokenBalancesTool.js.map +0 -1
  354. package/dist/tools/builtin/wallet/WalletTokenTransfersTool.d.ts +0 -109
  355. package/dist/tools/builtin/wallet/WalletTokenTransfersTool.d.ts.map +0 -1
  356. package/dist/tools/builtin/wallet/WalletTokenTransfersTool.js +0 -354
  357. package/dist/tools/builtin/wallet/WalletTokenTransfersTool.js.map +0 -1
  358. package/dist/tools/builtin/wallet/index.d.ts +0 -28
  359. package/dist/tools/builtin/wallet/index.d.ts.map +0 -1
  360. package/dist/tools/builtin/wallet/index.js +0 -32
  361. package/dist/tools/builtin/wallet/index.js.map +0 -1
  362. package/dist/tools/builtin/wallet-action/ApproveTokenTool.d.ts +0 -25
  363. package/dist/tools/builtin/wallet-action/ApproveTokenTool.d.ts.map +0 -1
  364. package/dist/tools/builtin/wallet-action/ApproveTokenTool.js +0 -98
  365. package/dist/tools/builtin/wallet-action/ApproveTokenTool.js.map +0 -1
  366. package/dist/tools/builtin/wallet-action/BaseWalletActionTool.d.ts +0 -211
  367. package/dist/tools/builtin/wallet-action/BaseWalletActionTool.d.ts.map +0 -1
  368. package/dist/tools/builtin/wallet-action/BaseWalletActionTool.js +0 -499
  369. package/dist/tools/builtin/wallet-action/BaseWalletActionTool.js.map +0 -1
  370. package/dist/tools/builtin/wallet-action/BuyTokenTool.d.ts +0 -240
  371. package/dist/tools/builtin/wallet-action/BuyTokenTool.d.ts.map +0 -1
  372. package/dist/tools/builtin/wallet-action/BuyTokenTool.js +0 -1257
  373. package/dist/tools/builtin/wallet-action/BuyTokenTool.js.map +0 -1
  374. package/dist/tools/builtin/wallet-action/SendNativeTool.d.ts +0 -41
  375. package/dist/tools/builtin/wallet-action/SendNativeTool.d.ts.map +0 -1
  376. package/dist/tools/builtin/wallet-action/SendNativeTool.js +0 -127
  377. package/dist/tools/builtin/wallet-action/SendNativeTool.js.map +0 -1
  378. package/dist/tools/builtin/wallet-action/SendTokenTool.d.ts +0 -63
  379. package/dist/tools/builtin/wallet-action/SendTokenTool.d.ts.map +0 -1
  380. package/dist/tools/builtin/wallet-action/SendTokenTool.js +0 -294
  381. package/dist/tools/builtin/wallet-action/SendTokenTool.js.map +0 -1
  382. package/dist/tools/builtin/wallet-action/SwapTokenTool.d.ts +0 -247
  383. package/dist/tools/builtin/wallet-action/SwapTokenTool.d.ts.map +0 -1
  384. package/dist/tools/builtin/wallet-action/SwapTokenTool.js +0 -1258
  385. package/dist/tools/builtin/wallet-action/SwapTokenTool.js.map +0 -1
  386. package/dist/tools/builtin/wallet-action/UnwrapNativeTool.d.ts +0 -20
  387. package/dist/tools/builtin/wallet-action/UnwrapNativeTool.d.ts.map +0 -1
  388. package/dist/tools/builtin/wallet-action/UnwrapNativeTool.js +0 -36
  389. package/dist/tools/builtin/wallet-action/UnwrapNativeTool.js.map +0 -1
  390. package/dist/tools/builtin/wallet-action/WrapNativeTool.d.ts +0 -23
  391. package/dist/tools/builtin/wallet-action/WrapNativeTool.d.ts.map +0 -1
  392. package/dist/tools/builtin/wallet-action/WrapNativeTool.js +0 -54
  393. package/dist/tools/builtin/wallet-action/WrapNativeTool.js.map +0 -1
  394. package/dist/tools/builtin/wallet-action/amountSpec.d.ts +0 -62
  395. package/dist/tools/builtin/wallet-action/amountSpec.d.ts.map +0 -1
  396. package/dist/tools/builtin/wallet-action/amountSpec.js +0 -93
  397. package/dist/tools/builtin/wallet-action/amountSpec.js.map +0 -1
  398. package/dist/tools/builtin/wallet-action/gasReserve.d.ts +0 -42
  399. package/dist/tools/builtin/wallet-action/gasReserve.d.ts.map +0 -1
  400. package/dist/tools/builtin/wallet-action/gasReserve.js +0 -103
  401. package/dist/tools/builtin/wallet-action/gasReserve.js.map +0 -1
  402. package/dist/tools/builtin/wallet-action/index.d.ts +0 -9
  403. package/dist/tools/builtin/wallet-action/index.d.ts.map +0 -1
  404. package/dist/tools/builtin/wallet-action/index.js +0 -20
  405. package/dist/tools/builtin/wallet-action/index.js.map +0 -1
  406. package/dist/tools/chainResolver.d.ts +0 -98
  407. package/dist/tools/chainResolver.d.ts.map +0 -1
  408. package/dist/tools/chainResolver.js +0 -302
  409. package/dist/tools/chainResolver.js.map +0 -1
  410. package/dist/tools/index.d.ts +0 -4
  411. package/dist/tools/index.d.ts.map +0 -1
  412. package/dist/tools/index.js +0 -23
  413. package/dist/tools/index.js.map +0 -1
  414. package/dist/types/index.d.ts +0 -777
  415. package/dist/types/index.d.ts.map +0 -1
  416. package/dist/types/index.js +0 -6
  417. package/dist/types/index.js.map +0 -1
@@ -1,1328 +0,0 @@
1
- /**
2
- * MoralisService — Moralis Web3 API + Cortex AI proxy.
3
- *
4
- * Adapted from keyring-chatbot-agent-sdk moralis service.
5
- * Uses native fetch — no SDK dependencies.
6
- */
7
- export interface MoralisServiceConfig {
8
- /** Base URL for Moralis proxy (default: https://nft.keyring.app) */
9
- baseUrl?: string;
10
- /** Base URL for DeFi APIs — uses /api/moralis-v1/proxy route (default: https://nft-demo.keyring.app) */
11
- v1BaseUrl?: string;
12
- /** Pantograph API base URL for price enrichment */
13
- pantographUrl?: string;
14
- }
15
- export interface TokenBalance {
16
- token_address: string;
17
- symbol: string;
18
- name: string;
19
- logo?: string;
20
- thumbnail?: string;
21
- decimals: number;
22
- balance: string;
23
- possible_spam: boolean;
24
- verified_contract: boolean;
25
- total_supply?: string;
26
- total_supply_formatted?: string;
27
- percentage_relative_to_total_supply?: number;
28
- balance_formatted: string;
29
- usd_price?: number;
30
- usd_price_24hr_percent_change?: number;
31
- usd_price_24hr_usd_change?: number;
32
- usd_value?: number;
33
- usd_value_24hr_usd_change?: number;
34
- native_token: boolean;
35
- portfolio_percentage?: number;
36
- }
37
- export interface TokenMetadata {
38
- token_address: string;
39
- address?: string;
40
- name: string;
41
- symbol: string;
42
- decimals: number;
43
- logo?: string;
44
- thumbnail?: string;
45
- icon_image?: string;
46
- logoURI?: string;
47
- usd_price?: number;
48
- usd_price_24hr_percent_change?: number;
49
- usd_price_24hr_usd_change?: number;
50
- auditGoplus?: Record<string, unknown>;
51
- holder_count?: string;
52
- holders?: unknown[];
53
- coinGeckoId?: string;
54
- position?: number;
55
- isActive?: boolean;
56
- updatedAt?: string;
57
- price_change_24h?: number;
58
- telegram_channel_identifier?: string;
59
- subreddit_url?: string;
60
- facebook_username?: string;
61
- twitter_screen_name?: string;
62
- homepage?: string[];
63
- announcement_url?: string[];
64
- categories?: string[];
65
- chat_url?: string[];
66
- market_cap_rank?: number;
67
- max_supply?: number | null;
68
- total_supply?: number | string;
69
- circulating_supply?: number;
70
- fully_diluted_valuation?: number;
71
- market_cap?: number;
72
- total_volume?: number;
73
- }
74
- export interface NFTItem {
75
- token_address: string;
76
- token_id: string;
77
- amount: string;
78
- owner_of: string;
79
- token_hash: string;
80
- block_number_minted: string;
81
- block_number: string;
82
- contract_type: 'ERC721' | 'ERC1155';
83
- name: string;
84
- symbol: string;
85
- token_uri?: string;
86
- metadata?: string;
87
- normalized_metadata?: {
88
- name?: string;
89
- description?: string;
90
- image?: string;
91
- animation_url?: string;
92
- attributes?: Array<{
93
- trait_type: string;
94
- value: string;
95
- }>;
96
- };
97
- possible_spam: boolean;
98
- verified_collection: boolean;
99
- media?: {
100
- mimetype?: string;
101
- parent_hash?: string;
102
- status?: string;
103
- updated_at?: string;
104
- media_collection?: {
105
- low?: {
106
- url: string;
107
- width: number;
108
- height: number;
109
- };
110
- medium?: {
111
- url: string;
112
- width: number;
113
- height: number;
114
- };
115
- high?: {
116
- url: string;
117
- width: number;
118
- height: number;
119
- };
120
- };
121
- original_media_url?: string;
122
- };
123
- collection_logo?: string;
124
- collection_banner_image?: string;
125
- }
126
- export type NFTContractMetadata = {
127
- token_address: string;
128
- name: string;
129
- symbol: string;
130
- contract_type: 'ERC721' | 'ERC1155' | string;
131
- possible_spam: 'true' | 'false';
132
- verified_collection: 'true' | 'false';
133
- synced_at: string | null;
134
- collection_logo: string;
135
- collection_banner_image: string;
136
- collection_category: string;
137
- project_url: string;
138
- wiki_url: string;
139
- discord_url: string;
140
- telegram_url: string;
141
- twitter_username: string;
142
- instagram_username: string;
143
- floor_price: string;
144
- floor_price_usd: string;
145
- floor_price_currency: string;
146
- last_sale: NFTLastSale | null;
147
- };
148
- export type NFTLastSale = {
149
- transaction_hash: string;
150
- block_timestamp: string;
151
- buyer_address: string;
152
- seller_address: string;
153
- price: string;
154
- price_formatted: string;
155
- payment_token: PaymentToken;
156
- usd_price_at_sale: string;
157
- current_usd_value: string;
158
- token_address: string;
159
- token_id: string;
160
- };
161
- export type PaymentToken = {
162
- token_name: string;
163
- token_symbol: string;
164
- token_logo: string;
165
- token_decimals: string;
166
- token_address: string;
167
- };
168
- /**
169
- * Response shape for `GET /nft/{address}/{token_id}` — a single NFT's full
170
- * metadata. Superset of {@link NFTItem}: adds market (floor price), rarity,
171
- * collection social links and sync timestamps not returned by the wallet-NFTs
172
- * endpoint.
173
- */
174
- export interface NFTMetadata extends NFTItem {
175
- minter_address?: string;
176
- last_metadata_sync?: string;
177
- last_token_uri_sync?: string;
178
- floor_price?: string;
179
- floor_price_usd?: string;
180
- floor_price_currency?: string;
181
- rarity_rank?: number;
182
- rarity_percentage?: number;
183
- rarity_label?: string;
184
- collection_category?: string;
185
- project_url?: string;
186
- wiki_url?: string;
187
- discord_url?: string;
188
- telegram_url?: string;
189
- twitter_username?: string;
190
- instagram_username?: string;
191
- }
192
- /**
193
- * Transaction category as labelled by the Moralis /wallets/{address}/history
194
- * endpoint. Values come directly from Moralis's decoder.
195
- */
196
- export type WalletHistoryCategory = 'send' | 'receive' | 'token send' | 'token receive' | 'nft send' | 'nft receive' | 'token swap' | 'deposit' | 'withdraw' | 'nft purchase' | 'nft sale' | 'airdrop' | 'mint' | 'burn' | 'borrow' | 'contract interaction';
197
- export interface WalletHistoryNativeTransfer {
198
- from_address: string;
199
- to_address: string;
200
- value: string;
201
- value_formatted: string;
202
- direction: 'send' | 'receive';
203
- internal_transaction: boolean;
204
- token_symbol?: string;
205
- token_logo?: string;
206
- }
207
- export interface WalletHistoryErc20Transfer {
208
- token_name?: string;
209
- token_symbol?: string;
210
- token_logo?: string;
211
- token_decimals?: string;
212
- address: string;
213
- from_address: string;
214
- to_address: string;
215
- value: string;
216
- value_formatted: string;
217
- direction: 'send' | 'receive';
218
- possible_spam: boolean;
219
- verified_contract: boolean;
220
- }
221
- export interface WalletHistoryNftTransfer {
222
- token_address: string;
223
- token_id: string;
224
- from_address: string;
225
- to_address: string;
226
- value: string;
227
- amount: string;
228
- contract_type: 'ERC721' | 'ERC1155';
229
- transaction_type?: string;
230
- direction: 'send' | 'receive';
231
- normalized_metadata?: {
232
- name?: string;
233
- description?: string;
234
- image?: string;
235
- attributes?: Array<{
236
- trait_type: string;
237
- value: string;
238
- }>;
239
- };
240
- collection_logo?: string;
241
- collection_banner_image?: string;
242
- possible_spam?: boolean;
243
- verified_collection?: boolean;
244
- }
245
- export interface WalletHistoryContractInteraction {
246
- approvals?: Array<{
247
- token?: {
248
- address: string;
249
- name?: string;
250
- symbol?: string;
251
- logo?: string;
252
- decimals?: string;
253
- possible_spam?: boolean;
254
- verified_contract?: boolean;
255
- };
256
- spender?: {
257
- address: string;
258
- address_label?: string;
259
- entity?: string;
260
- entity_logo?: string;
261
- };
262
- value?: string;
263
- value_formatted?: string;
264
- }>;
265
- revokes?: WalletHistoryContractInteraction['approvals'];
266
- setApprovalForAll?: Array<{
267
- token?: {
268
- address: string;
269
- name?: string;
270
- symbol?: string;
271
- };
272
- operator?: {
273
- address: string;
274
- address_label?: string;
275
- };
276
- approved_all?: boolean;
277
- }>;
278
- }
279
- export interface WalletHistoryItem {
280
- hash: string;
281
- nonce?: string;
282
- transaction_index?: string;
283
- from_address: string;
284
- from_address_label?: string;
285
- to_address?: string;
286
- to_address_label?: string;
287
- value: string;
288
- gas?: string;
289
- gas_price?: string;
290
- receipt_cumulative_gas_used?: string;
291
- receipt_gas_used?: string;
292
- receipt_status?: string;
293
- receipt_contract_address?: string | null;
294
- block_timestamp: string;
295
- block_number: string;
296
- block_hash?: string;
297
- transaction_fee?: string;
298
- method_label?: string;
299
- /** Decoded category. See `WalletHistoryCategory`. */
300
- category: WalletHistoryCategory | string;
301
- /** Human-readable one-line summary. */
302
- summary?: string;
303
- possible_spam?: boolean;
304
- native_transfers?: WalletHistoryNativeTransfer[];
305
- erc20_transfers?: WalletHistoryErc20Transfer[];
306
- nft_transfers?: WalletHistoryNftTransfer[];
307
- contract_interactions?: WalletHistoryContractInteraction;
308
- internal_transactions?: Array<{
309
- from: string;
310
- to: string;
311
- value: string;
312
- gas?: string;
313
- type?: string;
314
- input?: string;
315
- output?: string;
316
- }>;
317
- }
318
- export interface WalletHistoryResponse {
319
- cursor?: string | null;
320
- page?: number;
321
- page_size?: number;
322
- limit?: number;
323
- result: WalletHistoryItem[];
324
- }
325
- export interface CortexResponse {
326
- text: string;
327
- }
328
- export interface WalletNetWorthChainBreakdown {
329
- chain: string;
330
- native_balance: string;
331
- native_balance_formatted: string;
332
- native_balance_usd: string;
333
- token_balance_usd: string;
334
- networth_usd: string;
335
- }
336
- export interface WalletNetWorthUnavailableChain {
337
- chain_id: string;
338
- }
339
- export interface WalletNetWorthResponse {
340
- total_networth_usd: string;
341
- chains: WalletNetWorthChainBreakdown[];
342
- unsupported_chain_ids?: string[];
343
- unavailable_chains?: WalletNetWorthUnavailableChain[];
344
- }
345
- export type WalletPnlDaysWindow = 'all' | '7' | '30' | '60' | '90';
346
- export interface WalletPnlSummaryResponse {
347
- total_count_of_trades: number;
348
- total_trade_volume: string;
349
- total_realized_profit_usd: string;
350
- total_realized_profit_percentage: number;
351
- total_buys: number;
352
- total_sells: number;
353
- total_sold_volume_usd: string;
354
- total_bought_volume_usd: string;
355
- }
356
- export interface WalletPnlTokenItem {
357
- token_address: string;
358
- avg_buy_price_usd: string;
359
- avg_sell_price_usd: string;
360
- total_usd_invested: string;
361
- total_tokens_sold: string;
362
- total_tokens_bought: string;
363
- total_sold_usd: string;
364
- avg_cost_of_quantity_sold: string;
365
- count_of_trades: number;
366
- realized_profit_usd: string;
367
- realized_profit_percentage: number;
368
- total_buys: number;
369
- total_sells: number;
370
- name: string;
371
- symbol: string;
372
- decimals: string;
373
- logo?: string;
374
- possible_spam: boolean;
375
- }
376
- export interface WalletPnlResponse {
377
- result: WalletPnlTokenItem[];
378
- }
379
- export interface MoralisApiResponse<T> {
380
- success: boolean;
381
- data?: T;
382
- error?: string;
383
- }
384
- export interface DecodedParam {
385
- name: string;
386
- value: string;
387
- type: string;
388
- }
389
- export interface DecodedCall {
390
- signature: string;
391
- label: string;
392
- type: 'function';
393
- params: DecodedParam[];
394
- }
395
- export interface DecodedEvent {
396
- signature: string;
397
- label: string;
398
- type: 'event';
399
- params: DecodedParam[];
400
- }
401
- export interface TransactionLog {
402
- log_index: string;
403
- transaction_hash: string;
404
- transaction_index: string;
405
- transaction_value: string;
406
- address: string;
407
- data: string;
408
- topic0: string;
409
- topic1?: string | null;
410
- topic2?: string | null;
411
- topic3?: string | null;
412
- block_timestamp: string;
413
- block_number: string;
414
- block_hash: string;
415
- decoded_event: DecodedEvent | null;
416
- }
417
- export interface TransactionByHashResponse {
418
- hash: string;
419
- nonce: string;
420
- transaction_index: string;
421
- from_address: string;
422
- from_address_label?: string;
423
- from_address_entity?: string;
424
- from_address_entity_logo?: string;
425
- to_address?: string;
426
- to_address_label?: string;
427
- to_address_entity?: string;
428
- to_address_entity_logo?: string;
429
- value: string;
430
- gas: string;
431
- gas_price: string;
432
- input: string;
433
- receipt_cumulative_gas_used: string;
434
- receipt_gas_used: string;
435
- receipt_status: string;
436
- receipt_contract_address?: string | null;
437
- receipt_root?: string | null;
438
- transaction_fee: string;
439
- block_timestamp: string;
440
- block_number: string;
441
- block_hash: string;
442
- logs: TransactionLog[];
443
- decoded_call: DecodedCall | null;
444
- }
445
- export interface WalletTokenTransferItem {
446
- transaction_hash: string;
447
- block_number: string;
448
- block_timestamp: string;
449
- block_hash?: string;
450
- transaction_index?: number;
451
- log_index?: number;
452
- /** ERC-20 contract address */
453
- address: string;
454
- token_name?: string;
455
- token_symbol?: string;
456
- token_logo?: string;
457
- token_decimals?: string;
458
- from_address: string;
459
- from_address_label?: string;
460
- from_address_entity?: string;
461
- from_address_entity_logo?: string;
462
- to_address: string;
463
- to_address_label?: string;
464
- to_address_entity?: string;
465
- to_address_entity_logo?: string;
466
- /** Raw amount (no decimals applied) */
467
- value: string;
468
- /** Human-readable amount (decimals applied) */
469
- value_decimal?: string;
470
- possible_spam: boolean;
471
- verified_contract: boolean;
472
- }
473
- export interface WalletTokenTransfersResponse {
474
- cursor?: string | null;
475
- page?: number;
476
- page_size?: number;
477
- result: WalletTokenTransferItem[];
478
- }
479
- export interface NftTransferLastSale {
480
- transaction_hash?: string;
481
- block_timestamp?: string;
482
- buyer_address?: string;
483
- seller_address?: string;
484
- price?: string;
485
- price_formatted?: string;
486
- usd_price_at_sale?: string;
487
- payment_token?: {
488
- token_name?: string;
489
- token_symbol?: string;
490
- token_address?: string;
491
- value?: string;
492
- value_formatted?: string;
493
- };
494
- }
495
- export interface WalletNftTransferItem {
496
- transaction_hash: string;
497
- block_number: string;
498
- block_timestamp: string;
499
- block_hash?: string;
500
- transaction_index?: number;
501
- log_index?: number;
502
- token_address: string;
503
- token_id: string;
504
- token_name?: string;
505
- token_symbol?: string;
506
- contract_type: string;
507
- /** Only present for ERC-1155 transfers */
508
- operator?: string;
509
- from_address: string;
510
- from_address_label?: string;
511
- from_address_entity?: string;
512
- from_address_entity_logo?: string;
513
- to_address: string;
514
- to_address_label?: string;
515
- to_address_entity?: string;
516
- to_address_entity_logo?: string;
517
- /** Native value sent with the transfer (e.g. for NFT purchases) */
518
- value?: string;
519
- /** Number of tokens transferred (relevant for ERC-1155) */
520
- amount?: string;
521
- transaction_type?: string;
522
- possible_spam?: boolean;
523
- verified_collection?: boolean;
524
- last_sale?: NftTransferLastSale;
525
- }
526
- export interface WalletNftTransfersResponse {
527
- cursor?: string | null;
528
- page?: number;
529
- page_size?: number;
530
- result: WalletNftTransferItem[];
531
- }
532
- export interface HolderChangePeriod {
533
- change: number;
534
- changePercent: number;
535
- }
536
- export interface HolderSupplyTier {
537
- supply: string;
538
- supplyPercent: number;
539
- }
540
- export interface TokenHoldersResponse {
541
- totalHolders: number;
542
- holdersByAcquisition: {
543
- swap: number;
544
- transfer: number;
545
- airdrop: number;
546
- };
547
- holderChange: {
548
- '5min': HolderChangePeriod;
549
- '1h': HolderChangePeriod;
550
- '6h': HolderChangePeriod;
551
- '24h': HolderChangePeriod;
552
- '3d': HolderChangePeriod;
553
- '7d': HolderChangePeriod;
554
- '30d': HolderChangePeriod;
555
- };
556
- holderSupply: {
557
- top10: HolderSupplyTier;
558
- top25: HolderSupplyTier;
559
- top50: HolderSupplyTier;
560
- top100: HolderSupplyTier;
561
- top250: HolderSupplyTier;
562
- top500: HolderSupplyTier;
563
- };
564
- holderDistribution: {
565
- whales: number;
566
- sharks: number;
567
- dolphins: number;
568
- fish: number;
569
- octopus: number;
570
- crabs: number;
571
- shrimps: number;
572
- };
573
- }
574
- /**
575
- * Token descriptor attached to an approval row. Describes *what* was
576
- * approved, along with current balance / price info so the caller can
577
- * compute actual USD at-risk.
578
- */
579
- export interface TokenApprovalToken {
580
- address: string;
581
- address_label?: string | null;
582
- name?: string | null;
583
- symbol?: string | null;
584
- logo?: string | null;
585
- possible_spam?: boolean;
586
- verified_contract?: boolean;
587
- current_balance?: string | null;
588
- current_balance_formatted?: string | null;
589
- usd_price?: string | null;
590
- usd_at_risk?: string | null;
591
- }
592
- /**
593
- * Spender descriptor attached to an approval row. Describes *who* was
594
- * approved to spend the token (typically a DEX router, bridge, marketplace, …).
595
- */
596
- export interface TokenApprovalSpender {
597
- address: string;
598
- address_label?: string | null;
599
- entity?: string | null;
600
- entity_logo?: string | null;
601
- }
602
- /**
603
- * One active ERC-20 approval held by the wallet. `value` / `value_formatted`
604
- * is the remaining approved amount — commonly `unlimited`
605
- * (2^256-1 ≈ 1.15e77) when a dApp was granted max allowance.
606
- */
607
- export interface TokenApproval {
608
- block_number: string;
609
- block_timestamp?: string | null;
610
- transaction_hash?: string | null;
611
- value: string;
612
- value_formatted?: string | null;
613
- token: TokenApprovalToken;
614
- spender: TokenApprovalSpender;
615
- }
616
- export interface WalletApprovalsResponse {
617
- page?: number;
618
- page_size?: number;
619
- cursor?: string | null;
620
- result: TokenApproval[];
621
- }
622
- /**
623
- * Per-protocol row returned by the DeFi summary endpoint. Each entry groups
624
- * all of a wallet's positions inside a single protocol.
625
- */
626
- export interface DefiProtocolSummary {
627
- protocol_name?: string;
628
- protocol_id?: string;
629
- protocol_url?: string;
630
- protocol_logo?: string;
631
- /** USD value of all positions held inside this protocol */
632
- total_usd_value: number;
633
- /** USD value of unclaimed rewards / fees inside this protocol */
634
- total_unclaimed_usd_value: number;
635
- /** Number of distinct positions the wallet holds in this protocol */
636
- positions: number;
637
- /** Account-level health factor (Aave etc.), when applicable */
638
- account_health_factor?: number | null;
639
- }
640
- export interface WalletDefiSummaryResponse {
641
- active_protocols: number;
642
- total_positions: number;
643
- total_usd_value: number;
644
- total_unclaimed_usd_value: number;
645
- protocols: DefiProtocolSummary[];
646
- }
647
- /**
648
- * A single token line inside a DeFi position (supplied, borrowed, reward, …).
649
- * Mirrors Moralis's `defiPositionToken` shape.
650
- */
651
- export interface DefiPositionToken {
652
- token_type: string;
653
- name: string;
654
- symbol: string;
655
- contract_address: string;
656
- decimals: number;
657
- logo?: string;
658
- thumbnail?: string;
659
- balance: string;
660
- balance_formatted: string;
661
- usd_price?: number;
662
- usd_value?: number;
663
- }
664
- /**
665
- * Position-specific details block. Moralis returns a superset of optional
666
- * fields depending on the protocol (LP, lending, staking, perps, …). We keep
667
- * it permissive with index signature since the set is non-exhaustive.
668
- */
669
- export interface DefiPositionDetails {
670
- reserve0?: string;
671
- reserve1?: string;
672
- factory?: string;
673
- pair?: string;
674
- lp_amount?: string;
675
- lp_amount_formatted?: string;
676
- is_v4?: boolean;
677
- fee_tier?: number;
678
- liquidity?: string;
679
- nft_manager?: string;
680
- position_key?: string;
681
- position_id?: string;
682
- price_lower?: string;
683
- price_upper?: string;
684
- current_price?: string;
685
- price_label?: string;
686
- reserves?: string[];
687
- share_of_pool?: number;
688
- apy?: number;
689
- is_variable_debt?: boolean;
690
- is_stable_debt?: boolean;
691
- health_factor?: number;
692
- [key: string]: unknown;
693
- }
694
- export interface DefiPosition {
695
- label: string;
696
- tokens: DefiPositionToken[];
697
- address?: string;
698
- balance_usd: number;
699
- total_unclaimed_usd_value: number;
700
- position_details?: DefiPositionDetails;
701
- }
702
- /**
703
- * One row of the `GET /wallets/{address}/defi/positions` response: a position
704
- * enriched with its owning protocol's identity.
705
- */
706
- export interface WalletDefiPositionSummary {
707
- protocol_name: string;
708
- protocol_id: string;
709
- protocol_url: string;
710
- protocol_logo: string;
711
- position: DefiPosition;
712
- account_data?: {
713
- health_factor?: number;
714
- [key: string]: unknown;
715
- };
716
- }
717
- /** Raw item shape returned by the v1 /defi/positions endpoint */
718
- export interface WalletDefiPositionsV1Response {
719
- meta: {
720
- syncedAt?: Record<string, number | string>;
721
- unsupportedChains?: string[];
722
- failedChains?: string[];
723
- };
724
- result: Array<{
725
- chainId: string;
726
- protocolId: string;
727
- protocolName: string;
728
- protocolUrl?: string;
729
- protocolLogo?: string;
730
- position: {
731
- label: string;
732
- address?: string;
733
- balanceUsd?: number;
734
- unclaimedUsd?: number;
735
- tokens: Array<{
736
- tokenType: string;
737
- address: string;
738
- name?: string;
739
- symbol?: string;
740
- decimals?: number;
741
- logo?: string;
742
- balance?: string;
743
- balanceFormatted?: string;
744
- usdPrice?: number;
745
- usdValue?: number;
746
- }>;
747
- details?: {
748
- type?: string;
749
- isDebt?: boolean;
750
- lending?: {
751
- healthFactor?: number;
752
- };
753
- liquidity?: {
754
- poolAddress?: string;
755
- };
756
- [key: string]: unknown;
757
- };
758
- };
759
- }>;
760
- cursor?: string;
761
- }
762
- /**
763
- * Response from `GET /wallets/{address}/defi/{protocol}/positions` — all
764
- * positions the wallet holds inside a single protocol, with totals.
765
- */
766
- export interface WalletDefiProtocolPositionsResponse {
767
- protocol_name: string;
768
- protocol_id: string;
769
- protocol_url: string;
770
- protocol_logo: string;
771
- total_usd_value: number;
772
- total_unclaimed_usd_value: number | null;
773
- positions: DefiPosition[];
774
- account_data?: {
775
- health_factor?: number;
776
- [key: string]: unknown;
777
- };
778
- }
779
- /** Raw response from v1 GET /wallets/{address}/defi/{protocol}/positions */
780
- export interface WalletDefiProtocolPositionsV1Response {
781
- meta: {
782
- syncedAt?: Record<string, number | string>;
783
- unsupportedChains?: string[];
784
- failedChains?: string[];
785
- };
786
- cursor?: string;
787
- result: {
788
- protocolId: string;
789
- protocolName: string;
790
- chainId: string;
791
- totalUsd?: number;
792
- totalUnclaimedUsd?: number;
793
- protocolUrl?: string;
794
- protocolLogo?: string;
795
- positions: Array<{
796
- label: string;
797
- address?: string;
798
- balanceUsd?: number;
799
- unclaimedUsd?: number;
800
- tokens: Array<{
801
- tokenType: string;
802
- address: string;
803
- name?: string;
804
- symbol?: string;
805
- decimals?: number;
806
- logo?: string;
807
- balance?: string;
808
- balanceFormatted?: string;
809
- usdPrice?: number;
810
- usdValue?: number;
811
- }>;
812
- details?: {
813
- type?: string;
814
- isDebt?: boolean;
815
- lending?: {
816
- healthFactor?: number;
817
- };
818
- liquidity?: {
819
- poolAddress?: string;
820
- };
821
- [key: string]: unknown;
822
- };
823
- }>;
824
- };
825
- }
826
- /**
827
- * Multi-timeframe numeric breakdown returned by the trending-tokens endpoint.
828
- * Moralis exposes the same four buckets (1h / 4h / 12h / 24h) for every
829
- * activity metric (volume, transactions, buyers/sellers, price change, …).
830
- */
831
- export interface TrendingTokenTimeframeBuckets {
832
- '1h'?: number | null;
833
- '4h'?: number | null;
834
- '12h'?: number | null;
835
- '24h'?: number | null;
836
- }
837
- export interface TrendingToken {
838
- chainId: string;
839
- tokenAddress: string;
840
- name?: string | null;
841
- symbol?: string | null;
842
- uniqueName?: string | null;
843
- decimals?: number | null;
844
- logo?: string | null;
845
- usdPrice?: number | null;
846
- /** Unix timestamp (seconds) of the token's creation / first observation. */
847
- createdAt?: number | null;
848
- marketCap?: number | null;
849
- liquidityUsd?: number | null;
850
- holders?: number | null;
851
- pricePercentChange?: TrendingTokenTimeframeBuckets;
852
- totalVolume?: TrendingTokenTimeframeBuckets;
853
- transactions?: TrendingTokenTimeframeBuckets;
854
- buyTransactions?: TrendingTokenTimeframeBuckets;
855
- sellTransactions?: TrendingTokenTimeframeBuckets;
856
- buyers?: TrendingTokenTimeframeBuckets;
857
- sellers?: TrendingTokenTimeframeBuckets;
858
- }
859
- export type TopGainersTimeFrame = '1h' | '1d' | '1w' | '1M';
860
- /**
861
- * Multi-timeframe numeric breakdown returned by the top-gainers discovery
862
- * endpoint. Unlike trending tokens, the buckets are 1h / 1d / 1w / 1M.
863
- */
864
- export interface TopGainerTimeFrames {
865
- '1h'?: number | null;
866
- '1d'?: number | null;
867
- '1w'?: number | null;
868
- '1M'?: number | null;
869
- }
870
- export interface TopGainerToken {
871
- chain_id: string;
872
- token_address: string;
873
- token_name?: string | null;
874
- token_symbol?: string | null;
875
- token_logo?: string | null;
876
- price_usd?: number | null;
877
- token_age_in_days?: number | null;
878
- on_chain_strength_index?: number | null;
879
- /** Security rating from 0 (risky) to 100 (safe). */
880
- security_score?: number | null;
881
- market_cap?: number | null;
882
- fully_diluted_valuation?: number | null;
883
- twitter_followers?: number | null;
884
- holders_change?: TopGainerTimeFrames;
885
- liquidity_change_usd?: TopGainerTimeFrames;
886
- experienced_net_buyers_change?: TopGainerTimeFrames;
887
- volume_change_usd?: TopGainerTimeFrames;
888
- net_volume_change_usd?: TopGainerTimeFrames;
889
- price_percent_change_usd?: TopGainerTimeFrames;
890
- }
891
- /**
892
- * Buckets exposed by the token-analytics endpoint. Every activity metric
893
- * (volume, buyers, sellers, transactions, price change, …) is broken down
894
- * across 5min / 1h / 6h / 24h windows.
895
- */
896
- export interface TokenAnalyticsTimeframeBuckets {
897
- '5m'?: number | null;
898
- '1h'?: number | null;
899
- '6h'?: number | null;
900
- '24h'?: number | null;
901
- }
902
- export interface TokenAnalyticsResponse {
903
- chainId?: string;
904
- categoryId?: string | null;
905
- totalBuyVolume?: TokenAnalyticsTimeframeBuckets;
906
- totalSellVolume?: TokenAnalyticsTimeframeBuckets;
907
- totalBuyers?: TokenAnalyticsTimeframeBuckets;
908
- totalSellers?: TokenAnalyticsTimeframeBuckets;
909
- totalBuys?: TokenAnalyticsTimeframeBuckets;
910
- totalSells?: TokenAnalyticsTimeframeBuckets;
911
- uniqueWallets?: TokenAnalyticsTimeframeBuckets;
912
- pricePercentChange?: TokenAnalyticsTimeframeBuckets;
913
- /** Current USD price. Returned as a string by Moralis. */
914
- usdPrice?: string | number | null;
915
- /** Total paired-pool liquidity in USD. Returned as a string by Moralis. */
916
- totalLiquidity?: string | number | null;
917
- /** Fully-diluted valuation in USD. Returned as a string by Moralis. */
918
- totalFullyDilutedValuation?: string | number | null;
919
- }
920
- /**
921
- * Buckets exposed by the token-score endpoint for volume and transaction
922
- * counts. Covers 10m / 30m / 1h / 4h / 12h / 1d / 7d / 30d windows.
923
- */
924
- export interface TokenScoreTimeframeBuckets {
925
- '10m'?: number | null;
926
- '30m'?: number | null;
927
- '1h'?: number | null;
928
- '4h'?: number | null;
929
- '12h'?: number | null;
930
- '1d'?: number | null;
931
- '7d'?: number | null;
932
- '30d'?: number | null;
933
- }
934
- export interface TokenScoreSupply {
935
- /** Total supply as a raw number (decimals already applied upstream). */
936
- total?: number | null;
937
- /** Percent of total supply held by the top 10 holders (0–100). */
938
- top10Percent?: number | null;
939
- }
940
- export interface TokenScoreMetrics {
941
- usdPrice?: number | null;
942
- liquidityUsd?: number | null;
943
- volumeUsd?: TokenScoreTimeframeBuckets;
944
- transactions?: TokenScoreTimeframeBuckets;
945
- supply?: TokenScoreSupply;
946
- }
947
- export interface TokenScoreResponse {
948
- tokenAddress?: string;
949
- chainId?: string;
950
- /** Integer 0–100 composite score. Higher = safer / healthier. */
951
- score?: number | null;
952
- /** ISO-8601 timestamp of the score's last refresh. */
953
- updatedAt?: string | null;
954
- metrics?: TokenScoreMetrics;
955
- }
956
- export declare class MoralisService {
957
- private baseUrl;
958
- private v1BaseUrl;
959
- private pantograph;
960
- constructor(config?: MoralisServiceConfig);
961
- /**
962
- * Get token balances for a wallet.
963
- * Automatically enriches prices via Pantograph and filters dust.
964
- */
965
- getWalletTokenBalances(params: {
966
- address: string;
967
- chain?: string;
968
- tokenAddresses?: string[];
969
- excludeSpam?: boolean;
970
- excludeUnverifiedContracts?: boolean;
971
- }): Promise<MoralisApiResponse<{
972
- result: TokenBalance[];
973
- }>>;
974
- /**
975
- * Get metadata + price for a single token by contract address.
976
- */
977
- getTokenMetadata(params: {
978
- address: string;
979
- chain?: string;
980
- }): Promise<MoralisApiResponse<TokenMetadata>>;
981
- /**
982
- * Get NFTs owned by a wallet.
983
- */
984
- getWalletNFTs(params: {
985
- address: string;
986
- chain?: string;
987
- limit?: number;
988
- excludeSpam?: boolean;
989
- cursor?: string;
990
- tokenAddresses?: string[];
991
- includePrices?: boolean;
992
- format?: 'decimal' | 'hex';
993
- }): Promise<MoralisApiResponse<{
994
- result: NFTItem[];
995
- cursor?: string;
996
- page?: number;
997
- page_size?: number;
998
- }>>;
999
- /**
1000
- * Get the full metadata for a single NFT identified by its contract address
1001
- * and token id via the Moralis `GET /nft/{address}/{token_id}` endpoint.
1002
- *
1003
- * Returns normalized metadata (name, description, image, attributes),
1004
- * media variants, floor-price, rarity, collection socials and sync
1005
- * timestamps. Only supported on EVM chains.
1006
- *
1007
- * Moralis docs: https://docs.moralis.com/data-api/evm/nft/metadata/nft-metadata
1008
- */
1009
- getNftMetadata(params: {
1010
- address: string;
1011
- tokenId: string;
1012
- chain?: string;
1013
- format?: 'decimal' | 'hex';
1014
- normalizeMetadata?: boolean;
1015
- mediaItems?: boolean;
1016
- include?: 'last_token_uri_sync' | 'last_metadata_sync';
1017
- }): Promise<MoralisApiResponse<NFTMetadata>>;
1018
- /**
1019
- * Get metadata for an NFT contract (name, symbol, contract_type).
1020
- *
1021
- * For EVM addresses, queries the Moralis REST proxy directly.
1022
- * For non-EVM addresses, delegates to Cortex AI.
1023
- */
1024
- getNftContractMetadata(params: {
1025
- address: string;
1026
- chain?: string;
1027
- }): Promise<MoralisApiResponse<NFTContractMetadata>>;
1028
- /**
1029
- * Get a wallet's decoded on-chain transaction history via the Moralis
1030
- * `GET /wallets/{address}/history` endpoint.
1031
- *
1032
- * Moralis returns each transaction already categorised (send, token swap,
1033
- * nft purchase, airdrop, mint, contract interaction, …) with a human-readable
1034
- * summary and decoded native / ERC-20 / NFT transfer arrays attached.
1035
- *
1036
- * Pagination is supported via `cursor`. Pass the cursor from a previous
1037
- * response back in to fetch the next page.
1038
- *
1039
- * Non-EVM chains are not supported by this REST endpoint. Only EVM addresses are
1040
- * accepted.
1041
- */
1042
- getWalletHistory(params: {
1043
- address: string;
1044
- chain?: string;
1045
- limit?: number;
1046
- fromDate?: string;
1047
- toDate?: string;
1048
- fromBlock?: number;
1049
- toBlock?: number;
1050
- cursor?: string;
1051
- order?: 'ASC' | 'DESC';
1052
- includeInternalTransactions?: boolean;
1053
- nftMetadata?: boolean;
1054
- }): Promise<MoralisApiResponse<WalletHistoryResponse>>;
1055
- /**
1056
- * Get every ERC-20 transfer involving a wallet, optionally filtered by one
1057
- * or more token contract addresses.
1058
- *
1059
- * Use this to answer questions like:
1060
- * - "When did I last send USDC and to whom?"
1061
- * - "Who have I sent token 0x… to?"
1062
- * - "Who sent me USDC?"
1063
- * - "Show all USDT transfers for my wallet"
1064
- */
1065
- getWalletTokenTransfers(params: {
1066
- address: string;
1067
- chain?: string;
1068
- contractAddresses?: string[];
1069
- limit?: number;
1070
- fromDate?: string;
1071
- toDate?: string;
1072
- fromBlock?: number;
1073
- toBlock?: number;
1074
- cursor?: string;
1075
- order?: 'ASC' | 'DESC';
1076
- }): Promise<MoralisApiResponse<WalletTokenTransfersResponse>>;
1077
- /**
1078
- * Get every NFT transfer involving a wallet, optionally filtered by one
1079
- * or more NFT contract addresses.
1080
- *
1081
- * Use this to answer questions like:
1082
- * - "Which NFTs did I sell?"
1083
- * - "Who did I send my NFTs to?"
1084
- * - "Who sent me NFTs from collection 0x…?"
1085
- * - "Show all NFT transfers with last sale price"
1086
- */
1087
- getWalletNftTransfers(params: {
1088
- address: string;
1089
- chain?: string;
1090
- contractAddresses?: string[];
1091
- limit?: number;
1092
- fromDate?: string;
1093
- toDate?: string;
1094
- fromBlock?: number;
1095
- toBlock?: number;
1096
- cursor?: string;
1097
- order?: 'ASC' | 'DESC';
1098
- includePrices?: boolean;
1099
- format?: 'decimal' | 'hex';
1100
- }): Promise<MoralisApiResponse<WalletNftTransfersResponse>>;
1101
- /**
1102
- * Get the paginated list of holders for an ERC-20 token.
1103
- *
1104
- * URL: GET /api/moralis/proxy/erc20/{contractAddress}/holders
1105
- *
1106
- * Use to answer questions like:
1107
- * - "Who holds USDC?"
1108
- * - "Show top holders of 0x…"
1109
- * - "How many wallets hold this token?"
1110
- * - "What % does the biggest holder control?"
1111
- */
1112
- getTokenHolders(params: {
1113
- address: string;
1114
- chain?: string;
1115
- }): Promise<MoralisApiResponse<TokenHoldersResponse>>;
1116
- /**
1117
- * Get a wallet's total net worth in USD, broken down per chain.
1118
- *
1119
- * URL: GET /api/moralis/proxy/wallets/{address}/net-worth
1120
- *
1121
- * Use to answer questions like:
1122
- * - "What's my total wallet value?"
1123
- * - "How much is my portfolio worth on each chain?"
1124
- */
1125
- getWalletNetWorth(params: {
1126
- address: string;
1127
- chains?: string[];
1128
- excludeSpam?: boolean;
1129
- excludeUnverifiedContracts?: boolean;
1130
- maxTokenInactivity?: number;
1131
- minPairSideLiquidityUsd?: number;
1132
- }): Promise<MoralisApiResponse<WalletNetWorthResponse>>;
1133
- /**
1134
- * Get aggregate profit-and-loss summary for a wallet.
1135
- *
1136
- * URL: GET /api/moralis/proxy/wallets/{address}/profitability/summary
1137
- *
1138
- * Mainnet only. Moralis supports: Ethereum (0x1), Base (0x2105), Polygon (0x89).
1139
- */
1140
- getWalletPnlSummary(params: {
1141
- address: string;
1142
- chain?: string;
1143
- days?: WalletPnlDaysWindow;
1144
- }): Promise<MoralisApiResponse<WalletPnlSummaryResponse>>;
1145
- /**
1146
- * Get per-token profit-and-loss breakdown for a wallet.
1147
- *
1148
- * URL: GET /api/moralis/proxy/wallets/{address}/profitability
1149
- *
1150
- * Mainnet only. Moralis supports: Ethereum (0x1), Base (0x2105), Polygon (0x89).
1151
- * tokenAddresses supports up to 25 addresses.
1152
- */
1153
- getWalletPnl(params: {
1154
- address: string;
1155
- chain?: string;
1156
- days?: WalletPnlDaysWindow;
1157
- tokenAddresses?: string[];
1158
- }): Promise<MoralisApiResponse<WalletPnlResponse>>;
1159
- /**
1160
- * Get a decoded transaction by its hash.
1161
- *
1162
- * URL: GET /api/moralis/proxy/transaction/{transactionHash}?chain=…&decode=true
1163
- *
1164
- * Returns full transaction details including decoded function call and
1165
- * decoded event logs, along with address labels and entity names.
1166
- */
1167
- getTransactionByHash(params: {
1168
- transactionHash: string;
1169
- chain?: string;
1170
- }): Promise<MoralisApiResponse<TransactionByHashResponse>>;
1171
- /**
1172
- * List every active ERC-20 token approval granted by a wallet, paginated.
1173
- *
1174
- * URL: GET /api/moralis/proxy/wallets/{address}/approvals?chain=…&limit=…&cursor=…
1175
- *
1176
- * Moralis docs: https://docs.moralis.com/data-api/evm/wallet/approvals
1177
- *
1178
- * Mainnet EVM only. Each row includes the approved token (with current
1179
- * balance, USD price, `usd_at_risk`) and the spender (address, label,
1180
- * entity).
1181
- */
1182
- getWalletApprovals(params: {
1183
- address: string;
1184
- chain?: string;
1185
- limit?: number;
1186
- cursor?: string;
1187
- }): Promise<MoralisApiResponse<WalletApprovalsResponse>>;
1188
- /**
1189
- * Get a DeFi summary for a wallet: aggregate USD value, unclaimed rewards
1190
- * and a per-protocol breakdown of where the wallet has positions.
1191
- *
1192
- * URL: GET /api/moralis/proxy/wallets/{address}/defi/summary?chain=…
1193
- *
1194
- * Moralis docs: https://docs.moralis.com/data-api/evm/wallet/wallet-protocols
1195
- *
1196
- * Mainnet EVM only.
1197
- */
1198
- getWalletDefiSummary(params: {
1199
- address: string;
1200
- chain?: string;
1201
- }): Promise<MoralisApiResponse<WalletDefiSummaryResponse>>;
1202
- /**
1203
- * Get every DeFi position a wallet holds across all supported protocols,
1204
- * each enriched with the owning protocol's identity.
1205
- *
1206
- * URL: GET /api/moralis/proxy/wallets/{address}/defi/positions?chain=…
1207
- *
1208
- * Moralis docs: https://docs.moralis.com/data-api/evm/wallet/wallet-positions
1209
- */
1210
- getWalletDefiPositions(params: {
1211
- address: string;
1212
- chain?: string;
1213
- }): Promise<MoralisApiResponse<WalletDefiPositionSummary[]>>;
1214
- /**
1215
- * Get detailed positions a wallet holds inside a specific protocol
1216
- * (e.g. `uniswap-v3`, `aave-v3`, `lido`).
1217
- *
1218
- * URL: GET /api/moralis/proxy/wallets/{address}/defi/{protocol}/positions?chain=…
1219
- *
1220
- * Moralis docs: https://docs.moralis.com/data-api/evm/wallet/detailed-positions
1221
- */
1222
- getWalletDefiProtocolPositions(params: {
1223
- address: string;
1224
- protocol: string;
1225
- chain?: string;
1226
- }): Promise<MoralisApiResponse<WalletDefiProtocolPositionsResponse>>;
1227
- /** Search for tokens by symbol or name keyword on a specific chain. */
1228
- searchTokensByKey(params: {
1229
- key: string;
1230
- chain?: string;
1231
- }): Promise<MoralisApiResponse<TokenMetadata[]>>;
1232
- /**
1233
- * Detailed trading analytics for a single token: buy/sell volume, unique
1234
- * buyers/sellers, transaction counts, unique wallets, price change,
1235
- * current USD price, total liquidity and FDV — all broken down across
1236
- * 5min / 1h / 6h / 24h windows.
1237
- *
1238
- * URL: GET /api/moralis/proxy/tokens/{tokenAddress}/analytics
1239
- * Upstream: GET https://deep-index.moralis.io/api/v2.2/tokens/{tokenAddress}/analytics
1240
- *
1241
- * Use to answer questions like:
1242
- * - "How is PEPE trading today?"
1243
- * - "What's the 24h buy vs sell volume for USDC?"
1244
- * - "How many unique wallets interacted with this token in the last hour?"
1245
- * - "Is buying or selling pressure stronger for this token?"
1246
- */
1247
- getTokenAnalytics(params: {
1248
- address: string;
1249
- chain?: string;
1250
- }): Promise<MoralisApiResponse<TokenAnalyticsResponse>>;
1251
- /**
1252
- * Composite 0–100 health/safety score for a single token, plus the
1253
- * underlying metrics Moralis uses to compute it: current USD price, paired
1254
- * liquidity, multi-timeframe volume and transaction counts (10m / 30m /
1255
- * 1h / 4h / 12h / 1d / 7d / 30d), and supply concentration (total + % held
1256
- * by the top 10 wallets).
1257
- *
1258
- * URL: GET /api/moralis/proxy/tokens/{tokenAddress}/score
1259
- * Upstream: GET https://deep-index.moralis.io/api/v2.2/tokens/{tokenAddress}/score
1260
- *
1261
- * Use to answer questions like:
1262
- * - "Is PEPE a safe token?" (→ score)
1263
- * - "What's the health score of this token?"
1264
- * - "How concentrated is X's supply among top holders?" (→ metrics.supply.top10Percent)
1265
- * - "How much volume did this token do over the last 7 days?" (→ metrics.volumeUsd.7d)
1266
- */
1267
- getTokenScore(params: {
1268
- address: string;
1269
- chain?: string;
1270
- }): Promise<MoralisApiResponse<TokenScoreResponse>>;
1271
- /**
1272
- * List tokens trending on-chain based on trading activity, volume, liquidity
1273
- * and holder growth. Moralis returns cross-chain results by default; pass a
1274
- * `chain` to scope to a single network.
1275
- *
1276
- * URL: GET /api/moralis/proxy/tokens/trending
1277
- * Upstream: GET https://deep-index.moralis.io/api/v2.2/tokens/trending
1278
- *
1279
- * Use to answer questions like:
1280
- * - "What tokens are trending right now?"
1281
- * - "Show me the hottest tokens on Base"
1282
- * - "Which tokens have the most trading activity today?"
1283
- */
1284
- getTrendingTokens(params?: {
1285
- chain?: string;
1286
- limit?: number;
1287
- }): Promise<MoralisApiResponse<TrendingToken[]>>;
1288
- /**
1289
- * List tokens with the highest USD price increase over a given timeframe.
1290
- * Supports optional filters for minimum market cap and security score.
1291
- *
1292
- * URL: GET /api/moralis/proxy/discovery/tokens/top-gainers
1293
- * Upstream: GET https://deep-index.moralis.io/api/v2.2/discovery/tokens/top-gainers
1294
- *
1295
- * Use to answer questions like:
1296
- * - "What are today's top gainers?"
1297
- * - "Which tokens pumped the most this week on Arbitrum?"
1298
- * - "Show me safe tokens (security score ≥ 80) that gained in the last hour"
1299
- */
1300
- getTopGainers(params?: {
1301
- chain?: string;
1302
- timeFrame?: TopGainersTimeFrame;
1303
- minMarketCap?: number;
1304
- securityScore?: number;
1305
- }): Promise<MoralisApiResponse<TopGainerToken[]>>;
1306
- /**
1307
- * List tokens with the largest USD price decrease over a given timeframe.
1308
- * Same filter set as top-gainers (min market cap, security score) and
1309
- * identical response shape — only the ranking direction differs.
1310
- *
1311
- * URL: GET /api/moralis/proxy/discovery/tokens/top-losers
1312
- * Upstream: GET https://deep-index.moralis.io/api/v2.2/discovery/tokens/top-losers
1313
- *
1314
- * Use to answer questions like:
1315
- * - "What are today's biggest losers?"
1316
- * - "Which tokens dumped the most this week on BSC?"
1317
- * - "Worst performers in the last 24h with market cap over $50M"
1318
- */
1319
- getTopLosers(params?: {
1320
- chain?: string;
1321
- timeFrame?: TopGainersTimeFrame;
1322
- minMarketCap?: number;
1323
- securityScore?: number;
1324
- }): Promise<MoralisApiResponse<TopGainerToken[]>>;
1325
- /** Enrich token balances with price/logo data. Delegates to PantographService. */
1326
- private enrichTokenPrices;
1327
- }
1328
- //# sourceMappingURL=MoralisService.d.ts.map