useSwap hook.
Properties
| Property | Type | Description |
|---|---|---|
swap | (options: ExecuteSwapOptions) => Promise<void> | The function to execute a swap. |
data | | SwapTransactionData | undefined | The data returned from the swap function. |
status | Status | The status of the swap function. |
error | Error | undefined | The error returned from the swap function or due to polling the user operation. |
reset | () => void | Resets the hook to its initial idle state, clearing data, error, and status. |