Creates the provider-side pool metadata and Move error table.
This constructor does not make a network request. It requires both pool package addresses and referral-vault addresses. DAO-fee commands are available only when the provider also supplies DAO-fee addresses.
The configured AftermathApi provider.
ReadonlyaddressesAddresses of the pool, referral-vault, and optional DAO-fee packages.
OptionaldaoFeePools?: DaoFeePoolsAddressesOptional DAO-fee package addresses.
Package and object addresses for the main pool contracts.
The referral vault used by referral-aware pool commands.
Builds a standalone transaction that updates a DAO fee in basis points.
The helper creates a Transaction, sets its sender from walletAddress,
and delegates to daoFeePoolUpdateFeeBpsTx.
Builds a standalone transaction that updates a DAO fee recipient.
The helper creates a Transaction, sets its sender from walletAddress,
and delegates to daoFeePoolUpdateFeeRecipientTx.
ReadonlyeventFully qualified event types recognized by pool indexer reads.
The original pool deposit event type.
The version-two pool deposit event type.
The original pool swap event type.
The version-two pool swap event type.
The original pool withdrawal event type.
The version-two pool withdrawal event type.
ReadonlymoveMove errors grouped by package, module, and numeric error code.
ReadonlyobjectFully qualified object types recognized by pool object reads.
OptionaldaoFeePool?: stringThe optional DAO fee pool object type.
OptionaldaoFeePoolOwnerCap?: stringThe optional DAO fee owner-cap object type.
The on-chain Pool<L> object type prefix.
Withdraws all coins from a liquidity pool.
The inputs required for the transaction.
An array of coin types.
The ID of the LP coin.
The type of the LP coin.
The transaction block.
poolId identifies the liquidity pool.
OptionalwithTransfer?: booleanWhether or not to include a transfer.
An array of transaction objects.
Builds a transaction block for publishing an LP coin.
The input parameters for the transaction.
The built transaction block.
Creates a transaction to create a new pool.
An object containing the necessary inputs to create the pool.
A transaction block to create the pool.
Withdraws all coins from a liquidity pool.
The inputs required for the transaction.
An array of coin types.
The ID of the LP coin.
The type of the LP coin.
The transaction block.
poolId identifies the liquidity pool.
An array of transaction objects.
Creates a transaction object argument for depositing multiple coins into a pool.
An object containing the necessary parameters for the deposit transaction.
A transaction object argument representing the deposit transaction.
Adds a DAO fee pool creation command to a transaction.
The command wraps an existing pool, stores feeBps in basis points, and
stores feeRecipient as a Sui address. It is available only when the
provider has DAO-fee package addresses.
The transaction, pool object, LP type, fee, and recipient.
The transaction result for the Move pool::new call.
Executes a trade transaction on the specified pool.
An object containing the necessary inputs for the trade transaction.
A TransactionObjectArgument representing the trade transaction.
Adds a DAO fee basis-point update command to a transaction.
The caller must provide the owner-cap object for the DAO fee pool. The
newFeeBps value is encoded as Move u16 basis points, where 100 is 1%.
The transaction, owner cap, DAO fee pool, LP type, and new fee.
The transaction result for the Move pool::update_fee_bps call.
Adds a DAO fee recipient update command to a transaction.
The caller must provide the owner-cap object for the DAO fee pool. The new recipient is encoded as a Sui address by the Move command.
The transaction, owner cap, DAO fee pool, LP type, and recipient.
The transaction result for the Move pool::update_fee_recipient call.
Appends an exact-input pool swap to an existing transaction.
The method uses coinInAmount and the local Pool math to calculate the
expected output, then passes the supplied coin object to tradeTx. It does
not select or merge coin objects and does not serialize the transaction.
The existing transaction, input coin, pool, types, amount, and slippage.
The output coin transaction argument produced by the swap command.
Fetches a transaction block that withdraws all coins from a pool in exchange for the corresponding LP tokens.
An object containing the wallet address, pool, LP coin amount, and optional referrer.
A promise that resolves to a Transaction object.
Fetches a transaction block for depositing in a pool.
The amounts of coins being deposited.
OptionalisSponsoredTx?: booleanWhether the transaction is sponsored.
The pool to deposit in.
Optionalreferrer?: stringThe referrer of the deposit.
The slippage of the deposit.
The wallet address of the user depositing in the pool.
A promise that resolves to the fetched transaction block.
Fetches a transaction block for trading in a pool.
The amount of the coin being traded in.
The coin type of the coin being traded in.
The coin type of the coin being traded out.
OptionalisSponsoredTx?: booleanWhether the transaction is sponsored.
The pool to trade in.
Optionalreferrer?: stringThe referrer of the trade.
The slippage of the trade.
The wallet address of the user trading in the pool.
A promise that resolves to the fetched transaction block.
Fetches a transaction block for withdrawing from a pool.
The amounts of coins being withdrawn.
The amount of LP tokens being withdrawn.
The pool to withdraw from.
Optionalreferrer?: stringThe referrer of the withdrawal.
The slippage of the withdrawal.
The wallet address of the user withdrawing from the pool.
A promise that resolves to the fetched transaction block.
Fetches DAO fee owner-cap objects owned by a wallet.
This method performs an object API read and casts each response to
DaoFeePoolOwnerCapObject. It requires DAO-fee addresses in the provider.
The wallet address whose capabilities should be returned.
A promise for the owned DAO fee owner capabilities.
Creates a transaction object argument for depositing multiple coins into a pool.
An object containing the necessary parameters for the deposit transaction.
A transaction object argument representing the deposit transaction.
Withdraws multiple coins from a pool.
An object containing the necessary parameters for the transaction.
A TransactionObjectArgument representing the transaction.
Returns the pool object ID for a given LP coin type transaction.
An object containing the transaction block and LP coin type.
The pool object ID.
Publishes a transaction block for creating a liquidity pool coin.
An object containing the transaction block and the decimal value of the liquidity pool coin.
A promise that resolves to the result of the transaction publishing.
Executes a trade transaction on the specified pool.
An object containing the necessary inputs for the trade transaction.
A TransactionObjectArgument representing the trade transaction.
Provides pool API reads, Move transaction commands, and pool-specific Move error tables for
AftermathApi.Most methods only build commands. The
fetchBuild*methods also select the caller's coin objects and may register a referrer before returning aTransaction.