@parabolicfamily/mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +195 -0
- package/abi/ParabolicBondingCurve.json +1223 -0
- package/abi/ParabolicLaunchFactory.json +2212 -0
- package/abi/ParabolicLauncherToken.json +577 -0
- package/abi/ParabolicMemoRouter.json +950 -0
- package/dist/abi.d.ts +17 -0
- package/dist/abi.js +37 -0
- package/dist/abi.js.map +1 -0
- package/dist/chain.d.ts +32 -0
- package/dist/chain.js +48 -0
- package/dist/chain.js.map +1 -0
- package/dist/coins.d.ts +52 -0
- package/dist/coins.js +75 -0
- package/dist/coins.js.map +1 -0
- package/dist/config.d.ts +55 -0
- package/dist/config.js +86 -0
- package/dist/config.js.map +1 -0
- package/dist/curve.d.ts +92 -0
- package/dist/curve.js +127 -0
- package/dist/curve.js.map +1 -0
- package/dist/docs.d.ts +3 -0
- package/dist/docs.js +63 -0
- package/dist/docs.js.map +1 -0
- package/dist/format.d.ts +19 -0
- package/dist/format.js +30 -0
- package/dist/format.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/parabolic.d.ts +780 -0
- package/dist/parabolic.js +710 -0
- package/dist/parabolic.js.map +1 -0
- package/dist/server.d.ts +32 -0
- package/dist/server.js +149 -0
- package/dist/server.js.map +1 -0
- package/dist/subgraph.d.ts +85 -0
- package/dist/subgraph.js +43 -0
- package/dist/subgraph.js.map +1 -0
- package/dist/tx.d.ts +115 -0
- package/dist/tx.js +105 -0
- package/dist/tx.js.map +1 -0
- package/package.json +64 -0
- package/src/abi.ts +41 -0
- package/src/chain.ts +60 -0
- package/src/coins.ts +118 -0
- package/src/config.ts +123 -0
- package/src/curve.ts +171 -0
- package/src/docs.ts +63 -0
- package/src/format.ts +34 -0
- package/src/index.ts +14 -0
- package/src/parabolic.ts +753 -0
- package/src/server.ts +229 -0
- package/src/subgraph.ts +61 -0
- package/src/tx.ts +146 -0
package/dist/curve.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { encodeAbiParameters, formatUnits, keccak256 } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Bonding-curve math, ported from contracts/src/ParabolicBondingCurve.sol + libraries/ParabolicBondingCurveMath.sol
|
|
4
|
+
* and web/lib/curve.ts. Everything is bigint in raw units (18-dec tokens, 18-dec native USDC or 6-dec EURC),
|
|
5
|
+
* matching the contract's integer arithmetic step for step, including the clamped "crossing" buy that fills the
|
|
6
|
+
* curve's last sellable tokens and refunds the rest.
|
|
7
|
+
*/
|
|
8
|
+
export const BPS = 10000n;
|
|
9
|
+
export const TOKEN_DECIMALS = 18;
|
|
10
|
+
/** OpenZeppelin Math.mulDiv(a, b, d, Rounding.Ceil) for non-negative inputs. */
|
|
11
|
+
export const mulDivCeil = (a, b, d) => (a * b + d - 1n) / d;
|
|
12
|
+
/**
|
|
13
|
+
* Constant-product output for an exact input, net of `feeBps` on the input. Mirrors
|
|
14
|
+
* ParabolicBondingCurveMath._amountOut; returns 0 where the library would revert (web/lib/curve.ts does the same).
|
|
15
|
+
* With feeBps = 0 this is exactly `amountIn * reserveOut / (reserveIn + amountIn)`.
|
|
16
|
+
*/
|
|
17
|
+
export function getAmountOut(amountIn, reserveIn, reserveOut, feeBps = 0n) {
|
|
18
|
+
if (amountIn <= 0n || reserveIn <= 0n || reserveOut <= 0n || feeBps >= BPS)
|
|
19
|
+
return 0n;
|
|
20
|
+
const inWithFee = amountIn * (BPS - feeBps);
|
|
21
|
+
return (inWithFee * reserveOut) / (reserveIn * BPS + inWithFee);
|
|
22
|
+
}
|
|
23
|
+
/** Input required for an exact output; mirrors ParabolicBondingCurveMath.getAmountIn (rounds up by one). */
|
|
24
|
+
export function getAmountIn(amountOut, reserveIn, reserveOut, feeBps = 0n) {
|
|
25
|
+
if (amountOut <= 0n)
|
|
26
|
+
throw new Error("getAmountIn: amountOut must be positive");
|
|
27
|
+
if (reserveIn <= 0n || reserveOut <= amountOut || feeBps >= BPS)
|
|
28
|
+
throw new Error("getAmountIn: insufficient liquidity");
|
|
29
|
+
return (amountOut * reserveIn * BPS) / ((reserveOut - amountOut) * (BPS - feeBps)) + 1n;
|
|
30
|
+
}
|
|
31
|
+
export class CurveClosedError extends Error {
|
|
32
|
+
constructor() {
|
|
33
|
+
super("The curve's sellable allocation is exhausted: the coin has graduated, or is waiting for factory.graduate()");
|
|
34
|
+
this.name = "CurveClosedError";
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/** Port of ParabolicBondingCurve._buy pricing: fee legs off the input, constant product, clamp to sellable, refund. */
|
|
38
|
+
export function quoteBuy(quoteIn, t) {
|
|
39
|
+
const empty = { tokensOut: 0n, spent: 0n, refund: 0n, fee: 0n, creatorTax: 0n, snipeTax: 0n, netToCurve: 0n, crossing: false };
|
|
40
|
+
if (quoteIn <= 0n)
|
|
41
|
+
return empty;
|
|
42
|
+
const sellable = t.sellableTokens ?? t.tokenReserve;
|
|
43
|
+
if (sellable <= 0n)
|
|
44
|
+
throw new CurveClosedError();
|
|
45
|
+
let spent = quoteIn;
|
|
46
|
+
let fee = (spent * t.feeBps) / BPS;
|
|
47
|
+
let creatorTax = (spent * t.creatorTaxBps) / BPS;
|
|
48
|
+
let snipeTax = (spent * t.snipeBps) / BPS;
|
|
49
|
+
let tokensOut = getAmountOut(spent - fee - creatorTax - snipeTax, t.quoteReserve, t.tokenReserve);
|
|
50
|
+
if (tokensOut > sellable) {
|
|
51
|
+
tokensOut = sellable;
|
|
52
|
+
// Price the clamped fill from the token side, then gross it back up so the fee legs still come out of the input.
|
|
53
|
+
const net = getAmountIn(sellable, t.quoteReserve, t.tokenReserve);
|
|
54
|
+
const grossed = mulDivCeil(net, BPS, BPS - t.feeBps - t.creatorTaxBps - t.snipeBps);
|
|
55
|
+
spent = grossed < quoteIn ? grossed : quoteIn;
|
|
56
|
+
fee = (spent * t.feeBps) / BPS;
|
|
57
|
+
creatorTax = (spent * t.creatorTaxBps) / BPS;
|
|
58
|
+
snipeTax = (spent * t.snipeBps) / BPS;
|
|
59
|
+
}
|
|
60
|
+
return { tokensOut, spent, refund: quoteIn - spent, fee, creatorTax, snipeTax, netToCurve: spent - fee - creatorTax - snipeTax, crossing: tokensOut >= sellable };
|
|
61
|
+
}
|
|
62
|
+
/** Port of ParabolicBondingCurve.sell pricing: constant product, then fee and creator tax off the gross quote output. */
|
|
63
|
+
export function quoteSell(tokensIn, t) {
|
|
64
|
+
if (tokensIn <= 0n)
|
|
65
|
+
return { quoteOut: 0n, gross: 0n, fee: 0n, creatorTax: 0n };
|
|
66
|
+
const gross = getAmountOut(tokensIn, t.tokenReserve, t.quoteReserve);
|
|
67
|
+
const fee = (gross * t.feeBps) / BPS;
|
|
68
|
+
const creatorTax = (gross * t.creatorTaxBps) / BPS;
|
|
69
|
+
return { quoteOut: gross - fee - creatorTax, gross, fee, creatorTax };
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The curve enforces `spent * minTokensOut <= received * tokensOut` (a price bound, so a clamped crossing buy still
|
|
73
|
+
* honours the caller's terms). True when a buy quoted as `q` for `quoteIn` passes with `minTokensOut`.
|
|
74
|
+
*/
|
|
75
|
+
export const passesPriceBound = (quoteIn, q, minTokensOut) => q.spent * minTokensOut <= quoteIn * q.tokensOut;
|
|
76
|
+
export const applySlippage = (v, bps) => (v * (BPS - bps)) / BPS;
|
|
77
|
+
/** Tokens the curve never sells (the v4 pool seed): supply * phantomQuote / (phantomQuote + graduationThreshold), floored. */
|
|
78
|
+
export const reservedTokensFor = (supply, phantomQuote, graduationThreshold) => (supply * phantomQuote) / (phantomQuote + graduationThreshold);
|
|
79
|
+
/**
|
|
80
|
+
* Where the reserved tokens go at graduation. The v4 full-range position is seeded at the curve's terminal price
|
|
81
|
+
* ((phantom + threshold) / reserved) with the real quote raised, which takes reserved × threshold / (phantom + threshold)
|
|
82
|
+
* tokens; the rest, the phantom reserve's share, is permanently locked (GraduationTokensPermanentlyLocked).
|
|
83
|
+
* Adopted parameters: 28.57% reserved → ≈ 20.4% of supply seeds the pool, ≈ 8.2% is locked.
|
|
84
|
+
*/
|
|
85
|
+
export const graduationSplit = (reservedTokens, phantomQuote, graduationThreshold) => {
|
|
86
|
+
const denominator = phantomQuote + graduationThreshold;
|
|
87
|
+
const poolSeed = denominator === 0n ? 0n : (reservedTokens * graduationThreshold) / denominator;
|
|
88
|
+
return { poolSeed, locked: reservedTokens - poolSeed };
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Port of ParabolicBondingCurve.currentSnipeTaxBps: starts at `startBps` when the launch opens and decays to zero at
|
|
92
|
+
* `windowSeconds` along a quadratic ease-out (remaining² / window²), capped so at least one basis point of the spend
|
|
93
|
+
* reaches the curve. Integer seconds, like block.timestamp.
|
|
94
|
+
*/
|
|
95
|
+
export function snipeTaxBpsAt(elapsedSeconds, windowSeconds, startBps, feeBps, creatorTaxBps) {
|
|
96
|
+
if (windowSeconds === 0n || startBps === 0n)
|
|
97
|
+
return 0n;
|
|
98
|
+
const elapsed = elapsedSeconds < 0n ? 0n : elapsedSeconds;
|
|
99
|
+
if (elapsed >= windowSeconds)
|
|
100
|
+
return 0n;
|
|
101
|
+
const remaining = windowSeconds - elapsed;
|
|
102
|
+
const bps = (startBps * remaining * remaining) / (windowSeconds * windowSeconds);
|
|
103
|
+
const ceiling = BPS - feeBps - creatorTaxBps - 1n;
|
|
104
|
+
return bps > ceiling ? ceiling : bps;
|
|
105
|
+
}
|
|
106
|
+
export const toNumber = (v, decimals = TOKEN_DECIMALS) => Number(formatUnits(v, decimals));
|
|
107
|
+
/** Spot market cap in whole quote units for `supply` at the current curve price (quoteDecimals 18 for native USDC, 6 for EURC). */
|
|
108
|
+
export const marketCap = (quoteReserve, tokenReserve, supply, quoteDecimals = TOKEN_DECIMALS) => tokenReserve === 0n ? 0 : toNumber((quoteReserve * supply) / tokenReserve, quoteDecimals);
|
|
109
|
+
/** Market cap at the price the v4 pool is seeded with: (phantomQuote + graduationThreshold) / reservedTokens. */
|
|
110
|
+
export const graduationMarketCap = (phantomQuote, graduationThreshold, reservedTokens, supply, quoteDecimals = TOKEN_DECIMALS) => reservedTokens === 0n ? 0 : toNumber(((phantomQuote + graduationThreshold) * supply) / reservedTokens, quoteDecimals);
|
|
111
|
+
/** Spot price in whole quote units per whole token. */
|
|
112
|
+
export const spotPrice = (quoteReserve, tokenReserve, quoteDecimals = TOKEN_DECIMALS) => tokenReserve === 0n ? 0 : toNumber(quoteReserve, quoteDecimals) / toNumber(tokenReserve, TOKEN_DECIMALS);
|
|
113
|
+
/** Price impact in percent of a fill (gross amount in, amount out) against the spot price; same definition as the web trade panel. */
|
|
114
|
+
export const priceImpact = (amountIn, amountOut, reserveIn, reserveOut) => {
|
|
115
|
+
if (amountIn === 0n || amountOut === 0n || reserveOut === 0n || reserveIn === 0n)
|
|
116
|
+
return 0;
|
|
117
|
+
const spot = Number(reserveIn) / Number(reserveOut);
|
|
118
|
+
const eff = Number(amountIn) / Number(amountOut);
|
|
119
|
+
return Math.max(0, (eff / spot - 1) * 100);
|
|
120
|
+
};
|
|
121
|
+
/** Uniswap v4 PoolId = keccak256(abi.encode(PoolKey)) with currency0 < currency1 (native USDC, address(0), is always currency0). */
|
|
122
|
+
export const poolIdOf = (token, pairToken, fee, tickSpacing, hooks) => {
|
|
123
|
+
const tokenIsCurrency0 = BigInt(token) < BigInt(pairToken);
|
|
124
|
+
const [c0, c1] = tokenIsCurrency0 ? [token, pairToken] : [pairToken, token];
|
|
125
|
+
return keccak256(encodeAbiParameters([{ type: "address" }, { type: "address" }, { type: "uint24" }, { type: "int24" }, { type: "address" }], [c0, c1, fee, tickSpacing, hooks]));
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=curve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curve.js","sourceRoot":"","sources":["../src/curve.ts"],"names":[],"mappings":"AAAA,OA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AAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AACnL,CAAC,CAAC"}
|
package/dist/docs.d.ts
ADDED
package/dist/docs.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ARC_MEMO_DEFAULT, ENV_VARS, USDC_VIEW, chainName } from "./config.js";
|
|
2
|
+
/** Adopted product parameters (adopted 2026-09-06; published at https://www.parabolic.family/docs#parameters) and verified Arc facts, as text. */
|
|
3
|
+
export function docsText(config) {
|
|
4
|
+
/**
|
|
5
|
+
* Host only. An operator may point PARABOLIC_RPC_URL or PARABOLIC_SUBGRAPH_URL at an endpoint whose
|
|
6
|
+
* path carries an API key; this text goes straight into an agent's context, so the path never does.
|
|
7
|
+
*/
|
|
8
|
+
const endpointHost = (url) => {
|
|
9
|
+
try {
|
|
10
|
+
return new URL(url).host;
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return "(configured)";
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const set = (v) => v ?? "(not configured)";
|
|
17
|
+
return [
|
|
18
|
+
"PARABOLIC — dollar-native token launchpad on Arc",
|
|
19
|
+
"parabolic.family · contact@parabolic.family · fork of the MIT-licensed pons V2 contracts (Robinhood Chain), ported to Arc.",
|
|
20
|
+
"Category: bonding-curve launchpad (pump.fun / fomo.family / pons), not a fundraising venue. Non-custodial: every launch and trade is a wallet-signed transaction; no custody, no warranties, no advice; coins are user-created and experimental.",
|
|
21
|
+
"",
|
|
22
|
+
"ADOPTED PARAMETERS (2026-09-06)",
|
|
23
|
+
"- Supply: 1,000,000,000 tokens (18 decimals), all minted to the curve.",
|
|
24
|
+
"- Quote asset: native USDC (Arc's gas token; 18-decimal native accounting). EURC (6-decimal ERC-20) pairs when approved on the factory.",
|
|
25
|
+
"- Opening: phantom quote reserve $5,000 against the full supply → ≈ $0.000005 per token, ≈ $5,000 opening market cap.",
|
|
26
|
+
"- Graduation: when the curve's real quote reserve reaches $12,500. Terminal curve price = (5,000 + 12,500) / reservedTokens → fully diluted market cap at graduation = 17,500² / 5,000 = $61,250 (constant product over the whole 1e9 supply; the spec's rounded figure is $55–60K).",
|
|
27
|
+
"- Reserved tokens: supply × phantom / (phantom + threshold) = 5,000 / 17,500 ≈ 28.57% of supply is never sold on the curve and is still held by it at graduation. Of that, ≈ 20.4% of supply (reserved × 12,500 / 17,500) seeds the Uniswap v4 full-range position together with the $12,500 raised, at the same terminal price, and the remaining ≈ 8.2% of supply is permanently locked (GraduationTokensPermanentlyLocked). The position itself is locked forever in ParabolicLaunchLocker.",
|
|
28
|
+
"- Launch fee: $1.00 USDC (msg.value on launchToken) + ≈ $0.01 gas.",
|
|
29
|
+
"- Trade fee: 1.00% (100 bps) on the quote leg, before and after graduation (ParabolicHook takes it on the pool). Split: creator 50 / protocol 30 / buyback vault 20 (vault vests 5 years). On-chain: protocolFeeShareBps of the fee goes to protocol; buybackBurnBps of the remaining creator slice goes to the buyback.",
|
|
30
|
+
"- Creator tax: optional 0–5% (0–500 bps), fixed at launch, charged like the fee on buys and sells, paid entirely to the creator.",
|
|
31
|
+
"- Snipe tax: 93% (9,300 bps) at launch decaying to 0 over 5 s along a quadratic ease-out (remaining² / window²); capped at 10,000 − fee − creatorTax − 1 bps, which 9,300 stays below at every legal creator tax, so it is charged as written. Buys only. Only the deployer is exempt, for the buy in their own launch; there is no other exemption pathway. Snipe revenue is split like the base fee.",
|
|
32
|
+
"- Referral: a bytes8 referral code (first 8 bytes of the referrer's address) carried in the Arc memo of a routed buy earns 10% of the protocol share.",
|
|
33
|
+
"- Dev buy (fair launch): the creator's opening buy is snipe-tax exempt. ParabolicMemoRouter.launchAndBuy (native USDC; value = launch fee + buy) and launchAndBuyWithToken (ERC-20 quote; value = launch fee, buy pulled after an approval) place it inside the launch transaction, before anyone else can trade. The router forwards no exemption list and requires creatorFeeRecipient to be zero or the signer (FeeRecipientMustBeCreator); buyQuoteIn must be non-zero (ZeroBuyAmount). Without the router the buy is a second transaction to the new curve right after launch.",
|
|
34
|
+
"",
|
|
35
|
+
"CURVE MECHANICS (what the tools compute)",
|
|
36
|
+
"- Constant product over (phantomQuote + trackedQuote − pending fees) and trackedTokens. Buy: fee, creator tax and snipe tax come off the input first; tokensOut = net × tokenReserve / (quoteReserve + net).",
|
|
37
|
+
"- A buy that would take more than sellableTokens is clamped: it receives the last sellable tokens, is charged the grossed-up price for them, refunded the rest, and graduates the coin in the same transaction (needs extra gas: the web adds 300,000 plus 25% headroom).",
|
|
38
|
+
"- Sell: gross = tokensIn × quoteReserve / (tokenReserve + tokensIn); fee and creator tax come off the gross output. Sells close once the curve is ready to graduate.",
|
|
39
|
+
"- Slippage on buys is a price bound: the curve requires spent × minTokensOut ≤ received × tokensOut, so a clamped fill still honours the caller's terms.",
|
|
40
|
+
"- Graduated coins trade on Uniswap v4 (pool id = keccak256(PoolKey{currency0 < currency1, poolFee, tickSpacing, hook})); the curve refuses buys and sells after graduation.",
|
|
41
|
+
"",
|
|
42
|
+
"ARC NETWORK FACTS (verified against Arc Testnet)",
|
|
43
|
+
"- Testnet: chain id 5042002, RPC https://rpc.testnet.arc.io, explorer https://testnet.arcscan.app. Mainnet: chain id 5042 (unofficial until Circle publishes it), public launch 16 Sep 2026.",
|
|
44
|
+
`- USDC is the native gas asset (18-decimal native accounting); its 6-decimal ERC-20 view is ${USDC_VIEW}. Base fee target ≈ $0.01, floor 20 Gwei, ceiling 20,000 Gwei (EWMA-smoothed).`,
|
|
45
|
+
"- Malachite BFT consensus, deterministic finality < 1 s, proof of authority with 12 institutional validators. Osaka EVM on Reth. PREVRANDAO = 0 (no on-chain randomness). Mempool not observable.",
|
|
46
|
+
`- System contracts on testnet: Memo (${ARC_MEMO_DEFAULT}; EOA-only, no value forwarding), Multicall3From, Permit2 (canonical), CREATE2, CCTP v2 (domain 26), Gateway, EURC, USYC, StableFX FxEscrow.`,
|
|
47
|
+
"- Native transfers to address(0) and to blocklisted addresses revert (protocol-level USDC blocklist); Parabolic pays creators through a claim-based fee escrow for that reason.",
|
|
48
|
+
"- Uniswap v4 is live on Arc from day one; PoolManager / PositionManager addresses are deployment configuration (none official on testnet).",
|
|
49
|
+
"- The privacy sector is not live at mainnet.",
|
|
50
|
+
"",
|
|
51
|
+
"THIS SERVER",
|
|
52
|
+
`- Chain: ${chainName(config.chainId)} (${config.chainId}), RPC ${endpointHost(config.rpcUrl)}.`,
|
|
53
|
+
`- Factory: ${set(config.factory)} · Memo router: ${set(config.memoRouter)} · Subgraph: ${config.subgraphUrl ? endpointHost(config.subgraphUrl) : "(not configured)"} · EURC: ${set(config.eurc)} · Hook: ${config.hook ?? "(read from factory)"} · Launch config id: ${config.launchConfigId}.`,
|
|
54
|
+
"- Tools: parabolic.list_coins, parabolic.get_coin, parabolic.quote_buy, parabolic.quote_sell, parabolic.build_buy_tx, parabolic.build_sell_tx, parabolic.build_launch_tx, parabolic.protocol_stats, parabolic.docs. Resources: parabolic://docs/parameters, parabolic://coins/{address}.",
|
|
55
|
+
"- It never holds keys, signs, sends or broadcasts. build_* tools return unsigned { to, data, value, chainId } for the caller's wallet. Quotes are read from chain at call time and can move before a transaction lands.",
|
|
56
|
+
`- build_launch_tx: with PARABOLIC_MEMO_ROUTER set and devBuy > 0 it returns one ParabolicMemoRouter.launchAndBuy transaction (creatorFeeRecipient zero, minTokensOut from the curve math on the launch config's phantom quote, value = launch fee + devBuy)${config.memoRouter ? " (router configured)" : " (router not configured here)"}; otherwise factory.launchToken plus, for a devBuy, the two-step plan (buy calldata to send to the new curve).`,
|
|
57
|
+
"- The factory ABI has no enumeration function; listing uses the subgraph, or a TokenLaunched log scan of the factory (newest 50) when only PARABOLIC_FACTORY is set.",
|
|
58
|
+
"",
|
|
59
|
+
"ENVIRONMENT",
|
|
60
|
+
...ENV_VARS.map(([k, v]) => `- ${k}: ${v}`),
|
|
61
|
+
].join("\n");
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=docs.js.map
|
package/dist/docs.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../src/docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAe,MAAM,aAAa,CAAC;AAE5F,kJAAkJ;AAClJ,MAAM,UAAU,QAAQ,CAAC,MAAc;IACvC;;;OAGG;IACH,MAAM,YAAY,GAAG,CAAC,GAAW,EAAU,EAAE;QAC3C,IAAI,CAAC;YACH,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,cAAc,CAAC;QACxB,CAAC;IACH,CAAC,CAAC;IAEA,MAAM,GAAG,GAAG,CAAC,CAAqB,EAAE,EAAE,CAAC,CAAC,IAAI,kBAAkB,CAAC;IAC/D,OAAO;QACL,kDAAkD;QAClD,4HAA4H;QAC5H,kPAAkP;QAClP,EAAE;QACF,iCAAiC;QACjC,wEAAwE;QACxE,yIAAyI;QACzI,uHAAuH;QACvH,sRAAsR;QACtR,geAAge;QAChe,oEAAoE;QACpE,0TAA0T;QAC1T,kIAAkI;QAClI,wYAAwY;QACxY,uJAAuJ;QACvJ,qjBAAqjB;QACrjB,EAAE;QACF,0CAA0C;QAC1C,8MAA8M;QAC9M,2QAA2Q;QAC3Q,sKAAsK;QACtK,0JAA0J;QAC1J,6KAA6K;QAC7K,EAAE;QACF,kDAAkD;QAClD,8LAA8L;QAC9L,+FAA+F,SAAS,gFAAgF;QACxL,mMAAmM;QACnM,wCAAwC,gBAAgB,8IAA8I;QACtM,iLAAiL;QACjL,4IAA4I;QAC5I,8CAA8C;QAC9C,EAAE;QACF,aAAa;QACb,YAAY,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG;QAChG,cAAc,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,mBAAmB,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,gBAAgB,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,kBAAkB,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,MAAM,CAAC,IAAI,IAAI,qBAAqB,wBAAwB,MAAM,CAAC,cAAc,GAAG;QAChS,0RAA0R;QAC1R,yNAAyN;QACzN,8PAA8P,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,+BAA+B,gHAAgH;QAC1b,sKAAsK;QACtK,EAAE;QACF,aAAa;QACb,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;KAC5C,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
package/dist/format.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Address } from "viem";
|
|
2
|
+
/** JSON with bigints rendered as decimal strings. */
|
|
3
|
+
export declare const jsonText: (v: unknown) => string;
|
|
4
|
+
/** The same value as a plain JSON object (for MCP structuredContent). */
|
|
5
|
+
export declare const toPlain: (v: unknown) => Record<string, unknown>;
|
|
6
|
+
export declare const shortAddr: (a: string) => string;
|
|
7
|
+
export declare function parseAddress(v: unknown, name: string): Address;
|
|
8
|
+
/** Parses a whole-unit decimal amount ("25", "0.5", 12.5) into raw units; rejects zero, negatives and exponents. */
|
|
9
|
+
export declare function parseAmount(v: unknown, decimals: number, name: string): bigint;
|
|
10
|
+
/** Whole-unit string plus raw units, the pair every amount in a tool result carries. */
|
|
11
|
+
export declare const amount: (raw: bigint, decimals: number) => {
|
|
12
|
+
amount: string;
|
|
13
|
+
raw: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const big: (v: unknown) => bigint;
|
|
16
|
+
export declare const num: (v: unknown) => number;
|
|
17
|
+
export declare const bool: (v: unknown) => boolean;
|
|
18
|
+
export declare const str: (v: unknown) => string;
|
|
19
|
+
export declare const addrOf: (v: unknown) => Address;
|
package/dist/format.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { formatUnits, getAddress, isAddress, parseUnits } from "viem";
|
|
2
|
+
const replacer = (_key, v) => (typeof v === "bigint" ? v.toString() : v);
|
|
3
|
+
/** JSON with bigints rendered as decimal strings. */
|
|
4
|
+
export const jsonText = (v) => JSON.stringify(v, replacer, 2);
|
|
5
|
+
/** The same value as a plain JSON object (for MCP structuredContent). */
|
|
6
|
+
export const toPlain = (v) => JSON.parse(jsonText(v));
|
|
7
|
+
export const shortAddr = (a) => (a.length > 12 ? `${a.slice(0, 6)}…${a.slice(-4)}` : a);
|
|
8
|
+
export function parseAddress(v, name) {
|
|
9
|
+
if (typeof v !== "string" || !isAddress(v.trim(), { strict: false }))
|
|
10
|
+
throw new Error(`${name} must be a 0x-prefixed 20-byte address, got ${JSON.stringify(v)}`);
|
|
11
|
+
return getAddress(v.trim());
|
|
12
|
+
}
|
|
13
|
+
/** Parses a whole-unit decimal amount ("25", "0.5", 12.5) into raw units; rejects zero, negatives and exponents. */
|
|
14
|
+
export function parseAmount(v, decimals, name) {
|
|
15
|
+
const s = typeof v === "number" ? (Number.isFinite(v) && v >= 0 ? v.toLocaleString("en-US", { useGrouping: false, maximumFractionDigits: decimals }) : "") : typeof v === "string" ? v.trim() : "";
|
|
16
|
+
if (!/^\d+(\.\d+)?$/.test(s))
|
|
17
|
+
throw new Error(`${name} must be a non-negative decimal amount in whole units (e.g. "25" or "0.5"), got ${JSON.stringify(v)}`);
|
|
18
|
+
const out = parseUnits(s, decimals);
|
|
19
|
+
if (out <= 0n)
|
|
20
|
+
throw new Error(`${name} must be greater than zero`);
|
|
21
|
+
return out;
|
|
22
|
+
}
|
|
23
|
+
/** Whole-unit string plus raw units, the pair every amount in a tool result carries. */
|
|
24
|
+
export const amount = (raw, decimals) => ({ amount: formatUnits(raw, decimals), raw: raw.toString() });
|
|
25
|
+
export const big = (v) => (typeof v === "bigint" ? v : typeof v === "number" || typeof v === "string" ? BigInt(v) : 0n);
|
|
26
|
+
export const num = (v) => (typeof v === "number" ? v : typeof v === "bigint" ? Number(v) : typeof v === "string" ? Number(v) : 0);
|
|
27
|
+
export const bool = (v) => v === true;
|
|
28
|
+
export const str = (v) => (typeof v === "string" ? v : "");
|
|
29
|
+
export const addrOf = (v) => (typeof v === "string" && isAddress(v, { strict: false }) ? getAddress(v) : "0x0000000000000000000000000000000000000000");
|
|
30
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAgB,MAAM,MAAM,CAAC;AAEpF,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,CAAU,EAAW,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnG,qDAAqD;AACrD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAU,EAAU,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;AAE/E,yEAAyE;AACzE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAU,EAA2B,EAAE,CAAC,IAAI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,EAAU,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAU,EAAW,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,4CAA4C,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Parabolic MCP server over stdio. Configuration comes from PARABOLIC_* environment variables (see README).
|
|
3
|
+
// Logs go to stderr only; stdout is the JSON-RPC channel.
|
|
4
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
|
+
import { createServer } from "./server.js";
|
|
6
|
+
try {
|
|
7
|
+
const server = createServer();
|
|
8
|
+
await server.connect(new StdioServerTransport());
|
|
9
|
+
process.stderr.write("parabolic-mcp: ready on stdio\n");
|
|
10
|
+
}
|
|
11
|
+
catch (e) {
|
|
12
|
+
process.stderr.write(`parabolic-mcp: ${e instanceof Error ? e.message : String(e)}\n`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,4GAA4G;AAC5G,0DAA0D;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,IAAI,CAAC;IACH,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;IACjD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;AAC1D,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACvF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|