hookit-mcp 0.2.1 → 0.2.2
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.
- package/README.md +1 -1
- package/index.js +15 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Optional env: `HOOKIT_API_URL` (default `https://www.hookit.fun`), `HOOKIT_RPC_U
|
|
|
30
30
|
| `wallet_status` | The wallet's ETH and USDG, the hookit.fun coins it holds with their value, its open floor loans, and whether it can launch. |
|
|
31
31
|
| `launch_token` | Launches in one call, with an optional `devBuyPct`. `dryRun: true` checks and simulates without signing. |
|
|
32
32
|
| `claim_fees` | Collects the creator fees the wallet earned on coins it launched. |
|
|
33
|
-
| `send_eth` | Sends ETH from the wallet, for example back to a Kraken deposit address on Ink. `dryRun: true` checks only. |
|
|
33
|
+
| `send_eth` | Sends ETH from the wallet, for example back to a Kraken deposit address on Ink. Refuses less than 0.001 ETH, Kraken's minimum deposit (`belowKrakenMinimum: true` for an address that is not Kraken). `dryRun: true` checks only. |
|
|
34
34
|
| `agent_pass_challenge` | Step 1 for AI-agents-only coins: five short tasks for the Hookit Agent Pass check (or "already a holder"). `{ agentId? }` for an ERC-8004 validation (below). |
|
|
35
35
|
| `claim_agent_pass` | Step 2: `{ id, answers, agentId?, requestHash? }` within 30 seconds; signs the answers with the wallet and claims the pass on chain. With `agentId`, gets Hookit's ERC-8004 validation instead (below). |
|
|
36
36
|
| `list_coins` | Coins to trade: newest, top market cap, volume or 24h gainers; filters for AI-agents-only, launched by agents, Backed Floor and Boss Raid coins, a pair, or a name. |
|
package/index.js
CHANGED
|
@@ -34,7 +34,7 @@ import { z } from "zod";
|
|
|
34
34
|
const API = (process.env.HOOKIT_API_URL || "https://www.hookit.fun").replace(/\/$/, "");
|
|
35
35
|
const RPC = process.env.HOOKIT_RPC_URL || "https://rpc-gel.inkonchain.com";
|
|
36
36
|
const KEY = process.env.HOOKIT_PRIVATE_KEY?.trim();
|
|
37
|
-
const VERSION = "0.2.
|
|
37
|
+
const VERSION = "0.2.2";
|
|
38
38
|
const EXPLORER = "https://explorer.inkonchain.com";
|
|
39
39
|
/**
|
|
40
40
|
* The Ink deployments this server signs against. Pinned here, never taken from hookit.fun's catalog: a compromised
|
|
@@ -95,6 +95,8 @@ const SWAP_MIN_GAS = 650_000n;
|
|
|
95
95
|
/** FloorLoanPlugin durations (days) and their upfront fee (bps of the loan). */
|
|
96
96
|
const LOAN_FEES_BPS = { 7: 100, 14: 175, 30: 300, 60: 500, 90: 700 };
|
|
97
97
|
const ETH = { address: zeroAddress, symbol: "ETH", decimals: 18 };
|
|
98
|
+
/** Kraken's minimum ETH deposit on Ink: smaller deposits are marked failed and lost. */
|
|
99
|
+
const KRAKEN_MIN_DEPOSIT_WEI = parseEther("0.001");
|
|
98
100
|
|
|
99
101
|
const ink = defineChain({
|
|
100
102
|
id: 57073,
|
|
@@ -1719,14 +1721,18 @@ server.registerTool(
|
|
|
1719
1721
|
"send_eth",
|
|
1720
1722
|
{
|
|
1721
1723
|
description:
|
|
1722
|
-
"Sends ETH from this wallet on Ink, for example to cash out to the user's Kraken ETH deposit address on the Ink network (get it with the Kraken MCP deposit addresses tool for the \"ETH - Ink\" method only). Kraken's minimum ETH deposit on Ink is 0.001 ETH; smaller deposits fail and the funds are lost, so
|
|
1724
|
+
"Sends ETH from this wallet on Ink, for example to cash out to the user's Kraken ETH deposit address on the Ink network (get it with the Kraken MCP deposit addresses tool for the \"ETH - Ink\" method only). Kraken's minimum ETH deposit on Ink is 0.001 ETH; smaller deposits fail and the funds are lost, so it refuses to send less unless belowKrakenMinimum is set for an address that is not Kraken. Run it with dryRun first and repeat the address and amount to the user before sending.",
|
|
1723
1725
|
inputSchema: {
|
|
1724
1726
|
to: z.string().describe("Destination address on Ink."),
|
|
1725
|
-
amountEth: z.string().describe('Amount in ETH, or "max" to send everything except gas.'),
|
|
1727
|
+
amountEth: z.string().describe('Amount in ETH, or "max" to send everything except gas. At least 0.001 ETH.'),
|
|
1728
|
+
belowKrakenMinimum: z
|
|
1729
|
+
.boolean()
|
|
1730
|
+
.optional()
|
|
1731
|
+
.describe("Allows less than 0.001 ETH. Only for an address that is not a Kraken deposit address: Kraken loses smaller deposits."),
|
|
1726
1732
|
dryRun: z.boolean().optional().describe("Check only. Signs nothing."),
|
|
1727
1733
|
},
|
|
1728
1734
|
},
|
|
1729
|
-
serialized(async ({ to, amountEth, dryRun }) => {
|
|
1735
|
+
serialized(async ({ to, amountEth, belowKrakenMinimum, dryRun }) => {
|
|
1730
1736
|
if (!account) return needKey();
|
|
1731
1737
|
if (!isAddress(to)) return fail(`Not an address: ${to}`);
|
|
1732
1738
|
const [balance, gasPrice] = await Promise.all([publicClient.getBalance({ address: account.address }), publicClient.getGasPrice()]);
|
|
@@ -1743,6 +1749,11 @@ server.registerTool(
|
|
|
1743
1749
|
}
|
|
1744
1750
|
}
|
|
1745
1751
|
if (value <= 0n) return fail(`Nothing to send: the wallet holds ${formatEther(balance)} ETH.`);
|
|
1752
|
+
if (value < KRAKEN_MIN_DEPOSIT_WEI && !belowKrakenMinimum) {
|
|
1753
|
+
return fail(
|
|
1754
|
+
`${formatEther(value)} ETH is under Kraken's 0.001 ETH minimum deposit on Ink: Kraken marks smaller deposits as failed and the ETH is lost. Nothing was sent. Wait until the wallet holds more, or, only if ${to} is not a Kraken deposit address, pass belowKrakenMinimum: true.`,
|
|
1755
|
+
);
|
|
1756
|
+
}
|
|
1746
1757
|
if (value + gasReserve > balance) {
|
|
1747
1758
|
return fail(`Not enough ETH: the wallet holds ${formatEther(balance)} ETH and needs some left for gas.`);
|
|
1748
1759
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hookit-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Let an AI agent launch a coin on hookit.fun (Ink) with its own hook modules, find, buy and sell coins with ETH, USDG or tokenized stocks (AI-agents-only ones too, with a Hookit Agent Pass), redeem or borrow at their Backed Floor, and collect its creator fees.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": { "hookit-mcp": "index.js" },
|