@normalizex/honeypot-is
Version:
library targeting of the honeypot.is API.
45 lines • 1.9 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.HoneypotIsV1 = void 0;
var axios_1 = __importDefault(require("axios"));
var HoneypotIsV1 = /** @class */ (function () {
function HoneypotIsV1() {
var _this = this;
this.endpoint = 'https://api.honeypot.is/v1';
this.sub_endpoint = 'https://sapi.honeypot.is/v1';
this.getPairs = function (tokenAddress, chainId) {
return axios_1.default.get("".concat(_this.endpoint, "/GetPairs"), {
params: {
chainID: chainId,
address: tokenAddress
}
}).then(function (response) { return response.data; });
};
this.honeypotScan = function (tokenAddress, router, pair, chainId) {
return axios_1.default.get("".concat(_this.endpoint, "/IsHoneypot"), {
params: {
pair: pair,
router: router,
chainID: chainId,
address: tokenAddress
}
}).then(function (response) { return response.data; });
};
this.getContractVerification = function (tokenAddress, router, pair, chainId) {
return axios_1.default.get("".concat(_this.sub_endpoint, "/GetContractVerification"), {
params: {
pair: pair,
router: router,
chainID: chainId,
address: tokenAddress
}
}).then(function (response) { return response.data; });
};
}
return HoneypotIsV1;
}());
exports.HoneypotIsV1 = HoneypotIsV1;
//# sourceMappingURL=index.js.map