keyring-agent-core 0.1.0

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