PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/@polkadot/api-derive/cjs/staking

Просмотр файла: currentPoints.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.currentPoints = currentPoints;
const rxjs_1 = require("rxjs");
const index_js_1 = require("../util/index.js");
/**
 * @description Retrieve the staking overview, including elected and points earned
 */
function currentPoints(instanceId, api) {
    return (0, index_js_1.memo)(instanceId, () => api.derive.session.indexes().pipe((0, rxjs_1.switchMap)(({ activeEra }) => api.query.staking.erasRewardPoints(activeEra))));
}

Выполнить команду


Для локальной разработки. Не используйте в интернете!