@dethcrypto/eth-sdk
Version:
🛠Generate type-safe, lightweight SDK for your Ethereum smart contracts
19 lines • 617 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchJson = void 0;
const got_1 = __importDefault(require("got"));
const retryOptions = {
limit: 2,
statusCodes: [
// defaults
408, 413, 429, 500, 502, 503, 504, 521, 522, 524,
// added
403,
],
};
const fetchJson = (url) => (0, got_1.default)(url, { retry: retryOptions }).json();
exports.fetchJson = fetchJson;
//# sourceMappingURL=fetchJson.js.map