Constructs a new instance of the AftermathApi, binding the given Sui client
to the known addresses.
A SuiGrpcClient for on-chain queries and transactions.
The config addresses (object IDs, package IDs, etc.) for the Aftermath protocol.
OptionaljsonRpcClient: SuiJsonRpcClient
Optional. A SuiJsonRpcClient pointed at the same
fullnode. Only used by the three legacy helpers listed on
AftermathApi.jsonRpcClient; every other call goes over gRPC via
client. Omit it unless you call one of those three — they then throw a
descriptive error instead of failing against a deprecated protocol. See
AftermathApi.requireJsonRpcClient.
ReadonlyaddressesPackage and object addresses for the same Sui network as client.
ReadonlyclientSui gRPC client used for low-level on-chain reads and transaction calls.
Optional ReadonlyjsonThe remaining JSON-RPC surface of this SDK, and an optional legacy add-on rather than a structural dependency — pass it only if you call one of the three helpers below. When it is absent they throw (see AftermathApi.requireJsonRpcClient); nothing else in the SDK reads it.
Sui JSON-RPC is deprecated and scheduled for removal from fullnodes in
mid-October 2026, but these helpers cannot be expressed with
SuiGrpcClient without changing what they return to their callers:
Events().fetchCastEventsWithCursor — suix_queryEvents has no
SuiGrpcClient equivalent (only the raw ledgerService, with a
different filter model).Transactions().fetchTransactionsWithCursor — suix_queryTransactionBlocks
has no gRPC equivalent at all (GraphQL or an indexer is required).Sui().fetchSystemState — gRPC has no SuiSystemStateSummary
equivalent (core.getCurrentSystemState() carries no validators, and
ledgerService.getEpoch's validator shape omits several summary
fields). Already @deprecated with no internal callers.This list is now exhaustive, and grep -rn "jsonRpcClient\." src/
returns exactly these three call sites. Neither of the first two is
reachable from the Aftermath frontend.
The object readers that used to be on this list — Objects().fetchObject
/ fetchObjectGeneral / fetchObjectBatch / fetchOwnedObjects and
DynamicFields().fetchDynamicFieldObject — are on gRPC as of plan
251. gRPC's json view does differ in shape from JSON-RPC's
content.fields (UIDs flattened, nested structs unwrapped,
vector<u8> base64-encoded), but that is decidable per read site from
the *FieldsOnChain interface already declared there, so no Move type
layouts are needed — see GrpcCasting's field-shape primitives.
StatichelpersStatic helper references for quick usage without instantiating the class.
Low-level direct coin operations, separate from the higher-level Coin class.
Helpers for accessing or iterating over dynamic fields in Sui objects.
Helpers for working with Sui events and pagination.
Helpers for reading on-chain data in an "inspection" manner (designed for Summaries).
Helpers for retrieving and parsing Sui objects by ID or type.
Low-level Sui chain data ops, separate from the higher-level Sui class.
Helpers for reading transaction data (by digest, query, etc.).
Helper for wallet-based operations, separate from the main Wallet classes.
Creates a new CoinApi instance for detailed coin operations.
A helper bound to this AftermathApi instance.
Creates a new DcaApi instance for dollar-cost averaging logic.
A helper bound to this AftermathApi instance.
Creates a new DynamicFieldsApiHelpers instance for complex object field queries.
A helper bound to this AftermathApi instance.
Creates a new EventsApiHelpers instance for querying Sui events.
A helper bound to this AftermathApi instance.
Creates a new FarmsApi instance for yield farming or liquidity mining interactions.
A helper bound to this AftermathApi instance.
Creates a new FaucetApi instance for dispensing tokens on supported dev/test networks.
A helper bound to this AftermathApi instance.
Creates a new InspectionsApiHelpers instance for reading Summaries or inspection data.
A helper bound to this AftermathApi instance.
Creates a new LimitOrdersApi instance for placing limit orders on supported DEX protocols.
A helper bound to this AftermathApi instance.
Creates a new MultisigApi instance for multi-signature address creation and management.
A helper bound to this AftermathApi instance.
Creates a new NftAmmApi instance for NFT AMM logic (buy, sell, liquidity).
A helper bound to this AftermathApi instance.
Creates a new NftsApi instance for retrieving and interacting with NFT data.
A helper bound to this AftermathApi instance.
Creates a new ObjectsApiHelpers instance for object retrieval/manipulation.
A helper bound to this AftermathApi instance.
Creates a new PerpetualsApi instance for futures or perpetual derivatives on Sui.
A helper bound to this AftermathApi instance.
Creates a new PoolsApi instance for pool-related interactions (AMM pools, liquidity, etc.).
A helper bound to this AftermathApi instance.
Creates a new ReferralVaultApi instance for referral-based logic in Aftermath.
A helper bound to this AftermathApi instance.
Returns the optional AftermathApi.jsonRpcClient, throwing a descriptive error when it was not supplied.
Used by the three helpers that have no SuiGrpcClient equivalent. The
throw is deliberate: these helpers cannot degrade to an empty result
without silently lying to their callers, and JSON-RPC is scheduled for
removal from Sui fullnodes in mid-October 2026, so a missing client is a
configuration error worth naming rather than hiding.
The public helper the caller invoked, e.g.
"Events().fetchCastEventsWithCursor". Named in the error message.
The configured JSON-RPC client.
Creates a new RouterApi instance for best-price trade routing across multiple DEX liquidity sources.
A helper bound to this AftermathApi instance.
Creates a new StakingApi instance for advanced or direct staking operations on Sui.
A helper bound to this AftermathApi instance.
Creates a new SuiApi instance for lower-level Sui chain interactions.
A helper bound to this AftermathApi instance.
Creates a new SuiFrensApi instance for special social or token gating utilities on Sui.
A helper bound to this AftermathApi instance.
Creates a new TransactionsApiHelpers instance for querying or parsing transaction data.
A helper bound to this AftermathApi instance.
Attempts to decode a Move error message into a structured error code, package ID, module name, and descriptive error string.
An object containing the raw errorMessage.
An object with errorCode, packageId, module, and error if translation is successful, or undefined.
Creates a new WalletApi instance for direct wallet-based operations (fetching balances, etc.).
A helper bound to this AftermathApi instance.
The
AftermathApiclass is a low-level factory and reference point for interacting directly with underlying API modules such asPoolsApiandStakingApi. It binds a configuredSuiGrpcClientto the network-specific package and object addresses supplied by the caller.Constructing this class performs no network I/O. The accessor methods create helper instances, and those helpers perform requests when their methods run. A helper that needs an omitted address section throws during construction.
Example
Only if you call one of the three legacy helpers listed on AftermathApi.jsonRpcClient do you need to opt into JSON-RPC:
Example