@gala-chain/launchpad-mcp-server 5.0.3 → 5.0.4-beta.1

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 (522) hide show
  1. package/README.md +49 -21
  2. package/dist/ai-docs.json +7357 -0
  3. package/dist/constants/mcpToolNames.d.ts +3 -1
  4. package/dist/constants/mcpToolNames.d.ts.map +1 -1
  5. package/dist/constants/mcpToolNames.js +2 -1
  6. package/dist/constants/mcpToolNames.js.map +1 -1
  7. package/dist/explain-sdk-usage-ai.json +3445 -0
  8. package/dist/generated/version.d.ts +1 -1
  9. package/dist/generated/version.d.ts.map +1 -1
  10. package/dist/generated/version.js +1 -1
  11. package/dist/generated/version.js.map +1 -1
  12. package/dist/prompts/account.d.ts +24 -0
  13. package/dist/prompts/account.d.ts.map +1 -0
  14. package/dist/prompts/account.js +89 -0
  15. package/dist/prompts/account.js.map +1 -0
  16. package/dist/prompts/api-keys.d.ts +36 -0
  17. package/dist/prompts/api-keys.d.ts.map +1 -0
  18. package/dist/prompts/api-keys.js +251 -0
  19. package/dist/prompts/api-keys.js.map +1 -0
  20. package/dist/prompts/auth.d.ts +29 -0
  21. package/dist/prompts/auth.d.ts.map +1 -0
  22. package/dist/prompts/auth.js +127 -0
  23. package/dist/prompts/auth.js.map +1 -0
  24. package/dist/prompts/balances.d.ts.map +1 -1
  25. package/dist/prompts/balances.js +17 -17
  26. package/dist/prompts/balances.js.map +1 -1
  27. package/dist/prompts/bans.d.ts +23 -0
  28. package/dist/prompts/bans.d.ts.map +1 -0
  29. package/dist/prompts/bans.js +82 -0
  30. package/dist/prompts/bans.js.map +1 -0
  31. package/dist/prompts/bridge.d.ts +2 -1
  32. package/dist/prompts/bridge.d.ts.map +1 -1
  33. package/dist/prompts/bridge.js +91 -227
  34. package/dist/prompts/bridge.js.map +1 -1
  35. package/dist/prompts/burns.d.ts +30 -0
  36. package/dist/prompts/burns.d.ts.map +1 -0
  37. package/dist/prompts/burns.js +127 -0
  38. package/dist/prompts/burns.js.map +1 -0
  39. package/dist/prompts/chat-messages.d.ts +21 -0
  40. package/dist/prompts/chat-messages.d.ts.map +1 -0
  41. package/dist/prompts/chat-messages.js +103 -0
  42. package/dist/prompts/chat-messages.js.map +1 -0
  43. package/dist/prompts/chat.d.ts +67 -0
  44. package/dist/prompts/chat.d.ts.map +1 -0
  45. package/dist/prompts/chat.js +355 -0
  46. package/dist/prompts/chat.js.map +1 -0
  47. package/dist/prompts/comments.d.ts +29 -0
  48. package/dist/prompts/comments.d.ts.map +1 -0
  49. package/dist/prompts/comments.js +133 -0
  50. package/dist/prompts/comments.js.map +1 -0
  51. package/dist/prompts/content-flags.d.ts +29 -0
  52. package/dist/prompts/content-flags.d.ts.map +1 -0
  53. package/dist/prompts/content-flags.js +248 -0
  54. package/dist/prompts/content-flags.js.map +1 -0
  55. package/dist/prompts/content-reactions.d.ts +29 -0
  56. package/dist/prompts/content-reactions.d.ts.map +1 -0
  57. package/dist/prompts/content-reactions.js +77 -0
  58. package/dist/prompts/content-reactions.js.map +1 -0
  59. package/dist/prompts/create-token.d.ts.map +1 -1
  60. package/dist/prompts/create-token.js +11 -18
  61. package/dist/prompts/create-token.js.map +1 -1
  62. package/dist/prompts/dex-trading.d.ts.map +1 -1
  63. package/dist/prompts/dex-trading.js +11 -42
  64. package/dist/prompts/dex-trading.js.map +1 -1
  65. package/dist/prompts/discover-tokens.d.ts.map +1 -1
  66. package/dist/prompts/discover-tokens.js +11 -26
  67. package/dist/prompts/discover-tokens.js.map +1 -1
  68. package/dist/prompts/event-subscriptions.d.ts +45 -0
  69. package/dist/prompts/event-subscriptions.d.ts.map +1 -0
  70. package/dist/prompts/event-subscriptions.js +330 -0
  71. package/dist/prompts/event-subscriptions.js.map +1 -0
  72. package/dist/prompts/explore-dex-pools.d.ts +2 -0
  73. package/dist/prompts/explore-dex-pools.d.ts.map +1 -1
  74. package/dist/prompts/explore-dex-pools.js +26 -104
  75. package/dist/prompts/explore-dex-pools.js.map +1 -1
  76. package/dist/prompts/factories/balance-prompt-factory.d.ts +102 -0
  77. package/dist/prompts/factories/balance-prompt-factory.d.ts.map +1 -0
  78. package/dist/prompts/factories/balance-prompt-factory.js +176 -0
  79. package/dist/prompts/factories/balance-prompt-factory.js.map +1 -0
  80. package/dist/prompts/factories/ban-management-factory.d.ts +90 -0
  81. package/dist/prompts/factories/ban-management-factory.d.ts.map +1 -0
  82. package/dist/prompts/factories/ban-management-factory.js +330 -0
  83. package/dist/prompts/factories/ban-management-factory.js.map +1 -0
  84. package/dist/prompts/factories/calculation-prompt-factory.d.ts +119 -0
  85. package/dist/prompts/factories/calculation-prompt-factory.d.ts.map +1 -0
  86. package/dist/prompts/factories/calculation-prompt-factory.js +183 -0
  87. package/dist/prompts/factories/calculation-prompt-factory.js.map +1 -0
  88. package/dist/prompts/factories/discovery-prompt-factory.d.ts +135 -0
  89. package/dist/prompts/factories/discovery-prompt-factory.d.ts.map +1 -0
  90. package/dist/prompts/factories/discovery-prompt-factory.js +240 -0
  91. package/dist/prompts/factories/discovery-prompt-factory.js.map +1 -0
  92. package/dist/prompts/factories/event-subscription-factory.d.ts +177 -0
  93. package/dist/prompts/factories/event-subscription-factory.d.ts.map +1 -0
  94. package/dist/prompts/factories/event-subscription-factory.js +329 -0
  95. package/dist/prompts/factories/event-subscription-factory.js.map +1 -0
  96. package/dist/prompts/factories/filtered-list-prompt-factory.d.ts +95 -0
  97. package/dist/prompts/factories/filtered-list-prompt-factory.d.ts.map +1 -0
  98. package/dist/prompts/factories/filtered-list-prompt-factory.js +147 -0
  99. package/dist/prompts/factories/filtered-list-prompt-factory.js.map +1 -0
  100. package/dist/prompts/factories/index.d.ts +33 -0
  101. package/dist/prompts/factories/index.d.ts.map +1 -0
  102. package/dist/prompts/factories/index.js +91 -0
  103. package/dist/prompts/factories/index.js.map +1 -0
  104. package/dist/prompts/factories/invite-management-factory.d.ts +88 -0
  105. package/dist/prompts/factories/invite-management-factory.d.ts.map +1 -0
  106. package/dist/prompts/factories/invite-management-factory.js +262 -0
  107. package/dist/prompts/factories/invite-management-factory.js.map +1 -0
  108. package/dist/prompts/factories/reaction-prompt-factory.d.ts +81 -0
  109. package/dist/prompts/factories/reaction-prompt-factory.d.ts.map +1 -0
  110. package/dist/prompts/factories/reaction-prompt-factory.js +188 -0
  111. package/dist/prompts/factories/reaction-prompt-factory.js.map +1 -0
  112. package/dist/prompts/factories/simple-operation-factory.d.ts +166 -0
  113. package/dist/prompts/factories/simple-operation-factory.d.ts.map +1 -0
  114. package/dist/prompts/factories/simple-operation-factory.js +218 -0
  115. package/dist/prompts/factories/simple-operation-factory.js.map +1 -0
  116. package/dist/prompts/index.d.ts +31 -6
  117. package/dist/prompts/index.d.ts.map +1 -1
  118. package/dist/prompts/index.js +136 -5
  119. package/dist/prompts/index.js.map +1 -1
  120. package/dist/prompts/locks.d.ts.map +1 -1
  121. package/dist/prompts/locks.js +32 -56
  122. package/dist/prompts/locks.js.map +1 -1
  123. package/dist/prompts/moderators.d.ts +22 -0
  124. package/dist/prompts/moderators.d.ts.map +1 -0
  125. package/dist/prompts/moderators.js +62 -0
  126. package/dist/prompts/moderators.js.map +1 -0
  127. package/dist/prompts/monitoring.d.ts +3 -1
  128. package/dist/prompts/monitoring.d.ts.map +1 -1
  129. package/dist/prompts/monitoring.js +52 -140
  130. package/dist/prompts/monitoring.js.map +1 -1
  131. package/dist/prompts/overseers.d.ts +34 -0
  132. package/dist/prompts/overseers.d.ts.map +1 -0
  133. package/dist/prompts/overseers.js +117 -0
  134. package/dist/prompts/overseers.js.map +1 -0
  135. package/dist/prompts/pools.d.ts +22 -20
  136. package/dist/prompts/pools.d.ts.map +1 -1
  137. package/dist/prompts/pools.js +150 -251
  138. package/dist/prompts/pools.js.map +1 -1
  139. package/dist/prompts/portfolio.d.ts.map +1 -1
  140. package/dist/prompts/portfolio.js +1 -9
  141. package/dist/prompts/portfolio.js.map +1 -1
  142. package/dist/prompts/prompt-factories.d.ts +179 -0
  143. package/dist/prompts/prompt-factories.d.ts.map +1 -0
  144. package/dist/prompts/prompt-factories.js +230 -0
  145. package/dist/prompts/prompt-factories.js.map +1 -0
  146. package/dist/prompts/referrals.d.ts +27 -0
  147. package/dist/prompts/referrals.d.ts.map +1 -0
  148. package/dist/prompts/referrals.js +176 -0
  149. package/dist/prompts/referrals.js.map +1 -0
  150. package/dist/prompts/streaming.d.ts +84 -0
  151. package/dist/prompts/streaming.d.ts.map +1 -0
  152. package/dist/prompts/streaming.js +411 -0
  153. package/dist/prompts/streaming.js.map +1 -0
  154. package/dist/prompts/tier1-bridge-operations.d.ts +30 -0
  155. package/dist/prompts/tier1-bridge-operations.d.ts.map +1 -0
  156. package/dist/prompts/tier1-bridge-operations.js +634 -0
  157. package/dist/prompts/tier1-bridge-operations.js.map +1 -0
  158. package/dist/prompts/tier1-liquidity-management.d.ts +30 -0
  159. package/dist/prompts/tier1-liquidity-management.d.ts.map +1 -0
  160. package/dist/prompts/tier1-liquidity-management.js +560 -0
  161. package/dist/prompts/tier1-liquidity-management.js.map +1 -0
  162. package/dist/prompts/tier1-pool-discovery.d.ts +30 -0
  163. package/dist/prompts/tier1-pool-discovery.d.ts.map +1 -0
  164. package/dist/prompts/tier1-pool-discovery.js +221 -0
  165. package/dist/prompts/tier1-pool-discovery.js.map +1 -0
  166. package/dist/prompts/tier1-price-history.d.ts +30 -0
  167. package/dist/prompts/tier1-price-history.d.ts.map +1 -0
  168. package/dist/prompts/tier1-price-history.js +429 -0
  169. package/dist/prompts/tier1-price-history.js.map +1 -0
  170. package/dist/prompts/tier1-token-analysis.d.ts +30 -0
  171. package/dist/prompts/tier1-token-analysis.d.ts.map +1 -0
  172. package/dist/prompts/tier1-token-analysis.js +376 -0
  173. package/dist/prompts/tier1-token-analysis.js.map +1 -0
  174. package/dist/prompts/tier2-account-setup.d.ts +24 -0
  175. package/dist/prompts/tier2-account-setup.d.ts.map +1 -0
  176. package/dist/prompts/tier2-account-setup.js +206 -0
  177. package/dist/prompts/tier2-account-setup.js.map +1 -0
  178. package/dist/prompts/tier2-advanced-liquidity.d.ts +24 -0
  179. package/dist/prompts/tier2-advanced-liquidity.d.ts.map +1 -0
  180. package/dist/prompts/tier2-advanced-liquidity.js +298 -0
  181. package/dist/prompts/tier2-advanced-liquidity.js.map +1 -0
  182. package/dist/prompts/tier2-asset-management.d.ts +25 -0
  183. package/dist/prompts/tier2-asset-management.d.ts.map +1 -0
  184. package/dist/prompts/tier2-asset-management.js +246 -0
  185. package/dist/prompts/tier2-asset-management.js.map +1 -0
  186. package/dist/prompts/tier2-token-lifecycle.d.ts +25 -0
  187. package/dist/prompts/tier2-token-lifecycle.d.ts.map +1 -0
  188. package/dist/prompts/tier2-token-lifecycle.js +241 -0
  189. package/dist/prompts/tier2-token-lifecycle.js.map +1 -0
  190. package/dist/prompts/tier3-community-engagement.d.ts +26 -0
  191. package/dist/prompts/tier3-community-engagement.d.ts.map +1 -0
  192. package/dist/prompts/tier3-community-engagement.js +610 -0
  193. package/dist/prompts/tier3-community-engagement.js.map +1 -0
  194. package/dist/prompts/tier3-moderation-workflows.d.ts +31 -0
  195. package/dist/prompts/tier3-moderation-workflows.d.ts.map +1 -0
  196. package/dist/prompts/tier3-moderation-workflows.js +511 -0
  197. package/dist/prompts/tier3-moderation-workflows.js.map +1 -0
  198. package/dist/prompts/tier3-streaming-management.d.ts +26 -0
  199. package/dist/prompts/tier3-streaming-management.d.ts.map +1 -0
  200. package/dist/prompts/tier3-streaming-management.js +797 -0
  201. package/dist/prompts/tier3-streaming-management.js.map +1 -0
  202. package/dist/prompts/token-bans.d.ts +27 -0
  203. package/dist/prompts/token-bans.d.ts.map +1 -0
  204. package/dist/prompts/token-bans.js +77 -0
  205. package/dist/prompts/token-bans.js.map +1 -0
  206. package/dist/prompts/trades.d.ts +22 -0
  207. package/dist/prompts/trades.d.ts.map +1 -0
  208. package/dist/prompts/trades.js +107 -0
  209. package/dist/prompts/trades.js.map +1 -0
  210. package/dist/prompts/trading-calculations.d.ts +3 -1
  211. package/dist/prompts/trading-calculations.d.ts.map +1 -1
  212. package/dist/prompts/trading-calculations.js +134 -270
  213. package/dist/prompts/trading-calculations.js.map +1 -1
  214. package/dist/prompts/trading.d.ts +10 -1
  215. package/dist/prompts/trading.d.ts.map +1 -1
  216. package/dist/prompts/trading.js +128 -2
  217. package/dist/prompts/trading.js.map +1 -1
  218. package/dist/prompts/transfers.d.ts +2 -1
  219. package/dist/prompts/transfers.d.ts.map +1 -1
  220. package/dist/prompts/transfers.js +26 -30
  221. package/dist/prompts/transfers.js.map +1 -1
  222. package/dist/prompts/uploads.d.ts +19 -0
  223. package/dist/prompts/uploads.d.ts.map +1 -0
  224. package/dist/prompts/uploads.js +114 -0
  225. package/dist/prompts/uploads.js.map +1 -0
  226. package/dist/prompts/utility-tools.d.ts.map +1 -1
  227. package/dist/prompts/utility-tools.js +27 -18
  228. package/dist/prompts/utility-tools.js.map +1 -1
  229. package/dist/prompts/utils/index.d.ts +21 -0
  230. package/dist/prompts/utils/index.d.ts.map +1 -0
  231. package/dist/prompts/utils/index.js +38 -0
  232. package/dist/prompts/utils/index.js.map +1 -0
  233. package/dist/prompts/utils/pagination-helpers.d.ts +95 -0
  234. package/dist/prompts/utils/pagination-helpers.d.ts.map +1 -0
  235. package/dist/prompts/utils/pagination-helpers.js +121 -0
  236. package/dist/prompts/utils/pagination-helpers.js.map +1 -0
  237. package/dist/prompts/utils/workflowTemplates.d.ts.map +1 -1
  238. package/dist/prompts/utils/workflowTemplates.js +4 -3
  239. package/dist/prompts/utils/workflowTemplates.js.map +1 -1
  240. package/dist/prompts/wallet.d.ts +24 -0
  241. package/dist/prompts/wallet.d.ts.map +1 -0
  242. package/dist/prompts/wallet.js +139 -0
  243. package/dist/prompts/wallet.js.map +1 -0
  244. package/dist/schemas/common-schemas.d.ts +890 -0
  245. package/dist/schemas/common-schemas.d.ts.map +1 -1
  246. package/dist/schemas/common-schemas.js +853 -1
  247. package/dist/schemas/common-schemas.js.map +1 -1
  248. package/dist/server.d.ts +31 -3
  249. package/dist/server.d.ts.map +1 -1
  250. package/dist/server.js +68 -7
  251. package/dist/server.js.map +1 -1
  252. package/dist/tools/api-keys/index.d.ts +41 -0
  253. package/dist/tools/api-keys/index.d.ts.map +1 -0
  254. package/dist/tools/api-keys/index.js +245 -0
  255. package/dist/tools/api-keys/index.js.map +1 -0
  256. package/dist/tools/auth/index.d.ts +19 -0
  257. package/dist/tools/auth/index.d.ts.map +1 -0
  258. package/dist/tools/auth/index.js +138 -0
  259. package/dist/tools/auth/index.js.map +1 -0
  260. package/dist/tools/balance/helpers/format-balance.d.ts +86 -0
  261. package/dist/tools/balance/helpers/format-balance.d.ts.map +1 -0
  262. package/dist/tools/balance/helpers/format-balance.js +87 -0
  263. package/dist/tools/balance/helpers/format-balance.js.map +1 -0
  264. package/dist/tools/balance/index.d.ts +4 -4
  265. package/dist/tools/balance/index.d.ts.map +1 -1
  266. package/dist/tools/balance/index.js +64 -176
  267. package/dist/tools/balance/index.js.map +1 -1
  268. package/dist/tools/ban/index.d.ts +37 -0
  269. package/dist/tools/ban/index.d.ts.map +1 -0
  270. package/dist/tools/ban/index.js +206 -0
  271. package/dist/tools/ban/index.js.map +1 -0
  272. package/dist/tools/bridge/helpers/bridgeable-token-tools.d.ts +87 -0
  273. package/dist/tools/bridge/helpers/bridgeable-token-tools.d.ts.map +1 -0
  274. package/dist/tools/bridge/helpers/bridgeable-token-tools.js +130 -0
  275. package/dist/tools/bridge/helpers/bridgeable-token-tools.js.map +1 -0
  276. package/dist/tools/bridge/helpers/external-chain-balance-tools.d.ts +87 -0
  277. package/dist/tools/bridge/helpers/external-chain-balance-tools.d.ts.map +1 -0
  278. package/dist/tools/bridge/helpers/external-chain-balance-tools.js +167 -0
  279. package/dist/tools/bridge/helpers/external-chain-balance-tools.js.map +1 -0
  280. package/dist/tools/bridge/index.d.ts +3 -7
  281. package/dist/tools/bridge/index.d.ts.map +1 -1
  282. package/dist/tools/bridge/index.js +89 -371
  283. package/dist/tools/bridge/index.js.map +1 -1
  284. package/dist/tools/burns/index.d.ts.map +1 -1
  285. package/dist/tools/burns/index.js +8 -36
  286. package/dist/tools/burns/index.js.map +1 -1
  287. package/dist/tools/chat/getPinnedChatMessage.d.ts +15 -0
  288. package/dist/tools/chat/getPinnedChatMessage.d.ts.map +1 -0
  289. package/dist/tools/chat/getPinnedChatMessage.js +37 -0
  290. package/dist/tools/chat/getPinnedChatMessage.js.map +1 -0
  291. package/dist/tools/chat/index.d.ts +73 -0
  292. package/dist/tools/chat/index.d.ts.map +1 -0
  293. package/dist/tools/chat/index.js +359 -0
  294. package/dist/tools/chat/index.js.map +1 -0
  295. package/dist/tools/chat/pinChatMessage.d.ts +16 -0
  296. package/dist/tools/chat/pinChatMessage.d.ts.map +1 -0
  297. package/dist/tools/chat/pinChatMessage.js +51 -0
  298. package/dist/tools/chat/pinChatMessage.js.map +1 -0
  299. package/dist/tools/chat/unpinChatMessage.d.ts +16 -0
  300. package/dist/tools/chat/unpinChatMessage.d.ts.map +1 -0
  301. package/dist/tools/chat/unpinChatMessage.js +39 -0
  302. package/dist/tools/chat/unpinChatMessage.js.map +1 -0
  303. package/dist/tools/chat-messages/index.d.ts +35 -0
  304. package/dist/tools/chat-messages/index.d.ts.map +1 -0
  305. package/dist/tools/chat-messages/index.js +165 -0
  306. package/dist/tools/chat-messages/index.js.map +1 -0
  307. package/dist/tools/comments/index.d.ts +44 -0
  308. package/dist/tools/comments/index.d.ts.map +1 -0
  309. package/dist/tools/comments/index.js +171 -0
  310. package/dist/tools/comments/index.js.map +1 -0
  311. package/dist/tools/content-flags/index.d.ts +38 -0
  312. package/dist/tools/content-flags/index.d.ts.map +1 -0
  313. package/dist/tools/content-flags/index.js +282 -0
  314. package/dist/tools/content-flags/index.js.map +1 -0
  315. package/dist/tools/content-reactions/index.d.ts +43 -0
  316. package/dist/tools/content-reactions/index.d.ts.map +1 -0
  317. package/dist/tools/content-reactions/index.js +135 -0
  318. package/dist/tools/content-reactions/index.js.map +1 -0
  319. package/dist/tools/creation/index.d.ts.map +1 -1
  320. package/dist/tools/creation/index.js +2 -5
  321. package/dist/tools/creation/index.js.map +1 -1
  322. package/dist/tools/dex/fetchAllDexPools.d.ts.map +1 -1
  323. package/dist/tools/dex/fetchAllDexPools.js +5 -21
  324. package/dist/tools/dex/fetchAllDexPools.js.map +1 -1
  325. package/dist/tools/dex/fetchDexPools.d.ts.map +1 -1
  326. package/dist/tools/dex/fetchDexPools.js +11 -28
  327. package/dist/tools/dex/fetchDexPools.js.map +1 -1
  328. package/dist/tools/dex/helpers.d.ts +479 -0
  329. package/dist/tools/dex/helpers.d.ts.map +1 -0
  330. package/dist/tools/dex/helpers.js +570 -0
  331. package/dist/tools/dex/helpers.js.map +1 -0
  332. package/dist/tools/dex/index.d.ts +50 -11
  333. package/dist/tools/dex/index.d.ts.map +1 -1
  334. package/dist/tools/dex/index.js +124 -486
  335. package/dist/tools/dex/index.js.map +1 -1
  336. package/dist/tools/dex/leaderboard.d.ts.map +1 -1
  337. package/dist/tools/dex/leaderboard.js +5 -70
  338. package/dist/tools/dex/leaderboard.js.map +1 -1
  339. package/dist/tools/dex/liquidity-positions.d.ts.map +1 -1
  340. package/dist/tools/dex/liquidity-positions.js +20 -91
  341. package/dist/tools/dex/liquidity-positions.js.map +1 -1
  342. package/dist/tools/dex/volume.d.ts.map +1 -1
  343. package/dist/tools/dex/volume.js +6 -21
  344. package/dist/tools/dex/volume.js.map +1 -1
  345. package/dist/tools/dex-analytics/index.d.ts +48 -0
  346. package/dist/tools/dex-analytics/index.d.ts.map +1 -0
  347. package/dist/tools/dex-analytics/index.js +111 -0
  348. package/dist/tools/dex-analytics/index.js.map +1 -0
  349. package/dist/tools/dex-liquidity/index.d.ts +22 -0
  350. package/dist/tools/dex-liquidity/index.d.ts.map +1 -0
  351. package/dist/tools/dex-liquidity/index.js +384 -0
  352. package/dist/tools/dex-liquidity/index.js.map +1 -0
  353. package/dist/tools/dex-pools/index.d.ts +60 -0
  354. package/dist/tools/dex-pools/index.d.ts.map +1 -0
  355. package/dist/tools/dex-pools/index.js +231 -0
  356. package/dist/tools/dex-pools/index.js.map +1 -0
  357. package/dist/tools/handler-factories.d.ts +1401 -0
  358. package/dist/tools/handler-factories.d.ts.map +1 -0
  359. package/dist/tools/handler-factories.js +1680 -0
  360. package/dist/tools/handler-factories.js.map +1 -0
  361. package/dist/tools/index.d.ts +1 -11
  362. package/dist/tools/index.d.ts.map +1 -1
  363. package/dist/tools/index.js +171 -27
  364. package/dist/tools/index.js.map +1 -1
  365. package/dist/tools/locks/index.d.ts +2 -0
  366. package/dist/tools/locks/index.d.ts.map +1 -1
  367. package/dist/tools/locks/index.js +9 -86
  368. package/dist/tools/locks/index.js.map +1 -1
  369. package/dist/tools/moderators/index.d.ts +53 -0
  370. package/dist/tools/moderators/index.d.ts.map +1 -0
  371. package/dist/tools/moderators/index.js +258 -0
  372. package/dist/tools/moderators/index.js.map +1 -0
  373. package/dist/tools/overseers/getOverseerUserSummary.d.ts +15 -0
  374. package/dist/tools/overseers/getOverseerUserSummary.d.ts.map +1 -0
  375. package/dist/tools/overseers/getOverseerUserSummary.js +40 -0
  376. package/dist/tools/overseers/getOverseerUserSummary.js.map +1 -0
  377. package/dist/tools/overseers/index.d.ts +58 -0
  378. package/dist/tools/overseers/index.d.ts.map +1 -0
  379. package/dist/tools/overseers/index.js +325 -0
  380. package/dist/tools/overseers/index.js.map +1 -0
  381. package/dist/tools/overseers/listOverseerUsers.d.ts +15 -0
  382. package/dist/tools/overseers/listOverseerUsers.d.ts.map +1 -0
  383. package/dist/tools/overseers/listOverseerUsers.js +76 -0
  384. package/dist/tools/overseers/listOverseerUsers.js.map +1 -0
  385. package/dist/tools/pagination-handler-factory.d.ts +131 -0
  386. package/dist/tools/pagination-handler-factory.d.ts.map +1 -0
  387. package/dist/tools/pagination-handler-factory.js +159 -0
  388. package/dist/tools/pagination-handler-factory.js.map +1 -0
  389. package/dist/tools/pools/checkPoolExists.d.ts +16 -0
  390. package/dist/tools/pools/checkPoolExists.d.ts.map +1 -0
  391. package/dist/tools/pools/checkPoolExists.js +48 -0
  392. package/dist/tools/pools/checkPoolExists.js.map +1 -0
  393. package/dist/tools/pools/fetchAllPools.d.ts.map +1 -1
  394. package/dist/tools/pools/fetchAllPools.js +51 -11
  395. package/dist/tools/pools/fetchAllPools.js.map +1 -1
  396. package/dist/tools/pools/fetchAllPriceHistory.d.ts.map +1 -1
  397. package/dist/tools/pools/fetchAllPriceHistory.js +11 -51
  398. package/dist/tools/pools/fetchAllPriceHistory.js.map +1 -1
  399. package/dist/tools/pools/fetchPoolDetails.d.ts.map +1 -1
  400. package/dist/tools/pools/fetchPoolDetails.js +4 -11
  401. package/dist/tools/pools/fetchPoolDetails.js.map +1 -1
  402. package/dist/tools/pools/fetchPools.d.ts.map +1 -1
  403. package/dist/tools/pools/fetchPools.js +40 -20
  404. package/dist/tools/pools/fetchPools.js.map +1 -1
  405. package/dist/tools/pools/fetchPriceHistory.d.ts.map +1 -1
  406. package/dist/tools/pools/fetchPriceHistory.js +10 -51
  407. package/dist/tools/pools/fetchPriceHistory.js.map +1 -1
  408. package/dist/tools/pools/fetchTokenDetails.d.ts.map +1 -1
  409. package/dist/tools/pools/fetchTokenDetails.js +4 -35
  410. package/dist/tools/pools/fetchTokenDetails.js.map +1 -1
  411. package/dist/tools/pools/index.d.ts +2 -0
  412. package/dist/tools/pools/index.d.ts.map +1 -1
  413. package/dist/tools/pools/index.js +103 -35
  414. package/dist/tools/pools/index.js.map +1 -1
  415. package/dist/tools/pools/onDexPoolCreation.d.ts +1 -2
  416. package/dist/tools/pools/onDexPoolCreation.d.ts.map +1 -1
  417. package/dist/tools/pools/onDexPoolCreation.js +14 -48
  418. package/dist/tools/pools/onDexPoolCreation.js.map +1 -1
  419. package/dist/tools/pools/onLaunchpadTokenCreation.d.ts +1 -2
  420. package/dist/tools/pools/onLaunchpadTokenCreation.d.ts.map +1 -1
  421. package/dist/tools/pools/onLaunchpadTokenCreation.js +9 -42
  422. package/dist/tools/pools/onLaunchpadTokenCreation.js.map +1 -1
  423. package/dist/tools/pools/priceHistoryFactory.d.ts +44 -0
  424. package/dist/tools/pools/priceHistoryFactory.d.ts.map +1 -0
  425. package/dist/tools/pools/priceHistoryFactory.js +154 -0
  426. package/dist/tools/pools/priceHistoryFactory.js.map +1 -0
  427. package/dist/tools/pools/updateTokenSocials.d.ts +16 -0
  428. package/dist/tools/pools/updateTokenSocials.d.ts.map +1 -0
  429. package/dist/tools/pools/updateTokenSocials.js +84 -0
  430. package/dist/tools/pools/updateTokenSocials.js.map +1 -0
  431. package/dist/tools/referrals/index.d.ts +12 -0
  432. package/dist/tools/referrals/index.d.ts.map +1 -0
  433. package/dist/tools/referrals/index.js +110 -0
  434. package/dist/tools/referrals/index.js.map +1 -0
  435. package/dist/tools/streaming/index.d.ts +94 -0
  436. package/dist/tools/streaming/index.d.ts.map +1 -0
  437. package/dist/tools/streaming/index.js +549 -0
  438. package/dist/tools/streaming/index.js.map +1 -0
  439. package/dist/tools/streaming/setNextLiveStreamCountdown.d.ts +16 -0
  440. package/dist/tools/streaming/setNextLiveStreamCountdown.d.ts.map +1 -0
  441. package/dist/tools/streaming/setNextLiveStreamCountdown.js +62 -0
  442. package/dist/tools/streaming/setNextLiveStreamCountdown.js.map +1 -0
  443. package/dist/tools/token-ban/index.d.ts +39 -0
  444. package/dist/tools/token-ban/index.d.ts.map +1 -0
  445. package/dist/tools/token-ban/index.js +177 -0
  446. package/dist/tools/token-ban/index.js.map +1 -0
  447. package/dist/tools/tool-factory.d.ts +84 -0
  448. package/dist/tools/tool-factory.d.ts.map +1 -0
  449. package/dist/tools/tool-factory.js +135 -0
  450. package/dist/tools/tool-factory.js.map +1 -0
  451. package/dist/tools/trades/index.d.ts +20 -0
  452. package/dist/tools/trades/index.d.ts.map +1 -0
  453. package/dist/tools/trades/index.js +113 -0
  454. package/dist/tools/trades/index.js.map +1 -0
  455. package/dist/tools/trading/helpers/arg-extractors.d.ts +128 -0
  456. package/dist/tools/trading/helpers/arg-extractors.d.ts.map +1 -0
  457. package/dist/tools/trading/helpers/arg-extractors.js +215 -0
  458. package/dist/tools/trading/helpers/arg-extractors.js.map +1 -0
  459. package/dist/tools/trading/helpers/index.d.ts +8 -0
  460. package/dist/tools/trading/helpers/index.d.ts.map +1 -0
  461. package/dist/tools/trading/helpers/index.js +24 -0
  462. package/dist/tools/trading/helpers/index.js.map +1 -0
  463. package/dist/tools/trading/helpers/trading-schemas.d.ts +276 -0
  464. package/dist/tools/trading/helpers/trading-schemas.d.ts.map +1 -0
  465. package/dist/tools/trading/helpers/trading-schemas.js +310 -0
  466. package/dist/tools/trading/helpers/trading-schemas.js.map +1 -0
  467. package/dist/tools/trading/index.d.ts +2 -0
  468. package/dist/tools/trading/index.d.ts.map +1 -1
  469. package/dist/tools/trading/index.js +148 -371
  470. package/dist/tools/trading/index.js.map +1 -1
  471. package/dist/tools/transfers/index.d.ts +3 -0
  472. package/dist/tools/transfers/index.d.ts.map +1 -1
  473. package/dist/tools/transfers/index.js +72 -52
  474. package/dist/tools/transfers/index.js.map +1 -1
  475. package/dist/tools/utils/cleanup.d.ts.map +1 -1
  476. package/dist/tools/utils/cleanup.js +2 -9
  477. package/dist/tools/utils/cleanup.js.map +1 -1
  478. package/dist/tools/utils/clearCache.d.ts.map +1 -1
  479. package/dist/tools/utils/clearCache.js +5 -7
  480. package/dist/tools/utils/clearCache.js.map +1 -1
  481. package/dist/tools/utils/explainSdkUsage.d.ts +52 -0
  482. package/dist/tools/utils/explainSdkUsage.d.ts.map +1 -1
  483. package/dist/tools/utils/explainSdkUsage.js +1905 -93
  484. package/dist/tools/utils/explainSdkUsage.js.map +1 -1
  485. package/dist/tools/utils/getEthereumAddressFromPrivateKey.d.ts.map +1 -1
  486. package/dist/tools/utils/getEthereumAddressFromPrivateKey.js +2 -1
  487. package/dist/tools/utils/getEthereumAddressFromPrivateKey.js.map +1 -1
  488. package/dist/tools/utils/index.d.ts +2 -0
  489. package/dist/tools/utils/index.d.ts.map +1 -1
  490. package/dist/tools/utils/index.js +2 -12
  491. package/dist/tools/utils/index.js.map +1 -1
  492. package/dist/tools/wallet/index.d.ts +7 -0
  493. package/dist/tools/wallet/index.d.ts.map +1 -0
  494. package/dist/tools/wallet/index.js +24 -0
  495. package/dist/tools/wallet/index.js.map +1 -0
  496. package/dist/utils/date-converter.d.ts +58 -0
  497. package/dist/utils/date-converter.d.ts.map +1 -0
  498. package/dist/utils/date-converter.js +83 -0
  499. package/dist/utils/date-converter.js.map +1 -0
  500. package/dist/utils/pool-filter-builder.d.ts +78 -0
  501. package/dist/utils/pool-filter-builder.d.ts.map +1 -0
  502. package/dist/utils/pool-filter-builder.js +130 -0
  503. package/dist/utils/pool-filter-builder.js.map +1 -0
  504. package/dist/utils/safe-parsers.d.ts +87 -0
  505. package/dist/utils/safe-parsers.d.ts.map +1 -0
  506. package/dist/utils/safe-parsers.js +134 -0
  507. package/dist/utils/safe-parsers.js.map +1 -0
  508. package/dist/utils/validation.d.ts +5 -5
  509. package/dist/utils/validation.d.ts.map +1 -1
  510. package/dist/utils/validation.js +23 -21
  511. package/dist/utils/validation.js.map +1 -1
  512. package/package.json +23 -15
  513. package/.env.example +0 -21
  514. package/.eslintrc.json +0 -88
  515. package/CHANGELOG.md +0 -2161
  516. package/DOCS_AUDIT_REPORT.md +0 -189
  517. package/DRY_REFACTORING_GUIDE.md +0 -271
  518. package/MCP_COVERAGE_REPORT.md +0 -164
  519. package/MCP_TEST_ANALYSIS.md +0 -317
  520. package/jest.integration.config.js +0 -70
  521. package/scripts/inject-version.ts +0 -31
  522. package/scripts/validate-mcp-test-analysis.ts +0 -250
