polymarket-trader-mcp 1.0.6 → 1.0.7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../src/utils/license.ts"],"names":[],"mappings":"AAKA,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../src/utils/license.ts"],"names":[],"mappings":"AAKA,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,CAIrD;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMnD;AAED,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
|
package/dist/utils/license.js
CHANGED
|
@@ -1,40 +1,8 @@
|
|
|
1
|
-
import { log } from "./logger.js";
|
|
2
|
-
import { fetchWithRetry } from "./fetch.js";
|
|
3
1
|
let _isLicensed = null;
|
|
4
2
|
export async function checkLicense() {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (!key) {
|
|
9
|
-
_isLicensed = false;
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
try {
|
|
13
|
-
const response = await fetchWithRetry("https://mcp-marketplace.io/api/v1/verify-license", {
|
|
14
|
-
method: "POST",
|
|
15
|
-
headers: { "Content-Type": "application/json" },
|
|
16
|
-
body: JSON.stringify({ key, slug: "polymarket-trader-mcp" }),
|
|
17
|
-
retries: 1,
|
|
18
|
-
timeoutMs: 5_000,
|
|
19
|
-
});
|
|
20
|
-
if (!response.ok) {
|
|
21
|
-
throw new Error(`License API returned ${response.status}`);
|
|
22
|
-
}
|
|
23
|
-
const data = await response.json();
|
|
24
|
-
_isLicensed = data.valid === true;
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
// API unreachable — deny license unless explicit offline override is set
|
|
28
|
-
if (process.env.MCP_LICENSE_OFFLINE === "true") {
|
|
29
|
-
_isLicensed = true;
|
|
30
|
-
log("warn", "License API unreachable, offline override enabled");
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
_isLicensed = false;
|
|
34
|
-
log("warn", "License API unreachable, license denied. Set MCP_LICENSE_OFFLINE=true for offline use.");
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return _isLicensed;
|
|
3
|
+
// TODO: Re-enable license gating when Stripe is connected
|
|
4
|
+
// All features are free during launch period
|
|
5
|
+
return true;
|
|
38
6
|
}
|
|
39
7
|
export function requirePro(toolName) {
|
|
40
8
|
const key = process.env.MCP_LICENSE_KEY;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"license.js","sourceRoot":"","sources":["../../src/utils/license.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"license.js","sourceRoot":"","sources":["../../src/utils/license.ts"],"names":[],"mappings":"AAGA,IAAI,WAAW,GAAmB,IAAI,CAAC;AAEvC,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,0DAA0D;IAC1D,6CAA6C;IAC7C,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IACxC,IAAI,GAAG,EAAE,CAAC;QACR,OAAO,IAAI,QAAQ,qOAAqO,CAAC;IAC3P,CAAC;IACD,OAAO,IAAI,QAAQ,iKAAiK,CAAC;AACvL,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,WAAW,GAAG,IAAI,CAAC;AACrB,CAAC"}
|
package/package.json
CHANGED