selectOptimalConfig()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / selectOptimalConfig
Function: selectOptimalConfig()
Section titled “Function: selectOptimalConfig()”selectOptimalConfig(
chainId,profile?,options?):UnifiedOptimizationResult
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:24428
Select optimal configuration based on chain
Parameters
Section titled “Parameters”chainId
Section titled “chainId”Target chain identifier
profile?
Section titled “profile?”Optimization profile
options?
Section titled “options?”Additional options
baseFee?
Section titled “baseFee?”bigint
Current base fee (for EVM chains)
priorityFeePercentiles?
Section titled “priorityFeePercentiles?”{ p50: number; p75: number; p90: number; }
Current priority fee percentiles (for Solana)
priorityFeePercentiles.p50
Section titled “priorityFeePercentiles.p50”number
priorityFeePercentiles.p75
Section titled “priorityFeePercentiles.p75”number
priorityFeePercentiles.p90
Section titled “priorityFeePercentiles.p90”number
complexityHint?
Section titled “complexityHint?”"medium" | "simple" | "complex"
Transaction complexity hint
Returns
Section titled “Returns”Unified optimization result
Example
Section titled “Example”// Automatically select optimal settings for Solanaconst config = selectOptimalConfig('solana', 'standard')
// For EVM chainconst ethConfig = selectOptimalConfig('ethereum', 'fast', { baseFee: 30_000_000_000n // 30 gwei})