Collect all fees and rewards from a list of positions.
Collect protocol fees from a list of pools
the addresses of the Whirlpool accounts to collect protocol fees from
A transaction builder to resolve ATA for tokenA and tokenB if needed, and collect protocol fees for all pools
Create a Whirlpool account for a group of token A, token B and tick spacing
the address of the token A
the address of the token B
the space between two ticks in the tick array
the initial tick that the pool is set to (derived from initial price)
the account to debit SOL from to fund the creation of the account(s)
poolKey
: The public key of the newly created whirlpool account. tx
: The transaction containing instructions for the on-chain operations.
Create a Whirlpool account for a group of token A, token B and tick spacing
the address of the token A
the address of the token B
the initial price of the pool (as x token B per 1 token A)
the account to debit SOL from to fund the creation of the account(s)
poolKey
: The public key of the newly created whirlpool account. tx
: The transaction containing instructions for the on-chain operations.
Get this client's WhirlpoolContext object
a WhirlpoolContext object
Get an WhirlpoolAccountCacheInterface to fetch and cache Whirlpool accounts
an WhirlpoolAccountCacheInterface instance
Get a Whirlpool object to interact with the Whirlpool account at the given address.
Get a list of Whirlpool objects matching the provided list of addresses.
the addresses of the Whirlpool accounts
Optional
opts: SimpleAccountFetchOptionsan options object to define fetch and cache options when accessing on-chain accounts
a list of Whirlpool objects to interact with
Get a Position object to interact with the Position account at the given address.
Get a list of Position objects to interact with the Position account at the given addresses.
Optional
opts: SimpleAccountFetchOptionsan options object to define fetch and cache options when accessing on-chain accounts
a Record object between account address and Position. If an address is not a Position account, it will be null.
Get a WhirlpoolRouter to help generate the best prices when transacting across a set of pools.
the addresses of the Whirlpool account addresses to route through
a WhirlpoolRouter instance
Helper class to help interact with Whirlpool Accounts with a simpler interface.