fusion_swap_sdk 1.0.3
fusion_swap_sdk: ^1.0.3 copied to clipboard
Utils library for 1inch Fusion Mode.
fusion_swap_sdk #
Utils library for 1inch Fusion Mode.
Experience fusion swap in app at Avacus
Feel free to use and don't hesitate to raise issue if there are.
Getting Started #
Import and create instance
import 'package:fusion_swap_sdk/fusion_swap_sdk.dart';
final _fusionSDK = FusionSDK(chainId: chainId);
copied to clipboard
Get quote
final quote = await _fusionSDK.getQuote(fromTokenAddress: fromTokenAddress, toTokenAddress: toTokenAddress, amount: amount);
copied to clipboard
Create order
final order = await _fusionSDK.createOrder(fromTokenAddress: fromTokenAddress, toTokenAddress: toTokenAddress, amount: amount, walletAddress: walletAddress);
copied to clipboard
Submit order
await _fusionSDK.submitOrder(preparedOrder: preparedOrder, signature: signature);
copied to clipboard
Get order status
final status = await _fusionSDK.submitOrder(orderHash: orderHash);
copied to clipboard