UNPKG

@dioxide-js/silas

Version:

RPC utility for Silas

40 lines (37 loc) 1.19 kB
import { __awaiter } from '../node_modules/tslib/tslib.es6.mjs'; import Fetcher from './request.mjs'; class BlockSvc extends Fetcher { getExcutedTx(params) { return __awaiter(this, void 0, void 0, function* () { const { limit = 200, pos = 0, height, shardindex } = params; const data = { limit, pos, height, shardindex, }; const resp = yield this.post('chain.txn_history', data); return resp; }); } getHistory(params) { return __awaiter(this, void 0, void 0, function* () { const { limit = 200, pos = 0, height, shardindex } = params; const data = { limit, pos, height, shardindex, }; const resp = yield this.post('chain.block_history', data); return resp; }); } detail(hash) { return __awaiter(this, void 0, void 0, function* () { return this.post('chain.block_detail', { hash }); }); } } export { BlockSvc as default }; //# sourceMappingURL=block.mjs.map