aftermath-ts-sdk - v3.3.3
    Preparing search index...

    Provides low-level Sui chain helpers that need the provider's transport.

    Most applications should use the high-level Sui facade for chain-level reads. This API helper is exposed through AftermathApi.Sui and currently retains the JSON-RPC-only system-state method for compatibility.

    Index
    • Returns Promise<SuiSystemStateSummary>

      Use getSystemState() method instead. This method will be removed in a future release.

      Remaining JSON-RPC surface — see AftermathApi.jsonRpcClient. gRPC has no SuiSystemStateSummary equivalent. client.core.getCurrentSystemState() carries no validators at all, and while client.ledgerService.getEpoch({ readMask: { paths: ["system_state"] } }) does return them (verified: 125 active validators on mainnet, under the runtime key validators, not the generated validatorSet), its validator shape is not a superset of SuiValidatorSummary: keys are renamed (address/p2PAddress/ networkAddress/protocolPublicKey vs suiAddress/p2pAddress/ netAddress/protocolPubkeyBytes), the staking-pool fields are nested rather than flattened, numbers are bigint rather than decimal strings, public keys are Uint8Array rather than base64, and stakingPoolDeactivationEpoch / validatorVeryLowStakeThreshold are absent entirely. Remapping it would change what this method returns.

      Note Sui().getSystemState() — the public method — does not touch the fullnode; it reads the Aftermath API. Only this deprecated helper does.

      If no jsonRpcClient was passed to AftermathApi, since it is optional there.

      const afSdk = await Aftermath.create({ network: "MAINNET" });

      const sui = afSdk.Sui();

      const systemState = await sui.getSystemState();
      console.log(systemState.epoch, systemState.validators