@dioxide-js/silas
Version:
RPC utility for Silas
27 lines (24 loc) • 820 B
JavaScript
import { __awaiter } from '../node_modules/tslib/tslib.es6.mjs';
import Fetcher from './request.mjs';
class OverviewService extends Fetcher {
constructor() {
super(...arguments);
this.getTxHistory = (params) => __awaiter(this, void 0, void 0, function* () {
return this.post('chain.txn_history', params);
});
}
chainStatus() {
return __awaiter(this, void 0, void 0, function* () {
const resp = yield this.post('chain.status', {});
return resp;
});
}
getGasPrice() {
return __awaiter(this, void 0, void 0, function* () {
const Result = yield this.chainStatus();
return Result.AvgGasPrice || 0;
});
}
}
export { OverviewService as default };
//# sourceMappingURL=overview.mjs.map