chunk-F2TQ3QY5.js•973 B
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;
var _chunk7QVYU63Ejs = require('./chunk-7QVYU63E.js');
// src/api.ts
var RugCheckApi = (_class = class {constructor() { _class.prototype.__init.call(this); }
static {
_chunk7QVYU63Ejs.__name.call(void 0, this, "RugCheckApi");
}
__init() {this.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();
}
}, _class);
exports.RugCheckApi = RugCheckApi;
//# sourceMappingURL=chunk-F2TQ3QY5.js.map