UNPKG

sth-ts

Version:

An SmartHoldem API wrapper, written in TypeScript to interact with SmartHoldem blockchain.

36 lines 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var model = require("../model/Loader"); /** Loader related API calls. */ var LoaderApi = /** @class */ (function () { function LoaderApi(http) { this.http = http; } /** * Get configuration info of peer */ LoaderApi.prototype.autoConfigure = function (fromPeerUrl) { if (fromPeerUrl) { return this.http.getNative(fromPeerUrl + "/api/loader/autoconfigure", null, model.LoaderAutoConfigure); } return this.http.get('/loader/autoconfigure', null, model.LoaderAutoConfigure); }; /** * Get status blockchain. */ LoaderApi.prototype.loadingStatus = function () { return this.http.get('/loader/status', null, model.LoaderStatus); }; /** * Get the synchronisation status of the client. */ LoaderApi.prototype.synchronisationStatus = function (fromPeerUrl) { if (fromPeerUrl) { return this.http.getNative(fromPeerUrl + "/api/loader/status/sync", null, model.LoaderStatusSync); } return this.http.get('/loader/status/sync', null, model.LoaderStatusSync); }; return LoaderApi; }()); exports.default = LoaderApi; //# sourceMappingURL=LoaderApi.js.map