PancakeSwap V4 Official SDK, used for PancakeSwap Interface and interacting with PancakeSwap V4 smart contracts.
TBD
in Bin Pool, we use symbol Y
and X
to represent the two tokens in the pool. Like the 1
and 0
in CLAMM Pool.
- getBinPool: Get the bin pool with state
- getIdFromPrice: Get the bin id from given price
- getPriceFromId: Get the price from given bin id
- getNextNonEmptyBin: Get the next non-empty bin
- swap: Dry run Swap tokens in bin pool, return the state after swap
- getPoolId: Get the pool id from given PoolKey
- getSortedCurrencies: Returns the sorted currencies from given
- encodeHooksRegistration: hooks registration option encoder
- encodePoolParameters: pool parameters encoder
pnpm install
pnpm run test