Creates a new instance of the Sui class for fetching chain-level info.
Optionalconfig: CallerConfig
Optional configuration, including the Sui network and an access token.
Optionalapi: AftermathApi
An optional AftermathApi instance for advanced transaction building or data fetching.
Optional ReadonlyapiAn optional AftermathApi instance for advanced transaction building or data fetching.
The mutable configuration used for subsequent requests.
Static ReadonlyconstantsStatic constants containing important addresses on the Sui network:
zero: The zero address (commonly used as a null placeholder).suiPackageId: The package ID for the Sui system package.suiSystemStateId: The object ID for the Sui system state.suiClockId: The object ID for the Sui on-chain clock.Fetches the Sui system state summary object, which contains details about the current epoch, validator set, and other protocol-level data.
A promise that resolves to a SuiSystemStateSummary instance.
StaticapiReturns the canonical Aftermath API host for a Sui network.
To target a custom or local host, pass baseUrl in CallerConfig to the
constructor instead.
The Sui network whose host to return.
The network's HTTPS or local HTTP API host.
StaticdefaultReturns the canonical Sui fullnode URL for a network.
The network whose fullnode URL to return. undefined
defaults to mainnet.
The network's fullnode URL.
The
Suiclass provides utilities to fetch core Sui chain information, such as the system state. It also exposes a set of constant addresses related to the Sui network package IDs.