FusionSDKConfigParams
Configuration object for initializing the FusionSDK.API endpoint URL for the Fusion APIExample:
https://api.1inch.dev/fusionBlockchain network to operate onSee NetworkEnum for available values
Authentication key for accessing the Fusion APIRequired for production use and higher rate limits
Custom blockchain provider for signing transactions and making contract callsSee BlockchainProviderConnector for interface details
Custom HTTP provider for API requestsDefaults to axios if not provided. See HttpProviderConnector for interface details
NetworkEnum
Supported blockchain networks for Fusion Mode.Supported Networks
Ethereum Mainnet
Polygon (Matic) Network
zkSync Era
BNB Smart Chain (BSC)
Arbitrum One
Avalanche C-Chain
Optimism
Fantom Opera
Gnosis Chain
Base (Coinbase L2)
Linea
Sonic
Unichain
BlockchainProviderConnector
Interface for custom blockchain providers that handle transaction signing and contract calls.Methods
signTypedData
Signs EIP-712 typed data for order creation.The wallet address performing the signing
The typed data structure to sign (EIP-712 format)
The resulting signature as a hex string
ethCall
Performs a read-only contract call.The contract address to call
Encoded call data (hex string)
The call result as a hex string
Example Implementation
HttpProviderConnector
Interface for custom HTTP providers that handle API requests.Methods
get
Performs a GET request.The URL to request
The response data (typed)
post
Performs a POST request.The URL to request
The request body data
The response data (typed)
Example Implementation
WsApiConfigWithNetwork
Configuration object for WebSocket API connections.WebSocket endpoint URLExample:
wss://api.1inch.dev/fusion/wsBlockchain network to connect to
Authentication key for WebSocket access
If
true, delays connection until init() is calledDefault: falseCommon Types
IntegratorFeeRequest
Integrator fee configuration for requests.Address that will receive the integrator fee
Fee amount in basis points (1% = 100 bps)Example:
new Bps(100n) for 1%PresetEnum
Auction speed presets.Fast auction (shorter duration, quicker execution)
Medium-speed auction (balanced)
Slow auction (longer duration, potentially better pricing)
Custom auction with user-defined parameters