Creates an NFT AMM facade without making a request.
The optional api is stored for callers that construct the facade with a
low-level provider. Requests still require a configured API host through
config.
Optionalconfig: CallerConfig
Optional network, API host, endpoint, or access-token configuration.
Optionalapi: AftermathApi
Optional AftermathApi used by NFT AMM transaction helpers.
Optional ReadonlyapiOptional AftermathApi used by NFT AMM transaction helpers.
The mutable configuration used for subsequent requests.
Static ReadonlyconstantsReserved NFT AMM constants. No public constants are defined currently.
Fetches every NFT AMM market exposed by the Aftermath API.
All returned market facades.
Fetches one NFT AMM market and wraps the response in an NftAmmMarket.
This method performs an HTTP GET through the configured Aftermath API. The
returned facade contains the market and pool data needed for local
calculations. In the current implementation, this method passes config
but not the facade's optional api to NftAmmMarket, so transaction and
NFT-table methods on the returned object throw if it has no API instance.
The market's on-chain object ID.
The fetched market facade.
Fetches several NFT AMM markets concurrently and wraps each response.
Each ID is requested through getMarket, so the method performs one HTTP
request per ID and preserves the input order in the returned array.
The on-chain market object IDs to fetch.
The market facades in the same order as inputs.objectIds.
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 high-level reads for NFT AMM markets and creates market facades for pricing, NFT reads, and transaction construction.
Example