UNPKG

@dolomite-exchange/dolomite-margin

Version:

Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol

26 lines 912 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.SubgraphAPI = void 0; const axios_1 = __importDefault(require("axios")); const DEFAULT_API_ENDPOINT = 'https://api.thegraph.com/subgraphs/name/dolomite-exchange/dolomite-v2-mumbai'; const DEFAULT_API_TIMEOUT = 10000; const defaultMethod = 'POST'; class SubgraphAPI { constructor(endpoint = DEFAULT_API_ENDPOINT, timeout = DEFAULT_API_TIMEOUT) { this.endpoint = endpoint; this.timeout = timeout; } // TODO async foo() { return axios_1.default.request({ url: this.endpoint, timeout: this.timeout, method: defaultMethod, }); } } exports.SubgraphAPI = SubgraphAPI; //# sourceMappingURL=SubgraphAPI.js.map