Files
zeekay 0ac8927c3d The P-Chain is read through typed GETs, from the P-Chain that secures the chain
luxd serves no P-Chain JSON-RPC, so every platform.* read the explorer sent
answered 404 and the validators, chains and heights widgets were empty on Lux
and Zoo. Each read is now GET /v1/chain/P/ops/{validators,blockchains,height},
coded against the node's OpenAPI 3.1 document, through GET
/v1/node/p-chain?op=<op>. The proxy's fixed table allows those three ops and one
NodeID parameter; a POST there answers 405.

ChainEntry.pChain is where the P-Chain that secures a chain is read: Lux reads
its own; Zoo, an L2 carried by Lux's validator set, reads Lux's and never its
own node's; Hanzo, on its own committee until hanzod joins as an L2, has none.
P-Chain UI names whose it is ("Lux primary network validators securing Zoo
Network") and prices stake in LUX. The cross-network validator sum is gone: it
counted Lux's validators again under Zoo.

The top bar shows a link only where its page has content: Chains, Bridge and
DEX on the Lux C-Chain host (their pages now 404 elsewhere), Validators where a
P-Chain secures the chain, Stats where there is a P-Chain panel or a stats
service. A P-Chain at genesis renders height #0 rather than nothing. The chain
page's uptime is no longer multiplied by 100.

Claude-Session: https://claude.ai/code/session_011Ge9UnfkEK37Lapx5nfPQK
2026-09-23 20:04:11 -07:00

51 lines
2.7 KiB
TypeScript

import * as guards from './guards';
import { factory } from './utils';
export const base = factory([ ]);
export const block = factory([ guards.notMultichain ]);
export const tx = factory([ guards.notMultichain ]);
export const token = factory([ guards.notMultichain ]);
export const account = factory([ guards.account ]);
export const verifiedAddresses = factory([ guards.account, guards.verifiedAddresses ]);
export const userOps = factory([ guards.userOps ]);
export const marketplace = factory([ guards.marketplace ]);
export const marketplaceEssentialDapp = factory([ guards.marketplaceEssentialDapp ]);
export const apiDocs = factory([ guards.apiDocs ]);
export const csvExport = factory([ guards.csvExport ]);
export const stats = factory([ guards.stats ]);
export const suave = factory([ guards.suave ]);
export const nameServiceEns = factory([ guards.nameServiceEns ]);
export const nameServiceClusters = factory([ guards.nameServiceClusters ]);
export const nameServices = factory([ [ guards.nameServiceEns, guards.nameServiceClusters ] ]);
export const accounts = factory([ guards.accounts ]);
export const accountsLabelSearch = factory([ guards.accountsLabelSearch ]);
export const validators = factory([ guards.validators ]);
export const validatorDetails = factory([ guards.validatorDetails ]);
export const gasTracker = factory([ guards.gasTracker ]);
export const hotContracts = factory([ guards.hotContracts ]);
export const advancedFilter = factory([ guards.advancedFilter ]);
export const dataAvailability = factory([ guards.dataAvailability ]);
export const dev = factory([ guards.dev ]);
export const publicTagsSubmit = factory([ guards.publicTagsSubmit ]);
export const pools = factory([ guards.pools ]);
export const megaEth = factory([ guards.megaEth ]);
export const zetaChainCCTX = factory([ guards.zetaChainCCTX ]);
export const crossChainTxs = factory([ guards.notMultichain, guards.crossChainTxs ]);
export const primaryNetwork = factory([ guards.primaryNetwork ]);
export const pChain = factory([ guards.pChain ]);
// ROLLUPS
export const rollup = factory([ guards.rollup ]);
export const deposits = factory([ guards.deposits ]);
export const withdrawals = factory([ guards.withdrawals ]);
export const batch = factory([ guards.batch ]);
export const batchCelestia = factory([ guards.batchCelestia ]);
export const txnWithdrawals = factory([ guards.txnWithdrawals ]);
export const outputRoots = factory([ guards.outputRoots ]);
export const disputeGames = factory([ guards.disputeGames ]);
export const mud = factory([ guards.mud ]);
export const tac = factory([ guards.tac ]);
export const celo = factory([ guards.celo ]);
export const interopMessages = factory([ guards.interopMessages ]);
export const multichain = factory([ guards.multichain ]);