PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/@polkadot/api-derive/staking
Просмотр файла: stakerPrefs.js
import { map } from 'rxjs';
import { memo } from '../util/index.js';
import { erasHistoricApplyAccount } from './util.js';
export function _stakerPrefs(instanceId, api) {
return memo(instanceId, (accountId, eras, _withActive) => api.query.staking.erasValidatorPrefs.multi(eras.map((e) => [e, accountId])).pipe(map((all) => all.map((validatorPrefs, index) => ({
era: eras[index],
validatorPrefs
})))));
}
export const stakerPrefs = /*#__PURE__*/ erasHistoricApplyAccount('_stakerPrefs');
Выполнить команду
Для локальной разработки. Не используйте в интернете!