PHP WebShell

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

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

import { switchMap } from 'rxjs';
import { memo } from '../util/index.js';
/**
 * @description Retrieve the staking overview, including elected and points earned
 */
export function currentPoints(instanceId, api) {
    return memo(instanceId, () => api.derive.session.indexes().pipe(switchMap(({ activeEra }) => api.query.staking.erasRewardPoints(activeEra))));
}

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


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