Uses Connection.confirmTransaction and Connection.simulateTransaction to await the success or failure of the swap execution.
a @solana/web3.js Connection
Optionalcommitment: Commitment(optional) uses commitment configured on connection by default
the base58 encoded signature of the swap tx.
Sign transaction using the provided Wallet.
a Solana Wallet Adapter usually accessed by useWallet().wallet.adapter
Sign transaction using the provided Keypair.
a @solana/web3.js Keypair
SpurCompiledSwap is the recommended way to execute a swap.
If you want to manage delivery of the transaction youself, you can access it as
swapTx.