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.
Computes the distribution of the maker and taker reward pools across perpetuals accounts.
Returns per-account maker and taker reward allocations, fee-tier rebates
and volume metrics. When accountIds is omitted or empty the API includes
every eligible account, so pass an explicit list to scope the result.
Note: All data returned is for the current epoch only.
Per-account reward and rebate breakdown for the current epoch.
Fetches the wallet's volume and effective perpetuals fee rates for the running rewards epoch.
Rates are fractions of notional (0.0001 is 1 bp) decided by the volume
the wallet has traded this epoch. The maker rate already nets out the
maker rebate tier, so it can be negative. Zero volumes do not prove the
wallet has not traded: the API returns the same answer while the running
epoch's volumes are still loading.
Wallet address to query.
The running epoch, maker and taker volume in USD, and the effective maker and taker fee rates.
Fetches the running epoch's perpetuals fee schedule: the taker and maker
volume tiers, the maker rebate tiers, and the epoch bounds. The schedule
is the same for every wallet; pair it with getFeeRate to place a wallet
on it.
The running epoch, its start and end, and the tiers in ascending order.
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.
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, 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.