@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
22 lines • 809 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const live_network_1 = __importDefault(require("@ledgerhq/live-network"));
const live_env_1 = require("@ledgerhq/live-env");
const baseStatusUrl = () => (0, live_env_1.getEnv)("STATUS_API_URL");
const statusVersion = () => (0, live_env_1.getEnv)("STATUS_API_VERSION");
async function fetchStatusSummary() {
const url = `${baseStatusUrl()}/v${statusVersion()}/summary.json`;
const { data } = await (0, live_network_1.default)({
method: "GET",
url,
});
return data;
}
const api = {
fetchStatusSummary,
};
exports.default = api;
//# sourceMappingURL=api.js.map