Building Transactions
The Typescript SDK provides multiple ways for you to create the transaction needed to execute specific actions on the Whirlpool contract.
1. Composing your own Transaction
Use the TransactionBuilder class to construct and compose your own Transactions to perform actions on the Whirlpools contract.
Whirlpools Instruction Set
Use to toTx
function if you only have one transaction to send out
Read more on the Transaction Utils category here.
2. Simplified interaction with Whirlpool Client
In some occasions, certain actions require multiple instructions to complete. The SDK includes a WhirlpoolClient class to help construct these complex actions. For example, you can create a transaction to open a position and inject liquidity all in one go!
Read the WhirlpoolClient interface to see what else you can do with this class.
Last updated