chunk-IQLRE3XY.mjs•753 B
import {
__name
} from "./chunk-PAWJFY3S.mjs";
// src/api.ts
var RugCheckApi = class {
static {
__name(this, "RugCheckApi");
}
baseUrl = "https://api.rugcheck.xyz/v1";
async makeRequest(endpoint, options = {}) {
const headers = {
...options.headers,
"Content-Type": "application/json"
};
const response = await fetch(`${this.baseUrl}${endpoint}`, {
...options,
headers
});
if (!response.ok) {
if (response.status === 429) {
throw new Error("RugCheck API rate limit exceeded");
}
throw new Error(`RugCheck API request failed: ${response.statusText}`);
}
return await response.json();
}
};
export {
RugCheckApi
};
//# sourceMappingURL=chunk-IQLRE3XY.mjs.map