Creates a rewards HTTP client.
Optionalconfig: CallerConfig
Optional network, API host, access token, and API path.
Optionalapi: AftermathApi
Optional low-level provider used to serialize a caller-supplied transaction before requesting a claim transaction.
Optional ReadonlyapiOptional provider used to serialize a caller-supplied claim transaction.
The mutable configuration used for subsequent requests.
Fetches the wallet's currently claimable rewards.
Wallet address to query.
Claimable amounts grouped by coin type. Amounts are bigint
values in each coin's smallest units.
Requests a reward-claim transaction and restores it as a Sui Transaction.
If tx is supplied, this method serializes only its TransactionKind via
AftermathApi.Transactions().fetchBase64TxKindFromTx and sends that
txKind to the API. If tx is omitted, the request can still succeed with
a backend-generated transaction. When the response includes a
sponsorSignature, the returned bytes are parsed as a full transaction;
otherwise they are parsed as a transaction kind. The returned transaction
is not signed or executed by this method.
Wallet address, optional coin filters, recipient, and an optional transaction to extend.
The parsed claim transaction and any backend sponsor signature.
Preview a single account's expected rewards for an epoch, broken down by
domain (trading, referral, AFLP, integrator) plus totals. Backed by the
newer rewards/expected-rewards endpoint. Provide exactly one of address
or accountId; omit epoch for the current epoch.
This method performs an HTTP request. Account IDs are decimal strings so that values larger than JavaScript's safe integer range remain exact.
Account selector, epoch, and optional calculation overrides.
The selected epoch, total reward values, and domain breakdown.
Fetches one page of the wallet's reward history.
Pass cursor from the previous response to request the next page. The
API documents a default page size of 20 and a maximum of 100 entries.
Amounts in each history entry are returned as bigint values in the
coin's smallest units.
Wallet authentication data and optional domain and page parameters.
History entries and pagination metadata.
Fetches the wallet's total reward points.
The request uses the signed authentication fields in inputs. The method
performs HTTP I/O and returns the decoded response.
Wallet address, signed message bytes, and signature.
The total points across all reward epochs and domains.
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.
Provides HTTP access to reward points, reward history, claimable balances, expected rewards, and claim transaction builders.
Read methods request data from the configured Aftermath API. The claim method also converts the API's serialized transaction response into a Sui
Transaction; it does not sign or execute that transaction.