@gluwa/validator-rewards
v0.3.0
Published
CLI to list unpaid staking eras (in points) for a validator stash; works across legacy and paged-rewards runtimes.
Keywords
Readme
@gluwa/validator-rewards
List unpaid staking eras (in points) for a validator on Creditcoin/Substrate runtimes.
Works across legacy and paged-rewards staking runtimes and tells you how many pages remain to claim for each era.
This is a read-only tool: it queries chain state; it doesn’t hold keys or submit transactions.
Features
- Interactive network picker: Mainnet / Testnet / Custom
- Validator stash prompt (or pass via
--stash) - Runtime-aware logic
- New (paged) staking: uses
claimedRewardsanderasStakersOverview.pageCount - Old (legacy) staking: falls back to
staking.ledgerlegacy claimed list
- New (paged) staking: uses
- Output columns:
era,points,pagesClaimed,pagesToClaim,totalPages
Quick start
Run without installing:
npx @gluwa/validator-rewardsGlobal install:
npm i -g @gluwa/validator-rewards
validator-rewardsBuilding from source:
git clone https://github.com/gluwa/validator-rewards.git
cd validator-rewards
npm i
npm run execYou’ll be asked to select a network:
Mainnet →
wss://mainnet3.creditcoin.network/wsTestnet →
wss://rpc.cc3-testnet.creditcoin.network/wsCustom → type any
ws://orwss://network URL (prefilled from.envif present)
Then enter a validator stash (SS58). You’ll see a table like:
┌─────────┬──────┬────────┬──────────────┬─────────────┬────────────┐
│ (index) │ era │ points │ pagesClaimed │ pagesToClaim│ totalPages │
├─────────┼──────┼────────┼──────────────┼─────────────┼────────────┤
│ 0 │ 578 │ 1234 │ '0' │ 1 │ 2 │
│ 1 │ 579 │ 987 │ '—' │ 1 │ 1 │
└─────────┴──────┴────────┴──────────────┴─────────────┴────────────┘CLI usage
validator-rewards [--stash <SS58>]Flags
--stash — provide a validator stash up front (skips stash prompt).Environment
If you choose Custom network, the prompt is prefilled from .env (if present):
WS_URL=wss://your-node.example/ws