@@ -0,0 +1,330 @@
1
+ "use strict";
2
+ /**
3
+ * Ban Management Prompt Factory
4
+ *
5
+ * Factory functions for creating standardized ban CRUD prompts.
6
+ * Used by both user bans (token-scoped) and token bans (platform-wide).
7
+ *
8
+ * Pattern consolidation:
9
+ * - createBan: Create a ban
10
+ * - removeBan: Remove/unban
11
+ * - listBans: List all bans
12
+ * - checkBanStatus: Check if banned
13
+ *
14
+ * @since 5.12.0
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.banManagementFactories = void 0;
18
+ exports.createBanManagementPrompts = createBanManagementPrompts;
19
+ const handlerHelpers_js_1 = require("../utils/handlerHelpers.js");
20
+ const textTemplates_js_1 = require("../utils/textTemplates.js");
21
+ const prompt_factories_js_1 = require("../prompt-factories.js");
22
+ const validation_js_1 = require("../../utils/validation.js");
23
+ /**
24
+ * Build tool names from the entity configuration
25
+ */
26
+ function buildToolNames(config) {
27
+ const { toolPrefix } = config;
28
+ if (toolPrefix === 'token_ban') {
29
+ return {
30
+ createBan: 'gala_launchpad_ban_token',
31
+ removeBan: 'gala_launchpad_unban_token',
32
+ listBans: 'gala_launchpad_list_token_bans',
33
+ getBanStatus: 'gala_launchpad_is_token_banned',
34
+ };
35
+ }
36
+ // Default user ban pattern
37
+ const prefix = 'gala_launchpad_';
38
+ return {
39
+ createBan: `${prefix}create_ban`,
40
+ removeBan: `${prefix}remove_ban`,
41
+ listBans: `${prefix}list_bans`,
42
+ getBanStatus: `${prefix}get_ban_status`,
43
+ };
44
+ }
45
+ /**
46
+ * Create the "create ban" prompt
47
+ */
48
+ function createCreateBanPrompt(config, tools) {
49
+ const { entityName, promptPrefix = 'galachain-launchpad', isTokenScoped, supportsDuration, targetsUserAddress, scopeDescription, adminWarning, } = config;
50
+ const baseArgs = [
51
+ { name: 'tokenName', description: 'Token name (e.g., anime)', required: true },
52
+ ];
53
+ if (targetsUserAddress) {
54
+ baseArgs.push({
55
+ name: 'userAddress',
56
+ description: 'Wallet address of user to ban',
57
+ required: true,
58
+ });
59
+ }
60
+ baseArgs.push({
61
+ name: 'reason',
62
+ description: `${entityName === 'token' ? 'Reason for banning the token' : 'Ban reason'} (optional, max 500 characters)`,
63
+ required: false,
64
+ });
65
+ if (supportsDuration) {
66
+ baseArgs.push({
67
+ name: 'durationSeconds',
68
+ description: 'Ban duration in seconds (optional, omit for permanent). Presets: 3600=1h, 86400=1d, 604800=1w',
69
+ required: false,
70
+ });
71
+ }
72
+ const actionTarget = targetsUserAddress ? 'user from a' : 'a';
73
+ const promptName = entityName === 'token'
74
+ ? `${promptPrefix}:ban-token`
75
+ : `${promptPrefix}:create-ban`;
76
+ let operationText = targetsUserAddress
77
+ ? `Ban user from token "{tokenName}" stream.`
78
+ : `Ban token "{tokenName}" from the platform.`;
79
+ if (adminWarning) {
80
+ operationText += `\n\n${adminWarning}`;
81
+ }
82
+ if (scopeDescription) {
83
+ operationText += `\n\n${scopeDescription}`;
84
+ }
85
+ if (supportsDuration) {
86
+ operationText += `\n\n**Duration Presets:**
87
+ - 1 hour: 3600
88
+ - 1 day: 86400
89
+ - 1 week: 604800
90
+ - 1 month: 2592000
91
+ - Permanent: omit durationSeconds`;
92
+ }
93
+ return {
94
+ name: promptName,
95
+ description: `Ban ${actionTarget} ${isTokenScoped ? 'token stream' : 'platform'}${adminWarning ? ' (OVERSEER ONLY)' : ''}`,
96
+ arguments: baseArgs,
97
+ handler: (args) => {
98
+ if (targetsUserAddress) {
99
+ (0, validation_js_1.validateAddress)(args.userAddress, 'userAddress');
100
+ }
101
+ const baseParams = {
102
+ token: `Token: ${args.tokenName}`,
103
+ };
104
+ if (targetsUserAddress) {
105
+ baseParams.userAddress = `User: ${args.userAddress}`;
106
+ }
107
+ const conditionals = [
108
+ [!!args.reason, 'reason', `Reason: ${args.reason}`],
109
+ ];
110
+ if (supportsDuration) {
111
+ const duration = args.durationSeconds
112
+ ? `Temporary (${args.durationSeconds} seconds)`
113
+ : 'Permanent';
114
+ baseParams.duration = `Duration: ${duration}`;
115
+ }
116
+ return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
117
+ operation: operationText.replace('{tokenName}', args.tokenName),
118
+ parameters: (0, prompt_factories_js_1.buildParameterObject)(baseParams, conditionals),
119
+ toolName: tools.createBan,
120
+ actionDescription: targetsUserAddress ? 'create the ban' : 'ban the token from the platform',
121
+ displayFormat: targetsUserAddress
122
+ ? 'Display ban confirmation with expiration time if temporary.'
123
+ : 'Display confirmation of the token ban with the reason if provided.',
124
+ }));
125
+ },
126
+ };
127
+ }
128
+ /**
129
+ * Create the "remove ban" prompt
130
+ */
131
+ function createRemoveBanPrompt(config, tools) {
132
+ const { entityName, promptPrefix = 'galachain-launchpad', targetsUserAddress, adminWarning, scopeDescription, } = config;
133
+ const baseArgs = [
134
+ { name: 'tokenName', description: 'Token name (e.g., anime)', required: true },
135
+ ];
136
+ if (targetsUserAddress) {
137
+ baseArgs.push({
138
+ name: 'userAddress',
139
+ description: 'Wallet address of user to unban',
140
+ required: true,
141
+ });
142
+ }
143
+ const promptName = entityName === 'token'
144
+ ? `${promptPrefix}:unban-token`
145
+ : `${promptPrefix}:remove-ban`;
146
+ let operationText = targetsUserAddress
147
+ ? `Remove ban for user on token "{tokenName}".`
148
+ : `Unban token "{tokenName}" from the platform.`;
149
+ if (adminWarning) {
150
+ operationText += `\n\n${adminWarning}`;
151
+ }
152
+ if (scopeDescription && entityName === 'token') {
153
+ operationText += `\n\nThis removes the platform-wide ban, allowing the token to:
154
+ - Appear in public listings again
155
+ - Resume normal trading activity
156
+
157
+ Verify the token is safe before unbanning.`;
158
+ }
159
+ return {
160
+ name: promptName,
161
+ description: `Remove a ${entityName === 'token' ? 'platform-wide token' : ''} ban${adminWarning ? ' (OVERSEER ONLY)' : ''} (unban)`,
162
+ arguments: baseArgs,
163
+ handler: (args) => {
164
+ if (targetsUserAddress) {
165
+ (0, validation_js_1.validateAddress)(args.userAddress, 'userAddress');
166
+ }
167
+ const parameters = {
168
+ token: `Token: ${args.tokenName}`,
169
+ };
170
+ if (targetsUserAddress) {
171
+ parameters.userAddress = `User: ${args.userAddress}`;
172
+ }
173
+ return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
174
+ operation: operationText.replace('{tokenName}', args.tokenName),
175
+ parameters,
176
+ toolName: tools.removeBan,
177
+ actionDescription: targetsUserAddress ? 'remove the ban' : 'remove the token ban',
178
+ displayFormat: targetsUserAddress
179
+ ? 'Display confirmation that the user has been unbanned.'
180
+ : 'Display confirmation that the token has been unbanned.',
181
+ }));
182
+ },
183
+ };
184
+ }
185
+ /**
186
+ * Create the "list bans" prompt
187
+ */
188
+ function createListBansPrompt(config, tools) {
189
+ const { entityName, promptPrefix = 'galachain-launchpad', isTokenScoped, adminWarning, } = config;
190
+ // Token bans use pagination, user bans use token + search
191
+ const baseArgs = [];
192
+ if (isTokenScoped) {
193
+ baseArgs.push({ name: 'tokenName', description: 'Token name (e.g., anime)', required: true }, { name: 'search', description: 'Search by address or name (optional)', required: false });
194
+ }
195
+ else {
196
+ baseArgs.push({ name: 'page', description: 'Page number (default: 1)', required: false }, { name: 'limit', description: 'Results per page (default: 20, max: 50)', required: false });
197
+ }
198
+ const promptName = entityName === 'token'
199
+ ? `${promptPrefix}:list-token-bans`
200
+ : `${promptPrefix}:list-bans`;
201
+ let operationText = isTokenScoped
202
+ ? `List banned users for token "{tokenName}".`
203
+ : 'List all tokens that have been banned from the platform.';
204
+ if (adminWarning && !isTokenScoped) {
205
+ operationText = `${adminWarning}\n\n${operationText}`;
206
+ }
207
+ return {
208
+ name: promptName,
209
+ description: `List all ${isTokenScoped ? 'banned users for a token' : 'banned tokens on the platform'}${adminWarning ? ' (OVERSEER ONLY)' : ''}`,
210
+ arguments: baseArgs,
211
+ handler: (args) => {
212
+ const baseParams = {};
213
+ const conditionals = [];
214
+ if (isTokenScoped) {
215
+ baseParams.token = `Token: ${args.tokenName}`;
216
+ conditionals.push([!!args.search, 'search', `Search: ${args.search}`]);
217
+ }
218
+ else {
219
+ baseParams.page = `Page: ${args.page || 1}`;
220
+ baseParams.limit = `Limit: ${args.limit || 20}`;
221
+ }
222
+ return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
223
+ operation: operationText.replace('{tokenName}', args.tokenName || ''),
224
+ parameters: (0, prompt_factories_js_1.buildParameterObject)(baseParams, conditionals),
225
+ toolName: tools.listBans,
226
+ actionDescription: isTokenScoped ? 'list banned users' : 'list banned tokens',
227
+ displayFormat: isTokenScoped
228
+ ? 'Display bans in a table with columns: User Address, Name, Reason, Expires, Banned By.'
229
+ : 'Display bans in a table with columns: Token Name, Reason, Banned At, Banned By.',
230
+ }));
231
+ },
232
+ };
233
+ }
234
+ /**
235
+ * Create the "check ban status" prompt
236
+ */
237
+ function createCheckBanStatusPrompt(config, tools) {
238
+ const { entityName, promptPrefix = 'galachain-launchpad', targetsUserAddress, } = config;
239
+ const baseArgs = [
240
+ { name: 'tokenName', description: 'Token name (e.g., anime)', required: true },
241
+ ];
242
+ if (targetsUserAddress) {
243
+ baseArgs.push({
244
+ name: 'userAddress',
245
+ description: 'Wallet address of user to check',
246
+ required: true,
247
+ });
248
+ }
249
+ const promptName = entityName === 'token'
250
+ ? `${promptPrefix}:check-token-banned`
251
+ : `${promptPrefix}:check-ban-status`;
252
+ const operationText = targetsUserAddress
253
+ ? `Check if user is banned on token "{tokenName}".`
254
+ : `Check if token "{tokenName}" is currently banned.\n\nReturns a simple boolean indicating whether the token is banned from the platform.\nThis is a read-only check that does not require overseer privileges.`;
255
+ return {
256
+ name: promptName,
257
+ description: targetsUserAddress
258
+ ? 'Check if a specific user is banned on a token'
259
+ : 'Check if a token is currently banned on the platform',
260
+ arguments: baseArgs,
261
+ handler: (args) => {
262
+ if (targetsUserAddress) {
263
+ (0, validation_js_1.validateAddress)(args.userAddress, 'userAddress');
264
+ }
265
+ const parameters = {
266
+ token: `Token: ${args.tokenName}`,
267
+ };
268
+ if (targetsUserAddress) {
269
+ parameters.userAddress = `User: ${args.userAddress}`;
270
+ }
271
+ return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
272
+ operation: operationText.replace('{tokenName}', args.tokenName),
273
+ parameters,
274
+ toolName: tools.getBanStatus,
275
+ actionDescription: targetsUserAddress ? 'check ban status' : 'check the token ban status',
276
+ displayFormat: targetsUserAddress
277
+ ? 'Display whether the user is banned and ban details if applicable.'
278
+ : 'Display whether the token is banned (true/false) with a clear message.',
279
+ }));
280
+ },
281
+ };
282
+ }
283
+ /**
284
+ * Create a complete set of ban management prompts
285
+ *
286
+ * Generates standardized CRUD prompts for ban management.
287
+ * Works for both user bans (token-scoped) and token bans (platform-wide).
288
+ *
289
+ * @param config - Configuration for the ban management system
290
+ * @returns Array of MCPPrompt definitions for ban CRUD operations
291
+ *
292
+ * @example
293
+ * ```typescript
294
+ * // User bans (token-scoped, supports duration)
295
+ * const userBanPrompts = createBanManagementPrompts({
296
+ * entityName: 'user',
297
+ * toolPrefix: 'ban',
298
+ * isTokenScoped: true,
299
+ * supportsDuration: true,
300
+ * targetsUserAddress: true,
301
+ * });
302
+ *
303
+ * // Token bans (platform-wide, permanent only)
304
+ * const tokenBanPrompts = createBanManagementPrompts({
305
+ * entityName: 'token',
306
+ * toolPrefix: 'token_ban',
307
+ * isTokenScoped: false,
308
+ * supportsDuration: false,
309
+ * targetsUserAddress: false,
310
+ * adminWarning: '**OVERSEER ONLY OPERATION**',
311
+ * });
312
+ * ```
313
+ */
314
+ function createBanManagementPrompts(config) {
315
+ const tools = buildToolNames(config);
316
+ return [
317
+ createCreateBanPrompt(config, tools),
318
+ createRemoveBanPrompt(config, tools),
319
+ createListBansPrompt(config, tools),
320
+ createCheckBanStatusPrompt(config, tools),
321
+ ];
322
+ }
323
+ /**
324
+ * Factory exports for convenient access
325
+ */
326
+ exports.banManagementFactories = {
327
+ createBanManagementPrompts,
328
+ buildToolNames,
329
+ };
330
+ //# sourceMappingURL=ban-management-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ban-management-factory.js","sourceRoot":"","sources":["../../../src/prompts/factories/ban-management-factory.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAqbH,gEASC;AA3bD,kEAAkE;AAClE,gEAAsE;AACtE,gEA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vD,CAAC;YAED,OAAO,IAAA,wCAAoB,EACzB,IAAA,4CAAyB,EAAC;gBACxB,SAAS,EAAE,aAAa,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC;gBAC/D,UAAU;gBACV,QAAQ,EAAE,KAAK,CAAC,YAAY;gBAC5B,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,4BAA4B;gBACzF,aAAa,EAAE,kBAAkB;oBAC/B,CAAC,CAAC,mEAAmE;oBACrE,CAAC,CAAC,wEAAwE;aAC7E,CAAC,CACH,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAgB,0BAA0B,CAAC,MAA2B;IACpE,MAAM,KAAK,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAErC,OAAO;QACL,qBAAqB,CAAC,MAAM,EAAE,KAAK,CAAC;QACpC,qBAAqB,CAAC,MAAM,EAAE,KAAK,CAAC;QACpC,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC;QACnC,0BAA0B,CAAC,MAAM,EAAE,KAAK,CAAC;KAC1C,CAAC;AACJ,CAAC;AAED;;GAEG;AACU,QAAA,sBAAsB,GAAG;IACpC,0BAA0B;IAC1B,cAAc;CACf,CAAC"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Calculation Prompt Factory
3
+ *
4
+ * Provides factory functions for creating calculation-related MCP prompts
5
+ * with standardized patterns for token calculations (buy/sell amounts, fees, etc.)
6
+ *
7
+ * @example
8
+ * // Create a calculation prompt with token and amount
9
+ * const calculateBuyPrompt = createCalculationPrompt({
10
+ * name: 'calculate-buy-amount',
11
+ * description: 'Calculate token buy amount',
12
+ * toolName: 'gala_launchpad_calculate_buy_amount',
13
+ * calculationType: 'buy',
14
+ * requiresTokenName: true,
15
+ * requiresAmount: true,
16
+ * });
17
+ */
18
+ import type { MCPPrompt, MCPPromptArgument } from '../../types/mcp.js';
19
+ /**
20
+ * Configuration for calculation prompt factory
21
+ */
22
+ export interface CalculationPromptConfig {
23
+ /** Unique prompt name (without prefix) */
24
+ name: string;
25
+ /** User-facing description */
26
+ description: string;
27
+ /** MCP tool name to invoke */
28
+ toolName: string;
29
+ /** Whether tokenName argument is required */
30
+ requiresTokenName?: boolean;
31
+ /** Whether amount argument is required */
32
+ requiresAmount?: boolean;
33
+ /** Amount field description override */
34
+ amountDescription?: string;
35
+ /** Additional arguments */
36
+ additionalArguments?: MCPPromptArgument[];
37
+ /** Operation description for the prompt text */
38
+ operationDescription: string;
39
+ /** List of items the tool calculates/returns */
40
+ calculationResults: string[];
41
+ /** Display format instructions */
42
+ displayFormat?: string;
43
+ /** Additional validation function */
44
+ validate?: (args: Record<string, string>) => void;
45
+ /** Function to build custom prompt text from args */
46
+ buildPromptText?: (args: Record<string, string>, toolName: string) => string;
47
+ }
48
+ /**
49
+ * Create a calculation prompt with standardized handling
50
+ *
51
+ * Handles the common pattern of:
52
+ * 1. Optional/required tokenName parameter
53
+ * 2. Optional/required amount parameter
54
+ * 3. Additional type/mode parameters
55
+ * 4. Standardized result format listing
56
+ *
57
+ * @param config - Configuration for the calculation prompt
58
+ * @returns Complete MCPPrompt definition
59
+ *
60
+ * @example
61
+ * ```typescript
62
+ * const calculateBuyPrompt = createCalculationPrompt({
63
+ * name: 'galachain-launchpad:calculate-buy-amount',
64
+ * description: 'Calculate token amounts and fees for buying',
65
+ * toolName: MCP_TOOLS.CALCULATE_BUY_AMOUNT,
66
+ * requiresTokenName: true,
67
+ * requiresAmount: true,
68
+ * amountDescription: 'Amount in GALA to spend or exact token quantity',
69
+ * operationDescription: 'Calculate buy amount and fee breakdown.',
70
+ * calculationResults: [
71
+ * 'Exact token amount you\'ll receive',
72
+ * 'Transaction fee',
73
+ * 'Gas fee',
74
+ * 'Reverse bonding curve fee',
75
+ * ],
76
+ * displayFormat: 'Display the complete cost breakdown.',
77
+ * });
78
+ * ```
79
+ */
80
+ export declare function createCalculationPrompt(config: CalculationPromptConfig): MCPPrompt;
81
+ /**
82
+ * Create a token-specific calculation prompt using createSimpleOperationText
83
+ *
84
+ * This is a higher-level factory for simpler calculations that
85
+ * don't need detailed result listings.
86
+ *
87
+ * @param config - Simplified configuration
88
+ * @returns Complete MCPPrompt definition
89
+ *
90
+ * @example
91
+ * ```typescript
92
+ * const graduationCostPrompt = createSimpleCalculationPrompt({
93
+ * name: 'galachain-launchpad:calculate-graduation-cost',
94
+ * description: 'Calculate cost to graduate a token pool to DEX',
95
+ * toolName: MCP_TOOLS.CALCULATE_BUY_AMOUNT_FOR_GRADUATION,
96
+ * operationDescription: 'Calculate graduation cost for token pool.',
97
+ * actionDescription: 'determine GALA cost to buy all remaining tokens',
98
+ * displayFormat: 'Display how much GALA is needed to graduate this token.',
99
+ * });
100
+ * ```
101
+ */
102
+ export declare function createSimpleCalculationPrompt(config: {
103
+ name: string;
104
+ description: string;
105
+ toolName: string;
106
+ operationDescription: string;
107
+ actionDescription: string;
108
+ displayFormat?: string;
109
+ additionalArguments?: MCPPromptArgument[];
110
+ buildParameters?: (args: Record<string, string>) => Record<string, string | undefined>;
111
+ }): MCPPrompt;
112
+ /**
113
+ * Factory exports for convenient access
114
+ */
115
+ export declare const calculationPromptFactories: {
116
+ createCalculationPrompt: typeof createCalculationPrompt;
117
+ createSimpleCalculationPrompt: typeof createSimpleCalculationPrompt;
118
+ };
119
+ //# sourceMappingURL=calculation-prompt-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calculation-prompt-factory.d.ts","sourceRoot":"","sources":["../../../src/prompts/factories/calculation-prompt-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAMvE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;I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M,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACxF,GAAG,SAAS,CA2CZ;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;CAGtC,CAAC"}
@@ -0,0 +1,183 @@
1
+ "use strict";
2
+ /**
3
+ * Calculation Prompt Factory
4
+ *
5
+ * Provides factory functions for creating calculation-related MCP prompts
6
+ * with standardized patterns for token calculations (buy/sell amounts, fees, etc.)
7
+ *
8
+ * @example
9
+ * // Create a calculation prompt with token and amount
10
+ * const calculateBuyPrompt = createCalculationPrompt({
11
+ * name: 'calculate-buy-amount',
12
+ * description: 'Calculate token buy amount',
13
+ * toolName: 'gala_launchpad_calculate_buy_amount',
14
+ * calculationType: 'buy',
15
+ * requiresTokenName: true,
16
+ * requiresAmount: true,
17
+ * });
18
+ */
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.calculationPromptFactories = void 0;
21
+ exports.createCalculationPrompt = createCalculationPrompt;
22
+ exports.createSimpleCalculationPrompt = createSimpleCalculationPrompt;
23
+ const validation_js_1 = require("../../utils/validation.js");
24
+ const handlerHelpers_js_1 = require("../utils/handlerHelpers.js");
25
+ const textTemplates_js_1 = require("../utils/textTemplates.js");
26
+ const launchpad_sdk_1 = require("@gala-chain/launchpad-sdk");
27
+ /**
28
+ * Create a calculation prompt with standardized handling
29
+ *
30
+ * Handles the common pattern of:
31
+ * 1. Optional/required tokenName parameter
32
+ * 2. Optional/required amount parameter
33
+ * 3. Additional type/mode parameters
34
+ * 4. Standardized result format listing
35
+ *
36
+ * @param config - Configuration for the calculation prompt
37
+ * @returns Complete MCPPrompt definition
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * const calculateBuyPrompt = createCalculationPrompt({
42
+ * name: 'galachain-launchpad:calculate-buy-amount',
43
+ * description: 'Calculate token amounts and fees for buying',
44
+ * toolName: MCP_TOOLS.CALCULATE_BUY_AMOUNT,
45
+ * requiresTokenName: true,
46
+ * requiresAmount: true,
47
+ * amountDescription: 'Amount in GALA to spend or exact token quantity',
48
+ * operationDescription: 'Calculate buy amount and fee breakdown.',
49
+ * calculationResults: [
50
+ * 'Exact token amount you\'ll receive',
51
+ * 'Transaction fee',
52
+ * 'Gas fee',
53
+ * 'Reverse bonding curve fee',
54
+ * ],
55
+ * displayFormat: 'Display the complete cost breakdown.',
56
+ * });
57
+ * ```
58
+ */
59
+ function createCalculationPrompt(config) {
60
+ const { name, description, toolName, requiresTokenName = false, requiresAmount = false, amountDescription = 'Amount to calculate', additionalArguments = [], operationDescription, calculationResults, displayFormat = 'Display the calculation results clearly.', validate: customValidate, buildPromptText, } = config;
61
+ // Build arguments list
62
+ const args = [];
63
+ if (requiresTokenName) {
64
+ args.push({
65
+ name: 'tokenName',
66
+ description: 'Token name (e.g., anime, test216253)',
67
+ required: true,
68
+ });
69
+ }
70
+ if (requiresAmount) {
71
+ args.push({
72
+ name: 'amount',
73
+ description: amountDescription,
74
+ required: true,
75
+ });
76
+ }
77
+ args.push(...additionalArguments);
78
+ return {
79
+ name,
80
+ description,
81
+ arguments: args,
82
+ handler: (handlerArgs) => {
83
+ // Validate token name if required
84
+ if (requiresTokenName) {
85
+ (0, validation_js_1.validateTokenName)(handlerArgs.tokenName, 'tokenName');
86
+ }
87
+ // Validate amount if required
88
+ if (requiresAmount) {
89
+ (0, validation_js_1.validateNumericAmount)(handlerArgs.amount, 'amount');
90
+ }
91
+ // Run custom validation
92
+ if (customValidate) {
93
+ customValidate(handlerArgs);
94
+ }
95
+ // Use custom prompt builder if provided
96
+ if (buildPromptText) {
97
+ return (0, handlerHelpers_js_1.createPromptResponse)(buildPromptText(handlerArgs, toolName));
98
+ }
99
+ // Build standard prompt text
100
+ const parameterLines = [];
101
+ if (requiresTokenName) {
102
+ parameterLines.push(`Token: ${handlerArgs.tokenName}`);
103
+ }
104
+ if (requiresAmount) {
105
+ parameterLines.push(`Amount: ${handlerArgs.amount}`);
106
+ }
107
+ // Add additional argument values
108
+ for (const arg of additionalArguments) {
109
+ if (handlerArgs[arg.name]) {
110
+ parameterLines.push(`${(0, launchpad_sdk_1.capitalize)(arg.name)}: ${handlerArgs[arg.name]}`);
111
+ }
112
+ }
113
+ const resultsList = calculationResults.map((r) => `- ${r}`).join('\n');
114
+ const promptText = `${operationDescription}
115
+
116
+ ${parameterLines.join('\n')}
117
+
118
+ Use ${toolName} to get:
119
+ ${resultsList}
120
+
121
+ ${displayFormat}`;
122
+ return (0, handlerHelpers_js_1.createPromptResponse)(promptText);
123
+ },
124
+ };
125
+ }
126
+ /**
127
+ * Create a token-specific calculation prompt using createSimpleOperationText
128
+ *
129
+ * This is a higher-level factory for simpler calculations that
130
+ * don't need detailed result listings.
131
+ *
132
+ * @param config - Simplified configuration
133
+ * @returns Complete MCPPrompt definition
134
+ *
135
+ * @example
136
+ * ```typescript
137
+ * const graduationCostPrompt = createSimpleCalculationPrompt({
138
+ * name: 'galachain-launchpad:calculate-graduation-cost',
139
+ * description: 'Calculate cost to graduate a token pool to DEX',
140
+ * toolName: MCP_TOOLS.CALCULATE_BUY_AMOUNT_FOR_GRADUATION,
141
+ * operationDescription: 'Calculate graduation cost for token pool.',
142
+ * actionDescription: 'determine GALA cost to buy all remaining tokens',
143
+ * displayFormat: 'Display how much GALA is needed to graduate this token.',
144
+ * });
145
+ * ```
146
+ */
147
+ function createSimpleCalculationPrompt(config) {
148
+ const { name, description, toolName, operationDescription, actionDescription, displayFormat, additionalArguments = [], buildParameters, } = config;
149
+ const args = [
150
+ {
151
+ name: 'tokenName',
152
+ description: 'Token name (e.g., anime, test216253)',
153
+ required: true,
154
+ },
155
+ ...additionalArguments,
156
+ ];
157
+ return {
158
+ name,
159
+ description,
160
+ arguments: args,
161
+ handler: (handlerArgs) => {
162
+ (0, validation_js_1.validateTokenName)(handlerArgs.tokenName, 'tokenName');
163
+ const parameters = buildParameters
164
+ ? buildParameters(handlerArgs)
165
+ : { token_name: `Token: ${handlerArgs.tokenName}` };
166
+ return (0, handlerHelpers_js_1.createPromptResponse)((0, textTemplates_js_1.createSimpleOperationText)({
167
+ operation: operationDescription,
168
+ parameters,
169
+ toolName,
170
+ actionDescription,
171
+ displayFormat,
172
+ }));
173
+ },
174
+ };
175
+ }
176
+ /**
177
+ * Factory exports for convenient access
178
+ */
179
+ exports.calculationPromptFactories = {
180
+ createCalculationPrompt,
181
+ createSimpleCalculationPrompt,
182
+ };
183
+ //# sourceMappingURL=calculation-prompt-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calculation-prompt-factory.js","sourceRoot":"","sources":["../../../src/prompts/factories/calculation-prompt-factory.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAiFH,0DA4FC;AAuBD,sEAoDC;AArPD,6DAAqF;AACrF,kEAAkE;AAClE,gEAAsE;AACtE,6DAAuD;AA2CvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,uBAAuB,CAAC,MAA+B;IACrE,MAAM,EACJ,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,iBAAiB,GAAG,KAAK,EACzB,cAAc,GAAG,KAAK,EACtB,iBAAiB,GAAG,qBAAqB,EACzC,mBAAmB,GAAG,EAAE,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,GAAG,0CAA0C,EAC1D,QAAQ,EAAE,cAAc,EACxB,eAAe,GAChB,GAAG,MAAM,CAAC;IAEX,uBAAuB;IACvB,MAAM,IAAI,GAAwB,EAAE,CAAC;IAErC,IAAI,iBAAiB,EAAE,CAAC;QACtB,IAAI,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;IACL,CAAC;IAED,IAAI,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iBAAiB;YAC9B,QAAQ,EAAE,IAAI;SACf,CAAC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