@0xwh1sker/mantle-core 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -0
  3. package/dist/capability-catalog.d.ts +38 -0
  4. package/dist/capability-catalog.d.ts.map +1 -0
  5. package/dist/capability-catalog.js +449 -0
  6. package/dist/capability-catalog.js.map +1 -0
  7. package/dist/config/aave-reserves.d.ts +56 -0
  8. package/dist/config/aave-reserves.d.ts.map +1 -0
  9. package/dist/config/aave-reserves.js +154 -0
  10. package/dist/config/aave-reserves.js.map +1 -0
  11. package/dist/config/chains.d.ts +18 -0
  12. package/dist/config/chains.d.ts.map +1 -0
  13. package/dist/config/chains.js +30 -0
  14. package/dist/config/chains.js.map +1 -0
  15. package/dist/config/dex-pairs.d.ts +92 -0
  16. package/dist/config/dex-pairs.d.ts.map +1 -0
  17. package/dist/config/dex-pairs.js +328 -0
  18. package/dist/config/dex-pairs.js.map +1 -0
  19. package/dist/config/protocols.d.ts +20 -0
  20. package/dist/config/protocols.d.ts.map +1 -0
  21. package/dist/config/protocols.js +112 -0
  22. package/dist/config/protocols.js.map +1 -0
  23. package/dist/config/registry.json +208 -0
  24. package/dist/config/tokens.d.ts +9 -0
  25. package/dist/config/tokens.d.ts.map +1 -0
  26. package/dist/config/tokens.js +167 -0
  27. package/dist/config/tokens.js.map +1 -0
  28. package/dist/errors.d.ts +14 -0
  29. package/dist/errors.d.ts.map +1 -0
  30. package/dist/errors.js +30 -0
  31. package/dist/errors.js.map +1 -0
  32. package/dist/index.d.ts +5 -0
  33. package/dist/index.d.ts.map +1 -0
  34. package/dist/index.js +5 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/lib/abis/aave-v3-pool.d.ts +256 -0
  37. package/dist/lib/abis/aave-v3-pool.d.ts.map +1 -0
  38. package/dist/lib/abis/aave-v3-pool.js +164 -0
  39. package/dist/lib/abis/aave-v3-pool.js.map +1 -0
  40. package/dist/lib/abis/merchant-moe-lb.d.ts +527 -0
  41. package/dist/lib/abis/merchant-moe-lb.d.ts.map +1 -0
  42. package/dist/lib/abis/merchant-moe-lb.js +330 -0
  43. package/dist/lib/abis/merchant-moe-lb.js.map +1 -0
  44. package/dist/lib/abis/uniswap-v3.d.ts +460 -0
  45. package/dist/lib/abis/uniswap-v3.d.ts.map +1 -0
  46. package/dist/lib/abis/uniswap-v3.js +319 -0
  47. package/dist/lib/abis/uniswap-v3.js.map +1 -0
  48. package/dist/lib/abis/wmnt.d.ts +90 -0
  49. package/dist/lib/abis/wmnt.d.ts.map +1 -0
  50. package/dist/lib/abis/wmnt.js +67 -0
  51. package/dist/lib/abis/wmnt.js.map +1 -0
  52. package/dist/lib/clients.d.ts +5 -0
  53. package/dist/lib/clients.d.ts.map +1 -0
  54. package/dist/lib/clients.js +41 -0
  55. package/dist/lib/clients.js.map +1 -0
  56. package/dist/lib/endpoint-policy.d.ts +19 -0
  57. package/dist/lib/endpoint-policy.d.ts.map +1 -0
  58. package/dist/lib/endpoint-policy.js +158 -0
  59. package/dist/lib/endpoint-policy.js.map +1 -0
  60. package/dist/lib/erc20.d.ts +113 -0
  61. package/dist/lib/erc20.d.ts.map +1 -0
  62. package/dist/lib/erc20.js +79 -0
  63. package/dist/lib/erc20.js.map +1 -0
  64. package/dist/lib/network.d.ts +8 -0
  65. package/dist/lib/network.d.ts.map +1 -0
  66. package/dist/lib/network.js +21 -0
  67. package/dist/lib/network.js.map +1 -0
  68. package/dist/lib/registry.d.ts +26 -0
  69. package/dist/lib/registry.d.ts.map +1 -0
  70. package/dist/lib/registry.js +22 -0
  71. package/dist/lib/registry.js.map +1 -0
  72. package/dist/lib/token-list.d.ts +14 -0
  73. package/dist/lib/token-list.d.ts.map +1 -0
  74. package/dist/lib/token-list.js +42 -0
  75. package/dist/lib/token-list.js.map +1 -0
  76. package/dist/lib/token-registry.d.ts +11 -0
  77. package/dist/lib/token-registry.d.ts.map +1 -0
  78. package/dist/lib/token-registry.js +75 -0
  79. package/dist/lib/token-registry.js.map +1 -0
  80. package/dist/tools/account.d.ts +16 -0
  81. package/dist/tools/account.d.ts.map +1 -0
  82. package/dist/tools/account.js +209 -0
  83. package/dist/tools/account.js.map +1 -0
  84. package/dist/tools/chain.d.ts +15 -0
  85. package/dist/tools/chain.d.ts.map +1 -0
  86. package/dist/tools/chain.js +77 -0
  87. package/dist/tools/chain.js.map +1 -0
  88. package/dist/tools/defi-lp-read.d.ts +14 -0
  89. package/dist/tools/defi-lp-read.d.ts.map +1 -0
  90. package/dist/tools/defi-lp-read.js +1184 -0
  91. package/dist/tools/defi-lp-read.js.map +1 -0
  92. package/dist/tools/defi-read.d.ts +186 -0
  93. package/dist/tools/defi-read.d.ts.map +1 -0
  94. package/dist/tools/defi-read.js +1682 -0
  95. package/dist/tools/defi-read.js.map +1 -0
  96. package/dist/tools/defi-write.d.ts +66 -0
  97. package/dist/tools/defi-write.d.ts.map +1 -0
  98. package/dist/tools/defi-write.js +1888 -0
  99. package/dist/tools/defi-write.js.map +1 -0
  100. package/dist/tools/diagnostics.d.ts +10 -0
  101. package/dist/tools/diagnostics.d.ts.map +1 -0
  102. package/dist/tools/diagnostics.js +143 -0
  103. package/dist/tools/diagnostics.js.map +1 -0
  104. package/dist/tools/index.d.ts +12 -0
  105. package/dist/tools/index.d.ts.map +1 -0
  106. package/dist/tools/index.js +31 -0
  107. package/dist/tools/index.js.map +1 -0
  108. package/dist/tools/indexer.d.ts +17 -0
  109. package/dist/tools/indexer.d.ts.map +1 -0
  110. package/dist/tools/indexer.js +174 -0
  111. package/dist/tools/indexer.js.map +1 -0
  112. package/dist/tools/registry.d.ts +13 -0
  113. package/dist/tools/registry.d.ts.map +1 -0
  114. package/dist/tools/registry.js +161 -0
  115. package/dist/tools/registry.js.map +1 -0
  116. package/dist/tools/token.d.ts +21 -0
  117. package/dist/tools/token.d.ts.map +1 -0
  118. package/dist/tools/token.js +444 -0
  119. package/dist/tools/token.js.map +1 -0
  120. package/dist/types.d.ts +18 -0
  121. package/dist/types.d.ts.map +1 -0
  122. package/dist/types.js +2 -0
  123. package/dist/types.js.map +1 -0
  124. package/package.json +38 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mantle
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # @0xwh1sker/mantle-core
2
+
3
+ Shared business logic for Mantle L2 tooling — chain reads, DeFi queries, and unsigned transaction building.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @0xwh1sker/mantle-core
9
+ ```
10
+
11
+ ## What's included
12
+
13
+ - **tools/** — callable handlers for chain, registry, account, token, DeFi, indexer, and diagnostics operations
14
+ - **lib/** — shared helpers: viem clients, network normalization, token registry, endpoint policy, contract ABIs
15
+ - **config/** — chain configs, token lists, protocol metadata, DEX pairs, Aave reserves
16
+ - **errors.ts** — `MantleMcpError` error class
17
+ - **types.ts** — `Tool`, `Resource`, `Network` type definitions
18
+ - **capability-catalog.ts** — structured tool metadata for LLM discovery
19
+
20
+ ## Usage
21
+
22
+ ```ts
23
+ import { allTools } from "@0xwh1sker/mantle-core/tools/index.js";
24
+
25
+ const result = await allTools["mantle_getChainInfo"].handler({ network: "mainnet" });
26
+ console.log(result);
27
+ ```
28
+
29
+ ## Related packages
30
+
31
+ - [`@0xwh1sker/mantle-cli`](https://www.npmjs.com/package/@0xwh1sker/mantle-cli) — CLI interface built on mantle-core
32
+ - [`@0xwh1sker/mantle-mcp`](https://www.npmjs.com/package/@0xwh1sker/mantle-mcp) — MCP server for AI agents
33
+
34
+ ## License
35
+
36
+ MIT
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Capability Catalog — structured self-description of every tool.
3
+ *
4
+ * Each entry carries semantic metadata so an LLM can:
5
+ * 1. Distinguish reads from writes at a glance
6
+ * 2. Know which tools need a wallet address
7
+ * 3. Locate the right tool via category search
8
+ * 4. Understand call ordering via `workflow_before` hints
9
+ * 5. Get the exact CLI command to run
10
+ */
11
+ export interface CapabilityEntry {
12
+ /** Tool name (internal identifier). */
13
+ id: string;
14
+ /** Human-readable short label. */
15
+ name: string;
16
+ /** Semantic category for quick filtering. */
17
+ category: "query" | "analyze" | "execute";
18
+ /** Whether the tool mutates on-chain state (constructs unsigned tx). */
19
+ mutates: boolean;
20
+ /** Whether a wallet/owner address is required or optional. */
21
+ auth: "none" | "optional" | "required";
22
+ /** One-line purpose. */
23
+ summary: string;
24
+ /** CLI command template (copy-pasteable). */
25
+ cli_command: string;
26
+ /** Concrete usage example (MCP JSON args, kept for reference). */
27
+ example: string;
28
+ /** Tools typically called before this one. */
29
+ workflow_before?: string[];
30
+ /** Tags for free-text search. */
31
+ tags: string[];
32
+ }
33
+ export declare function capabilityCatalog(): {
34
+ version: string;
35
+ description: string;
36
+ capabilities: CapabilityEntry[];
37
+ };
38
+ //# sourceMappingURL=capability-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability-catalog.d.ts","sourceRoot":"","sources":["../src/capability-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAC1C,wEAAwE;IACxE,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC;IACvC,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,iCAAiC;IACjC,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,wBAAgB,iBAAiB,IAAI;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,eAAe,EAAE,CAAC;CACjC,CAUA"}
@@ -0,0 +1,449 @@
1
+ /**
2
+ * Capability Catalog — structured self-description of every tool.
3
+ *
4
+ * Each entry carries semantic metadata so an LLM can:
5
+ * 1. Distinguish reads from writes at a glance
6
+ * 2. Know which tools need a wallet address
7
+ * 3. Locate the right tool via category search
8
+ * 4. Understand call ordering via `workflow_before` hints
9
+ * 5. Get the exact CLI command to run
10
+ */
11
+ export function capabilityCatalog() {
12
+ return {
13
+ version: "0.3.0",
14
+ description: "Structured capability catalog for Mantle CLI tools. " +
15
+ "Use category='query' for read-only lookups, 'analyze' for computed insights, " +
16
+ "'execute' for transaction building. Check 'auth' to know if a wallet address is needed. " +
17
+ "Always append --json for machine-readable output.",
18
+ capabilities: CAPABILITIES
19
+ };
20
+ }
21
+ // ---------------------------------------------------------------------------
22
+ // Static registry
23
+ // ---------------------------------------------------------------------------
24
+ const CAPABILITIES = [
25
+ // ── Chain / Network ────────────────────────────────────────────────────
26
+ {
27
+ id: "mantle_getChainInfo",
28
+ name: "Get Chain Info",
29
+ category: "query",
30
+ mutates: false,
31
+ auth: "none",
32
+ summary: "Return static chain configuration (chain ID, WMNT address, RPC URLs).",
33
+ cli_command: "mantle-cli chain info --json",
34
+ example: "{ \"network\": \"mainnet\" }",
35
+ tags: ["chain", "config", "network"]
36
+ },
37
+ {
38
+ id: "mantle_getChainStatus",
39
+ name: "Get Chain Status",
40
+ category: "query",
41
+ mutates: false,
42
+ auth: "none",
43
+ summary: "Live chain status: block number, gas price, sync state.",
44
+ cli_command: "mantle-cli chain status --json",
45
+ example: "{ \"network\": \"mainnet\" }",
46
+ tags: ["chain", "status", "gas", "block"]
47
+ },
48
+ // ── Account ────────────────────────────────────────────────────────────
49
+ {
50
+ id: "mantle_getBalance",
51
+ name: "Get Native Balance",
52
+ category: "query",
53
+ mutates: false,
54
+ auth: "required",
55
+ summary: "Read native MNT balance for a wallet address.",
56
+ cli_command: "mantle-cli account balance <address> --json",
57
+ example: "{ \"address\": \"0x1234...\" }",
58
+ tags: ["account", "balance", "MNT", "wallet"]
59
+ },
60
+ {
61
+ id: "mantle_getTokenBalances",
62
+ name: "Get Token Balances",
63
+ category: "query",
64
+ mutates: false,
65
+ auth: "required",
66
+ summary: "Batch read ERC-20 token balances for a wallet across specified tokens.",
67
+ cli_command: "mantle-cli account token-balances <address> --tokens USDC,WMNT --json",
68
+ example: "{ \"address\": \"0x1234...\", \"tokens\": [\"USDC\", \"WMNT\"] }",
69
+ tags: ["account", "balance", "token", "ERC-20", "wallet"]
70
+ },
71
+ {
72
+ id: "mantle_getAllowances",
73
+ name: "Get Allowances",
74
+ category: "query",
75
+ mutates: false,
76
+ auth: "required",
77
+ summary: "Batch read ERC-20 allowances for token/spender pairs granted by a wallet.",
78
+ cli_command: "mantle-cli account allowances <owner> --pairs USDC:0x319B... --json",
79
+ example: "{ \"owner\": \"0x1234...\", \"pairs\": [{\"token\": \"USDC\", \"spender\": \"0x319B69888b0d11cEC22caA5034e25FfFBDc88421\"}] }",
80
+ tags: ["account", "allowance", "approve", "wallet"]
81
+ },
82
+ // ── Token ──────────────────────────────────────────────────────────────
83
+ {
84
+ id: "mantle_getTokenInfo",
85
+ name: "Get Token Info",
86
+ category: "query",
87
+ mutates: false,
88
+ auth: "none",
89
+ summary: "Read on-chain metadata (name, symbol, decimals, totalSupply) for a token.",
90
+ cli_command: "mantle-cli token info <token> --json",
91
+ example: "{ \"token\": \"USDC\" }",
92
+ tags: ["token", "metadata", "decimals"]
93
+ },
94
+ {
95
+ id: "mantle_getTokenPrices",
96
+ name: "Get Token Prices",
97
+ category: "query",
98
+ mutates: false,
99
+ auth: "none",
100
+ summary: "Fetch current USD prices for one or more tokens (DexScreener + DefiLlama).",
101
+ cli_command: "mantle-cli token prices --tokens WMNT,USDC --json",
102
+ example: "{ \"tokens\": [\"WMNT\", \"USDC\"] }",
103
+ tags: ["token", "price", "USD"]
104
+ },
105
+ {
106
+ id: "mantle_resolveToken",
107
+ name: "Resolve Token",
108
+ category: "query",
109
+ mutates: false,
110
+ auth: "none",
111
+ summary: "Resolve a token symbol to its address and metadata via quick-reference + token-list cross-check.",
112
+ cli_command: "mantle-cli token resolve <symbol> --json",
113
+ example: "{ \"symbol\": \"mETH\" }",
114
+ tags: ["token", "resolve", "address"]
115
+ },
116
+ // ── Registry ───────────────────────────────────────────────────────────
117
+ {
118
+ id: "mantle_resolveAddress",
119
+ name: "Resolve Address",
120
+ category: "query",
121
+ mutates: false,
122
+ auth: "none",
123
+ summary: "Look up a contract or token by name/alias in the verified registry.",
124
+ cli_command: "mantle-cli registry resolve <identifier> --json",
125
+ example: "{ \"identifier\": \"agni_router\" }",
126
+ tags: ["registry", "address", "resolve", "contract"]
127
+ },
128
+ {
129
+ id: "mantle_validateAddress",
130
+ name: "Validate Address",
131
+ category: "query",
132
+ mutates: false,
133
+ auth: "none",
134
+ summary: "Check if an address is a contract, EOA, or undeployed; look up registry label.",
135
+ cli_command: "mantle-cli registry validate <address> --json",
136
+ example: "{ \"address\": \"0x1234...\" }",
137
+ tags: ["registry", "validate", "contract", "EOA"]
138
+ },
139
+ // ── DeFi Read ──────────────────────────────────────────────────────────
140
+ {
141
+ id: "mantle_getSwapQuote",
142
+ name: "Get Swap Quote",
143
+ category: "analyze",
144
+ mutates: false,
145
+ auth: "none",
146
+ summary: "Read swap quote across Agni, Fluxion, and Merchant Moe. Returns estimated output, price impact, and minimum_out_raw for slippage protection.",
147
+ cli_command: "mantle-cli defi swap-quote --in <token> --out <token> --amount <n> --provider best --json",
148
+ example: "{ \"token_in\": \"WMNT\", \"token_out\": \"USDC\", \"amount_in\": \"10\", \"provider\": \"best\" }",
149
+ workflow_before: ["mantle_buildSwap"],
150
+ tags: ["swap", "quote", "DEX", "price"]
151
+ },
152
+ {
153
+ id: "mantle_getPoolLiquidity",
154
+ name: "Get Pool Liquidity",
155
+ category: "query",
156
+ mutates: false,
157
+ auth: "none",
158
+ summary: "Read pool reserves and total liquidity USD for a specific pool address.",
159
+ cli_command: "mantle-cli defi pool-liquidity <pool-address> --json",
160
+ example: "{ \"pool_address\": \"0xABC...\", \"provider\": \"agni\" }",
161
+ tags: ["pool", "liquidity", "reserves", "TVL"]
162
+ },
163
+ {
164
+ id: "mantle_getPoolOpportunities",
165
+ name: "Get Pool Opportunities",
166
+ category: "analyze",
167
+ mutates: false,
168
+ auth: "none",
169
+ summary: "Scan and rank candidate pools for a token pair across all Mantle DEXes.",
170
+ cli_command: "mantle-cli defi pool-opportunities --token-a <token> --token-b <token> --json",
171
+ example: "{ \"token_a\": \"WMNT\", \"token_b\": \"USDC\" }",
172
+ tags: ["pool", "opportunity", "LP", "scan", "rank"]
173
+ },
174
+ {
175
+ id: "mantle_getProtocolTvl",
176
+ name: "Get Protocol TVL",
177
+ category: "query",
178
+ mutates: false,
179
+ auth: "none",
180
+ summary: "Read protocol-level TVL for Agni, Merchant Moe, or all Mantle DeFi protocols.",
181
+ cli_command: "mantle-cli defi tvl --json",
182
+ example: "{ \"protocol\": \"all\" }",
183
+ tags: ["TVL", "protocol", "DeFi"]
184
+ },
185
+ {
186
+ id: "mantle_getLendingMarkets",
187
+ name: "Get Lending Markets",
188
+ category: "query",
189
+ mutates: false,
190
+ auth: "none",
191
+ summary: "Read Aave V3 lending market data: supply APY, borrow APY, TVL, LTV, liquidation threshold.",
192
+ cli_command: "mantle-cli defi lending-markets --json",
193
+ example: "{ \"protocol\": \"aave_v3\" }",
194
+ tags: ["lending", "Aave", "APY", "supply", "borrow"]
195
+ },
196
+ {
197
+ id: "mantle_getLBPairState",
198
+ name: "Get LB Pair State",
199
+ category: "query",
200
+ mutates: false,
201
+ auth: "none",
202
+ summary: "Read on-chain state of a Merchant Moe Liquidity Book pair: active bin, reserves, nearby bins.",
203
+ cli_command: "mantle-cli defi lb-state --token-a <token> --token-b <token> --bin-step <step> --json",
204
+ example: "{ \"token_a\": \"WMNT\", \"token_b\": \"USDC\", \"bin_step\": 20 }",
205
+ tags: ["pool", "LB", "Merchant Moe", "bin", "state"]
206
+ },
207
+ // ── DeFi LP Read ───────────────────────────────────────────────────────
208
+ {
209
+ id: "mantle_getV3PoolState",
210
+ name: "Get V3 Pool State",
211
+ category: "query",
212
+ mutates: false,
213
+ auth: "none",
214
+ summary: "Read on-chain state of a Uniswap V3 pool (Agni/Fluxion): sqrtPriceX96, current tick, liquidity, prices.",
215
+ cli_command: "mantle-cli lp pool-state --token-a <token> --token-b <token> --fee-tier <tier> --provider <dex> --json",
216
+ example: "{ \"token_a\": \"WMNT\", \"token_b\": \"USDC\", \"fee_tier\": 3000, \"provider\": \"agni\" }",
217
+ tags: ["pool", "V3", "state", "tick", "price"]
218
+ },
219
+ {
220
+ id: "mantle_getV3Positions",
221
+ name: "Get V3 Positions",
222
+ category: "query",
223
+ mutates: false,
224
+ auth: "required",
225
+ summary: "Enumerate all V3 LP positions for a wallet across Agni and Fluxion: tick ranges, liquidity, uncollected fees, in-range status.",
226
+ cli_command: "mantle-cli lp positions --owner <address> --json",
227
+ example: "{ \"owner\": \"0x1234...\" }",
228
+ tags: ["LP", "position", "V3", "NFT", "wallet"]
229
+ },
230
+ {
231
+ id: "mantle_suggestTickRange",
232
+ name: "Suggest Tick Range",
233
+ category: "analyze",
234
+ mutates: false,
235
+ auth: "none",
236
+ summary: "Suggest tick ranges (wide/moderate/tight) for a V3 LP position with snapped tick bounds and prices.",
237
+ cli_command: "mantle-cli lp suggest-ticks --token-a <token> --token-b <token> --fee-tier <tier> --provider <dex> --json",
238
+ example: "{ \"token_a\": \"WMNT\", \"token_b\": \"USDC\", \"fee_tier\": 3000, \"provider\": \"agni\" }",
239
+ workflow_before: ["mantle_buildAddLiquidity"],
240
+ tags: ["LP", "tick", "range", "strategy", "V3"]
241
+ },
242
+ {
243
+ id: "mantle_analyzePool",
244
+ name: "Analyze Pool",
245
+ category: "analyze",
246
+ mutates: false,
247
+ auth: "none",
248
+ summary: "Deep pool analysis: fee APR from 24h volume/TVL, multi-range APR comparison, risk scoring (TVL/volatility), and investment return projections.",
249
+ cli_command: "mantle-cli defi analyze-pool --token-a <token> --token-b <token> --fee-tier <tier> --provider <dex> --investment <usd> --json",
250
+ example: "{ \"token_a\": \"WMNT\", \"token_b\": \"USDC\", \"fee_tier\": 3000, \"provider\": \"agni\" }",
251
+ workflow_before: ["mantle_buildAddLiquidity"],
252
+ tags: ["LP", "APR", "risk", "analysis", "yield", "pool"]
253
+ },
254
+ {
255
+ id: "mantle_findPools",
256
+ name: "Find Pools",
257
+ category: "query",
258
+ mutates: false,
259
+ auth: "none",
260
+ summary: "Discover all available pools for a token pair across Agni, Fluxion, and Merchant Moe by querying factory contracts on-chain.",
261
+ cli_command: "mantle-cli lp find-pools --token-a <token> --token-b <token> --json",
262
+ example: "{ \"token_a\": \"USDC\", \"token_b\": \"USDe\" }",
263
+ workflow_before: ["mantle_getV3PoolState", "mantle_analyzePool"],
264
+ tags: ["pool", "discover", "factory", "all DEX"]
265
+ },
266
+ // ── DeFi Write (Transaction Builders) ──────────────────────────────────
267
+ {
268
+ id: "mantle_buildApprove",
269
+ name: "Build Approve",
270
+ category: "execute",
271
+ mutates: true,
272
+ auth: "optional",
273
+ summary: "Build unsigned ERC-20 approve tx. Pass --owner to auto-skip if allowance is already sufficient.",
274
+ cli_command: "mantle-cli swap approve --token <token> --spender <address> --amount <n> --owner <address> --json",
275
+ example: "{ \"token\": \"USDC\", \"spender\": \"0x319B...\", \"amount\": \"100\", \"owner\": \"0x1234...\" }",
276
+ workflow_before: ["mantle_buildSwap", "mantle_buildAddLiquidity", "mantle_buildAaveSupply"],
277
+ tags: ["approve", "allowance", "ERC-20", "tx"]
278
+ },
279
+ {
280
+ id: "mantle_buildWrapMnt",
281
+ name: "Build Wrap MNT",
282
+ category: "execute",
283
+ mutates: true,
284
+ auth: "none",
285
+ summary: "Build unsigned tx to wrap MNT into WMNT.",
286
+ cli_command: "mantle-cli swap wrap-mnt --amount <n> --json",
287
+ example: "{ \"amount\": \"10\" }",
288
+ tags: ["wrap", "MNT", "WMNT", "tx"]
289
+ },
290
+ {
291
+ id: "mantle_buildUnwrapMnt",
292
+ name: "Build Unwrap MNT",
293
+ category: "execute",
294
+ mutates: true,
295
+ auth: "none",
296
+ summary: "Build unsigned tx to unwrap WMNT back to MNT.",
297
+ cli_command: "mantle-cli swap unwrap-mnt --amount <n> --json",
298
+ example: "{ \"amount\": \"10\" }",
299
+ tags: ["unwrap", "MNT", "WMNT", "tx"]
300
+ },
301
+ {
302
+ id: "mantle_buildSwap",
303
+ name: "Build Swap",
304
+ category: "execute",
305
+ mutates: true,
306
+ auth: "required",
307
+ summary: "Build unsigned swap tx on a whitelisted DEX. Requires amount_out_min from a prior quote for slippage protection.",
308
+ cli_command: "mantle-cli swap build-swap --provider <dex> --in <token> --out <token> --amount <n> --recipient <address> --amount-out-min <raw> --json",
309
+ example: "{ \"provider\": \"agni\", \"token_in\": \"WMNT\", \"token_out\": \"USDC\", \"amount_in\": \"10\", \"recipient\": \"0x1234...\", \"amount_out_min\": \"7500000\" }",
310
+ workflow_before: [],
311
+ tags: ["swap", "DEX", "tx"]
312
+ },
313
+ {
314
+ id: "mantle_buildAddLiquidity",
315
+ name: "Build Add Liquidity",
316
+ category: "execute",
317
+ mutates: true,
318
+ auth: "required",
319
+ summary: "Build unsigned add-liquidity tx. Supports token amounts, USD amount (--amount-usd), and V3/LB pools.",
320
+ cli_command: "mantle-cli lp add --provider <dex> --token-a <t> --token-b <t> --amount-a <n> --amount-b <n> --recipient <addr> --json",
321
+ example: "{ \"provider\": \"agni\", \"token_a\": \"WMNT\", \"token_b\": \"USDC\", \"amount_a\": \"10\", \"amount_b\": \"8\", \"recipient\": \"0x1234...\" }",
322
+ tags: ["LP", "add", "liquidity", "tx"]
323
+ },
324
+ {
325
+ id: "mantle_buildRemoveLiquidity",
326
+ name: "Build Remove Liquidity",
327
+ category: "execute",
328
+ mutates: true,
329
+ auth: "required",
330
+ summary: "Build unsigned remove-liquidity tx. V3: supports --percentage mode. Merchant Moe: remove from specified bins.",
331
+ cli_command: "mantle-cli lp remove --provider <dex> --token-id <id> --percentage <1-100> --recipient <addr> --json",
332
+ example: "{ \"provider\": \"agni\", \"token_id\": \"12345\", \"liquidity\": \"1000000\", \"recipient\": \"0x1234...\" }",
333
+ tags: ["LP", "remove", "liquidity", "tx"]
334
+ },
335
+ {
336
+ id: "mantle_buildCollectFees",
337
+ name: "Build Collect Fees",
338
+ category: "execute",
339
+ mutates: true,
340
+ auth: "required",
341
+ summary: "Build unsigned tx to collect accrued fees from a V3 LP position.",
342
+ cli_command: "mantle-cli lp collect-fees --provider <dex> --token-id <id> --recipient <addr> --json",
343
+ example: "{ \"provider\": \"agni\", \"token_id\": \"12345\", \"recipient\": \"0x1234...\" }",
344
+ tags: ["LP", "fees", "collect", "V3", "tx"]
345
+ },
346
+ {
347
+ id: "mantle_buildAaveSupply",
348
+ name: "Build Aave Supply",
349
+ category: "execute",
350
+ mutates: true,
351
+ auth: "required",
352
+ summary: "Build unsigned Aave V3 supply (deposit) tx.",
353
+ cli_command: "mantle-cli aave supply --asset <token> --amount <n> --on-behalf-of <addr> --json",
354
+ example: "{ \"asset\": \"USDC\", \"amount\": \"100\", \"on_behalf_of\": \"0x1234...\" }",
355
+ tags: ["Aave", "supply", "deposit", "lending", "tx"]
356
+ },
357
+ {
358
+ id: "mantle_buildAaveBorrow",
359
+ name: "Build Aave Borrow",
360
+ category: "execute",
361
+ mutates: true,
362
+ auth: "required",
363
+ summary: "Build unsigned Aave V3 borrow tx. Requires sufficient collateral.",
364
+ cli_command: "mantle-cli aave borrow --asset <token> --amount <n> --on-behalf-of <addr> --json",
365
+ example: "{ \"asset\": \"USDC\", \"amount\": \"50\", \"on_behalf_of\": \"0x1234...\" }",
366
+ tags: ["Aave", "borrow", "lending", "tx"]
367
+ },
368
+ {
369
+ id: "mantle_buildAaveRepay",
370
+ name: "Build Aave Repay",
371
+ category: "execute",
372
+ mutates: true,
373
+ auth: "required",
374
+ summary: "Build unsigned Aave V3 repay tx. Use --amount max for full debt repayment.",
375
+ cli_command: "mantle-cli aave repay --asset <token> --amount <n|max> --on-behalf-of <addr> --json",
376
+ example: "{ \"asset\": \"USDC\", \"amount\": \"50\", \"on_behalf_of\": \"0x1234...\" }",
377
+ tags: ["Aave", "repay", "lending", "tx"]
378
+ },
379
+ {
380
+ id: "mantle_buildAaveWithdraw",
381
+ name: "Build Aave Withdraw",
382
+ category: "execute",
383
+ mutates: true,
384
+ auth: "required",
385
+ summary: "Build unsigned Aave V3 withdraw tx. Use --amount max for full balance.",
386
+ cli_command: "mantle-cli aave withdraw --asset <token> --amount <n|max> --to <addr> --json",
387
+ example: "{ \"asset\": \"USDC\", \"amount\": \"50\", \"to\": \"0x1234...\" }",
388
+ tags: ["Aave", "withdraw", "lending", "tx"]
389
+ },
390
+ {
391
+ id: "mantle_getSwapPairs",
392
+ name: "Get Swap Pairs",
393
+ category: "query",
394
+ mutates: false,
395
+ auth: "none",
396
+ summary: "List known trading pairs and pool parameters for a DEX. Call before buildSwap to get correct fee_tier/bin_step.",
397
+ cli_command: "mantle-cli swap pairs --json",
398
+ example: "{ \"provider\": \"agni\" }",
399
+ workflow_before: ["mantle_buildSwap"],
400
+ tags: ["swap", "pairs", "DEX", "config"]
401
+ },
402
+ // ── Indexer ────────────────────────────────────────────────────────────
403
+ {
404
+ id: "mantle_querySubgraph",
405
+ name: "Query Subgraph",
406
+ category: "query",
407
+ mutates: false,
408
+ auth: "none",
409
+ summary: "Execute a GraphQL query against a Mantle subgraph endpoint.",
410
+ cli_command: "mantle-cli indexer subgraph --endpoint <url> --query '<graphql>' --json",
411
+ example: "{ \"endpoint\": \"https://...\", \"query\": \"{ pools(first:5) { id } }\" }",
412
+ tags: ["indexer", "subgraph", "GraphQL"]
413
+ },
414
+ {
415
+ id: "mantle_queryIndexerSql",
416
+ name: "Query Indexer SQL",
417
+ category: "query",
418
+ mutates: false,
419
+ auth: "none",
420
+ summary: "Execute a read-only SQL query against an indexer endpoint.",
421
+ cli_command: "mantle-cli indexer sql --endpoint <url> --query '<sql>' --json",
422
+ example: "{ \"endpoint\": \"https://...\", \"query\": \"SELECT * FROM pools LIMIT 10\" }",
423
+ tags: ["indexer", "SQL", "query"]
424
+ },
425
+ // ── Diagnostics ────────────────────────────────────────────────────────
426
+ {
427
+ id: "mantle_checkRpcHealth",
428
+ name: "Check RPC Health",
429
+ category: "query",
430
+ mutates: false,
431
+ auth: "none",
432
+ summary: "Health-check the configured RPC endpoint: reachability, chain ID, latency.",
433
+ cli_command: "mantle-cli diagnostics rpc-health --json",
434
+ example: "{ \"network\": \"mainnet\" }",
435
+ tags: ["diagnostics", "RPC", "health"]
436
+ },
437
+ {
438
+ id: "mantle_probeEndpoint",
439
+ name: "Probe Endpoint",
440
+ category: "query",
441
+ mutates: false,
442
+ auth: "none",
443
+ summary: "Send an arbitrary allowed RPC call to probe an endpoint.",
444
+ cli_command: "mantle-cli diagnostics probe --json",
445
+ example: "{ \"rpc_url\": \"https://...\", \"method\": \"eth_blockNumber\" }",
446
+ tags: ["diagnostics", "RPC", "probe"]
447
+ }
448
+ ];
449
+ //# sourceMappingURL=capability-catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability-catalog.js","sourceRoot":"","sources":["../src/capability-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAyBH,MAAM,UAAU,iBAAiB;IAK/B,OAAO;QACL,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,sDAAsD;YACtD,+EAA+E;YAC/E,0FAA0F;YAC1F,mDAAmD;QACrD,YAAY,EAAE,YAAY;KAC3B,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E,MAAM,YAAY,GAAsB;IACtC,0EAA0E;IAC1E;QACE,EAAE,EAAE,qBAAqB;QACzB,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,uEAAuE;QAChF,WAAW,EAAE,8BAA8B;QAC3C,OAAO,EAAE,8BAA8B;QACvC,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC;KACrC;IACD;QACE,EAAE,EAAE,uBAAuB;QAC3B,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,yDAAyD;QAClE,WAAW,EAAE,gCAAgC;QAC7C,OAAO,EAAE,8BAA8B;QACvC,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC;KAC1C;IAED,0EAA0E;IAC1E;QACE,EAAE,EAAE,mBAAmB;QACvB,IAAI,EAAE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7E,OAAO,EAAE,gFAAgF;QACzF,IAAI,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC;KAClC;IAED,0EAA0E;IAC1E;QACE,EAAE,EAAE,uBAAuB;QAC3B,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,4EAA4E;QACrF,WAAW,EAAE,0CAA0C;QACvD,OAAO,EAAE,8BAA8B;QACvC,IAAI,EAAE,CAAC,aAAa,EAAE,KAAK,EAAE,QAAQ,CAAC;KACvC;IACD;QACE,EAAE,EAAE,sBAAsB;QAC1B,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,0DAA0D;QACnE,WAAW,EAAE,qCAAqC;QAClD,OAAO,EAAE,mEAAmE;QAC5E,IAAI,EAAE,CAAC,aAAa,EAAE,KAAK,EAAE,OAAO,CAAC;KACtC;CACF,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Aave V3 Mantle reserve assets — hardcoded from the official aave-address-book.
3
+ *
4
+ * Source: https://github.com/bgd-labs/aave-address-book/blob/main/src/ts/AaveV3Mantle.ts
5
+ *
6
+ * Each entry contains the underlying token, its Aave aToken (deposit receipt),
7
+ * and variable debt token. Agents can use this registry to:
8
+ * - Know which assets are eligible for supply/borrow on Aave V3
9
+ * - Resolve aToken/debtToken addresses for portfolio valuation
10
+ * - Skip on-chain lookups for known reserves
11
+ */
12
+ export interface AaveReserveAsset {
13
+ /** Reserve index in the Aave Pool (0-based). */
14
+ id: number;
15
+ /** Human-readable symbol. */
16
+ symbol: string;
17
+ /** Underlying ERC-20 token address. */
18
+ underlying: string;
19
+ /** aToken address (deposit receipt, balance grows with interest). */
20
+ aToken: string;
21
+ /** Variable debt token address (represents outstanding borrow). */
22
+ variableDebtToken: string;
23
+ /** Token decimals. */
24
+ decimals: number;
25
+ /**
26
+ * True when supplying this asset as the ONLY collateral puts the user
27
+ * into Isolation Mode (i.e. the on-chain debt ceiling > 0).
28
+ */
29
+ isolationMode: boolean;
30
+ /**
31
+ * Max total debt (in whole USD) allowed across ALL users who use this
32
+ * asset in isolation. 0 = not an isolation-mode asset.
33
+ * On-chain value (Pool.getConfiguration bits 212-251) has 2 decimal places;
34
+ * this field is already divided by 100.
35
+ */
36
+ debtCeilingUsd: number;
37
+ /**
38
+ * True when this asset can be borrowed by a user who is in Isolation
39
+ * Mode. Sourced from Pool.getConfiguration() bit 61.
40
+ */
41
+ borrowableInIsolation: boolean;
42
+ }
43
+ export declare const AAVE_V3_MANTLE_RESERVES: AaveReserveAsset[];
44
+ /** Find a reserve by symbol (case-insensitive). */
45
+ export declare function findReserveBySymbol(symbol: string): AaveReserveAsset | null;
46
+ /** Find a reserve by underlying token address. */
47
+ export declare function findReserveByUnderlying(address: string): AaveReserveAsset | null;
48
+ /** Check whether a token is a supported Aave V3 reserve on Mantle. */
49
+ export declare function isAaveReserve(symbolOrAddress: string): boolean;
50
+ /** Get all reserve symbols. */
51
+ export declare function aaveReserveSymbols(): string[];
52
+ /** Symbols of reserves whose debtCeiling > 0 (supplying them triggers Isolation Mode). */
53
+ export declare function isolationModeSymbols(): string[];
54
+ /** Symbols of reserves that CAN be borrowed while in Isolation Mode. */
55
+ export declare function isolationBorrowableSymbols(): string[];
56
+ //# sourceMappingURL=aave-reserves.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aave-reserves.d.ts","sourceRoot":"","sources":["../../src/config/aave-reserves.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,gDAAgD;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sBAAsB;IACtB,QAAQ,EAAE,MAAM,CAAC;IAGjB;;;OAGG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,EA+GrD,CAAC;AAaF,mDAAmD;AACnD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAE3E;AAED,kDAAkD;AAClD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,GACd,gBAAgB,GAAG,IAAI,CAEzB;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAG9D;AAED,+BAA+B;AAC/B,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAED,0FAA0F;AAC1F,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAED,wEAAwE;AACxE,wBAAgB,0BAA0B,IAAI,MAAM,EAAE,CAErD"}