@aicoin/opendata-mcp 1.0.18 → 1.0.19
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/build/index.js +4 -7
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -44,14 +44,11 @@ Endpoint: ${path}`;
|
|
|
44
44
|
}
|
|
45
45
|
throw new Error(msg);
|
|
46
46
|
}
|
|
47
|
+
var FREE_KEY = "ronJ8uI0Yj2soAfGVs5H1YALUIINbE22";
|
|
48
|
+
var FREE_SECRET = "CWHZcH2us1CLSE7grroR1TpS0Z1JxTwU";
|
|
47
49
|
function getCredentials() {
|
|
48
|
-
const key = process.env.AICOIN_ACCESS_KEY_ID;
|
|
49
|
-
const secret = process.env.AICOIN_ACCESS_SECRET;
|
|
50
|
-
if (!key || !secret) {
|
|
51
|
-
throw new Error(
|
|
52
|
-
"Missing AICOIN_ACCESS_KEY_ID or AICOIN_ACCESS_SECRET. Register at https://www.aicoin.com/opendata to get your API credentials."
|
|
53
|
-
);
|
|
54
|
-
}
|
|
50
|
+
const key = process.env.AICOIN_ACCESS_KEY_ID || FREE_KEY;
|
|
51
|
+
const secret = process.env.AICOIN_ACCESS_SECRET || FREE_SECRET;
|
|
55
52
|
return { key, secret };
|
|
56
53
|
}
|
|
57
54
|
async function apiGet(path, params = {}) {
|